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

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

igraph_connected_components:
   85|  5.04k|) {
   86|  5.04k|    if (mode == IGRAPH_WEAK || !igraph_is_directed(graph)) {
  ------------------
  |  Branch (86:9): [True: 2.91k, False: 2.12k]
  |  Branch (86:32): [True: 0, False: 2.12k]
  ------------------
   87|  2.91k|        return igraph_i_connected_components_weak(graph, membership, csize, no);
   88|  2.91k|    } else if (mode == IGRAPH_STRONG) {
  ------------------
  |  Branch (88:16): [True: 2.12k, False: 0]
  ------------------
   89|  2.12k|        return igraph_i_connected_components_strong(graph, membership, csize, no);
   90|  2.12k|    }
   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.12k|                     igraph_int_t maxcompno, igraph_int_t minelements) {
  606|  2.12k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (606:9): [True: 0, False: 2.12k]
  ------------------
  607|      0|        mode = IGRAPH_WEAK;
  608|      0|    }
  609|       |
  610|  2.12k|    switch (mode) {
  611|      0|    case IGRAPH_WEAK:
  ------------------
  |  Branch (611:5): [True: 0, False: 2.12k]
  ------------------
  612|      0|        return igraph_i_decompose_weak(graph, components, maxcompno, minelements);
  613|  2.12k|    case IGRAPH_STRONG:
  ------------------
  |  Branch (613:5): [True: 2.12k, False: 0]
  ------------------
  614|  2.12k|        return igraph_i_decompose_strong(graph, components, maxcompno, minelements);
  615|      0|    default:
  ------------------
  |  Branch (615:5): [True: 0, False: 2.12k]
  ------------------
  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.12k|    }
  618|  2.12k|}
igraph_subcomponent:
 1557|  2.12k|) {
 1558|       |
 1559|  2.12k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
 1560|  2.12k|    igraph_dqueue_int_t q = IGRAPH_DQUEUE_NULL;
  ------------------
  |  |   56|  2.12k|#define IGRAPH_DQUEUE_NULL { 0,0,0,0 }
  ------------------
 1561|  2.12k|    igraph_bitset_t already_added;
 1562|  2.12k|    igraph_int_t i, vsize;
 1563|  2.12k|    igraph_vector_int_t tmp = IGRAPH_VECTOR_NULL;
  ------------------
  |  |   99|  2.12k|    #define IGRAPH_VECTOR_NULL { 0,0,0 }
  ------------------
 1564|       |
 1565|  2.12k|    if (vertex < 0 || vertex >= no_of_nodes) {
  ------------------
  |  Branch (1565:9): [True: 0, False: 2.12k]
  |  Branch (1565:23): [True: 0, False: 2.12k]
  ------------------
 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.12k|    if (mode != IGRAPH_OUT && mode != IGRAPH_IN &&
  ------------------
  |  Branch (1568:9): [True: 0, False: 2.12k]
  |  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.12k|    igraph_vector_int_clear(res);
 1574|       |
 1575|  2.12k|    IGRAPH_BITSET_INIT_FINALLY(&already_added, no_of_nodes);
  ------------------
  |  |  259|  2.12k|#define IGRAPH_BITSET_INIT_FINALLY(bitset, size) \
  |  |  260|  2.12k|do { IGRAPH_CHECK(igraph_bitset_init(bitset, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.12k|    do { \
  |  |  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  261|  2.12k|     IGRAPH_FINALLY(igraph_bitset_destroy, bitset); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.12k|    do { \
  |  |  |  |  604|  2.12k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.12k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.12k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.12k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.12k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (261:62): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
 1576|  2.12k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&tmp, 0);
  ------------------
  |  |  119|  2.12k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.12k|    do { \
  |  |  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.12k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.12k|    do { \
  |  |  |  |  604|  2.12k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.12k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.12k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.12k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.12k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
 1577|  2.12k|    IGRAPH_DQUEUE_INT_INIT_FINALLY(&q, 100);
  ------------------
  |  |   61|  2.12k|    do { IGRAPH_CHECK(igraph_dqueue_int_init(q, capacity)); \
  |  |  ------------------
  |  |  |  |  656|  2.12k|    do { \
  |  |  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|  2.12k|        IGRAPH_FINALLY(igraph_dqueue_int_destroy, q); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.12k|    do { \
  |  |  |  |  604|  2.12k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.12k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.12k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.12k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.12k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (62:64): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
 1578|       |
 1579|  2.12k|    IGRAPH_CHECK(igraph_dqueue_int_push(&q, vertex));
  ------------------
  |  |  656|  2.12k|    do { \
  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
 1580|  2.12k|    IGRAPH_CHECK(igraph_vector_int_push_back(res, vertex));
  ------------------
  |  |  656|  2.12k|    do { \
  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
 1581|  2.12k|    IGRAPH_BIT_SET(already_added, vertex);
  ------------------
  |  |  103|  2.12k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|  2.12k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|  2.12k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  2.12k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|  2.12k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  2.12k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1582|       |
 1583|  27.8k|    while (!igraph_dqueue_int_empty(&q)) {
  ------------------
  |  Branch (1583:12): [True: 25.7k, False: 2.12k]
  ------------------
 1584|  25.7k|        igraph_int_t actnode = igraph_dqueue_int_pop(&q);
 1585|       |
 1586|  25.7k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|  25.7k|    do { \
  |  |   47|  25.7k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 25.7k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|  25.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 25.7k]
  |  |  ------------------
  ------------------
 1587|       |
 1588|  25.7k|        IGRAPH_CHECK(igraph_neighbors(graph, &tmp, actnode, mode, IGRAPH_NO_LOOPS, IGRAPH_MULTIPLE));
  ------------------
  |  |  656|  25.7k|    do { \
  |  |  657|  25.7k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  25.7k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  25.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 25.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|  25.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 25.7k]
  |  |  ------------------
  ------------------
 1589|  25.7k|        vsize = igraph_vector_int_size(&tmp);
 1590|  63.1k|        for (i = 0; i < vsize; i++) {
  ------------------
  |  Branch (1590:21): [True: 37.3k, False: 25.7k]
  ------------------
 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.7k, False: 23.6k]
  |  |  ------------------
  ------------------
 1594|  13.7k|                continue;
 1595|  13.7k|            }
 1596|  23.6k|            IGRAPH_BIT_SET(already_added, neighbor);
  ------------------
  |  |  103|  23.6k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|  23.6k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|  23.6k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  23.6k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|  23.6k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  23.6k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1597|  23.6k|            IGRAPH_CHECK(igraph_vector_int_push_back(res, neighbor));
  ------------------
  |  |  656|  23.6k|    do { \
  |  |  657|  23.6k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  23.6k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  23.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 23.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|  23.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 23.6k]
  |  |  ------------------
  ------------------
 1598|  23.6k|            IGRAPH_CHECK(igraph_dqueue_int_push(&q, neighbor));
  ------------------
  |  |  656|  23.6k|    do { \
  |  |  657|  23.6k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  23.6k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  23.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 23.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|  23.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 23.6k]
  |  |  ------------------
  ------------------
 1599|  23.6k|        }
 1600|  25.7k|    }
 1601|       |
 1602|  2.12k|    igraph_dqueue_int_destroy(&q);
 1603|  2.12k|    igraph_vector_int_destroy(&tmp);
 1604|  2.12k|    igraph_bitset_destroy(&already_added);
 1605|  2.12k|    IGRAPH_FINALLY_CLEAN(3);
 1606|       |
 1607|  2.12k|    return IGRAPH_SUCCESS;
 1608|  2.12k|}
components.c:igraph_i_connected_components_weak:
   98|  2.91k|) {
   99|       |
  100|  2.91k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  101|  2.91k|    igraph_int_t no_of_components;
  102|  2.91k|    igraph_bitset_t already_added;
  103|  2.91k|    igraph_dqueue_int_t q = IGRAPH_DQUEUE_NULL;
  ------------------
  |  |   56|  2.91k|#define IGRAPH_DQUEUE_NULL { 0,0,0,0 }
  ------------------
  104|  2.91k|    igraph_vector_int_t neis = IGRAPH_VECTOR_NULL;
  ------------------
  |  |   99|  2.91k|    #define IGRAPH_VECTOR_NULL { 0,0,0 }
  ------------------
  105|       |
  106|       |    /* Memory for result, csize is dynamically allocated */
  107|  2.91k|    if (membership) {
  ------------------
  |  Branch (107:9): [True: 0, False: 2.91k]
  ------------------
  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|  2.91k|    if (csize) {
  ------------------
  |  Branch (110:9): [True: 2.91k, False: 0]
  ------------------
  111|  2.91k|        igraph_vector_int_clear(csize);
  112|  2.91k|    }
  113|       |
  114|       |    /* Try to make use of cached information. */
  115|  2.91k|    if (igraph_i_property_cache_has(graph, IGRAPH_PROP_IS_WEAKLY_CONNECTED) &&
  ------------------
  |  Branch (115:9): [True: 1.01k, False: 1.90k]
  ------------------
  116|  1.01k|        igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_IS_WEAKLY_CONNECTED)) {
  ------------------
  |  Branch (116:9): [True: 190, False: 824]
  ------------------
  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|    190|        if (membership) {
  ------------------
  |  Branch (121:13): [True: 0, False: 190]
  ------------------
  122|       |            /* All vertices are members of the same component,
  123|       |             * component number 0. */
  124|      0|            igraph_vector_int_null(membership);
  125|      0|        }
  126|    190|        if (csize) {
  ------------------
  |  Branch (126:13): [True: 190, False: 0]
  ------------------
  127|       |            /* The size of the single component is the same as the vertex count. */
  128|    190|            IGRAPH_CHECK(igraph_vector_int_push_back(csize, no_of_nodes));
  ------------------
  |  |  656|    190|    do { \
  |  |  657|    190|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    190|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    190|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 190]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    190|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 190]
  |  |  ------------------
  ------------------
  129|    190|        }
  130|    190|        if (no) {
  ------------------
  |  Branch (130:13): [True: 0, False: 190]
  ------------------
  131|       |            /* There is one component. */
  132|      0|            *no = 1;
  133|      0|        }
  134|    190|        return IGRAPH_SUCCESS;
  135|    190|    }
  136|       |
  137|  2.72k|    IGRAPH_BITSET_INIT_FINALLY(&already_added, no_of_nodes);
  ------------------
  |  |  259|  2.72k|#define IGRAPH_BITSET_INIT_FINALLY(bitset, size) \
  |  |  260|  2.72k|do { IGRAPH_CHECK(igraph_bitset_init(bitset, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.72k|    do { \
  |  |  |  |  657|  2.72k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.72k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.72k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.72k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.72k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  261|  2.72k|     IGRAPH_FINALLY(igraph_bitset_destroy, bitset); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.72k|    do { \
  |  |  |  |  604|  2.72k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.72k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.72k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.72k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.72k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.72k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.72k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.72k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (261:62): [Folded, False: 2.72k]
  |  |  ------------------
  ------------------
  138|  2.72k|    IGRAPH_DQUEUE_INT_INIT_FINALLY(&q, no_of_nodes > 100000 ? 10000 : no_of_nodes / 10);
  ------------------
  |  |   61|  2.72k|    do { IGRAPH_CHECK(igraph_dqueue_int_init(q, capacity)); \
  |  |  ------------------
  |  |  |  |  656|  2.72k|    do { \
  |  |  |  |  657|  5.45k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (657:40): [True: 0, False: 2.72k]
  |  |  |  |  ------------------
  |  |  |  |  658|  2.72k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.72k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.72k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.72k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|  2.72k|        IGRAPH_FINALLY(igraph_dqueue_int_destroy, q); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.72k|    do { \
  |  |  |  |  604|  2.72k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.72k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.72k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.72k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.72k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.72k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.72k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.72k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (62:64): [Folded, False: 2.72k]
  |  |  ------------------
  ------------------
  139|  2.72k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&neis, 0);
  ------------------
  |  |  119|  2.72k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.72k|    do { \
  |  |  |  |  657|  2.72k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.72k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.72k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.72k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.72k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.72k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.72k|    do { \
  |  |  |  |  604|  2.72k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.72k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.72k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.72k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.72k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.72k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.72k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.72k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.72k]
  |  |  ------------------
  ------------------
  140|       |
  141|       |    /* The algorithm */
  142|       |
  143|  2.72k|    no_of_components = 0;
  144|   488k|    for (igraph_int_t first_node = 0; first_node < no_of_nodes; ++first_node) {
  ------------------
  |  Branch (144:39): [True: 485k, False: 2.72k]
  ------------------
  145|   485k|        igraph_int_t act_component_size;
  146|       |
  147|   485k|        if (IGRAPH_BIT_TEST(already_added, first_node)) {
  ------------------
  |  |  142|   485k|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|   485k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|   485k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|   485k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|   485k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|   485k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (142:36): [True: 54.3k, False: 431k]
  |  |  ------------------
  ------------------
  148|  54.3k|            continue;
  149|  54.3k|        }
  150|   431k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|   431k|    do { \
  |  |   47|   431k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 431k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|   431k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 431k]
  |  |  ------------------
  ------------------
  151|       |
  152|   431k|        IGRAPH_BIT_SET(already_added, first_node);
  ------------------
  |  |  103|   431k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|   431k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|   431k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|   431k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|   431k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|   431k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  153|   431k|        act_component_size = 1;
  154|   431k|        if (membership) {
  ------------------
  |  Branch (154:13): [True: 0, False: 431k]
  ------------------
  155|      0|            VECTOR(*membership)[first_node] = no_of_components;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  156|      0|        }
  157|   431k|        IGRAPH_CHECK(igraph_dqueue_int_push(&q, first_node));
  ------------------
  |  |  656|   431k|    do { \
  |  |  657|   431k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   431k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   431k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 431k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   431k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 431k]
  |  |  ------------------
  ------------------
  158|       |
  159|   917k|        while ( !igraph_dqueue_int_empty(&q) ) {
  ------------------
  |  Branch (159:17): [True: 485k, False: 431k]
  ------------------
  160|   485k|            igraph_int_t act_node = igraph_dqueue_int_pop(&q);
  161|   485k|            IGRAPH_CHECK(igraph_neighbors(
  ------------------
  |  |  656|   485k|    do { \
  |  |  657|   485k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   485k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   485k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 485k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   485k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 485k]
  |  |  ------------------
  ------------------
  162|   485k|                graph, &neis, act_node, IGRAPH_ALL, IGRAPH_NO_LOOPS, IGRAPH_MULTIPLE
  163|   485k|            ));
  164|   485k|            igraph_int_t nei_count = igraph_vector_int_size(&neis);
  165|   640k|            for (igraph_int_t i = 0; i < nei_count; i++) {
  ------------------
  |  Branch (165:38): [True: 154k, False: 485k]
  ------------------
  166|   154k|                igraph_int_t neighbor = VECTOR(neis)[i];
  ------------------
  |  |   60|   154k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  167|   154k|                if (IGRAPH_BIT_TEST(already_added, neighbor)) {
  ------------------
  |  |  142|   154k|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|   154k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|   154k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|   154k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|   154k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|   154k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (142:36): [True: 100k, False: 54.3k]
  |  |  ------------------
  ------------------
  168|   100k|                    continue;
  169|   100k|                }
  170|  54.3k|                IGRAPH_CHECK(igraph_dqueue_int_push(&q, neighbor));
  ------------------
  |  |  656|  54.3k|    do { \
  |  |  657|  54.3k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  54.3k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  54.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 54.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|  54.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 54.3k]
  |  |  ------------------
  ------------------
  171|  54.3k|                IGRAPH_BIT_SET(already_added, neighbor);
  ------------------
  |  |  103|  54.3k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|  54.3k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|  54.3k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  54.3k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|  54.3k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  54.3k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  172|  54.3k|                act_component_size++;
  173|  54.3k|                if (membership) {
  ------------------
  |  Branch (173:21): [True: 0, False: 54.3k]
  ------------------
  174|      0|                    VECTOR(*membership)[neighbor] = no_of_components;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  175|      0|                }
  176|  54.3k|            }
  177|   485k|        }
  178|       |
  179|   431k|        no_of_components++;
  180|   431k|        if (csize) {
  ------------------
  |  Branch (180:13): [True: 431k, False: 0]
  ------------------
  181|   431k|            IGRAPH_CHECK(igraph_vector_int_push_back(csize, act_component_size));
  ------------------
  |  |  656|   431k|    do { \
  |  |  657|   431k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   431k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   431k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 431k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   431k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 431k]
  |  |  ------------------
  ------------------
  182|   431k|        }
  183|   431k|    }
  184|       |
  185|       |    /* Cleaning up */
  186|       |
  187|  2.72k|    if (no) {
  ------------------
  |  Branch (187:9): [True: 0, False: 2.72k]
  ------------------
  188|      0|        *no = no_of_components;
  189|      0|    }
  190|       |
  191|       |    /* Clean up */
  192|  2.72k|    igraph_bitset_destroy(&already_added);
  193|  2.72k|    igraph_dqueue_int_destroy(&q);
  194|  2.72k|    igraph_vector_int_destroy(&neis);
  195|  2.72k|    IGRAPH_FINALLY_CLEAN(3);
  196|       |
  197|       |    /* Update cache */
  198|  2.72k|    igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_IS_WEAKLY_CONNECTED, no_of_components == 1);
  199|       |
  200|  2.72k|    return IGRAPH_SUCCESS;
  201|  2.72k|}
components.c:igraph_i_connected_components_strong:
  206|  2.12k|) {
  207|  2.12k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  208|  2.12k|    igraph_vector_int_t next_nei = IGRAPH_VECTOR_NULL;
  ------------------
  |  |   99|  2.12k|    #define IGRAPH_VECTOR_NULL { 0,0,0 }
  ------------------
  209|  2.12k|    igraph_int_t num_seen;
  210|  2.12k|    igraph_dqueue_int_t q = IGRAPH_DQUEUE_NULL;
  ------------------
  |  |   56|  2.12k|#define IGRAPH_DQUEUE_NULL { 0,0,0,0 }
  ------------------
  211|  2.12k|    igraph_int_t no_of_components = 0;
  212|  2.12k|    igraph_vector_int_t out = IGRAPH_VECTOR_NULL;
  ------------------
  |  |   99|  2.12k|    #define IGRAPH_VECTOR_NULL { 0,0,0 }
  ------------------
  213|  2.12k|    igraph_adjlist_t adjlist;
  214|       |
  215|       |    /* Memory for result, csize is dynamically allocated */
  216|  2.12k|    if (membership) {
  ------------------
  |  Branch (216:9): [True: 2.12k, False: 0]
  ------------------
  217|  2.12k|        IGRAPH_CHECK(igraph_vector_int_resize(membership, no_of_nodes));
  ------------------
  |  |  656|  2.12k|    do { \
  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  218|  2.12k|    }
  219|  2.12k|    if (csize) {
  ------------------
  |  Branch (219:9): [True: 2.12k, False: 0]
  ------------------
  220|  2.12k|        igraph_vector_int_clear(csize);
  221|  2.12k|    }
  222|       |
  223|       |    /* Try to make use of cached information. */
  224|  2.12k|    if (igraph_i_property_cache_has(graph, IGRAPH_PROP_IS_STRONGLY_CONNECTED) &&
  ------------------
  |  Branch (224:9): [True: 0, False: 2.12k]
  ------------------
  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.12k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&next_nei, no_of_nodes);
  ------------------
  |  |  119|  2.12k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.12k|    do { \
  |  |  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.12k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.12k|    do { \
  |  |  |  |  604|  2.12k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.12k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.12k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.12k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.12k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  249|  2.12k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&out, 0);
  ------------------
  |  |  119|  2.12k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.12k|    do { \
  |  |  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.12k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.12k|    do { \
  |  |  |  |  604|  2.12k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.12k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.12k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.12k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.12k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  250|  2.12k|    IGRAPH_DQUEUE_INT_INIT_FINALLY(&q, 100);
  ------------------
  |  |   61|  2.12k|    do { IGRAPH_CHECK(igraph_dqueue_int_init(q, capacity)); \
  |  |  ------------------
  |  |  |  |  656|  2.12k|    do { \
  |  |  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|  2.12k|        IGRAPH_FINALLY(igraph_dqueue_int_destroy, q); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.12k|    do { \
  |  |  |  |  604|  2.12k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.12k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.12k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.12k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.12k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (62:64): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  251|       |
  252|  2.12k|    IGRAPH_CHECK(igraph_vector_int_reserve(&out, no_of_nodes));
  ------------------
  |  |  656|  2.12k|    do { \
  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  253|       |
  254|  2.12k|    IGRAPH_CHECK(igraph_adjlist_init(graph, &adjlist, IGRAPH_OUT, IGRAPH_LOOPS_ONCE, IGRAPH_MULTIPLE));
  ------------------
  |  |  656|  2.12k|    do { \
  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  255|  2.12k|    IGRAPH_FINALLY(igraph_adjlist_destroy, &adjlist);
  ------------------
  |  |  603|  2.12k|    do { \
  |  |  604|  2.12k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.12k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.12k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.12k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.12k]
  |  |  ------------------
  |  |  608|  2.12k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  256|       |
  257|  2.12k|    num_seen = 0;
  258|   364k|    for (igraph_int_t i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (258:30): [True: 362k, False: 2.12k]
  ------------------
  259|   362k|        const igraph_vector_int_t *tmp;
  260|       |
  261|   362k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|   362k|    do { \
  |  |   47|   362k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 362k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|   362k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 362k]
  |  |  ------------------
  ------------------
  262|       |
  263|   362k|        tmp = igraph_adjlist_get(&adjlist, i);
  ------------------
  |  |   73|   362k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  264|   362k|        if (VECTOR(next_nei)[i] > igraph_vector_int_size(tmp)) {
  ------------------
  |  |   60|   362k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (264:13): [True: 33.4k, False: 328k]
  ------------------
  265|  33.4k|            continue;
  266|  33.4k|        }
  267|       |
  268|   328k|        IGRAPH_CHECK(igraph_dqueue_int_push(&q, i));
  ------------------
  |  |  656|   328k|    do { \
  |  |  657|   328k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   328k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   328k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 328k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   328k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 328k]
  |  |  ------------------
  ------------------
  269|  1.13M|        while (!igraph_dqueue_int_empty(&q)) {
  ------------------
  |  Branch (269:16): [True: 803k, False: 328k]
  ------------------
  270|   803k|            igraph_int_t act_node = igraph_dqueue_int_back(&q);
  271|   803k|            tmp = igraph_adjlist_get(&adjlist, act_node);
  ------------------
  |  |   73|   803k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  272|   803k|            if (VECTOR(next_nei)[act_node] == 0) {
  ------------------
  |  |   60|   803k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (272:17): [True: 362k, False: 440k]
  ------------------
  273|       |                /* this is the first time we've met this vertex */
  274|   362k|                VECTOR(next_nei)[act_node]++;
  ------------------
  |  |   60|   362k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  275|   440k|            } else if (VECTOR(next_nei)[act_node] <= igraph_vector_int_size(tmp)) {
  ------------------
  |  |   60|   440k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (275:24): [True: 78.4k, False: 362k]
  ------------------
  276|       |                /* we've already met this vertex but it has more children */
  277|  78.4k|                igraph_int_t neighbor = VECTOR(*tmp)[VECTOR(next_nei)[act_node] - 1];
  ------------------
  |  |   60|  78.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              igraph_int_t neighbor = VECTOR(*tmp)[VECTOR(next_nei)[act_node] - 1];
  ------------------
  |  |   60|  78.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  278|  78.4k|                if (VECTOR(next_nei)[neighbor] == 0) {
  ------------------
  |  |   60|  78.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (278:21): [True: 33.4k, False: 44.9k]
  ------------------
  279|  33.4k|                    IGRAPH_CHECK(igraph_dqueue_int_push(&q, neighbor));
  ------------------
  |  |  656|  33.4k|    do { \
  |  |  657|  33.4k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  33.4k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  33.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 33.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|  33.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 33.4k]
  |  |  ------------------
  ------------------
  280|  33.4k|                }
  281|  78.4k|                VECTOR(next_nei)[act_node]++;
  ------------------
  |  |   60|  78.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  282|   362k|            } else {
  283|       |                /* we've met this vertex and it has no more children */
  284|   362k|                IGRAPH_CHECK(igraph_vector_int_push_back(&out, act_node));
  ------------------
  |  |  656|   362k|    do { \
  |  |  657|   362k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   362k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   362k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 362k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   362k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 362k]
  |  |  ------------------
  ------------------
  285|   362k|                igraph_dqueue_int_pop_back(&q);
  286|   362k|                num_seen++;
  287|       |
  288|   362k|                if (num_seen % 10000 == 0) {
  ------------------
  |  Branch (288:21): [True: 0, False: 362k]
  ------------------
  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|   362k|            }
  295|   803k|        } /* while q */
  296|   328k|    }  /* for */
  297|       |
  298|  2.12k|    IGRAPH_PROGRESS("Strongly connected components: ", 50.0, NULL);
  ------------------
  |  |  169|  2.12k|    do { \
  |  |  170|  2.12k|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  656|  2.12k|    do { \
  |  |  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  171|  2.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (171:14): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  299|       |
  300|  2.12k|    igraph_adjlist_destroy(&adjlist);
  301|  2.12k|    IGRAPH_FINALLY_CLEAN(1);
  302|       |
  303|  2.12k|    IGRAPH_CHECK(igraph_adjlist_init(graph, &adjlist, IGRAPH_IN, IGRAPH_LOOPS_ONCE, IGRAPH_MULTIPLE));
  ------------------
  |  |  656|  2.12k|    do { \
  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  304|  2.12k|    IGRAPH_FINALLY(igraph_adjlist_destroy, &adjlist);
  ------------------
  |  |  603|  2.12k|    do { \
  |  |  604|  2.12k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.12k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.12k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.12k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.12k]
  |  |  ------------------
  |  |  608|  2.12k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  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.12k|    igraph_vector_int_null(&next_nei);             /* mark already added vertices */
  310|  2.12k|    num_seen = 0;
  311|       |
  312|   364k|    while (!igraph_vector_int_empty(&out)) {
  ------------------
  |  Branch (312:12): [True: 362k, False: 2.12k]
  ------------------
  313|   362k|        igraph_int_t act_component_size;
  314|   362k|        igraph_int_t grandfather = igraph_vector_int_pop_back(&out);
  315|       |
  316|   362k|        if (VECTOR(next_nei)[grandfather] != 0) {
  ------------------
  |  |   60|   362k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (316:13): [True: 21.3k, False: 340k]
  ------------------
  317|  21.3k|            continue;
  318|  21.3k|        }
  319|   340k|        VECTOR(next_nei)[grandfather] = 1;
  ------------------
  |  |   60|   340k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  320|   340k|        act_component_size = 1;
  321|   340k|        if (membership) {
  ------------------
  |  Branch (321:13): [True: 340k, False: 0]
  ------------------
  322|   340k|            VECTOR(*membership)[grandfather] = no_of_components;
  ------------------
  |  |   60|   340k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  323|   340k|        }
  324|   340k|        IGRAPH_CHECK(igraph_dqueue_int_push(&q, grandfather));
  ------------------
  |  |  656|   340k|    do { \
  |  |  657|   340k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   340k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   340k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 340k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   340k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 340k]
  |  |  ------------------
  ------------------
  325|       |
  326|   340k|        num_seen++;
  327|   340k|        if (num_seen % 10000 == 0) {
  ------------------
  |  Branch (327:13): [True: 0, False: 340k]
  ------------------
  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|   703k|        while (!igraph_dqueue_int_empty(&q)) {
  ------------------
  |  Branch (334:16): [True: 362k, False: 340k]
  ------------------
  335|   362k|            igraph_int_t act_node = igraph_dqueue_int_pop_back(&q);
  336|   362k|            const igraph_vector_int_t *tmp = igraph_adjlist_get(&adjlist, act_node);
  ------------------
  |  |   73|   362k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  337|   362k|            const igraph_int_t n = igraph_vector_int_size(tmp);
  338|   440k|            for (igraph_int_t i = 0; i < n; i++) {
  ------------------
  |  Branch (338:38): [True: 78.4k, False: 362k]
  ------------------
  339|  78.4k|                igraph_int_t neighbor = VECTOR(*tmp)[i];
  ------------------
  |  |   60|  78.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  340|  78.4k|                if (VECTOR(next_nei)[neighbor] != 0) {
  ------------------
  |  |   60|  78.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (340:21): [True: 57.0k, False: 21.3k]
  ------------------
  341|  57.0k|                    continue;
  342|  57.0k|                }
  343|  21.3k|                IGRAPH_CHECK(igraph_dqueue_int_push(&q, neighbor));
  ------------------
  |  |  656|  21.3k|    do { \
  |  |  657|  21.3k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  21.3k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  21.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 21.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  21.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 21.3k]
  |  |  ------------------
  ------------------
  344|  21.3k|                VECTOR(next_nei)[neighbor] = 1;
  ------------------
  |  |   60|  21.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  345|  21.3k|                act_component_size++;
  346|  21.3k|                if (membership) {
  ------------------
  |  Branch (346:21): [True: 21.3k, False: 0]
  ------------------
  347|  21.3k|                    VECTOR(*membership)[neighbor] = no_of_components;
  ------------------
  |  |   60|  21.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  348|  21.3k|                }
  349|       |
  350|  21.3k|                num_seen++;
  351|  21.3k|                if (num_seen % 10000 == 0) {
  ------------------
  |  Branch (351:21): [True: 0, False: 21.3k]
  ------------------
  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|  21.3k|            }
  358|   362k|        }
  359|       |
  360|   340k|        no_of_components++;
  361|   340k|        if (csize) {
  ------------------
  |  Branch (361:13): [True: 340k, False: 0]
  ------------------
  362|   340k|            IGRAPH_CHECK(igraph_vector_int_push_back(csize, act_component_size));
  ------------------
  |  |  656|   340k|    do { \
  |  |  657|   340k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   340k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   340k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 340k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   340k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 340k]
  |  |  ------------------
  ------------------
  363|   340k|        }
  364|   340k|    }
  365|       |
  366|  2.12k|    IGRAPH_PROGRESS("Strongly connected components: ", 100.0, NULL);
  ------------------
  |  |  169|  2.12k|    do { \
  |  |  170|  2.12k|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  656|  2.12k|    do { \
  |  |  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  171|  2.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (171:14): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  367|       |
  368|  2.12k|    if (no) {
  ------------------
  |  Branch (368:9): [True: 2.12k, False: 0]
  ------------------
  369|  2.12k|        *no = no_of_components;
  370|  2.12k|    }
  371|       |
  372|       |    /* Clean up */
  373|  2.12k|    igraph_adjlist_destroy(&adjlist);
  374|  2.12k|    igraph_vector_int_destroy(&out);
  375|  2.12k|    igraph_dqueue_int_destroy(&q);
  376|  2.12k|    igraph_vector_int_destroy(&next_nei);
  377|  2.12k|    IGRAPH_FINALLY_CLEAN(4);
  378|       |
  379|       |    /* Update cache */
  380|  2.12k|    igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_IS_STRONGLY_CONNECTED, no_of_components == 1);
  381|  2.12k|    if (no_of_components == 1) {
  ------------------
  |  Branch (381:9): [True: 101, False: 2.02k]
  ------------------
  382|    101|        igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_IS_WEAKLY_CONNECTED, true);
  383|    101|    }
  384|       |
  385|  2.12k|    return IGRAPH_SUCCESS;
  386|  2.12k|}
components.c:igraph_i_decompose_strong:
  727|  2.12k|                                     igraph_int_t maxcompno, igraph_int_t minelements) {
  728|       |
  729|       |
  730|  2.12k|    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.12k|    igraph_vector_int_t next_nei = IGRAPH_VECTOR_NULL;
  ------------------
  |  |   99|  2.12k|    #define IGRAPH_VECTOR_NULL { 0,0,0 }
  ------------------
  735|       |
  736|  2.12k|    igraph_int_t i, n, num_seen;
  737|  2.12k|    igraph_dqueue_int_t q = IGRAPH_DQUEUE_NULL;
  ------------------
  |  |   56|  2.12k|#define IGRAPH_DQUEUE_NULL { 0,0,0,0 }
  ------------------
  738|       |
  739|  2.12k|    igraph_int_t no_of_components = 0;
  740|       |
  741|  2.12k|    igraph_vector_int_t out = IGRAPH_VECTOR_NULL;
  ------------------
  |  |   99|  2.12k|    #define IGRAPH_VECTOR_NULL { 0,0,0 }
  ------------------
  742|  2.12k|    const igraph_vector_int_t* tmp;
  743|       |
  744|  2.12k|    igraph_adjlist_t adjlist;
  745|  2.12k|    igraph_vector_int_t verts;
  746|  2.12k|    igraph_vector_int_t vids_old2new;
  747|  2.12k|    igraph_t newg;
  748|       |
  749|  2.12k|    if (maxcompno < 0) {
  ------------------
  |  Branch (749:9): [True: 0, False: 2.12k]
  ------------------
  750|      0|        maxcompno = IGRAPH_INTEGER_MAX;
  ------------------
  |  |   72|      0|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  751|      0|    }
  752|       |
  753|  2.12k|    igraph_graph_list_clear(components);
  754|       |
  755|       |    /* The result */
  756|       |
  757|  2.12k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&vids_old2new, no_of_nodes);
  ------------------
  |  |  119|  2.12k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.12k|    do { \
  |  |  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.12k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.12k|    do { \
  |  |  |  |  604|  2.12k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.12k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.12k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.12k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.12k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  758|  2.12k|    igraph_vector_int_fill(&vids_old2new, -1);
  759|       |
  760|  2.12k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&verts, 0);
  ------------------
  |  |  119|  2.12k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.12k|    do { \
  |  |  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.12k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.12k|    do { \
  |  |  |  |  604|  2.12k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.12k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.12k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.12k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.12k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  761|  2.12k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&next_nei, no_of_nodes);
  ------------------
  |  |  119|  2.12k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.12k|    do { \
  |  |  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.12k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.12k|    do { \
  |  |  |  |  604|  2.12k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.12k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.12k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.12k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.12k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  762|  2.12k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&out, 0);
  ------------------
  |  |  119|  2.12k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.12k|    do { \
  |  |  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.12k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.12k|    do { \
  |  |  |  |  604|  2.12k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.12k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.12k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.12k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.12k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  763|  2.12k|    IGRAPH_DQUEUE_INT_INIT_FINALLY(&q, 100);
  ------------------
  |  |   61|  2.12k|    do { IGRAPH_CHECK(igraph_dqueue_int_init(q, capacity)); \
  |  |  ------------------
  |  |  |  |  656|  2.12k|    do { \
  |  |  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|  2.12k|        IGRAPH_FINALLY(igraph_dqueue_int_destroy, q); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.12k|    do { \
  |  |  |  |  604|  2.12k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.12k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.12k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.12k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.12k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (62:64): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  764|       |
  765|  2.12k|    IGRAPH_CHECK(igraph_vector_int_reserve(&out, no_of_nodes));
  ------------------
  |  |  656|  2.12k|    do { \
  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  766|       |
  767|  2.12k|    igraph_vector_int_null(&out);
  768|       |
  769|  2.12k|    IGRAPH_CHECK(igraph_adjlist_init(graph, &adjlist, IGRAPH_OUT, IGRAPH_LOOPS_ONCE, IGRAPH_MULTIPLE));
  ------------------
  |  |  656|  2.12k|    do { \
  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  770|  2.12k|    IGRAPH_FINALLY(igraph_adjlist_destroy, &adjlist);
  ------------------
  |  |  603|  2.12k|    do { \
  |  |  604|  2.12k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.12k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.12k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.12k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.12k]
  |  |  ------------------
  |  |  608|  2.12k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  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.12k|    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|   364k|    for (i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (781:17): [True: 362k, False: 2.12k]
  ------------------
  782|   362k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|   362k|    do { \
  |  |   47|   362k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 362k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|   362k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 362k]
  |  |  ------------------
  ------------------
  783|       |
  784|       |        /* get all the 'out' neighbors of this node
  785|       |         * NOTE: next_nei is initialized [0, 0, ...] */
  786|   362k|        tmp = igraph_adjlist_get(&adjlist, i);
  ------------------
  |  |   73|   362k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  787|   362k|        if (VECTOR(next_nei)[i] > igraph_vector_int_size(tmp)) {
  ------------------
  |  |   60|   362k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (787:13): [True: 33.4k, False: 328k]
  ------------------
  788|  33.4k|            continue;
  789|  33.4k|        }
  790|       |
  791|       |        /* add this node to the queue for this component */
  792|   328k|        IGRAPH_CHECK(igraph_dqueue_int_push(&q, i));
  ------------------
  |  |  656|   328k|    do { \
  |  |  657|   328k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   328k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   328k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 328k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   328k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 328k]
  |  |  ------------------
  ------------------
  793|       |
  794|       |        /* consume the tree from this node ("root") recursively
  795|       |         * until there is no more */
  796|  1.13M|        while (!igraph_dqueue_int_empty(&q)) {
  ------------------
  |  Branch (796:16): [True: 803k, False: 328k]
  ------------------
  797|       |            /* this looks up but does NOT consume the queue */
  798|   803k|            igraph_int_t act_node = igraph_dqueue_int_back(&q);
  799|       |
  800|       |            /* get all neighbors of this node */
  801|   803k|            tmp = igraph_adjlist_get(&adjlist, act_node);
  ------------------
  |  |   73|   803k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  802|   803k|            if (VECTOR(next_nei)[act_node] == 0) {
  ------------------
  |  |   60|   803k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (802:17): [True: 362k, False: 440k]
  ------------------
  803|       |                /* this is the first time we've met this vertex,
  804|       |                     * because next_nei is initialized [0, 0, ...] */
  805|   362k|                VECTOR(next_nei)[act_node]++;
  ------------------
  |  |   60|   362k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  806|       |                /* back to the queue, same vertex is up again */
  807|       |
  808|   440k|            } else if (VECTOR(next_nei)[act_node] <= igraph_vector_int_size(tmp)) {
  ------------------
  |  |   60|   440k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (808:24): [True: 78.4k, False: 362k]
  ------------------
  809|       |                /* we've already met this vertex but it has more children */
  810|  78.4k|                igraph_int_t neighbor = VECTOR(*tmp)[VECTOR(next_nei)[act_node] - 1];
  ------------------
  |  |   60|  78.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              igraph_int_t neighbor = VECTOR(*tmp)[VECTOR(next_nei)[act_node] - 1];
  ------------------
  |  |   60|  78.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  811|  78.4k|                if (VECTOR(next_nei)[neighbor] == 0) {
  ------------------
  |  |   60|  78.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (811:21): [True: 33.4k, False: 44.9k]
  ------------------
  812|       |                    /* add the root of the other children to the queue */
  813|  33.4k|                    IGRAPH_CHECK(igraph_dqueue_int_push(&q, neighbor));
  ------------------
  |  |  656|  33.4k|    do { \
  |  |  657|  33.4k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  33.4k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  33.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 33.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|  33.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 33.4k]
  |  |  ------------------
  ------------------
  814|  33.4k|                }
  815|  78.4k|                VECTOR(next_nei)[act_node]++;
  ------------------
  |  |   60|  78.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  816|   362k|            } else {
  817|       |                /* we've met this vertex and it has no more children */
  818|   362k|                IGRAPH_CHECK(igraph_vector_int_push_back(&out, act_node));
  ------------------
  |  |  656|   362k|    do { \
  |  |  657|   362k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   362k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   362k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 362k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   362k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 362k]
  |  |  ------------------
  ------------------
  819|       |                /* this consumes the queue, since there's nowhere to go */
  820|   362k|                igraph_dqueue_int_pop_back(&q);
  821|   362k|                num_seen++;
  822|       |
  823|   362k|                if (num_seen % 10000 == 0) {
  ------------------
  |  Branch (823:21): [True: 0, False: 362k]
  ------------------
  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|   362k|            }
  830|   803k|        } /* while q */
  831|   328k|    }  /* for */
  832|       |
  833|  2.12k|    IGRAPH_PROGRESS("Strongly connected components: ", 50.0, NULL);
  ------------------
  |  |  169|  2.12k|    do { \
  |  |  170|  2.12k|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  656|  2.12k|    do { \
  |  |  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  171|  2.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (171:14): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  834|       |
  835|  2.12k|    igraph_adjlist_destroy(&adjlist);
  836|  2.12k|    IGRAPH_FINALLY_CLEAN(1);
  837|       |
  838|  2.12k|    IGRAPH_CHECK(igraph_adjlist_init(graph, &adjlist, IGRAPH_IN, IGRAPH_LOOPS_ONCE, IGRAPH_MULTIPLE));
  ------------------
  |  |  656|  2.12k|    do { \
  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  839|  2.12k|    IGRAPH_FINALLY(igraph_adjlist_destroy, &adjlist);
  ------------------
  |  |  603|  2.12k|    do { \
  |  |  604|  2.12k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.12k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.12k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.12k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.12k]
  |  |  ------------------
  |  |  608|  2.12k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  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.12k|    igraph_vector_int_null(&next_nei);             /* mark already added vertices */
  845|       |
  846|       |    /* number of components built */
  847|  2.12k|    num_seen = 0;
  848|   364k|    while (!igraph_vector_int_empty(&out) && no_of_components < maxcompno) {
  ------------------
  |  Branch (848:12): [True: 362k, False: 2.12k]
  |  Branch (848:46): [True: 362k, False: 0]
  ------------------
  849|       |        /* consume the vector from the last element */
  850|   362k|        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|   362k|        if (VECTOR(next_nei)[grandfather] != 0) {
  ------------------
  |  |   60|   362k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (854:13): [True: 21.3k, False: 340k]
  ------------------
  855|  21.3k|            continue;
  856|  21.3k|        }
  857|       |
  858|       |        /* collect all the members of this component */
  859|   340k|        igraph_vector_int_clear(&verts);
  860|       |
  861|       |        /* this node is gone for any future components */
  862|   340k|        VECTOR(next_nei)[grandfather] = 1;
  ------------------
  |  |   60|   340k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  863|       |
  864|       |        /* add to component */
  865|   340k|        IGRAPH_CHECK(igraph_vector_int_push_back(&verts, grandfather));
  ------------------
  |  |  656|   340k|    do { \
  |  |  657|   340k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   340k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   340k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 340k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   340k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 340k]
  |  |  ------------------
  ------------------
  866|   340k|        IGRAPH_CHECK(igraph_dqueue_int_push(&q, grandfather));
  ------------------
  |  |  656|   340k|    do { \
  |  |  657|   340k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   340k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   340k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 340k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   340k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 340k]
  |  |  ------------------
  ------------------
  867|       |
  868|   340k|        num_seen++;
  869|   340k|        if (num_seen % 10000 == 0) {
  ------------------
  |  Branch (869:13): [True: 0, False: 340k]
  ------------------
  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|   703k|        while (!igraph_dqueue_int_empty(&q)) {
  ------------------
  |  Branch (876:16): [True: 362k, False: 340k]
  ------------------
  877|       |            /* consume the queue from this node */
  878|   362k|            igraph_int_t act_node = igraph_dqueue_int_pop_back(&q);
  879|   362k|            tmp = igraph_adjlist_get(&adjlist, act_node);
  ------------------
  |  |   73|   362k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  880|   362k|            n = igraph_vector_int_size(tmp);
  881|   440k|            for (i = 0; i < n; i++) {
  ------------------
  |  Branch (881:25): [True: 78.4k, False: 362k]
  ------------------
  882|  78.4k|                igraph_int_t neighbor = VECTOR(*tmp)[i];
  ------------------
  |  |   60|  78.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  883|  78.4k|                if (VECTOR(next_nei)[neighbor] != 0) {
  ------------------
  |  |   60|  78.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (883:21): [True: 57.0k, False: 21.3k]
  ------------------
  884|  57.0k|                    continue;
  885|  57.0k|                }
  886|  21.3k|                IGRAPH_CHECK(igraph_dqueue_int_push(&q, neighbor));
  ------------------
  |  |  656|  21.3k|    do { \
  |  |  657|  21.3k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  21.3k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  21.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 21.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  21.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 21.3k]
  |  |  ------------------
  ------------------
  887|  21.3k|                VECTOR(next_nei)[neighbor] = 1;
  ------------------
  |  |   60|  21.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  888|       |
  889|       |                /* add to component */
  890|  21.3k|                IGRAPH_CHECK(igraph_vector_int_push_back(&verts, neighbor));
  ------------------
  |  |  656|  21.3k|    do { \
  |  |  657|  21.3k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  21.3k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  21.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 21.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  21.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 21.3k]
  |  |  ------------------
  ------------------
  891|       |
  892|  21.3k|                num_seen++;
  893|  21.3k|                if (num_seen % 10000 == 0) {
  ------------------
  |  Branch (893:21): [True: 0, False: 21.3k]
  ------------------
  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|  21.3k|            }
  900|   362k|        }
  901|       |
  902|       |        /* ok, we have a component */
  903|   340k|        if (igraph_vector_int_size(&verts) < minelements) {
  ------------------
  |  Branch (903:13): [True: 340k, False: 648]
  ------------------
  904|   340k|            continue;
  905|   340k|        }
  906|       |
  907|    648|        IGRAPH_CHECK(igraph_i_induced_subgraph_map(
  ------------------
  |  |  656|    648|    do { \
  |  |  657|    648|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    648|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    648|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 648]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    648|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 648]
  |  |  ------------------
  ------------------
  908|    648|            graph, &newg, igraph_vss_vector(&verts),
  909|    648|            IGRAPH_SUBGRAPH_AUTO, &vids_old2new,
  910|    648|            /* invmap = */ 0, /* map_is_prepared = */ 1
  911|    648|        ));
  912|    648|        IGRAPH_FINALLY(igraph_destroy, &newg);
  ------------------
  |  |  603|    648|    do { \
  |  |  604|    648|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    648|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    648|         * incorrect destructor function with the pointer */ \
  |  |  607|    648|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 648]
  |  |  ------------------
  |  |  608|    648|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    648|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 648]
  |  |  ------------------
  ------------------
  913|    648|        IGRAPH_CHECK(igraph_graph_list_push_back(components, &newg));
  ------------------
  |  |  656|    648|    do { \
  |  |  657|    648|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    648|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    648|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 648]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    648|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 648]
  |  |  ------------------
  ------------------
  914|    648|        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|    648|        n = igraph_vector_int_size(&verts);
  922|  22.1k|        for (i = 0; i < n; i++) {
  ------------------
  |  Branch (922:21): [True: 21.4k, False: 648]
  ------------------
  923|  21.4k|            VECTOR(vids_old2new)[VECTOR(verts)[i]] = 0;
  ------------------
  |  |   60|  21.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(vids_old2new)[VECTOR(verts)[i]] = 0;
  ------------------
  |  |   60|  21.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  924|  21.4k|        }
  925|       |
  926|    648|        no_of_components++;
  927|    648|    }
  928|       |
  929|  2.12k|    IGRAPH_PROGRESS("Strongly connected components: ", 100.0, NULL);
  ------------------
  |  |  169|  2.12k|    do { \
  |  |  170|  2.12k|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  656|  2.12k|    do { \
  |  |  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  171|  2.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (171:14): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  930|       |
  931|       |    /* Clean up, return */
  932|       |
  933|  2.12k|    igraph_vector_int_destroy(&vids_old2new);
  934|  2.12k|    igraph_vector_int_destroy(&verts);
  935|  2.12k|    igraph_adjlist_destroy(&adjlist);
  936|  2.12k|    igraph_vector_int_destroy(&out);
  937|  2.12k|    igraph_dqueue_int_destroy(&q);
  938|  2.12k|    igraph_vector_int_destroy(&next_nei);
  939|  2.12k|    IGRAPH_FINALLY_CLEAN(6);
  940|       |
  941|  2.12k|    return IGRAPH_SUCCESS;
  942|       |
  943|  2.12k|}

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

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

igraph_dqueue_int_init:
   75|  38.0k|igraph_error_t FUNCTION(igraph_dqueue, init)(TYPE(igraph_dqueue)* q, igraph_int_t capacity) {
   76|  38.0k|    IGRAPH_ASSERT(q != NULL);
  ------------------
  |  |  924|  38.0k|    do { \
  |  |  925|  38.0k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  38.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 38.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  38.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 38.0k]
  |  |  ------------------
  ------------------
   77|  38.0k|    IGRAPH_ASSERT(capacity >= 0);
  ------------------
  |  |  924|  38.0k|    do { \
  |  |  925|  38.0k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  38.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 38.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  38.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 38.0k]
  |  |  ------------------
  ------------------
   78|       |
   79|  38.0k|    if (capacity == 0) capacity = 1;
  ------------------
  |  Branch (79:9): [True: 6.65k, False: 31.3k]
  ------------------
   80|       |
   81|  38.0k|    q->stor_begin = IGRAPH_CALLOC(capacity, BASE);
  ------------------
  |  |   33|  38.0k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  76.0k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 38.0k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 38.0k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 38.0k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   82|  38.0k|    IGRAPH_CHECK_OOM(q->stor_begin, "Cannot initialize dqueue.");
  ------------------
  |  |  709|  38.0k|    do { \
  |  |  710|  38.0k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  38.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 38.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  38.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 38.0k]
  |  |  ------------------
  ------------------
   83|  38.0k|    q->stor_end = q->stor_begin + capacity;
   84|  38.0k|    q->begin = q->stor_begin;
   85|  38.0k|    q->end = NULL;
   86|       |
   87|  38.0k|    return IGRAPH_SUCCESS;
   88|  38.0k|}
igraph_dqueue_int_destroy:
  100|  38.0k|void FUNCTION(igraph_dqueue, destroy)(TYPE(igraph_dqueue)* q) {
  101|  38.0k|    IGRAPH_ASSERT(q != NULL);
  ------------------
  |  |  924|  38.0k|    do { \
  |  |  925|  38.0k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  38.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 38.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  38.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 38.0k]
  |  |  ------------------
  ------------------
  102|  38.0k|    IGRAPH_FREE(q->stor_begin); /* sets to NULL */
  ------------------
  |  |   36|  38.0k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  103|  38.0k|}
igraph_dqueue_int_empty:
  117|  6.36M|igraph_bool_t FUNCTION(igraph_dqueue, empty)(const TYPE(igraph_dqueue)* q) {
  118|  6.36M|    IGRAPH_ASSERT(q != NULL);
  ------------------
  |  |  924|  6.36M|    do { \
  |  |  925|  6.36M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  6.36M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 6.36M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  6.36M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 6.36M]
  |  |  ------------------
  ------------------
  119|  6.36M|    IGRAPH_ASSERT(q->stor_begin != NULL);
  ------------------
  |  |  924|  6.36M|    do { \
  |  |  925|  6.36M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  6.36M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 6.36M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  6.36M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 6.36M]
  |  |  ------------------
  ------------------
  120|  6.36M|    return q->end == NULL;
  121|  6.36M|}
igraph_dqueue_int_head:
  196|  33.4k|BASE FUNCTION(igraph_dqueue, head)(const TYPE(igraph_dqueue)* q) {
  197|  33.4k|    IGRAPH_ASSERT(q != NULL);
  ------------------
  |  |  924|  33.4k|    do { \
  |  |  925|  33.4k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  33.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 33.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  33.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 33.4k]
  |  |  ------------------
  ------------------
  198|  33.4k|    IGRAPH_ASSERT(q->stor_begin != NULL);
  ------------------
  |  |  924|  33.4k|    do { \
  |  |  925|  33.4k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  33.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 33.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  33.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 33.4k]
  |  |  ------------------
  ------------------
  199|  33.4k|    IGRAPH_ASSERT(q->stor_end != NULL); /* queue is not empty */
  ------------------
  |  |  924|  33.4k|    do { \
  |  |  925|  33.4k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  33.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 33.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  33.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 33.4k]
  |  |  ------------------
  ------------------
  200|  33.4k|    return *(q->begin);
  201|  33.4k|}
igraph_dqueue_int_back:
  216|  1.60M|BASE FUNCTION(igraph_dqueue, back)(const TYPE(igraph_dqueue)* q) {
  217|  1.60M|    IGRAPH_ASSERT(q != NULL);
  ------------------
  |  |  924|  1.60M|    do { \
  |  |  925|  1.60M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.60M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.60M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.60M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.60M]
  |  |  ------------------
  ------------------
  218|  1.60M|    IGRAPH_ASSERT(q->stor_begin != NULL);
  ------------------
  |  |  924|  1.60M|    do { \
  |  |  925|  1.60M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.60M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.60M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.60M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.60M]
  |  |  ------------------
  ------------------
  219|  1.60M|    IGRAPH_ASSERT(q->stor_end != NULL); /* queue is not empty */
  ------------------
  |  |  924|  1.60M|    do { \
  |  |  925|  1.60M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.60M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.60M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.60M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.60M]
  |  |  ------------------
  ------------------
  220|  1.60M|    if (q->end == q->stor_begin) {
  ------------------
  |  Branch (220:9): [True: 662, False: 1.60M]
  ------------------
  221|    662|        return *(q->stor_end - 1);
  222|    662|    }
  223|  1.60M|    return *(q->end - 1);
  224|  1.60M|}
igraph_dqueue_int_pop:
  240|  2.12M|BASE FUNCTION(igraph_dqueue, pop)(TYPE(igraph_dqueue)* q) {
  241|  2.12M|    IGRAPH_ASSERT(q != NULL);
  ------------------
  |  |  924|  2.12M|    do { \
  |  |  925|  2.12M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.12M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.12M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.12M]
  |  |  ------------------
  ------------------
  242|  2.12M|    IGRAPH_ASSERT(q->stor_begin != NULL);
  ------------------
  |  |  924|  2.12M|    do { \
  |  |  925|  2.12M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.12M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.12M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.12M]
  |  |  ------------------
  ------------------
  243|  2.12M|    IGRAPH_ASSERT(q->stor_end != NULL); /* queue is not empty */
  ------------------
  |  |  924|  2.12M|    do { \
  |  |  925|  2.12M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.12M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.12M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.12M]
  |  |  ------------------
  ------------------
  244|  2.12M|    BASE tmp = *(q->begin);
  ------------------
  |  |   66|  2.12M|    #define BASE igraph_int_t
  ------------------
  245|  2.12M|    (q->begin)++;
  246|  2.12M|    if (q->begin == q->stor_end) {
  ------------------
  |  Branch (246:9): [True: 46.6k, False: 2.07M]
  ------------------
  247|  46.6k|        q->begin = q->stor_begin;
  248|  46.6k|    }
  249|  2.12M|    if (q->begin == q->end) {
  ------------------
  |  Branch (249:9): [True: 916k, False: 1.20M]
  ------------------
  250|   916k|        q->end = NULL;
  251|   916k|    }
  252|       |
  253|  2.12M|    return tmp;
  254|  2.12M|}
igraph_dqueue_int_pop_back:
  270|  1.44M|BASE FUNCTION(igraph_dqueue, pop_back)(TYPE(igraph_dqueue)* q) {
  271|  1.44M|    BASE tmp;
  ------------------
  |  |   66|  1.44M|    #define BASE igraph_int_t
  ------------------
  272|  1.44M|    IGRAPH_ASSERT(q != NULL);
  ------------------
  |  |  924|  1.44M|    do { \
  |  |  925|  1.44M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.44M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.44M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.44M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.44M]
  |  |  ------------------
  ------------------
  273|  1.44M|    IGRAPH_ASSERT(q->stor_begin != NULL);
  ------------------
  |  |  924|  1.44M|    do { \
  |  |  925|  1.44M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.44M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.44M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.44M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.44M]
  |  |  ------------------
  ------------------
  274|  1.44M|    IGRAPH_ASSERT(q->stor_end != NULL); /* queue is not empty */
  ------------------
  |  |  924|  1.44M|    do { \
  |  |  925|  1.44M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.44M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.44M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.44M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.44M]
  |  |  ------------------
  ------------------
  275|  1.44M|    if (q->end != q->stor_begin) {
  ------------------
  |  Branch (275:9): [True: 1.44M, False: 88]
  ------------------
  276|  1.44M|        tmp = *((q->end) - 1);
  277|  1.44M|        q->end = (q->end) - 1;
  278|  1.44M|    } else {
  279|     88|        tmp = *((q->stor_end) - 1);
  280|     88|        q->end = (q->stor_end) - 1;
  281|     88|    }
  282|  1.44M|    if (q->begin == q->end) {
  ------------------
  |  Branch (282:9): [True: 1.35M, False: 94.2k]
  ------------------
  283|  1.35M|        q->end = NULL;
  284|  1.35M|    }
  285|       |
  286|  1.44M|    return tmp;
  287|  1.44M|}
igraph_dqueue_int_push:
  307|  3.57M|igraph_error_t FUNCTION(igraph_dqueue, push)(TYPE(igraph_dqueue)* q, BASE elem) {
  308|  3.57M|    IGRAPH_ASSERT(q != NULL);
  ------------------
  |  |  924|  3.57M|    do { \
  |  |  925|  3.57M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  3.57M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.57M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  3.57M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 3.57M]
  |  |  ------------------
  ------------------
  309|  3.57M|    IGRAPH_ASSERT(q->stor_begin != NULL);
  ------------------
  |  |  924|  3.57M|    do { \
  |  |  925|  3.57M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  3.57M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.57M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  3.57M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 3.57M]
  |  |  ------------------
  ------------------
  310|  3.57M|    if (q->begin != q->end) {
  ------------------
  |  Branch (310:9): [True: 3.54M, False: 20.7k]
  ------------------
  311|       |        /* not full */
  312|  3.54M|        if (q->end == NULL) {
  ------------------
  |  Branch (312:13): [True: 2.27M, False: 1.27M]
  ------------------
  313|  2.27M|            q->end = q->begin;
  314|  2.27M|        }
  315|  3.54M|        *(q->end) = elem;
  316|  3.54M|        (q->end)++;
  317|  3.54M|        if (q->end == q->stor_end) {
  ------------------
  |  Branch (317:13): [True: 63.5k, False: 3.48M]
  ------------------
  318|  63.5k|            q->end = q->stor_begin;
  319|  63.5k|        }
  320|  3.54M|    } else {
  321|       |        /* full, allocate more storage */
  322|       |
  323|  20.7k|        BASE *bigger = NULL, *old = q->stor_begin;
  ------------------
  |  |   66|  20.7k|    #define BASE igraph_int_t
  ------------------
  324|  20.7k|        igraph_int_t old_size = q->stor_end - q->stor_begin;
  325|  20.7k|        igraph_int_t new_capacity = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   72|  20.7k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
                      igraph_int_t new_capacity = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   72|  20.7k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (325:37): [True: 20.7k, False: 0]
  ------------------
  326|       |
  327|  20.7k|        if (old_size == IGRAPH_INTEGER_MAX) {
  ------------------
  |  |   72|  20.7k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (327:13): [True: 0, False: 20.7k]
  ------------------
  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|  20.7k|        if (new_capacity == 0) {
  ------------------
  |  Branch (330:13): [True: 0, False: 20.7k]
  ------------------
  331|      0|            new_capacity = 1;
  332|      0|        }
  333|       |
  334|  20.7k|        bigger = IGRAPH_CALLOC(new_capacity, BASE);
  ------------------
  |  |   33|  20.7k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  41.4k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 20.7k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 20.7k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 20.7k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  335|  20.7k|        IGRAPH_CHECK_OOM(bigger, "Cannot push to dqueue.");
  ------------------
  |  |  709|  20.7k|    do { \
  |  |  710|  20.7k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  20.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 20.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  20.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 20.7k]
  |  |  ------------------
  ------------------
  336|       |
  337|  20.7k|        if (q->stor_end - q->begin > 0) {
  ------------------
  |  Branch (337:13): [True: 20.7k, False: 0]
  ------------------
  338|  20.7k|            memcpy(bigger, q->begin,
  339|  20.7k|                   (size_t)(q->stor_end - q->begin) * sizeof(BASE));
  340|  20.7k|        }
  341|  20.7k|        if (q->end - q->stor_begin > 0) {
  ------------------
  |  Branch (341:13): [True: 882, False: 19.8k]
  ------------------
  342|    882|            memcpy(bigger + (q->stor_end - q->begin), q->stor_begin,
  343|    882|                   (size_t)(q->end - q->stor_begin) * sizeof(BASE));
  344|    882|        }
  345|       |
  346|  20.7k|        q->end        = bigger + old_size;
  347|  20.7k|        q->stor_end   = bigger + new_capacity;
  348|  20.7k|        q->stor_begin = bigger;
  349|  20.7k|        q->begin      = bigger;
  350|       |
  351|  20.7k|        *(q->end) = elem;
  352|  20.7k|        (q->end)++;
  353|  20.7k|        if (q->end == q->stor_end) {
  ------------------
  |  Branch (353:13): [True: 3.97k, False: 16.7k]
  ------------------
  354|  3.97k|            q->end = q->stor_begin;
  355|  3.97k|        }
  356|       |
  357|  20.7k|        IGRAPH_FREE(old);
  ------------------
  |  |   36|  20.7k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  358|  20.7k|    }
  359|       |
  360|  3.57M|    return IGRAPH_SUCCESS;
  361|  3.57M|}

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

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

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

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

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

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

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

igraph_vector_init:
  134|  14.8k|igraph_error_t FUNCTION(igraph_vector, init)(TYPE(igraph_vector) *v, igraph_int_t size) {
  135|  14.8k|    igraph_int_t alloc_size;
  136|  14.8k|    IGRAPH_ASSERT(size >= 0);
  ------------------
  |  |  924|  14.8k|    do { \
  |  |  925|  14.8k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  14.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 14.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  14.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 14.8k]
  |  |  ------------------
  ------------------
  137|  14.8k|    alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (137:18): [True: 12.7k, False: 2.12k]
  ------------------
  138|       |
  139|       |    /* When this function fails, it should leave stor_begin set to NULL,
  140|       |     * so that vector_destroy() is still safe to call on the vector.
  141|       |     * This simplifies freeing partially initialized data structures,
  142|       |     * such as adjacency lists, when an error occurs mid-initialization. */
  143|  14.8k|    v->stor_begin = IGRAPH_CALLOC(alloc_size, BASE);
  ------------------
  |  |   33|  14.8k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  29.7k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 14.8k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 14.8k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 14.8k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  144|  14.8k|    IGRAPH_CHECK_OOM(v->stor_begin, "Insufficient memory to initialize vector.");
  ------------------
  |  |  709|  14.8k|    do { \
  |  |  710|  14.8k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  14.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 14.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  14.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 14.8k]
  |  |  ------------------
  ------------------
  145|  14.8k|    v->stor_end = v->stor_begin + alloc_size;
  146|  14.8k|    v->end = v->stor_begin + size;
  147|       |
  148|  14.8k|    return IGRAPH_SUCCESS;
  149|  14.8k|}
igraph_vector_destroy:
  408|  14.8k|void FUNCTION(igraph_vector, destroy)(TYPE(igraph_vector) *v) {
  409|  14.8k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  14.8k|    do { \
  |  |  925|  14.8k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  14.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 14.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  14.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 14.8k]
  |  |  ------------------
  ------------------
  410|       |    /* vector_init() will leave stor_begin set to NULL when it fails.
  411|       |     * We handle these cases gracefully. */
  412|  14.8k|    if (v->stor_begin != NULL) {
  ------------------
  |  Branch (412:9): [True: 14.8k, False: 0]
  ------------------
  413|  14.8k|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   36|  14.8k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  414|       |        v->stor_begin = NULL;
  415|  14.8k|    }
  416|  14.8k|}
igraph_vector_capacity:
  436|  16.1k|igraph_int_t FUNCTION(igraph_vector, capacity)(const TYPE(igraph_vector) *v) {
  437|  16.1k|    return v->stor_end - v->stor_begin;
  438|  16.1k|}
igraph_vector_reserve:
  468|  16.1k|igraph_error_t FUNCTION(igraph_vector, reserve)(TYPE(igraph_vector) *v, igraph_int_t capacity) {
  469|  16.1k|    igraph_int_t current_capacity;
  470|  16.1k|    BASE *tmp;
  ------------------
  |  |   29|  16.1k|    #define BASE igraph_real_t
  ------------------
  471|       |
  472|  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]
  |  |  ------------------
  ------------------
  473|  16.1k|    IGRAPH_ASSERT(v->stor_begin != 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]
  |  |  ------------------
  ------------------
  474|  16.1k|    IGRAPH_ASSERT(capacity >= 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]
  |  |  ------------------
  ------------------
  475|       |
  476|  16.1k|    current_capacity = FUNCTION(igraph_vector, capacity)(v);
  ------------------
  |  |  170|  16.1k|        #define FUNCTION(a,c) CONCAT2(a,c)
  |  |  ------------------
  |  |  |  |   20|  16.1k|#define CONCAT2(a,b) CONCAT2x(a,b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|  16.1k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  477|       |
  478|  16.1k|    if (capacity <= current_capacity) {
  ------------------
  |  Branch (478:9): [True: 14.0k, False: 2.10k]
  ------------------
  479|  14.0k|        return IGRAPH_SUCCESS;
  480|  14.0k|    }
  481|       |
  482|  2.10k|    tmp = IGRAPH_REALLOC(v->stor_begin, capacity, BASE);
  ------------------
  |  |   35|  2.10k|#define IGRAPH_REALLOC(p,n,t) IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, realloc((void*)(p), sizeof(t) * ((n) > 0 ? (n) : 1)))
  |  |  ------------------
  |  |  |  |   31|  4.20k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 2.10k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 2.10k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 2.10k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  483|  2.10k|    IGRAPH_CHECK_OOM(tmp, "Cannot reserve space for vector.");
  ------------------
  |  |  709|  2.10k|    do { \
  |  |  710|  2.10k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  2.10k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.10k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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.10k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 2.10k]
  |  |  ------------------
  ------------------
  484|       |
  485|  2.10k|    v->end = tmp + (v->end - v->stor_begin);
  486|  2.10k|    v->stor_begin = tmp;
  487|  2.10k|    v->stor_end = v->stor_begin + capacity;
  488|       |
  489|  2.10k|    return IGRAPH_SUCCESS;
  490|  2.10k|}
igraph_vector_size:
  522|  4.24k|igraph_int_t FUNCTION(igraph_vector, size)(const TYPE(igraph_vector) *v) {
  523|  4.24k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  4.24k|    do { \
  |  |  925|  4.24k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.24k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.24k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.24k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.24k]
  |  |  ------------------
  ------------------
  524|  4.24k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  4.24k|    do { \
  |  |  925|  4.24k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.24k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.24k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.24k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.24k]
  |  |  ------------------
  ------------------
  525|  4.24k|    return v->end - v->stor_begin;
  526|  4.24k|}
igraph_vector_fill:
  745|  11.9k|void FUNCTION(igraph_vector, fill)(TYPE(igraph_vector) *v, BASE e) {
  746|  11.9k|    BASE *ptr;
  ------------------
  |  |   29|  11.9k|    #define BASE igraph_real_t
  ------------------
  747|  11.9k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  11.9k|    do { \
  |  |  925|  11.9k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  11.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 11.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  11.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 11.9k]
  |  |  ------------------
  ------------------
  748|  11.9k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  11.9k|    do { \
  |  |  925|  11.9k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  11.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 11.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  11.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 11.9k]
  |  |  ------------------
  ------------------
  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|   384k|    for (ptr = v->stor_begin; ptr < v->end; ptr++) {
  ------------------
  |  Branch (766:31): [True: 372k, False: 11.9k]
  ------------------
  767|   372k|        *ptr = e;
  768|   372k|    }
  769|  11.9k|}
igraph_vector_resize:
 1264|  16.1k|igraph_error_t FUNCTION(igraph_vector, resize)(TYPE(igraph_vector)* v, igraph_int_t new_size) {
 1265|  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]
  |  |  ------------------
  ------------------
 1266|  16.1k|    IGRAPH_ASSERT(v->stor_begin != 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]
  |  |  ------------------
  ------------------
 1267|  16.1k|    IGRAPH_CHECK(FUNCTION(igraph_vector, reserve)(v, new_size));
  ------------------
  |  |  656|  16.1k|    do { \
  |  |  657|  16.1k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  16.1k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  16.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 16.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|  16.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 16.1k]
  |  |  ------------------
  ------------------
 1268|  16.1k|    v->end = v->stor_begin + new_size;
 1269|  16.1k|    return IGRAPH_SUCCESS;
 1270|  16.1k|}
igraph_vector_char_init:
  134|  2.00k|igraph_error_t FUNCTION(igraph_vector, init)(TYPE(igraph_vector) *v, igraph_int_t size) {
  135|  2.00k|    igraph_int_t alloc_size;
  136|  2.00k|    IGRAPH_ASSERT(size >= 0);
  ------------------
  |  |  924|  2.00k|    do { \
  |  |  925|  2.00k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  137|  2.00k|    alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (137:18): [True: 2.00k, 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.00k|    v->stor_begin = IGRAPH_CALLOC(alloc_size, BASE);
  ------------------
  |  |   33|  2.00k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  4.00k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 2.00k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 2.00k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 2.00k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  144|  2.00k|    IGRAPH_CHECK_OOM(v->stor_begin, "Insufficient memory to initialize vector.");
  ------------------
  |  |  709|  2.00k|    do { \
  |  |  710|  2.00k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  145|  2.00k|    v->stor_end = v->stor_begin + alloc_size;
  146|  2.00k|    v->end = v->stor_begin + size;
  147|       |
  148|  2.00k|    return IGRAPH_SUCCESS;
  149|  2.00k|}
igraph_vector_char_destroy:
  408|  2.00k|void FUNCTION(igraph_vector, destroy)(TYPE(igraph_vector) *v) {
  409|  2.00k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  2.00k|    do { \
  |  |  925|  2.00k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
  410|       |    /* vector_init() will leave stor_begin set to NULL when it fails.
  411|       |     * We handle these cases gracefully. */
  412|  2.00k|    if (v->stor_begin != NULL) {
  ------------------
  |  Branch (412:9): [True: 2.00k, False: 0]
  ------------------
  413|  2.00k|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   36|  2.00k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  414|       |        v->stor_begin = NULL;
  415|  2.00k|    }
  416|  2.00k|}
igraph_vector_bool_init:
  134|  2.12k|igraph_error_t FUNCTION(igraph_vector, init)(TYPE(igraph_vector) *v, igraph_int_t size) {
  135|  2.12k|    igraph_int_t alloc_size;
  136|  2.12k|    IGRAPH_ASSERT(size >= 0);
  ------------------
  |  |  924|  2.12k|    do { \
  |  |  925|  2.12k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  137|  2.12k|    alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (137:18): [True: 0, False: 2.12k]
  ------------------
  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.12k|    v->stor_begin = IGRAPH_CALLOC(alloc_size, BASE);
  ------------------
  |  |   33|  2.12k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  4.24k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 2.12k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 2.12k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 2.12k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  144|  2.12k|    IGRAPH_CHECK_OOM(v->stor_begin, "Insufficient memory to initialize vector.");
  ------------------
  |  |  709|  2.12k|    do { \
  |  |  710|  2.12k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  2.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  145|  2.12k|    v->stor_end = v->stor_begin + alloc_size;
  146|  2.12k|    v->end = v->stor_begin + size;
  147|       |
  148|  2.12k|    return IGRAPH_SUCCESS;
  149|  2.12k|}
igraph_vector_bool_destroy:
  408|  2.12k|void FUNCTION(igraph_vector, destroy)(TYPE(igraph_vector) *v) {
  409|  2.12k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  2.12k|    do { \
  |  |  925|  2.12k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  410|       |    /* vector_init() will leave stor_begin set to NULL when it fails.
  411|       |     * We handle these cases gracefully. */
  412|  2.12k|    if (v->stor_begin != NULL) {
  ------------------
  |  Branch (412:9): [True: 2.12k, False: 0]
  ------------------
  413|  2.12k|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   36|  2.12k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  414|       |        v->stor_begin = NULL;
  415|  2.12k|    }
  416|  2.12k|}
igraph_vector_bool_capacity:
  436|  6.36k|igraph_int_t FUNCTION(igraph_vector, capacity)(const TYPE(igraph_vector) *v) {
  437|  6.36k|    return v->stor_end - v->stor_begin;
  438|  6.36k|}
igraph_vector_bool_reserve:
  468|  6.36k|igraph_error_t FUNCTION(igraph_vector, reserve)(TYPE(igraph_vector) *v, igraph_int_t capacity) {
  469|  6.36k|    igraph_int_t current_capacity;
  470|  6.36k|    BASE *tmp;
  ------------------
  |  |   53|  6.36k|    #define BASE igraph_bool_t
  ------------------
  471|       |
  472|  6.36k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  6.36k|    do { \
  |  |  925|  6.36k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  6.36k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 6.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  6.36k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 6.36k]
  |  |  ------------------
  ------------------
  473|  6.36k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  6.36k|    do { \
  |  |  925|  6.36k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  6.36k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 6.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  6.36k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 6.36k]
  |  |  ------------------
  ------------------
  474|  6.36k|    IGRAPH_ASSERT(capacity >= 0);
  ------------------
  |  |  924|  6.36k|    do { \
  |  |  925|  6.36k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  6.36k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 6.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  6.36k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 6.36k]
  |  |  ------------------
  ------------------
  475|       |
  476|  6.36k|    current_capacity = FUNCTION(igraph_vector, capacity)(v);
  ------------------
  |  |  175|  6.36k|        #define FUNCTION(a,c) CONCAT3x(a,bool,c)
  |  |  ------------------
  |  |  |  |   21|  6.36k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  ------------------
  ------------------
  477|       |
  478|  6.36k|    if (capacity <= current_capacity) {
  ------------------
  |  Branch (478:9): [True: 4.48k, False: 1.88k]
  ------------------
  479|  4.48k|        return IGRAPH_SUCCESS;
  480|  4.48k|    }
  481|       |
  482|  1.88k|    tmp = IGRAPH_REALLOC(v->stor_begin, capacity, BASE);
  ------------------
  |  |   35|  1.88k|#define IGRAPH_REALLOC(p,n,t) IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, realloc((void*)(p), sizeof(t) * ((n) > 0 ? (n) : 1)))
  |  |  ------------------
  |  |  |  |   31|  3.76k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 1.88k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 1.88k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 1.88k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  483|  1.88k|    IGRAPH_CHECK_OOM(tmp, "Cannot reserve space for vector.");
  ------------------
  |  |  709|  1.88k|    do { \
  |  |  710|  1.88k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  1.88k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.88k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  1.88k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 1.88k]
  |  |  ------------------
  ------------------
  484|       |
  485|  1.88k|    v->end = tmp + (v->end - v->stor_begin);
  486|  1.88k|    v->stor_begin = tmp;
  487|  1.88k|    v->stor_end = v->stor_begin + capacity;
  488|       |
  489|  1.88k|    return IGRAPH_SUCCESS;
  490|  1.88k|}
igraph_vector_bool_resize:
 1264|  6.36k|igraph_error_t FUNCTION(igraph_vector, resize)(TYPE(igraph_vector)* v, igraph_int_t new_size) {
 1265|  6.36k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  6.36k|    do { \
  |  |  925|  6.36k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  6.36k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 6.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  6.36k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 6.36k]
  |  |  ------------------
  ------------------
 1266|  6.36k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  6.36k|    do { \
  |  |  925|  6.36k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  6.36k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 6.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  6.36k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 6.36k]
  |  |  ------------------
  ------------------
 1267|  6.36k|    IGRAPH_CHECK(FUNCTION(igraph_vector, reserve)(v, new_size));
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
 1268|  6.36k|    v->end = v->stor_begin + new_size;
 1269|  6.36k|    return IGRAPH_SUCCESS;
 1270|  6.36k|}
igraph_vector_int_init:
  134|  9.25M|igraph_error_t FUNCTION(igraph_vector, init)(TYPE(igraph_vector) *v, igraph_int_t size) {
  135|  9.25M|    igraph_int_t alloc_size;
  136|  9.25M|    IGRAPH_ASSERT(size >= 0);
  ------------------
  |  |  924|  9.25M|    do { \
  |  |  925|  9.25M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  9.25M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.25M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  9.25M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 9.25M]
  |  |  ------------------
  ------------------
  137|  9.25M|    alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (137:18): [True: 631k, False: 8.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|  9.25M|    v->stor_begin = IGRAPH_CALLOC(alloc_size, BASE);
  ------------------
  |  |   33|  9.25M|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  18.5M|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 9.25M, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 9.25M, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 9.25M, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  144|  9.25M|    IGRAPH_CHECK_OOM(v->stor_begin, "Insufficient memory to initialize vector.");
  ------------------
  |  |  709|  9.25M|    do { \
  |  |  710|  9.25M|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  9.25M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.25M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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.25M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 9.25M]
  |  |  ------------------
  ------------------
  145|  9.25M|    v->stor_end = v->stor_begin + alloc_size;
  146|  9.25M|    v->end = v->stor_begin + size;
  147|       |
  148|  9.25M|    return IGRAPH_SUCCESS;
  149|  9.25M|}
igraph_vector_int_destroy:
  408|  9.25M|void FUNCTION(igraph_vector, destroy)(TYPE(igraph_vector) *v) {
  409|  9.25M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  9.25M|    do { \
  |  |  925|  9.25M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  9.25M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.25M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  9.25M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 9.25M]
  |  |  ------------------
  ------------------
  410|       |    /* vector_init() will leave stor_begin set to NULL when it fails.
  411|       |     * We handle these cases gracefully. */
  412|  9.25M|    if (v->stor_begin != NULL) {
  ------------------
  |  Branch (412:9): [True: 9.25M, False: 0]
  ------------------
  413|  9.25M|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   36|  9.25M|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  414|       |        v->stor_begin = NULL;
  415|  9.25M|    }
  416|  9.25M|}
igraph_vector_int_capacity:
  436|  22.0M|igraph_int_t FUNCTION(igraph_vector, capacity)(const TYPE(igraph_vector) *v) {
  437|  22.0M|    return v->stor_end - v->stor_begin;
  438|  22.0M|}
igraph_vector_int_reserve:
  468|  20.4M|igraph_error_t FUNCTION(igraph_vector, reserve)(TYPE(igraph_vector) *v, igraph_int_t capacity) {
  469|  20.4M|    igraph_int_t current_capacity;
  470|  20.4M|    BASE *tmp;
  ------------------
  |  |   66|  20.4M|    #define BASE igraph_int_t
  ------------------
  471|       |
  472|  20.4M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  20.4M|    do { \
  |  |  925|  20.4M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  20.4M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 20.4M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  20.4M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 20.4M]
  |  |  ------------------
  ------------------
  473|  20.4M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  20.4M|    do { \
  |  |  925|  20.4M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  20.4M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 20.4M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  20.4M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 20.4M]
  |  |  ------------------
  ------------------
  474|  20.4M|    IGRAPH_ASSERT(capacity >= 0);
  ------------------
  |  |  924|  20.4M|    do { \
  |  |  925|  20.4M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  20.4M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 20.4M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  20.4M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 20.4M]
  |  |  ------------------
  ------------------
  475|       |
  476|  20.4M|    current_capacity = FUNCTION(igraph_vector, capacity)(v);
  ------------------
  |  |  178|  20.4M|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  20.4M|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  20.4M|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  477|       |
  478|  20.4M|    if (capacity <= current_capacity) {
  ------------------
  |  Branch (478:9): [True: 15.9M, False: 4.50M]
  ------------------
  479|  15.9M|        return IGRAPH_SUCCESS;
  480|  15.9M|    }
  481|       |
  482|  4.50M|    tmp = IGRAPH_REALLOC(v->stor_begin, capacity, BASE);
  ------------------
  |  |   35|  4.50M|#define IGRAPH_REALLOC(p,n,t) IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, realloc((void*)(p), sizeof(t) * ((n) > 0 ? (n) : 1)))
  |  |  ------------------
  |  |  |  |   31|  9.00M|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 4.50M, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 4.50M, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 4.50M, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  483|  4.50M|    IGRAPH_CHECK_OOM(tmp, "Cannot reserve space for vector.");
  ------------------
  |  |  709|  4.50M|    do { \
  |  |  710|  4.50M|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  4.50M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.50M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  4.50M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 4.50M]
  |  |  ------------------
  ------------------
  484|       |
  485|  4.50M|    v->end = tmp + (v->end - v->stor_begin);
  486|  4.50M|    v->stor_begin = tmp;
  487|  4.50M|    v->stor_end = v->stor_begin + capacity;
  488|       |
  489|  4.50M|    return IGRAPH_SUCCESS;
  490|  4.50M|}
igraph_vector_int_empty:
  503|   790k|igraph_bool_t FUNCTION(igraph_vector, empty)(const TYPE(igraph_vector) *v) {
  504|   790k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|   790k|    do { \
  |  |  925|   790k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   790k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 790k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   790k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 790k]
  |  |  ------------------
  ------------------
  505|   790k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|   790k|    do { \
  |  |  925|   790k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   790k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 790k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   790k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 790k]
  |  |  ------------------
  ------------------
  506|   790k|    return v->stor_begin == v->end;
  507|   790k|}
igraph_vector_int_size:
  522|  19.0M|igraph_int_t FUNCTION(igraph_vector, size)(const TYPE(igraph_vector) *v) {
  523|  19.0M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  19.0M|    do { \
  |  |  925|  19.0M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  19.0M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 19.0M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  19.0M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 19.0M]
  |  |  ------------------
  ------------------
  524|  19.0M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  19.0M|    do { \
  |  |  925|  19.0M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  19.0M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 19.0M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  19.0M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 19.0M]
  |  |  ------------------
  ------------------
  525|  19.0M|    return v->end - v->stor_begin;
  526|  19.0M|}
igraph_vector_int_clear:
  542|  1.09M|void FUNCTION(igraph_vector, clear)(TYPE(igraph_vector)* v) {
  543|  1.09M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  1.09M|    do { \
  |  |  925|  1.09M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.09M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.09M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.09M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.09M]
  |  |  ------------------
  ------------------
  544|  1.09M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  1.09M|    do { \
  |  |  925|  1.09M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.09M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.09M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.09M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.09M]
  |  |  ------------------
  ------------------
  545|  1.09M|    v->end = v->stor_begin;
  546|  1.09M|}
igraph_vector_int_push_back:
  573|  7.45M|igraph_error_t FUNCTION(igraph_vector, push_back)(TYPE(igraph_vector) *v, BASE e) {
  574|  7.45M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  7.45M|    do { \
  |  |  925|  7.45M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  7.45M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 7.45M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  7.45M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 7.45M]
  |  |  ------------------
  ------------------
  575|  7.45M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  7.45M|    do { \
  |  |  925|  7.45M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  7.45M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 7.45M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  7.45M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 7.45M]
  |  |  ------------------
  ------------------
  576|       |
  577|  7.45M|    if (v->stor_end == v->end) {
  ------------------
  |  Branch (577:9): [True: 2.15M, False: 5.30M]
  ------------------
  578|       |        /* full, allocate more storage */
  579|  2.15M|        igraph_int_t old_size = FUNCTION(igraph_vector, size)(v);
  ------------------
  |  |  178|  2.15M|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  2.15M|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  2.15M|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  580|  2.15M|        igraph_int_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   72|  2.15M|#  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.15M|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (580:33): [True: 2.15M, False: 0]
  ------------------
  581|  2.15M|        if (old_size == IGRAPH_INTEGER_MAX) {
  ------------------
  |  |   72|  2.15M|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (581:13): [True: 0, False: 2.15M]
  ------------------
  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.15M|        if (new_size == 0) {
  ------------------
  |  Branch (584:13): [True: 0, False: 2.15M]
  ------------------
  585|      0|            new_size = 1;
  586|      0|        }
  587|  2.15M|        IGRAPH_CHECK(FUNCTION(igraph_vector, reserve)(v, new_size));
  ------------------
  |  |  656|  2.15M|    do { \
  |  |  657|  2.15M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.15M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.15M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.15M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.15M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.15M]
  |  |  ------------------
  ------------------
  588|  2.15M|    }
  589|       |
  590|  7.45M|    *(v->end) = e;
  591|  7.45M|    v->end += 1;
  592|       |
  593|  7.45M|    return IGRAPH_SUCCESS;
  594|  7.45M|}
igraph_vector_int_insert:
  611|  61.7k|        TYPE(igraph_vector) *v, igraph_int_t pos, BASE value) {
  612|  61.7k|    igraph_int_t size = FUNCTION(igraph_vector, size)(v);
  ------------------
  |  |  178|  61.7k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  61.7k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  61.7k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  613|  61.7k|    IGRAPH_ASSERT(0 <= pos && pos <= size);
  ------------------
  |  |  924|  61.7k|    do { \
  |  |  925|  61.7k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   123k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 61.7k]
  |  |  |  |  |  Branch (612:52): [True: 61.7k, False: 0]
  |  |  |  |  |  Branch (612:52): [True: 61.7k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  61.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 61.7k]
  |  |  ------------------
  ------------------
  614|  61.7k|    if (size == IGRAPH_INTEGER_MAX) {
  ------------------
  |  |   72|  61.7k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (614:9): [True: 0, False: 61.7k]
  ------------------
  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|  61.7k|    IGRAPH_CHECK(FUNCTION(igraph_vector, resize)(v, size + 1));
  ------------------
  |  |  656|  61.7k|    do { \
  |  |  657|  61.7k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  61.7k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  61.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 61.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|  61.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 61.7k]
  |  |  ------------------
  ------------------
  618|  61.7k|    if (pos < size) {
  ------------------
  |  Branch (618:9): [True: 8.81k, False: 52.9k]
  ------------------
  619|  8.81k|        memmove(v->stor_begin + pos + 1, v->stor_begin + pos,
  620|  8.81k|                sizeof(BASE) * (size - pos));
  621|  8.81k|    }
  622|  61.7k|    v->stor_begin[pos] = value;
  623|  61.7k|    return IGRAPH_SUCCESS;
  624|  61.7k|}
igraph_vector_int_get_ptr:
  682|   445k|BASE* FUNCTION(igraph_vector, get_ptr)(const TYPE(igraph_vector) *v, igraph_int_t pos) {
  683|   445k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|   445k|    do { \
  |  |  925|   445k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   445k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 445k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   445k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 445k]
  |  |  ------------------
  ------------------
  684|   445k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|   445k|    do { \
  |  |  925|   445k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   445k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 445k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   445k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 445k]
  |  |  ------------------
  ------------------
  685|   445k|    return v->stor_begin + pos;
  686|   445k|}
igraph_vector_int_null:
  725|   178k|void FUNCTION(igraph_vector, null)(TYPE(igraph_vector) *v) {
  726|   178k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|   178k|    do { \
  |  |  925|   178k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   178k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 178k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   178k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 178k]
  |  |  ------------------
  ------------------
  727|   178k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|   178k|    do { \
  |  |  925|   178k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   178k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 178k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   178k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 178k]
  |  |  ------------------
  ------------------
  728|   178k|    if (FUNCTION(igraph_vector, size)(v) > 0) {
  ------------------
  |  |  178|   178k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|   178k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|   178k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (728:9): [True: 171k, False: 6.88k]
  ------------------
  729|   171k|        memset(v->stor_begin, 0, sizeof(BASE) * FUNCTION(igraph_vector, size)(v));
  ------------------
  |  |  178|   171k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|   171k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|   171k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  730|   171k|    }
  731|   178k|}
igraph_vector_int_fill:
  745|  29.7k|void FUNCTION(igraph_vector, fill)(TYPE(igraph_vector) *v, BASE e) {
  746|  29.7k|    BASE *ptr;
  ------------------
  |  |   66|  29.7k|    #define BASE igraph_int_t
  ------------------
  747|  29.7k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  29.7k|    do { \
  |  |  925|  29.7k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  29.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 29.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  29.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 29.7k]
  |  |  ------------------
  ------------------
  748|  29.7k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  29.7k|    do { \
  |  |  925|  29.7k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  29.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 29.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  29.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 29.7k]
  |  |  ------------------
  ------------------
  749|       |
  750|       |    /* Optimize the commonly used integer case when filling with 0
  751|       |     * or -1, which are an all-0 and all-1 bit pattern that the
  752|       |     * compiler can generate higher efficiency code for. */
  753|  29.7k|#if defined(BASE_INT)
  754|  29.7k|    if (e == 0) {
  ------------------
  |  Branch (754:9): [True: 0, False: 29.7k]
  ------------------
  755|      0|        FUNCTION(igraph_vector, null)(v);
  ------------------
  |  |  178|      0|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|      0|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|      0|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  756|      0|        return;
  757|      0|    }
  758|  29.7k|    if (e == -1) {
  ------------------
  |  Branch (758:9): [True: 16.9k, False: 12.7k]
  ------------------
  759|  2.91M|        for (ptr = v->stor_begin; ptr < v->end; ptr++) {
  ------------------
  |  Branch (759:35): [True: 2.89M, False: 16.9k]
  ------------------
  760|  2.89M|            *ptr = -1;
  761|  2.89M|        }
  762|  16.9k|        return;
  763|  16.9k|    }
  764|  12.7k|#endif
  765|       |
  766|  2.18M|    for (ptr = v->stor_begin; ptr < v->end; ptr++) {
  ------------------
  |  Branch (766:31): [True: 2.17M, False: 12.7k]
  ------------------
  767|  2.17M|        *ptr = e;
  768|  2.17M|    }
  769|  12.7k|}
igraph_vector_int_range:
  791|  2.12k|igraph_error_t FUNCTION(igraph_vector, range)(TYPE(igraph_vector) *v, BASE start, BASE end) {
  792|  2.12k|    BASE *p;
  ------------------
  |  |   66|  2.12k|    #define BASE igraph_int_t
  ------------------
  793|  2.12k|    IGRAPH_CHECK(FUNCTION(igraph_vector, resize)(v, (end - start)));
  ------------------
  |  |  656|  2.12k|    do { \
  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  794|       |
  795|   364k|    for (p = v->stor_begin; p < v->end; p++) {
  ------------------
  |  Branch (795:29): [True: 362k, False: 2.12k]
  ------------------
  796|   362k|        *p = start;
  797|   362k|        start = start + ONE;
  ------------------
  |  |   72|   362k|    #define ONE 1
  ------------------
  798|   362k|    }
  799|       |
  800|  2.12k|    return IGRAPH_SUCCESS;
  801|  2.12k|}
igraph_vector_int_pop_back:
  838|  1.03M|BASE FUNCTION(igraph_vector, pop_back)(TYPE(igraph_vector) *v) {
  839|  1.03M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  1.03M|    do { \
  |  |  925|  1.03M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.03M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.03M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.03M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.03M]
  |  |  ------------------
  ------------------
  840|  1.03M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  1.03M|    do { \
  |  |  925|  1.03M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.03M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.03M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.03M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.03M]
  |  |  ------------------
  ------------------
  841|  1.03M|    IGRAPH_ASSERT(v->end != NULL);
  ------------------
  |  |  924|  1.03M|    do { \
  |  |  925|  1.03M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.03M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.03M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.03M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.03M]
  |  |  ------------------
  ------------------
  842|  1.03M|    IGRAPH_ASSERT(v->end != v->stor_begin);
  ------------------
  |  |  924|  1.03M|    do { \
  |  |  925|  1.03M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.03M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.03M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.03M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.03M]
  |  |  ------------------
  ------------------
  843|       |
  844|  1.03M|    (v->end)--;
  845|       |
  846|  1.03M|    return *(v->end);
  847|  1.03M|}
igraph_vector_int_sort:
  958|    599|void FUNCTION(igraph_vector, sort)(TYPE(igraph_vector) *v) {
  959|    599|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|    599|    do { \
  |  |  925|    599|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|    599|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 599]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|    599|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 599]
  |  |  ------------------
  ------------------
  960|    599|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|    599|    do { \
  |  |  925|    599|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|    599|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 599]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|    599|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 599]
  |  |  ------------------
  ------------------
  961|    599|    igraph_qsort(v->stor_begin, FUNCTION(igraph_vector, size)(v),
  ------------------
  |  |  178|    599|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|    599|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|    599|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  962|    599|                 sizeof(BASE), FUNCTION(igraph_vector, sort_cmp));
  ------------------
  |  |  178|    599|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|    599|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|    599|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  963|    599|}
igraph_vector_int_resize:
 1264|  18.2M|igraph_error_t FUNCTION(igraph_vector, resize)(TYPE(igraph_vector)* v, igraph_int_t new_size) {
 1265|  18.2M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  18.2M|    do { \
  |  |  925|  18.2M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  18.2M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 18.2M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  18.2M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 18.2M]
  |  |  ------------------
  ------------------
 1266|  18.2M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  18.2M|    do { \
  |  |  925|  18.2M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  18.2M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 18.2M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  18.2M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 18.2M]
  |  |  ------------------
  ------------------
 1267|  18.2M|    IGRAPH_CHECK(FUNCTION(igraph_vector, reserve)(v, new_size));
  ------------------
  |  |  656|  18.2M|    do { \
  |  |  657|  18.2M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  18.2M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  18.2M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 18.2M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  18.2M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 18.2M]
  |  |  ------------------
  ------------------
 1268|  18.2M|    v->end = v->stor_begin + new_size;
 1269|  18.2M|    return IGRAPH_SUCCESS;
 1270|  18.2M|}
igraph_vector_int_max:
 1327|  23.4k|BASE FUNCTION(igraph_vector, max)(const TYPE(igraph_vector) *v) {
 1328|  23.4k|    BASE max;
  ------------------
  |  |   66|  23.4k|    #define BASE igraph_int_t
  ------------------
 1329|  23.4k|    BASE *ptr;
  ------------------
  |  |   66|  23.4k|    #define BASE igraph_int_t
  ------------------
 1330|  23.4k|    IGRAPH_ASSERT(!FUNCTION(igraph_vector, empty)(v));
  ------------------
  |  |  924|  23.4k|    do { \
  |  |  925|  23.4k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  23.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 23.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  23.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 23.4k]
  |  |  ------------------
  ------------------
 1331|  23.4k|    max = *(v->stor_begin);
 1332|       |#if defined(BASE_IGRAPH_REAL)
 1333|       |    if (isnan(max)) { return max; }; /* Result is NaN */
 1334|       |#endif
 1335|  23.4k|    ptr = v->stor_begin + 1;
 1336|  2.18M|    while (ptr < v->end) {
  ------------------
  |  Branch (1336:12): [True: 2.15M, False: 23.4k]
  ------------------
 1337|  2.15M|        if ((*ptr) > max) {
  ------------------
  |  Branch (1337:13): [True: 138k, False: 2.01M]
  ------------------
 1338|   138k|            max = *ptr;
 1339|   138k|        }
 1340|       |#if defined(BASE_IGRAPH_REAL)
 1341|       |        else if (isnan(*ptr))
 1342|       |            return *ptr; /* Result is NaN */
 1343|       |#endif
 1344|  2.15M|        ptr++;
 1345|  2.15M|    }
 1346|  23.4k|    return max;
 1347|  23.4k|}
igraph_vector_int_min:
 1401|  38.1k|BASE FUNCTION(igraph_vector, min)(const TYPE(igraph_vector) *v) {
 1402|  38.1k|    BASE min;
  ------------------
  |  |   66|  38.1k|    #define BASE igraph_int_t
  ------------------
 1403|  38.1k|    BASE *ptr;
  ------------------
  |  |   66|  38.1k|    #define BASE igraph_int_t
  ------------------
 1404|  38.1k|    IGRAPH_ASSERT(!FUNCTION(igraph_vector, empty)(v));
  ------------------
  |  |  924|  38.1k|    do { \
  |  |  925|  38.1k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  38.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 38.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  38.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 38.1k]
  |  |  ------------------
  ------------------
 1405|  38.1k|    min = *(v->stor_begin);
 1406|       |#if defined(BASE_IGRAPH_REAL)
 1407|       |    if (isnan(min)) { return min; }; /* Result is NaN */
 1408|       |#endif
 1409|  38.1k|    ptr = v->stor_begin + 1;
 1410|  6.52M|    while (ptr < v->end) {
  ------------------
  |  Branch (1410:12): [True: 6.48M, False: 38.1k]
  ------------------
 1411|  6.48M|        if ((*ptr) < min) {
  ------------------
  |  Branch (1411:13): [True: 26.0k, False: 6.45M]
  ------------------
 1412|  26.0k|            min = *ptr;
 1413|  26.0k|        }
 1414|       |#if defined(BASE_IGRAPH_REAL)
 1415|       |        else if (isnan(*ptr)) {
 1416|       |            return *ptr; /* Result is NaN */
 1417|       |        }
 1418|       |#endif
 1419|  6.48M|        ptr++;
 1420|  6.48M|    }
 1421|  38.1k|    return min;
 1422|  38.1k|}
igraph_vector_int_init_copy:
 1538|    294|) {
 1539|    294|    igraph_int_t from_size;
 1540|       |
 1541|    294|    IGRAPH_ASSERT(from != NULL);
  ------------------
  |  |  924|    294|    do { \
  |  |  925|    294|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|    294|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 294]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|    294|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 294]
  |  |  ------------------
  ------------------
 1542|    294|    IGRAPH_ASSERT(from->stor_begin != NULL);
  ------------------
  |  |  924|    294|    do { \
  |  |  925|    294|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|    294|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 294]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|    294|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 294]
  |  |  ------------------
  ------------------
 1543|       |
 1544|    294|    from_size = FUNCTION(igraph_vector, size)(from);
  ------------------
  |  |  178|    294|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|    294|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|    294|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1545|    294|    IGRAPH_CHECK(FUNCTION(igraph_vector, init)(to, from_size));
  ------------------
  |  |  656|    294|    do { \
  |  |  657|    294|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    294|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    294|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 294]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    294|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 294]
  |  |  ------------------
  ------------------
 1546|       |
 1547|    294|    memcpy(to->stor_begin, from->stor_begin, from_size * sizeof(BASE));
 1548|       |
 1549|    294|    return IGRAPH_SUCCESS;
 1550|    294|}
igraph_vector_int_init_range:
 1686|  2.12k|igraph_error_t FUNCTION(igraph_vector, init_range)(TYPE(igraph_vector) *v, BASE start, BASE end) {
 1687|  2.12k|    BASE *p;
  ------------------
  |  |   66|  2.12k|    #define BASE igraph_int_t
  ------------------
 1688|  2.12k|    IGRAPH_CHECK(FUNCTION(igraph_vector, init)(v, (end - start)));
  ------------------
  |  |  656|  2.12k|    do { \
  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
 1689|       |
 1690|   364k|    for (p = v->stor_begin; p < v->end; p++) {
  ------------------
  |  Branch (1690:29): [True: 362k, False: 2.12k]
  ------------------
 1691|   362k|        *p = start;
 1692|   362k|        start = start + ONE;
  ------------------
  |  |   72|   362k|    #define ONE 1
  ------------------
 1693|   362k|    }
 1694|       |
 1695|  2.12k|    return IGRAPH_SUCCESS;
 1696|  2.12k|}
igraph_vector_int_remove_section:
 1716|  61.7k|        TYPE(igraph_vector) *v, igraph_int_t from, igraph_int_t to) {
 1717|  61.7k|    igraph_int_t size = FUNCTION(igraph_vector, size)(v);
  ------------------
  |  |  178|  61.7k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  61.7k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  61.7k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1718|       |
 1719|  61.7k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  61.7k|    do { \
  |  |  925|  61.7k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  61.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 61.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  61.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 61.7k]
  |  |  ------------------
  ------------------
 1720|  61.7k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  61.7k|    do { \
  |  |  925|  61.7k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  61.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 61.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  61.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 61.7k]
  |  |  ------------------
  ------------------
 1721|       |
 1722|  61.7k|    if (from < 0) {
  ------------------
  |  Branch (1722:9): [True: 0, False: 61.7k]
  ------------------
 1723|      0|        from = 0;
 1724|      0|    }
 1725|       |
 1726|  61.7k|    if (to > size) {
  ------------------
  |  Branch (1726:9): [True: 0, False: 61.7k]
  ------------------
 1727|      0|        to = size;
 1728|      0|    }
 1729|       |
 1730|  61.7k|    if (to > from) {
  ------------------
  |  Branch (1730:9): [True: 61.7k, False: 0]
  ------------------
 1731|  61.7k|        memmove(v->stor_begin + from, v->stor_begin + to,
 1732|  61.7k|                sizeof(BASE) * (v->end - v->stor_begin - to));
 1733|  61.7k|        v->end -= (to - from);
 1734|  61.7k|    }
 1735|  61.7k|}
igraph_vector_int_remove:
 1751|  61.7k|void FUNCTION(igraph_vector, remove)(TYPE(igraph_vector) *v, igraph_int_t elem) {
 1752|  61.7k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  61.7k|    do { \
  |  |  925|  61.7k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  61.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 61.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  61.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 61.7k]
  |  |  ------------------
  ------------------
 1753|  61.7k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  61.7k|    do { \
  |  |  925|  61.7k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  61.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 61.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  61.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 61.7k]
  |  |  ------------------
  ------------------
 1754|  61.7k|    FUNCTION(igraph_vector, remove_section)(v, elem, elem + 1);
  ------------------
  |  |  178|  61.7k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  61.7k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  61.7k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1755|  61.7k|}
igraph_vector_int_isininterval:
 1832|  51.7k|        BASE high) {
 1833|  51.7k|    BASE *ptr;
  ------------------
  |  |   66|  51.7k|    #define BASE igraph_int_t
  ------------------
 1834|  51.7k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  51.7k|    do { \
  |  |  925|  51.7k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  51.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 51.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  51.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 51.7k]
  |  |  ------------------
  ------------------
 1835|  51.7k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  51.7k|    do { \
  |  |  925|  51.7k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  51.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 51.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  51.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 51.7k]
  |  |  ------------------
  ------------------
 1836|  3.26M|    for (ptr = v->stor_begin; ptr < v->end; ptr++) {
  ------------------
  |  Branch (1836:31): [True: 3.20M, False: 51.7k]
  ------------------
 1837|       |        /* Note that the following is not equivalent to *ptr < low || *ptr > high
 1838|       |         * when *ptr is NaN! */
 1839|  3.20M|        if (!(*ptr >= low && *ptr <= high)) {
  ------------------
  |  Branch (1839:15): [True: 3.20M, False: 0]
  |  Branch (1839:30): [True: 3.20M, False: 0]
  ------------------
 1840|      0|            return 0;
 1841|      0|        }
 1842|  3.20M|    }
 1843|  51.7k|    return 1;
 1844|  51.7k|}
igraph_vector_int_binsearch:
 2130|   123k|        BASE what, igraph_int_t *pos) {
 2131|   123k|    return FUNCTION(igraph_i_vector, binsearch_slice)(v, what, pos,
  ------------------
  |  |  178|   123k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|   123k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|   123k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2132|   123k|            0, FUNCTION(igraph_vector, size)(v));
  ------------------
  |  |  178|   123k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|   123k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|   123k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2133|   123k|}
igraph_vector_int_contains_sorted:
 2224|   130k|igraph_bool_t FUNCTION(igraph_vector, contains_sorted)(const TYPE(igraph_vector) *v, BASE what) {
 2225|   130k|    igraph_int_t left = 0;
 2226|   130k|    igraph_int_t right = FUNCTION(igraph_vector, size)(v) - 1;
  ------------------
  |  |  178|   130k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|   130k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|   130k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2227|       |
 2228|   280k|    while (left <= right) {
  ------------------
  |  Branch (2228:12): [True: 162k, False: 117k]
  ------------------
 2229|       |        /* (right + left) / 2 could theoretically overflow for long vectors */
 2230|   162k|        igraph_int_t middle = left + ((right - left) >> 1);
 2231|   162k|        if (what < VECTOR(*v)[middle]) {
  ------------------
  |  |   60|   162k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (2231:13): [True: 68.9k, False: 93.4k]
  ------------------
 2232|  68.9k|            right = middle - 1;
 2233|  93.4k|        } else if (what > VECTOR(*v)[middle]) {
  ------------------
  |  |   60|  93.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (2233:20): [True: 80.6k, False: 12.8k]
  ------------------
 2234|  80.6k|            left = middle + 1;
 2235|  80.6k|        } else {
 2236|  12.8k|            return true;
 2237|  12.8k|        }
 2238|   162k|    }
 2239|       |
 2240|   117k|    return false;
 2241|   130k|}
igraph_vector_int_append:
 2427|  1.54M|                                               const TYPE(igraph_vector) *from) {
 2428|  1.54M|    IGRAPH_ASSERT(to != NULL);
  ------------------
  |  |  924|  1.54M|    do { \
  |  |  925|  1.54M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.54M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.54M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.54M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.54M]
  |  |  ------------------
  ------------------
 2429|  1.54M|    IGRAPH_ASSERT(to->stor_begin != NULL);
  ------------------
  |  |  924|  1.54M|    do { \
  |  |  925|  1.54M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.54M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.54M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.54M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.54M]
  |  |  ------------------
  ------------------
 2430|       |
 2431|  1.54M|    const igraph_int_t to_size = FUNCTION(igraph_vector, size)(to);
  ------------------
  |  |  178|  1.54M|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  1.54M|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  1.54M|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2432|  1.54M|    const igraph_int_t from_size = FUNCTION(igraph_vector, size)(from);
  ------------------
  |  |  178|  1.54M|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  1.54M|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  1.54M|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2433|  1.54M|    const igraph_int_t to_capacity = FUNCTION(igraph_vector, capacity)(to);
  ------------------
  |  |  178|  1.54M|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  1.54M|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  1.54M|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2434|  1.54M|    igraph_int_t new_to_size;
 2435|       |
 2436|  1.54M|    IGRAPH_SAFE_ADD(to_size, from_size, &new_to_size);
  ------------------
  |  |   47|  1.54M|    do { \
  |  |   48|  1.54M|        igraph_int_t _safe_a = (a), _safe_b = (b); \
  |  |   49|  1.54M|        igraph_int_t _safe_sum; \
  |  |   50|  1.54M|        if (__builtin_add_overflow(_safe_a, _safe_b, &_safe_sum)) { \
  |  |  ------------------
  |  |  |  Branch (50:13): [True: 0, False: 1.54M]
  |  |  ------------------
  |  |   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.54M|        *(res) = _safe_sum; \
  |  |   54|  1.54M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (54:14): [Folded, False: 1.54M]
  |  |  ------------------
  ------------------
 2437|       |
 2438|  1.54M|    if (to_capacity < new_to_size) {
  ------------------
  |  Branch (2438:9): [True: 0, False: 1.54M]
  ------------------
 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.54M|    memcpy(to->stor_begin + to_size, from->stor_begin,
 2447|  1.54M|           sizeof(BASE) * from_size);
 2448|  1.54M|    to->end = to->stor_begin + new_to_size;
 2449|       |
 2450|  1.54M|    return IGRAPH_SUCCESS;
 2451|  1.54M|}
igraph_vector_int_update:
 2524|  2.09M|                                    const TYPE(igraph_vector) *from) {
 2525|  2.09M|    igraph_int_t n = FUNCTION(igraph_vector, size)(from);
  ------------------
  |  |  178|  2.09M|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  2.09M|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  2.09M|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2526|  2.09M|    IGRAPH_CHECK(FUNCTION(igraph_vector, resize)(to, n));
  ------------------
  |  |  656|  2.09M|    do { \
  |  |  657|  2.09M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.09M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.09M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.09M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.09M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.09M]
  |  |  ------------------
  ------------------
 2527|  2.09M|    memcpy(to->stor_begin, from->stor_begin, sizeof(BASE)*n);
 2528|  2.09M|    return IGRAPH_SUCCESS;
 2529|  2.09M|}
igraph_vector_int_swap:
 2541|  2.11M|void FUNCTION(igraph_vector, swap)(TYPE(igraph_vector) *v1, TYPE(igraph_vector) *v2) {
 2542|       |
 2543|  2.11M|    TYPE(igraph_vector) tmp;
  ------------------
  |  |  179|  2.11M|        #define TYPE(a) CONCAT3(a,SHORT,t)
  |  |  ------------------
  |  |  |  |   22|  2.11M|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  2.11M|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2544|       |
 2545|  2.11M|    tmp = *v1;
 2546|  2.11M|    *v1 = *v2;
 2547|  2.11M|    *v2 = tmp;
 2548|  2.11M|}
vector.c:igraph_vector_int_sort_cmp:
  924|   116k|static int FUNCTION(igraph_vector, sort_cmp)(const void *a, const void *b) {
  925|   116k|    const BASE *da = (const BASE *) a;
  926|   116k|    const BASE *db = (const BASE *) b;
  927|       |
  928|   116k|    return (*da > *db) - (*da < *db);
  929|   116k|}
vector.c:igraph_i_vector_int_binsearch_slice:
 2183|   123k|        BASE what, igraph_int_t *pos, igraph_int_t start, igraph_int_t end) {
 2184|   123k|    igraph_int_t left  = start;
 2185|   123k|    igraph_int_t right = end - 1;
 2186|       |
 2187|   217k|    while (left <= right) {
  ------------------
  |  Branch (2187:12): [True: 156k, False: 61.7k]
  ------------------
 2188|       |        /* (right + left) / 2 could theoretically overflow for long vectors */
 2189|   156k|        igraph_int_t middle = left + ((right - left) >> 1);
 2190|   156k|        if (VECTOR(*v)[middle] > what) {
  ------------------
  |  |   60|   156k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (2190:13): [True: 42.3k, False: 113k]
  ------------------
 2191|  42.3k|            right = middle - 1;
 2192|   113k|        } else if (VECTOR(*v)[middle] < what) {
  ------------------
  |  |   60|   113k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (2192:20): [True: 51.9k, False: 61.7k]
  ------------------
 2193|  51.9k|            left = middle + 1;
 2194|  61.7k|        } else {
 2195|  61.7k|            if (pos != 0) {
  ------------------
  |  Branch (2195:17): [True: 61.7k, False: 0]
  ------------------
 2196|  61.7k|                *pos = middle;
 2197|  61.7k|            }
 2198|  61.7k|            return true;
 2199|  61.7k|        }
 2200|   156k|    }
 2201|       |
 2202|       |    /* if we are here, the element was not found */
 2203|  61.7k|    if (pos != 0) {
  ------------------
  |  Branch (2203:9): [True: 61.7k, False: 0]
  ------------------
 2204|  61.7k|        *pos = left;
 2205|  61.7k|    }
 2206|       |
 2207|       |    return false;
 2208|   123k|}

igraph_find_cycle:
  214|  2.12k|                                 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.12k|    igraph_bool_t known_acyclic = false;
  219|  2.12k|    igraph_bool_t found;
  220|       |
  221|  2.12k|    if (mode != IGRAPH_OUT && mode != IGRAPH_IN && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (221:9): [True: 2.12k, False: 0]
  |  Branch (221:31): [True: 0, False: 2.12k]
  |  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.12k|    if (! igraph_is_directed(graph)) {
  ------------------
  |  Branch (225:9): [True: 0, False: 2.12k]
  ------------------
  226|      0|        mode = IGRAPH_ALL;
  227|      0|    }
  228|       |
  229|  2.12k|    if (mode == IGRAPH_ALL) /* undirected */ {
  ------------------
  |  Branch (229:9): [True: 0, False: 2.12k]
  ------------------
  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.12k|    } else /* directed */ {
  235|  2.12k|        if (igraph_i_property_cache_has(graph, IGRAPH_PROP_IS_DAG) &&
  ------------------
  |  Branch (235:13): [True: 0, False: 2.12k]
  ------------------
  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.12k|    }
  240|       |
  241|  2.12k|    if (known_acyclic) {
  ------------------
  |  Branch (241:9): [True: 0, False: 2.12k]
  ------------------
  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.12k|    IGRAPH_CHECK(igraph_i_find_cycle(graph, vertices, edges, &found, mode, NULL));
  ------------------
  |  |  656|  2.12k|    do { \
  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  252|       |
  253|  2.12k|    if (! found) {
  ------------------
  |  Branch (253:9): [True: 797, False: 1.32k]
  ------------------
  254|    797|        if (mode == IGRAPH_ALL) /* undirected */ {
  ------------------
  |  Branch (254:13): [True: 0, False: 797]
  ------------------
  255|      0|            igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_IS_FOREST, true);
  256|    797|        } else /* directed */ {
  257|    797|            igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_IS_DAG, true);
  258|    797|        }
  259|    797|    }
  260|       |
  261|  2.12k|    return IGRAPH_SUCCESS;
  262|  2.12k|}
igraph_feedback_arc_set:
  350|  2.12k|        igraph_fas_algorithm_t algo) {
  351|       |
  352|  2.12k|    if (weights) {
  ------------------
  |  Branch (352:9): [True: 0, False: 2.12k]
  ------------------
  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.12k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (361:9): [True: 0, False: 2.12k]
  ------------------
  362|      0|        return igraph_i_feedback_arc_set_undirected(graph, result, weights, NULL);
  363|      0|    }
  364|       |
  365|  2.12k|    switch (algo) {
  366|      0|    case IGRAPH_FAS_EXACT_IP:
  ------------------
  |  Branch (366:5): [True: 0, False: 2.12k]
  ------------------
  367|      0|    case IGRAPH_FAS_EXACT_IP_CG:
  ------------------
  |  Branch (367:5): [True: 0, False: 2.12k]
  ------------------
  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.12k]
  ------------------
  371|      0|        return igraph_i_feedback_arc_set_ip_ti(graph, result, weights);
  372|       |
  373|  2.12k|    case IGRAPH_FAS_APPROX_EADES:
  ------------------
  |  Branch (373:5): [True: 2.12k, False: 0]
  ------------------
  374|  2.12k|        return igraph_i_feedback_arc_set_eades(graph, result, weights, NULL);
  375|       |
  376|      0|    default:
  ------------------
  |  Branch (376:5): [True: 0, False: 2.12k]
  ------------------
  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.12k|    }
  379|  2.12k|}
igraph_i_feedback_arc_set_eades:
  513|  2.12k|                                    const igraph_vector_t *weights, igraph_vector_int_t *layers) {
  514|  2.12k|    const igraph_int_t no_of_nodes = igraph_vcount(graph);
  515|  2.12k|    const igraph_int_t no_of_edges = igraph_ecount(graph);
  516|  2.12k|    igraph_int_t nodes_left;
  517|  2.12k|    igraph_int_t neis_size;
  518|  2.12k|    igraph_dqueue_int_t sources, sinks;
  519|  2.12k|    igraph_vector_int_t neis;
  520|  2.12k|    igraph_vector_int_t indegrees, outdegrees;
  521|  2.12k|    igraph_vector_t instrengths, outstrengths;
  522|  2.12k|    igraph_vector_int_t ordering;
  523|  2.12k|    igraph_int_t order_next_pos = 0, order_next_neg = -1;
  524|       |
  525|  2.12k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&ordering, no_of_nodes);
  ------------------
  |  |  119|  2.12k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.12k|    do { \
  |  |  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.12k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.12k|    do { \
  |  |  |  |  604|  2.12k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.12k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.12k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.12k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.12k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  526|  2.12k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&neis, 0);
  ------------------
  |  |  119|  2.12k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.12k|    do { \
  |  |  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.12k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.12k|    do { \
  |  |  |  |  604|  2.12k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.12k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.12k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.12k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.12k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  527|       |
  528|  2.12k|    IGRAPH_DQUEUE_INT_INIT_FINALLY(&sources, 0);
  ------------------
  |  |   61|  2.12k|    do { IGRAPH_CHECK(igraph_dqueue_int_init(q, capacity)); \
  |  |  ------------------
  |  |  |  |  656|  2.12k|    do { \
  |  |  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|  2.12k|        IGRAPH_FINALLY(igraph_dqueue_int_destroy, q); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.12k|    do { \
  |  |  |  |  604|  2.12k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.12k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.12k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.12k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.12k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (62:64): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  529|  2.12k|    IGRAPH_DQUEUE_INT_INIT_FINALLY(&sinks, 0);
  ------------------
  |  |   61|  2.12k|    do { IGRAPH_CHECK(igraph_dqueue_int_init(q, capacity)); \
  |  |  ------------------
  |  |  |  |  656|  2.12k|    do { \
  |  |  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|  2.12k|        IGRAPH_FINALLY(igraph_dqueue_int_destroy, q); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.12k|    do { \
  |  |  |  |  604|  2.12k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.12k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.12k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.12k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.12k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (62:64): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  530|  2.12k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&indegrees, no_of_nodes);
  ------------------
  |  |  119|  2.12k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.12k|    do { \
  |  |  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.12k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.12k|    do { \
  |  |  |  |  604|  2.12k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.12k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.12k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.12k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.12k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  531|  2.12k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&outdegrees, no_of_nodes);
  ------------------
  |  |  119|  2.12k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.12k|    do { \
  |  |  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.12k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.12k|    do { \
  |  |  |  |  604|  2.12k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.12k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.12k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.12k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.12k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  532|  2.12k|    IGRAPH_VECTOR_INIT_FINALLY(&instrengths, no_of_nodes);
  ------------------
  |  |  104|  2.12k|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.12k|    do { \
  |  |  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  2.12k|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.12k|    do { \
  |  |  |  |  604|  2.12k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.12k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.12k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.12k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.12k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (105:60): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  533|  2.12k|    IGRAPH_VECTOR_INIT_FINALLY(&outstrengths, no_of_nodes);
  ------------------
  |  |  104|  2.12k|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.12k|    do { \
  |  |  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  2.12k|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.12k|    do { \
  |  |  |  |  604|  2.12k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.12k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.12k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.12k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.12k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (105:60): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  534|       |
  535|  2.12k|    IGRAPH_CHECK(igraph_degree(graph, &indegrees, igraph_vss_all(), IGRAPH_IN, IGRAPH_NO_LOOPS));
  ------------------
  |  |  656|  2.12k|    do { \
  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  536|  2.12k|    IGRAPH_CHECK(igraph_degree(graph, &outdegrees, igraph_vss_all(), IGRAPH_OUT, IGRAPH_NO_LOOPS));
  ------------------
  |  |  656|  2.12k|    do { \
  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  537|       |
  538|  2.12k|    if (weights) {
  ------------------
  |  Branch (538:9): [True: 0, False: 2.12k]
  ------------------
  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.12k|    } else {
  542|   364k|        for (igraph_int_t u = 0; u < no_of_nodes; u++) {
  ------------------
  |  Branch (542:34): [True: 362k, False: 2.12k]
  ------------------
  543|   362k|            VECTOR(instrengths)[u] = VECTOR(indegrees)[u];
  ------------------
  |  |   60|   362k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(instrengths)[u] = VECTOR(indegrees)[u];
  ------------------
  |  |   60|   362k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  544|   362k|            VECTOR(outstrengths)[u] = VECTOR(outdegrees)[u];
  ------------------
  |  |   60|   362k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(outstrengths)[u] = VECTOR(outdegrees)[u];
  ------------------
  |  |   60|   362k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  545|   362k|        }
  546|  2.12k|    }
  547|       |
  548|       |    /* Find initial sources and sinks */
  549|  2.12k|    nodes_left = no_of_nodes;
  550|   364k|    for (igraph_int_t u = 0; u < no_of_nodes; u++) {
  ------------------
  |  Branch (550:30): [True: 362k, False: 2.12k]
  ------------------
  551|   362k|        if (VECTOR(indegrees)[u] == 0) {
  ------------------
  |  |   60|   362k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (551:13): [True: 322k, False: 39.9k]
  ------------------
  552|   322k|            if (VECTOR(outdegrees)[u] == 0) {
  ------------------
  |  |   60|   322k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (552:17): [True: 310k, False: 12.0k]
  ------------------
  553|       |                /* Isolated vertex, we simply ignore it */
  554|   310k|                nodes_left--;
  555|   310k|                VECTOR(ordering)[u] = order_next_pos++;
  ------------------
  |  |   60|   310k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  556|   310k|                VECTOR(indegrees)[u] = VECTOR(outdegrees)[u] = -1;
  ------------------
  |  |   60|   310k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(indegrees)[u] = VECTOR(outdegrees)[u] = -1;
  ------------------
  |  |   60|   310k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  557|   310k|            } else {
  558|       |                /* This is a source */
  559|  12.0k|                IGRAPH_CHECK(igraph_dqueue_int_push(&sources, u));
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  560|  12.0k|            }
  561|   322k|        } else if (VECTOR(outdegrees)[u] == 0) {
  ------------------
  |  |   60|  39.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (561:20): [True: 12.4k, False: 27.5k]
  ------------------
  562|       |            /* This is a sink */
  563|  12.4k|            IGRAPH_CHECK(igraph_dqueue_int_push(&sinks, u));
  ------------------
  |  |  656|  12.4k|    do { \
  |  |  657|  12.4k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  12.4k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  12.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 12.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|  12.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 12.4k]
  |  |  ------------------
  ------------------
  564|  12.4k|        }
  565|   362k|    }
  566|       |
  567|       |    /* While we have any nodes left... */
  568|  6.80k|    while (nodes_left > 0) {
  ------------------
  |  Branch (568:12): [True: 4.68k, False: 2.12k]
  ------------------
  569|       |
  570|       |        /* (1) Remove the sources one by one */
  571|  47.6k|        while (!igraph_dqueue_int_empty(&sources)) {
  ------------------
  |  Branch (571:16): [True: 42.9k, False: 4.68k]
  ------------------
  572|  42.9k|            const igraph_int_t u = igraph_dqueue_int_pop(&sources);
  573|       |            /* Add the node to the ordering */
  574|  42.9k|            VECTOR(ordering)[u] = order_next_pos++;
  ------------------
  |  |   60|  42.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  575|       |            /* Exclude the node from further searches */
  576|  42.9k|            VECTOR(indegrees)[u] = VECTOR(outdegrees)[u] = -1;
  ------------------
  |  |   60|  42.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(indegrees)[u] = VECTOR(outdegrees)[u] = -1;
  ------------------
  |  |   60|  42.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  577|       |            /* Get the neighbors and decrease their degrees */
  578|  42.9k|            IGRAPH_CHECK(igraph_incident(graph, &neis, u, IGRAPH_OUT, IGRAPH_LOOPS));
  ------------------
  |  |  656|  42.9k|    do { \
  |  |  657|  42.9k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  42.9k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  42.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 42.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|  42.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 42.9k]
  |  |  ------------------
  ------------------
  579|  42.9k|            neis_size = igraph_vector_int_size(&neis);
  580|   101k|            for (igraph_int_t i = 0; i < neis_size; i++) {
  ------------------
  |  Branch (580:38): [True: 58.4k, False: 42.9k]
  ------------------
  581|  58.4k|                const igraph_int_t eid = VECTOR(neis)[i];
  ------------------
  |  |   60|  58.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  582|  58.4k|                const igraph_int_t w = IGRAPH_TO(graph, eid);
  ------------------
  |  |  128|  58.4k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  58.4k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  583|  58.4k|                if (VECTOR(indegrees)[w] <= 0) {
  ------------------
  |  |   60|  58.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (583:21): [True: 16.2k, False: 42.2k]
  ------------------
  584|       |                    /* Already removed, continue */
  585|  16.2k|                    continue;
  586|  16.2k|                }
  587|  42.2k|                VECTOR(indegrees)[w]--;
  ------------------
  |  |   60|  42.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  588|  42.2k|                VECTOR(instrengths)[w] -= (weights ? VECTOR(*weights)[eid] : 1.0);
  ------------------
  |  |   60|  42.2k|#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: 42.2k]
  ------------------
  589|  42.2k|                if (VECTOR(indegrees)[w] == 0) {
  ------------------
  |  |   60|  42.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (589:21): [True: 26.5k, False: 15.6k]
  ------------------
  590|  26.5k|                    IGRAPH_CHECK(igraph_dqueue_int_push(&sources, w));
  ------------------
  |  |  656|  26.5k|    do { \
  |  |  657|  26.5k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  26.5k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  26.5k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 26.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|  26.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 26.5k]
  |  |  ------------------
  ------------------
  591|  26.5k|                }
  592|  42.2k|            }
  593|  42.9k|            nodes_left--;
  594|  42.9k|        }
  595|       |
  596|       |        /* (2) Remove the sinks one by one */
  597|  22.0k|        while (!igraph_dqueue_int_empty(&sinks)) {
  ------------------
  |  Branch (597:16): [True: 17.3k, False: 4.68k]
  ------------------
  598|  17.3k|            const igraph_int_t u = igraph_dqueue_int_pop(&sinks);
  599|       |            /* Maybe the vertex became sink and source at the same time, hence it
  600|       |             * was already removed in the previous iteration. Check it. */
  601|  17.3k|            if (VECTOR(indegrees)[u] < 0) {
  ------------------
  |  |   60|  17.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (601:17): [True: 11.0k, False: 6.35k]
  ------------------
  602|  11.0k|                continue;
  603|  11.0k|            }
  604|       |            /* Add the node to the ordering */
  605|  6.35k|            VECTOR(ordering)[u] = order_next_neg--;
  ------------------
  |  |   60|  6.35k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  606|       |            /* Exclude the node from further searches */
  607|  6.35k|            VECTOR(indegrees)[u] = VECTOR(outdegrees)[u] = -1;
  ------------------
  |  |   60|  6.35k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(indegrees)[u] = VECTOR(outdegrees)[u] = -1;
  ------------------
  |  |   60|  6.35k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  608|       |            /* Get the neighbors and decrease their degrees */
  609|  6.35k|            IGRAPH_CHECK(igraph_incident(graph, &neis, u, IGRAPH_IN, IGRAPH_LOOPS));
  ------------------
  |  |  656|  6.35k|    do { \
  |  |  657|  6.35k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  6.35k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  6.35k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 6.35k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, 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.35k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 6.35k]
  |  |  ------------------
  ------------------
  610|  6.35k|            neis_size = igraph_vector_int_size(&neis);
  611|  15.2k|            for (igraph_int_t i = 0; i < neis_size; i++) {
  ------------------
  |  Branch (611:38): [True: 8.88k, False: 6.35k]
  ------------------
  612|  8.88k|                const igraph_int_t eid = VECTOR(neis)[i];
  ------------------
  |  |   60|  8.88k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  613|  8.88k|                const igraph_int_t w = IGRAPH_FROM(graph, eid);
  ------------------
  |  |  115|  8.88k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  8.88k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  614|  8.88k|                if (VECTOR(outdegrees)[w] <= 0) {
  ------------------
  |  |   60|  8.88k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (614:21): [True: 1.33k, False: 7.55k]
  ------------------
  615|       |                    /* Already removed, continue */
  616|  1.33k|                    continue;
  617|  1.33k|                }
  618|  7.55k|                VECTOR(outdegrees)[w]--;
  ------------------
  |  |   60|  7.55k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  619|  7.55k|                VECTOR(outstrengths)[w] -= (weights ? VECTOR(*weights)[eid] : 1.0);
  ------------------
  |  |   60|  7.55k|#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.55k]
  ------------------
  620|  7.55k|                if (VECTOR(outdegrees)[w] == 0) {
  ------------------
  |  |   60|  7.55k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (620:21): [True: 3.51k, False: 4.03k]
  ------------------
  621|  3.51k|                    IGRAPH_CHECK(igraph_dqueue_int_push(&sinks, w));
  ------------------
  |  |  656|  3.51k|    do { \
  |  |  657|  3.51k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  3.51k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  3.51k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.51k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  3.51k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 3.51k]
  |  |  ------------------
  ------------------
  622|  3.51k|                }
  623|  7.55k|            }
  624|  6.35k|            nodes_left--;
  625|  6.35k|        }
  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.68k|        igraph_int_t v = -1;
  630|  4.68k|        igraph_real_t maxdiff = -IGRAPH_INFINITY;
  ------------------
  |  |  137|  4.68k|#define IGRAPH_INFINITY ((double)INFINITY)
  ------------------
  631|   960k|        for (igraph_int_t u = 0; u < no_of_nodes; u++) {
  ------------------
  |  Branch (631:34): [True: 956k, False: 4.68k]
  ------------------
  632|   956k|            if (VECTOR(outdegrees)[u] < 0) {
  ------------------
  |  |   60|   956k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (632:17): [True: 870k, False: 85.8k]
  ------------------
  633|   870k|                continue;
  634|   870k|            }
  635|  85.8k|            igraph_real_t diff = VECTOR(outstrengths)[u] - VECTOR(instrengths)[u];
  ------------------
  |  |   60|  85.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          igraph_real_t diff = VECTOR(outstrengths)[u] - VECTOR(instrengths)[u];
  ------------------
  |  |   60|  85.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  636|  85.8k|            if (diff > maxdiff) {
  ------------------
  |  Branch (636:17): [True: 4.37k, False: 81.4k]
  ------------------
  637|  4.37k|                maxdiff = diff;
  638|  4.37k|                v = u;
  639|  4.37k|            }
  640|  85.8k|        }
  641|  4.68k|        if (v >= 0) {
  ------------------
  |  Branch (641:13): [True: 2.79k, False: 1.89k]
  ------------------
  642|       |            /* Remove vertex v */
  643|  2.79k|            VECTOR(ordering)[v] = order_next_pos++;
  ------------------
  |  |   60|  2.79k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  644|       |            /* Remove outgoing edges */
  645|  2.79k|            IGRAPH_CHECK(igraph_incident(graph, &neis, v, IGRAPH_OUT, IGRAPH_LOOPS));
  ------------------
  |  |  656|  2.79k|    do { \
  |  |  657|  2.79k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.79k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.79k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.79k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.79k]
  |  |  ------------------
  ------------------
  646|  2.79k|            neis_size = igraph_vector_int_size(&neis);
  647|  17.9k|            for (igraph_int_t i = 0; i < neis_size; i++) {
  ------------------
  |  Branch (647:38): [True: 15.1k, False: 2.79k]
  ------------------
  648|  15.1k|                const igraph_int_t eid = VECTOR(neis)[i];
  ------------------
  |  |   60|  15.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  649|  15.1k|                const igraph_int_t w = IGRAPH_TO(graph, eid);
  ------------------
  |  |  128|  15.1k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  15.1k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  650|  15.1k|                if (VECTOR(indegrees)[w] <= 0) {
  ------------------
  |  |   60|  15.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (650:21): [True: 3.57k, False: 11.5k]
  ------------------
  651|       |                    /* Already removed, continue */
  652|  3.57k|                    continue;
  653|  3.57k|                }
  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.36k, False: 7.19k]
  ------------------
  657|  4.36k|                    IGRAPH_CHECK(igraph_dqueue_int_push(&sources, w));
  ------------------
  |  |  656|  4.36k|    do { \
  |  |  657|  4.36k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.36k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.36k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.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|  4.36k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.36k]
  |  |  ------------------
  ------------------
  658|  4.36k|                }
  659|  11.5k|            }
  660|       |            /* Remove incoming edges */
  661|  2.79k|            IGRAPH_CHECK(igraph_incident(graph, &neis, v, IGRAPH_IN, IGRAPH_LOOPS));
  ------------------
  |  |  656|  2.79k|    do { \
  |  |  657|  2.79k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.79k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.79k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.79k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.79k]
  |  |  ------------------
  ------------------
  662|  2.79k|            neis_size = igraph_vector_int_size(&neis);
  663|  13.2k|            for (igraph_int_t i = 0; i < neis_size; i++) {
  ------------------
  |  Branch (663:38): [True: 10.4k, False: 2.79k]
  ------------------
  664|  10.4k|                const igraph_int_t eid = VECTOR(neis)[i];
  ------------------
  |  |   60|  10.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  665|  10.4k|                const igraph_int_t w = IGRAPH_FROM(graph, eid);
  ------------------
  |  |  115|  10.4k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  10.4k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  666|  10.4k|                if (VECTOR(outdegrees)[w] <= 0) {
  ------------------
  |  |   60|  10.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (666:21): [True: 3.90k, False: 6.55k]
  ------------------
  667|       |                    /* Already removed, continue */
  668|  3.90k|                    continue;
  669|  3.90k|                }
  670|  6.55k|                VECTOR(outdegrees)[w]--;
  ------------------
  |  |   60|  6.55k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  671|  6.55k|                VECTOR(outstrengths)[w] -= (weights ? VECTOR(*weights)[eid] : 1.0);
  ------------------
  |  |   60|  6.55k|#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.55k]
  ------------------
  672|  6.55k|                if (VECTOR(outdegrees)[w] == 0 && VECTOR(indegrees)[w] > 0) {
  ------------------
  |  |   60|  6.55k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              if (VECTOR(outdegrees)[w] == 0 && VECTOR(indegrees)[w] > 0) {
  ------------------
  |  |   60|  3.54k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (672:21): [True: 3.54k, False: 3.00k]
  |  Branch (672:51): [True: 1.45k, False: 2.09k]
  ------------------
  673|  1.45k|                    IGRAPH_CHECK(igraph_dqueue_int_push(&sinks, w));
  ------------------
  |  |  656|  1.45k|    do { \
  |  |  657|  1.45k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.45k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.45k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.45k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.45k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.45k]
  |  |  ------------------
  ------------------
  674|  1.45k|                }
  675|  6.55k|            }
  676|       |
  677|  2.79k|            VECTOR(outdegrees)[v] = -1;
  ------------------
  |  |   60|  2.79k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  678|  2.79k|            VECTOR(indegrees)[v] = -1;
  ------------------
  |  |   60|  2.79k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  679|  2.79k|            nodes_left--;
  680|  2.79k|        }
  681|  4.68k|    }
  682|       |
  683|  2.12k|    igraph_vector_destroy(&outstrengths);
  684|  2.12k|    igraph_vector_destroy(&instrengths);
  685|  2.12k|    igraph_vector_int_destroy(&outdegrees);
  686|  2.12k|    igraph_vector_int_destroy(&indegrees);
  687|  2.12k|    igraph_dqueue_int_destroy(&sinks);
  688|  2.12k|    igraph_dqueue_int_destroy(&sources);
  689|  2.12k|    IGRAPH_FINALLY_CLEAN(6);
  690|       |
  691|       |    /* Tidy up the ordering */
  692|   364k|    for (igraph_int_t i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (692:30): [True: 362k, False: 2.12k]
  ------------------
  693|   362k|        if (VECTOR(ordering)[i] < 0) {
  ------------------
  |  |   60|   362k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (693:13): [True: 6.35k, False: 355k]
  ------------------
  694|  6.35k|            VECTOR(ordering)[i] += no_of_nodes;
  ------------------
  |  |   60|  6.35k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  695|  6.35k|        }
  696|   362k|    }
  697|       |
  698|       |    /* Find the feedback edges based on the ordering */
  699|  2.12k|    if (result) {
  ------------------
  |  Branch (699:9): [True: 2.12k, False: 0]
  ------------------
  700|  2.12k|        igraph_vector_int_clear(result);
  701|  80.5k|        for (igraph_int_t eid = 0; eid < no_of_edges; eid++) {
  ------------------
  |  Branch (701:36): [True: 78.4k, False: 2.12k]
  ------------------
  702|  78.4k|            igraph_int_t from = IGRAPH_FROM(graph, eid);
  ------------------
  |  |  115|  78.4k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  78.4k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  703|  78.4k|            igraph_int_t to = IGRAPH_TO(graph, eid);
  ------------------
  |  |  128|  78.4k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  78.4k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  704|  78.4k|            if (from == to || VECTOR(ordering)[from] > VECTOR(ordering)[to]) {
  ------------------
  |  |   60|  66.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          if (from == to || VECTOR(ordering)[from] > VECTOR(ordering)[to]) {
  ------------------
  |  |   60|  66.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (704:17): [True: 11.6k, False: 66.7k]
  |  Branch (704:31): [True: 6.39k, False: 60.3k]
  ------------------
  705|  18.0k|                IGRAPH_CHECK(igraph_vector_int_push_back(result, eid));
  ------------------
  |  |  656|  18.0k|    do { \
  |  |  657|  18.0k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  18.0k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  18.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 18.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  18.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 18.0k]
  |  |  ------------------
  ------------------
  706|  18.0k|            }
  707|  78.4k|        }
  708|  2.12k|    }
  709|       |
  710|       |    /* If we have also requested a layering, return that as well */
  711|  2.12k|    if (layers) {
  ------------------
  |  Branch (711:9): [True: 0, False: 2.12k]
  ------------------
  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.12k|    igraph_vector_int_destroy(&neis);
  747|  2.12k|    igraph_vector_int_destroy(&ordering);
  748|  2.12k|    IGRAPH_FINALLY_CLEAN(2);
  749|       |
  750|  2.12k|    return IGRAPH_SUCCESS;
  751|  2.12k|}
feedback_sets.c:igraph_i_find_cycle:
   52|  2.12k|                                          const igraph_bitset_t *removed) {
   53|       |
   54|  2.12k|    const igraph_int_t vcount = igraph_vcount(graph);
   55|  2.12k|    const igraph_int_t ecount = igraph_ecount(graph);
   56|  2.12k|    igraph_stack_int_t stack;
   57|  2.12k|    igraph_vector_int_t inc;
   58|  2.12k|    igraph_vector_int_t vpath, epath;
   59|  2.12k|    igraph_vector_char_t seen; /* 0 = unseen, 1 = acestor of current, 2 = seen, non-ancestor */
   60|  2.12k|    igraph_int_t ea, va;
   61|  2.12k|    igraph_int_t depth;
   62|       |
   63|  2.12k|    if (vertices) {
  ------------------
  |  Branch (63:9): [True: 2.12k, False: 0]
  ------------------
   64|  2.12k|        igraph_vector_int_clear(vertices);
   65|  2.12k|    }
   66|  2.12k|    if (edges) {
  ------------------
  |  Branch (66:9): [True: 2.12k, False: 0]
  ------------------
   67|  2.12k|        igraph_vector_int_clear(edges);
   68|  2.12k|    }
   69|  2.12k|    if (found) {
  ------------------
  |  Branch (69:9): [True: 2.12k, False: 0]
  ------------------
   70|  2.12k|        *found = false;
   71|  2.12k|    }
   72|       |
   73|  2.12k|    if (ecount == 0) {
  ------------------
  |  Branch (73:9): [True: 120, False: 2.00k]
  ------------------
   74|    120|        return IGRAPH_SUCCESS;
   75|    120|    }
   76|       |
   77|  2.00k|#define PATH_PUSH(v, e) \
   78|  2.00k|    do { \
   79|  2.00k|        IGRAPH_CHECK(igraph_vector_int_push_back(&epath, e)); \
   80|  2.00k|        IGRAPH_CHECK(igraph_vector_int_push_back(&vpath, v)); \
   81|  2.00k|        VECTOR(seen)[v] = 1; \
   82|  2.00k|    } while (0)
   83|       |
   84|  2.00k|#define PATH_POP() \
   85|  2.00k|    do { \
   86|  2.00k|        igraph_vector_int_pop_back(&epath); \
   87|  2.00k|        VECTOR(seen)[igraph_vector_int_pop_back(&vpath)] = 2; \
   88|  2.00k|    } while (0)
   89|       |
   90|  2.00k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&vpath, 100);
  ------------------
  |  |  119|  2.00k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.00k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
   91|  2.00k|    igraph_vector_int_clear(&vpath);
   92|       |
   93|  2.00k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&epath, 100);
  ------------------
  |  |  119|  2.00k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.00k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
   94|  2.00k|    igraph_vector_int_clear(&epath);
   95|       |
   96|  2.00k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&inc, 10);
  ------------------
  |  |  119|  2.00k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.00k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
   97|  2.00k|    IGRAPH_VECTOR_CHAR_INIT_FINALLY(&seen, vcount);
  ------------------
  |  |  114|  2.00k|  do { IGRAPH_CHECK(igraph_vector_char_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  115|  2.00k|  IGRAPH_FINALLY(igraph_vector_char_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (115:59): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
   98|  2.00k|    IGRAPH_STACK_INT_INIT_FINALLY(&stack, 200);
  ------------------
  |  |   61|  2.00k|    do { IGRAPH_CHECK(igraph_stack_int_init(s, capacity)); \
  |  |  ------------------
  |  |  |  |  656|  2.00k|    do { \
  |  |  |  |  657|  2.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|  2.00k|        IGRAPH_FINALLY(igraph_stack_int_destroy, s); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.00k|    do { \
  |  |  |  |  604|  2.00k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.00k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.00k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.00k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.00k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (62:63): [Folded, False: 2.00k]
  |  |  ------------------
  ------------------
   99|       |
  100|   140k|    for (igraph_int_t v=0; v < vcount; v++) {
  ------------------
  |  Branch (100:28): [True: 140k, False: 677]
  ------------------
  101|   140k|        if (VECTOR(seen)[v]) {
  ------------------
  |  |   60|   140k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (101:13): [True: 5.47k, False: 134k]
  ------------------
  102|  5.47k|            continue;
  103|  5.47k|        }
  104|       |
  105|   134k|        IGRAPH_CHECK(igraph_stack_int_push(&stack, -1));
  ------------------
  |  |  656|   134k|    do { \
  |  |  657|   134k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   134k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   134k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 134k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   134k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 134k]
  |  |  ------------------
  ------------------
  106|   134k|        IGRAPH_CHECK(igraph_stack_int_push(&stack, v));
  ------------------
  |  |  656|   134k|    do { \
  |  |  657|   134k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   134k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   134k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 134k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   134k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 134k]
  |  |  ------------------
  ------------------
  107|       |
  108|   429k|        while (! igraph_stack_int_empty(&stack)) {
  ------------------
  |  Branch (108:16): [True: 296k, False: 133k]
  ------------------
  109|   296k|            igraph_int_t x = igraph_stack_int_pop(&stack);
  110|   296k|            if (x == -1) {
  ------------------
  |  Branch (110:17): [True: 141k, False: 155k]
  ------------------
  111|   141k|                PATH_POP();
  ------------------
  |  |   85|   141k|    do { \
  |  |   86|   141k|        igraph_vector_int_pop_back(&epath); \
  |  |   87|   141k|        VECTOR(seen)[igraph_vector_int_pop_back(&vpath)] = 2; \
  |  |  ------------------
  |  |  |  |   60|   141k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |   88|   141k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (88:14): [Folded, False: 141k]
  |  |  ------------------
  ------------------
  112|   141k|                continue;
  113|   155k|            } else {
  114|   155k|                va = x;
  115|   155k|                ea = igraph_stack_int_pop(&stack);
  116|       |
  117|   155k|                if (VECTOR(seen)[va] == 1) {
  ------------------
  |  |   60|   155k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (117:21): [True: 1.32k, False: 153k]
  ------------------
  118|  1.32k|                    goto finish;
  119|   153k|                } else if (VECTOR(seen)[va] == 2) {
  ------------------
  |  |   60|   153k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (119:28): [True: 1.83k, False: 152k]
  ------------------
  120|  1.83k|                    continue;
  121|  1.83k|                }
  122|   155k|            }
  123|       |
  124|   152k|            PATH_PUSH(va, ea);
  ------------------
  |  |   78|   152k|    do { \
  |  |   79|   152k|        IGRAPH_CHECK(igraph_vector_int_push_back(&epath, e)); \
  |  |  ------------------
  |  |  |  |  656|   152k|    do { \
  |  |  |  |  657|   152k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|   152k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|   152k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 152k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|   152k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 152k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   80|   152k|        IGRAPH_CHECK(igraph_vector_int_push_back(&vpath, v)); \
  |  |  ------------------
  |  |  |  |  656|   152k|    do { \
  |  |  |  |  657|   152k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|   152k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|   152k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 152k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|   152k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 152k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   81|   152k|        VECTOR(seen)[v] = 1; \
  |  |  ------------------
  |  |  |  |   60|   152k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |   82|   152k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (82:14): [Folded, False: 152k]
  |  |  ------------------
  ------------------
  125|       |
  126|   152k|            IGRAPH_CHECK(igraph_stack_int_push(&stack, -1));
  ------------------
  |  |  656|   152k|    do { \
  |  |  657|   152k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   152k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   152k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 152k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   152k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 152k]
  |  |  ------------------
  ------------------
  127|   152k|            IGRAPH_CHECK(igraph_incident(graph, &inc, va, mode, IGRAPH_LOOPS));
  ------------------
  |  |  656|   152k|    do { \
  |  |  657|   152k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   152k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   152k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 152k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   152k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 152k]
  |  |  ------------------
  ------------------
  128|   152k|            igraph_int_t n = igraph_vector_int_size(&inc);
  129|   201k|            for (igraph_int_t i=0; i < n; i++) {
  ------------------
  |  Branch (129:36): [True: 49.1k, False: 152k]
  ------------------
  130|  49.1k|                igraph_int_t eb = VECTOR(inc)[i];
  ------------------
  |  |   60|  49.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  131|  49.1k|                igraph_int_t vb = IGRAPH_OTHER(graph, eb, va);
  ------------------
  |  |  146|  49.1k|    ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|  49.1k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  49.1k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  115|  49.1k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  49.1k|#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: 49.1k, False: 0]
  |  |  ------------------
  ------------------
  132|  49.1k|                if (eb == ea) continue;
  ------------------
  |  Branch (132:21): [True: 0, False: 49.1k]
  ------------------
  133|  49.1k|                if (VECTOR(seen)[vb] == 2) continue;
  ------------------
  |  |   60|  49.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (133:21): [True: 8.45k, False: 40.6k]
  ------------------
  134|  40.6k|                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: 40.6k]
  ------------------
  135|  40.6k|                IGRAPH_CHECK(igraph_stack_int_push(&stack, eb));
  ------------------
  |  |  656|  40.6k|    do { \
  |  |  657|  40.6k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  40.6k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  40.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 40.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|  40.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 40.6k]
  |  |  ------------------
  ------------------
  136|  40.6k|                IGRAPH_CHECK(igraph_stack_int_push(&stack, vb));
  ------------------
  |  |  656|  40.6k|    do { \
  |  |  657|  40.6k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  40.6k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  40.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 40.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|  40.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 40.6k]
  |  |  ------------------
  ------------------
  137|  40.6k|            }
  138|   152k|        }
  139|   134k|    }
  140|       |
  141|       |
  142|  2.00k|finish:
  143|       |
  144|  2.00k|    igraph_stack_int_destroy(&stack);
  145|  2.00k|    igraph_vector_char_destroy(&seen);
  146|  2.00k|    igraph_vector_int_destroy(&inc);
  147|  2.00k|    IGRAPH_FINALLY_CLEAN(3);
  148|       |
  149|  2.00k|    depth = igraph_vector_int_size(&vpath);
  150|       |
  151|  2.00k|    if (depth > 0) {
  ------------------
  |  Branch (151:9): [True: 1.32k, False: 677]
  ------------------
  152|  1.32k|        igraph_int_t i = depth;
  153|  8.56k|        while (VECTOR(vpath)[i-1] != va) i--;
  ------------------
  |  |   60|  8.56k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (153:16): [True: 7.23k, False: 1.32k]
  ------------------
  154|  8.56k|        for (; i < depth; i++) {
  ------------------
  |  Branch (154:16): [True: 7.23k, False: 1.32k]
  ------------------
  155|  7.23k|            if (vertices) {
  ------------------
  |  Branch (155:17): [True: 7.23k, False: 0]
  ------------------
  156|  7.23k|                IGRAPH_CHECK(igraph_vector_int_push_back(vertices, VECTOR(vpath)[i]));
  ------------------
  |  |  656|  7.23k|    do { \
  |  |  657|  7.23k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  7.23k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  7.23k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 7.23k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  7.23k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 7.23k]
  |  |  ------------------
  ------------------
  157|  7.23k|            }
  158|  7.23k|            if (edges) {
  ------------------
  |  Branch (158:17): [True: 7.23k, False: 0]
  ------------------
  159|  7.23k|                IGRAPH_CHECK(igraph_vector_int_push_back(edges, VECTOR(epath)[i]));
  ------------------
  |  |  656|  7.23k|    do { \
  |  |  657|  7.23k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  7.23k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  7.23k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 7.23k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  7.23k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 7.23k]
  |  |  ------------------
  ------------------
  160|  7.23k|            }
  161|  7.23k|        }
  162|  1.32k|        if (vertices) {
  ------------------
  |  Branch (162:13): [True: 1.32k, False: 0]
  ------------------
  163|  1.32k|            IGRAPH_CHECK(igraph_vector_int_push_back(vertices, va));
  ------------------
  |  |  656|  1.32k|    do { \
  |  |  657|  1.32k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.32k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.32k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.32k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.32k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.32k]
  |  |  ------------------
  ------------------
  164|  1.32k|        }
  165|  1.32k|        if (edges) {
  ------------------
  |  Branch (165:13): [True: 1.32k, False: 0]
  ------------------
  166|  1.32k|            IGRAPH_CHECK(igraph_vector_int_push_back(edges, ea));
  ------------------
  |  |  656|  1.32k|    do { \
  |  |  657|  1.32k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.32k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.32k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.32k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.32k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.32k]
  |  |  ------------------
  ------------------
  167|  1.32k|        }
  168|  1.32k|        if (found) {
  ------------------
  |  Branch (168:13): [True: 1.32k, False: 0]
  ------------------
  169|  1.32k|            *found = true;
  170|  1.32k|        }
  171|  1.32k|    }
  172|       |
  173|  2.00k|    igraph_vector_int_destroy(&epath);
  174|  2.00k|    igraph_vector_int_destroy(&vpath);
  175|  2.00k|    IGRAPH_FINALLY_CLEAN(2);
  176|       |
  177|  2.00k|    return IGRAPH_SUCCESS;
  178|       |
  179|  2.00k|#undef PATH_PUSH
  180|  2.00k|#undef PATH_POP
  181|  2.00k|}

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

igraph_adjlist_init:
  155|  15.6k|                        igraph_bool_t multiple) {
  156|       |
  157|  15.6k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  158|  15.6k|    igraph_vector_int_t degrees;
  159|  15.6k|    int iter = 0;
  160|       |
  161|  15.6k|    multiple = !!multiple; /* normalize Boolean value to enable == comparisons below */
  162|       |
  163|  15.6k|    if (mode != IGRAPH_IN && mode != IGRAPH_OUT && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (163:9): [True: 9.24k, False: 6.36k]
  |  Branch (163:30): [True: 0, False: 9.24k]
  |  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|  15.6k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (167:9): [True: 0, False: 15.6k]
  ------------------
  168|      0|        mode = IGRAPH_ALL;
  169|      0|    }
  170|       |
  171|  15.6k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&degrees, no_of_nodes);
  ------------------
  |  |  119|  15.6k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  15.6k|    do { \
  |  |  |  |  657|  15.6k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  15.6k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  15.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 15.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|  15.6k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 15.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  15.6k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  15.6k|    do { \
  |  |  |  |  604|  15.6k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  15.6k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  15.6k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  15.6k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 15.6k]
  |  |  |  |  ------------------
  |  |  |  |  608|  15.6k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  15.6k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 15.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 15.6k]
  |  |  ------------------
  ------------------
  172|       |    /* igraph_degree() is fast when loops=true */
  173|  15.6k|    IGRAPH_CHECK(igraph_degree(graph, &degrees, igraph_vss_all(), mode, IGRAPH_LOOPS));
  ------------------
  |  |  656|  15.6k|    do { \
  |  |  657|  15.6k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  15.6k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  15.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 15.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|  15.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 15.6k]
  |  |  ------------------
  ------------------
  174|       |
  175|  15.6k|    al->length = no_of_nodes;
  176|  15.6k|    al->adjs = IGRAPH_CALLOC(al->length, igraph_vector_int_t);
  ------------------
  |  |   33|  15.6k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  31.2k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 15.6k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 15.6k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 15.6k, False: 4]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  177|  15.6k|    IGRAPH_CHECK_OOM(al->adjs, "Insufficient memory for creating adjacency list view.");
  ------------------
  |  |  709|  15.6k|    do { \
  |  |  710|  15.6k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  15.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 15.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  15.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 15.6k]
  |  |  ------------------
  ------------------
  178|  15.6k|    IGRAPH_FINALLY(igraph_adjlist_destroy, al);
  ------------------
  |  |  603|  15.6k|    do { \
  |  |  604|  15.6k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  15.6k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  15.6k|         * incorrect destructor function with the pointer */ \
  |  |  607|  15.6k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 15.6k]
  |  |  ------------------
  |  |  608|  15.6k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  15.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 15.6k]
  |  |  ------------------
  ------------------
  179|       |
  180|       |    /* if we already know there are no multi-edges, they don't need to be removed */
  181|  15.6k|    if (igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_MULTI) &&
  ------------------
  |  Branch (181:9): [True: 10.6k, False: 4.99k]
  ------------------
  182|  10.6k|        !igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_HAS_MULTI)) {
  ------------------
  |  Branch (182:9): [True: 7.16k, False: 3.45k]
  ------------------
  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.16k|        if (igraph_is_directed(graph) && mode == IGRAPH_ALL) {
  ------------------
  |  Branch (186:13): [True: 7.16k, False: 0]
  |  Branch (186:42): [True: 0, False: 7.16k]
  ------------------
  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.16k|        } else {
  192|  7.16k|            multiple = IGRAPH_MULTIPLE;
  193|  7.16k|        }
  194|  7.16k|    }
  195|       |
  196|       |    /* if we already know there are no loops, they don't need to be removed */
  197|  15.6k|    if (igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_LOOP) &&
  ------------------
  |  Branch (197:9): [True: 10.6k, False: 4.99k]
  ------------------
  198|  10.6k|        !igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_HAS_LOOP)) {
  ------------------
  |  Branch (198:9): [True: 7.11k, False: 3.49k]
  ------------------
  199|  7.11k|        if (mode == IGRAPH_ALL) {
  ------------------
  |  Branch (199:13): [True: 0, False: 7.11k]
  ------------------
  200|      0|            loops = IGRAPH_LOOPS_TWICE;
  201|  7.11k|        } else {
  202|  7.11k|            loops = IGRAPH_LOOPS_ONCE;
  203|  7.11k|        }
  204|  7.11k|    }
  205|       |
  206|  15.6k|    igraph_bool_t has_loops = false;
  207|  15.6k|    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.73M|    for (igraph_int_t i = 0; i < al->length; i++) {
  ------------------
  |  Branch (215:30): [True: 2.71M, False: 15.6k]
  ------------------
  216|  2.71M|        IGRAPH_ALLOW_INTERRUPTION_LIMITED(iter, 1000);
  ------------------
  |  |   71|  2.71M|    do { \
  |  |   72|  2.71M|        if (++iter >= skips) { \
  |  |  ------------------
  |  |  |  Branch (72:13): [True: 0, False: 2.71M]
  |  |  ------------------
  |  |   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.71M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (76:14): [Folded, False: 2.71M]
  |  |  ------------------
  ------------------
  217|       |
  218|  2.71M|        IGRAPH_CHECK(igraph_vector_int_init(&al->adjs[i], VECTOR(degrees)[i]));
  ------------------
  |  |  656|  2.71M|    do { \
  |  |  657|  2.71M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.71M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.71M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.71M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.71M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.71M]
  |  |  ------------------
  ------------------
  219|  2.71M|        IGRAPH_CHECK(igraph_neighbors(graph, &al->adjs[i], i, mode, IGRAPH_LOOPS, IGRAPH_MULTIPLE));
  ------------------
  |  |  656|  2.71M|    do { \
  |  |  657|  2.71M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.71M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.71M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.71M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.71M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.71M]
  |  |  ------------------
  ------------------
  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.71M|        IGRAPH_CHECK(igraph_i_simplify_sorted_int_adjacency_vector_in_place(
  ------------------
  |  |  656|  2.71M|    do { \
  |  |  657|  2.71M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.71M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.71M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.71M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.71M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.71M]
  |  |  ------------------
  ------------------
  224|  2.71M|            &al->adjs[i], i, mode, loops, multiple, &has_loops, &has_multiple
  225|  2.71M|        ));
  226|  2.71M|    }
  227|  15.6k|    if (has_loops) {
  ------------------
  |  Branch (227:9): [True: 0, False: 15.6k]
  ------------------
  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|  15.6k|    } else if (loops == IGRAPH_NO_LOOPS) {
  ------------------
  |  Branch (230:16): [True: 0, False: 15.6k]
  ------------------
  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|  15.6k|    if (has_multiple) {
  ------------------
  |  Branch (237:9): [True: 0, False: 15.6k]
  ------------------
  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|  15.6k|    } else if (multiple == IGRAPH_NO_MULTIPLE) {
  ------------------
  |  Branch (244:16): [True: 0, False: 15.6k]
  ------------------
  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|  15.6k|    igraph_vector_int_destroy(&degrees);
  253|  15.6k|    IGRAPH_FINALLY_CLEAN(2); /* + igraph_adjlist_destroy */
  254|       |
  255|  15.6k|    return IGRAPH_SUCCESS;
  256|  15.6k|}
igraph_adjlist_destroy:
  475|  15.6k|void igraph_adjlist_destroy(igraph_adjlist_t *al) {
  476|  2.73M|    for (igraph_int_t i = 0; i < al->length; i++) {
  ------------------
  |  Branch (476:30): [True: 2.71M, False: 15.6k]
  ------------------
  477|       |        /* This works if some igraph_vector_int_t's contain NULL,
  478|       |           because igraph_vector_int_destroy can handle this. */
  479|  2.71M|        igraph_vector_int_destroy(&al->adjs[i]);
  480|  2.71M|    }
  481|       |    IGRAPH_FREE(al->adjs);
  ------------------
  |  |   36|  15.6k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  482|  15.6k|}
igraph_adjlist_has_edge:
  626|  64.0k|        igraph_bool_t directed) {
  627|       |
  628|  64.0k|    const igraph_vector_int_t *fromvec;
  629|  64.0k|    ADJLIST_CANON_EDGE(from, to, directed);
  ------------------
  |  |  603|  64.0k|    do {                     \
  |  |  604|  64.0k|        igraph_int_t temp;         \
  |  |  605|  64.0k|        if ((!directed) && from < to) {     \
  |  |  ------------------
  |  |  |  Branch (605:13): [True: 0, False: 64.0k]
  |  |  |  Branch (605:28): [True: 0, False: 0]
  |  |  ------------------
  |  |  606|      0|            temp = to;               \
  |  |  607|      0|            to = from;               \
  |  |  608|      0|            from = temp;             \
  |  |  609|      0|        }                      \
  |  |  610|  64.0k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (610:14): [Folded, False: 64.0k]
  |  |  ------------------
  ------------------
  630|  64.0k|    fromvec = igraph_adjlist_get(al, from);
  ------------------
  |  |   73|  64.0k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  631|  64.0k|    return igraph_vector_int_contains_sorted(fromvec, to);
  632|  64.0k|}
igraph_adjlist_replace_edge:
  637|  61.7k|        igraph_bool_t directed) {
  638|       |
  639|  61.7k|    igraph_vector_int_t *oldfromvec, *newfromvec;
  640|  61.7k|    igraph_bool_t found_old, found_new;
  641|  61.7k|    igraph_int_t oldpos, newpos;
  642|  61.7k|    igraph_int_t oldfrom = from, newfrom = from;
  643|       |
  644|  61.7k|    ADJLIST_CANON_EDGE(oldfrom, oldto, directed);
  ------------------
  |  |  603|  61.7k|    do {                     \
  |  |  604|  61.7k|        igraph_int_t temp;         \
  |  |  605|  61.7k|        if ((!directed) && from < to) {     \
  |  |  ------------------
  |  |  |  Branch (605:13): [True: 0, False: 61.7k]
  |  |  |  Branch (605:28): [True: 0, False: 0]
  |  |  ------------------
  |  |  606|      0|            temp = to;               \
  |  |  607|      0|            to = from;               \
  |  |  608|      0|            from = temp;             \
  |  |  609|      0|        }                      \
  |  |  610|  61.7k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (610:14): [Folded, False: 61.7k]
  |  |  ------------------
  ------------------
  645|  61.7k|    ADJLIST_CANON_EDGE(newfrom, newto, directed);
  ------------------
  |  |  603|  61.7k|    do {                     \
  |  |  604|  61.7k|        igraph_int_t temp;         \
  |  |  605|  61.7k|        if ((!directed) && from < to) {     \
  |  |  ------------------
  |  |  |  Branch (605:13): [True: 0, False: 61.7k]
  |  |  |  Branch (605:28): [True: 0, False: 0]
  |  |  ------------------
  |  |  606|      0|            temp = to;               \
  |  |  607|      0|            to = from;               \
  |  |  608|      0|            from = temp;             \
  |  |  609|      0|        }                      \
  |  |  610|  61.7k|    } while (0);
  |  |  ------------------
  |  |  |  Branch (610:14): [Folded, False: 61.7k]
  |  |  ------------------
  ------------------
  646|       |
  647|  61.7k|    oldfromvec = igraph_adjlist_get(al, oldfrom);
  ------------------
  |  |   73|  61.7k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  648|  61.7k|    newfromvec = igraph_adjlist_get(al, newfrom);
  ------------------
  |  |   73|  61.7k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  649|       |
  650|       |    /* oldfrom -> oldto should exist; newfrom -> newto should not. */
  651|  61.7k|    found_old = igraph_vector_int_binsearch(oldfromvec, oldto, &oldpos);
  652|  61.7k|    if (! found_old) {
  ------------------
  |  Branch (652:9): [True: 0, False: 61.7k]
  ------------------
  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|  61.7k|    found_new = igraph_vector_int_binsearch(newfromvec, newto, &newpos);
  656|  61.7k|    if (found_new) {
  ------------------
  |  Branch (656:9): [True: 0, False: 61.7k]
  ------------------
  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|  61.7k|    if (oldfromvec != newfromvec) {
  ------------------
  |  Branch (660:9): [True: 0, False: 61.7k]
  ------------------
  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|  61.7k|    } else {
  667|       |        /* moving item within the same vector; here we can safely remove first
  668|       |         * and insert afterwards because there is no need to re-allocate memory */
  669|  61.7k|        igraph_vector_int_remove(oldfromvec, oldpos);
  670|  61.7k|        if (oldpos < newpos) {
  ------------------
  |  Branch (670:13): [True: 30.8k, False: 30.8k]
  ------------------
  671|  30.8k|            --newpos;
  672|  30.8k|        }
  673|  61.7k|        IGRAPH_CHECK(igraph_vector_int_insert(newfromvec, newpos, newto));
  ------------------
  |  |  656|  61.7k|    do { \
  |  |  657|  61.7k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  61.7k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  61.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 61.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|  61.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 61.7k]
  |  |  ------------------
  ------------------
  674|  61.7k|    }
  675|       |
  676|  61.7k|    return IGRAPH_SUCCESS;
  677|       |
  678|  61.7k|}
igraph_inclist_init:
  746|    977|                        igraph_loops_t loops) {
  747|    977|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  748|    977|    igraph_vector_int_t degrees;
  749|    977|    int iter = 0;
  750|       |
  751|    977|    if (mode != IGRAPH_IN && mode != IGRAPH_OUT && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (751:9): [True: 977, False: 0]
  |  Branch (751:30): [True: 0, False: 977]
  |  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|    977|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (755:9): [True: 0, False: 977]
  ------------------
  756|      0|        mode = IGRAPH_ALL;
  757|      0|    }
  758|       |
  759|    977|    IGRAPH_VECTOR_INT_INIT_FINALLY(&degrees, no_of_nodes);
  ------------------
  |  |  119|    977|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    977|    do { \
  |  |  |  |  657|    977|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    977|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    977|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 977]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    977|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 977]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|    977|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    977|    do { \
  |  |  |  |  604|    977|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    977|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    977|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    977|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 977]
  |  |  |  |  ------------------
  |  |  |  |  608|    977|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    977|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 977]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 977]
  |  |  ------------------
  ------------------
  760|       |    /* igraph_degrees() is fast when loops=true */
  761|    977|    IGRAPH_CHECK(igraph_degree(graph, &degrees, igraph_vss_all(), mode, IGRAPH_LOOPS));
  ------------------
  |  |  656|    977|    do { \
  |  |  657|    977|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    977|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    977|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 977]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    977|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 977]
  |  |  ------------------
  ------------------
  762|       |
  763|    977|    il->length = no_of_nodes;
  764|    977|    il->incs = IGRAPH_CALLOC(il->length, igraph_vector_int_t);
  ------------------
  |  |   33|    977|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  1.95k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 977, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 977, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 977, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  765|    977|    if (il->incs == 0) {
  ------------------
  |  Branch (765:9): [True: 0, False: 977]
  ------------------
  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|    977|    IGRAPH_FINALLY(igraph_inclist_destroy, il);
  ------------------
  |  |  603|    977|    do { \
  |  |  604|    977|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    977|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    977|         * incorrect destructor function with the pointer */ \
  |  |  607|    977|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 977]
  |  |  ------------------
  |  |  608|    977|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    977|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 977]
  |  |  ------------------
  ------------------
  770|   140k|    for (igraph_int_t i = 0; i < il->length; i++) {
  ------------------
  |  Branch (770:30): [True: 139k, False: 977]
  ------------------
  771|   139k|        IGRAPH_ALLOW_INTERRUPTION_LIMITED(iter, 1000);
  ------------------
  |  |   71|   139k|    do { \
  |  |   72|   139k|        if (++iter >= skips) { \
  |  |  ------------------
  |  |  |  Branch (72:13): [True: 0, False: 139k]
  |  |  ------------------
  |  |   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|   139k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (76:14): [Folded, False: 139k]
  |  |  ------------------
  ------------------
  772|       |
  773|   139k|        IGRAPH_CHECK(igraph_vector_int_init(&il->incs[i], VECTOR(degrees)[i]));
  ------------------
  |  |  656|   139k|    do { \
  |  |  657|   139k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   139k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   139k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 139k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   139k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 139k]
  |  |  ------------------
  ------------------
  774|   139k|        IGRAPH_CHECK(igraph_incident(graph, &il->incs[i], i, mode, loops));
  ------------------
  |  |  656|   139k|    do { \
  |  |  657|   139k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   139k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   139k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 139k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   139k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 139k]
  |  |  ------------------
  ------------------
  775|   139k|    }
  776|       |
  777|    977|    igraph_vector_int_destroy(&degrees);
  778|    977|    IGRAPH_FINALLY_CLEAN(2); /* + igraph_inclist_destroy */
  779|       |
  780|    977|    return IGRAPH_SUCCESS;
  781|    977|}
igraph_inclist_destroy:
  825|    977|void igraph_inclist_destroy(igraph_inclist_t *il) {
  826|   140k|    for (igraph_int_t i = 0; i < il->length; i++) {
  ------------------
  |  Branch (826:30): [True: 139k, False: 977]
  ------------------
  827|       |        /* This works if some igraph_vector_int_t's contain NULL,
  828|       |           because igraph_vector_int_destroy can handle this. */
  829|   139k|        igraph_vector_int_destroy(&il->incs[i]);
  830|   139k|    }
  831|       |    IGRAPH_FREE(il->incs);
  ------------------
  |  |   36|    977|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  832|    977|}
igraph_lazy_adjlist_init:
 1070|  14.8k|                             igraph_bool_t multiple) {
 1071|  14.8k|    if (mode != IGRAPH_IN && mode != IGRAPH_OUT && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (1071:9): [True: 12.7k, False: 2.12k]
  |  Branch (1071:30): [True: 0, False: 12.7k]
  |  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|  14.8k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (1075:9): [True: 0, False: 14.8k]
  ------------------
 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|  14.8k|    if (igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_MULTI) &&
  ------------------
  |  Branch (1080:9): [True: 10.6k, False: 4.24k]
  ------------------
 1081|  10.6k|        !igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_HAS_MULTI)) {
  ------------------
  |  Branch (1081:9): [True: 7.16k, False: 3.45k]
  ------------------
 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.16k|        if (igraph_is_directed(graph) && mode == IGRAPH_ALL) {
  ------------------
  |  Branch (1085:13): [True: 7.16k, False: 0]
  |  Branch (1085:42): [True: 0, False: 7.16k]
  ------------------
 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.16k|        } else {
 1091|  7.16k|            multiple = IGRAPH_MULTIPLE;
 1092|  7.16k|        }
 1093|  7.16k|    }
 1094|       |
 1095|       |    /* if we already know there are no loops, they don't need to be removed */
 1096|  14.8k|    if (igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_LOOP) &&
  ------------------
  |  Branch (1096:9): [True: 11.3k, False: 3.54k]
  ------------------
 1097|  11.3k|        !igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_HAS_LOOP)) {
  ------------------
  |  Branch (1097:9): [True: 7.11k, False: 4.19k]
  ------------------
 1098|  7.11k|        if (mode == IGRAPH_ALL) {
  ------------------
  |  Branch (1098:13): [True: 0, False: 7.11k]
  ------------------
 1099|      0|            loops = IGRAPH_LOOPS_TWICE;
 1100|  7.11k|        } else {
 1101|  7.11k|            loops = IGRAPH_LOOPS_ONCE;
 1102|  7.11k|        }
 1103|  7.11k|    }
 1104|       |
 1105|  14.8k|    al->mode = mode;
 1106|  14.8k|    al->loops = loops;
 1107|  14.8k|    al->multiple = multiple;
 1108|  14.8k|    al->graph = graph;
 1109|       |
 1110|  14.8k|    al->length = igraph_vcount(graph);
 1111|  14.8k|    al->adjs = IGRAPH_CALLOC(al->length, igraph_vector_int_t*);
  ------------------
  |  |   33|  14.8k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  29.7k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 14.8k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 14.8k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 14.8k, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1112|  14.8k|    IGRAPH_CHECK_OOM(al->adjs, "Insufficient memory for creating lazy adjacency list view.");
  ------------------
  |  |  709|  14.8k|    do { \
  |  |  710|  14.8k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  14.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 14.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  14.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 14.8k]
  |  |  ------------------
  ------------------
 1113|       |
 1114|  14.8k|    return IGRAPH_SUCCESS;
 1115|  14.8k|}
igraph_lazy_adjlist_destroy:
 1127|  14.8k|void igraph_lazy_adjlist_destroy(igraph_lazy_adjlist_t *al) {
 1128|  14.8k|    igraph_lazy_adjlist_clear(al);
 1129|       |    IGRAPH_FREE(al->adjs);
  ------------------
  |  |   36|  14.8k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1130|  14.8k|}
igraph_lazy_adjlist_clear:
 1140|  14.8k|void igraph_lazy_adjlist_clear(igraph_lazy_adjlist_t *al) {
 1141|  14.8k|    igraph_int_t i, n = al->length;
 1142|  2.55M|    for (i = 0; i < n; i++) {
  ------------------
  |  Branch (1142:17): [True: 2.53M, False: 14.8k]
  ------------------
 1143|  2.53M|        if (al->adjs[i] != 0) {
  ------------------
  |  Branch (1143:13): [True: 891k, False: 1.64M]
  ------------------
 1144|   891k|            igraph_vector_int_destroy(al->adjs[i]);
 1145|       |            IGRAPH_FREE(al->adjs[i]);
  ------------------
  |  |   36|   891k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1146|   891k|        }
 1147|  2.53M|    }
 1148|  14.8k|}
igraph_i_lazy_adjlist_get_real:
 1163|   891k|igraph_vector_int_t *igraph_i_lazy_adjlist_get_real(igraph_lazy_adjlist_t *al, igraph_int_t no) {
 1164|   891k|    igraph_error_t ret;
 1165|       |
 1166|   891k|    if (al->adjs[no] == NULL) {
  ------------------
  |  Branch (1166:9): [True: 891k, False: 0]
  ------------------
 1167|   891k|        al->adjs[no] = IGRAPH_CALLOC(1, igraph_vector_int_t);
  ------------------
  |  |   33|   891k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  1.78M|    (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: 891k, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1168|   891k|        if (al->adjs[no] == NULL) {
  ------------------
  |  Branch (1168:13): [True: 0, False: 891k]
  ------------------
 1169|      0|            return NULL;
 1170|      0|        }
 1171|       |
 1172|   891k|        ret = igraph_vector_int_init(al->adjs[no], 0);
 1173|   891k|        if (ret != IGRAPH_SUCCESS) {
  ------------------
  |  Branch (1173:13): [True: 0, False: 891k]
  ------------------
 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|   891k|        ret = igraph_neighbors(al->graph, al->adjs[no], no, al->mode, al->loops, al->multiple);
 1179|   891k|        if (ret != IGRAPH_SUCCESS) {
  ------------------
  |  Branch (1179:13): [True: 0, False: 891k]
  ------------------
 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|   891k|    }
 1185|       |
 1186|   891k|    return al->adjs[no];
 1187|   891k|}
igraph_lazy_inclist_init:
 1232|  2.12k|                             igraph_loops_t loops) {
 1233|       |
 1234|  2.12k|    if (mode != IGRAPH_IN && mode != IGRAPH_OUT && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (1234:9): [True: 2.12k, False: 0]
  |  Branch (1234:30): [True: 0, False: 2.12k]
  |  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.12k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (1238:9): [True: 0, False: 2.12k]
  ------------------
 1239|      0|        mode = IGRAPH_ALL;
 1240|      0|    }
 1241|       |
 1242|  2.12k|    il->graph = graph;
 1243|  2.12k|    il->loops = loops;
 1244|  2.12k|    il->mode = mode;
 1245|       |
 1246|  2.12k|    il->length = igraph_vcount(graph);
 1247|  2.12k|    il->incs = IGRAPH_CALLOC(il->length, igraph_vector_int_t*);
  ------------------
  |  |   33|  2.12k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  4.24k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 2.12k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 2.12k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 2.12k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1248|  2.12k|    if (il->incs == 0) {
  ------------------
  |  Branch (1248:9): [True: 0, False: 2.12k]
  ------------------
 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.12k|    return IGRAPH_SUCCESS;
 1253|       |
 1254|  2.12k|}
igraph_lazy_inclist_destroy:
 1267|  2.12k|void igraph_lazy_inclist_destroy(igraph_lazy_inclist_t *il) {
 1268|  2.12k|    igraph_lazy_inclist_clear(il);
 1269|       |    IGRAPH_FREE(il->incs);
  ------------------
  |  |   36|  2.12k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1270|  2.12k|}
igraph_lazy_inclist_clear:
 1281|  2.12k|void igraph_lazy_inclist_clear(igraph_lazy_inclist_t *il) {
 1282|  2.12k|    igraph_int_t i, n = il->length;
 1283|   364k|    for (i = 0; i < n; i++) {
  ------------------
  |  Branch (1283:17): [True: 362k, False: 2.12k]
  ------------------
 1284|   362k|        if (il->incs[i] != 0) {
  ------------------
  |  Branch (1284:13): [True: 40.5k, False: 321k]
  ------------------
 1285|  40.5k|            igraph_vector_int_destroy(il->incs[i]);
 1286|       |            IGRAPH_FREE(il->incs[i]);
  ------------------
  |  |   36|  40.5k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1287|  40.5k|        }
 1288|   362k|    }
 1289|  2.12k|}
igraph_i_lazy_inclist_get_real:
 1304|  40.5k|igraph_vector_int_t *igraph_i_lazy_inclist_get_real(igraph_lazy_inclist_t *il, igraph_int_t no) {
 1305|  40.5k|    igraph_error_t ret;
 1306|       |
 1307|  40.5k|    if (il->incs[no] == NULL) {
  ------------------
  |  Branch (1307:9): [True: 40.5k, False: 0]
  ------------------
 1308|  40.5k|        il->incs[no] = IGRAPH_CALLOC(1, igraph_vector_int_t);
  ------------------
  |  |   33|  40.5k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  81.1k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 0, Folded]
  |  |  |  |  |  Branch (31:24): [True: 0, Folded]
  |  |  |  |  |  Branch (31:66): [True: 40.5k, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1309|  40.5k|        if (il->incs[no] == NULL) {
  ------------------
  |  Branch (1309:13): [True: 0, False: 40.5k]
  ------------------
 1310|      0|            return NULL;
 1311|      0|        }
 1312|       |
 1313|  40.5k|        ret = igraph_vector_int_init(il->incs[no], 0);
 1314|  40.5k|        if (ret != IGRAPH_SUCCESS) {
  ------------------
  |  Branch (1314:13): [True: 0, False: 40.5k]
  ------------------
 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|  40.5k|        ret = igraph_incident(il->graph, il->incs[no], no, il->mode, il->loops);
 1320|  40.5k|        if (ret != IGRAPH_SUCCESS) {
  ------------------
  |  Branch (1320:13): [True: 0, False: 40.5k]
  ------------------
 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|  40.5k|    }
 1326|       |
 1327|  40.5k|    return il->incs[no];
 1328|  40.5k|}
adjlist.c:igraph_i_simplify_sorted_int_adjacency_vector_in_place:
  871|  2.71M|) {
  872|  2.71M|    igraph_bool_t dummy1 = true, dummy2 = true; /* set dummies to avoid uninitialized read */
  873|  2.71M|    if (has_loops == NULL) {
  ------------------
  |  Branch (873:9): [True: 0, False: 2.71M]
  ------------------
  874|      0|        has_loops = &dummy1;
  875|      0|    }
  876|  2.71M|    if (has_multiple == NULL) {
  ------------------
  |  Branch (876:9): [True: 0, False: 2.71M]
  ------------------
  877|      0|        has_multiple = &dummy2;
  878|      0|    }
  879|       |
  880|  2.71M|    igraph_int_t i, p = 0;
  881|  2.71M|    igraph_int_t n = igraph_vector_int_size(v);
  882|       |
  883|  2.71M|    multiple = !!multiple; /* normalize Boolean value to enable == comparisons below */
  884|       |
  885|  2.71M|    if (
  886|  2.71M|        multiple == IGRAPH_MULTIPLE &&
  ------------------
  |  Branch (886:9): [True: 2.71M, False: 0]
  ------------------
  887|  2.71M|        (
  888|  2.71M|            loops == IGRAPH_LOOPS_TWICE ||
  ------------------
  |  Branch (888:13): [True: 102k, False: 2.61M]
  ------------------
  889|  2.61M|            (loops == IGRAPH_LOOPS_ONCE && (mode == IGRAPH_IN || mode == IGRAPH_OUT))
  ------------------
  |  Branch (889:14): [True: 2.61M, False: 0]
  |  Branch (889:45): [True: 1.08M, False: 1.52M]
  |  Branch (889:66): [True: 1.52M, False: 0]
  ------------------
  890|  2.71M|        )
  891|  2.71M|    ) {
  892|       |        /* nothing to simplify */
  893|  2.71M|        return IGRAPH_SUCCESS;
  894|  2.71M|    }
  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|  21.4k|) {
  618|  21.4k|    graph->attr = NULL;
  619|  21.4k|    if (igraph_i_attribute_table) {
  ------------------
  |  Branch (619:9): [True: 0, False: 21.4k]
  ------------------
  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|  21.4k|    return IGRAPH_SUCCESS;
  626|  21.4k|}
igraph_i_attribute_destroy:
  628|  27.1k|void igraph_i_attribute_destroy(igraph_t *graph) {
  629|  27.1k|    if (graph->attr && igraph_i_attribute_table) {
  ------------------
  |  Branch (629:9): [True: 0, False: 27.1k]
  |  Branch (629:24): [True: 0, False: 0]
  ------------------
  630|      0|        igraph_i_attribute_table->destroy(graph);
  631|      0|    }
  632|       |    graph->attr = NULL;
  633|  27.1k|}
igraph_i_attribute_copy:
  636|  3.51k|                            igraph_bool_t va, igraph_bool_t ea) {
  637|  3.51k|    igraph_i_attribute_destroy(to);
  638|  3.51k|    if (from->attr && igraph_i_attribute_table) {
  ------------------
  |  Branch (638:9): [True: 0, False: 3.51k]
  |  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.51k|    return IGRAPH_SUCCESS;
  645|  3.51k|}
igraph_i_attribute_permute_vertices:
  659|    599|                                        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|    599|    if (igraph_i_attribute_table) {
  ------------------
  |  Branch (663:9): [True: 0, False: 599]
  ------------------
  664|      0|        return igraph_i_attribute_table->permute_vertices(graph, newgraph, idx);
  665|    599|    } else {
  666|    599|        return IGRAPH_SUCCESS;
  667|    599|    }
  668|    599|}
igraph_i_attribute_permute_edges:
  700|    599|                                     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|    599|    if (igraph_i_attribute_table) {
  ------------------
  |  Branch (704:9): [True: 0, False: 599]
  ------------------
  705|      0|        return igraph_i_attribute_table->permute_edges(graph, newgraph, idx);
  706|    599|    } else {
  707|    599|        return IGRAPH_SUCCESS;
  708|    599|    }
  709|    599|}

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

igraph_i_property_cache_init:
   32|  23.6k|igraph_error_t igraph_i_property_cache_init(igraph_i_property_cache_t *cache) {
   33|  23.6k|    IGRAPH_STATIC_ASSERT(IGRAPH_PROP_I_SIZE <= 32);
  ------------------
  |  |   68|  23.6k|#define IGRAPH_STATIC_ASSERT(condition) ((void)sizeof(char[1 - 2*!(condition)]))
  ------------------
   34|       |
   35|  23.6k|    memset(cache->value, 0, sizeof(cache->value));
   36|  23.6k|    cache->known = 0;
   37|  23.6k|    return IGRAPH_SUCCESS;
   38|  23.6k|}
igraph_i_property_cache_copy:
   45|     49|        const igraph_i_property_cache_t *other_cache) {
   46|     49|    *cache = *other_cache;
   47|     49|    return IGRAPH_SUCCESS;
   48|     49|}
igraph_i_property_cache_destroy:
   53|  23.6k|void igraph_i_property_cache_destroy(igraph_i_property_cache_t *cache) {
   54|  23.6k|    IGRAPH_UNUSED(cache);
  ------------------
  |  |   30|  23.6k|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
   55|       |    /* Nothing to do */
   56|  23.6k|}
igraph_i_property_cache_get_bool:
   72|  63.5k|igraph_bool_t igraph_i_property_cache_get_bool(const igraph_t *graph, igraph_cached_property_t prop) {
   73|  63.5k|    IGRAPH_ASSERT(prop >= 0 && prop < IGRAPH_PROP_I_SIZE);
  ------------------
  |  |  924|  63.5k|    do { \
  |  |  925|  63.5k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   127k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 63.5k]
  |  |  |  |  |  Branch (612:52): [True: 63.5k, False: 0]
  |  |  |  |  |  Branch (612:52): [True: 63.5k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  63.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 63.5k]
  |  |  ------------------
  ------------------
   74|  63.5k|    assert(graph->cache != NULL);
  ------------------
  |  Branch (74:5): [True: 0, False: 63.5k]
  |  Branch (74:5): [True: 63.5k, False: 0]
  ------------------
   75|  63.5k|    return graph->cache->value[prop];
   76|  63.5k|}
igraph_i_property_cache_has:
   84|  90.3k|igraph_bool_t igraph_i_property_cache_has(const igraph_t *graph, igraph_cached_property_t prop) {
   85|  90.3k|    IGRAPH_ASSERT(prop >= 0 && prop < IGRAPH_PROP_I_SIZE);
  ------------------
  |  |  924|  90.3k|    do { \
  |  |  925|  90.3k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   180k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 90.3k]
  |  |  |  |  |  Branch (612:52): [True: 90.3k, False: 0]
  |  |  |  |  |  Branch (612:52): [True: 90.3k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  90.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 90.3k]
  |  |  ------------------
  ------------------
   86|  90.3k|    assert(graph->cache != NULL);
  ------------------
  |  Branch (86:5): [True: 0, False: 90.3k]
  |  Branch (86:5): [True: 90.3k, False: 0]
  ------------------
   87|  90.3k|    return graph->cache->known & (1 << prop);
   88|  90.3k|}
igraph_i_property_cache_set_bool:
   97|  12.3k|void igraph_i_property_cache_set_bool(const igraph_t *graph, igraph_cached_property_t prop, igraph_bool_t value) {
   98|  12.3k|    IGRAPH_ASSERT(prop >= 0 && prop < IGRAPH_PROP_I_SIZE);
  ------------------
  |  |  924|  12.3k|    do { \
  |  |  925|  12.3k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  24.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 12.3k]
  |  |  |  |  |  Branch (612:52): [True: 12.3k, False: 0]
  |  |  |  |  |  Branch (612:52): [True: 12.3k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  12.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 12.3k]
  |  |  ------------------
  ------------------
   99|  12.3k|    assert(graph->cache != NULL);
  ------------------
  |  Branch (99:5): [True: 0, False: 12.3k]
  |  Branch (99:5): [True: 12.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|  12.3k|    graph->cache->value[prop] = value;
  104|  12.3k|    graph->cache->known |= (1 << prop);
  105|  12.3k|}
igraph_i_property_cache_set_bool_checked:
  123|  13.8k|void igraph_i_property_cache_set_bool_checked(const igraph_t *graph, igraph_cached_property_t prop, igraph_bool_t value) {
  124|  13.8k|    IGRAPH_ASSERT(prop >= 0 && prop < IGRAPH_PROP_I_SIZE);
  ------------------
  |  |  924|  13.8k|    do { \
  |  |  925|  13.8k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  27.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 13.8k]
  |  |  |  |  |  Branch (612:52): [True: 13.8k, False: 0]
  |  |  |  |  |  Branch (612:52): [True: 13.8k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  125|  13.8k|    assert(graph->cache != NULL);
  ------------------
  |  Branch (125:5): [True: 0, False: 13.8k]
  |  Branch (125:5): [True: 13.8k, 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|  13.8k|    if (graph->cache->known & (1 << prop)) {
  ------------------
  |  Branch (129:9): [True: 1.52k, False: 12.3k]
  ------------------
  130|  1.52k|        IGRAPH_ASSERT(graph->cache->value[prop] == value);
  ------------------
  |  |  924|  1.52k|    do { \
  |  |  925|  1.52k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.52k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.52k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.52k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.52k]
  |  |  ------------------
  ------------------
  131|  12.3k|    } else {
  132|  12.3k|        igraph_i_property_cache_set_bool(graph, prop, value);
  133|  12.3k|    }
  134|  13.8k|}
igraph_i_property_cache_invalidate_conditionally:
  182|  55.6k|) {
  183|  55.6k|    uint32_t invalidate = ~keep_always;
  184|  55.6k|    uint32_t mask;
  185|  55.6k|    uint32_t maybe_keep;
  186|  55.6k|    igraph_bool_t cached_value;
  187|       |
  188|  55.6k|    assert(graph->cache != NULL);
  ------------------
  |  Branch (188:5): [True: 0, False: 55.6k]
  |  Branch (188:5): [True: 55.6k, 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|  55.6k|    maybe_keep = graph->cache->known & invalidate & (keep_when_false | keep_when_true);
  197|       |
  198|  55.6k|    if (maybe_keep) {
  ------------------
  |  Branch (198:9): [True: 1.70k, False: 53.9k]
  ------------------
  199|  13.6k|        for (igraph_cached_property_t prop = (igraph_cached_property_t ) 0; prop < IGRAPH_PROP_I_SIZE; ++prop) {
  ------------------
  |  Branch (199:77): [True: 11.9k, False: 1.70k]
  ------------------
  200|  11.9k|            mask = 1 << prop;
  201|  11.9k|            if (maybe_keep & mask) {
  ------------------
  |  Branch (201:17): [True: 4.13k, False: 7.76k]
  ------------------
  202|       |                /* if we get here, we know that the property is cached; we have
  203|       |                 * masked maybe_keep with graph->cache->known */
  204|  4.13k|                cached_value = igraph_i_property_cache_get_bool(graph, prop);
  205|  4.13k|                if (
  206|  4.13k|                    ((keep_when_false & mask) && !cached_value) ||
  ------------------
  |  Branch (206:22): [True: 3.86k, False: 274]
  |  Branch (206:50): [True: 3.49k, False: 374]
  ------------------
  207|    648|                    ((keep_when_true & mask) && cached_value)
  ------------------
  |  Branch (207:22): [True: 274, False: 374]
  |  Branch (207:49): [True: 0, False: 274]
  ------------------
  208|  4.13k|                ) {
  209|  3.49k|                    invalidate &= ~mask;
  210|  3.49k|                }
  211|  4.13k|            }
  212|  11.9k|        }
  213|  1.70k|    }
  214|       |
  215|  55.6k|    graph->cache->known &= ~invalidate;
  216|  55.6k|}

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

igraph_vss_all:
  115|  50.1k|igraph_vs_t igraph_vss_all(void) {
  116|  50.1k|    igraph_vs_t allvs;
  117|  50.1k|    allvs.type = IGRAPH_VS_ALL;
  118|  50.1k|    return allvs;
  119|  50.1k|}
igraph_vss_1:
  292|  14.0k|igraph_vs_t igraph_vss_1(igraph_int_t vid) {
  293|  14.0k|    igraph_vs_t onevs;
  294|  14.0k|    onevs.type = IGRAPH_VS_1;
  295|  14.0k|    onevs.data.vid = vid;
  296|  14.0k|    return onevs;
  297|  14.0k|}
igraph_vss_vector:
  344|    697|igraph_vs_t igraph_vss_vector(const igraph_vector_int_t *v) {
  345|    697|    igraph_vs_t vecvs;
  346|    697|    vecvs.type = IGRAPH_VS_VECTORPTR;
  347|    697|    vecvs.data.vecptr = v;
  348|    697|    return vecvs;
  349|    697|}
igraph_vs_is_all:
  544|  5.00k|igraph_bool_t igraph_vs_is_all(const igraph_vs_t *vs) {
  545|  5.00k|    return vs->type == IGRAPH_VS_ALL;
  546|  5.00k|}
igraph_vs_size:
  611|    648|                   igraph_int_t *result) {
  612|    648|    igraph_vector_int_t vec;
  613|    648|    igraph_bool_t *seen;
  614|    648|    igraph_int_t i;
  615|    648|    igraph_int_t vec_len;
  616|       |
  617|    648|    switch (vs->type) {
  ------------------
  |  Branch (617:13): [True: 648, False: 0]
  ------------------
  618|      0|    case IGRAPH_VS_NONE:
  ------------------
  |  Branch (618:5): [True: 0, False: 648]
  ------------------
  619|      0|        *result = 0; return IGRAPH_SUCCESS;
  620|       |
  621|      0|    case IGRAPH_VS_1:
  ------------------
  |  Branch (621:5): [True: 0, False: 648]
  ------------------
  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: 648]
  ------------------
  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: 648]
  ------------------
  633|      0|        *result = igraph_vcount(graph); return IGRAPH_SUCCESS;
  634|       |
  635|      0|    case IGRAPH_VS_ADJ:
  ------------------
  |  Branch (635:5): [True: 0, False: 648]
  ------------------
  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: 648]
  ------------------
  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: 648]
  ------------------
  669|    648|    case IGRAPH_VS_VECTORPTR:
  ------------------
  |  Branch (669:5): [True: 648, False: 0]
  ------------------
  670|    648|        *result = igraph_vector_int_size(vs->data.vecptr);
  671|    648|        return IGRAPH_SUCCESS;
  672|    648|    }
  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|  62.7k|igraph_error_t igraph_vit_create(const igraph_t *graph, igraph_vs_t vs, igraph_vit_t *vit) {
  713|  62.7k|    igraph_vector_int_t vec;
  714|  62.7k|    igraph_vector_int_t *vec_int;
  715|  62.7k|    igraph_bool_t *seen;
  716|  62.7k|    igraph_int_t i, j, n;
  717|  62.7k|    igraph_int_t vec_len;
  718|       |
  719|  62.7k|    switch (vs.type) {
  720|  48.0k|    case IGRAPH_VS_ALL:
  ------------------
  |  Branch (720:5): [True: 48.0k, False: 14.7k]
  ------------------
  721|  48.0k|        vit->type = IGRAPH_VIT_RANGE;
  722|  48.0k|        vit->pos = 0;
  723|  48.0k|        vit->start = 0;
  724|  48.0k|        vit->end = igraph_vcount(graph);
  725|  48.0k|        break;
  726|      0|    case IGRAPH_VS_ADJ:
  ------------------
  |  Branch (726:5): [True: 0, False: 62.7k]
  ------------------
  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: 62.7k]
  ------------------
  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: 62.7k]
  ------------------
  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|  14.0k|    case IGRAPH_VS_1:
  ------------------
  |  Branch (796:5): [True: 14.0k, False: 48.7k]
  ------------------
  797|  14.0k|        vit->type = IGRAPH_VIT_RANGE;
  798|  14.0k|        vit->pos = vs.data.vid;
  799|  14.0k|        vit->start = vs.data.vid;
  800|  14.0k|        vit->end = vs.data.vid + 1;
  801|  14.0k|        if (vit->pos >= igraph_vcount(graph)) {
  ------------------
  |  Branch (801:13): [True: 0, False: 14.0k]
  ------------------
  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|  14.0k|        break;
  805|  14.0k|    case IGRAPH_VS_VECTORPTR:
  ------------------
  |  Branch (805:5): [True: 697, False: 62.0k]
  ------------------
  806|    697|    case IGRAPH_VS_VECTOR:
  ------------------
  |  Branch (806:5): [True: 0, False: 62.7k]
  ------------------
  807|    697|        vit->type = IGRAPH_VIT_VECTORPTR;
  808|    697|        vit->pos = 0;
  809|    697|        vit->start = 0;
  810|    697|        vit->vec = vs.data.vecptr;
  811|    697|        vit->end = igraph_vector_int_size(vit->vec);
  812|    697|        if (!igraph_vector_int_isininterval(vit->vec, 0, igraph_vcount(graph) - 1)) {
  ------------------
  |  Branch (812:13): [True: 0, False: 697]
  ------------------
  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|    697|        break;
  816|    697|    case IGRAPH_VS_RANGE:
  ------------------
  |  Branch (816:5): [True: 0, False: 62.7k]
  ------------------
  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: 62.7k]
  ------------------
  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|  62.7k|    }
  837|  62.7k|    return IGRAPH_SUCCESS;
  838|  62.7k|}
igraph_vit_destroy:
  853|  62.7k|void igraph_vit_destroy(const igraph_vit_t *vit) {
  854|  62.7k|    switch (vit->type) {
  855|  62.0k|    case IGRAPH_VIT_RANGE:
  ------------------
  |  Branch (855:5): [True: 62.0k, False: 697]
  ------------------
  856|  62.7k|    case IGRAPH_VIT_VECTORPTR:
  ------------------
  |  Branch (856:5): [True: 697, False: 62.0k]
  ------------------
  857|  62.7k|        break;
  858|      0|    case IGRAPH_VIT_VECTOR:
  ------------------
  |  Branch (858:5): [True: 0, False: 62.7k]
  ------------------
  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: 62.7k]
  ------------------
  863|       |        /*     IGRAPH_ERROR("Cannot destroy iterator, unknown type", IGRAPH_EINVAL); */
  864|      0|        break;
  865|  62.7k|    }
  866|  62.7k|}
igraph_vit_as_vector:
  868|    599|igraph_error_t igraph_vit_as_vector(const igraph_vit_t *vit, igraph_vector_int_t *v) {
  869|    599|    igraph_int_t i;
  870|       |
  871|    599|    IGRAPH_CHECK(igraph_vector_int_resize(v, IGRAPH_VIT_SIZE(*vit)));
  ------------------
  |  |  656|    599|    do { \
  |  |  657|    599|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    599|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    599|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 599]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    599|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 599]
  |  |  ------------------
  ------------------
  872|       |
  873|    599|    switch (vit->type) {
  874|      0|    case IGRAPH_VIT_RANGE:
  ------------------
  |  Branch (874:5): [True: 0, False: 599]
  ------------------
  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: 599]
  ------------------
  880|    599|    case IGRAPH_VIT_VECTORPTR:
  ------------------
  |  Branch (880:5): [True: 599, False: 0]
  ------------------
  881|  20.5k|        for (i = 0; i < IGRAPH_VIT_SIZE(*vit); i++) {
  ------------------
  |  |  190|  20.5k|#define IGRAPH_VIT_SIZE(vit)  ((vit).end - (vit).start)
  ------------------
  |  Branch (881:21): [True: 20.0k, False: 599]
  ------------------
  882|  20.0k|            VECTOR(*v)[i] = VECTOR(*vit->vec)[i];
  ------------------
  |  |   60|  20.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*v)[i] = VECTOR(*vit->vec)[i];
  ------------------
  |  |   60|  20.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  883|  20.0k|        }
  884|    599|        break;
  885|      0|    default:
  ------------------
  |  Branch (885:5): [True: 0, False: 599]
  ------------------
  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|    599|    }
  890|       |
  891|    599|    return IGRAPH_SUCCESS;
  892|    599|}
igraph_es_all:
  921|  15.1k|                  igraph_edgeorder_type_t order) {
  922|  15.1k|    switch (order) {
  923|  6.02k|    case IGRAPH_EDGEORDER_ID:
  ------------------
  |  Branch (923:5): [True: 6.02k, False: 9.15k]
  ------------------
  924|  6.02k|        es->type = IGRAPH_ES_ALL;
  925|  6.02k|        break;
  926|  4.91k|    case IGRAPH_EDGEORDER_FROM:
  ------------------
  |  Branch (926:5): [True: 4.91k, False: 10.2k]
  ------------------
  927|  4.91k|        es->type = IGRAPH_ES_ALLFROM;
  928|  4.91k|        break;
  929|  4.24k|    case IGRAPH_EDGEORDER_TO:
  ------------------
  |  Branch (929:5): [True: 4.24k, False: 10.9k]
  ------------------
  930|  4.24k|        es->type = IGRAPH_ES_ALLTO;
  931|  4.24k|        break;
  932|      0|    default:
  ------------------
  |  Branch (932:5): [True: 0, False: 15.1k]
  ------------------
  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|  15.1k|    }
  936|  15.1k|    return IGRAPH_SUCCESS;
  937|  15.1k|}
igraph_ess_all:
  953|  14.2k|igraph_es_t igraph_ess_all(igraph_edgeorder_type_t order) {
  954|  14.2k|    igraph_es_t es;
  955|  14.2k|    igraph_es_all(&es, order); /* cannot fail */
  956|  14.2k|    return es;
  957|  14.2k|}
igraph_ess_1:
 1058|  2.12k|igraph_es_t igraph_ess_1(igraph_int_t eid) {
 1059|  2.12k|    igraph_es_t es;
 1060|  2.12k|    es.type = IGRAPH_ES_1;
 1061|  2.12k|    es.data.eid = eid;
 1062|  2.12k|    return es;
 1063|  2.12k|}
igraph_ess_vector:
 1139|    742|igraph_es_t igraph_ess_vector(const igraph_vector_int_t *v) {
 1140|    742|    igraph_es_t es;
 1141|    742|    es.type = IGRAPH_ES_VECTORPTR;
 1142|    742|    es.data.vecptr = v;
 1143|    742|    return es;
 1144|    742|}
igraph_es_destroy:
 1408|    964|void igraph_es_destroy(igraph_es_t *es) {
 1409|    964|    switch (es->type) {
 1410|    274|    case IGRAPH_ES_ALL:
  ------------------
  |  Branch (1410:5): [True: 274, False: 690]
  ------------------
 1411|    964|    case IGRAPH_ES_ALLFROM:
  ------------------
  |  Branch (1411:5): [True: 690, False: 274]
  ------------------
 1412|    964|    case IGRAPH_ES_ALLTO:
  ------------------
  |  Branch (1412:5): [True: 0, False: 964]
  ------------------
 1413|    964|    case IGRAPH_ES_INCIDENT:
  ------------------
  |  Branch (1413:5): [True: 0, False: 964]
  ------------------
 1414|    964|    case IGRAPH_ES_NONE:
  ------------------
  |  Branch (1414:5): [True: 0, False: 964]
  ------------------
 1415|    964|    case IGRAPH_ES_1:
  ------------------
  |  Branch (1415:5): [True: 0, False: 964]
  ------------------
 1416|    964|    case IGRAPH_ES_VECTORPTR:
  ------------------
  |  Branch (1416:5): [True: 0, False: 964]
  ------------------
 1417|    964|    case IGRAPH_ES_RANGE:
  ------------------
  |  Branch (1417:5): [True: 0, False: 964]
  ------------------
 1418|    964|    case IGRAPH_ES_ALL_BETWEEN:
  ------------------
  |  Branch (1418:5): [True: 0, False: 964]
  ------------------
 1419|    964|        break;
 1420|      0|    case IGRAPH_ES_VECTOR:
  ------------------
  |  Branch (1420:5): [True: 0, False: 964]
  ------------------
 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: 964]
  ------------------
 1425|      0|    case IGRAPH_ES_PATH:
  ------------------
  |  Branch (1425:5): [True: 0, False: 964]
  ------------------
 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: 964]
  ------------------
 1430|      0|        break;
 1431|    964|    }
 1432|    964|}
igraph_es_is_all:
 1445|  3.54k|igraph_bool_t igraph_es_is_all(const igraph_es_t *es) {
 1446|  3.54k|    return es->type == IGRAPH_ES_ALL;
 1447|  3.54k|}
igraph_eit_create:
 1922|  16.9k|igraph_error_t igraph_eit_create(const igraph_t *graph, igraph_es_t es, igraph_eit_t *eit) {
 1923|  16.9k|    switch (es.type) {
 1924|  3.90k|    case IGRAPH_ES_ALL:
  ------------------
  |  Branch (1924:5): [True: 3.90k, False: 13.0k]
  ------------------
 1925|  3.90k|        eit->type = IGRAPH_EIT_RANGE;
 1926|  3.90k|        eit->pos = 0;
 1927|  3.90k|        eit->start = 0;
 1928|  3.90k|        eit->end = igraph_ecount(graph);
 1929|  3.90k|        break;
 1930|  4.91k|    case IGRAPH_ES_ALLFROM:
  ------------------
  |  Branch (1930:5): [True: 4.91k, False: 12.0k]
  ------------------
 1931|  4.91k|        IGRAPH_CHECK(igraph_i_eit_create_allfromto(graph, eit, IGRAPH_OUT));
  ------------------
  |  |  656|  4.91k|    do { \
  |  |  657|  4.91k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.91k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.91k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.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|  4.91k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.91k]
  |  |  ------------------
  ------------------
 1932|  4.91k|        break;
 1933|  4.91k|    case IGRAPH_ES_ALLTO:
  ------------------
  |  Branch (1933:5): [True: 4.24k, False: 12.6k]
  ------------------
 1934|  4.24k|        IGRAPH_CHECK(igraph_i_eit_create_allfromto(graph, eit, IGRAPH_IN));
  ------------------
  |  |  656|  4.24k|    do { \
  |  |  657|  4.24k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.24k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.24k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.24k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  4.24k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.24k]
  |  |  ------------------
  ------------------
 1935|  4.24k|        break;
 1936|  4.24k|    case IGRAPH_ES_INCIDENT:
  ------------------
  |  Branch (1936:5): [True: 0, False: 16.9k]
  ------------------
 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: 16.9k]
  ------------------
 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.12k|    case IGRAPH_ES_1:
  ------------------
  |  Branch (1945:5): [True: 2.12k, False: 14.8k]
  ------------------
 1946|  2.12k|        eit->type = IGRAPH_EIT_RANGE;
 1947|  2.12k|        eit->pos = es.data.eid;
 1948|  2.12k|        eit->start = es.data.eid;
 1949|  2.12k|        eit->end = es.data.eid + 1;
 1950|  2.12k|        if (eit->pos >= igraph_ecount(graph)) {
  ------------------
  |  Branch (1950:13): [True: 0, False: 2.12k]
  ------------------
 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.12k|        break;
 1954|  2.12k|    case IGRAPH_ES_VECTOR:
  ------------------
  |  Branch (1954:5): [True: 0, False: 16.9k]
  ------------------
 1955|  1.75k|    case IGRAPH_ES_VECTORPTR:
  ------------------
  |  Branch (1955:5): [True: 1.75k, False: 15.1k]
  ------------------
 1956|  1.75k|        eit->type = IGRAPH_EIT_VECTORPTR;
 1957|  1.75k|        eit->pos = 0;
 1958|  1.75k|        eit->start = 0;
 1959|  1.75k|        eit->vec = es.data.vecptr;
 1960|  1.75k|        eit->end = igraph_vector_int_size(eit->vec);
 1961|  1.75k|        if (!igraph_vector_int_isininterval(eit->vec, 0, igraph_ecount(graph) - 1)) {
  ------------------
  |  Branch (1961:13): [True: 0, False: 1.75k]
  ------------------
 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.75k|        break;
 1965|  1.75k|    case IGRAPH_ES_RANGE:
  ------------------
  |  Branch (1965:5): [True: 0, False: 16.9k]
  ------------------
 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: 16.9k]
  ------------------
 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: 16.9k]
  ------------------
 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: 16.9k]
  ------------------
 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: 16.9k]
  ------------------
 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|  16.9k|    }
 1995|  16.9k|    return IGRAPH_SUCCESS;
 1996|  16.9k|}
igraph_eit_destroy:
 2008|  16.9k|void igraph_eit_destroy(const igraph_eit_t *eit) {
 2009|  16.9k|    switch (eit->type) {
 2010|  6.02k|    case IGRAPH_EIT_RANGE:
  ------------------
  |  Branch (2010:5): [True: 6.02k, False: 10.9k]
  ------------------
 2011|  7.77k|    case IGRAPH_EIT_VECTORPTR:
  ------------------
  |  Branch (2011:5): [True: 1.75k, False: 15.1k]
  ------------------
 2012|  7.77k|        break;
 2013|  9.15k|    case IGRAPH_EIT_VECTOR:
  ------------------
  |  Branch (2013:5): [True: 9.15k, False: 7.77k]
  ------------------
 2014|  9.15k|        igraph_vector_int_destroy((igraph_vector_int_t*)eit->vec);
 2015|  9.15k|        igraph_free((igraph_vector_int_t*)eit->vec);
 2016|  9.15k|        break;
 2017|      0|    default:
  ------------------
  |  Branch (2017:5): [True: 0, False: 16.9k]
  ------------------
 2018|       |        /*     IGRAPH_ERROR("Cannot destroy iterator, unknown type", IGRAPH_EINVAL); */
 2019|      0|        break;
 2020|  16.9k|    }
 2021|  16.9k|}
iterators.c:igraph_i_eit_create_allfromto:
 1696|  9.15k|                                         igraph_neimode_t mode) {
 1697|  9.15k|    igraph_vector_int_t *vec;
 1698|  9.15k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
 1699|  9.15k|    igraph_int_t no_of_edges = igraph_ecount(graph);
 1700|       |
 1701|  9.15k|    vec = IGRAPH_CALLOC(1, igraph_vector_int_t);
  ------------------
  |  |   33|  9.15k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  18.3k|    (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.15k, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1702|  9.15k|    IGRAPH_CHECK_OOM(vec, "Cannot create edge iterator.");
  ------------------
  |  |  709|  9.15k|    do { \
  |  |  710|  9.15k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  9.15k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.15k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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.15k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 9.15k]
  |  |  ------------------
  ------------------
 1703|  9.15k|    IGRAPH_FINALLY(igraph_free, vec);
  ------------------
  |  |  603|  9.15k|    do { \
  |  |  604|  9.15k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  9.15k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  9.15k|         * incorrect destructor function with the pointer */ \
  |  |  607|  9.15k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 9.15k]
  |  |  ------------------
  |  |  608|  9.15k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  9.15k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 9.15k]
  |  |  ------------------
  ------------------
 1704|       |
 1705|  9.15k|    IGRAPH_VECTOR_INT_INIT_FINALLY(vec, 0);
  ------------------
  |  |  119|  9.15k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  9.15k|    do { \
  |  |  |  |  657|  9.15k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  9.15k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  9.15k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.15k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, 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.15k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 9.15k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  9.15k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  9.15k|    do { \
  |  |  |  |  604|  9.15k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  9.15k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  9.15k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  9.15k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 9.15k]
  |  |  |  |  ------------------
  |  |  |  |  608|  9.15k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  9.15k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 9.15k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 9.15k]
  |  |  ------------------
  ------------------
 1706|  9.15k|    IGRAPH_CHECK(igraph_vector_int_reserve(vec, no_of_edges));
  ------------------
  |  |  656|  9.15k|    do { \
  |  |  657|  9.15k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  9.15k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  9.15k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.15k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, 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.15k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 9.15k]
  |  |  ------------------
  ------------------
 1707|       |
 1708|  9.15k|    if (igraph_is_directed(graph)) {
  ------------------
  |  Branch (1708:9): [True: 9.15k, False: 0]
  ------------------
 1709|  9.15k|        igraph_vector_int_t adj;
 1710|  9.15k|        IGRAPH_VECTOR_INT_INIT_FINALLY(&adj, 0);
  ------------------
  |  |  119|  9.15k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  9.15k|    do { \
  |  |  |  |  657|  9.15k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  9.15k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  9.15k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.15k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, 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.15k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 9.15k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  9.15k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  9.15k|    do { \
  |  |  |  |  604|  9.15k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  9.15k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  9.15k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  9.15k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 9.15k]
  |  |  |  |  ------------------
  |  |  |  |  608|  9.15k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  9.15k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 9.15k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 9.15k]
  |  |  ------------------
  ------------------
 1711|  1.55M|        for (igraph_int_t i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (1711:34): [True: 1.54M, False: 9.15k]
  ------------------
 1712|  1.54M|            IGRAPH_CHECK(igraph_incident(graph, &adj, i, mode, IGRAPH_LOOPS));
  ------------------
  |  |  656|  1.54M|    do { \
  |  |  657|  1.54M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.54M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.54M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.54M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, 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.54M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.54M]
  |  |  ------------------
  ------------------
 1713|  1.54M|            igraph_vector_int_append(vec, &adj);  /* reserved */
 1714|  1.54M|        }
 1715|  9.15k|        igraph_vector_int_destroy(&adj);
 1716|  9.15k|        IGRAPH_FINALLY_CLEAN(1);
 1717|  9.15k|    } 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.15k|    eit->type = IGRAPH_EIT_VECTOR;
 1740|  9.15k|    eit->pos = 0;
 1741|  9.15k|    eit->start = 0;
 1742|  9.15k|    eit->vec = vec;
 1743|  9.15k|    eit->end = igraph_vector_int_size(eit->vec);
 1744|       |
 1745|  9.15k|    IGRAPH_FINALLY_CLEAN(2);
 1746|  9.15k|    return IGRAPH_SUCCESS;
 1747|  9.15k|}

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

igraph_empty_attrs:
  102|  21.4k|) {
  103|       |
  104|  21.4k|    if (n < 0) {
  ------------------
  |  Branch (104:9): [True: 0, False: 21.4k]
  ------------------
  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|  21.4k|    memset(graph, 0, sizeof(igraph_t));
  109|       |
  110|  21.4k|    graph->n = 0;
  111|  21.4k|    graph->directed = directed;
  112|  21.4k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&graph->from, 0);
  ------------------
  |  |  119|  21.4k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  21.4k|    do { \
  |  |  |  |  657|  21.4k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  21.4k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  21.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 21.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|  21.4k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 21.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  21.4k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  21.4k|    do { \
  |  |  |  |  604|  21.4k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  21.4k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  21.4k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  21.4k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 21.4k]
  |  |  |  |  ------------------
  |  |  |  |  608|  21.4k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  21.4k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 21.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 21.4k]
  |  |  ------------------
  ------------------
  113|  21.4k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&graph->to, 0);
  ------------------
  |  |  119|  21.4k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  21.4k|    do { \
  |  |  |  |  657|  21.4k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  21.4k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  21.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 21.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|  21.4k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 21.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  21.4k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  21.4k|    do { \
  |  |  |  |  604|  21.4k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  21.4k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  21.4k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  21.4k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 21.4k]
  |  |  |  |  ------------------
  |  |  |  |  608|  21.4k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  21.4k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 21.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 21.4k]
  |  |  ------------------
  ------------------
  114|  21.4k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&graph->oi, 0);
  ------------------
  |  |  119|  21.4k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  21.4k|    do { \
  |  |  |  |  657|  21.4k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  21.4k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  21.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 21.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|  21.4k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 21.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  21.4k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  21.4k|    do { \
  |  |  |  |  604|  21.4k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  21.4k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  21.4k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  21.4k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 21.4k]
  |  |  |  |  ------------------
  |  |  |  |  608|  21.4k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  21.4k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 21.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 21.4k]
  |  |  ------------------
  ------------------
  115|  21.4k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&graph->ii, 0);
  ------------------
  |  |  119|  21.4k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  21.4k|    do { \
  |  |  |  |  657|  21.4k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  21.4k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  21.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 21.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|  21.4k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 21.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  21.4k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  21.4k|    do { \
  |  |  |  |  604|  21.4k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  21.4k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  21.4k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  21.4k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 21.4k]
  |  |  |  |  ------------------
  |  |  |  |  608|  21.4k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  21.4k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 21.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 21.4k]
  |  |  ------------------
  ------------------
  116|  21.4k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&graph->os, 1);
  ------------------
  |  |  119|  21.4k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  21.4k|    do { \
  |  |  |  |  657|  21.4k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  21.4k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  21.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 21.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|  21.4k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 21.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  21.4k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  21.4k|    do { \
  |  |  |  |  604|  21.4k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  21.4k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  21.4k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  21.4k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 21.4k]
  |  |  |  |  ------------------
  |  |  |  |  608|  21.4k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  21.4k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 21.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 21.4k]
  |  |  ------------------
  ------------------
  117|  21.4k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&graph->is, 1);
  ------------------
  |  |  119|  21.4k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  21.4k|    do { \
  |  |  |  |  657|  21.4k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  21.4k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  21.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 21.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|  21.4k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 21.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  21.4k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  21.4k|    do { \
  |  |  |  |  604|  21.4k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  21.4k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  21.4k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  21.4k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 21.4k]
  |  |  |  |  ------------------
  |  |  |  |  608|  21.4k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  21.4k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 21.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 21.4k]
  |  |  ------------------
  ------------------
  118|       |
  119|       |    /* init cache */
  120|  21.4k|    graph->cache = IGRAPH_CALLOC(1, igraph_i_property_cache_t);
  ------------------
  |  |   33|  21.4k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  42.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: 21.4k, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  121|  21.4k|    IGRAPH_CHECK_OOM(graph->cache, "Cannot create graph.");
  ------------------
  |  |  709|  21.4k|    do { \
  |  |  710|  21.4k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  21.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 21.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  21.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 21.4k]
  |  |  ------------------
  ------------------
  122|  21.4k|    IGRAPH_FINALLY(igraph_free, graph->cache);
  ------------------
  |  |  603|  21.4k|    do { \
  |  |  604|  21.4k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  21.4k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  21.4k|         * incorrect destructor function with the pointer */ \
  |  |  607|  21.4k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 21.4k]
  |  |  ------------------
  |  |  608|  21.4k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  21.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 21.4k]
  |  |  ------------------
  ------------------
  123|  21.4k|    IGRAPH_CHECK(igraph_i_property_cache_init(graph->cache));
  ------------------
  |  |  656|  21.4k|    do { \
  |  |  657|  21.4k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  21.4k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  21.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 21.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|  21.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 21.4k]
  |  |  ------------------
  ------------------
  124|  21.4k|    IGRAPH_FINALLY(igraph_i_property_cache_destroy, graph->cache);
  ------------------
  |  |  603|  21.4k|    do { \
  |  |  604|  21.4k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  21.4k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  21.4k|         * incorrect destructor function with the pointer */ \
  |  |  607|  21.4k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 21.4k]
  |  |  ------------------
  |  |  608|  21.4k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  21.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 21.4k]
  |  |  ------------------
  ------------------
  125|       |
  126|  21.4k|    VECTOR(graph->os)[0] = 0;
  ------------------
  |  |   60|  21.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  127|  21.4k|    VECTOR(graph->is)[0] = 0;
  ------------------
  |  |   60|  21.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  128|       |
  129|       |    /* init attributes */
  130|  21.4k|    IGRAPH_CHECK(igraph_i_attribute_init(graph, attr));
  ------------------
  |  |  656|  21.4k|    do { \
  |  |  657|  21.4k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  21.4k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  21.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 21.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|  21.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 21.4k]
  |  |  ------------------
  ------------------
  131|       |
  132|       |    /* add the vertices */
  133|  21.4k|    IGRAPH_CHECK(igraph_add_vertices(graph, n, 0));
  ------------------
  |  |  656|  21.4k|    do { \
  |  |  657|  21.4k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  21.4k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  21.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 21.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|  21.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 21.4k]
  |  |  ------------------
  ------------------
  134|       |
  135|  21.4k|    IGRAPH_FINALLY_CLEAN(8);
  136|  21.4k|    return IGRAPH_SUCCESS;
  137|  21.4k|}
igraph_destroy:
  155|  23.6k|void igraph_destroy(igraph_t *graph) {
  156|  23.6k|    igraph_i_attribute_destroy(graph);
  157|       |
  158|  23.6k|    igraph_i_property_cache_destroy(graph->cache);
  159|  23.6k|    IGRAPH_FREE(graph->cache);
  ------------------
  |  |   36|  23.6k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  160|       |
  161|  23.6k|    igraph_vector_int_destroy(&graph->from);
  162|  23.6k|    igraph_vector_int_destroy(&graph->to);
  163|  23.6k|    igraph_vector_int_destroy(&graph->oi);
  164|  23.6k|    igraph_vector_int_destroy(&graph->ii);
  165|  23.6k|    igraph_vector_int_destroy(&graph->os);
  166|  23.6k|    igraph_vector_int_destroy(&graph->is);
  167|  23.6k|}
igraph_copy:
  195|     49|igraph_error_t igraph_copy(igraph_t *to, const igraph_t *from) {
  196|     49|    memset(to, 0, sizeof(igraph_t));
  197|       |
  198|     49|    to->n = from->n;
  199|     49|    to->directed = from->directed;
  200|     49|    IGRAPH_CHECK(igraph_vector_int_init_copy(&to->from, &from->from));
  ------------------
  |  |  656|     49|    do { \
  |  |  657|     49|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|     49|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|     49|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 49]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|     49|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 49]
  |  |  ------------------
  ------------------
  201|     49|    IGRAPH_FINALLY(igraph_vector_int_destroy, &to->from);
  ------------------
  |  |  603|     49|    do { \
  |  |  604|     49|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|     49|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|     49|         * incorrect destructor function with the pointer */ \
  |  |  607|     49|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 49]
  |  |  ------------------
  |  |  608|     49|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|     49|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 49]
  |  |  ------------------
  ------------------
  202|     49|    IGRAPH_CHECK(igraph_vector_int_init_copy(&to->to, &from->to));
  ------------------
  |  |  656|     49|    do { \
  |  |  657|     49|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|     49|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|     49|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 49]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|     49|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 49]
  |  |  ------------------
  ------------------
  203|     49|    IGRAPH_FINALLY(igraph_vector_int_destroy, &to->to);
  ------------------
  |  |  603|     49|    do { \
  |  |  604|     49|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|     49|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|     49|         * incorrect destructor function with the pointer */ \
  |  |  607|     49|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 49]
  |  |  ------------------
  |  |  608|     49|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|     49|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 49]
  |  |  ------------------
  ------------------
  204|     49|    IGRAPH_CHECK(igraph_vector_int_init_copy(&to->oi, &from->oi));
  ------------------
  |  |  656|     49|    do { \
  |  |  657|     49|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|     49|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|     49|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 49]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|     49|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 49]
  |  |  ------------------
  ------------------
  205|     49|    IGRAPH_FINALLY(igraph_vector_int_destroy, &to->oi);
  ------------------
  |  |  603|     49|    do { \
  |  |  604|     49|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|     49|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|     49|         * incorrect destructor function with the pointer */ \
  |  |  607|     49|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 49]
  |  |  ------------------
  |  |  608|     49|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|     49|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 49]
  |  |  ------------------
  ------------------
  206|     49|    IGRAPH_CHECK(igraph_vector_int_init_copy(&to->ii, &from->ii));
  ------------------
  |  |  656|     49|    do { \
  |  |  657|     49|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|     49|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|     49|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 49]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|     49|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 49]
  |  |  ------------------
  ------------------
  207|     49|    IGRAPH_FINALLY(igraph_vector_int_destroy, &to->ii);
  ------------------
  |  |  603|     49|    do { \
  |  |  604|     49|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|     49|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|     49|         * incorrect destructor function with the pointer */ \
  |  |  607|     49|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 49]
  |  |  ------------------
  |  |  608|     49|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|     49|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 49]
  |  |  ------------------
  ------------------
  208|     49|    IGRAPH_CHECK(igraph_vector_int_init_copy(&to->os, &from->os));
  ------------------
  |  |  656|     49|    do { \
  |  |  657|     49|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|     49|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|     49|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 49]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|     49|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 49]
  |  |  ------------------
  ------------------
  209|     49|    IGRAPH_FINALLY(igraph_vector_int_destroy, &to->os);
  ------------------
  |  |  603|     49|    do { \
  |  |  604|     49|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|     49|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|     49|         * incorrect destructor function with the pointer */ \
  |  |  607|     49|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 49]
  |  |  ------------------
  |  |  608|     49|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|     49|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 49]
  |  |  ------------------
  ------------------
  210|     49|    IGRAPH_CHECK(igraph_vector_int_init_copy(&to->is, &from->is));
  ------------------
  |  |  656|     49|    do { \
  |  |  657|     49|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|     49|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|     49|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 49]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|     49|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 49]
  |  |  ------------------
  ------------------
  211|     49|    IGRAPH_FINALLY(igraph_vector_int_destroy, &to->is);
  ------------------
  |  |  603|     49|    do { \
  |  |  604|     49|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|     49|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|     49|         * incorrect destructor function with the pointer */ \
  |  |  607|     49|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 49]
  |  |  ------------------
  |  |  608|     49|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|     49|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 49]
  |  |  ------------------
  ------------------
  212|       |
  213|     49|    to->cache = IGRAPH_CALLOC(1, igraph_i_property_cache_t);
  ------------------
  |  |   33|     49|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|     98|    (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: 49, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  214|     49|    IGRAPH_CHECK_OOM(to->cache, "Cannot copy graph.");
  ------------------
  |  |  709|     49|    do { \
  |  |  710|     49|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|     49|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 49]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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|     49|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 49]
  |  |  ------------------
  ------------------
  215|     49|    IGRAPH_FINALLY(igraph_free, to->cache);
  ------------------
  |  |  603|     49|    do { \
  |  |  604|     49|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|     49|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|     49|         * incorrect destructor function with the pointer */ \
  |  |  607|     49|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 49]
  |  |  ------------------
  |  |  608|     49|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|     49|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 49]
  |  |  ------------------
  ------------------
  216|     49|    IGRAPH_CHECK(igraph_i_property_cache_copy(to->cache, from->cache));
  ------------------
  |  |  656|     49|    do { \
  |  |  657|     49|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|     49|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|     49|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 49]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|     49|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 49]
  |  |  ------------------
  ------------------
  217|     49|    IGRAPH_FINALLY(igraph_i_property_cache_destroy, to->cache);
  ------------------
  |  |  603|     49|    do { \
  |  |  604|     49|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|     49|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|     49|         * incorrect destructor function with the pointer */ \
  |  |  607|     49|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 49]
  |  |  ------------------
  |  |  608|     49|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|     49|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 49]
  |  |  ------------------
  ------------------
  218|       |
  219|     49|    IGRAPH_CHECK(igraph_i_attribute_copy(to, from, true, true, true));
  ------------------
  |  |  656|     49|    do { \
  |  |  657|     49|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|     49|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|     49|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 49]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|     49|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 49]
  |  |  ------------------
  ------------------
  220|       |
  221|     49|    IGRAPH_FINALLY_CLEAN(8);
  222|     49|    return IGRAPH_SUCCESS;
  223|     49|}
igraph_add_edges:
  257|  23.6k|) {
  258|  23.6k|    igraph_int_t no_of_edges = igraph_vector_int_size(&graph->from);
  259|  23.6k|    igraph_int_t edges_to_add = igraph_vector_int_size(edges) / 2;
  260|  23.6k|    igraph_int_t new_no_of_edges;
  261|  23.6k|    igraph_int_t i = 0;
  262|  23.6k|    igraph_vector_int_t newoi, newii;
  263|  23.6k|    igraph_bool_t directed = igraph_is_directed(graph);
  264|       |
  265|  23.6k|    if (igraph_vector_int_size(edges) % 2 != 0) {
  ------------------
  |  Branch (265:9): [True: 0, False: 23.6k]
  ------------------
  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|  23.6k|    if (!igraph_vector_int_isininterval(edges, 0, igraph_vcount(graph) - 1)) {
  ------------------
  |  Branch (268:9): [True: 0, False: 23.6k]
  ------------------
  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|  23.6k|    IGRAPH_SAFE_ADD(no_of_edges, edges_to_add, &new_no_of_edges);
  ------------------
  |  |   47|  23.6k|    do { \
  |  |   48|  23.6k|        igraph_int_t _safe_a = (a), _safe_b = (b); \
  |  |   49|  23.6k|        igraph_int_t _safe_sum; \
  |  |   50|  23.6k|        if (__builtin_add_overflow(_safe_a, _safe_b, &_safe_sum)) { \
  |  |  ------------------
  |  |  |  Branch (50:13): [True: 0, False: 23.6k]
  |  |  ------------------
  |  |   51|      0|            IGRAPH_ERRORF("Overflow when adding %" IGRAPH_PRId " and %" IGRAPH_PRId ".", IGRAPH_EOVERFLOW, _safe_a, _safe_b); \
  |  |  ------------------
  |  |  |  |  464|      0|    do { \
  |  |  |  |  465|      0|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  |  |  466|      0|                      igraph_errno, __VA_ARGS__) ; \
  |  |  |  |  467|      0|        return igraph_errno; \
  |  |  |  |  468|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (468:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|        } \
  |  |   53|  23.6k|        *(res) = _safe_sum; \
  |  |   54|  23.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (54:14): [Folded, False: 23.6k]
  |  |  ------------------
  ------------------
  274|  23.6k|    if (new_no_of_edges > IGRAPH_ECOUNT_MAX) {
  ------------------
  |  |  118|  23.6k|#define IGRAPH_ECOUNT_MAX (IGRAPH_INTEGER_MAX/2)
  |  |  ------------------
  |  |  |  |   72|  23.6k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  |  |  ------------------
  ------------------
  |  Branch (274:9): [True: 0, False: 23.6k]
  ------------------
  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|  23.6k|    IGRAPH_CHECK(igraph_vector_int_reserve(&graph->from, no_of_edges + edges_to_add));
  ------------------
  |  |  656|  23.6k|    do { \
  |  |  657|  23.6k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  23.6k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  23.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 23.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|  23.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 23.6k]
  |  |  ------------------
  ------------------
  279|  23.6k|    IGRAPH_CHECK(igraph_vector_int_reserve(&graph->to, no_of_edges + edges_to_add));
  ------------------
  |  |  656|  23.6k|    do { \
  |  |  657|  23.6k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  23.6k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  23.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 23.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|  23.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 23.6k]
  |  |  ------------------
  ------------------
  280|       |
  281|   803k|    while (i < edges_to_add * 2) {
  ------------------
  |  Branch (281:12): [True: 779k, False: 23.6k]
  ------------------
  282|   779k|        if (directed || VECTOR(*edges)[i] > VECTOR(*edges)[i + 1]) {
  ------------------
  |  |   60|   400k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      if (directed || VECTOR(*edges)[i] > VECTOR(*edges)[i + 1]) {
  ------------------
  |  |   60|   400k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (282:13): [True: 379k, False: 400k]
  |  Branch (282:25): [True: 60.5k, False: 339k]
  ------------------
  283|   440k|            igraph_vector_int_push_back(&graph->from, VECTOR(*edges)[i++]); /* reserved */
  ------------------
  |  |   60|   440k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  284|   440k|            igraph_vector_int_push_back(&graph->to,   VECTOR(*edges)[i++]); /* reserved */
  ------------------
  |  |   60|   440k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  285|   440k|        } else {
  286|   339k|            igraph_vector_int_push_back(&graph->to,   VECTOR(*edges)[i++]); /* reserved */
  ------------------
  |  |   60|   339k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  287|   339k|            igraph_vector_int_push_back(&graph->from, VECTOR(*edges)[i++]); /* reserved */
  ------------------
  |  |   60|   339k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  288|   339k|        }
  289|   779k|    }
  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|  23.6k|#define CHECK_ERR(expr) \
  299|  23.6k|    do { \
  300|  23.6k|        igraph_error_t err = (expr); \
  301|  23.6k|        if (err != IGRAPH_SUCCESS) { \
  302|  23.6k|            igraph_vector_int_resize(&graph->from, no_of_edges); /* gets smaller, error safe */ \
  303|  23.6k|            igraph_vector_int_resize(&graph->to, no_of_edges);   /* gets smaller, error safe */ \
  304|  23.6k|            IGRAPH_FINALLY_EXIT(); \
  305|  23.6k|            IGRAPH_ERROR("Cannot add edges.", err); \
  306|  23.6k|        } \
  307|  23.6k|    } while (0)
  308|       |
  309|       |    /* oi & ii */
  310|  23.6k|    IGRAPH_FINALLY_ENTER();
  311|  23.6k|    {
  312|  23.6k|        CHECK_ERR(igraph_vector_int_init(&newoi, no_of_edges));
  ------------------
  |  |  299|  23.6k|    do { \
  |  |  300|  23.6k|        igraph_error_t err = (expr); \
  |  |  301|  23.6k|        if (err != IGRAPH_SUCCESS) { \
  |  |  ------------------
  |  |  |  Branch (301:13): [True: 0, False: 23.6k]
  |  |  ------------------
  |  |  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|  23.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (307:14): [Folded, False: 23.6k]
  |  |  ------------------
  ------------------
  313|  23.6k|        IGRAPH_FINALLY(igraph_vector_int_destroy, &newoi);
  ------------------
  |  |  603|  23.6k|    do { \
  |  |  604|  23.6k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  23.6k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  23.6k|         * incorrect destructor function with the pointer */ \
  |  |  607|  23.6k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 23.6k]
  |  |  ------------------
  |  |  608|  23.6k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  23.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 23.6k]
  |  |  ------------------
  ------------------
  314|  23.6k|        CHECK_ERR(igraph_vector_int_init(&newii, no_of_edges));
  ------------------
  |  |  299|  23.6k|    do { \
  |  |  300|  23.6k|        igraph_error_t err = (expr); \
  |  |  301|  23.6k|        if (err != IGRAPH_SUCCESS) { \
  |  |  ------------------
  |  |  |  Branch (301:13): [True: 0, False: 23.6k]
  |  |  ------------------
  |  |  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|  23.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (307:14): [Folded, False: 23.6k]
  |  |  ------------------
  ------------------
  315|  23.6k|        IGRAPH_FINALLY(igraph_vector_int_destroy, &newii);
  ------------------
  |  |  603|  23.6k|    do { \
  |  |  604|  23.6k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  23.6k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  23.6k|         * incorrect destructor function with the pointer */ \
  |  |  607|  23.6k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 23.6k]
  |  |  ------------------
  |  |  608|  23.6k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  23.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 23.6k]
  |  |  ------------------
  ------------------
  316|  23.6k|        CHECK_ERR(igraph_vector_int_pair_order(&graph->from, &graph->to, &newoi, graph->n));
  ------------------
  |  |  299|  23.6k|    do { \
  |  |  300|  23.6k|        igraph_error_t err = (expr); \
  |  |  301|  23.6k|        if (err != IGRAPH_SUCCESS) { \
  |  |  ------------------
  |  |  |  Branch (301:13): [True: 0, False: 23.6k]
  |  |  ------------------
  |  |  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|  23.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (307:14): [Folded, False: 23.6k]
  |  |  ------------------
  ------------------
  317|  23.6k|        CHECK_ERR(igraph_vector_int_pair_order(&graph->to, &graph->from, &newii, graph->n));
  ------------------
  |  |  299|  23.6k|    do { \
  |  |  300|  23.6k|        igraph_error_t err = (expr); \
  |  |  301|  23.6k|        if (err != IGRAPH_SUCCESS) { \
  |  |  ------------------
  |  |  |  Branch (301:13): [True: 0, False: 23.6k]
  |  |  ------------------
  |  |  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|  23.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (307:14): [Folded, False: 23.6k]
  |  |  ------------------
  ------------------
  318|       |
  319|       |        /* Attributes */
  320|  23.6k|        if (graph->attr) {
  ------------------
  |  Branch (320:13): [True: 0, False: 23.6k]
  ------------------
  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|  23.6k|        igraph_i_create_start_vectors(&graph->os, &graph->from, &newoi, graph->n);
  327|  23.6k|        igraph_i_create_start_vectors(&graph->is, &graph->to, &newii, graph->n);
  328|       |
  329|       |        /* everything went fine */
  330|  23.6k|        igraph_vector_int_destroy(&graph->oi);
  331|  23.6k|        igraph_vector_int_destroy(&graph->ii);
  332|  23.6k|        IGRAPH_FINALLY_CLEAN(2);
  333|       |
  334|  23.6k|        graph->oi = newoi;
  335|  23.6k|        graph->ii = newii;
  336|  23.6k|    }
  337|      0|    IGRAPH_FINALLY_EXIT();
  338|       |
  339|  23.6k|#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|  23.6k|    igraph_i_property_cache_invalidate_conditionally(
  354|  23.6k|        graph,
  355|  23.6k|        /* keep_always = */ 0,
  356|       |        /* keep_when_false = */
  357|  23.6k|        (1 << IGRAPH_PROP_IS_DAG) | (1 << IGRAPH_PROP_IS_FOREST),
  358|       |        /* keep_when_true = */
  359|  23.6k|        (1 << IGRAPH_PROP_IS_WEAKLY_CONNECTED) |
  360|  23.6k|        (1 << IGRAPH_PROP_IS_STRONGLY_CONNECTED) |
  361|  23.6k|        (1 << IGRAPH_PROP_HAS_LOOP) |
  362|  23.6k|        (1 << IGRAPH_PROP_HAS_MULTI) |
  363|  23.6k|        (1 << IGRAPH_PROP_HAS_MUTUAL)
  364|  23.6k|    );
  365|       |
  366|  23.6k|    return IGRAPH_SUCCESS;
  367|  23.6k|}
igraph_add_vertices:
  391|  25.2k|) {
  392|  25.2k|    igraph_int_t ec = igraph_ecount(graph);
  393|  25.2k|    igraph_int_t vc = igraph_vcount(graph);
  394|  25.2k|    igraph_int_t new_vc;
  395|  25.2k|    igraph_int_t i;
  396|       |
  397|  25.2k|    if (nv < 0) {
  ------------------
  |  Branch (397:9): [True: 0, False: 25.2k]
  ------------------
  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|  25.2k|    IGRAPH_SAFE_ADD(graph->n, nv, &new_vc);
  ------------------
  |  |   47|  25.2k|    do { \
  |  |   48|  25.2k|        igraph_int_t _safe_a = (a), _safe_b = (b); \
  |  |   49|  25.2k|        igraph_int_t _safe_sum; \
  |  |   50|  25.2k|        if (__builtin_add_overflow(_safe_a, _safe_b, &_safe_sum)) { \
  |  |  ------------------
  |  |  |  Branch (50:13): [True: 0, False: 25.2k]
  |  |  ------------------
  |  |   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.2k|        *(res) = _safe_sum; \
  |  |   54|  25.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (54:14): [Folded, False: 25.2k]
  |  |  ------------------
  ------------------
  402|  25.2k|    if (new_vc > IGRAPH_VCOUNT_MAX) {
  ------------------
  |  |  100|  25.2k|#define IGRAPH_VCOUNT_MAX (IGRAPH_INTEGER_MAX-1)
  |  |  ------------------
  |  |  |  |   72|  25.2k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  |  |  ------------------
  ------------------
  |  Branch (402:9): [True: 0, False: 25.2k]
  ------------------
  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|  25.2k|    IGRAPH_CHECK(igraph_vector_int_reserve(&graph->os, new_vc + 1));
  ------------------
  |  |  656|  25.2k|    do { \
  |  |  657|  25.2k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  25.2k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  25.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 25.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|  25.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 25.2k]
  |  |  ------------------
  ------------------
  407|  25.2k|    IGRAPH_CHECK(igraph_vector_int_reserve(&graph->is, new_vc + 1));
  ------------------
  |  |  656|  25.2k|    do { \
  |  |  657|  25.2k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  25.2k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  25.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 25.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|  25.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 25.2k]
  |  |  ------------------
  ------------------
  408|       |
  409|  25.2k|    igraph_vector_int_resize(&graph->os, new_vc + 1); /* reserved */
  410|  25.2k|    igraph_vector_int_resize(&graph->is, new_vc + 1); /* reserved */
  411|  5.82M|    for (i = graph->n + 1; i < new_vc + 1; i++) {
  ------------------
  |  Branch (411:28): [True: 5.79M, False: 25.2k]
  ------------------
  412|  5.79M|        VECTOR(graph->os)[i] = ec;
  ------------------
  |  |   60|  5.79M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  413|  5.79M|        VECTOR(graph->is)[i] = ec;
  ------------------
  |  |   60|  5.79M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  414|  5.79M|    }
  415|       |
  416|  25.2k|    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|  25.2k|    if (graph->attr) {
  ------------------
  |  Branch (422:9): [True: 0, False: 25.2k]
  ------------------
  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|  25.2k|    igraph_i_property_cache_invalidate_conditionally(
  458|  25.2k|        graph,
  459|       |        /* keep_always = */
  460|  25.2k|        (1 << IGRAPH_PROP_HAS_LOOP) |
  461|  25.2k|        (1 << IGRAPH_PROP_HAS_MULTI) |
  462|  25.2k|        (1 << IGRAPH_PROP_HAS_MUTUAL) |
  463|  25.2k|        (1 << IGRAPH_PROP_IS_DAG) |
  464|  25.2k|        (1 << IGRAPH_PROP_IS_FOREST),
  465|       |        /* keep_when_false = */
  466|  25.2k|        igraph_vcount(graph) >= 2 ? (
  ------------------
  |  Branch (466:9): [True: 24.5k, False: 694]
  ------------------
  467|  24.5k|            (1 << IGRAPH_PROP_IS_STRONGLY_CONNECTED) |
  468|  24.5k|            (1 << IGRAPH_PROP_IS_WEAKLY_CONNECTED)
  469|  24.5k|        ) : 0,
  470|       |        /* keep_when_true = */
  471|  25.2k|        0
  472|  25.2k|    );
  473|       |
  474|  25.2k|    return IGRAPH_SUCCESS;
  475|  25.2k|}
igraph_delete_edges:
  500|  4.62k|igraph_error_t igraph_delete_edges(igraph_t *graph, igraph_es_t edges) {
  501|  4.62k|    igraph_int_t no_of_edges = igraph_ecount(graph);
  502|  4.62k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  503|  4.62k|    igraph_int_t edges_to_remove = 0;
  504|  4.62k|    igraph_int_t remaining_edges;
  505|  4.62k|    igraph_eit_t eit;
  506|       |
  507|  4.62k|    igraph_vector_int_t newfrom, newto;
  508|  4.62k|    igraph_vector_int_t newoi, newii;
  509|       |
  510|  4.62k|    igraph_bool_t *mark;
  511|  4.62k|    igraph_int_t i, j;
  512|       |
  513|  4.62k|    mark = IGRAPH_CALLOC(no_of_edges, igraph_bool_t);
  ------------------
  |  |   33|  4.62k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  9.25k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 4.62k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 4.62k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 4.62k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  514|  4.62k|    IGRAPH_CHECK_OOM(mark, "Cannot delete edges.");
  ------------------
  |  |  709|  4.62k|    do { \
  |  |  710|  4.62k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  4.62k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.62k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  4.62k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 4.62k]
  |  |  ------------------
  ------------------
  515|  4.62k|    IGRAPH_FINALLY(igraph_free, mark);
  ------------------
  |  |  603|  4.62k|    do { \
  |  |  604|  4.62k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  4.62k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  4.62k|         * incorrect destructor function with the pointer */ \
  |  |  607|  4.62k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 4.62k]
  |  |  ------------------
  |  |  608|  4.62k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  4.62k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 4.62k]
  |  |  ------------------
  ------------------
  516|       |
  517|  4.62k|    IGRAPH_CHECK(igraph_eit_create(graph, edges, &eit));
  ------------------
  |  |  656|  4.62k|    do { \
  |  |  657|  4.62k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.62k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.62k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.62k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  4.62k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.62k]
  |  |  ------------------
  ------------------
  518|  4.62k|    IGRAPH_FINALLY(igraph_eit_destroy, &eit);
  ------------------
  |  |  603|  4.62k|    do { \
  |  |  604|  4.62k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  4.62k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  4.62k|         * incorrect destructor function with the pointer */ \
  |  |  607|  4.62k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 4.62k]
  |  |  ------------------
  |  |  608|  4.62k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  4.62k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 4.62k]
  |  |  ------------------
  ------------------
  519|       |
  520|  57.3k|    for (IGRAPH_EIT_RESET(eit); !IGRAPH_EIT_END(eit); IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  393|  4.62k|#define IGRAPH_EIT_RESET(eit) ((eit).pos = (eit).start)
  ------------------
                  for (IGRAPH_EIT_RESET(eit); !IGRAPH_EIT_END(eit); IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  371|  57.3k|#define IGRAPH_EIT_END(eit)   ((eit).pos >= (eit).end)
  ------------------
                  for (IGRAPH_EIT_RESET(eit); !IGRAPH_EIT_END(eit); IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  359|  52.6k|#define IGRAPH_EIT_NEXT(eit) (++((eit).pos))
  ------------------
  |  Branch (520:33): [True: 52.6k, False: 4.62k]
  ------------------
  521|  52.6k|        igraph_int_t e = IGRAPH_EIT_GET(eit);
  ------------------
  |  |  405|  52.6k|    (igraph_int_t)((((eit).type == IGRAPH_EIT_RANGE) ? (eit).pos : \
  |  |  ------------------
  |  |  |  Branch (405:21): [True: 48.9k, False: 3.75k]
  |  |  ------------------
  |  |  406|  52.6k|                        VECTOR(*(eit).vec)[(eit).pos]))
  |  |  ------------------
  |  |  |  |   60|  3.75k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  522|  52.6k|        if (! mark[e]) {
  ------------------
  |  Branch (522:13): [True: 52.6k, False: 0]
  ------------------
  523|  52.6k|            edges_to_remove++;
  524|  52.6k|            mark[e] = true;
  525|  52.6k|        }
  526|  52.6k|    }
  527|  4.62k|    remaining_edges = no_of_edges - edges_to_remove;
  528|       |
  529|       |    /* We don't need the iterator any more */
  530|  4.62k|    igraph_eit_destroy(&eit);
  531|  4.62k|    IGRAPH_FINALLY_CLEAN(1);
  532|       |
  533|  4.62k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newfrom, remaining_edges);
  ------------------
  |  |  119|  4.62k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  4.62k|    do { \
  |  |  |  |  657|  4.62k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  4.62k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  4.62k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.62k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  4.62k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 4.62k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  4.62k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  4.62k|    do { \
  |  |  |  |  604|  4.62k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  4.62k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  4.62k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  4.62k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 4.62k]
  |  |  |  |  ------------------
  |  |  |  |  608|  4.62k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  4.62k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 4.62k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 4.62k]
  |  |  ------------------
  ------------------
  534|  4.62k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newto, remaining_edges);
  ------------------
  |  |  119|  4.62k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  4.62k|    do { \
  |  |  |  |  657|  4.62k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  4.62k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  4.62k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.62k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  4.62k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 4.62k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  4.62k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  4.62k|    do { \
  |  |  |  |  604|  4.62k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  4.62k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  4.62k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  4.62k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 4.62k]
  |  |  |  |  ------------------
  |  |  |  |  608|  4.62k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  4.62k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 4.62k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 4.62k]
  |  |  ------------------
  ------------------
  535|       |
  536|       |    /* Actually remove the edges, move from pos i to pos j in newfrom/newto */
  537|  70.5k|    for (i = 0, j = 0; j < remaining_edges; i++) {
  ------------------
  |  Branch (537:24): [True: 65.9k, False: 4.62k]
  ------------------
  538|  65.9k|        if (! mark[i]) {
  ------------------
  |  Branch (538:13): [True: 62.0k, False: 3.86k]
  ------------------
  539|  62.0k|            VECTOR(newfrom)[j] = VECTOR(graph->from)[i];
  ------------------
  |  |   60|  62.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(newfrom)[j] = VECTOR(graph->from)[i];
  ------------------
  |  |   60|  62.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  540|  62.0k|            VECTOR(newto)[j] = VECTOR(graph->to)[i];
  ------------------
  |  |   60|  62.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(newto)[j] = VECTOR(graph->to)[i];
  ------------------
  |  |   60|  62.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  541|  62.0k|            j++;
  542|  62.0k|        }
  543|  65.9k|    }
  544|       |
  545|       |    /* Create index, this might require additional memory */
  546|  4.62k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newoi, remaining_edges);
  ------------------
  |  |  119|  4.62k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  4.62k|    do { \
  |  |  |  |  657|  4.62k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  4.62k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  4.62k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.62k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  4.62k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 4.62k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  4.62k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  4.62k|    do { \
  |  |  |  |  604|  4.62k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  4.62k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  4.62k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  4.62k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 4.62k]
  |  |  |  |  ------------------
  |  |  |  |  608|  4.62k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  4.62k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 4.62k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 4.62k]
  |  |  ------------------
  ------------------
  547|  4.62k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newii, remaining_edges);
  ------------------
  |  |  119|  4.62k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  4.62k|    do { \
  |  |  |  |  657|  4.62k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  4.62k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  4.62k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.62k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  4.62k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 4.62k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  4.62k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  4.62k|    do { \
  |  |  |  |  604|  4.62k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  4.62k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  4.62k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  4.62k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 4.62k]
  |  |  |  |  ------------------
  |  |  |  |  608|  4.62k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  4.62k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 4.62k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 4.62k]
  |  |  ------------------
  ------------------
  548|  4.62k|    IGRAPH_CHECK(igraph_vector_int_pair_order(&newfrom, &newto, &newoi, no_of_nodes));
  ------------------
  |  |  656|  4.62k|    do { \
  |  |  657|  4.62k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.62k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.62k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.62k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  4.62k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.62k]
  |  |  ------------------
  ------------------
  549|  4.62k|    IGRAPH_CHECK(igraph_vector_int_pair_order(&newto, &newfrom, &newii, no_of_nodes));
  ------------------
  |  |  656|  4.62k|    do { \
  |  |  657|  4.62k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.62k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.62k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.62k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  4.62k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.62k]
  |  |  ------------------
  ------------------
  550|       |
  551|       |    /* Edge attributes, we need an index that gives the IDs of the
  552|       |       original edges for every new edge.
  553|       |    */
  554|  4.62k|    if (graph->attr) {
  ------------------
  |  Branch (554:9): [True: 0, False: 4.62k]
  ------------------
  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|  4.62k|    igraph_vector_int_destroy(&graph->from);
  569|  4.62k|    igraph_vector_int_destroy(&graph->to);
  570|  4.62k|    igraph_vector_int_destroy(&graph->oi);
  571|  4.62k|    igraph_vector_int_destroy(&graph->ii);
  572|  4.62k|    graph->from = newfrom;
  573|  4.62k|    graph->to = newto;
  574|  4.62k|    graph->oi = newoi;
  575|  4.62k|    graph->ii = newii;
  576|  4.62k|    IGRAPH_FINALLY_CLEAN(4);
  577|       |
  578|  4.62k|    IGRAPH_FREE(mark);
  ------------------
  |  |   36|  4.62k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  579|  4.62k|    IGRAPH_FINALLY_CLEAN(1);
  580|       |
  581|       |    /* Create start vectors, no memory is needed for this */
  582|  4.62k|    igraph_i_create_start_vectors(&graph->os, &graph->from, &graph->oi, no_of_nodes);
  583|  4.62k|    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|  4.62k|    igraph_i_property_cache_invalidate_conditionally(
  599|  4.62k|        graph,
  600|  4.62k|        /* keep_always = */ 0,
  601|       |        /* keep_when_false = */
  602|  4.62k|        (1 << IGRAPH_PROP_HAS_LOOP) |
  603|  4.62k|        (1 << IGRAPH_PROP_HAS_MULTI) |
  604|  4.62k|        (1 << IGRAPH_PROP_HAS_MUTUAL) |
  605|  4.62k|        (1 << IGRAPH_PROP_IS_STRONGLY_CONNECTED) |
  606|  4.62k|        (1 << IGRAPH_PROP_IS_WEAKLY_CONNECTED),
  607|       |        /* keep_when_true = */
  608|  4.62k|        (1 << IGRAPH_PROP_IS_DAG) |
  609|  4.62k|        (1 << IGRAPH_PROP_IS_FOREST)
  610|  4.62k|    );
  611|       |
  612|       |    /* Nothing to deallocate... */
  613|  4.62k|    return IGRAPH_SUCCESS;
  614|  4.62k|}
igraph_delete_vertices_map:
  648|  2.17k|) {
  649|  2.17k|    igraph_int_t no_of_edges = igraph_ecount(graph);
  650|  2.17k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  651|  2.17k|    igraph_vector_int_t edge_recoding, vertex_recoding;
  652|  2.17k|    igraph_vector_int_t *my_vertex_recoding = &vertex_recoding;
  653|  2.17k|    igraph_vit_t vit;
  654|  2.17k|    igraph_t newgraph;
  655|  2.17k|    igraph_int_t i, j;
  656|  2.17k|    igraph_int_t remaining_vertices, remaining_edges;
  657|       |
  658|  2.17k|    if (map) {
  ------------------
  |  Branch (658:9): [True: 49, False: 2.12k]
  ------------------
  659|     49|        my_vertex_recoding = map;
  660|     49|        IGRAPH_CHECK(igraph_vector_int_resize(map, no_of_nodes));
  ------------------
  |  |  656|     49|    do { \
  |  |  657|     49|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|     49|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|     49|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 49]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|     49|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 49]
  |  |  ------------------
  ------------------
  661|     49|        igraph_vector_int_null(map);
  662|  2.12k|    } else {
  663|  2.12k|        IGRAPH_VECTOR_INT_INIT_FINALLY(&vertex_recoding, no_of_nodes);
  ------------------
  |  |  119|  2.12k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.12k|    do { \
  |  |  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.12k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.12k|    do { \
  |  |  |  |  604|  2.12k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.12k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.12k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.12k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.12k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  664|  2.12k|    }
  665|       |
  666|  2.17k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&edge_recoding, no_of_edges);
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  667|       |
  668|  2.17k|    IGRAPH_CHECK(igraph_vit_create(graph, vertices, &vit));
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  669|  2.17k|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  670|       |
  671|       |    /* mark the vertices to delete */
  672|  5.48k|    for (; !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit) ) {
  ------------------
  |  |  179|  5.48k|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
                  for (; !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit) ) {
  ------------------
  |  |  167|  3.31k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  |  Branch (672:12): [True: 3.31k, False: 2.17k]
  ------------------
  673|  3.31k|        igraph_int_t vertex = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  214|  3.31k|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 2.12k, False: 1.18k]
  |  |  ------------------
  |  |  215|  3.31k|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|  1.18k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  674|  3.31k|        if (vertex < 0 || vertex >= no_of_nodes) {
  ------------------
  |  Branch (674:13): [True: 0, False: 3.31k]
  |  Branch (674:27): [True: 0, False: 3.31k]
  ------------------
  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.31k|        VECTOR(*my_vertex_recoding)[vertex] = 1;
  ------------------
  |  |   60|  3.31k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  678|  3.31k|    }
  679|       |    /* create vertex recoding vector */
  680|   373k|    for (remaining_vertices = 0, i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (680:41): [True: 371k, False: 2.17k]
  ------------------
  681|   371k|        if (VECTOR(*my_vertex_recoding)[i] == 0) {
  ------------------
  |  |   60|   371k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (681:13): [True: 368k, False: 3.31k]
  ------------------
  682|   368k|            VECTOR(*my_vertex_recoding)[i] = remaining_vertices;
  ------------------
  |  |   60|   368k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  683|   368k|            remaining_vertices++;
  684|   368k|        } else {
  685|  3.31k|            VECTOR(*my_vertex_recoding)[i] = -1;
  ------------------
  |  |   60|  3.31k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  686|  3.31k|        }
  687|   371k|    }
  688|       |    /* create edge recoding vector */
  689|  59.4k|    for (remaining_edges = 0, i = 0; i < no_of_edges; i++) {
  ------------------
  |  Branch (689:38): [True: 57.2k, False: 2.17k]
  ------------------
  690|  57.2k|        igraph_int_t from = VECTOR(graph->from)[i];
  ------------------
  |  |   60|  57.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  691|  57.2k|        igraph_int_t to = VECTOR(graph->to)[i];
  ------------------
  |  |   60|  57.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  692|  57.2k|        if (VECTOR(*my_vertex_recoding)[from] >= 0 &&
  ------------------
  |  |   60|  57.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (692:13): [True: 54.3k, False: 2.95k]
  ------------------
  693|  54.3k|            VECTOR(*my_vertex_recoding)[to  ] >= 0) {
  ------------------
  |  |   60|  54.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (693:13): [True: 51.3k, False: 3.00k]
  ------------------
  694|  51.3k|            VECTOR(edge_recoding)[i] = remaining_edges + 1;
  ------------------
  |  |   60|  51.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  695|  51.3k|            remaining_edges++;
  696|  51.3k|        }
  697|  57.2k|    }
  698|       |
  699|       |    /* start creating the graph */
  700|  2.17k|    memset(&newgraph, 0, sizeof(igraph_t));
  701|  2.17k|    newgraph.n = remaining_vertices;
  702|  2.17k|    newgraph.directed = graph->directed;
  703|       |
  704|       |    /* allocate vectors */
  705|  2.17k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newgraph.from, remaining_edges);
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  706|  2.17k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newgraph.to, remaining_edges);
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  707|  2.17k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newgraph.oi, remaining_edges);
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  708|  2.17k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newgraph.ii, remaining_edges);
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  709|  2.17k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newgraph.os, remaining_vertices + 1);
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  710|  2.17k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newgraph.is, remaining_vertices + 1);
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  711|       |
  712|       |    /* Add the edges */
  713|  57.2k|    for (i = 0, j = 0; j < remaining_edges; i++) {
  ------------------
  |  Branch (713:24): [True: 55.0k, False: 2.17k]
  ------------------
  714|  55.0k|        if (VECTOR(edge_recoding)[i] > 0) {
  ------------------
  |  |   60|  55.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (714:13): [True: 51.3k, False: 3.72k]
  ------------------
  715|  51.3k|            igraph_int_t from = VECTOR(graph->from)[i];
  ------------------
  |  |   60|  51.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  716|  51.3k|            igraph_int_t to = VECTOR(graph->to  )[i];
  ------------------
  |  |   60|  51.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  717|  51.3k|            VECTOR(newgraph.from)[j] = VECTOR(*my_vertex_recoding)[from];
  ------------------
  |  |   60|  51.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(newgraph.from)[j] = VECTOR(*my_vertex_recoding)[from];
  ------------------
  |  |   60|  51.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  718|  51.3k|            VECTOR(newgraph.to  )[j] = VECTOR(*my_vertex_recoding)[to];
  ------------------
  |  |   60|  51.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(newgraph.to  )[j] = VECTOR(*my_vertex_recoding)[to];
  ------------------
  |  |   60|  51.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  719|  51.3k|            j++;
  720|  51.3k|        }
  721|  55.0k|    }
  722|       |
  723|       |    /* update oi & ii */
  724|  2.17k|    IGRAPH_CHECK(igraph_vector_int_pair_order(&newgraph.from, &newgraph.to, &newgraph.oi,
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  725|  2.17k|                                         remaining_vertices));
  726|  2.17k|    IGRAPH_CHECK(igraph_vector_int_pair_order(&newgraph.to, &newgraph.from, &newgraph.ii,
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  727|  2.17k|                                         remaining_vertices));
  728|       |
  729|  2.17k|    IGRAPH_CHECK(igraph_i_create_start_vectors(&newgraph.os, &newgraph.from,
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  730|  2.17k|                                       &newgraph.oi, remaining_vertices));
  731|  2.17k|    IGRAPH_CHECK(igraph_i_create_start_vectors(&newgraph.is, &newgraph.to,
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  732|  2.17k|                                       &newgraph.ii, remaining_vertices));
  733|       |
  734|  2.17k|    newgraph.cache = IGRAPH_CALLOC(1, igraph_i_property_cache_t);
  ------------------
  |  |   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.34k|    (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.17k, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  735|  2.17k|    IGRAPH_CHECK_OOM(newgraph.cache, "Cannot delete vertices.");
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  736|  2.17k|    IGRAPH_FINALLY(igraph_free, newgraph.cache);
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  737|  2.17k|    IGRAPH_CHECK(igraph_i_property_cache_init(newgraph.cache));
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  738|  2.17k|    IGRAPH_FINALLY(igraph_i_property_cache_destroy, newgraph.cache);
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  739|       |
  740|       |    /* attributes */
  741|  2.17k|    IGRAPH_CHECK(igraph_i_attribute_copy(
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  742|  2.17k|        &newgraph, graph, /* graph= */ true, /* vertex= */ false, /* edge= */ false
  743|  2.17k|    ));
  744|       |
  745|       |    /* at this point igraph_destroy can take over the responsibility of
  746|       |     * deallocating the graph */
  747|  2.17k|    IGRAPH_FINALLY_CLEAN(8);    /* 2 for the property cache, 6 for the vectors */
  748|  2.17k|    IGRAPH_FINALLY(igraph_destroy, &newgraph);
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  749|       |
  750|  2.17k|    if (newgraph.attr) {
  ------------------
  |  Branch (750:9): [True: 0, False: 2.17k]
  ------------------
  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.17k|    igraph_vit_destroy(&vit);
  773|  2.17k|    igraph_vector_int_destroy(&edge_recoding);
  774|  2.17k|    igraph_destroy(graph);
  775|  2.17k|    *graph = newgraph;
  776|       |
  777|  2.17k|    IGRAPH_FINALLY_CLEAN(3);
  778|       |
  779|  2.17k|    if (invmap) {
  ------------------
  |  Branch (779:9): [True: 0, False: 2.17k]
  ------------------
  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.17k|    if (!map) {
  ------------------
  |  Branch (789:9): [True: 2.12k, False: 49]
  ------------------
  790|  2.12k|        igraph_vector_int_destroy(my_vertex_recoding);
  791|  2.12k|        IGRAPH_FINALLY_CLEAN(1);
  792|  2.12k|    }
  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.17k|    igraph_i_property_cache_invalidate_conditionally(
  805|  2.17k|        graph,
  806|  2.17k|        /* keep_always = */ 0,
  807|       |        /* keep_when_false = */
  808|  2.17k|        (1 << IGRAPH_PROP_HAS_LOOP) |
  809|  2.17k|        (1 << IGRAPH_PROP_HAS_MULTI) |
  810|  2.17k|        (1 << IGRAPH_PROP_HAS_MUTUAL),
  811|       |        /* keep_when_true = */
  812|  2.17k|        (1 << IGRAPH_PROP_IS_DAG) |
  813|  2.17k|        (1 << IGRAPH_PROP_IS_FOREST)
  814|  2.17k|    );
  815|       |
  816|  2.17k|    return IGRAPH_SUCCESS;
  817|  2.17k|}
igraph_vcount:
  829|  8.18M|igraph_int_t igraph_vcount(const igraph_t *graph) {
  830|  8.18M|    return graph->n;
  831|  8.18M|}
igraph_ecount:
  843|  94.7k|igraph_int_t igraph_ecount(const igraph_t *graph) {
  844|  94.7k|    return igraph_vector_int_size(&graph->from);
  845|  94.7k|}
igraph_neighbors:
  894|  5.84M|) {
  895|       |
  896|  5.84M|#define DEDUPLICATE_IF_NEEDED(vertex, n)                                          \
  897|  5.84M|    if (should_filter_duplicates) {                                               \
  898|  5.84M|        if (vertex == pnode) {                                                    \
  899|       |            /* This is a loop edge */                                             \
  900|  5.84M|            if (loops == IGRAPH_NO_LOOPS) {                                       \
  901|       |                /* Filtering loop edges unconditionally */                        \
  902|  5.84M|                length -= n;                                                      \
  903|  5.84M|                continue;                                                         \
  904|  5.84M|            } else if (loops == IGRAPH_LOOPS_ONCE && vertex == last_added) {      \
  905|       |                /* Filtering every second endpoint of loop edges */               \
  906|  5.84M|                length -= n;                                                      \
  907|  5.84M|                last_added = -1;                                                  \
  908|  5.84M|                seen_loop = true;                                                 \
  909|  5.84M|                continue;                                                         \
  910|  5.84M|            } else if (multiple == IGRAPH_NO_MULTIPLE && seen_loop) {             \
  911|       |                /* Filtering multi-loop edges */                                  \
  912|  5.84M|                length -= n;                                                      \
  913|  5.84M|                continue;                                                         \
  914|  5.84M|            } else {                                                              \
  915|  5.84M|                seen_loop = (loops != IGRAPH_LOOPS_TWICE || last_added == vertex);\
  916|  5.84M|                last_added = vertex;                                              \
  917|  5.84M|            }                                                                     \
  918|  5.84M|        } else {                                                                  \
  919|       |            /* Not a loop edge */                                                 \
  920|  5.84M|            if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {         \
  921|       |                /* Filtering multi-edges */                                       \
  922|  5.84M|                length -= n;                                                      \
  923|  5.84M|                continue;                                                         \
  924|  5.84M|            } else {                                                              \
  925|  5.84M|                last_added = vertex;                                              \
  926|  5.84M|            }                                                                     \
  927|  5.84M|        }                                                                         \
  928|  5.84M|    }
  929|       |
  930|  5.84M|    igraph_int_t length = 0, idx = 0;
  931|  5.84M|    igraph_int_t i, j;
  932|       |
  933|  5.84M|    igraph_int_t node = pnode;
  934|  5.84M|    igraph_int_t last_added = -1;
  935|  5.84M|    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|  5.84M|    igraph_bool_t seen_loop = false;
  943|       |
  944|       |    /* normalize Boolean value to enable == comparisons below and in DEDUPLICATE_IF_NEEDED */
  945|  5.84M|    multiple = !!multiple;
  946|       |
  947|  5.84M|    if (node < 0 || node > igraph_vcount(graph) - 1) {
  ------------------
  |  Branch (947:9): [True: 0, False: 5.84M]
  |  Branch (947:21): [True: 0, False: 5.84M]
  ------------------
  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|  5.84M|    if (mode != IGRAPH_OUT && mode != IGRAPH_IN && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (950:9): [True: 2.32M, False: 3.51M]
  |  Branch (950:31): [True: 485k, False: 1.84M]
  |  Branch (950:52): [True: 0, False: 485k]
  ------------------
  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|  5.84M|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (954:9): [True: 0, False: 5.84M]
  ------------------
  955|      0|        mode = IGRAPH_ALL;
  956|      0|    }
  957|       |
  958|  5.84M|    if (mode != IGRAPH_ALL && loops == IGRAPH_LOOPS_TWICE) {
  ------------------
  |  Branch (958:9): [True: 5.35M, False: 485k]
  |  Branch (958:31): [True: 3.59M, False: 1.76M]
  ------------------
  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.59M|        loops = IGRAPH_LOOPS_ONCE;
  964|  3.59M|    }
  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|  5.84M|    if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (969:9): [True: 4.00M, False: 1.84M]
  ------------------
  970|  4.00M|        length += (VECTOR(graph->os)[node + 1] - VECTOR(graph->os)[node]);
  ------------------
  |  |   60|  4.00M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      length += (VECTOR(graph->os)[node + 1] - VECTOR(graph->os)[node]);
  ------------------
  |  |   60|  4.00M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  971|  4.00M|    }
  972|  5.84M|    if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (972:9): [True: 2.32M, False: 3.51M]
  ------------------
  973|  2.32M|        length += (VECTOR(graph->is)[node + 1] - VECTOR(graph->is)[node]);
  ------------------
  |  |   60|  2.32M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      length += (VECTOR(graph->is)[node + 1] - VECTOR(graph->is)[node]);
  ------------------
  |  |   60|  2.32M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  974|  2.32M|    }
  975|       |
  976|  5.84M|    IGRAPH_CHECK(igraph_vector_int_resize(neis, length));
  ------------------
  |  |  656|  5.84M|    do { \
  |  |  657|  5.84M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  5.84M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  5.84M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.84M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, 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.84M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 5.84M]
  |  |  ------------------
  ------------------
  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|  5.84M|    if (!igraph_is_directed(graph) || mode != IGRAPH_ALL) {
  ------------------
  |  Branch (987:9): [True: 0, False: 5.84M]
  |  Branch (987:39): [True: 5.35M, False: 485k]
  ------------------
  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.35M|        should_filter_duplicates = !(multiple == IGRAPH_MULTIPLE &&
  ------------------
  |  Branch (991:38): [True: 5.33M, False: 20.6k]
  ------------------
  992|  5.33M|                ((!igraph_is_directed(graph) && loops == IGRAPH_LOOPS_TWICE) ||
  ------------------
  |  Branch (992:19): [True: 0, False: 5.33M]
  |  Branch (992:49): [True: 0, False: 0]
  ------------------
  993|  5.33M|                 (igraph_is_directed(graph) && loops != IGRAPH_NO_LOOPS)));
  ------------------
  |  Branch (993:19): [True: 5.33M, False: 0]
  |  Branch (993:48): [True: 5.16M, False: 168k]
  ------------------
  994|       |
  995|  5.35M|        if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (995:13): [True: 3.51M, False: 1.84M]
  ------------------
  996|  3.51M|            j = VECTOR(graph->os)[node + 1];
  ------------------
  |  |   60|  3.51M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  997|  4.53M|            for (i = VECTOR(graph->os)[node]; i < j; i++) {
  ------------------
  |  |   60|  3.51M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (997:47): [True: 1.01M, False: 3.51M]
  ------------------
  998|  1.01M|                igraph_int_t to = VECTOR(graph->to)[ VECTOR(graph->oi)[i] ];
  ------------------
  |  |   60|  1.01M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              igraph_int_t to = VECTOR(graph->to)[ VECTOR(graph->oi)[i] ];
  ------------------
  |  |   60|  1.01M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  999|  1.01M|                DEDUPLICATE_IF_NEEDED(to, 1);
  ------------------
  |  |  897|  1.01M|    if (should_filter_duplicates) {                                               \
  |  |  ------------------
  |  |  |  Branch (897:9): [True: 99.0k, False: 918k]
  |  |  ------------------
  |  |  898|  99.0k|        if (vertex == pnode) {                                                    \
  |  |  ------------------
  |  |  |  Branch (898:13): [True: 20.6k, False: 78.4k]
  |  |  ------------------
  |  |  899|  20.6k|            /* This is a loop edge */                                             \
  |  |  900|  20.6k|            if (loops == IGRAPH_NO_LOOPS) {                                       \
  |  |  ------------------
  |  |  |  Branch (900:17): [True: 20.6k, False: 0]
  |  |  ------------------
  |  |  901|  20.6k|                /* Filtering loop edges unconditionally */                        \
  |  |  902|  20.6k|                length -= n;                                                      \
  |  |  903|  20.6k|                continue;                                                         \
  |  |  904|  20.6k|            } 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|  78.4k|        } else {                                                                  \
  |  |  919|  78.4k|            /* Not a loop edge */                                                 \
  |  |  920|  78.4k|            if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {         \
  |  |  ------------------
  |  |  |  Branch (920:17): [True: 22.6k, False: 55.7k]
  |  |  |  Branch (920:51): [True: 9.43k, False: 13.2k]
  |  |  ------------------
  |  |  921|  9.43k|                /* Filtering multi-edges */                                       \
  |  |  922|  9.43k|                length -= n;                                                      \
  |  |  923|  9.43k|                continue;                                                         \
  |  |  924|  68.9k|            } else {                                                              \
  |  |  925|  68.9k|                last_added = vertex;                                              \
  |  |  926|  68.9k|            }                                                                     \
  |  |  927|  78.4k|        }                                                                         \
  |  |  928|  99.0k|    }
  ------------------
 1000|   987k|                VECTOR(*neis)[idx++] = to;
  ------------------
  |  |   60|   987k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1001|   987k|            }
 1002|  3.51M|        }
 1003|       |
 1004|  5.35M|        if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (1004:13): [True: 1.84M, False: 3.51M]
  ------------------
 1005|  1.84M|            j = VECTOR(graph->is)[node + 1];
  ------------------
  |  |   60|  1.84M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1006|  2.28M|            for (i = VECTOR(graph->is)[node]; i < j; i++) {
  ------------------
  |  |   60|  1.84M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1006:47): [True: 446k, False: 1.84M]
  ------------------
 1007|   446k|                igraph_int_t from = VECTOR(graph->from)[ VECTOR(graph->ii)[i] ];
  ------------------
  |  |   60|   446k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              igraph_int_t from = VECTOR(graph->from)[ VECTOR(graph->ii)[i] ];
  ------------------
  |  |   60|   446k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1008|   446k|                DEDUPLICATE_IF_NEEDED(from, 1);
  ------------------
  |  |  897|   446k|    if (should_filter_duplicates) {                                               \
  |  |  ------------------
  |  |  |  Branch (897:9): [True: 36.7k, False: 409k]
  |  |  ------------------
  |  |  898|  36.7k|        if (vertex == pnode) {                                                    \
  |  |  ------------------
  |  |  |  Branch (898:13): [True: 10.3k, False: 26.4k]
  |  |  ------------------
  |  |  899|  10.3k|            /* This is a loop edge */                                             \
  |  |  900|  10.3k|            if (loops == IGRAPH_NO_LOOPS) {                                       \
  |  |  ------------------
  |  |  |  Branch (900:17): [True: 10.3k, False: 0]
  |  |  ------------------
  |  |  901|  10.3k|                /* Filtering loop edges unconditionally */                        \
  |  |  902|  10.3k|                length -= n;                                                      \
  |  |  903|  10.3k|                continue;                                                         \
  |  |  904|  10.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|  26.4k|        } else {                                                                  \
  |  |  919|  26.4k|            /* Not a loop edge */                                                 \
  |  |  920|  26.4k|            if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {         \
  |  |  ------------------
  |  |  |  Branch (920:17): [True: 22.8k, False: 3.63k]
  |  |  |  Branch (920:51): [True: 10.1k, False: 12.6k]
  |  |  ------------------
  |  |  921|  10.1k|                /* Filtering multi-edges */                                       \
  |  |  922|  10.1k|                length -= n;                                                      \
  |  |  923|  10.1k|                continue;                                                         \
  |  |  924|  16.2k|            } else {                                                              \
  |  |  925|  16.2k|                last_added = vertex;                                              \
  |  |  926|  16.2k|            }                                                                     \
  |  |  927|  26.4k|        }                                                                         \
  |  |  928|  36.7k|    }
  ------------------
 1009|   425k|                VECTOR(*neis)[idx++] = from;
  ------------------
  |  |   60|   425k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1010|   425k|            }
 1011|  1.84M|        }
 1012|  5.35M|    } 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|   485k|        igraph_int_t j1 = VECTOR(graph->os)[node + 1];
  ------------------
  |  |   60|   485k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1017|   485k|        igraph_int_t j2 = VECTOR(graph->is)[node + 1];
  ------------------
  |  |   60|   485k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1018|   485k|        igraph_int_t i1 = VECTOR(graph->os)[node];
  ------------------
  |  |   60|   485k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1019|   485k|        igraph_int_t i2 = VECTOR(graph->is)[node];
  ------------------
  |  |   60|   485k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1020|   485k|        igraph_int_t eid1, eid2;
 1021|   485k|        igraph_int_t n1, n2;
 1022|       |
 1023|   485k|        should_filter_duplicates = !(multiple == IGRAPH_MULTIPLE &&
  ------------------
  |  Branch (1023:38): [True: 485k, False: 0]
  ------------------
 1024|   485k|                loops == IGRAPH_LOOPS_TWICE);
  ------------------
  |  Branch (1024:17): [True: 0, False: 485k]
  ------------------
 1025|       |
 1026|   558k|        while (i1 < j1 && i2 < j2) {
  ------------------
  |  Branch (1026:16): [True: 100k, False: 458k]
  |  Branch (1026:27): [True: 72.9k, False: 27.6k]
  ------------------
 1027|  72.9k|            eid1 = VECTOR(graph->oi)[i1];
  ------------------
  |  |   60|  72.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1028|  72.9k|            eid2 = VECTOR(graph->ii)[i2];
  ------------------
  |  |   60|  72.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1029|  72.9k|            n1 = VECTOR(graph->to)[eid1];
  ------------------
  |  |   60|  72.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1030|  72.9k|            n2 = VECTOR(graph->from)[eid2];
  ------------------
  |  |   60|  72.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1031|  72.9k|            if (n1 < n2) {
  ------------------
  |  Branch (1031:17): [True: 23.6k, False: 49.2k]
  ------------------
 1032|  23.6k|                i1++;
 1033|  23.6k|                DEDUPLICATE_IF_NEEDED(n1, 1);
  ------------------
  |  |  897|  23.6k|    if (should_filter_duplicates) {                                               \
  |  |  ------------------
  |  |  |  Branch (897:9): [True: 23.6k, False: 0]
  |  |  ------------------
  |  |  898|  23.6k|        if (vertex == pnode) {                                                    \
  |  |  ------------------
  |  |  |  Branch (898:13): [True: 0, False: 23.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|  23.6k|        } else {                                                                  \
  |  |  919|  23.6k|            /* Not a loop edge */                                                 \
  |  |  920|  23.6k|            if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {         \
  |  |  ------------------
  |  |  |  Branch (920:17): [True: 0, False: 23.6k]
  |  |  |  Branch (920:51): [True: 0, False: 0]
  |  |  ------------------
  |  |  921|      0|                /* Filtering multi-edges */                                       \
  |  |  922|      0|                length -= n;                                                      \
  |  |  923|      0|                continue;                                                         \
  |  |  924|  23.6k|            } else {                                                              \
  |  |  925|  23.6k|                last_added = vertex;                                              \
  |  |  926|  23.6k|            }                                                                     \
  |  |  927|  23.6k|        }                                                                         \
  |  |  928|  23.6k|    }
  ------------------
 1034|  23.6k|                VECTOR(*neis)[idx++] = n1;
  ------------------
  |  |   60|  23.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1035|  49.2k|            } else if (n1 > n2) {
  ------------------
  |  Branch (1035:24): [True: 24.7k, False: 24.5k]
  ------------------
 1036|  24.7k|                i2++;
 1037|  24.7k|                DEDUPLICATE_IF_NEEDED(n2, 1);
  ------------------
  |  |  897|  24.7k|    if (should_filter_duplicates) {                                               \
  |  |  ------------------
  |  |  |  Branch (897:9): [True: 24.7k, False: 0]
  |  |  ------------------
  |  |  898|  24.7k|        if (vertex == pnode) {                                                    \
  |  |  ------------------
  |  |  |  Branch (898:13): [True: 0, False: 24.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|  24.7k|        } else {                                                                  \
  |  |  919|  24.7k|            /* Not a loop edge */                                                 \
  |  |  920|  24.7k|            if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {         \
  |  |  ------------------
  |  |  |  Branch (920:17): [True: 0, False: 24.7k]
  |  |  |  Branch (920:51): [True: 0, False: 0]
  |  |  ------------------
  |  |  921|      0|                /* Filtering multi-edges */                                       \
  |  |  922|      0|                length -= n;                                                      \
  |  |  923|      0|                continue;                                                         \
  |  |  924|  24.7k|            } else {                                                              \
  |  |  925|  24.7k|                last_added = vertex;                                              \
  |  |  926|  24.7k|            }                                                                     \
  |  |  927|  24.7k|        }                                                                         \
  |  |  928|  24.7k|    }
  ------------------
 1038|  24.7k|                VECTOR(*neis)[idx++] = n2;
  ------------------
  |  |   60|  24.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1039|  24.7k|            } else {
 1040|  24.5k|                i1++;
 1041|  24.5k|                i2++;
 1042|  24.5k|                DEDUPLICATE_IF_NEEDED(n1, 2);
  ------------------
  |  |  897|  24.5k|    if (should_filter_duplicates) {                                               \
  |  |  ------------------
  |  |  |  Branch (897:9): [True: 24.5k, False: 0]
  |  |  ------------------
  |  |  898|  24.5k|        if (vertex == pnode) {                                                    \
  |  |  ------------------
  |  |  |  Branch (898:13): [True: 13.4k, False: 11.0k]
  |  |  ------------------
  |  |  899|  13.4k|            /* This is a loop edge */                                             \
  |  |  900|  13.4k|            if (loops == IGRAPH_NO_LOOPS) {                                       \
  |  |  ------------------
  |  |  |  Branch (900:17): [True: 13.4k, False: 0]
  |  |  ------------------
  |  |  901|  13.4k|                /* Filtering loop edges unconditionally */                        \
  |  |  902|  13.4k|                length -= n;                                                      \
  |  |  903|  13.4k|                continue;                                                         \
  |  |  904|  13.4k|            } 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|  13.4k|        } else {                                                                  \
  |  |  919|  11.0k|            /* Not a loop edge */                                                 \
  |  |  920|  11.0k|            if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {         \
  |  |  ------------------
  |  |  |  Branch (920:17): [True: 0, False: 11.0k]
  |  |  |  Branch (920:51): [True: 0, False: 0]
  |  |  ------------------
  |  |  921|      0|                /* Filtering multi-edges */                                       \
  |  |  922|      0|                length -= n;                                                      \
  |  |  923|      0|                continue;                                                         \
  |  |  924|  11.0k|            } else {                                                              \
  |  |  925|  11.0k|                last_added = vertex;                                              \
  |  |  926|  11.0k|            }                                                                     \
  |  |  927|  11.0k|        }                                                                         \
  |  |  928|  24.5k|    }
  ------------------
 1043|  11.0k|                VECTOR(*neis)[idx++] = n1;
  ------------------
  |  |   60|  11.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1044|  11.0k|                DEDUPLICATE_IF_NEEDED(n2, 1);
  ------------------
  |  |  897|  11.0k|    if (should_filter_duplicates) {                                               \
  |  |  ------------------
  |  |  |  Branch (897:9): [True: 11.0k, False: 0]
  |  |  ------------------
  |  |  898|  11.0k|        if (vertex == pnode) {                                                    \
  |  |  ------------------
  |  |  |  Branch (898:13): [True: 0, False: 11.0k]
  |  |  ------------------
  |  |  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.0k|        } else {                                                                  \
  |  |  919|  11.0k|            /* Not a loop edge */                                                 \
  |  |  920|  11.0k|            if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {         \
  |  |  ------------------
  |  |  |  Branch (920:17): [True: 0, False: 11.0k]
  |  |  |  Branch (920:51): [True: 0, False: 0]
  |  |  ------------------
  |  |  921|      0|                /* Filtering multi-edges */                                       \
  |  |  922|      0|                length -= n;                                                      \
  |  |  923|      0|                continue;                                                         \
  |  |  924|  11.0k|            } else {                                                              \
  |  |  925|  11.0k|                last_added = vertex;                                              \
  |  |  926|  11.0k|            }                                                                     \
  |  |  927|  11.0k|        }                                                                         \
  |  |  928|  11.0k|    }
  ------------------
 1045|  11.0k|                VECTOR(*neis)[idx++] = n2;
  ------------------
  |  |   60|  11.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1046|  11.0k|            }
 1047|  72.9k|        }
 1048|       |
 1049|   528k|        while (i1 < j1) {
  ------------------
  |  Branch (1049:16): [True: 42.6k, False: 485k]
  ------------------
 1050|  42.6k|            eid1 = VECTOR(graph->oi)[i1++];
  ------------------
  |  |   60|  42.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1051|  42.6k|            igraph_int_t to = VECTOR(graph->to)[eid1];
  ------------------
  |  |   60|  42.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1052|  42.6k|            DEDUPLICATE_IF_NEEDED(to, 1);
  ------------------
  |  |  897|  42.6k|    if (should_filter_duplicates) {                                               \
  |  |  ------------------
  |  |  |  Branch (897:9): [True: 42.6k, False: 0]
  |  |  ------------------
  |  |  898|  42.6k|        if (vertex == pnode) {                                                    \
  |  |  ------------------
  |  |  |  Branch (898:13): [True: 0, False: 42.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|  42.6k|        } else {                                                                  \
  |  |  919|  42.6k|            /* Not a loop edge */                                                 \
  |  |  920|  42.6k|            if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {         \
  |  |  ------------------
  |  |  |  Branch (920:17): [True: 0, False: 42.6k]
  |  |  |  Branch (920:51): [True: 0, False: 0]
  |  |  ------------------
  |  |  921|      0|                /* Filtering multi-edges */                                       \
  |  |  922|      0|                length -= n;                                                      \
  |  |  923|      0|                continue;                                                         \
  |  |  924|  42.6k|            } else {                                                              \
  |  |  925|  42.6k|                last_added = vertex;                                              \
  |  |  926|  42.6k|            }                                                                     \
  |  |  927|  42.6k|        }                                                                         \
  |  |  928|  42.6k|    }
  ------------------
 1053|  42.6k|            VECTOR(*neis)[idx++] = to;
  ------------------
  |  |   60|  42.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1054|  42.6k|        }
 1055|       |
 1056|   527k|        while (i2 < j2) {
  ------------------
  |  Branch (1056:16): [True: 41.6k, False: 485k]
  ------------------
 1057|  41.6k|            eid2 = VECTOR(graph->ii)[i2++];
  ------------------
  |  |   60|  41.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1058|  41.6k|            igraph_int_t from = VECTOR(graph->from)[eid2];
  ------------------
  |  |   60|  41.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1059|  41.6k|            DEDUPLICATE_IF_NEEDED(from, 1);
  ------------------
  |  |  897|  41.6k|    if (should_filter_duplicates) {                                               \
  |  |  ------------------
  |  |  |  Branch (897:9): [True: 41.6k, False: 0]
  |  |  ------------------
  |  |  898|  41.6k|        if (vertex == pnode) {                                                    \
  |  |  ------------------
  |  |  |  Branch (898:13): [True: 0, False: 41.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|  41.6k|        } else {                                                                  \
  |  |  919|  41.6k|            /* Not a loop edge */                                                 \
  |  |  920|  41.6k|            if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {         \
  |  |  ------------------
  |  |  |  Branch (920:17): [True: 0, False: 41.6k]
  |  |  |  Branch (920:51): [True: 0, False: 0]
  |  |  ------------------
  |  |  921|      0|                /* Filtering multi-edges */                                       \
  |  |  922|      0|                length -= n;                                                      \
  |  |  923|      0|                continue;                                                         \
  |  |  924|  41.6k|            } else {                                                              \
  |  |  925|  41.6k|                last_added = vertex;                                              \
  |  |  926|  41.6k|            }                                                                     \
  |  |  927|  41.6k|        }                                                                         \
  |  |  928|  41.6k|    }
  ------------------
 1060|  41.6k|            VECTOR(*neis)[idx++] = from;
  ------------------
  |  |   60|  41.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1061|  41.6k|        }
 1062|       |
 1063|   485k|    }
 1064|  5.84M|    IGRAPH_CHECK(igraph_vector_int_resize(neis, length));
  ------------------
  |  |  656|  5.84M|    do { \
  |  |  657|  5.84M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  5.84M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  5.84M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.84M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, 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.84M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 5.84M]
  |  |  ------------------
  ------------------
 1065|       |
 1066|  5.84M|    return IGRAPH_SUCCESS;
 1067|  5.84M|#undef DEDUPLICATE_IF_NEEDED
 1068|  5.84M|}
igraph_is_directed:
 1133|  24.6M|igraph_bool_t igraph_is_directed(const igraph_t *graph) {
 1134|  24.6M|    return graph->directed;
 1135|  24.6M|}
igraph_degree_1:
 1165|  6.36k|) {
 1166|  6.36k|    igraph_int_t loop_counter;
 1167|       |
 1168|  6.36k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (1168:9): [True: 0, False: 6.36k]
  ------------------
 1169|      0|        mode = IGRAPH_ALL;
 1170|      0|    }
 1171|       |
 1172|  6.36k|    if (loops != IGRAPH_NO_LOOPS && loops != IGRAPH_LOOPS_ONCE &&
  ------------------
  |  Branch (1172:9): [True: 2.12k, False: 4.24k]
  |  Branch (1172:37): [True: 2.12k, False: 0]
  ------------------
 1173|  2.12k|        loops != IGRAPH_LOOPS_TWICE) {
  ------------------
  |  Branch (1173:9): [True: 0, False: 2.12k]
  ------------------
 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.36k|    if (loops == IGRAPH_LOOPS_ONCE && (mode & IGRAPH_ALL) != IGRAPH_ALL) {
  ------------------
  |  Branch (1177:9): [True: 0, False: 6.36k]
  |  Branch (1177:39): [True: 0, False: 0]
  ------------------
 1178|      0|        loops = IGRAPH_LOOPS_TWICE;
 1179|      0|    }
 1180|       |
 1181|  6.36k|    *deg = 0;
 1182|  6.36k|    if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (1182:9): [True: 4.24k, False: 2.12k]
  ------------------
 1183|  4.24k|        *deg += (VECTOR(graph->os)[vid + 1] - VECTOR(graph->os)[vid]);
  ------------------
  |  |   60|  4.24k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      *deg += (VECTOR(graph->os)[vid + 1] - VECTOR(graph->os)[vid]);
  ------------------
  |  |   60|  4.24k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1184|  4.24k|    }
 1185|  6.36k|    if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (1185:9): [True: 2.12k, False: 4.24k]
  ------------------
 1186|  2.12k|        *deg += (VECTOR(graph->is)[vid + 1] - VECTOR(graph->is)[vid]);
  ------------------
  |  |   60|  2.12k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      *deg += (VECTOR(graph->is)[vid + 1] - VECTOR(graph->is)[vid]);
  ------------------
  |  |   60|  2.12k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1187|  2.12k|    }
 1188|       |
 1189|  6.36k|    if (loops != IGRAPH_LOOPS_TWICE) {
  ------------------
  |  Branch (1189:9): [True: 4.24k, False: 2.12k]
  ------------------
 1190|       |        /* When loops should not be counted, we remove their contribution from the
 1191|       |         * previously computed degree. */
 1192|  4.24k|        loop_counter = 0;
 1193|  4.24k|        if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (1193:13): [True: 2.12k, False: 2.12k]
  ------------------
 1194|  19.1k|            for (igraph_int_t i = VECTOR(graph->os)[vid]; i < VECTOR(graph->os)[vid + 1]; i++) {
  ------------------
  |  |   60|  2.12k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          for (igraph_int_t i = VECTOR(graph->os)[vid]; i < VECTOR(graph->os)[vid + 1]; i++) {
  ------------------
  |  |   60|  19.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1194:59): [True: 17.0k, False: 2.12k]
  ------------------
 1195|  17.0k|                if (VECTOR(graph->to)[ VECTOR(graph->oi)[i] ] == vid) {
  ------------------
  |  |   60|  17.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              if (VECTOR(graph->to)[ VECTOR(graph->oi)[i] ] == vid) {
  ------------------
  |  |   60|  17.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1195:21): [True: 9.17k, False: 7.86k]
  ------------------
 1196|  9.17k|                    loop_counter++;
 1197|  9.17k|                }
 1198|  17.0k|            }
 1199|  2.12k|        }
 1200|  4.24k|        if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (1200:13): [True: 2.12k, False: 2.12k]
  ------------------
 1201|  4.94k|            for (igraph_int_t i = VECTOR(graph->is)[vid]; i < VECTOR(graph->is)[vid + 1]; i++) {
  ------------------
  |  |   60|  2.12k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          for (igraph_int_t i = VECTOR(graph->is)[vid]; i < VECTOR(graph->is)[vid + 1]; i++) {
  ------------------
  |  |   60|  4.94k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1201:59): [True: 2.81k, False: 2.12k]
  ------------------
 1202|  2.81k|                if (VECTOR(graph->from)[ VECTOR(graph->ii)[i] ] == vid) {
  ------------------
  |  |   60|  2.81k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              if (VECTOR(graph->from)[ VECTOR(graph->ii)[i] ] == vid) {
  ------------------
  |  |   60|  2.81k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1202:21): [True: 0, False: 2.81k]
  ------------------
 1203|      0|                    loop_counter++;
 1204|      0|                }
 1205|  2.81k|            }
 1206|  2.12k|        }
 1207|       |
 1208|  4.24k|        if (loops == IGRAPH_NO_LOOPS || mode != IGRAPH_ALL) {
  ------------------
  |  Branch (1208:13): [True: 4.24k, False: 0]
  |  Branch (1208:41): [True: 0, False: 0]
  ------------------
 1209|  4.24k|            *deg -= loop_counter;
 1210|  4.24k|        } else {
 1211|       |            /* loops == IGRAPH_LOOPS_ONCE && mode == IGRAPH_ALL */
 1212|      0|            *deg -= loop_counter / 2;
 1213|      0|        }
 1214|  4.24k|    }
 1215|       |
 1216|  6.36k|    return IGRAPH_SUCCESS;
 1217|  6.36k|}
igraph_degree:
 1268|  43.7k|) {
 1269|       |
 1270|  43.7k|    igraph_int_t nodes_to_calc;
 1271|  43.7k|    igraph_int_t i, j;
 1272|  43.7k|    igraph_vit_t vit;
 1273|       |
 1274|  43.7k|    IGRAPH_CHECK(igraph_vit_create(graph, vids, &vit));
  ------------------
  |  |  656|  43.7k|    do { \
  |  |  657|  43.7k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  43.7k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  43.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 43.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|  43.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 43.7k]
  |  |  ------------------
  ------------------
 1275|  43.7k|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  603|  43.7k|    do { \
  |  |  604|  43.7k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  43.7k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  43.7k|         * incorrect destructor function with the pointer */ \
  |  |  607|  43.7k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 43.7k]
  |  |  ------------------
  |  |  608|  43.7k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  43.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 43.7k]
  |  |  ------------------
  ------------------
 1276|       |
 1277|  43.7k|    if (mode != IGRAPH_OUT && mode != IGRAPH_IN && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (1277:9): [True: 21.7k, False: 22.0k]
  |  Branch (1277:31): [True: 2.36k, False: 19.3k]
  |  Branch (1277:52): [True: 0, False: 2.36k]
  ------------------
 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|  43.7k|    if (loops == IGRAPH_NO_LOOPS || loops == IGRAPH_LOOPS_ONCE) {
  ------------------
  |  Branch (1281:9): [True: 7.41k, False: 36.3k]
  |  Branch (1281:37): [True: 0, False: 36.3k]
  ------------------
 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|  7.41k|        if (igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_LOOP) &&
  ------------------
  |  Branch (1285:13): [True: 7.41k, False: 0]
  ------------------
 1286|  7.41k|            !igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_HAS_LOOP)) {
  ------------------
  |  Branch (1286:13): [True: 5.17k, False: 2.23k]
  ------------------
 1287|  5.17k|            loops = IGRAPH_LOOPS_TWICE;
 1288|  5.17k|        }
 1289|  7.41k|    }
 1290|       |
 1291|  43.7k|    if (loops == IGRAPH_LOOPS_ONCE && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (1291:9): [True: 0, False: 43.7k]
  |  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|  43.7k|    nodes_to_calc = IGRAPH_VIT_SIZE(vit);
  ------------------
  |  |  190|  43.7k|#define IGRAPH_VIT_SIZE(vit)  ((vit).end - (vit).start)
  ------------------
 1297|  43.7k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (1297:9): [True: 0, False: 43.7k]
  ------------------
 1298|      0|        mode = IGRAPH_ALL;
 1299|      0|    }
 1300|       |
 1301|  43.7k|    IGRAPH_CHECK(igraph_vector_int_resize(res, nodes_to_calc));
  ------------------
  |  |  656|  43.7k|    do { \
  |  |  657|  43.7k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  43.7k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  43.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 43.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|  43.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 43.7k]
  |  |  ------------------
  ------------------
 1302|  43.7k|    igraph_vector_int_null(res);
 1303|       |
 1304|  43.7k|    if (loops == IGRAPH_LOOPS_TWICE) {
  ------------------
  |  Branch (1304:9): [True: 41.5k, False: 2.23k]
  ------------------
 1305|  41.5k|        if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (1305:13): [True: 22.8k, False: 18.6k]
  ------------------
 1306|  22.8k|            for (IGRAPH_VIT_RESET(vit), i = 0;
  ------------------
  |  |  201|  22.8k|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
 1307|  3.90M|                 !IGRAPH_VIT_END(vit);
  ------------------
  |  |  179|  3.90M|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (1307:18): [True: 3.88M, False: 22.8k]
  ------------------
 1308|  3.88M|                 IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  167|  3.88M|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
 1309|  3.88M|                igraph_int_t vid = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  214|  3.88M|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 3.88M, False: 0]
  |  |  ------------------
  |  |  215|  3.88M|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1310|  3.88M|                VECTOR(*res)[i] += (VECTOR(graph->os)[vid + 1] - VECTOR(graph->os)[vid]);
  ------------------
  |  |   60|  3.88M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[i] += (VECTOR(graph->os)[vid + 1] - VECTOR(graph->os)[vid]);
  ------------------
  |  |   60|  3.88M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[i] += (VECTOR(graph->os)[vid + 1] - VECTOR(graph->os)[vid]);
  ------------------
  |  |   60|  3.88M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1311|  3.88M|            }
 1312|  22.8k|        }
 1313|  41.5k|        if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (1313:13): [True: 20.1k, False: 21.3k]
  ------------------
 1314|  20.1k|            for (IGRAPH_VIT_RESET(vit), i = 0;
  ------------------
  |  |  201|  20.1k|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
 1315|  3.44M|                 !IGRAPH_VIT_END(vit);
  ------------------
  |  |  179|  3.44M|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (1315:18): [True: 3.42M, False: 20.1k]
  ------------------
 1316|  3.42M|                 IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  167|  3.42M|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
 1317|  3.42M|                igraph_int_t vid = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  214|  3.42M|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 3.42M, False: 0]
  |  |  ------------------
  |  |  215|  3.42M|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1318|  3.42M|                VECTOR(*res)[i] += (VECTOR(graph->is)[vid + 1] - VECTOR(graph->is)[vid]);
  ------------------
  |  |   60|  3.42M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[i] += (VECTOR(graph->is)[vid + 1] - VECTOR(graph->is)[vid]);
  ------------------
  |  |   60|  3.42M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[i] += (VECTOR(graph->is)[vid + 1] - VECTOR(graph->is)[vid]);
  ------------------
  |  |   60|  3.42M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1319|  3.42M|            }
 1320|  20.1k|        }
 1321|  41.5k|    } else if (loops == IGRAPH_LOOPS_ONCE) {
  ------------------
  |  Branch (1321:16): [True: 0, False: 2.23k]
  ------------------
 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.23k|    } else {
 1368|       |        /* no loops should be counted */
 1369|  2.23k|        if (igraph_vs_is_all(&vids)) {
  ------------------
  |  Branch (1369:13): [True: 2.23k, False: 0]
  ------------------
 1370|       |            // When calculating degree for all vertices, iterating over edges is faster
 1371|  2.23k|            igraph_int_t no_of_edges = igraph_ecount(graph);
 1372|       |
 1373|  2.23k|            if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (1373:17): [True: 1.53k, False: 699]
  ------------------
 1374|  67.9k|                for (igraph_int_t edge = 0; edge < no_of_edges; ++edge) {
  ------------------
  |  Branch (1374:45): [True: 66.3k, False: 1.53k]
  ------------------
 1375|  66.3k|                    igraph_int_t from = IGRAPH_FROM(graph, edge);
  ------------------
  |  |  115|  66.3k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  66.3k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1376|  66.3k|                    if (from != IGRAPH_TO(graph, edge)) {
  ------------------
  |  |  128|  66.3k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  66.3k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (1376:25): [True: 38.1k, False: 28.2k]
  ------------------
 1377|  38.1k|                        VECTOR(*res)[from]++;
  ------------------
  |  |   60|  38.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1378|  38.1k|                    }
 1379|  66.3k|                }
 1380|  1.53k|            }
 1381|  2.23k|            if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (1381:17): [True: 1.53k, False: 699]
  ------------------
 1382|  67.9k|                for (igraph_int_t edge = 0; edge < no_of_edges; ++edge) {
  ------------------
  |  Branch (1382:45): [True: 66.3k, False: 1.53k]
  ------------------
 1383|  66.3k|                    igraph_int_t to = IGRAPH_TO(graph, edge);
  ------------------
  |  |  128|  66.3k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  66.3k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1384|  66.3k|                    if (IGRAPH_FROM(graph, edge) != to) {
  ------------------
  |  |  115|  66.3k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  66.3k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (1384:25): [True: 38.1k, False: 28.2k]
  ------------------
 1385|  38.1k|                        VECTOR(*res)[to]++;
  ------------------
  |  |   60|  38.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1386|  38.1k|                    }
 1387|  66.3k|                }
 1388|  1.53k|            }
 1389|  2.23k|        } 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.23k|    }
 1420|       |
 1421|  43.7k|    igraph_vit_destroy(&vit);
 1422|  43.7k|    IGRAPH_FINALLY_CLEAN(1);
 1423|       |
 1424|  43.7k|    return IGRAPH_SUCCESS;
 1425|  43.7k|}
igraph_get_eid:
 1524|  3.09k|                   igraph_bool_t directed, igraph_bool_t error) {
 1525|       |
 1526|  3.09k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
 1527|       |
 1528|  3.09k|    if (from < 0 || to < 0 || from >= no_of_nodes || to >= no_of_nodes) {
  ------------------
  |  Branch (1528:9): [True: 0, False: 3.09k]
  |  Branch (1528:21): [True: 0, False: 3.09k]
  |  Branch (1528:31): [True: 0, False: 3.09k]
  |  Branch (1528:54): [True: 0, False: 3.09k]
  ------------------
 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.09k|    *eid = -1;
 1533|  3.09k|    if (igraph_is_directed(graph)) {
  ------------------
  |  Branch (1533:9): [True: 3.09k, False: 0]
  ------------------
 1534|       |
 1535|       |        /* Directed graph */
 1536|  3.09k|        FIND_DIRECTED_EDGE(graph, from, to, eid);
  ------------------
  |  | 1469|  3.09k|    do { \
  |  | 1470|  3.09k|        igraph_int_t start = VECTOR(graph->os)[xfrom]; \
  |  |  ------------------
  |  |  |  |   60|  3.09k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1471|  3.09k|        igraph_int_t end = VECTOR(graph->os)[xfrom+1]; \
  |  |  ------------------
  |  |  |  |   60|  3.09k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1472|  3.09k|        igraph_int_t N = end; \
  |  | 1473|  3.09k|        igraph_int_t start2 = VECTOR(graph->is)[xto]; \
  |  |  ------------------
  |  |  |  |   60|  3.09k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1474|  3.09k|        igraph_int_t end2 = VECTOR(graph->is)[xto+1]; \
  |  |  ------------------
  |  |  |  |   60|  3.09k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1475|  3.09k|        igraph_int_t N2 = end2; \
  |  | 1476|  3.09k|        igraph_int_t *nullpointer = NULL; \
  |  | 1477|  3.09k|        if (end-start < end2-start2) { \
  |  |  ------------------
  |  |  |  Branch (1477:13): [True: 384, False: 2.71k]
  |  |  ------------------
  |  | 1478|    384|            BINSEARCH(start, end, xto, graph->oi, graph->to, N, eid, nullpointer); \
  |  |  ------------------
  |  |  |  | 1449|    384|    do { \
  |  |  |  | 1450|    815|        while ((start) < (end)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1450:16): [True: 431, False: 384]
  |  |  |  |  ------------------
  |  |  |  | 1451|    431|            igraph_int_t mid =(start)+((end)-(start))/2; \
  |  |  |  | 1452|    431|            igraph_int_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|    431|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1453|    431|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|    431|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1453:17): [True: 153, False: 278]
  |  |  |  |  ------------------
  |  |  |  | 1454|    153|                (start) = mid+1; \
  |  |  |  | 1455|    278|            } else { \
  |  |  |  | 1456|    278|                (end) = mid; \
  |  |  |  | 1457|    278|            } \
  |  |  |  | 1458|    431|        } \
  |  |  |  | 1459|    384|        if ((start) < (N)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1459:13): [True: 241, False: 143]
  |  |  |  |  ------------------
  |  |  |  | 1460|    241|            igraph_int_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|    241|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1461|    241|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|    241|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1461:17): [True: 34, False: 207]
  |  |  |  |  ------------------
  |  |  |  | 1462|     34|                *(result) = e; \
  |  |  |  | 1463|     34|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1463:21): [True: 0, False: 34]
  |  |  |  |  ------------------
  |  |  |  | 1464|     34|            } \
  |  |  |  | 1465|    241|        } \
  |  |  |  | 1466|    384|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1466:14): [Folded, False: 384]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1479|  2.71k|        } else { \
  |  | 1480|  2.71k|            BINSEARCH(start2, end2, xfrom, graph->ii, graph->from, N2, eid, nullpointer); \
  |  |  ------------------
  |  |  |  | 1449|  2.71k|    do { \
  |  |  |  | 1450|  5.52k|        while ((start) < (end)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1450:16): [True: 2.80k, False: 2.71k]
  |  |  |  |  ------------------
  |  |  |  | 1451|  2.80k|            igraph_int_t mid =(start)+((end)-(start))/2; \
  |  |  |  | 1452|  2.80k|            igraph_int_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  2.80k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1453|  2.80k|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  2.80k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1453:17): [True: 1.34k, False: 1.46k]
  |  |  |  |  ------------------
  |  |  |  | 1454|  1.34k|                (start) = mid+1; \
  |  |  |  | 1455|  1.46k|            } else { \
  |  |  |  | 1456|  1.46k|                (end) = mid; \
  |  |  |  | 1457|  1.46k|            } \
  |  |  |  | 1458|  2.80k|        } \
  |  |  |  | 1459|  2.71k|        if ((start) < (N)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1459:13): [True: 1.38k, False: 1.32k]
  |  |  |  |  ------------------
  |  |  |  | 1460|  1.38k|            igraph_int_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  1.38k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1461|  1.38k|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  1.38k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1461:17): [True: 56, False: 1.32k]
  |  |  |  |  ------------------
  |  |  |  | 1462|     56|                *(result) = e; \
  |  |  |  | 1463|     56|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1463:21): [True: 0, False: 56]
  |  |  |  |  ------------------
  |  |  |  | 1464|     56|            } \
  |  |  |  | 1465|  1.38k|        } \
  |  |  |  | 1466|  2.71k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1466:14): [Folded, False: 2.71k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1481|  2.71k|        } \
  |  | 1482|  3.09k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1482:14): [Folded, False: 3.09k]
  |  |  ------------------
  ------------------
 1537|  3.09k|        if (!directed && *eid < 0) {
  ------------------
  |  Branch (1537:13): [True: 0, False: 3.09k]
  |  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.09k|    } 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.09k|    if (*eid < 0) {
  ------------------
  |  Branch (1548:9): [True: 3.00k, False: 90]
  ------------------
 1549|  3.00k|        if (error) {
  ------------------
  |  Branch (1549:13): [True: 0, False: 3.00k]
  ------------------
 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.00k|    }
 1553|       |
 1554|  3.09k|    return IGRAPH_SUCCESS;
 1555|  3.09k|}
igraph_get_eids:
 1602|  2.10k|                    igraph_bool_t directed, igraph_bool_t error) {
 1603|       |
 1604|  2.10k|    igraph_int_t n = pairs ? igraph_vector_int_size(pairs) : 0;
  ------------------
  |  Branch (1604:22): [True: 2.10k, False: 0]
  ------------------
 1605|  2.10k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
 1606|  2.10k|    igraph_int_t i;
 1607|  2.10k|    igraph_int_t eid = -1;
 1608|       |
 1609|  2.10k|    if (n == 0) {
  ------------------
  |  Branch (1609:9): [True: 0, False: 2.10k]
  ------------------
 1610|      0|        igraph_vector_int_clear(eids);
 1611|      0|        return IGRAPH_SUCCESS;
 1612|      0|    }
 1613|       |
 1614|  2.10k|    if (n % 2 != 0) {
  ------------------
  |  Branch (1614:9): [True: 0, False: 2.10k]
  ------------------
 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.10k|    if (!igraph_vector_int_isininterval(pairs, 0, no_of_nodes - 1)) {
  ------------------
  |  Branch (1619:9): [True: 0, False: 2.10k]
  ------------------
 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.10k|    IGRAPH_CHECK(igraph_vector_int_resize(eids, n / 2));
  ------------------
  |  |  656|  2.10k|    do { \
  |  |  657|  2.10k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.10k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.10k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.10k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.10k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.10k]
  |  |  ------------------
  ------------------
 1624|       |
 1625|  2.10k|    if (igraph_is_directed(graph)) {
  ------------------
  |  Branch (1625:9): [True: 2.10k, False: 0]
  ------------------
 1626|  85.3k|        for (i = 0; i < n / 2; i++) {
  ------------------
  |  Branch (1626:21): [True: 83.2k, False: 2.10k]
  ------------------
 1627|  83.2k|            igraph_int_t from = VECTOR(*pairs)[2 * i];
  ------------------
  |  |   60|  83.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1628|  83.2k|            igraph_int_t to = VECTOR(*pairs)[2 * i + 1];
  ------------------
  |  |   60|  83.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1629|       |
 1630|  83.2k|            eid = -1;
 1631|  83.2k|            FIND_DIRECTED_EDGE(graph, from, to, &eid);
  ------------------
  |  | 1469|  83.2k|    do { \
  |  | 1470|  83.2k|        igraph_int_t start = VECTOR(graph->os)[xfrom]; \
  |  |  ------------------
  |  |  |  |   60|  83.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1471|  83.2k|        igraph_int_t end = VECTOR(graph->os)[xfrom+1]; \
  |  |  ------------------
  |  |  |  |   60|  83.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1472|  83.2k|        igraph_int_t N = end; \
  |  | 1473|  83.2k|        igraph_int_t start2 = VECTOR(graph->is)[xto]; \
  |  |  ------------------
  |  |  |  |   60|  83.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1474|  83.2k|        igraph_int_t end2 = VECTOR(graph->is)[xto+1]; \
  |  |  ------------------
  |  |  |  |   60|  83.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1475|  83.2k|        igraph_int_t N2 = end2; \
  |  | 1476|  83.2k|        igraph_int_t *nullpointer = NULL; \
  |  | 1477|  83.2k|        if (end-start < end2-start2) { \
  |  |  ------------------
  |  |  |  Branch (1477:13): [True: 24.0k, False: 59.1k]
  |  |  ------------------
  |  | 1478|  24.0k|            BINSEARCH(start, end, xto, graph->oi, graph->to, N, eid, nullpointer); \
  |  |  ------------------
  |  |  |  | 1449|  24.0k|    do { \
  |  |  |  | 1450|  86.8k|        while ((start) < (end)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1450:16): [True: 62.7k, False: 24.0k]
  |  |  |  |  ------------------
  |  |  |  | 1451|  62.7k|            igraph_int_t mid =(start)+((end)-(start))/2; \
  |  |  |  | 1452|  62.7k|            igraph_int_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  62.7k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1453|  62.7k|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  62.7k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1453:17): [True: 1.63k, False: 61.1k]
  |  |  |  |  ------------------
  |  |  |  | 1454|  1.63k|                (start) = mid+1; \
  |  |  |  | 1455|  61.1k|            } else { \
  |  |  |  | 1456|  61.1k|                (end) = mid; \
  |  |  |  | 1457|  61.1k|            } \
  |  |  |  | 1458|  62.7k|        } \
  |  |  |  | 1459|  24.0k|        if ((start) < (N)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1459:13): [True: 23.2k, False: 878]
  |  |  |  |  ------------------
  |  |  |  | 1460|  23.2k|            igraph_int_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  23.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1461|  23.2k|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  23.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1461:17): [True: 23.0k, False: 168]
  |  |  |  |  ------------------
  |  |  |  | 1462|  23.0k|                *(result) = e; \
  |  |  |  | 1463|  23.0k|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1463:21): [True: 0, False: 23.0k]
  |  |  |  |  ------------------
  |  |  |  | 1464|  23.0k|            } \
  |  |  |  | 1465|  23.2k|        } \
  |  |  |  | 1466|  24.0k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1466:14): [Folded, False: 24.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1479|  59.1k|        } else { \
  |  | 1480|  59.1k|            BINSEARCH(start2, end2, xfrom, graph->ii, graph->from, N2, eid, nullpointer); \
  |  |  ------------------
  |  |  |  | 1449|  59.1k|    do { \
  |  |  |  | 1450|   196k|        while ((start) < (end)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1450:16): [True: 137k, False: 59.1k]
  |  |  |  |  ------------------
  |  |  |  | 1451|   137k|            igraph_int_t mid =(start)+((end)-(start))/2; \
  |  |  |  | 1452|   137k|            igraph_int_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   137k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1453|   137k|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   137k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1453:17): [True: 3.79k, False: 133k]
  |  |  |  |  ------------------
  |  |  |  | 1454|  3.79k|                (start) = mid+1; \
  |  |  |  | 1455|   133k|            } else { \
  |  |  |  | 1456|   133k|                (end) = mid; \
  |  |  |  | 1457|   133k|            } \
  |  |  |  | 1458|   137k|        } \
  |  |  |  | 1459|  59.1k|        if ((start) < (N)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1459:13): [True: 55.3k, False: 3.85k]
  |  |  |  |  ------------------
  |  |  |  | 1460|  55.3k|            igraph_int_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  55.3k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1461|  55.3k|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  55.3k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1461:17): [True: 54.7k, False: 606]
  |  |  |  |  ------------------
  |  |  |  | 1462|  54.7k|                *(result) = e; \
  |  |  |  | 1463|  54.7k|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1463:21): [True: 0, False: 54.7k]
  |  |  |  |  ------------------
  |  |  |  | 1464|  54.7k|            } \
  |  |  |  | 1465|  55.3k|        } \
  |  |  |  | 1466|  59.1k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1466:14): [Folded, False: 59.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1481|  59.1k|        } \
  |  | 1482|  83.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1482:14): [Folded, False: 83.2k]
  |  |  ------------------
  ------------------
 1632|  83.2k|            if (!directed && eid < 0) {
  ------------------
  |  Branch (1632:17): [True: 0, False: 83.2k]
  |  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|  83.2k|            VECTOR(*eids)[i] = eid;
  ------------------
  |  |   60|  83.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1637|  83.2k|            if (eid < 0 && error) {
  ------------------
  |  Branch (1637:17): [True: 5.50k, False: 77.7k]
  |  Branch (1637:28): [True: 0, False: 5.50k]
  ------------------
 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|  83.2k|        }
 1641|  2.10k|    } 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.10k|    return IGRAPH_SUCCESS;
 1656|  2.10k|}
igraph_get_all_eids_between:
 1718|  6.30k|) {
 1719|  6.30k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
 1720|       |
 1721|  6.30k|    if (source < 0 || source >= no_of_nodes) {
  ------------------
  |  Branch (1721:9): [True: 0, False: 6.30k]
  |  Branch (1721:23): [True: 0, False: 6.30k]
  ------------------
 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.30k|    if (target < 0 || target >= no_of_nodes) {
  ------------------
  |  Branch (1725:9): [True: 0, False: 6.30k]
  |  Branch (1725:23): [True: 0, False: 6.30k]
  ------------------
 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.30k|    igraph_vector_int_clear(eids);
 1730|       |
 1731|  6.30k|    if (igraph_is_directed(graph)) {
  ------------------
  |  Branch (1731:9): [True: 6.30k, False: 0]
  ------------------
 1732|       |        /* look in the specified direction first */
 1733|  6.30k|        FIND_ALL_DIRECTED_EDGES(graph, source, target, eids);
  ------------------
  |  | 1662|  6.30k|    do { \
  |  | 1663|  6.30k|        igraph_int_t start = VECTOR(graph->os)[xfrom]; \
  |  |  ------------------
  |  |  |  |   60|  6.30k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1664|  6.30k|        igraph_int_t end = VECTOR(graph->os)[xfrom+1]; \
  |  |  ------------------
  |  |  |  |   60|  6.30k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1665|  6.30k|        igraph_int_t N = end; \
  |  | 1666|  6.30k|        igraph_int_t start2 = VECTOR(graph->is)[xto]; \
  |  |  ------------------
  |  |  |  |   60|  6.30k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1667|  6.30k|        igraph_int_t end2 = VECTOR(graph->is)[xto+1]; \
  |  |  ------------------
  |  |  |  |   60|  6.30k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1668|  6.30k|        igraph_int_t N2 = end2; \
  |  | 1669|  6.30k|        igraph_int_t eid = -1; \
  |  | 1670|  6.30k|        igraph_int_t pos = -1; \
  |  | 1671|  6.30k|        if (end-start < end2-start2) { \
  |  |  ------------------
  |  |  |  Branch (1671:13): [True: 1.53k, False: 4.77k]
  |  |  ------------------
  |  | 1672|  1.53k|            BINSEARCH(start, end, xto, graph->oi, graph->to, N, &eid, &pos); \
  |  |  ------------------
  |  |  |  | 1449|  1.53k|    do { \
  |  |  |  | 1450|  2.92k|        while ((start) < (end)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1450:16): [True: 1.39k, False: 1.53k]
  |  |  |  |  ------------------
  |  |  |  | 1451|  1.39k|            igraph_int_t mid =(start)+((end)-(start))/2; \
  |  |  |  | 1452|  1.39k|            igraph_int_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  1.39k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1453|  1.39k|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  1.39k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1453:17): [True: 42, False: 1.35k]
  |  |  |  |  ------------------
  |  |  |  | 1454|     42|                (start) = mid+1; \
  |  |  |  | 1455|  1.35k|            } else { \
  |  |  |  | 1456|  1.35k|                (end) = mid; \
  |  |  |  | 1457|  1.35k|            } \
  |  |  |  | 1458|  1.39k|        } \
  |  |  |  | 1459|  1.53k|        if ((start) < (N)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1459:13): [True: 655, False: 875]
  |  |  |  |  ------------------
  |  |  |  | 1460|    655|            igraph_int_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|    655|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1461|    655|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|    655|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1461:17): [True: 398, False: 257]
  |  |  |  |  ------------------
  |  |  |  | 1462|    398|                *(result) = e; \
  |  |  |  | 1463|    398|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1463:21): [True: 398, Folded]
  |  |  |  |  ------------------
  |  |  |  | 1464|    398|            } \
  |  |  |  | 1465|    655|        } \
  |  |  |  | 1466|  1.53k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1466:14): [Folded, False: 1.53k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1673|  6.66k|            while (pos >= 0 && pos < N) { \
  |  |  ------------------
  |  |  |  Branch (1673:20): [True: 5.52k, False: 1.13k]
  |  |  |  Branch (1673:32): [True: 5.25k, False: 273]
  |  |  ------------------
  |  | 1674|  5.25k|                eid = VECTOR(graph->oi)[pos++]; \
  |  |  ------------------
  |  |  |  |   60|  5.25k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1675|  5.25k|                if (VECTOR(graph->to)[eid] != xto) { break; } \
  |  |  ------------------
  |  |  |  |   60|  5.25k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  |  Branch (1675:21): [True: 125, False: 5.13k]
  |  |  ------------------
  |  | 1676|  5.25k|                IGRAPH_CHECK(igraph_vector_int_push_back(eidvec, eid)); \
  |  |  ------------------
  |  |  |  |  656|  5.13k|    do { \
  |  |  |  |  657|  5.13k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  5.13k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  5.13k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.13k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  5.13k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 5.13k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1677|  5.13k|            } \
  |  | 1678|  4.77k|        } else { \
  |  | 1679|  4.77k|            BINSEARCH(start2, end2, xfrom, graph->ii, graph->from, N2, &eid, &pos); \
  |  |  ------------------
  |  |  |  | 1449|  4.77k|    do { \
  |  |  |  | 1450|  7.55k|        while ((start) < (end)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1450:16): [True: 2.78k, False: 4.77k]
  |  |  |  |  ------------------
  |  |  |  | 1451|  2.78k|            igraph_int_t mid =(start)+((end)-(start))/2; \
  |  |  |  | 1452|  2.78k|            igraph_int_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  2.78k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1453|  2.78k|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  2.78k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1453:17): [True: 81, False: 2.70k]
  |  |  |  |  ------------------
  |  |  |  | 1454|     81|                (start) = mid+1; \
  |  |  |  | 1455|  2.70k|            } else { \
  |  |  |  | 1456|  2.70k|                (end) = mid; \
  |  |  |  | 1457|  2.70k|            } \
  |  |  |  | 1458|  2.78k|        } \
  |  |  |  | 1459|  4.77k|        if ((start) < (N)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1459:13): [True: 1.52k, False: 3.24k]
  |  |  |  |  ------------------
  |  |  |  | 1460|  1.52k|            igraph_int_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  1.52k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1461|  1.52k|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  1.52k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1461:17): [True: 702, False: 822]
  |  |  |  |  ------------------
  |  |  |  | 1462|    702|                *(result) = e; \
  |  |  |  | 1463|    702|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1463:21): [True: 702, Folded]
  |  |  |  |  ------------------
  |  |  |  | 1464|    702|            } \
  |  |  |  | 1465|  1.52k|        } \
  |  |  |  | 1466|  4.77k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1466:14): [Folded, False: 4.77k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1680|  12.5k|            while (pos >= 0 && pos < N2) { \
  |  |  ------------------
  |  |  |  Branch (1680:20): [True: 8.48k, False: 4.06k]
  |  |  |  Branch (1680:32): [True: 7.99k, False: 482]
  |  |  ------------------
  |  | 1681|  7.99k|                eid = VECTOR(graph->ii)[pos++]; \
  |  |  ------------------
  |  |  |  |   60|  7.99k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1682|  7.99k|                if (VECTOR(graph->from)[eid] != xfrom) { break; } \
  |  |  ------------------
  |  |  |  |   60|  7.99k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  |  Branch (1682:21): [True: 220, False: 7.77k]
  |  |  ------------------
  |  | 1683|  7.99k|                IGRAPH_CHECK(igraph_vector_int_push_back(eidvec, eid)); \
  |  |  ------------------
  |  |  |  |  656|  7.77k|    do { \
  |  |  |  |  657|  7.77k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  7.77k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  7.77k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 7.77k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  7.77k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 7.77k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1684|  7.77k|            } \
  |  | 1685|  4.77k|        } \
  |  | 1686|  6.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1686:14): [Folded, False: 6.30k]
  |  |  ------------------
  ------------------
 1734|  6.30k|        if (!directed) {
  ------------------
  |  Branch (1734:13): [True: 4.20k, False: 2.10k]
  ------------------
 1735|       |            /* look in the reverse direction as well */
 1736|  4.20k|            FIND_ALL_DIRECTED_EDGES(graph, target, source, eids);
  ------------------
  |  | 1662|  4.20k|    do { \
  |  | 1663|  4.20k|        igraph_int_t start = VECTOR(graph->os)[xfrom]; \
  |  |  ------------------
  |  |  |  |   60|  4.20k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1664|  4.20k|        igraph_int_t end = VECTOR(graph->os)[xfrom+1]; \
  |  |  ------------------
  |  |  |  |   60|  4.20k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1665|  4.20k|        igraph_int_t N = end; \
  |  | 1666|  4.20k|        igraph_int_t start2 = VECTOR(graph->is)[xto]; \
  |  |  ------------------
  |  |  |  |   60|  4.20k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1667|  4.20k|        igraph_int_t end2 = VECTOR(graph->is)[xto+1]; \
  |  |  ------------------
  |  |  |  |   60|  4.20k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1668|  4.20k|        igraph_int_t N2 = end2; \
  |  | 1669|  4.20k|        igraph_int_t eid = -1; \
  |  | 1670|  4.20k|        igraph_int_t pos = -1; \
  |  | 1671|  4.20k|        if (end-start < end2-start2) { \
  |  |  ------------------
  |  |  |  Branch (1671:13): [True: 668, False: 3.53k]
  |  |  ------------------
  |  | 1672|    668|            BINSEARCH(start, end, xto, graph->oi, graph->to, N, &eid, &pos); \
  |  |  ------------------
  |  |  |  | 1449|    668|    do { \
  |  |  |  | 1450|  1.53k|        while ((start) < (end)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1450:16): [True: 865, False: 668]
  |  |  |  |  ------------------
  |  |  |  | 1451|    865|            igraph_int_t mid =(start)+((end)-(start))/2; \
  |  |  |  | 1452|    865|            igraph_int_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|    865|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1453|    865|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|    865|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1453:17): [True: 42, False: 823]
  |  |  |  |  ------------------
  |  |  |  | 1454|     42|                (start) = mid+1; \
  |  |  |  | 1455|    823|            } else { \
  |  |  |  | 1456|    823|                (end) = mid; \
  |  |  |  | 1457|    823|            } \
  |  |  |  | 1458|    865|        } \
  |  |  |  | 1459|    668|        if ((start) < (N)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1459:13): [True: 389, False: 279]
  |  |  |  |  ------------------
  |  |  |  | 1460|    389|            igraph_int_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|    389|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1461|    389|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|    389|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1461:17): [True: 233, False: 156]
  |  |  |  |  ------------------
  |  |  |  | 1462|    233|                *(result) = e; \
  |  |  |  | 1463|    233|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1463:21): [True: 233, Folded]
  |  |  |  |  ------------------
  |  |  |  | 1464|    233|            } \
  |  |  |  | 1465|    389|        } \
  |  |  |  | 1466|    668|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1466:14): [Folded, False: 668]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1673|  3.83k|            while (pos >= 0 && pos < N) { \
  |  |  ------------------
  |  |  |  Branch (1673:20): [True: 3.39k, False: 435]
  |  |  |  Branch (1673:32): [True: 3.25k, False: 145]
  |  |  ------------------
  |  | 1674|  3.25k|                eid = VECTOR(graph->oi)[pos++]; \
  |  |  ------------------
  |  |  |  |   60|  3.25k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1675|  3.25k|                if (VECTOR(graph->to)[eid] != xto) { break; } \
  |  |  ------------------
  |  |  |  |   60|  3.25k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  |  Branch (1675:21): [True: 88, False: 3.16k]
  |  |  ------------------
  |  | 1676|  3.25k|                IGRAPH_CHECK(igraph_vector_int_push_back(eidvec, eid)); \
  |  |  ------------------
  |  |  |  |  656|  3.16k|    do { \
  |  |  |  |  657|  3.16k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  3.16k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  3.16k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.16k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  3.16k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 3.16k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1677|  3.16k|            } \
  |  | 1678|  3.53k|        } else { \
  |  | 1679|  3.53k|            BINSEARCH(start2, end2, xfrom, graph->ii, graph->from, N2, &eid, &pos); \
  |  |  ------------------
  |  |  |  | 1449|  3.53k|    do { \
  |  |  |  | 1450|  5.74k|        while ((start) < (end)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1450:16): [True: 2.20k, False: 3.53k]
  |  |  |  |  ------------------
  |  |  |  | 1451|  2.20k|            igraph_int_t mid =(start)+((end)-(start))/2; \
  |  |  |  | 1452|  2.20k|            igraph_int_t e = VECTOR((iindex))[mid]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  2.20k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1453|  2.20k|            if (VECTOR((edgelist))[e] < (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  2.20k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1453:17): [True: 0, False: 2.20k]
  |  |  |  |  ------------------
  |  |  |  | 1454|      0|                (start) = mid+1; \
  |  |  |  | 1455|  2.20k|            } else { \
  |  |  |  | 1456|  2.20k|                (end) = mid; \
  |  |  |  | 1457|  2.20k|            } \
  |  |  |  | 1458|  2.20k|        } \
  |  |  |  | 1459|  3.53k|        if ((start) < (N)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1459:13): [True: 1.22k, False: 2.31k]
  |  |  |  |  ------------------
  |  |  |  | 1460|  1.22k|            igraph_int_t e = VECTOR((iindex))[(start)]; \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  1.22k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  | 1461|  1.22k|            if (VECTOR((edgelist))[e] == (value)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  1.22k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1461:17): [True: 562, False: 660]
  |  |  |  |  ------------------
  |  |  |  | 1462|    562|                *(result) = e; \
  |  |  |  | 1463|    562|                if (result_pos != 0) { *(result_pos) = start; } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1463:21): [True: 562, Folded]
  |  |  |  |  ------------------
  |  |  |  | 1464|    562|            } \
  |  |  |  | 1465|  1.22k|        } \
  |  |  |  | 1466|  3.53k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1466:14): [Folded, False: 3.53k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1680|  9.94k|            while (pos >= 0 && pos < N2) { \
  |  |  ------------------
  |  |  |  Branch (1680:20): [True: 6.97k, False: 2.97k]
  |  |  |  Branch (1680:32): [True: 6.61k, False: 363]
  |  |  ------------------
  |  | 1681|  6.61k|                eid = VECTOR(graph->ii)[pos++]; \
  |  |  ------------------
  |  |  |  |   60|  6.61k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  | 1682|  6.61k|                if (VECTOR(graph->from)[eid] != xfrom) { break; } \
  |  |  ------------------
  |  |  |  |   60|  6.61k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  |  Branch (1682:21): [True: 199, False: 6.41k]
  |  |  ------------------
  |  | 1683|  6.61k|                IGRAPH_CHECK(igraph_vector_int_push_back(eidvec, eid)); \
  |  |  ------------------
  |  |  |  |  656|  6.41k|    do { \
  |  |  |  |  657|  6.41k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  6.41k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  6.41k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 6.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|  6.41k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 6.41k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1684|  6.41k|            } \
  |  | 1685|  3.53k|        } \
  |  | 1686|  4.20k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1686:14): [Folded, False: 4.20k]
  |  |  ------------------
  ------------------
 1737|  4.20k|        }
 1738|  6.30k|    } 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.30k|    return IGRAPH_SUCCESS;
 1743|  6.30k|}
igraph_incident:
 1778|  2.03M|) {
 1779|  2.03M|    igraph_int_t length = 0, idx = 0;
 1780|  2.03M|    igraph_int_t i, j;
 1781|  2.03M|    igraph_int_t node = pnode;
 1782|  2.03M|    igraph_bool_t directed = igraph_is_directed(graph);
 1783|       |
 1784|  2.03M|    if (node < 0 || node > igraph_vcount(graph) - 1) {
  ------------------
  |  Branch (1784:9): [True: 0, False: 2.03M]
  |  Branch (1784:21): [True: 0, False: 2.03M]
  ------------------
 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.03M|    if (mode != IGRAPH_OUT && mode != IGRAPH_IN &&
  ------------------
  |  Branch (1787:9): [True: 944k, False: 1.08M]
  |  Branch (1787:31): [True: 36.4k, False: 908k]
  ------------------
 1788|  36.4k|        mode != IGRAPH_ALL) {
  ------------------
  |  Branch (1788:9): [True: 0, False: 36.4k]
  ------------------
 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.03M|    if (!directed) {
  ------------------
  |  Branch (1792:9): [True: 0, False: 2.03M]
  ------------------
 1793|      0|        mode = IGRAPH_ALL;
 1794|      0|    }
 1795|       |
 1796|  2.03M|    if (mode != IGRAPH_ALL && loops == IGRAPH_LOOPS_TWICE) {
  ------------------
  |  Branch (1796:9): [True: 1.99M, False: 36.4k]
  |  Branch (1796:31): [True: 1.81M, False: 179k]
  ------------------
 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.81M|        loops = IGRAPH_LOOPS_ONCE;
 1802|  1.81M|    }
 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.03M|    if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (1807:9): [True: 1.12M, False: 908k]
  ------------------
 1808|  1.12M|        length += (VECTOR(graph->os)[node + 1] - VECTOR(graph->os)[node]);
  ------------------
  |  |   60|  1.12M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      length += (VECTOR(graph->os)[node + 1] - VECTOR(graph->os)[node]);
  ------------------
  |  |   60|  1.12M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1809|  1.12M|    }
 1810|  2.03M|    if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (1810:9): [True: 944k, False: 1.08M]
  ------------------
 1811|   944k|        length += (VECTOR(graph->is)[node + 1] - VECTOR(graph->is)[node]);
  ------------------
  |  |   60|   944k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      length += (VECTOR(graph->is)[node + 1] - VECTOR(graph->is)[node]);
  ------------------
  |  |   60|   944k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1812|   944k|    }
 1813|       |
 1814|  2.03M|    IGRAPH_CHECK(igraph_vector_int_resize(eids, length));
  ------------------
  |  |  656|  2.03M|    do { \
  |  |  657|  2.03M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.03M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.03M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.03M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.03M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.03M]
  |  |  ------------------
  ------------------
 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.03M|    if (!directed || mode != IGRAPH_ALL) {
  ------------------
  |  Branch (1823:9): [True: 0, False: 2.03M]
  |  Branch (1823:22): [True: 1.99M, False: 36.4k]
  ------------------
 1824|       |        /* We did not ask for both directions; this is the easy case */
 1825|       |
 1826|  1.99M|        if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (1826:13): [True: 1.08M, False: 908k]
  ------------------
 1827|  1.08M|            j = VECTOR(graph->os)[node + 1];
  ------------------
  |  |   60|  1.08M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1828|  1.53M|            for (i = VECTOR(graph->os)[node]; i < j; i++) {
  ------------------
  |  |   60|  1.08M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1828:47): [True: 442k, False: 1.08M]
  ------------------
 1829|   442k|                igraph_int_t edge = VECTOR(graph->oi)[i];
  ------------------
  |  |   60|   442k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1830|   442k|                igraph_int_t other = VECTOR(graph->to)[edge];
  ------------------
  |  |   60|   442k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1831|   442k|                if (loops == IGRAPH_NO_LOOPS && other == pnode) {
  ------------------
  |  Branch (1831:21): [True: 0, False: 442k]
  |  Branch (1831:49): [True: 0, False: 0]
  ------------------
 1832|      0|                    length--;
 1833|   442k|                } else {
 1834|   442k|                    VECTOR(*eids)[idx++] = edge;
  ------------------
  |  |   60|   442k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1835|   442k|                }
 1836|   442k|            }
 1837|  1.08M|        }
 1838|       |
 1839|  1.99M|        if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (1839:13): [True: 908k, False: 1.08M]
  ------------------
 1840|   908k|            j = VECTOR(graph->is)[node + 1];
  ------------------
  |  |   60|   908k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1841|  1.17M|            for (i = VECTOR(graph->is)[node]; i < j; i++) {
  ------------------
  |  |   60|   908k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1841:47): [True: 269k, False: 908k]
  ------------------
 1842|   269k|                igraph_int_t edge = VECTOR(graph->ii)[i];
  ------------------
  |  |   60|   269k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1843|   269k|                igraph_int_t other = VECTOR(graph->from)[edge];
  ------------------
  |  |   60|   269k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1844|   269k|                if ((loops == IGRAPH_NO_LOOPS || (loops == IGRAPH_LOOPS_ONCE && !directed)) && other == pnode) {
  ------------------
  |  Branch (1844:22): [True: 0, False: 269k]
  |  Branch (1844:51): [True: 269k, False: 0]
  |  Branch (1844:81): [True: 0, False: 269k]
  |  Branch (1844:96): [True: 0, False: 0]
  ------------------
 1845|      0|                    length--;
 1846|   269k|                } else {
 1847|   269k|                    VECTOR(*eids)[idx++] = edge;
  ------------------
  |  |   60|   269k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1848|   269k|                }
 1849|   269k|            }
 1850|   908k|        }
 1851|  1.99M|    } else {
 1852|       |        /* both in- and out- neighbors in a directed graph,
 1853|       |           we need to merge the two 'vectors' */
 1854|  36.4k|        igraph_int_t j1 = VECTOR(graph->os)[node + 1];
  ------------------
  |  |   60|  36.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1855|  36.4k|        igraph_int_t j2 = VECTOR(graph->is)[node + 1];
  ------------------
  |  |   60|  36.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1856|  36.4k|        igraph_int_t i1 = VECTOR(graph->os)[node];
  ------------------
  |  |   60|  36.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1857|  36.4k|        igraph_int_t i2 = VECTOR(graph->is)[node];
  ------------------
  |  |   60|  36.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1858|  36.4k|        igraph_int_t eid1, eid2;
 1859|  36.4k|        igraph_int_t n1, n2;
 1860|  36.4k|        igraph_bool_t seen_loop_edge = false;
 1861|       |
 1862|  69.8k|        while (i1 < j1 && i2 < j2) {
  ------------------
  |  Branch (1862:16): [True: 50.4k, False: 19.4k]
  |  Branch (1862:27): [True: 33.4k, False: 17.0k]
  ------------------
 1863|  33.4k|            eid1 = VECTOR(graph->oi)[i1];
  ------------------
  |  |   60|  33.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1864|  33.4k|            eid2 = VECTOR(graph->ii)[i2];
  ------------------
  |  |   60|  33.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1865|  33.4k|            n1 = VECTOR(graph->to)[eid1];
  ------------------
  |  |   60|  33.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1866|  33.4k|            n2 = VECTOR(graph->from)[eid2];
  ------------------
  |  |   60|  33.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1867|  33.4k|            if (n1 < n2) {
  ------------------
  |  Branch (1867:17): [True: 13.8k, False: 19.5k]
  ------------------
 1868|  13.8k|                i1++;
 1869|  13.8k|                VECTOR(*eids)[idx++] = eid1;
  ------------------
  |  |   60|  13.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1870|  19.5k|            } else if (n1 > n2) {
  ------------------
  |  Branch (1870:24): [True: 14.5k, False: 4.98k]
  ------------------
 1871|  14.5k|                i2++;
 1872|  14.5k|                VECTOR(*eids)[idx++] = eid2;
  ------------------
  |  |   60|  14.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1873|  14.5k|            } 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.4k|        }
 1899|       |
 1900|  58.4k|        while (i1 < j1) {
  ------------------
  |  Branch (1900:16): [True: 21.9k, False: 36.4k]
  ------------------
 1901|  21.9k|            eid1 = VECTOR(graph->oi)[i1++];
  ------------------
  |  |   60|  21.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1902|  21.9k|            VECTOR(*eids)[idx++] = eid1;
  ------------------
  |  |   60|  21.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1903|  21.9k|        }
 1904|       |
 1905|  57.7k|        while (i2 < j2) {
  ------------------
  |  Branch (1905:16): [True: 21.2k, False: 36.4k]
  ------------------
 1906|  21.2k|            eid2 = VECTOR(graph->ii)[i2++];
  ------------------
  |  |   60|  21.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1907|  21.2k|            VECTOR(*eids)[idx++] = eid2;
  ------------------
  |  |   60|  21.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1908|  21.2k|        }
 1909|  36.4k|    }
 1910|  2.03M|    IGRAPH_CHECK(igraph_vector_int_resize(eids, length));
  ------------------
  |  |  656|  2.03M|    do { \
  |  |  657|  2.03M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.03M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.03M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.03M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.03M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.03M]
  |  |  ------------------
  ------------------
 1911|  2.03M|    return IGRAPH_SUCCESS;
 1912|  2.03M|}
igraph_i_reverse:
 2001|  2.12k|igraph_error_t igraph_i_reverse(igraph_t *graph) {
 2002|       |
 2003|       |    /* Nothing to do for undirected graphs. */
 2004|  2.12k|    if (! igraph_is_directed(graph)) {
  ------------------
  |  Branch (2004:9): [True: 0, False: 2.12k]
  ------------------
 2005|      0|        return IGRAPH_SUCCESS;
 2006|      0|    }
 2007|       |
 2008|  2.12k|    igraph_vector_int_swap(&graph->to, &graph->from);
 2009|  2.12k|    igraph_vector_int_swap(&graph->oi, &graph->ii);
 2010|  2.12k|    igraph_vector_int_swap(&graph->os, &graph->is);
 2011|       |
 2012|  2.12k|    return IGRAPH_SUCCESS;
 2013|  2.12k|}
type_indexededgelist.c:igraph_i_create_start_vectors:
 1076|  60.8k|        igraph_vector_int_t *iindex, igraph_int_t nodes) {
 1077|       |
 1078|  60.8k|# define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
 1079|       |
 1080|  60.8k|    igraph_int_t no_of_nodes;
 1081|  60.8k|    igraph_int_t no_of_edges;
 1082|  60.8k|    igraph_int_t i, j, idx;
 1083|       |
 1084|  60.8k|    no_of_nodes = nodes;
 1085|  60.8k|    no_of_edges = igraph_vector_int_size(el);
 1086|       |
 1087|       |    /* result */
 1088|       |
 1089|  60.8k|    IGRAPH_CHECK(igraph_vector_int_resize(res, nodes + 1));
  ------------------
  |  |  656|  60.8k|    do { \
  |  |  657|  60.8k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  60.8k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  60.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 60.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|  60.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 60.8k]
  |  |  ------------------
  ------------------
 1090|       |
 1091|       |    /* create the index */
 1092|       |
 1093|  60.8k|    if (no_of_edges == 0) {
  ------------------
  |  Branch (1093:9): [True: 4.74k, False: 56.0k]
  ------------------
 1094|       |        /* empty graph */
 1095|  4.74k|        igraph_vector_int_null(res);
 1096|  56.0k|    } else {
 1097|  56.0k|        idx = -1;
 1098|  2.89M|        for (i = 0; i <= EDGE(0); i++) {
  ------------------
  |  | 1078|  2.89M|# define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   60|  2.89M|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               # define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   60|  2.89M|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (1098:21): [True: 2.83M, False: 56.0k]
  ------------------
 1099|  2.83M|            idx++; VECTOR(*res)[idx] = 0;
  ------------------
  |  |   60|  2.83M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1100|  2.83M|        }
 1101|  1.89M|        for (i = 1; i < no_of_edges; i++) {
  ------------------
  |  Branch (1101:21): [True: 1.83M, False: 56.0k]
  ------------------
 1102|  1.83M|            igraph_int_t n = EDGE(i) - EDGE(VECTOR(*res)[idx]);
  ------------------
  |  | 1078|  1.83M|# define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   60|  1.83M|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               # define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   60|  1.83M|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
                          igraph_int_t n = EDGE(i) - EDGE(VECTOR(*res)[idx]);
  ------------------
  |  | 1078|  1.83M|# define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   60|  1.83M|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               # define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   60|  1.83M|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1103|  9.53M|            for (j = 0; j < n; j++) {
  ------------------
  |  Branch (1103:25): [True: 7.69M, False: 1.83M]
  ------------------
 1104|  7.69M|                idx++; VECTOR(*res)[idx] = i;
  ------------------
  |  |   60|  7.69M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1105|  7.69M|            }
 1106|  1.83M|        }
 1107|  56.0k|        j = EDGE(VECTOR(*res)[idx]);
  ------------------
  |  | 1078|  56.0k|# define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   60|  56.0k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               # define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   60|  56.0k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1108|  3.78M|        for (i = 0; i < no_of_nodes - j; i++) {
  ------------------
  |  Branch (1108:21): [True: 3.72M, False: 56.0k]
  ------------------
 1109|  3.72M|            idx++; VECTOR(*res)[idx] = no_of_edges;
  ------------------
  |  |   60|  3.72M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1110|  3.72M|        }
 1111|  56.0k|    }
 1112|       |
 1113|       |    /* clean */
 1114|       |
 1115|  60.8k|# undef EDGE
 1116|  60.8k|    return IGRAPH_SUCCESS;
 1117|  60.8k|}

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

igraph_qsort:
  264|    599|{
  265|       |	local_qsort(a, n, es, cmp, NULL);
  266|    599|}
qsort.c:local_qsort:
  121|  3.53k|{
  122|  3.53k|	char *pa, *pb, *pc, *pd, *pl, *pm, *pn;
  123|  3.53k|	size_t d1, d2;
  124|  3.53k|	int cmp_result;
  125|  3.53k|	int swap_cnt;
  126|       |
  127|       |    /* if there are less than 2 elements, then sorting is not needed */
  128|  3.53k|    if (IGRAPH_UNLIKELY(n < 2))
  ------------------
  |  |  612|  3.53k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  ------------------
  |  |  |  Branch (612:32): [True: 0, False: 3.53k]
  |  |  ------------------
  ------------------
  129|      0|        return;
  130|  7.13k|loop:
  131|  7.13k|	swap_cnt = 0;
  132|  7.13k|	if (n < 7) {
  ------------------
  |  Branch (132:6): [True: 3.24k, False: 3.88k]
  ------------------
  133|  12.8k|		for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es)
  ------------------
  |  Branch (133:29): [True: 9.60k, False: 3.24k]
  ------------------
  134|  9.60k|			for (pl = pm;
  135|  20.4k|			     pl > (char *)a && CMP(thunk, pl - es, pl) > 0;
  ------------------
  |  |   95|  17.2k|#define	CMP(t, x, y) (cmp((x), (y)))
  ------------------
  |  Branch (135:9): [True: 17.2k, False: 3.21k]
  |  Branch (135:27): [True: 10.8k, False: 6.38k]
  ------------------
  136|  10.8k|			     pl -= es)
  137|  10.8k|				swapfunc(pl, pl - es, es);
  138|  3.24k|		return;
  139|  3.24k|	}
  140|  3.88k|	pm = (char *)a + (n / 2) * es;
  141|  3.88k|	if (n > 7) {
  ------------------
  |  Branch (141:6): [True: 3.41k, False: 472]
  ------------------
  142|  3.41k|		pl = a;
  143|  3.41k|		pn = (char *)a + (n - 1) * es;
  144|  3.41k|		if (n > 40) {
  ------------------
  |  Branch (144:7): [True: 444, False: 2.97k]
  ------------------
  145|    444|			size_t d = (n / 8) * es;
  146|       |
  147|    444|			pl = med3(pl, pl + d, pl + 2 * d, cmp, thunk);
  148|    444|			pm = med3(pm - d, pm, pm + d, cmp, thunk);
  149|    444|			pn = med3(pn - 2 * d, pn - d, pn, cmp, thunk);
  150|    444|		}
  151|  3.41k|		pm = med3(pl, pm, pn, cmp, thunk);
  152|  3.41k|	}
  153|  3.88k|	swapfunc(a, pm, es);
  154|  3.88k|	pa = pb = (char *)a + es;
  155|       |
  156|  3.88k|	pc = pd = (char *)a + (n - 1) * es;
  157|  17.1k|	for (;;) {
  158|  39.2k|		while (pb <= pc && (cmp_result = CMP(thunk, pb, a)) <= 0) {
  ------------------
  |  |   95|  37.5k|#define	CMP(t, x, y) (cmp((x), (y)))
  ------------------
  |  Branch (158:10): [True: 37.5k, False: 1.70k]
  |  Branch (158:22): [True: 22.0k, False: 15.4k]
  ------------------
  159|  22.0k|			if (cmp_result == 0) {
  ------------------
  |  Branch (159:8): [True: 0, False: 22.0k]
  ------------------
  160|      0|				swap_cnt = 1;
  161|      0|				swapfunc(pa, pb, es);
  162|      0|				pa += es;
  163|      0|			}
  164|  22.0k|			pb += es;
  165|  22.0k|		}
  166|  43.8k|		while (pb <= pc && (cmp_result = CMP(thunk, pc, a)) >= 0) {
  ------------------
  |  |   95|  40.0k|#define	CMP(t, x, y) (cmp((x), (y)))
  ------------------
  |  Branch (166:10): [True: 40.0k, False: 3.88k]
  |  Branch (166:22): [True: 26.7k, False: 13.2k]
  ------------------
  167|  26.7k|			if (cmp_result == 0) {
  ------------------
  |  Branch (167:8): [True: 0, False: 26.7k]
  ------------------
  168|      0|				swap_cnt = 1;
  169|      0|				swapfunc(pc, pd, es);
  170|      0|				pd -= es;
  171|      0|			}
  172|  26.7k|			pc -= es;
  173|  26.7k|		}
  174|  17.1k|		if (pb > pc)
  ------------------
  |  Branch (174:7): [True: 3.88k, False: 13.2k]
  ------------------
  175|  3.88k|			break;
  176|  13.2k|		swapfunc(pb, pc, es);
  177|  13.2k|		swap_cnt = 1;
  178|  13.2k|		pb += es;
  179|  13.2k|		pc -= es;
  180|  13.2k|	}
  181|  3.88k|	if (swap_cnt == 0) {  /* Switch to insertion sort */
  ------------------
  |  Branch (181:6): [True: 295, False: 3.59k]
  ------------------
  182|  2.90k|		for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es)
  ------------------
  |  Branch (182:29): [True: 2.61k, False: 295]
  ------------------
  183|  2.61k|			for (pl = pm;
  184|  9.26k|			     pl > (char *)a && CMP(thunk, pl - es, pl) > 0;
  ------------------
  |  |   95|  8.60k|#define	CMP(t, x, y) (cmp((x), (y)))
  ------------------
  |  Branch (184:9): [True: 8.60k, False: 657]
  |  Branch (184:27): [True: 6.65k, False: 1.95k]
  ------------------
  185|  6.65k|			     pl -= es)
  186|  6.65k|				swapfunc(pl, pl - es, es);
  187|    295|		return;
  188|    295|	}
  189|       |
  190|  3.59k|	pn = (char *)a + n * es;
  191|  3.59k|	d1 = MIN(pa - (char *)a, pb - pa);
  ------------------
  |  |   69|  3.59k|#define	MIN(a, b)	((a) < (b) ? a : b)
  |  |  ------------------
  |  |  |  Branch (69:20): [True: 3.08k, False: 511]
  |  |  ------------------
  ------------------
  192|  3.59k|	vecswap(a, pb - d1, d1);
  ------------------
  |  |   88|  3.59k|	if ((n) > 0) swapfunc(a, b, n)
  |  |  ------------------
  |  |  |  Branch (88:6): [True: 3.59k, 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.59k|	d1 = MIN(pd - pc, pn - pd - (ptrdiff_t)es);
  ------------------
  |  |   69|  3.59k|#define	MIN(a, b)	((a) < (b) ? a : b)
  |  |  ------------------
  |  |  |  Branch (69:20): [True: 0, False: 3.59k]
  |  |  ------------------
  ------------------
  199|  3.59k|	vecswap(pb, pn - d1, d1);
  ------------------
  |  |   88|  3.59k|	if ((n) > 0) swapfunc(a, b, n)
  |  |  ------------------
  |  |  |  Branch (88:6): [True: 0, False: 3.59k]
  |  |  ------------------
  ------------------
  200|       |
  201|  3.59k|	d1 = pb - pa;
  202|  3.59k|	d2 = pd - pc;
  203|  3.59k|	if (d1 <= d2) {
  ------------------
  |  Branch (203:6): [True: 2.09k, False: 1.50k]
  ------------------
  204|       |		/* Recurse on left partition, then iterate on right partition */
  205|  2.09k|		if (d1 > es) {
  ------------------
  |  Branch (205:7): [True: 1.58k, False: 511]
  ------------------
  206|  1.58k|			local_qsort(a, d1 / es, es, cmp, thunk);
  207|  1.58k|		}
  208|  2.09k|		if (d2 > es) {
  ------------------
  |  Branch (208:7): [True: 2.09k, False: 0]
  ------------------
  209|       |			/* Iterate rather than recurse to save stack space */
  210|       |			/* qsort(pn - d2, d2 / es, es, cmp); */
  211|  2.09k|			a = pn - d2;
  212|  2.09k|			n = d2 / es;
  213|  2.09k|			goto loop;
  214|  2.09k|		}
  215|  2.09k|	} else {
  216|       |		/* Recurse on right partition, then iterate on left partition */
  217|  1.50k|		if (d2 > es) {
  ------------------
  |  Branch (217:7): [True: 1.35k, False: 144]
  ------------------
  218|  1.35k|			local_qsort(pn - d2, d2 / es, es, cmp, thunk);
  219|  1.35k|		}
  220|  1.50k|		if (d1 > es) {
  ------------------
  |  Branch (220:7): [True: 1.50k, False: 0]
  ------------------
  221|       |			/* Iterate rather than recurse to save stack space */
  222|       |			/* qsort(a, d1 / es, es, cmp); */
  223|  1.50k|			n = d1 / es;
  224|  1.50k|			goto loop;
  225|  1.50k|		}
  226|  1.50k|	}
  227|  3.59k|}
qsort.c:swapfunc:
   77|  38.2k|{
   78|  38.2k|	char t;
   79|       |
   80|   305k|	do {
   81|   305k|		t = *a;
   82|   305k|		*a++ = *b;
   83|   305k|		*b++ = t;
   84|   305k|	} while (--es > 0);
  ------------------
  |  Branch (84:11): [True: 267k, False: 38.2k]
  ------------------
   85|  38.2k|}
qsort.c:med3:
  104|  4.74k|{
  105|  4.74k|	return CMP(thunk, a, b) < 0 ?
  ------------------
  |  |   95|  4.74k|#define	CMP(t, x, y) (cmp((x), (y)))
  ------------------
  |  Branch (105:9): [True: 2.72k, False: 2.02k]
  ------------------
  106|  2.72k|	       (CMP(thunk, b, c) < 0 ? b : (CMP(thunk, a, c) < 0 ? c : a ))
  ------------------
  |  |   95|  2.72k|#define	CMP(t, x, y) (cmp((x), (y)))
  ------------------
              	       (CMP(thunk, b, c) < 0 ? b : (CMP(thunk, a, c) < 0 ? c : a ))
  ------------------
  |  |   95|  1.80k|#define	CMP(t, x, y) (cmp((x), (y)))
  ------------------
  |  Branch (106:10): [True: 921, False: 1.80k]
  |  Branch (106:38): [True: 828, False: 979]
  ------------------
  107|  4.74k|	      :(CMP(thunk, b, c) > 0 ? b : (CMP(thunk, a, c) < 0 ? a : c ));
  ------------------
  |  |   95|  2.02k|#define	CMP(t, x, y) (cmp((x), (y)))
  ------------------
              	      :(CMP(thunk, b, c) > 0 ? b : (CMP(thunk, a, c) < 0 ? a : c ));
  ------------------
  |  |   95|  1.35k|#define	CMP(t, x, y) (cmp((x), (y)))
  ------------------
  |  Branch (107:10): [True: 662, False: 1.35k]
  |  Branch (107:38): [True: 643, False: 715]
  ------------------
  108|  4.74k|}

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

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

igraph_realize_degree_sequence:
 1011|  6.36k|{
 1012|  6.36k|    bool directed = indeg != NULL;
 1013|       |
 1014|  6.36k|    if (directed) {
  ------------------
  |  Branch (1014:9): [True: 6.36k, False: 0]
  ------------------
 1015|  6.36k|        return igraph_i_realize_directed_degree_sequence(graph, outdeg, indeg, allowed_edge_types, method);
 1016|  6.36k|    } else {
 1017|      0|        return igraph_i_realize_undirected_degree_sequence(graph, outdeg, allowed_edge_types, method);
 1018|      0|    }
 1019|  6.36k|}
igraph_realize_bipartite_degree_sequence:
 1187|  12.7k|) {
 1188|  12.7k|    IGRAPH_HANDLE_EXCEPTIONS_BEGIN;
  ------------------
  |  |   21|  12.7k|    try {
  ------------------
 1189|       |
 1190|  12.7k|    igraph_int_t ec = 0; // The number of edges added so far
 1191|  12.7k|    igraph_int_t n1 = igraph_vector_int_size(degrees1);
 1192|  12.7k|    igraph_int_t n2 = igraph_vector_int_size(degrees2);
 1193|  12.7k|    igraph_vector_int_t edges;
 1194|  12.7k|    igraph_int_t ds1_sum;
 1195|  12.7k|    igraph_int_t ds2_sum;
 1196|  12.7k|    igraph_bool_t multiedges;
 1197|  12.7k|    igraph_bool_t largest;
 1198|  12.7k|    std::vector<vd_pair> vertices1;
 1199|  12.7k|    std::vector<vd_pair> vertices2;
 1200|       |
 1201|       |    // Bipartite graphs can't have self loops, so we ignore those.
 1202|  12.7k|    if (allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) {
  ------------------
  |  |   25|  12.7k|#define IGRAPH_I_MULTI_EDGES_SW 0x02 /* 010, more than one edge allowed between distinct vertices */
  ------------------
  |  Branch (1202:9): [True: 6.36k, False: 6.36k]
  ------------------
 1203|       |        // Multiedges allowed
 1204|  6.36k|        multiedges = true;
 1205|  6.36k|    } else {
 1206|       |        // No multiedges
 1207|  6.36k|        multiedges = false;
 1208|  6.36k|    }
 1209|       |
 1210|  12.7k|    switch (method) {
 1211|  4.24k|    case IGRAPH_REALIZE_DEGSEQ_SMALLEST:
  ------------------
  |  Branch (1211:5): [True: 4.24k, False: 8.49k]
  ------------------
 1212|  4.24k|        largest = false;
 1213|  4.24k|        break;
 1214|  4.24k|    case IGRAPH_REALIZE_DEGSEQ_LARGEST:
  ------------------
  |  Branch (1214:5): [True: 4.24k, False: 8.49k]
  ------------------
 1215|  4.24k|        largest = true;
 1216|  4.24k|        break;
 1217|  4.24k|    case IGRAPH_REALIZE_DEGSEQ_INDEX:
  ------------------
  |  Branch (1217:5): [True: 4.24k, False: 8.49k]
  ------------------
 1218|  4.24k|        return igraph_i_realize_undirected_bipartite_index(graph, degrees1, degrees2, multiedges);
 1219|      0|    default:
  ------------------
  |  Branch (1219:5): [True: 0, False: 12.7k]
  ------------------
 1220|      0|        IGRAPH_ERROR("Invalid bipartite degree sequence realization method.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1221|  12.7k|    }
 1222|       |
 1223|  8.49k|    IGRAPH_CHECK(igraph_i_safe_vector_int_sum(degrees1, &ds1_sum));
  ------------------
  |  |  656|  8.49k|    do { \
  |  |  657|  8.49k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  8.49k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  8.49k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 8.49k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  8.49k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 8.49k]
  |  |  ------------------
  ------------------
 1224|  8.49k|    IGRAPH_CHECK(igraph_i_safe_vector_int_sum(degrees2, &ds2_sum));
  ------------------
  |  |  656|  8.49k|    do { \
  |  |  657|  8.49k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  8.49k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  8.49k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 8.49k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  8.49k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 8.49k]
  |  |  ------------------
  ------------------
 1225|       |
 1226|       |    // Degree sequences of the two partitions must sum to the same value
 1227|  8.49k|    if (ds1_sum != ds2_sum) {
  ------------------
  |  Branch (1227:9): [True: 0, False: 8.49k]
  ------------------
 1228|      0|        goto fail;
 1229|      0|    }
 1230|       |
 1231|       |    // If both degree sequences are empty, it's bigraphical
 1232|  8.49k|    if (!(n1 == 0 && n2 == 0)) {
  ------------------
  |  Branch (1232:11): [True: 4, False: 8.48k]
  |  Branch (1232:22): [True: 4, False: 0]
  ------------------
 1233|  8.48k|        if (igraph_vector_int_min(degrees1) < 0 || igraph_vector_int_min(degrees2) < 0) {
  ------------------
  |  Branch (1233:13): [True: 0, False: 8.48k]
  |  Branch (1233:52): [True: 0, False: 8.48k]
  ------------------
 1234|      0|            goto fail;
 1235|      0|        }
 1236|  8.48k|    }
 1237|       |
 1238|  8.49k|    vertices1.reserve(n1);
 1239|  8.49k|    vertices2.reserve(n2);
 1240|       |
 1241|  1.45M|    for (igraph_int_t i = 0; i < n1; i++) {
  ------------------
  |  Branch (1241:30): [True: 1.44M, False: 8.49k]
  ------------------
 1242|  1.44M|        vertices1.push_back(vd_pair(i, VECTOR(*degrees1)[i]));
  ------------------
  |  |   60|  1.44M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1243|  1.44M|    }
 1244|  1.45M|    for (igraph_int_t i = 0; i < n2; i++) {
  ------------------
  |  Branch (1244:30): [True: 1.44M, False: 8.49k]
  ------------------
 1245|  1.44M|        vertices2.push_back(vd_pair(i + n1, VECTOR(*degrees2)[i]));
  ------------------
  |  |   60|  1.44M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1246|  1.44M|    }
 1247|       |
 1248|  8.49k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&edges, ds1_sum + ds2_sum);
  ------------------
  |  |  119|  8.49k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  8.49k|    do { \
  |  |  |  |  657|  8.49k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  8.49k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  8.49k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 8.49k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  8.49k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 8.49k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  8.49k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  8.49k|    do { \
  |  |  |  |  604|  8.49k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  8.49k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  8.49k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  8.49k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 8.49k]
  |  |  |  |  ------------------
  |  |  |  |  608|  8.49k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  8.49k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 8.49k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 8.49k]
  |  |  ------------------
  ------------------
 1249|       |
 1250|       |
 1251|  8.49k|    std::vector<vd_pair> *src_vs;
 1252|  8.49k|    std::vector<vd_pair> *dest_vs;
 1253|       |
 1254|  2.16M|    while (!vertices1.empty() && !vertices2.empty()) {
  ------------------
  |  Branch (1254:12): [True: 2.15M, False: 7.58k]
  |  Branch (1254:34): [True: 2.15M, 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.15M|        std::stable_sort(vertices1.begin(), vertices1.end(), degree_greater<vd_pair>);
 1259|  2.15M|        std::stable_sort(vertices2.begin(), vertices2.end(), degree_greater<vd_pair>);
 1260|       |
 1261|  2.15M|        vd_pair vd_src(-1, -1);
 1262|       |
 1263|  2.15M|        if (!largest) {
  ------------------
  |  Branch (1263:13): [True: 1.43M, False: 720k]
  ------------------
 1264|  1.43M|            vd_pair min1 = vertices1.back();
 1265|  1.43M|            vd_pair min2 = vertices2.back();
 1266|  1.43M|            if (min1.degree <= min2.degree) {
  ------------------
  |  Branch (1266:17): [True: 743k, False: 692k]
  ------------------
 1267|   743k|                src_vs = &vertices1;
 1268|   743k|                dest_vs = &vertices2;
 1269|   743k|            } else {
 1270|   692k|                src_vs = &vertices2;
 1271|   692k|                dest_vs = &vertices1;
 1272|   692k|            }
 1273|       |
 1274|  1.43M|            vd_src = src_vs->back();
 1275|       |
 1276|  1.43M|        } else {
 1277|   720k|            vd_pair max1 = vertices1.front();
 1278|   720k|            vd_pair max2 = vertices2.front();
 1279|       |
 1280|   720k|            if (max1.degree >= max2.degree) {
  ------------------
  |  Branch (1280:17): [True: 704k, False: 16.5k]
  ------------------
 1281|   704k|                src_vs = &vertices1;
 1282|   704k|                dest_vs = &vertices2;
 1283|   704k|            } else {
 1284|  16.5k|                src_vs = &vertices2;
 1285|  16.5k|                dest_vs = &vertices1;
 1286|  16.5k|            }
 1287|       |
 1288|   720k|            vd_src = src_vs->front();
 1289|   720k|        }
 1290|       |
 1291|  2.15M|        IGRAPH_ASSERT(vd_src.degree >= 0);
  ------------------
  |  |  924|  2.15M|    do { \
  |  |  925|  2.15M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.15M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.15M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.15M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.15M]
  |  |  ------------------
  ------------------
 1292|       |
 1293|  2.15M|        if (!multiedges) {
  ------------------
  |  Branch (1293:13): [True: 1.02M, False: 1.13M]
  ------------------
 1294|       |            // Remove the smallest element
 1295|  1.02M|            if (!largest) {
  ------------------
  |  Branch (1295:17): [True: 706k, False: 313k]
  ------------------
 1296|   706k|                src_vs->pop_back();
 1297|   706k|            } else {
 1298|       |                // Remove the largest element.
 1299|   313k|                src_vs->erase(src_vs->begin());
 1300|   313k|            }
 1301|       |
 1302|  1.02M|            if (vd_src.degree == 0) {
  ------------------
  |  Branch (1302:17): [True: 934k, False: 86.5k]
  ------------------
 1303|   934k|                continue;
 1304|   934k|            }
 1305|  86.5k|            if (dest_vs->size() < size_t(vd_src.degree)) {
  ------------------
  |  Branch (1305:17): [True: 644, False: 85.9k]
  ------------------
 1306|    644|                goto fail;
 1307|    644|            }
 1308|   200k|            for (igraph_int_t i = 0; i < vd_src.degree; i++) {
  ------------------
  |  Branch (1308:38): [True: 115k, False: 85.6k]
  ------------------
 1309|       |                // Decrement the degree of the delta largest vertices in the opposite partition
 1310|       |
 1311|   115k|                if ((*dest_vs)[i].degree == 0) {
  ------------------
  |  Branch (1311:21): [True: 266, False: 115k]
  ------------------
 1312|       |                    // Not enough non-zero remaining degree vertices in opposite partition.
 1313|       |                    // Not graphical.
 1314|    266|                    goto fail;
 1315|    266|                }
 1316|       |
 1317|   115k|                (*dest_vs)[i].degree--;
 1318|       |
 1319|   115k|                VECTOR(edges)[2 * (ec + i)]     = vd_src.vertex;
  ------------------
  |  |   60|   115k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1320|   115k|                VECTOR(edges)[2 * (ec + i) + 1] = (*dest_vs)[i].vertex;
  ------------------
  |  |   60|   115k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1321|   115k|            }
 1322|  85.6k|            ec += vd_src.degree;
 1323|  85.6k|        }
 1324|       |        // If multiedges are allowed
 1325|  1.13M|        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.13M|            if (!largest) {
  ------------------
  |  Branch (1328:17): [True: 729k, False: 407k]
  ------------------
 1329|   729k|                if (src_vs->back().degree <= 1) {
  ------------------
  |  Branch (1329:21): [True: 707k, False: 21.5k]
  ------------------
 1330|   707k|                    src_vs->pop_back();
 1331|   707k|                } else {
 1332|       |                    // Otherwise we decrement its degrees by 1 for the edge we are about to create.
 1333|  21.5k|                    src_vs->back().degree--;
 1334|  21.5k|                }
 1335|   729k|            } else {
 1336|   407k|                if (src_vs->front().degree <= 1) {
  ------------------
  |  Branch (1336:21): [True: 362k, False: 44.7k]
  ------------------
 1337|   362k|                    src_vs->erase(src_vs->begin());
 1338|   362k|                } else {
 1339|  44.7k|                    src_vs->front().degree--;
 1340|  44.7k|                }
 1341|   407k|            }
 1342|       |
 1343|  1.13M|            if (vd_src.degree == 0) {
  ------------------
  |  Branch (1343:17): [True: 979k, False: 156k]
  ------------------
 1344|   979k|                continue;
 1345|   979k|            }
 1346|       |
 1347|   156k|            if (dest_vs->size() < size_t(1)) {
  ------------------
  |  Branch (1347:17): [True: 0, False: 156k]
  ------------------
 1348|      0|                goto fail;
 1349|      0|            }
 1350|       |            // We should never decrement below zero, but check just in case.
 1351|   156k|            IGRAPH_ASSERT((*dest_vs)[0].degree - 1 >= 0);
  ------------------
  |  |  924|   156k|    do { \
  |  |  925|   156k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   156k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 156k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   156k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 156k]
  |  |  ------------------
  ------------------
 1352|       |
 1353|       |            // Connect to the opposite partition
 1354|   156k|            (*dest_vs)[0].degree--;
 1355|       |
 1356|   156k|            VECTOR(edges)[2 * ec] = vd_src.vertex;
  ------------------
  |  |   60|   156k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1357|   156k|            VECTOR(edges)[2 * ec + 1] = (*dest_vs)[0].vertex;
  ------------------
  |  |   60|   156k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1358|   156k|            ec++;
 1359|   156k|        }
 1360|  2.15M|    }
 1361|  7.58k|    IGRAPH_CHECK(igraph_create(graph, &edges, n1 + n2, IGRAPH_UNDIRECTED));
  ------------------
  |  |  656|  7.58k|    do { \
  |  |  657|  7.58k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  7.58k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  7.58k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 7.58k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, 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.58k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 7.58k]
  |  |  ------------------
  ------------------
 1362|       |
 1363|  7.58k|    igraph_vector_int_destroy(&edges);
 1364|  7.58k|    IGRAPH_FINALLY_CLEAN(1);
 1365|       |
 1366|  7.58k|    return IGRAPH_SUCCESS;
 1367|       |
 1368|    910|fail:
 1369|    910|    IGRAPH_ERRORF("The given bidegree sequence cannot be realized as a bipartite %sgraph.",
  ------------------
  |  |  464|    910|    do { \
  |  |  465|    910|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  466|  1.82k|                      igraph_errno, __VA_ARGS__) ; \
  |  |  ------------------
  |  |  |  Branch (466:37): [True: 0, False: 910]
  |  |  ------------------
  |  |  467|    910|        return igraph_errno; \
  |  |  468|    910|    } while (0)
  |  |  ------------------
  |  |  |  Branch (468:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1370|    910|                  IGRAPH_EINVAL, multiedges ? "multi" : "simple ");
 1371|       |
 1372|    910|    IGRAPH_HANDLE_EXCEPTIONS_END;
  ------------------
  |  |   23|    910|    } \
  |  |   24|  12.7k|    catch (const std::bad_alloc &e) { IGRAPH_ERROR(e.what(), IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ } \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   25|  12.7k|    catch (const std::range_error &e) { IGRAPH_ERROR(e.what(), IGRAPH_EOVERFLOW); /* LCOV_EXCL_LINE */ } \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   26|  12.7k|    catch (const std::exception &e) { IGRAPH_ERROR(e.what(), IGRAPH_FAILURE); /* LCOV_EXCL_LINE */ } \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   27|  12.7k|    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.36k|    igraph_realize_degseq_t method) {
  821|  6.36k|    igraph_int_t node_count = igraph_vector_int_size(outdeg);
  822|  6.36k|    igraph_int_t edge_count, edge_count2, indeg_sum;
  823|       |
  824|  6.36k|    IGRAPH_CHECK(igraph_i_safe_vector_int_sum(outdeg, &edge_count));
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  825|       |
  826|  6.36k|    if (igraph_vector_int_size(indeg) != node_count) {
  ------------------
  |  Branch (826:9): [True: 0, False: 6.36k]
  ------------------
  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.36k|    IGRAPH_CHECK(igraph_i_safe_vector_int_sum(indeg, &indeg_sum));
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  831|  6.36k|    if (indeg_sum != edge_count) {
  ------------------
  |  Branch (831:9): [True: 0, False: 6.36k]
  ------------------
  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.36k|    if (node_count > 0 && (igraph_vector_int_min(outdeg) < 0 || igraph_vector_int_min(indeg) < 0)) {
  ------------------
  |  Branch (835:9): [True: 6.36k, False: 3]
  |  Branch (835:28): [True: 0, False: 6.36k]
  |  Branch (835:65): [True: 0, False: 6.36k]
  ------------------
  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.36k|    if (allowed_edge_types != IGRAPH_SIMPLE_SW) {
  ------------------
  |  Branch (840:9): [True: 0, False: 6.36k]
  ------------------
  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.36k|    igraph_vector_int_t edges;
  845|  6.36k|    IGRAPH_SAFE_MULT(edge_count, 2, &edge_count2);
  ------------------
  |  |   57|  6.36k|    do { \
  |  |   58|  6.36k|        igraph_int_t _safe_a = (a), _safe_b = (b); \
  |  |   59|  6.36k|        igraph_int_t _safe_prod; \
  |  |   60|  6.36k|        if (__builtin_mul_overflow(_safe_a, _safe_b, &_safe_prod)) { \
  |  |  ------------------
  |  |  |  Branch (60:13): [True: 0, False: 6.36k]
  |  |  ------------------
  |  |   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.36k|        *(res) = _safe_prod; \
  |  |   64|  6.36k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (64:14): [Folded, False: 6.36k]
  |  |  ------------------
  ------------------
  846|  6.36k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&edges, edge_count2);
  ------------------
  |  |  119|  6.36k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  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]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  6.36k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  6.36k|    do { \
  |  |  |  |  604|  6.36k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  6.36k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  6.36k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  6.36k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 6.36k]
  |  |  |  |  ------------------
  |  |  |  |  608|  6.36k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  6.36k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 6.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 6.36k]
  |  |  ------------------
  ------------------
  847|       |
  848|  6.36k|    IGRAPH_HANDLE_EXCEPTIONS_BEGIN;
  ------------------
  |  |   21|  6.36k|    try {
  ------------------
  849|  6.36k|    switch (method) {
  850|  2.12k|    case IGRAPH_REALIZE_DEGSEQ_SMALLEST:
  ------------------
  |  Branch (850:5): [True: 2.12k, False: 4.24k]
  ------------------
  851|  2.12k|        IGRAPH_CHECK(igraph_i_kleitman_wang(outdeg, indeg, &edges, true));
  ------------------
  |  |  656|  2.12k|    do { \
  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 616, False: 1.50k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|    616|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|    616|    do { \
  |  |  |  |  427|    616|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|    616|        return igraph_errno ; \
  |  |  |  |  429|    616|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|    616|        } \
  |  |  661|  2.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.50k]
  |  |  ------------------
  ------------------
  852|  1.50k|        break;
  853|  2.12k|    case IGRAPH_REALIZE_DEGSEQ_LARGEST:
  ------------------
  |  Branch (853:5): [True: 2.12k, False: 4.24k]
  ------------------
  854|  2.12k|        IGRAPH_CHECK(igraph_i_kleitman_wang(outdeg, indeg, &edges, false));
  ------------------
  |  |  656|  2.12k|    do { \
  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 616, False: 1.50k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|    616|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|    616|    do { \
  |  |  |  |  427|    616|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|    616|        return igraph_errno ; \
  |  |  |  |  429|    616|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|    616|        } \
  |  |  661|  2.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.50k]
  |  |  ------------------
  ------------------
  855|  1.50k|        break;
  856|  2.12k|    case IGRAPH_REALIZE_DEGSEQ_INDEX:
  ------------------
  |  Branch (856:5): [True: 2.12k, False: 4.24k]
  ------------------
  857|  2.12k|        IGRAPH_CHECK(igraph_i_kleitman_wang_index(outdeg, indeg, &edges));
  ------------------
  |  |  656|  2.12k|    do { \
  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 616, False: 1.50k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|    616|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|    616|    do { \
  |  |  |  |  427|    616|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|    616|        return igraph_errno ; \
  |  |  |  |  429|    616|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|    616|        } \
  |  |  661|  2.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.50k]
  |  |  ------------------
  ------------------
  858|  1.50k|        break;
  859|  1.50k|    default:
  ------------------
  |  Branch (859:5): [True: 0, False: 6.36k]
  ------------------
  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.36k|    }
  862|  6.36k|    IGRAPH_HANDLE_EXCEPTIONS_END;
  ------------------
  |  |   23|  6.36k|    } \
  |  |   24|  6.36k|    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.36k|    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.36k|    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.36k|    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.52k|    IGRAPH_CHECK(igraph_create(graph, &edges, node_count, true));
  ------------------
  |  |  656|  4.52k|    do { \
  |  |  657|  4.52k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.52k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.52k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.52k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  4.52k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.52k]
  |  |  ------------------
  ------------------
  865|       |
  866|  4.52k|    igraph_vector_int_destroy(&edges);
  867|  4.52k|    IGRAPH_FINALLY_CLEAN(1);
  868|       |
  869|  4.52k|    return IGRAPH_SUCCESS;
  870|  4.52k|}
degree_sequence.cpp:_ZL22igraph_i_kleitman_wangPK19igraph_vector_int_tS1_PS_b:
  581|  4.24k|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.24k|    igraph_int_t n = igraph_vector_int_size(indeg); // number of vertices
  583|       |
  584|  4.24k|    igraph_int_t ec = 0; // number of edges added so far
  585|       |
  586|  4.24k|    std::vector<vbd_pair> vertices;
  587|  4.24k|    vertices.reserve(n);
  588|   728k|    for (igraph_int_t i = 0; i < n; ++i) {
  ------------------
  |  Branch (588:30): [True: 724k, False: 4.24k]
  ------------------
  589|   724k|        vertices.push_back(vbd_pair(i, bidegree(VECTOR(*indeg)[i], VECTOR(*outdeg)[i])));
  ------------------
  |  |   60|   724k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      vertices.push_back(vbd_pair(i, bidegree(VECTOR(*indeg)[i], VECTOR(*outdeg)[i])));
  ------------------
  |  |   60|   724k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  590|   724k|    }
  591|       |
  592|  81.6k|    while (true) {
  ------------------
  |  Branch (592:12): [True: 81.6k, Folded]
  ------------------
  593|       |        // sort vertices by (in, out) degree pairs in decreasing order
  594|       |        // O(V log V)
  595|  81.6k|        std::stable_sort(vertices.begin(), vertices.end(), degree_greater<vbd_pair>);
  596|       |
  597|       |        // remove (0,0)-degree vertices
  598|   799k|        while (!vertices.empty() && vertices.back().degree == bidegree(0, 0)) {
  ------------------
  |  Branch (598:16): [True: 796k, False: 3.01k]
  |  Branch (598:16): [True: 717k, False: 81.6k]
  |  Branch (598:37): [True: 717k, False: 78.6k]
  ------------------
  599|   717k|            vertices.pop_back();
  600|   717k|        }
  601|       |
  602|       |        // if no vertices remain, stop
  603|  81.6k|        if (vertices.empty()) {
  ------------------
  |  Branch (603:13): [True: 3.01k, False: 78.6k]
  ------------------
  604|  3.01k|            break;
  605|  3.01k|        }
  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|  78.6k|        vbd_pair *vdp;
  612|       |        // O(V)
  613|  78.6k|        if (smallest) {
  ------------------
  |  Branch (613:13): [True: 40.1k, False: 38.4k]
  ------------------
  614|  40.1k|            vdp = &*std::find_if(vertices.rbegin(), vertices.rend(), is_nonzero_outdeg);
  615|  40.1k|        } else {
  616|  38.4k|            vdp = &*std::find_if(vertices.begin(), vertices.end(), is_nonzero_outdeg);
  617|  38.4k|        }
  618|       |
  619|       |        // are there a sufficient number of other vertices to connect to?
  620|  78.6k|        if (static_cast<igraph_int_t>(vertices.size()) - 1 < vdp->degree.second) {
  ------------------
  |  Branch (620:13): [True: 1.11k, False: 77.4k]
  ------------------
  621|  1.11k|            goto fail;
  622|  1.11k|        }
  623|       |
  624|       |        // create the connections
  625|  77.4k|        igraph_int_t k = 0;
  626|  77.4k|        for (auto it = vertices.begin();
  627|   199k|             k < vdp->degree.second;
  ------------------
  |  Branch (627:14): [True: 122k, False: 77.3k]
  ------------------
  628|   122k|             ++it) {
  629|   122k|            if (it->vertex == vdp->vertex) {
  ------------------
  |  Branch (629:17): [True: 12.1k, False: 110k]
  ------------------
  630|  12.1k|                continue;    // do not create a self-loop
  631|  12.1k|            }
  632|   110k|            if (--(it->degree.first) < 0) {
  ------------------
  |  Branch (632:17): [True: 122, False: 110k]
  ------------------
  633|    122|                goto fail;
  634|    122|            }
  635|       |
  636|   110k|            VECTOR(*edges)[2 * (ec + k)] = vdp->vertex;
  ------------------
  |  |   60|   110k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  637|   110k|            VECTOR(*edges)[2 * (ec + k) + 1] = it->vertex;
  ------------------
  |  |   60|   110k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  638|       |
  639|   110k|            k++;
  640|   110k|        }
  641|       |
  642|  77.3k|        ec += vdp->degree.second;
  643|  77.3k|        vdp->degree.second = 0;
  644|  77.3k|    }
  645|       |
  646|  3.01k|    return IGRAPH_SUCCESS;
  647|       |
  648|  1.23k|fail:
  649|  1.23k|    IGRAPH_ERROR("The given directed degree sequences cannot be realized as a simple graph.", IGRAPH_EINVAL);
  ------------------
  |  |  426|  1.23k|    do { \
  |  |  427|  1.23k|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|  1.23k|        return igraph_errno ; \
  |  |  429|  1.23k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  650|  1.23k|}
_ZN8vbd_pairC2ElNSt3__14pairIllEE:
   54|  1.08M|    vbd_pair(igraph_int_t vertex, bidegree degree) : vertex(vertex), degree(degree) {}
_Z14degree_greaterI8vbd_pairEbRKT_S3_:
   59|   299M|template<typename T> inline bool degree_greater(const T &a, const T &b) {
   60|   299M|    return a.degree > b.degree;
   61|   299M|}
_Z17is_nonzero_outdegRK8vbd_pair:
  570|   665k|inline bool is_nonzero_outdeg(const vbd_pair &vd) {
  571|   665k|    return (vd.degree.second != 0);
  572|   665k|}
degree_sequence.cpp:_ZL28igraph_i_kleitman_wang_indexPK19igraph_vector_int_tS1_PS_:
  655|  2.12k|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.12k|    igraph_int_t n = igraph_vector_int_size(indeg); // number of vertices
  657|       |
  658|  2.12k|    igraph_int_t ec = 0; // number of edges added so far
  659|       |
  660|  2.12k|    typedef std::list<vbd_pair> vlist;
  661|  2.12k|    vlist vertices;
  662|   364k|    for (igraph_int_t i = 0; i < n; ++i) {
  ------------------
  |  Branch (662:30): [True: 362k, False: 2.12k]
  ------------------
  663|   362k|        vertices.push_back(vbd_pair(i, bidegree(VECTOR(*indeg)[i], VECTOR(*outdeg)[i])));
  ------------------
  |  |   60|   362k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      vertices.push_back(vbd_pair(i, bidegree(VECTOR(*indeg)[i], VECTOR(*outdeg)[i])));
  ------------------
  |  |   60|   362k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  664|   362k|    }
  665|       |
  666|  2.12k|    std::vector<vlist::iterator> pointers;
  667|  2.12k|    pointers.reserve(n);
  668|   364k|    for (auto it = vertices.begin(); it != vertices.end(); ++it) {
  ------------------
  |  Branch (668:38): [True: 362k, False: 2.12k]
  ------------------
  669|   362k|        pointers.push_back(it);
  670|   362k|    }
  671|       |
  672|   311k|    for (const auto &pt : pointers) {
  ------------------
  |  Branch (672:25): [True: 311k, False: 1.50k]
  ------------------
  673|       |        // sort vertices by (in, out) degree pairs in decreasing order
  674|       |        // note: std::list::sort does a stable sort
  675|   311k|        vertices.sort(degree_greater<vbd_pair>);
  676|       |
  677|       |        // choose a vertex the out-stubs of which will be connected
  678|   311k|        vbd_pair &vd = *pt;
  679|       |
  680|   311k|        if (vd.degree.second == 0) {
  ------------------
  |  Branch (680:13): [True: 272k, False: 39.3k]
  ------------------
  681|   272k|            continue;
  682|   272k|        }
  683|       |
  684|  39.3k|        igraph_int_t k = 0;
  685|  39.3k|        vlist::iterator it;
  686|  39.3k|        for (it = vertices.begin();
  687|  97.8k|             k != vd.degree.second && it != vertices.end();
  ------------------
  |  Branch (687:14): [True: 59.1k, False: 38.7k]
  |  Branch (687:14): [True: 59.0k, False: 38.8k]
  |  Branch (687:39): [True: 59.0k, False: 150]
  ------------------
  688|  59.0k|             ++it) {
  689|  59.0k|            if (it->vertex == vd.vertex) {
  ------------------
  |  Branch (689:17): [True: 1.88k, False: 57.1k]
  ------------------
  690|  1.88k|                continue;
  691|  1.88k|            }
  692|       |
  693|  57.1k|            if (--(it->degree.first) < 0) {
  ------------------
  |  Branch (693:17): [True: 466, False: 56.6k]
  ------------------
  694|    466|                goto fail;
  695|    466|            }
  696|       |
  697|  56.6k|            VECTOR(*edges)[2 * (ec + k)] = vd.vertex;
  ------------------
  |  |   60|  56.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  698|  56.6k|            VECTOR(*edges)[2 * (ec + k) + 1] = it->vertex;
  ------------------
  |  |   60|  56.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  699|       |
  700|  56.6k|            ++k;
  701|  56.6k|        }
  702|  38.8k|        if (it == vertices.end() && k < vd.degree.second) {
  ------------------
  |  Branch (702:13): [True: 173, False: 38.7k]
  |  Branch (702:13): [True: 150, False: 38.7k]
  |  Branch (702:37): [True: 150, False: 23]
  ------------------
  703|    150|            goto fail;
  704|    150|        }
  705|       |
  706|  38.7k|        ec += vd.degree.second;
  707|  38.7k|        vd.degree.second = 0;
  708|  38.7k|    }
  709|       |
  710|  1.50k|    return IGRAPH_SUCCESS;
  711|       |
  712|    616|fail:
  713|    616|    IGRAPH_ERROR("The given directed degree sequences cannot be realized as a simple graph.", IGRAPH_EINVAL);
  ------------------
  |  |  426|    616|    do { \
  |  |  427|    616|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|    616|        return igraph_errno ; \
  |  |  429|    616|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  714|    616|}
degree_sequence.cpp:_ZL43igraph_i_realize_undirected_bipartite_indexP8igraph_tPK19igraph_vector_int_tS3_b:
 1030|  4.24k|) {
 1031|  4.24k|    igraph_int_t ec = 0; // The number of edges added so far
 1032|  4.24k|    igraph_int_t n1 = igraph_vector_int_size(degree1);
 1033|  4.24k|    igraph_int_t n2 = igraph_vector_int_size(degree2);
 1034|  4.24k|    igraph_vector_int_t edges;
 1035|  4.24k|    igraph_int_t ds1_sum;
 1036|  4.24k|    igraph_int_t ds2_sum;
 1037|       |
 1038|  4.24k|    std::vector<vd_pair> vertices1;
 1039|  4.24k|    std::vector<vd_pair> vertices2;
 1040|  4.24k|    std::vector<vd_pair> *src_vs = &vertices1;
 1041|  4.24k|    std::vector<vd_pair> *dest_vs = &vertices2;
 1042|       |
 1043|  4.24k|    IGRAPH_CHECK(igraph_i_safe_vector_int_sum(degree1, &ds1_sum));
  ------------------
  |  |  656|  4.24k|    do { \
  |  |  657|  4.24k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.24k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.24k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.24k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  4.24k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.24k]
  |  |  ------------------
  ------------------
 1044|  4.24k|    IGRAPH_CHECK(igraph_i_safe_vector_int_sum(degree2, &ds2_sum));
  ------------------
  |  |  656|  4.24k|    do { \
  |  |  657|  4.24k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.24k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.24k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.24k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  4.24k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.24k]
  |  |  ------------------
  ------------------
 1045|       |
 1046|  4.24k|    if (ds1_sum != ds2_sum) {
  ------------------
  |  Branch (1046:9): [True: 0, False: 4.24k]
  ------------------
 1047|      0|        goto fail;
 1048|      0|    }
 1049|       |
 1050|       |    // If both degree sequences are empty, it's bigraphical
 1051|  4.24k|    if (!(n1 == 0 && n2 == 0)) {
  ------------------
  |  Branch (1051:11): [True: 2, False: 4.24k]
  |  Branch (1051:22): [True: 2, False: 0]
  ------------------
 1052|  4.24k|        if (igraph_vector_int_min(degree1) < 0 || igraph_vector_int_min(degree2) < 0) {
  ------------------
  |  Branch (1052:13): [True: 0, False: 4.24k]
  |  Branch (1052:51): [True: 0, False: 4.24k]
  ------------------
 1053|      0|            goto fail;
 1054|      0|        }
 1055|  4.24k|    }
 1056|       |
 1057|  4.24k|    vertices1.reserve(n1);
 1058|  4.24k|    vertices2.reserve(n2);
 1059|       |
 1060|   728k|    for (igraph_int_t i = 0; i < n1; i++) {
  ------------------
  |  Branch (1060:30): [True: 724k, False: 4.24k]
  ------------------
 1061|   724k|        vertices1.push_back(vd_pair(i, VECTOR(*degree1)[i]));
  ------------------
  |  |   60|   724k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1062|   724k|    }
 1063|   728k|    for (igraph_int_t i = 0; i < n2; i++) {
  ------------------
  |  Branch (1063:30): [True: 724k, False: 4.24k]
  ------------------
 1064|   724k|        vertices2.push_back(vd_pair(i + n1, VECTOR(*degree2)[i]));
  ------------------
  |  |   60|   724k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1065|   724k|    }
 1066|       |
 1067|  4.24k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&edges, ds1_sum + ds2_sum);
  ------------------
  |  |  119|  4.24k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  4.24k|    do { \
  |  |  |  |  657|  4.24k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  4.24k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  4.24k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.24k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  4.24k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 4.24k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  4.24k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  4.24k|    do { \
  |  |  |  |  604|  4.24k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  4.24k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  4.24k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  4.24k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 4.24k]
  |  |  |  |  ------------------
  |  |  |  |  608|  4.24k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  4.24k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 4.24k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 4.24k]
  |  |  ------------------
  ------------------
 1068|       |
 1069|   730k|    while (!vertices1.empty() && !vertices2.empty()) {
  ------------------
  |  Branch (1069:12): [True: 726k, False: 3.79k]
  |  Branch (1069:34): [True: 726k, False: 0]
  ------------------
 1070|       |        // Go by index, so we start in ds1, so ds2 needs to be sorted.
 1071|   726k|        std::stable_sort(vertices2.begin(), vertices2.end(), degree_greater<vd_pair>);
 1072|       |        // No sorting of ds1 needed for index case
 1073|   726k|        vd_pair vd_src = vertices1.front();
 1074|       |        // No multiedges - Take the first vertex, connect to the largest delta in opposite partition
 1075|   726k|        if (!multiedges) {
  ------------------
  |  Branch (1075:13): [True: 326k, False: 400k]
  ------------------
 1076|       |            // Remove the source degrees
 1077|   326k|            src_vs->erase(src_vs->begin());
 1078|       |
 1079|   326k|            if (vd_src.degree == 0) {
  ------------------
  |  Branch (1079:17): [True: 287k, False: 39.5k]
  ------------------
 1080|   287k|                continue;
 1081|   287k|            }
 1082|       |
 1083|  39.5k|            if (dest_vs->size() < size_t(vd_src.degree)) {
  ------------------
  |  Branch (1083:17): [True: 175, False: 39.3k]
  ------------------
 1084|    175|                goto fail;
 1085|    175|            }
 1086|       |
 1087|  96.5k|            for (igraph_int_t i = 0; i < vd_src.degree; i++) {
  ------------------
  |  Branch (1087:38): [True: 57.4k, False: 39.1k]
  ------------------
 1088|  57.4k|                if ((*dest_vs)[i].degree == 0) {
  ------------------
  |  Branch (1088:21): [True: 280, False: 57.1k]
  ------------------
 1089|       |                    // Not enough non-zero remaining degree vertices in opposite partition.
 1090|       |                    // Not graphical.
 1091|    280|                    goto fail;
 1092|    280|                }
 1093|       |
 1094|  57.1k|                (*dest_vs)[i].degree--;
 1095|       |
 1096|  57.1k|                VECTOR(edges)[2*(ec + i)]     = vd_src.vertex;
  ------------------
  |  |   60|  57.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1097|  57.1k|                VECTOR(edges)[2*(ec + i) + 1] = (*dest_vs)[i].vertex;
  ------------------
  |  |   60|  57.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1098|  57.1k|            }
 1099|  39.1k|            ec += vd_src.degree;
 1100|  39.1k|        }
 1101|       |        // If multiedges are allowed
 1102|   400k|        else {
 1103|       |            // If this is the last edge to be created from this vertex, we remove it.
 1104|   400k|            if (src_vs->front().degree <= 1) {
  ------------------
  |  Branch (1104:17): [True: 362k, False: 37.8k]
  ------------------
 1105|   362k|                src_vs->erase(src_vs->begin());
 1106|   362k|            } else {
 1107|  37.8k|                src_vs->front().degree--;
 1108|  37.8k|            }
 1109|       |
 1110|   400k|            if (vd_src.degree == 0) {
  ------------------
  |  Branch (1110:17): [True: 321k, False: 78.4k]
  ------------------
 1111|   321k|                continue;
 1112|   321k|            }
 1113|       |
 1114|  78.4k|            if (dest_vs->size() < size_t(1)) {
  ------------------
  |  Branch (1114:17): [True: 0, False: 78.4k]
  ------------------
 1115|      0|                goto fail;
 1116|      0|            }
 1117|       |            // We should never decrement below zero, but check just in case.
 1118|  78.4k|            IGRAPH_ASSERT((*dest_vs)[0].degree - 1 >= 0);
  ------------------
  |  |  924|  78.4k|    do { \
  |  |  925|  78.4k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  78.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 78.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  78.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 78.4k]
  |  |  ------------------
  ------------------
 1119|       |
 1120|       |            // Connect to the opposite partition
 1121|  78.4k|            (*dest_vs)[0].degree--;
 1122|       |
 1123|  78.4k|            VECTOR(edges)[2 * ec] = vd_src.vertex;
  ------------------
  |  |   60|  78.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1124|  78.4k|            VECTOR(edges)[2 * ec + 1] = (*dest_vs)[0].vertex;
  ------------------
  |  |   60|  78.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1125|  78.4k|            ec++;
 1126|  78.4k|        }
 1127|   726k|    }
 1128|  3.79k|    IGRAPH_CHECK(igraph_create(graph, &edges, n1 + n2, false));
  ------------------
  |  |  656|  3.79k|    do { \
  |  |  657|  3.79k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  3.79k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  3.79k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.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|  3.79k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 3.79k]
  |  |  ------------------
  ------------------
 1129|       |
 1130|  3.79k|    igraph_vector_int_destroy(&edges);
 1131|  3.79k|    IGRAPH_FINALLY_CLEAN(1);
 1132|       |
 1133|  3.79k|    return IGRAPH_SUCCESS;
 1134|       |
 1135|    455|fail:
 1136|    455|    IGRAPH_ERRORF("The given bidegree sequence cannot be realized as a bipartite %sgraph.",
  ------------------
  |  |  464|    455|    do { \
  |  |  465|    455|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  466|    910|                      igraph_errno, __VA_ARGS__) ; \
  |  |  ------------------
  |  |  |  Branch (466:37): [True: 0, False: 455]
  |  |  ------------------
  |  |  467|    455|        return igraph_errno; \
  |  |  468|    455|    } while (0)
  |  |  ------------------
  |  |  |  Branch (468:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1137|    455|                  IGRAPH_EINVAL, multiedges ? "multi" : "simple ");
 1138|    455|}
_ZN7vd_pairC2Ell:
   43|  6.50M|    vd_pair(igraph_int_t vertex, igraph_int_t degree) : vertex(vertex), degree(degree) {}
_Z14degree_greaterI7vd_pairEbRKT_S3_:
   59|  1.37G|template<typename T> inline bool degree_greater(const T &a, const T &b) {
   60|  1.37G|    return a.degree > b.degree;
   61|  1.37G|}

igraph_is_graphical:
  135|  8.49k|{
  136|       |    /* Undirected case: */
  137|  8.49k|    if (in_degrees == NULL)
  ------------------
  |  Branch (137:9): [True: 0, False: 8.49k]
  ------------------
  138|      0|    {
  139|      0|        if ( (allowed_edge_types & IGRAPH_LOOPS_SW) && (allowed_edge_types & IGRAPH_I_MULTI_LOOPS_SW )) {
  ------------------
  |  |   26|      0|#define IGRAPH_I_MULTI_LOOPS_SW 0x04 /* 100, more than one self-loop allowed on the same vertex   */
  ------------------
  |  Branch (139:14): [True: 0, False: 0]
  |  Branch (139:56): [True: 0, False: 0]
  ------------------
  140|       |            /* Typically this case is used when multiple edges are allowed both as self-loops and
  141|       |             * between distinct vertices. However, the conditions are the same even if multi-edges
  142|       |             * are not allowed between distinct vertices (only as self-loops). Therefore, we
  143|       |             * do not test IGRAPH_I_MULTI_EDGES_SW in the if (...). */
  144|      0|            return igraph_i_is_graphical_undirected_multi_loops(out_degrees, res);
  145|      0|        }
  146|      0|        else if ( ! (allowed_edge_types & IGRAPH_LOOPS_SW) && (allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) ) {
  ------------------
  |  |   25|      0|#define IGRAPH_I_MULTI_EDGES_SW 0x02 /* 010, more than one edge allowed between distinct vertices */
  ------------------
  |  Branch (146:19): [True: 0, False: 0]
  |  Branch (146:63): [True: 0, False: 0]
  ------------------
  147|      0|            return igraph_i_is_graphical_undirected_loopless_multi(out_degrees, res);
  148|      0|        }
  149|      0|        else if ( (allowed_edge_types & IGRAPH_LOOPS_SW) && ! (allowed_edge_types & IGRAPH_I_MULTI_LOOPS_SW) && ! (allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) ) {
  ------------------
  |  |   26|      0|#define IGRAPH_I_MULTI_LOOPS_SW 0x04 /* 100, more than one self-loop allowed on the same vertex   */
  ------------------
                      else if ( (allowed_edge_types & IGRAPH_LOOPS_SW) && ! (allowed_edge_types & IGRAPH_I_MULTI_LOOPS_SW) && ! (allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) ) {
  ------------------
  |  |   25|      0|#define IGRAPH_I_MULTI_EDGES_SW 0x02 /* 010, more than one edge allowed between distinct vertices */
  ------------------
  |  Branch (149:19): [True: 0, False: 0]
  |  Branch (149:61): [True: 0, False: 0]
  |  Branch (149:113): [True: 0, False: 0]
  ------------------
  150|      0|            return igraph_i_is_graphical_undirected_loopy_simple(out_degrees, res);
  151|      0|        }
  152|      0|        else if ( ! (allowed_edge_types & IGRAPH_LOOPS_SW) && ! (allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) ) {
  ------------------
  |  |   25|      0|#define IGRAPH_I_MULTI_EDGES_SW 0x02 /* 010, more than one edge allowed between distinct vertices */
  ------------------
  |  Branch (152:19): [True: 0, False: 0]
  |  Branch (152:63): [True: 0, False: 0]
  ------------------
  153|      0|            return igraph_i_is_graphical_undirected_simple(out_degrees, res);
  154|      0|        } else {
  155|       |            /* Remaining case:
  156|       |             *  - At most one self-loop per vertex but multi-edges between distinct vertices allowed.
  157|       |             * These cases cannot currently be requested through the documented API,
  158|       |             * so no explanatory error message for now. */
  159|      0|            return IGRAPH_UNIMPLEMENTED;
  160|      0|        }
  161|      0|    }
  162|       |    /* Directed case: */
  163|  8.49k|    else
  164|  8.49k|    {
  165|  8.49k|        if (igraph_vector_int_size(in_degrees) != igraph_vector_int_size(out_degrees)) {
  ------------------
  |  Branch (165:13): [True: 0, False: 8.49k]
  ------------------
  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|  8.49k|        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.24k|#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.12k|#define IGRAPH_I_MULTI_LOOPS_SW 0x04 /* 100, more than one self-loop allowed on the same vertex   */
  ------------------
  |  Branch (169:14): [True: 4.24k, False: 4.24k]
  |  Branch (169:56): [True: 2.12k, False: 2.12k]
  |  Branch (169:106): [True: 2.12k, False: 0]
  ------------------
  170|  2.12k|            return igraph_i_is_graphical_directed_loopy_multi(out_degrees, in_degrees, res);
  171|  2.12k|        }
  172|  6.36k|        else if ( ! (allowed_edge_types & IGRAPH_LOOPS_SW) && (allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) ) {
  ------------------
  |  |   25|  4.24k|#define IGRAPH_I_MULTI_EDGES_SW 0x02 /* 010, more than one edge allowed between distinct vertices */
  ------------------
  |  Branch (172:19): [True: 4.24k, False: 2.12k]
  |  Branch (172:63): [True: 2.12k, False: 2.12k]
  ------------------
  173|  2.12k|            return igraph_i_is_graphical_directed_loopless_multi(out_degrees, in_degrees, res);
  174|  2.12k|        }
  175|  4.24k|        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.12k|#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.12k|#define IGRAPH_I_MULTI_EDGES_SW 0x02 /* 010, more than one edge allowed between distinct vertices */
  ------------------
  |  Branch (175:19): [True: 2.12k, False: 2.12k]
  |  Branch (175:61): [True: 2.12k, False: 0]
  |  Branch (175:113): [True: 2.12k, False: 0]
  ------------------
  176|  2.12k|            return igraph_i_is_graphical_directed_loopy_simple(out_degrees, in_degrees, res);
  177|  2.12k|        }
  178|  2.12k|        else if ( ! (allowed_edge_types & IGRAPH_LOOPS_SW) && ! (allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) ) {
  ------------------
  |  |   25|  2.12k|#define IGRAPH_I_MULTI_EDGES_SW 0x02 /* 010, more than one edge allowed between distinct vertices */
  ------------------
  |  Branch (178:19): [True: 2.12k, False: 0]
  |  Branch (178:63): [True: 2.12k, False: 0]
  ------------------
  179|  2.12k|            return igraph_i_is_graphical_directed_simple(out_degrees, in_degrees, res);
  180|  2.12k|        } else {
  181|       |            /* Remaining cases:
  182|       |             *  - At most one self-loop per vertex but multi-edges between distinct vertices allowed.
  183|       |             *  - At most one edge between distinct vertices but multi-self-loops allowed.
  184|       |             * These cases cannot currently be requested through the documented API,
  185|       |             * so no explanatory error message for now. */
  186|      0|            return IGRAPH_UNIMPLEMENTED;
  187|      0|        }
  188|  8.49k|    }
  189|       |
  190|       |    /* can't reach here */
  191|  8.49k|}
graphicality.c:igraph_i_is_graphical_directed_loopy_multi:
  547|  4.24k|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.24k|    igraph_int_t sumdiff; /* difference between sum of in- and out-degrees */
  549|  4.24k|    igraph_int_t n = igraph_vector_int_size(out_degrees);
  550|  4.24k|    igraph_int_t i;
  551|       |
  552|  4.24k|    IGRAPH_ASSERT(igraph_vector_int_size(in_degrees) == n);
  ------------------
  |  |  924|  4.24k|    do { \
  |  |  925|  4.24k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.24k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.24k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.24k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.24k]
  |  |  ------------------
  ------------------
  553|       |
  554|  4.24k|    sumdiff = 0;
  555|   728k|    for (i = 0; i < n; ++i) {
  ------------------
  |  Branch (555:17): [True: 724k, False: 4.24k]
  ------------------
  556|   724k|        igraph_int_t dout = VECTOR(*out_degrees)[i];
  ------------------
  |  |   60|   724k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  557|   724k|        igraph_int_t din  = VECTOR(*in_degrees)[i];
  ------------------
  |  |   60|   724k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  558|       |
  559|   724k|        if (dout < 0 || din < 0) {
  ------------------
  |  Branch (559:13): [True: 0, False: 724k]
  |  Branch (559:25): [True: 0, False: 724k]
  ------------------
  560|      0|            *res = false;
  561|      0|            return IGRAPH_SUCCESS;
  562|      0|        }
  563|       |
  564|   724k|        sumdiff += din - dout;
  565|   724k|    }
  566|       |
  567|  4.24k|    *res = sumdiff == 0;
  568|       |
  569|  4.24k|    return IGRAPH_SUCCESS;
  570|  4.24k|}
graphicality.c:igraph_i_is_graphical_directed_loopless_multi:
  579|  2.12k|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.12k|    igraph_int_t i, sumin, sumout, dmax;
  581|  2.12k|    igraph_int_t n = igraph_vector_int_size(out_degrees);
  582|       |
  583|  2.12k|    IGRAPH_ASSERT(igraph_vector_int_size(in_degrees) == n);
  ------------------
  |  |  924|  2.12k|    do { \
  |  |  925|  2.12k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  584|       |
  585|  2.12k|    sumin = 0; sumout = 0;
  586|  2.12k|    dmax = 0;
  587|   364k|    for (i = 0; i < n; ++i) {
  ------------------
  |  Branch (587:17): [True: 362k, False: 2.12k]
  ------------------
  588|   362k|        igraph_int_t dout = VECTOR(*out_degrees)[i];
  ------------------
  |  |   60|   362k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  589|   362k|        igraph_int_t din  = VECTOR(*in_degrees)[i];
  ------------------
  |  |   60|   362k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  590|   362k|        igraph_int_t d = dout + din;
  591|       |
  592|   362k|        if (dout < 0 || din < 0) {
  ------------------
  |  Branch (592:13): [True: 0, False: 362k]
  |  Branch (592:25): [True: 0, False: 362k]
  ------------------
  593|      0|            *res = false;
  594|      0|            return IGRAPH_SUCCESS;
  595|      0|        }
  596|       |
  597|   362k|        sumin += din; sumout += dout;
  598|       |
  599|   362k|        if (d > dmax) {
  ------------------
  |  Branch (599:13): [True: 3.22k, False: 359k]
  ------------------
  600|  3.22k|            dmax = d;
  601|  3.22k|        }
  602|   362k|    }
  603|       |
  604|  2.12k|    *res = (sumin == sumout) && (sumout >= dmax);
  ------------------
  |  Branch (604:12): [True: 2.12k, False: 0]
  |  Branch (604:33): [True: 1.76k, False: 357]
  ------------------
  605|       |
  606|  2.12k|    return IGRAPH_SUCCESS;
  607|  2.12k|}
graphicality.c:igraph_i_is_graphical_directed_loopy_simple:
  614|  2.12k|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.12k|    return igraph_i_is_bigraphical_simple(out_degrees, in_degrees, res);
  616|  2.12k|}
graphicality.c:igraph_i_is_graphical_directed_simple:
  624|  2.12k|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.12k|    igraph_vector_int_t in_degree_cumcounts, in_degree_counts;
  626|  2.12k|    igraph_vector_int_t sorted_in_degrees, sorted_out_degrees;
  627|  2.12k|    igraph_vector_int_t left_pq, right_pq;
  628|  2.12k|    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.12k|    IGRAPH_CHECK(igraph_i_is_graphical_directed_loopy_multi(out_degrees, in_degrees, res));
  ------------------
  |  |  656|  2.12k|    do { \
  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  632|  2.12k|    if (! *res) {
  ------------------
  |  Branch (632:9): [True: 0, False: 2.12k]
  ------------------
  633|      0|        return IGRAPH_SUCCESS;
  634|      0|    }
  635|       |
  636|  2.12k|    const igraph_int_t vcount = igraph_vector_int_size(out_degrees);
  637|  2.12k|    if (vcount == 0) {
  ------------------
  |  Branch (637:9): [True: 1, False: 2.12k]
  ------------------
  638|      1|        *res = true;
  639|      1|        return IGRAPH_SUCCESS;
  640|      1|    }
  641|       |
  642|       |
  643|  2.12k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&in_degree_cumcounts, vcount+1);
  ------------------
  |  |  119|  2.12k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.12k|    do { \
  |  |  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.12k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.12k|    do { \
  |  |  |  |  604|  2.12k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.12k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.12k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.12k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.12k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  644|       |
  645|       |    /* Compute in_degree_cumcounts[d+1] to be the no. of in-degrees == d */
  646|   361k|    for (igraph_int_t v = 0; v < vcount; v++) {
  ------------------
  |  Branch (646:30): [True: 359k, False: 1.89k]
  ------------------
  647|   359k|        igraph_int_t indeg = VECTOR(*in_degrees)[v];
  ------------------
  |  |   60|   359k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  648|   359k|        igraph_int_t outdeg = VECTOR(*out_degrees)[v];
  ------------------
  |  |   60|   359k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  649|   359k|        if (indeg >= vcount || outdeg >= vcount) {
  ------------------
  |  Branch (649:13): [True: 176, False: 359k]
  |  Branch (649:32): [True: 49, False: 359k]
  ------------------
  650|    225|            *res = false;
  651|    225|            igraph_vector_int_destroy(&in_degree_cumcounts);
  652|    225|            IGRAPH_FINALLY_CLEAN(1);
  653|    225|            return IGRAPH_SUCCESS;
  654|    225|        }
  655|   359k|        VECTOR(in_degree_cumcounts)[indeg + 1]++;
  ------------------
  |  |   60|   359k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  656|   359k|    }
  657|       |
  658|       |    /* Compute in_degree_cumcounts[d] to be the no. of in-degrees < d */
  659|   360k|    for (igraph_int_t indeg = 0; indeg < vcount; indeg++) {
  ------------------
  |  Branch (659:34): [True: 358k, False: 1.89k]
  ------------------
  660|   358k|        VECTOR(in_degree_cumcounts)[indeg+1] += VECTOR(in_degree_cumcounts)[indeg];
  ------------------
  |  |   60|   358k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      VECTOR(in_degree_cumcounts)[indeg+1] += VECTOR(in_degree_cumcounts)[indeg];
  ------------------
  |  |   60|   358k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  661|   358k|    }
  662|       |
  663|  1.89k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&sorted_out_degrees, vcount);
  ------------------
  |  |  119|  1.89k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  1.89k|    do { \
  |  |  |  |  657|  1.89k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.89k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.89k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.89k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.89k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.89k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  1.89k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  1.89k|    do { \
  |  |  |  |  604|  1.89k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.89k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.89k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.89k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.89k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.89k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.89k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.89k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 1.89k]
  |  |  ------------------
  ------------------
  664|  1.89k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&sorted_in_degrees, vcount);
  ------------------
  |  |  119|  1.89k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  1.89k|    do { \
  |  |  |  |  657|  1.89k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.89k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.89k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.89k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.89k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.89k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  1.89k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  1.89k|    do { \
  |  |  |  |  604|  1.89k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.89k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.89k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.89k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.89k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.89k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.89k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.89k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 1.89k]
  |  |  ------------------
  ------------------
  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|  1.89k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&in_degree_counts, vcount);
  ------------------
  |  |  119|  1.89k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  1.89k|    do { \
  |  |  |  |  657|  1.89k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.89k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.89k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.89k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.89k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.89k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  1.89k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  1.89k|    do { \
  |  |  |  |  604|  1.89k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.89k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.89k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.89k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.89k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.89k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.89k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.89k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 1.89k]
  |  |  ------------------
  ------------------
  669|       |
  670|   360k|    for (igraph_int_t v = 0; v < vcount; v++) {
  ------------------
  |  Branch (670:30): [True: 358k, False: 1.89k]
  ------------------
  671|   358k|        igraph_int_t outdeg = VECTOR(*out_degrees)[v];
  ------------------
  |  |   60|   358k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  672|   358k|        igraph_int_t indeg  = VECTOR(*in_degrees)[v];
  ------------------
  |  |   60|   358k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  673|   358k|        igraph_int_t idx = VECTOR(in_degree_cumcounts)[indeg] + VECTOR(in_degree_counts)[indeg];
  ------------------
  |  |   60|   358k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      igraph_int_t idx = VECTOR(in_degree_cumcounts)[indeg] + VECTOR(in_degree_counts)[indeg];
  ------------------
  |  |   60|   358k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  674|   358k|        VECTOR(sorted_out_degrees)[vcount - idx - 1] = outdeg;
  ------------------
  |  |   60|   358k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  675|   358k|        VECTOR(sorted_in_degrees)[vcount - idx - 1] = indeg;
  ------------------
  |  |   60|   358k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  676|   358k|        VECTOR(in_degree_counts)[indeg]++;
  ------------------
  |  |   60|   358k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  677|   358k|    }
  678|       |
  679|  1.89k|    igraph_vector_int_destroy(&in_degree_counts);
  680|  1.89k|    igraph_vector_int_destroy(&in_degree_cumcounts);
  681|  1.89k|    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|  1.89k|#define INDEGREE(x) (VECTOR(sorted_in_degrees)[x])
  693|  1.89k|#define OUTDEGREE(x) (VECTOR(sorted_out_degrees)[x])
  694|       |
  695|  1.89k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&left_pq, vcount);
  ------------------
  |  |  119|  1.89k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  1.89k|    do { \
  |  |  |  |  657|  1.89k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.89k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.89k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.89k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.89k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.89k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  1.89k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  1.89k|    do { \
  |  |  |  |  604|  1.89k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.89k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.89k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.89k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.89k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.89k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.89k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.89k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 1.89k]
  |  |  ------------------
  ------------------
  696|  1.89k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&right_pq, vcount);
  ------------------
  |  |  119|  1.89k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  1.89k|    do { \
  |  |  |  |  657|  1.89k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.89k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.89k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.89k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.89k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.89k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  1.89k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  1.89k|    do { \
  |  |  |  |  604|  1.89k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.89k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.89k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.89k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.89k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.89k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.89k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.89k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 1.89k]
  |  |  ------------------
  ------------------
  697|       |
  698|  1.89k|    left_pq_size = 0;
  699|  1.89k|    right_pq_size = vcount;
  700|  1.89k|    left_i = 0;
  701|  1.89k|    right_i = 0;
  702|  1.89k|    left_sum = 0;
  703|  1.89k|    right_sum = 0;
  704|   360k|    for (igraph_int_t i = 0; i < vcount; i++) {
  ------------------
  |  Branch (704:30): [True: 358k, False: 1.89k]
  ------------------
  705|   358k|        VECTOR(right_pq)[OUTDEGREE(i)]++;
  ------------------
  |  |   60|   358k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      VECTOR(right_pq)[OUTDEGREE(i)]++;
  ------------------
  |  |  693|   358k|#define OUTDEGREE(x) (VECTOR(sorted_out_degrees)[x])
  |  |  ------------------
  |  |  |  |   60|   358k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  706|   358k|    }
  707|       |
  708|  1.89k|    *res = true;
  709|  1.89k|    lhs = 0;
  710|  1.89k|    rhs = 0;
  711|   294k|    for (igraph_int_t i = 0; i < vcount; i++) {
  ------------------
  |  Branch (711:30): [True: 292k, False: 1.50k]
  ------------------
  712|   292k|        lhs += INDEGREE(i);
  ------------------
  |  |  692|   292k|#define INDEGREE(x) (VECTOR(sorted_in_degrees)[x])
  |  |  ------------------
  |  |  |  |   60|   292k|#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|   292k|        if (OUTDEGREE(i) < i) {
  ------------------
  |  |  693|   292k|#define OUTDEGREE(x) (VECTOR(sorted_out_degrees)[x])
  |  |  ------------------
  |  |  |  |   60|   292k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (719:13): [True: 289k, False: 3.27k]
  ------------------
  720|   289k|            left_sum += OUTDEGREE(i);
  ------------------
  |  |  693|   289k|#define OUTDEGREE(x) (VECTOR(sorted_out_degrees)[x])
  |  |  ------------------
  |  |  |  |   60|   289k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  721|   289k|        }
  722|  3.27k|        else {
  723|  3.27k|            VECTOR(left_pq)[OUTDEGREE(i)]++;
  ------------------
  |  |   60|  3.27k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(left_pq)[OUTDEGREE(i)]++;
  ------------------
  |  |  693|  3.27k|#define OUTDEGREE(x) (VECTOR(sorted_out_degrees)[x])
  |  |  ------------------
  |  |  |  |   60|  3.27k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  724|  3.27k|            left_pq_size++;
  725|  3.27k|        }
  726|   583k|        while (left_i < i) {
  ------------------
  |  Branch (726:16): [True: 290k, False: 292k]
  ------------------
  727|   293k|            while (VECTOR(left_pq)[left_i] > 0) {
  ------------------
  |  |   60|   293k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (727:20): [True: 2.85k, False: 290k]
  ------------------
  728|  2.85k|                VECTOR(left_pq)[left_i]--;
  ------------------
  |  |   60|  2.85k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  729|  2.85k|                left_pq_size--;
  730|  2.85k|                left_sum += left_i;
  731|  2.85k|            }
  732|   290k|            left_i++;
  733|   290k|        }
  734|       |
  735|   585k|        while (right_i < i + 1) {
  ------------------
  |  Branch (735:16): [True: 292k, False: 292k]
  ------------------
  736|   647k|            while (VECTOR(right_pq)[right_i] > 0) {
  ------------------
  |  |   60|   647k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (736:20): [True: 355k, False: 292k]
  ------------------
  737|   355k|                VECTOR(right_pq)[right_i]--;
  ------------------
  |  |   60|   355k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  738|   355k|                right_pq_size--;
  739|   355k|                right_sum += right_i;
  740|   355k|            }
  741|   292k|            right_i++;
  742|   292k|        }
  743|   292k|        if (OUTDEGREE(i) < i + 1) {
  ------------------
  |  |  693|   292k|#define OUTDEGREE(x) (VECTOR(sorted_out_degrees)[x])
  |  |  ------------------
  |  |  |  |   60|   292k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (743:13): [True: 290k, False: 1.62k]
  ------------------
  744|   290k|            right_sum -= OUTDEGREE(i);
  ------------------
  |  |  693|   290k|#define OUTDEGREE(x) (VECTOR(sorted_out_degrees)[x])
  |  |  ------------------
  |  |  |  |   60|   290k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  745|   290k|        }
  746|  1.62k|        else {
  747|  1.62k|            VECTOR(right_pq)[OUTDEGREE(i)]--;
  ------------------
  |  |   60|  1.62k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(right_pq)[OUTDEGREE(i)]--;
  ------------------
  |  |  693|  1.62k|#define OUTDEGREE(x) (VECTOR(sorted_out_degrees)[x])
  |  |  ------------------
  |  |  |  |   60|  1.62k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  748|  1.62k|            right_pq_size--;
  749|  1.62k|        }
  750|       |
  751|   292k|        rhs = left_sum + i * left_pq_size + right_sum + (i + 1) * right_pq_size;
  752|   292k|        if (lhs > rhs) {
  ------------------
  |  Branch (752:13): [True: 391, False: 292k]
  ------------------
  753|    391|            *res = false;
  754|    391|            break;
  755|    391|        }
  756|   292k|    }
  757|       |
  758|  1.89k|#undef INDEGREE
  759|  1.89k|#undef OUTDEGREE
  760|       |
  761|  1.89k|    igraph_vector_int_destroy(&sorted_in_degrees);
  762|  1.89k|    igraph_vector_int_destroy(&sorted_out_degrees);
  763|  1.89k|    igraph_vector_int_destroy(&left_pq);
  764|  1.89k|    igraph_vector_int_destroy(&right_pq);
  765|  1.89k|    IGRAPH_FINALLY_CLEAN(4);
  766|       |
  767|  1.89k|    return IGRAPH_SUCCESS;
  768|  1.89k|}
graphicality.c:igraph_i_is_bigraphical_multi:
  778|  2.12k|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.12k|    igraph_int_t i;
  780|  2.12k|    igraph_int_t sum1, sum2;
  781|  2.12k|    igraph_int_t n1 = igraph_vector_int_size(degrees1), n2 = igraph_vector_int_size(degrees2);
  782|       |
  783|  2.12k|    sum1 = 0;
  784|   364k|    for (i = 0; i < n1; ++i) {
  ------------------
  |  Branch (784:17): [True: 362k, False: 2.12k]
  ------------------
  785|   362k|        igraph_int_t d = VECTOR(*degrees1)[i];
  ------------------
  |  |   60|   362k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  786|       |
  787|   362k|        if (d < 0) {
  ------------------
  |  Branch (787:13): [True: 0, False: 362k]
  ------------------
  788|      0|            *res = false;
  789|      0|            return IGRAPH_SUCCESS;
  790|      0|        }
  791|       |
  792|   362k|        sum1 += d;
  793|   362k|    }
  794|       |
  795|  2.12k|    sum2 = 0;
  796|   364k|    for (i = 0; i < n2; ++i) {
  ------------------
  |  Branch (796:17): [True: 362k, False: 2.12k]
  ------------------
  797|   362k|        igraph_int_t d = VECTOR(*degrees2)[i];
  ------------------
  |  |   60|   362k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  798|       |
  799|   362k|        if (d < 0) {
  ------------------
  |  Branch (799:13): [True: 0, False: 362k]
  ------------------
  800|      0|            *res = false;
  801|      0|            return IGRAPH_SUCCESS;
  802|      0|        }
  803|       |
  804|   362k|        sum2 += d;
  805|   362k|    }
  806|       |
  807|  2.12k|    *res = (sum1 == sum2);
  808|       |
  809|  2.12k|    return IGRAPH_SUCCESS;
  810|  2.12k|}
graphicality.c:igraph_i_is_bigraphical_simple:
  818|  2.12k|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.12k|    igraph_int_t n1 = igraph_vector_int_size(degrees1), n2 = igraph_vector_int_size(degrees2);
  820|  2.12k|    igraph_vector_int_t deg_freq1, deg_freq2;
  821|  2.12k|    igraph_int_t lhs_sum, partial_rhs_sum, partial_rhs_count;
  822|  2.12k|    igraph_int_t a, b, k;
  823|       |
  824|  2.12k|    if (n1 == 0 && n2 == 0) {
  ------------------
  |  Branch (824:9): [True: 1, False: 2.12k]
  |  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.12k|    IGRAPH_CHECK(igraph_i_is_bigraphical_multi(degrees1, degrees2, res));
  ------------------
  |  |  656|  2.12k|    do { \
  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  831|  2.12k|    if (! *res) {
  ------------------
  |  Branch (831:9): [True: 0, False: 2.12k]
  ------------------
  832|      0|        return IGRAPH_SUCCESS;
  833|      0|    }
  834|       |
  835|       |    /* Ensure that degrees1 is the shorter vector as a minor optimization: */
  836|  2.12k|    if (n2 < n1) {
  ------------------
  |  Branch (836:9): [True: 0, False: 2.12k]
  ------------------
  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.12k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&deg_freq1, n2+1);
  ------------------
  |  |  119|  2.12k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.12k|    do { \
  |  |  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.12k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.12k|    do { \
  |  |  |  |  604|  2.12k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.12k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.12k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.12k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.12k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  852|  2.12k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&deg_freq2, n1+1);
  ------------------
  |  |  119|  2.12k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.12k|    do { \
  |  |  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.12k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.12k|    do { \
  |  |  |  |  604|  2.12k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.12k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.12k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.12k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.12k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  853|       |
  854|   362k|    for (igraph_int_t i = 0; i < n1; ++i) {
  ------------------
  |  Branch (854:30): [True: 360k, False: 1.94k]
  ------------------
  855|   360k|        igraph_int_t degree = VECTOR(*degrees1)[i];
  ------------------
  |  |   60|   360k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  856|   360k|        if (degree > n2) {
  ------------------
  |  Branch (856:13): [True: 176, False: 360k]
  ------------------
  857|    176|            *res = false;
  858|    176|            goto bigraphical_simple_done;
  859|    176|        }
  860|   360k|        ++VECTOR(deg_freq1)[degree];
  ------------------
  |  |   60|   360k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  861|   360k|    }
  862|   362k|    for (igraph_int_t i = 0; i < n2; ++i) {
  ------------------
  |  Branch (862:30): [True: 360k, False: 1.93k]
  ------------------
  863|   360k|        igraph_int_t degree = VECTOR(*degrees2)[i];
  ------------------
  |  |   60|   360k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  864|   360k|        if (degree > n1) {
  ------------------
  |  Branch (864:13): [True: 13, False: 360k]
  ------------------
  865|     13|            *res = false;
  866|     13|            goto bigraphical_simple_done;
  867|     13|        }
  868|   360k|        ++VECTOR(deg_freq2)[degree];
  ------------------
  |  |   60|   360k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  869|   360k|    }
  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|  1.93k|    *res = true; /* be optimistic */
  897|  1.93k|    lhs_sum = 0;
  898|  1.93k|    partial_rhs_sum = 0; /* the sum of those elements in the rhs which are <= (k+1) */
  899|  1.93k|    partial_rhs_count = 0; /* number of elements in the rhs which are <= (k+1) */
  900|  1.93k|    b = 0; /* index in deg_freq2 */
  901|  1.93k|    k = -1;
  902|   354k|    for (a = n2; a >= 0; --a) {
  ------------------
  |  Branch (902:18): [True: 352k, False: 1.66k]
  ------------------
  903|   352k|        igraph_int_t acount = VECTOR(deg_freq1)[a];
  ------------------
  |  |   60|   352k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  904|   352k|        lhs_sum += a * acount;
  905|   352k|        k += acount;
  906|       |
  907|   667k|        while (b <= k + 1) {
  ------------------
  |  Branch (907:16): [True: 314k, False: 352k]
  ------------------
  908|   314k|            igraph_int_t bcount = VECTOR(deg_freq2)[b];
  ------------------
  |  |   60|   314k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  909|   314k|            partial_rhs_sum += b * bcount;
  910|   314k|            partial_rhs_count += bcount;
  911|       |
  912|   314k|            ++b;
  913|   314k|        }
  914|       |
  915|       |        /* rhs_sum for a given k is partial_rhs_sum + (n2 - partial_rhs_count) * (k+1) */
  916|   352k|        if (lhs_sum > partial_rhs_sum + (n2 - partial_rhs_count) * (k+1) ) {
  ------------------
  |  Branch (916:13): [True: 266, False: 352k]
  ------------------
  917|    266|            *res = false;
  918|    266|            break;
  919|    266|        }
  920|   352k|    }
  921|       |
  922|  2.12k|bigraphical_simple_done:
  923|  2.12k|    igraph_vector_int_destroy(&deg_freq1);
  924|  2.12k|    igraph_vector_int_destroy(&deg_freq2);
  925|  2.12k|    IGRAPH_FINALLY_CLEAN(2);
  926|       |
  927|  2.12k|    return IGRAPH_SUCCESS;
  928|  1.93k|}

igraph_assortativity:
  277|  2.12k|        igraph_bool_t directed, igraph_bool_t normalized) {
  278|       |
  279|  2.12k|    const igraph_int_t no_of_nodes = igraph_vcount(graph);
  280|  2.12k|    const igraph_int_t no_of_edges = igraph_ecount(graph);
  281|  2.12k|    igraph_real_t total_weight;
  282|       |
  283|  2.12k|    directed = directed && igraph_is_directed(graph);
  ------------------
  |  Branch (283:16): [True: 2.12k, False: 0]
  |  Branch (283:28): [True: 2.12k, False: 0]
  ------------------
  284|       |
  285|  2.12k|    if (weights && igraph_vector_size(weights) != no_of_edges) {
  ------------------
  |  Branch (285:9): [True: 0, False: 2.12k]
  |  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.12k|    if (!directed && values_in) {
  ------------------
  |  Branch (291:9): [True: 0, False: 2.12k]
  |  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.12k|    if (igraph_vector_size(values) != no_of_nodes) {
  ------------------
  |  Branch (296:9): [True: 0, False: 2.12k]
  ------------------
  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.12k|    if (values_in && igraph_vector_size(values_in) != no_of_nodes) {
  ------------------
  |  Branch (300:9): [True: 2.12k, False: 0]
  |  Branch (300:22): [True: 0, False: 2.12k]
  ------------------
  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.12k|    total_weight = weights ? igraph_vector_sum(weights) : no_of_edges;
  ------------------
  |  Branch (304:20): [True: 0, False: 2.12k]
  ------------------
  305|       |
  306|  2.12k|    if (!directed) {
  ------------------
  |  Branch (306:9): [True: 0, False: 2.12k]
  ------------------
  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.12k|    } else {
  352|  2.12k|        igraph_real_t num1 = 0.0, num2 = 0.0, num3 = 0.0,
  353|  2.12k|                      den1 = 0.0, den2 = 0.0;
  354|  2.12k|        igraph_real_t num, den;
  355|       |
  356|  2.12k|        if (!values_in) {
  ------------------
  |  Branch (356:13): [True: 0, False: 2.12k]
  ------------------
  357|      0|            values_in = values;
  358|      0|        }
  359|       |
  360|  2.12k|        if (weights) {
  ------------------
  |  Branch (360:13): [True: 0, False: 2.12k]
  ------------------
  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.12k|        } else {
  377|  80.5k|            for (igraph_int_t e = 0; e < no_of_edges; e++) {
  ------------------
  |  Branch (377:38): [True: 78.4k, False: 2.12k]
  ------------------
  378|  78.4k|                igraph_int_t from = IGRAPH_FROM(graph, e);
  ------------------
  |  |  115|  78.4k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  78.4k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  379|  78.4k|                igraph_int_t to = IGRAPH_TO(graph, e);
  ------------------
  |  |  128|  78.4k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  78.4k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  380|  78.4k|                igraph_real_t from_value = VECTOR(*values)[from];
  ------------------
  |  |   60|  78.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  381|  78.4k|                igraph_real_t to_value = VECTOR(*values_in)[to];
  ------------------
  |  |   60|  78.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  382|       |
  383|  78.4k|                num1 += from_value * to_value;
  384|  78.4k|                num2 += from_value;
  385|  78.4k|                num3 += to_value;
  386|  78.4k|                if (normalized) {
  ------------------
  |  Branch (386:21): [True: 78.4k, False: 0]
  ------------------
  387|  78.4k|                    den1 += from_value * from_value;
  388|  78.4k|                    den2 += to_value * to_value;
  389|  78.4k|                }
  390|  78.4k|            }
  391|  2.12k|        }
  392|       |
  393|  2.12k|        num = num1 - num2 * num3 / total_weight;
  394|  2.12k|        if (normalized) {
  ------------------
  |  Branch (394:13): [True: 2.12k, False: 0]
  ------------------
  395|  2.12k|            den = sqrt(den1 - num2 * num2 / total_weight) *
  396|  2.12k|                    sqrt(den2 - num3 * num3 / total_weight);
  397|       |
  398|  2.12k|            *res = num / den;
  399|  2.12k|        } else {
  400|      0|            *res = num / total_weight;
  401|      0|        }
  402|  2.12k|    }
  403|       |
  404|  2.12k|    return IGRAPH_SUCCESS;
  405|  2.12k|}
igraph_assortativity_degree:
  445|  2.12k|                                igraph_bool_t directed) {
  446|       |
  447|  2.12k|    directed = directed && igraph_is_directed(graph);
  ------------------
  |  Branch (447:16): [True: 2.12k, False: 0]
  |  Branch (447:28): [True: 2.12k, False: 0]
  ------------------
  448|  2.12k|    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.12k|    if (directed) {
  ------------------
  |  Branch (452:9): [True: 2.12k, False: 0]
  ------------------
  453|  2.12k|        igraph_vector_t indegree, outdegree;
  454|  2.12k|        IGRAPH_VECTOR_INIT_FINALLY(&indegree, no_of_nodes);
  ------------------
  |  |  104|  2.12k|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.12k|    do { \
  |  |  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  2.12k|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.12k|    do { \
  |  |  |  |  604|  2.12k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.12k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.12k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.12k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.12k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (105:60): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  455|  2.12k|        IGRAPH_VECTOR_INIT_FINALLY(&outdegree, no_of_nodes);
  ------------------
  |  |  104|  2.12k|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.12k|    do { \
  |  |  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  2.12k|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.12k|    do { \
  |  |  |  |  604|  2.12k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.12k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.12k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.12k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.12k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (105:60): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  456|  2.12k|        IGRAPH_CHECK(igraph_strength(graph, &indegree, igraph_vss_all(), IGRAPH_IN, IGRAPH_LOOPS, NULL));
  ------------------
  |  |  656|  2.12k|    do { \
  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  457|  2.12k|        IGRAPH_CHECK(igraph_strength(graph, &outdegree, igraph_vss_all(), IGRAPH_OUT, IGRAPH_LOOPS, NULL));
  ------------------
  |  |  656|  2.12k|    do { \
  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  458|  2.12k|        IGRAPH_CHECK(igraph_assortativity(graph, NULL, &outdegree, &indegree, res, /* directed */ true, /* normalized */ true));
  ------------------
  |  |  656|  2.12k|    do { \
  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  459|  2.12k|        igraph_vector_destroy(&indegree);
  460|  2.12k|        igraph_vector_destroy(&outdegree);
  461|  2.12k|        IGRAPH_FINALLY_CLEAN(2);
  462|  2.12k|    } 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.12k|    return IGRAPH_SUCCESS;
  472|  2.12k|}

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

igraph_reverse_edges:
   54|  2.12k|igraph_error_t igraph_reverse_edges(igraph_t *graph, const igraph_es_t eids) {
   55|  2.12k|    igraph_int_t no_of_edges = igraph_ecount(graph);
   56|  2.12k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
   57|  2.12k|    igraph_vector_int_t edges;
   58|  2.12k|    igraph_eit_t eit;
   59|  2.12k|    igraph_t new_graph;
   60|       |
   61|       |    /* Nothing to do on undirected graph. */
   62|  2.12k|    if (! igraph_is_directed(graph)) {
  ------------------
  |  Branch (62:9): [True: 0, False: 2.12k]
  ------------------
   63|      0|        return IGRAPH_SUCCESS;
   64|      0|    }
   65|       |
   66|       |    /* Use fast method when all edges are to be reversed. */
   67|  2.12k|    if (igraph_es_is_all(&eids)) {
  ------------------
  |  Branch (67:9): [True: 2.12k, False: 0]
  ------------------
   68|  2.12k|        return igraph_i_reverse(graph);
   69|  2.12k|    }
   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.10k|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.10k|    const igraph_int_t no_of_edges = igraph_ecount(graph);
   45|  2.10k|    char message[256];
   46|  2.10k|    igraph_int_t a, b, c, d, dummy, num_swaps, num_successful_swaps;
   47|  2.10k|    igraph_vector_int_t eids;
   48|  2.10k|    igraph_vector_int_t edgevec, alledges;
   49|  2.10k|    const igraph_bool_t directed = igraph_is_directed(graph);
   50|  2.10k|    igraph_bool_t ok;
   51|  2.10k|    igraph_es_t es;
   52|  2.10k|    igraph_adjlist_t al;
   53|       |
   54|  2.10k|    if (no_of_edges < 2) {
  ------------------
  |  Branch (54:9): [True: 879, False: 1.22k]
  ------------------
   55|       |        /* There are no possible rewirings, return with the same graph. */
   56|    879|        return IGRAPH_SUCCESS;
   57|    879|    }
   58|       |
   59|  1.22k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&eids, 2);
  ------------------
  |  |  119|  1.22k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  1.22k|    do { \
  |  |  |  |  657|  1.22k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.22k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.22k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.22k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, 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.22k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.22k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  1.22k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  1.22k|    do { \
  |  |  |  |  604|  1.22k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.22k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.22k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.22k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.22k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.22k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.22k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.22k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 1.22k]
  |  |  ------------------
  ------------------
   60|       |
   61|  1.22k|    if (use_adjlist) {
  ------------------
  |  Branch (61:9): [True: 753, False: 468]
  ------------------
   62|       |        /* As well as the sorted adjacency list, we maintain an unordered
   63|       |         * list of edges for picking a random edge in constant time.
   64|       |         */
   65|    753|        IGRAPH_CHECK(igraph_adjlist_init(graph, &al, IGRAPH_OUT, IGRAPH_LOOPS_ONCE, IGRAPH_MULTIPLE));
  ------------------
  |  |  656|    753|    do { \
  |  |  657|    753|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    753|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    753|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 753]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    753|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 753]
  |  |  ------------------
  ------------------
   66|    753|        IGRAPH_FINALLY(igraph_adjlist_destroy, &al);
  ------------------
  |  |  603|    753|    do { \
  |  |  604|    753|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    753|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    753|         * incorrect destructor function with the pointer */ \
  |  |  607|    753|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 753]
  |  |  ------------------
  |  |  608|    753|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    753|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 753]
  |  |  ------------------
  ------------------
   67|    753|        IGRAPH_VECTOR_INT_INIT_FINALLY(&alledges, no_of_edges * 2);
  ------------------
  |  |  119|    753|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    753|    do { \
  |  |  |  |  657|    753|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    753|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    753|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 753]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    753|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 753]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|    753|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    753|    do { \
  |  |  |  |  604|    753|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    753|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    753|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    753|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 753]
  |  |  |  |  ------------------
  |  |  |  |  608|    753|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    753|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 753]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 753]
  |  |  ------------------
  ------------------
   68|    753|        IGRAPH_CHECK(igraph_get_edgelist(graph, &alledges, /*bycol=*/ false));
  ------------------
  |  |  656|    753|    do { \
  |  |  657|    753|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    753|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    753|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 753]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    753|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 753]
  |  |  ------------------
  ------------------
   69|    753|    } else {
   70|    468|        IGRAPH_VECTOR_INT_INIT_FINALLY(&edgevec, 4);
  ------------------
  |  |  119|    468|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    468|    do { \
  |  |  |  |  657|    468|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    468|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    468|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 468]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    468|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 468]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|    468|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    468|    do { \
  |  |  |  |  604|    468|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    468|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    468|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    468|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 468]
  |  |  |  |  ------------------
  |  |  |  |  608|    468|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    468|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 468]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 468]
  |  |  ------------------
  ------------------
   71|    468|        es = igraph_ess_vector(&eids);
   72|    468|    }
   73|       |
   74|       |    /* We count both successful and unsuccessful rewiring trials.
   75|       |     * This is necessary for uniform sampling. */
   76|       |
   77|  1.22k|    num_swaps = num_successful_swaps = 0;
   78|  51.2k|    while (num_swaps < n) {
  ------------------
  |  Branch (78:12): [True: 50.0k, False: 1.22k]
  ------------------
   79|       |
   80|  50.0k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|  50.0k|    do { \
  |  |   47|  50.0k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 50.0k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|  50.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 50.0k]
  |  |  ------------------
  ------------------
   81|       |
   82|  50.0k|        if (num_swaps % 1000 == 0) {
  ------------------
  |  Branch (82:13): [True: 1.22k, False: 48.8k]
  ------------------
   83|  1.22k|            snprintf(message, sizeof(message),
   84|  1.22k|                     "Random rewiring (%.2f%% of the trials were successful)",
   85|  1.22k|                     num_swaps > 0 ? ((100.0 * num_successful_swaps) / num_swaps) : 0.0);
  ------------------
  |  Branch (85:22): [True: 0, False: 1.22k]
  ------------------
   86|  1.22k|            IGRAPH_PROGRESS(message, (100.0 * num_swaps) / n, 0);
  ------------------
  |  |  169|  1.22k|    do { \
  |  |  170|  1.22k|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  656|  1.22k|    do { \
  |  |  |  |  657|  1.22k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.22k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.22k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.22k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, 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.22k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.22k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  171|  1.22k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (171:14): [Folded, False: 1.22k]
  |  |  ------------------
  ------------------
   87|  1.22k|        }
   88|       |
   89|  50.0k|        ok = true;
   90|       |
   91|       |        /* Choose two edges randomly */
   92|  50.0k|        VECTOR(eids)[0] = RNG_INTEGER(0, no_of_edges - 1);
  ------------------
  |  |   60|  50.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      VECTOR(eids)[0] = RNG_INTEGER(0, no_of_edges - 1);
  ------------------
  |  |  152|  50.0k|#define RNG_INTEGER(l,h) (igraph_rng_get_integer(igraph_rng_default(),(l),(h)))
  ------------------
   93|  51.8k|        do {
   94|  51.8k|            VECTOR(eids)[1] = RNG_INTEGER(0, no_of_edges - 1);
  ------------------
  |  |   60|  51.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(eids)[1] = RNG_INTEGER(0, no_of_edges - 1);
  ------------------
  |  |  152|  51.8k|#define RNG_INTEGER(l,h) (igraph_rng_get_integer(igraph_rng_default(),(l),(h)))
  ------------------
   95|  51.8k|        } while (VECTOR(eids)[0] == VECTOR(eids)[1]);
  ------------------
  |  |   60|  51.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      } while (VECTOR(eids)[0] == VECTOR(eids)[1]);
  ------------------
  |  |   60|  51.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (95:18): [True: 1.77k, False: 50.0k]
  ------------------
   96|       |
   97|       |        /* Get the endpoints */
   98|  50.0k|        if (use_adjlist) {
  ------------------
  |  Branch (98:13): [True: 47.5k, False: 2.52k]
  ------------------
   99|  47.5k|            a = VECTOR(alledges)[VECTOR(eids)[0] * 2];
  ------------------
  |  |   60|  47.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          a = VECTOR(alledges)[VECTOR(eids)[0] * 2];
  ------------------
  |  |   60|  47.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  100|  47.5k|            b = VECTOR(alledges)[VECTOR(eids)[0] * 2 + 1];
  ------------------
  |  |   60|  47.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          b = VECTOR(alledges)[VECTOR(eids)[0] * 2 + 1];
  ------------------
  |  |   60|  47.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  101|  47.5k|            c = VECTOR(alledges)[VECTOR(eids)[1] * 2];
  ------------------
  |  |   60|  47.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          c = VECTOR(alledges)[VECTOR(eids)[1] * 2];
  ------------------
  |  |   60|  47.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  102|  47.5k|            d = VECTOR(alledges)[VECTOR(eids)[1] * 2 + 1];
  ------------------
  |  |   60|  47.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          d = VECTOR(alledges)[VECTOR(eids)[1] * 2 + 1];
  ------------------
  |  |   60|  47.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  103|  47.5k|        } else {
  104|  2.52k|            IGRAPH_CHECK(igraph_edge(graph, VECTOR(eids)[0], &a, &b));
  ------------------
  |  |  656|  2.52k|    do { \
  |  |  657|  2.52k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.52k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.52k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.52k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.52k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.52k]
  |  |  ------------------
  ------------------
  105|  2.52k|            IGRAPH_CHECK(igraph_edge(graph, VECTOR(eids)[1], &c, &d));
  ------------------
  |  |  656|  2.52k|    do { \
  |  |  657|  2.52k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.52k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.52k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.52k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.52k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.52k]
  |  |  ------------------
  ------------------
  106|  2.52k|        }
  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|  50.0k|        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: 50.0k]
  ------------------
  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|  50.0k|        if (!loops && (a == b || c == d)) {
  ------------------
  |  Branch (123:13): [True: 50.0k, False: 0]
  |  Branch (123:24): [True: 0, False: 50.0k]
  |  Branch (123:34): [True: 0, False: 50.0k]
  ------------------
  124|      0|            ok = false;
  125|  50.0k|        } else {
  126|       |            /* Check whether they are suitable for rewiring */
  127|  50.0k|            if (a == c || b == d) {
  ------------------
  |  Branch (127:17): [True: 6.80k, False: 43.2k]
  |  Branch (127:27): [True: 5.45k, False: 37.8k]
  ------------------
  128|       |                /* Swapping would have no effect */
  129|  12.2k|                ok = false;
  130|  37.8k|            } 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|  37.8k|                ok = loops || (a != d && b != c);
  ------------------
  |  Branch (134:22): [True: 0, False: 37.8k]
  |  Branch (134:32): [True: 35.8k, False: 1.93k]
  |  Branch (134:42): [True: 33.9k, False: 1.88k]
  ------------------
  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|  37.8k|                ok = ok && (directed || a != b || c != d);
  ------------------
  |  Branch (137:22): [True: 33.9k, False: 3.82k]
  |  Branch (137:29): [True: 33.9k, False: 0]
  |  Branch (137:41): [True: 0, False: 0]
  |  Branch (137:51): [True: 0, False: 0]
  ------------------
  138|  37.8k|            }
  139|  50.0k|        }
  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|  50.0k|        if (ok) {
  ------------------
  |  Branch (143:13): [True: 33.9k, False: 16.0k]
  ------------------
  144|  33.9k|            if (use_adjlist) {
  ------------------
  |  Branch (144:17): [True: 32.4k, False: 1.56k]
  ------------------
  145|  32.4k|                if (igraph_adjlist_has_edge(&al, a, d, directed)) {
  ------------------
  |  Branch (145:21): [True: 782, False: 31.6k]
  ------------------
  146|    782|                    ok = false;
  147|    782|                }
  148|  32.4k|            } else {
  149|  1.56k|                IGRAPH_CHECK(igraph_are_adjacent(graph, a, d, &ok));
  ------------------
  |  |  656|  1.56k|    do { \
  |  |  657|  1.56k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.56k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.56k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.56k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.56k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.56k]
  |  |  ------------------
  ------------------
  150|  1.56k|                ok = !ok;
  151|  1.56k|            }
  152|  33.9k|        }
  153|  50.0k|        if (ok) {
  ------------------
  |  Branch (153:13): [True: 33.1k, False: 16.8k]
  ------------------
  154|  33.1k|            if (use_adjlist) {
  ------------------
  |  Branch (154:17): [True: 31.6k, False: 1.52k]
  ------------------
  155|  31.6k|                if (igraph_adjlist_has_edge(&al, c, b, directed)) {
  ------------------
  |  Branch (155:21): [True: 764, False: 30.8k]
  ------------------
  156|    764|                    ok = false;
  157|    764|                }
  158|  31.6k|            } else {
  159|  1.52k|                IGRAPH_CHECK(igraph_are_adjacent(graph, c, b, &ok));
  ------------------
  |  |  656|  1.52k|    do { \
  |  |  657|  1.52k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.52k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.52k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.52k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.52k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.52k]
  |  |  ------------------
  ------------------
  160|  1.52k|                ok = !ok;
  161|  1.52k|            }
  162|  33.1k|        }
  163|       |
  164|       |        /* If we are still okay, we can perform the rewiring */
  165|  50.0k|        if (ok) {
  ------------------
  |  Branch (165:13): [True: 32.3k, False: 17.7k]
  ------------------
  166|       |            /* printf("Deleting: %" IGRAPH_PRId " -> %" IGRAPH_PRId ", %" IGRAPH_PRId " -> %" IGRAPH_PRId "\n",
  167|       |                          a, b, c, d); */
  168|  32.3k|            if (use_adjlist) {
  ------------------
  |  Branch (168:17): [True: 30.8k, False: 1.47k]
  ------------------
  169|       |                /* Replace entry in sorted adjlist: */
  170|  30.8k|                IGRAPH_CHECK(igraph_adjlist_replace_edge(&al, a, b, d, directed));
  ------------------
  |  |  656|  30.8k|    do { \
  |  |  657|  30.8k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  30.8k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  30.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 30.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  30.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 30.8k]
  |  |  ------------------
  ------------------
  171|  30.8k|                IGRAPH_CHECK(igraph_adjlist_replace_edge(&al, c, d, b, directed));
  ------------------
  |  |  656|  30.8k|    do { \
  |  |  657|  30.8k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  30.8k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  30.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 30.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  30.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 30.8k]
  |  |  ------------------
  ------------------
  172|       |                /* Also replace in unsorted edgelist: */
  173|  30.8k|                VECTOR(alledges)[VECTOR(eids)[0] * 2 + 1] = d;
  ------------------
  |  |   60|  30.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(alledges)[VECTOR(eids)[0] * 2 + 1] = d;
  ------------------
  |  |   60|  30.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  174|  30.8k|                VECTOR(alledges)[VECTOR(eids)[1] * 2 + 1] = b;
  ------------------
  |  |   60|  30.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(alledges)[VECTOR(eids)[1] * 2 + 1] = b;
  ------------------
  |  |   60|  30.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  175|  30.8k|            } else {
  176|  1.47k|                IGRAPH_CHECK(igraph_delete_edges(graph, es));
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  177|  1.47k|                VECTOR(edgevec)[0] = a; VECTOR(edgevec)[1] = d;
  ------------------
  |  |   60|  1.47k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(edgevec)[0] = a; VECTOR(edgevec)[1] = d;
  ------------------
  |  |   60|  1.47k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  178|  1.47k|                VECTOR(edgevec)[2] = c; VECTOR(edgevec)[3] = b;
  ------------------
  |  |   60|  1.47k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(edgevec)[2] = c; VECTOR(edgevec)[3] = b;
  ------------------
  |  |   60|  1.47k|#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.47k|                IGRAPH_CHECK(igraph_add_edges(graph, &edgevec, 0));
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  182|  1.47k|            }
  183|  32.3k|            num_successful_swaps++;
  184|  32.3k|        }
  185|       |
  186|  50.0k|        num_swaps++;
  187|  50.0k|    }
  188|       |
  189|  1.22k|    if (use_adjlist) {
  ------------------
  |  Branch (189:9): [True: 753, False: 468]
  ------------------
  190|       |        /* Replace graph edges with the adjlist current state */
  191|    753|        IGRAPH_CHECK(igraph_delete_edges(graph, igraph_ess_all(IGRAPH_EDGEORDER_ID)));
  ------------------
  |  |  656|    753|    do { \
  |  |  657|    753|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    753|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    753|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 753]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    753|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 753]
  |  |  ------------------
  ------------------
  192|    753|        IGRAPH_CHECK(igraph_add_edges(graph, &alledges, 0));
  ------------------
  |  |  656|    753|    do { \
  |  |  657|    753|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    753|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    753|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 753]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    753|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 753]
  |  |  ------------------
  ------------------
  193|    753|    }
  194|       |
  195|  1.22k|    IGRAPH_PROGRESS("Random rewiring: ", 100.0, 0);
  ------------------
  |  |  169|  1.22k|    do { \
  |  |  170|  1.22k|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  656|  1.22k|    do { \
  |  |  |  |  657|  1.22k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.22k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.22k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.22k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, 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.22k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.22k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  171|  1.22k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (171:14): [Folded, False: 1.22k]
  |  |  ------------------
  ------------------
  196|       |
  197|  1.22k|    if (use_adjlist) {
  ------------------
  |  Branch (197:9): [True: 753, False: 468]
  ------------------
  198|    753|        igraph_vector_int_destroy(&alledges);
  199|    753|        igraph_adjlist_destroy(&al);
  200|    753|    } else {
  201|    468|        igraph_vector_int_destroy(&edgevec);
  202|    468|    }
  203|       |
  204|  1.22k|    igraph_vector_int_destroy(&eids);
  205|  1.22k|    IGRAPH_FINALLY_CLEAN(use_adjlist ? 3 : 2);
  ------------------
  |  Branch (205:26): [True: 753, False: 468]
  ------------------
  206|       |
  207|  1.22k|    if (stats) {
  ------------------
  |  Branch (207:9): [True: 0, False: 1.22k]
  ------------------
  208|      0|        memset(stats, 0, sizeof(igraph_rewiring_stats_t));
  209|      0|        stats->successful_swaps = num_successful_swaps;
  210|      0|    }
  211|       |
  212|  1.22k|    return IGRAPH_SUCCESS;
  213|  1.22k|}
igraph_rewire:
  258|  2.10k|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.10k|    igraph_bool_t use_adjlist = n >= REWIRE_ADJLIST_THRESHOLD;
  ------------------
  |  |   40|  2.10k|#define REWIRE_ADJLIST_THRESHOLD 10
  ------------------
  260|       |
  261|  2.10k|    if ((allowed_edge_types & IGRAPH_I_MULTI_EDGES_SW) ||
  ------------------
  |  |   25|  2.10k|#define IGRAPH_I_MULTI_EDGES_SW 0x02 /* 010, more than one edge allowed between distinct vertices */
  ------------------
  |  Branch (261:9): [True: 0, False: 2.10k]
  ------------------
  262|  2.10k|        (allowed_edge_types & IGRAPH_I_MULTI_LOOPS_SW)) {
  ------------------
  |  |   26|  2.10k|#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.10k]
  ------------------
  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.10k|    return igraph_i_rewire(graph, n, allowed_edge_types & IGRAPH_LOOPS_SW, use_adjlist, stats);
  267|  2.10k|}

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

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

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

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

igraph_pseudo_diameter:
  790|  2.12k|) {
  791|  2.12k|    if (weights) {
  ------------------
  |  Branch (791:9): [True: 0, False: 2.12k]
  ------------------
  792|      0|        return igraph_i_pseudo_diameter_dijkstra(
  793|      0|            graph, weights, diameter, vid_start, from, to, directed, unconn
  794|      0|        );
  795|  2.12k|    } else {
  796|  2.12k|        return igraph_i_pseudo_diameter_unweighted(
  797|  2.12k|            graph, diameter, vid_start, from, to, directed, unconn
  798|  2.12k|        );
  799|  2.12k|    }
  800|  2.12k|}
distances.c:igraph_i_eccentricity_unweighted:
   41|  9.80k|) {
   42|       |
   43|  9.80k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
   44|  9.80k|    igraph_dqueue_int_t q;
   45|  9.80k|    igraph_vit_t vit;
   46|  9.80k|    igraph_vector_int_t counted;
   47|  9.80k|    igraph_int_t i, mark = 1;
   48|  9.80k|    igraph_int_t min_degree = 0;
   49|       |
   50|  9.80k|    IGRAPH_DQUEUE_INT_INIT_FINALLY(&q, 100);
  ------------------
  |  |   61|  9.80k|    do { IGRAPH_CHECK(igraph_dqueue_int_init(q, capacity)); \
  |  |  ------------------
  |  |  |  |  656|  9.80k|    do { \
  |  |  |  |  657|  9.80k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  9.80k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  9.80k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.80k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  9.80k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 9.80k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|  9.80k|        IGRAPH_FINALLY(igraph_dqueue_int_destroy, q); } while (0)
  |  |  ------------------
  |  |  |  |  603|  9.80k|    do { \
  |  |  |  |  604|  9.80k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  9.80k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  9.80k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  9.80k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 9.80k]
  |  |  |  |  ------------------
  |  |  |  |  608|  9.80k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  9.80k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 9.80k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (62:64): [Folded, False: 9.80k]
  |  |  ------------------
  ------------------
   51|       |
   52|  9.80k|    IGRAPH_CHECK(igraph_vit_create(graph, vids, &vit));
  ------------------
  |  |  656|  9.80k|    do { \
  |  |  657|  9.80k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  9.80k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  9.80k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.80k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  9.80k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 9.80k]
  |  |  ------------------
  ------------------
   53|  9.80k|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  603|  9.80k|    do { \
  |  |  604|  9.80k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  9.80k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  9.80k|         * incorrect destructor function with the pointer */ \
  |  |  607|  9.80k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 9.80k]
  |  |  ------------------
  |  |  608|  9.80k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  9.80k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 9.80k]
  |  |  ------------------
  ------------------
   54|       |
   55|  9.80k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&counted, no_of_nodes);
  ------------------
  |  |  119|  9.80k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  9.80k|    do { \
  |  |  |  |  657|  9.80k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  9.80k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  9.80k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.80k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  9.80k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 9.80k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  9.80k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  9.80k|    do { \
  |  |  |  |  604|  9.80k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  9.80k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  9.80k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  9.80k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 9.80k]
  |  |  |  |  ------------------
  |  |  |  |  608|  9.80k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  9.80k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 9.80k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 9.80k]
  |  |  ------------------
  ------------------
   56|       |
   57|  9.80k|    IGRAPH_CHECK(igraph_vector_resize(res, IGRAPH_VIT_SIZE(vit)));
  ------------------
  |  |  656|  9.80k|    do { \
  |  |  657|  9.80k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  9.80k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  9.80k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.80k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  9.80k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 9.80k]
  |  |  ------------------
  ------------------
   58|  9.80k|    igraph_vector_fill(res, -1);
   59|       |
   60|  9.80k|    for (i = 0, IGRAPH_VIT_RESET(vit);
  ------------------
  |  |  201|  9.80k|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
   61|  19.6k|         !IGRAPH_VIT_END(vit);
  ------------------
  |  |  179|  19.6k|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (61:10): [True: 9.80k, False: 9.80k]
  ------------------
   62|  9.80k|         IGRAPH_VIT_NEXT(vit), mark++, i++) {
  ------------------
  |  |  167|  9.80k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
   63|       |
   64|  9.80k|        igraph_int_t source;
   65|  9.80k|        igraph_int_t nodes_reached = 1;
   66|  9.80k|        source = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  214|  9.80k|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 9.80k, False: 0]
  |  |  ------------------
  |  |  215|  9.80k|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
   67|  9.80k|        IGRAPH_CHECK(igraph_dqueue_int_push(&q, source));
  ------------------
  |  |  656|  9.80k|    do { \
  |  |  657|  9.80k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  9.80k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  9.80k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.80k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  9.80k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 9.80k]
  |  |  ------------------
  ------------------
   68|  9.80k|        IGRAPH_CHECK(igraph_dqueue_int_push(&q, 0));
  ------------------
  |  |  656|  9.80k|    do { \
  |  |  657|  9.80k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  9.80k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  9.80k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.80k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  9.80k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 9.80k]
  |  |  ------------------
  ------------------
   69|  9.80k|        VECTOR(counted)[source] = mark;
  ------------------
  |  |   60|  9.80k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   70|       |
   71|  9.80k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|  9.80k|    do { \
  |  |   47|  9.80k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 9.80k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|  9.80k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 9.80k]
  |  |  ------------------
  ------------------
   72|       |
   73|   147k|        while (!igraph_dqueue_int_empty(&q)) {
  ------------------
  |  Branch (73:16): [True: 137k, False: 9.80k]
  ------------------
   74|   137k|            igraph_int_t act = igraph_dqueue_int_pop(&q);
   75|   137k|            igraph_int_t dist = igraph_dqueue_int_pop(&q);
   76|   137k|            igraph_vector_int_t *neis = igraph_lazy_adjlist_get(adjlist, act);
  ------------------
  |  |  158|   137k|    (igraph_lazy_adjlist_has(al,no) ? ((al)->adjs[(igraph_int_t)(no)]) \
  |  |  ------------------
  |  |  |  |  133|   137k|#define igraph_lazy_adjlist_has(al,no) ((al)->adjs[(igraph_int_t)(no)] != NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (133:40): [True: 76.8k, False: 60.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  159|   137k|                                    : (igraph_i_lazy_adjlist_get_real(al, no)))
  ------------------
   77|   137k|            igraph_int_t j, n;
   78|       |
   79|   137k|            IGRAPH_CHECK_OOM(neis, "Failed to query neighbors.");
  ------------------
  |  |  709|   137k|    do { \
  |  |  710|   137k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|   137k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 137k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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|   137k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 137k]
  |  |  ------------------
  ------------------
   80|       |
   81|   137k|            n = igraph_vector_int_size(neis);
   82|   296k|            for (j = 0; j < n; j++) {
  ------------------
  |  Branch (82:25): [True: 159k, False: 137k]
  ------------------
   83|   159k|                igraph_int_t nei = VECTOR(*neis)[j];
  ------------------
  |  |   60|   159k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   84|   159k|                if (VECTOR(counted)[nei] != mark) {
  ------------------
  |  |   60|   159k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (84:21): [True: 127k, False: 31.4k]
  ------------------
   85|   127k|                    VECTOR(counted)[nei] = mark;
  ------------------
  |  |   60|   127k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   86|   127k|                    nodes_reached++;
   87|   127k|                    IGRAPH_CHECK(igraph_dqueue_int_push(&q, nei));
  ------------------
  |  |  656|   127k|    do { \
  |  |  657|   127k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   127k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   127k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 127k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   127k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 127k]
  |  |  ------------------
  ------------------
   88|   127k|                    IGRAPH_CHECK(igraph_dqueue_int_push(&q, dist + 1));
  ------------------
  |  |  656|   127k|    do { \
  |  |  657|   127k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   127k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   127k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 127k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   127k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 127k]
  |  |  ------------------
  ------------------
   89|   127k|                }
   90|   159k|            }
   91|   137k|            if (vid_ecc) {
  ------------------
  |  Branch (91:17): [True: 137k, 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|   137k|                if (dist > VECTOR(*res)[i] || (dist == VECTOR(*res)[i] && n < min_degree)) {
  ------------------
  |  |   60|   137k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              if (dist > VECTOR(*res)[i] || (dist == VECTOR(*res)[i] && n < min_degree)) {
  ------------------
  |  |   60|  63.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (96:21): [True: 73.4k, False: 63.9k]
  |  Branch (96:48): [True: 63.9k, False: 0]
  |  Branch (96:75): [True: 4.05k, False: 59.9k]
  ------------------
   97|  77.4k|                    VECTOR(*res)[i] = dist;
  ------------------
  |  |   60|  77.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   98|  77.4k|                    *vid_ecc = act;
   99|  77.4k|                    min_degree = n;
  100|  77.4k|                }
  101|   137k|            } 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|   137k|        } /* while !igraph_dqueue_int_empty(dqueue) */
  105|       |
  106|  9.80k|        if (nodes_reached != no_of_nodes && !unconn && vid_ecc) {
  ------------------
  |  Branch (106:13): [True: 9.20k, False: 595]
  |  Branch (106:45): [True: 0, False: 9.20k]
  |  Branch (106:56): [True: 0, False: 0]
  ------------------
  107|      0|            *vid_ecc = -1;
  108|      0|            break;
  109|      0|        }
  110|  9.80k|    } /* for IGRAPH_VIT_NEXT(vit) */
  111|       |
  112|  9.80k|    igraph_vector_int_destroy(&counted);
  113|  9.80k|    igraph_vit_destroy(&vit);
  114|  9.80k|    igraph_dqueue_int_destroy(&q);
  115|  9.80k|    IGRAPH_FINALLY_CLEAN(3);
  116|       |
  117|  9.80k|    return IGRAPH_SUCCESS;
  118|  9.80k|}
distances.c:igraph_i_pseudo_diameter_unweighted:
  369|  2.12k|) {
  370|       |
  371|  2.12k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  372|  2.12k|    igraph_real_t ecc_v;
  373|  2.12k|    igraph_real_t ecc_u;
  374|  2.12k|    igraph_int_t vid_ecc;
  375|  2.12k|    igraph_int_t ito, ifrom;
  376|  2.12k|    igraph_bool_t inf = false;
  377|       |
  378|  2.12k|    if (vid_start >= no_of_nodes) {
  ------------------
  |  Branch (378:9): [True: 0, False: 2.12k]
  ------------------
  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.12k|    if (no_of_nodes == 0) {
  ------------------
  |  Branch (383:9): [True: 0, False: 2.12k]
  ------------------
  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.12k|    if (vid_start < 0) {
  ------------------
  |  Branch (396:9): [True: 0, False: 2.12k]
  ------------------
  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.12k|    if (!igraph_is_directed(graph) || !directed) {
  ------------------
  |  Branch (400:9): [True: 0, False: 2.12k]
  |  Branch (400:39): [True: 0, False: 2.12k]
  ------------------
  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.12k|    } else {
  441|  2.12k|        igraph_vector_t ecc_out;
  442|  2.12k|        igraph_vector_t ecc_in;
  443|  2.12k|        igraph_int_t vid_ecc_in;
  444|  2.12k|        igraph_int_t vid_ecc_out;
  445|  2.12k|        igraph_int_t vid_end;
  446|  2.12k|        igraph_bool_t direction;
  447|  2.12k|        igraph_lazy_adjlist_t adjlist_in;
  448|  2.12k|        igraph_lazy_adjlist_t adjlist_out;
  449|       |
  450|  2.12k|        IGRAPH_CHECK(igraph_lazy_adjlist_init(graph, &adjlist_in, IGRAPH_IN,
  ------------------
  |  |  656|  2.12k|    do { \
  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  451|  2.12k|                                              IGRAPH_NO_LOOPS, IGRAPH_NO_MULTIPLE));
  452|  2.12k|        IGRAPH_FINALLY(igraph_lazy_adjlist_destroy, &adjlist_in);
  ------------------
  |  |  603|  2.12k|    do { \
  |  |  604|  2.12k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.12k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.12k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.12k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.12k]
  |  |  ------------------
  |  |  608|  2.12k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  453|  2.12k|        IGRAPH_CHECK(igraph_lazy_adjlist_init(graph, &adjlist_out, IGRAPH_OUT,
  ------------------
  |  |  656|  2.12k|    do { \
  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  454|  2.12k|                                              IGRAPH_NO_LOOPS, IGRAPH_NO_MULTIPLE));
  455|  2.12k|        IGRAPH_FINALLY(igraph_lazy_adjlist_destroy, &adjlist_out);
  ------------------
  |  |  603|  2.12k|    do { \
  |  |  604|  2.12k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.12k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.12k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.12k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.12k]
  |  |  ------------------
  |  |  608|  2.12k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  456|       |
  457|  2.12k|        IGRAPH_VECTOR_INIT_FINALLY(&ecc_in, igraph_vcount(graph));
  ------------------
  |  |  104|  2.12k|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.12k|    do { \
  |  |  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  2.12k|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.12k|    do { \
  |  |  |  |  604|  2.12k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.12k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.12k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.12k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.12k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (105:60): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  458|  2.12k|        IGRAPH_VECTOR_INIT_FINALLY(&ecc_out, igraph_vcount(graph));
  ------------------
  |  |  104|  2.12k|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.12k|    do { \
  |  |  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  2.12k|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.12k|    do { \
  |  |  |  |  604|  2.12k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.12k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.12k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.12k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.12k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (105:60): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  459|       |
  460|  2.12k|        IGRAPH_CHECK(igraph_i_eccentricity_unweighted(
  ------------------
  |  |  656|  2.12k|    do { \
  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  461|  2.12k|            graph, &ecc_out, igraph_vss_1(vid_start),  &adjlist_out,
  462|  2.12k|            &vid_ecc_out, unconn
  463|  2.12k|        ));
  464|  2.12k|        IGRAPH_CHECK(igraph_i_eccentricity_unweighted(
  ------------------
  |  |  656|  2.12k|    do { \
  |  |  657|  2.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
  465|  2.12k|            graph, &ecc_in, igraph_vss_1(vid_start), &adjlist_in,
  466|  2.12k|            &vid_ecc_in, unconn
  467|  2.12k|        ));
  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.12k|        if (!unconn && (vid_ecc_out == -1 || vid_ecc_in == -1)) {
  ------------------
  |  Branch (471:13): [True: 0, False: 2.12k]
  |  Branch (471:25): [True: 0, False: 0]
  |  Branch (471:46): [True: 0, False: 0]
  ------------------
  472|      0|            inf = true;
  473|  2.12k|        } else {
  474|  2.12k|            if (VECTOR(ecc_out)[0] > VECTOR(ecc_in)[0]) {
  ------------------
  |  |   60|  2.12k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          if (VECTOR(ecc_out)[0] > VECTOR(ecc_in)[0]) {
  ------------------
  |  |   60|  2.12k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (474:17): [True: 402, False: 1.72k]
  ------------------
  475|    402|                vid_ecc = vid_ecc_out;
  476|    402|                ecc_u = VECTOR(ecc_out)[0];
  ------------------
  |  |   60|    402|#define VECTOR(v) ((v).stor_begin)
  ------------------
  477|  1.72k|            } else {
  478|  1.72k|                vid_ecc = vid_ecc_in;
  479|  1.72k|                ecc_u = VECTOR(ecc_in)[0];
  ------------------
  |  |   60|  1.72k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  480|  1.72k|            }
  481|       |
  482|  2.78k|            while (1) {
  ------------------
  |  Branch (482:20): [True: 2.78k, Folded]
  ------------------
  483|  2.78k|                IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|  2.78k|    do { \
  |  |   47|  2.78k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 2.78k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|  2.78k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 2.78k]
  |  |  ------------------
  ------------------
  484|       |
  485|  2.78k|                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.78k|                IGRAPH_CHECK(igraph_i_eccentricity_unweighted(
  ------------------
  |  |  656|  2.78k|    do { \
  |  |  657|  2.78k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.78k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.78k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.78k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.78k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.78k]
  |  |  ------------------
  ------------------
  491|  2.78k|                    graph, &ecc_out, igraph_vss_1(vid_ecc), &adjlist_out,
  492|  2.78k|                    &vid_ecc_out, true
  493|  2.78k|                ));
  494|  2.78k|                IGRAPH_CHECK(igraph_i_eccentricity_unweighted(
  ------------------
  |  |  656|  2.78k|    do { \
  |  |  657|  2.78k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.78k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.78k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.78k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.78k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.78k]
  |  |  ------------------
  ------------------
  495|  2.78k|                    graph, &ecc_in, igraph_vss_1(vid_ecc), &adjlist_in,
  496|  2.78k|                    &vid_ecc_in, true
  497|  2.78k|                ));
  498|       |
  499|  2.78k|                if (VECTOR(ecc_out)[0] > VECTOR(ecc_in)[0]) {
  ------------------
  |  |   60|  2.78k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              if (VECTOR(ecc_out)[0] > VECTOR(ecc_in)[0]) {
  ------------------
  |  |   60|  2.78k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (499:21): [True: 911, False: 1.86k]
  ------------------
  500|    911|                    vid_ecc = vid_ecc_out;
  501|    911|                    ecc_v = VECTOR(ecc_out)[0];
  ------------------
  |  |   60|    911|#define VECTOR(v) ((v).stor_begin)
  ------------------
  502|    911|                    direction = 1;
  503|  1.86k|                } else {
  504|  1.86k|                    vid_ecc = vid_ecc_in;
  505|  1.86k|                    ecc_v = VECTOR(ecc_in)[0];
  ------------------
  |  |   60|  1.86k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  506|  1.86k|                    direction = 0;
  507|  1.86k|                }
  508|       |
  509|  2.78k|                if (ecc_u < ecc_v) {
  ------------------
  |  Branch (509:21): [True: 658, False: 2.12k]
  ------------------
  510|    658|                    ecc_u = ecc_v;
  511|    658|                    vid_start = vid_end;
  512|  2.12k|                } else {
  513|  2.12k|                    break;
  514|  2.12k|                }
  515|  2.78k|            }
  516|       |
  517|  2.12k|            if (direction) {
  ------------------
  |  Branch (517:17): [True: 497, False: 1.62k]
  ------------------
  518|    497|                ifrom = vid_end;
  519|    497|                ito   = vid_start;
  520|  1.62k|            } else {
  521|  1.62k|                ifrom = vid_start;
  522|  1.62k|                ito   = vid_end;
  523|  1.62k|            }
  524|       |
  525|  2.12k|        }
  526|  2.12k|        igraph_vector_destroy(&ecc_out);
  527|  2.12k|        igraph_vector_destroy(&ecc_in);
  528|  2.12k|        igraph_lazy_adjlist_destroy(&adjlist_in);
  529|  2.12k|        igraph_lazy_adjlist_destroy(&adjlist_out);
  530|  2.12k|        IGRAPH_FINALLY_CLEAN(4);
  531|  2.12k|    }
  532|       |
  533|  2.12k|    if (inf) {
  ------------------
  |  Branch (533:9): [True: 0, False: 2.12k]
  ------------------
  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.12k|    } else {
  544|  2.12k|        if (diameter) {
  ------------------
  |  Branch (544:13): [True: 2.12k, False: 0]
  ------------------
  545|  2.12k|            *diameter = ecc_u;
  546|  2.12k|        }
  547|  2.12k|        if (from) {
  ------------------
  |  Branch (547:13): [True: 2.12k, False: 0]
  ------------------
  548|  2.12k|            *from = ifrom;
  549|  2.12k|        }
  550|  2.12k|        if (to) {
  ------------------
  |  Branch (550:13): [True: 2.12k, False: 0]
  ------------------
  551|  2.12k|            *to = ito;
  552|  2.12k|        }
  553|  2.12k|    }
  554|       |
  555|  2.12k|    return IGRAPH_SUCCESS;
  556|  2.12k|}

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

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

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

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

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

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

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

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

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

