LLVMFuzzerTestOneInput:
   24|  2.07k|extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
   25|  2.07k|    igraph_t graph;
   26|  2.07k|    igraph_vector_int_t edges;
   27|       |
   28|  2.07k|    igraph_set_warning_handler(igraph_warning_handler_ignore);
   29|       |
   30|  2.07k|    if (Size % 2 == 0 || Size > 512+1 || Size < 1) {
  ------------------
  |  Branch (30:9): [True: 3, False: 2.07k]
  |  Branch (30:26): [True: 11, False: 2.06k]
  |  Branch (30:42): [True: 0, False: 2.06k]
  ------------------
   31|     14|        return 0;
   32|     14|    }
   33|       |
   34|  2.06k|    igraph_vector_int_init(&edges, Size-1);
   35|   143k|    for (size_t i=0; i < Size-1; ++i) {
  ------------------
  |  Branch (35:22): [True: 141k, False: 2.06k]
  ------------------
   36|   141k|        VECTOR(edges)[i] = Data[i+1];
  ------------------
  |  |   60|   141k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   37|   141k|    }
   38|       |
   39|  2.06k|    igraph_rng_seed(igraph_rng_default(), 137);
   40|       |
   41|       |    /* Directed */
   42|  2.06k|    if (igraph_create(&graph, &edges, Data[0], IGRAPH_DIRECTED) == IGRAPH_SUCCESS) {
  ------------------
  |  Branch (42:9): [True: 2.06k, False: 0]
  ------------------
   43|  2.06k|        igraph_vector_int_list_t ivl1;
   44|  2.06k|        igraph_vector_t v1, v2;
   45|  2.06k|        igraph_vector_int_t iv1, iv2;
   46|  2.06k|        igraph_real_t r1;
   47|  2.06k|        igraph_bool_t b1;
   48|  2.06k|        igraph_int_t i1, i2;
   49|  2.06k|        igraph_t g;
   50|       |
   51|  2.06k|        igraph_vector_int_list_init(&ivl1, 0);
   52|  2.06k|        igraph_vector_init(&v1, 0);
   53|  2.06k|        igraph_vector_init(&v2, 0);
   54|  2.06k|        igraph_vector_int_init(&iv1, 0);
   55|  2.06k|        igraph_vector_int_init(&iv2, 0);
   56|       |
   57|  2.06k|        igraph_minimum_cycle_basis(&graph, NULL, &ivl1, -1, true, true);
   58|       |
   59|       |        /* Count triangles in the minimum cycle basis. */
   60|  2.06k|        i1 = igraph_vector_int_list_size(&ivl1);
   61|  2.06k|        i2 = 0;
   62|  36.0k|        for (igraph_int_t i=0; i < i1; i++) {
  ------------------
  |  Branch (62:32): [True: 33.9k, False: 2.06k]
  ------------------
   63|  33.9k|            if (igraph_vector_int_size(igraph_vector_int_list_get_ptr(&ivl1, i)) == 3) {
  ------------------
  |  Branch (63:17): [True: 3.79k, False: 30.1k]
  ------------------
   64|  3.79k|                i2++;
   65|  3.79k|            }
   66|  33.9k|        }
   67|       |
   68|  2.06k|        igraph_fundamental_cycles(&graph, NULL, &ivl1, -1, -1);
   69|       |
   70|  2.06k|        igraph_motifs_randesu(&graph, &v1, 3, NULL);
   71|       |
   72|  2.06k|        igraph_list_triangles(&graph, &iv1);
   73|       |
   74|  2.06k|        igraph_count_triangles(&graph, &r1);
   75|       |
   76|       |        /* Cross-check direct triangle count to list of triangles. */
   77|  2.06k|        IGRAPH_ASSERT(igraph_vector_int_size(&iv1) == 3*r1);
  ------------------
  |  |  924|  2.06k|    do { \
  |  |  925|  2.06k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  ------------------
  |  |  |  |  401|       |#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  927|      0|        } \
  |  |  928|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
   78|       |
   79|       |        /* Cross-check direct triangle count with 3-motifs that include a triangle. */
   80|  2.06k|        IGRAPH_ASSERT(
  ------------------
  |  |  924|  2.06k|    do { \
  |  |  925|  2.06k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  ------------------
  |  |  |  |  401|       |#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  927|      0|        } \
  |  |  928|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
   81|  2.06k|            VECTOR(v1)[7] + VECTOR(v1)[8] +
   82|  2.06k|            VECTOR(v1)[11] + VECTOR(v1)[12] +
   83|  2.06k|            VECTOR(v1)[13] + VECTOR(v1)[14] + VECTOR(v1)[15] == r1);
   84|       |
   85|       |        /* The number of triangles in the minimum cycle basis is no greater than the total.
   86|       |         * Example when not all triangles are part of the basis: K_4 graph.
   87|       |         */
   88|  2.06k|        IGRAPH_ASSERT(i2 <= r1);
  ------------------
  |  |  924|  2.06k|    do { \
  |  |  925|  2.06k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  ------------------
  |  |  |  |  401|       |#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  927|      0|        } \
  |  |  928|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
   89|       |
   90|  2.06k|        igraph_is_triangle_free(&graph, &b1);
   91|  2.06k|        IGRAPH_ASSERT((!b1) == (!!r1));
  ------------------
  |  |  924|  2.06k|    do { \
  |  |  925|  2.06k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  ------------------
  |  |  |  |  401|       |#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  927|      0|        } \
  |  |  928|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
   92|       |
   93|  2.06k|        igraph_ecc(&graph, &v1, igraph_ess_all(IGRAPH_EDGEORDER_ID), 3, false, true);
   94|       |
   95|  2.06k|        igraph_count_reachable(&graph, &iv1, IGRAPH_OUT);
   96|  2.06k|        igraph_transitive_closure(&graph, &g);
   97|  2.06k|        igraph_destroy(&g);
   98|       |
   99|  2.06k|        if (igraph_vcount(&graph) >= 2) {
  ------------------
  |  Branch (99:13): [True: 2.04k, False: 20]
  ------------------
  100|  2.04k|            igraph_get_all_simple_paths(&graph, &ivl1, 0, igraph_vss_1(1), IGRAPH_ALL, -1, 5, IGRAPH_UNLIMITED);
  ------------------
  |  |   39|  2.04k|#define IGRAPH_UNLIMITED (-1)
  ------------------
  101|  2.04k|        }
  102|       |
  103|  2.06k|        if (igraph_vcount(&graph) >= 1) {
  ------------------
  |  Branch (103:13): [True: 2.06k, False: 1]
  ------------------
  104|  2.06k|            igraph_t subg;
  105|       |
  106|  2.06k|            igraph_random_walk(&graph, NULL, &iv1, &iv2, 0, IGRAPH_ALL, igraph_ecount(&graph), IGRAPH_RANDOM_WALK_STUCK_RETURN);
  107|       |
  108|  2.06k|            igraph_induced_subgraph(&graph, &subg, igraph_vss_vector(&iv1), IGRAPH_SUBGRAPH_AUTO);
  109|  2.06k|            igraph_destroy(&subg);
  110|       |
  111|  2.06k|            igraph_subgraph_from_edges(&graph, &subg, igraph_ess_vector(&iv2), true);
  112|  2.06k|            igraph_destroy(&subg);
  113|       |
  114|  2.06k|            igraph_reverse_edges(&graph, igraph_ess_vector(&iv2));
  115|  2.06k|        }
  116|       |
  117|  2.06k|        i1 = igraph_vcount(&graph);
  118|  2.06k|        i2 = igraph_ecount(&graph);
  119|  2.06k|        igraph_to_undirected(&graph, IGRAPH_TO_UNDIRECTED_COLLAPSE, NULL);
  120|  2.06k|        IGRAPH_ASSERT(igraph_vcount(&graph) == i1);
  ------------------
  |  |  924|  2.06k|    do { \
  |  |  925|  2.06k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  ------------------
  |  |  |  |  401|       |#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  927|      0|        } \
  |  |  928|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  121|  2.06k|        IGRAPH_ASSERT(igraph_ecount(&graph) <= i2);
  ------------------
  |  |  924|  2.06k|    do { \
  |  |  925|  2.06k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  ------------------
  |  |  |  |  401|       |#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  927|      0|        } \
  |  |  928|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  122|  2.06k|        IGRAPH_ASSERT(! igraph_is_directed(&graph));
  ------------------
  |  |  924|  2.06k|    do { \
  |  |  925|  2.06k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  ------------------
  |  |  |  |  401|       |#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  927|      0|        } \
  |  |  928|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  123|       |
  124|  2.06k|        igraph_vector_resize(&v2, 4);
  125|  2.06k|        igraph_vector_null(&v2);
  126|  2.06k|        igraph_motifs_randesu(&graph, &v1, 4, &v2);
  127|       |
  128|  2.06k|        if (igraph_vcount(&graph) >= 1) {
  ------------------
  |  Branch (128:13): [True: 2.06k, False: 1]
  ------------------
  129|  2.06k|            igraph_random_walk(&graph, NULL, &iv1, &iv2, 0, IGRAPH_ALL, igraph_ecount(&graph), IGRAPH_RANDOM_WALK_STUCK_RETURN);
  130|  2.06k|        }
  131|       |
  132|  2.06k|        igraph_vector_int_destroy(&iv2);
  133|  2.06k|        igraph_vector_int_destroy(&iv1);
  134|  2.06k|        igraph_vector_destroy(&v2);
  135|  2.06k|        igraph_vector_destroy(&v1);
  136|  2.06k|        igraph_vector_int_list_destroy(&ivl1);
  137|       |
  138|  2.06k|        igraph_destroy(&graph);
  139|  2.06k|    }
  140|       |
  141|  2.06k|    igraph_vector_int_destroy(&edges);
  142|       |
  143|  2.06k|    IGRAPH_ASSERT(IGRAPH_FINALLY_STACK_EMPTY);
  ------------------
  |  |  924|  2.06k|    do { \
  |  |  925|  2.06k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  ------------------
  |  |  |  |  401|       |#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  927|      0|        } \
  |  |  928|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  144|       |
  145|  2.06k|    return 0;  // Non-zero return values are reserved for future use.
  146|  2.06k|}

igraph_connected_components:
   85|  6.18k|) {
   86|  6.18k|    if (mode == IGRAPH_WEAK || !igraph_is_directed(graph)) {
  ------------------
  |  Branch (86:9): [True: 2.06k, False: 4.12k]
  |  Branch (86:32): [True: 0, False: 4.12k]
  ------------------
   87|  2.06k|        return igraph_i_connected_components_weak(graph, membership, csize, no);
   88|  4.12k|    } else if (mode == IGRAPH_STRONG) {
  ------------------
  |  Branch (88:16): [True: 4.12k, False: 0]
  ------------------
   89|  4.12k|        return igraph_i_connected_components_strong(graph, membership, csize, no);
   90|  4.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|}
components.c:igraph_i_connected_components_weak:
   98|  2.06k|) {
   99|       |
  100|  2.06k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  101|  2.06k|    igraph_int_t no_of_components;
  102|  2.06k|    igraph_bitset_t already_added;
  103|  2.06k|    igraph_dqueue_int_t q = IGRAPH_DQUEUE_NULL;
  ------------------
  |  |   56|  2.06k|#define IGRAPH_DQUEUE_NULL { 0,0,0,0 }
  ------------------
  104|  2.06k|    igraph_vector_int_t neis = IGRAPH_VECTOR_NULL;
  ------------------
  |  |   99|  2.06k|    #define IGRAPH_VECTOR_NULL { 0,0,0 }
  ------------------
  105|       |
  106|       |    /* Memory for result, csize is dynamically allocated */
  107|  2.06k|    if (membership) {
  ------------------
  |  Branch (107:9): [True: 0, False: 2.06k]
  ------------------
  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.06k|    if (csize) {
  ------------------
  |  Branch (110:9): [True: 0, False: 2.06k]
  ------------------
  111|      0|        igraph_vector_int_clear(csize);
  112|      0|    }
  113|       |
  114|       |    /* Try to make use of cached information. */
  115|  2.06k|    if (igraph_i_property_cache_has(graph, IGRAPH_PROP_IS_WEAKLY_CONNECTED) &&
  ------------------
  |  Branch (115:9): [True: 0, False: 2.06k]
  ------------------
  116|      0|        igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_IS_WEAKLY_CONNECTED)) {
  ------------------
  |  Branch (116:9): [True: 0, False: 0]
  ------------------
  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|      0|        if (membership) {
  ------------------
  |  Branch (121:13): [True: 0, False: 0]
  ------------------
  122|       |            /* All vertices are members of the same component,
  123|       |             * component number 0. */
  124|      0|            igraph_vector_int_null(membership);
  125|      0|        }
  126|      0|        if (csize) {
  ------------------
  |  Branch (126:13): [True: 0, False: 0]
  ------------------
  127|       |            /* The size of the single component is the same as the vertex count. */
  128|      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]
  |  |  ------------------
  ------------------
  129|      0|        }
  130|      0|        if (no) {
  ------------------
  |  Branch (130:13): [True: 0, False: 0]
  ------------------
  131|       |            /* There is one component. */
  132|      0|            *no = 1;
  133|      0|        }
  134|      0|        return IGRAPH_SUCCESS;
  135|      0|    }
  136|       |
  137|  2.06k|    IGRAPH_BITSET_INIT_FINALLY(&already_added, no_of_nodes);
  ------------------
  |  |  259|  2.06k|#define IGRAPH_BITSET_INIT_FINALLY(bitset, size) \
  |  |  260|  2.06k|do { IGRAPH_CHECK(igraph_bitset_init(bitset, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.06k|    do { \
  |  |  |  |  657|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  261|  2.06k|     IGRAPH_FINALLY(igraph_bitset_destroy, bitset); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.06k|    do { \
  |  |  |  |  604|  2.06k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.06k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.06k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.06k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.06k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (261:62): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  138|  2.06k|    IGRAPH_DQUEUE_INT_INIT_FINALLY(&q, no_of_nodes > 100000 ? 10000 : no_of_nodes / 10);
  ------------------
  |  |   61|  2.06k|    do { IGRAPH_CHECK(igraph_dqueue_int_init(q, capacity)); \
  |  |  ------------------
  |  |  |  |  656|  2.06k|    do { \
  |  |  |  |  657|  4.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (657:40): [True: 0, False: 2.06k]
  |  |  |  |  ------------------
  |  |  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|  2.06k|        IGRAPH_FINALLY(igraph_dqueue_int_destroy, q); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.06k|    do { \
  |  |  |  |  604|  2.06k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.06k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.06k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.06k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.06k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (62:64): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  139|  2.06k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&neis, 0);
  ------------------
  |  |  119|  2.06k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.06k|    do { \
  |  |  |  |  657|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.06k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.06k|    do { \
  |  |  |  |  604|  2.06k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.06k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.06k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.06k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.06k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  140|       |
  141|       |    /* The algorithm */
  142|       |
  143|  2.06k|    no_of_components = 0;
  144|   403k|    for (igraph_int_t first_node = 0; first_node < no_of_nodes; ++first_node) {
  ------------------
  |  Branch (144:39): [True: 401k, False: 2.06k]
  ------------------
  145|   401k|        igraph_int_t act_component_size;
  146|       |
  147|   401k|        if (IGRAPH_BIT_TEST(already_added, first_node)) {
  ------------------
  |  |  142|   401k|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|   401k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|   401k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|   401k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|   401k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|   401k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (142:36): [True: 36.7k, False: 364k]
  |  |  ------------------
  ------------------
  148|  36.7k|            continue;
  149|  36.7k|        }
  150|   364k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|   364k|    do { \
  |  |   47|   364k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 364k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|   364k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 364k]
  |  |  ------------------
  ------------------
  151|       |
  152|   364k|        IGRAPH_BIT_SET(already_added, first_node);
  ------------------
  |  |  103|   364k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|   364k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(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_SET(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
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  153|   364k|        act_component_size = 1;
  154|   364k|        if (membership) {
  ------------------
  |  Branch (154:13): [True: 0, False: 364k]
  ------------------
  155|      0|            VECTOR(*membership)[first_node] = no_of_components;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  156|      0|        }
  157|   364k|        IGRAPH_CHECK(igraph_dqueue_int_push(&q, first_node));
  ------------------
  |  |  656|   364k|    do { \
  |  |  657|   364k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   364k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   364k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 364k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   364k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 364k]
  |  |  ------------------
  ------------------
  158|       |
  159|   765k|        while ( !igraph_dqueue_int_empty(&q) ) {
  ------------------
  |  Branch (159:17): [True: 401k, False: 364k]
  ------------------
  160|   401k|            igraph_int_t act_node = igraph_dqueue_int_pop(&q);
  161|   401k|            IGRAPH_CHECK(igraph_neighbors(
  ------------------
  |  |  656|   401k|    do { \
  |  |  657|   401k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   401k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   401k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 401k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   401k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 401k]
  |  |  ------------------
  ------------------
  162|   401k|                graph, &neis, act_node, IGRAPH_ALL, IGRAPH_NO_LOOPS, IGRAPH_MULTIPLE
  163|   401k|            ));
  164|   401k|            igraph_int_t nei_count = igraph_vector_int_size(&neis);
  165|   518k|            for (igraph_int_t i = 0; i < nei_count; i++) {
  ------------------
  |  Branch (165:38): [True: 117k, False: 401k]
  ------------------
  166|   117k|                igraph_int_t neighbor = VECTOR(neis)[i];
  ------------------
  |  |   60|   117k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  167|   117k|                if (IGRAPH_BIT_TEST(already_added, neighbor)) {
  ------------------
  |  |  142|   117k|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|   117k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|   117k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|   117k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|   117k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|   117k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (142:36): [True: 80.8k, False: 36.7k]
  |  |  ------------------
  ------------------
  168|  80.8k|                    continue;
  169|  80.8k|                }
  170|  36.7k|                IGRAPH_CHECK(igraph_dqueue_int_push(&q, neighbor));
  ------------------
  |  |  656|  36.7k|    do { \
  |  |  657|  36.7k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  36.7k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  36.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 36.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|  36.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 36.7k]
  |  |  ------------------
  ------------------
  171|  36.7k|                IGRAPH_BIT_SET(already_added, neighbor);
  ------------------
  |  |  103|  36.7k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|  36.7k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|  36.7k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  36.7k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|  36.7k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  36.7k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  172|  36.7k|                act_component_size++;
  173|  36.7k|                if (membership) {
  ------------------
  |  Branch (173:21): [True: 0, False: 36.7k]
  ------------------
  174|      0|                    VECTOR(*membership)[neighbor] = no_of_components;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  175|      0|                }
  176|  36.7k|            }
  177|   401k|        }
  178|       |
  179|   364k|        no_of_components++;
  180|   364k|        if (csize) {
  ------------------
  |  Branch (180:13): [True: 0, False: 364k]
  ------------------
  181|      0|            IGRAPH_CHECK(igraph_vector_int_push_back(csize, act_component_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]
  |  |  ------------------
  ------------------
  182|      0|        }
  183|   364k|    }
  184|       |
  185|       |    /* Cleaning up */
  186|       |
  187|  2.06k|    if (no) {
  ------------------
  |  Branch (187:9): [True: 2.06k, False: 0]
  ------------------
  188|  2.06k|        *no = no_of_components;
  189|  2.06k|    }
  190|       |
  191|       |    /* Clean up */
  192|  2.06k|    igraph_bitset_destroy(&already_added);
  193|  2.06k|    igraph_dqueue_int_destroy(&q);
  194|  2.06k|    igraph_vector_int_destroy(&neis);
  195|  2.06k|    IGRAPH_FINALLY_CLEAN(3);
  196|       |
  197|       |    /* Update cache */
  198|  2.06k|    igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_IS_WEAKLY_CONNECTED, no_of_components == 1);
  199|       |
  200|  2.06k|    return IGRAPH_SUCCESS;
  201|  2.06k|}
components.c:igraph_i_connected_components_strong:
  206|  4.12k|) {
  207|  4.12k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  208|  4.12k|    igraph_vector_int_t next_nei = IGRAPH_VECTOR_NULL;
  ------------------
  |  |   99|  4.12k|    #define IGRAPH_VECTOR_NULL { 0,0,0 }
  ------------------
  209|  4.12k|    igraph_int_t num_seen;
  210|  4.12k|    igraph_dqueue_int_t q = IGRAPH_DQUEUE_NULL;
  ------------------
  |  |   56|  4.12k|#define IGRAPH_DQUEUE_NULL { 0,0,0,0 }
  ------------------
  211|  4.12k|    igraph_int_t no_of_components = 0;
  212|  4.12k|    igraph_vector_int_t out = IGRAPH_VECTOR_NULL;
  ------------------
  |  |   99|  4.12k|    #define IGRAPH_VECTOR_NULL { 0,0,0 }
  ------------------
  213|  4.12k|    igraph_adjlist_t adjlist;
  214|       |
  215|       |    /* Memory for result, csize is dynamically allocated */
  216|  4.12k|    if (membership) {
  ------------------
  |  Branch (216:9): [True: 4.12k, False: 0]
  ------------------
  217|  4.12k|        IGRAPH_CHECK(igraph_vector_int_resize(membership, no_of_nodes));
  ------------------
  |  |  656|  4.12k|    do { \
  |  |  657|  4.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.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|  4.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.12k]
  |  |  ------------------
  ------------------
  218|  4.12k|    }
  219|  4.12k|    if (csize) {
  ------------------
  |  Branch (219:9): [True: 0, False: 4.12k]
  ------------------
  220|      0|        igraph_vector_int_clear(csize);
  221|      0|    }
  222|       |
  223|       |    /* Try to make use of cached information. */
  224|  4.12k|    if (igraph_i_property_cache_has(graph, IGRAPH_PROP_IS_STRONGLY_CONNECTED) &&
  ------------------
  |  Branch (224:9): [True: 2.06k, False: 2.06k]
  ------------------
  225|  2.06k|        igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_IS_STRONGLY_CONNECTED)) {
  ------------------
  |  Branch (225:9): [True: 59, False: 2.00k]
  ------------------
  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|     59|        if (membership) {
  ------------------
  |  Branch (230:13): [True: 59, False: 0]
  ------------------
  231|       |            /* All vertices are members of the same component,
  232|       |             * component number 0. */
  233|     59|            igraph_vector_int_null(membership);
  234|     59|        }
  235|     59|        if (csize) {
  ------------------
  |  Branch (235:13): [True: 0, False: 59]
  ------------------
  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|     59|        if (no) {
  ------------------
  |  Branch (239:13): [True: 59, False: 0]
  ------------------
  240|       |            /* There is one component. */
  241|     59|            *no = 1;
  242|     59|        }
  243|     59|        return IGRAPH_SUCCESS;
  244|     59|    }
  245|       |
  246|       |    /* The result */
  247|       |
  248|  4.06k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&next_nei, no_of_nodes);
  ------------------
  |  |  119|  4.06k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  4.06k|    do { \
  |  |  |  |  657|  4.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  4.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  4.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.06k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  4.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 4.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  4.06k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  4.06k|    do { \
  |  |  |  |  604|  4.06k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  4.06k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  4.06k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  4.06k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 4.06k]
  |  |  |  |  ------------------
  |  |  |  |  608|  4.06k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  4.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 4.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 4.06k]
  |  |  ------------------
  ------------------
  249|  4.06k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&out, 0);
  ------------------
  |  |  119|  4.06k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  4.06k|    do { \
  |  |  |  |  657|  4.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  4.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  4.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.06k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  4.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 4.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  4.06k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  4.06k|    do { \
  |  |  |  |  604|  4.06k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  4.06k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  4.06k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  4.06k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 4.06k]
  |  |  |  |  ------------------
  |  |  |  |  608|  4.06k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  4.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 4.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 4.06k]
  |  |  ------------------
  ------------------
  250|  4.06k|    IGRAPH_DQUEUE_INT_INIT_FINALLY(&q, 100);
  ------------------
  |  |   61|  4.06k|    do { IGRAPH_CHECK(igraph_dqueue_int_init(q, capacity)); \
  |  |  ------------------
  |  |  |  |  656|  4.06k|    do { \
  |  |  |  |  657|  4.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  4.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  4.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.06k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  4.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 4.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|  4.06k|        IGRAPH_FINALLY(igraph_dqueue_int_destroy, q); } while (0)
  |  |  ------------------
  |  |  |  |  603|  4.06k|    do { \
  |  |  |  |  604|  4.06k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  4.06k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  4.06k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  4.06k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 4.06k]
  |  |  |  |  ------------------
  |  |  |  |  608|  4.06k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  4.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 4.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (62:64): [Folded, False: 4.06k]
  |  |  ------------------
  ------------------
  251|       |
  252|  4.06k|    IGRAPH_CHECK(igraph_vector_int_reserve(&out, no_of_nodes));
  ------------------
  |  |  656|  4.06k|    do { \
  |  |  657|  4.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  4.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.06k]
  |  |  ------------------
  ------------------
  253|       |
  254|  4.06k|    IGRAPH_CHECK(igraph_adjlist_init(graph, &adjlist, IGRAPH_OUT, IGRAPH_LOOPS_ONCE, IGRAPH_MULTIPLE));
  ------------------
  |  |  656|  4.06k|    do { \
  |  |  657|  4.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  4.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.06k]
  |  |  ------------------
  ------------------
  255|  4.06k|    IGRAPH_FINALLY(igraph_adjlist_destroy, &adjlist);
  ------------------
  |  |  603|  4.06k|    do { \
  |  |  604|  4.06k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  4.06k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  4.06k|         * incorrect destructor function with the pointer */ \
  |  |  607|  4.06k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 4.06k]
  |  |  ------------------
  |  |  608|  4.06k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  4.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 4.06k]
  |  |  ------------------
  ------------------
  256|       |
  257|  4.06k|    num_seen = 0;
  258|   805k|    for (igraph_int_t i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (258:30): [True: 801k, False: 4.06k]
  ------------------
  259|   801k|        const igraph_vector_int_t *tmp;
  260|       |
  261|   801k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|   801k|    do { \
  |  |   47|   801k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 801k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|   801k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 801k]
  |  |  ------------------
  ------------------
  262|       |
  263|   801k|        tmp = igraph_adjlist_get(&adjlist, i);
  ------------------
  |  |   73|   801k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  264|   801k|        if (VECTOR(next_nei)[i] > igraph_vector_int_size(tmp)) {
  ------------------
  |  |   60|   801k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (264:13): [True: 52.4k, False: 749k]
  ------------------
  265|  52.4k|            continue;
  266|  52.4k|        }
  267|       |
  268|   749k|        IGRAPH_CHECK(igraph_dqueue_int_push(&q, i));
  ------------------
  |  |  656|   749k|    do { \
  |  |  657|   749k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   749k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   749k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 749k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   749k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 749k]
  |  |  ------------------
  ------------------
  269|  2.49M|        while (!igraph_dqueue_int_empty(&q)) {
  ------------------
  |  Branch (269:16): [True: 1.74M, False: 749k]
  ------------------
  270|  1.74M|            igraph_int_t act_node = igraph_dqueue_int_back(&q);
  271|  1.74M|            tmp = igraph_adjlist_get(&adjlist, act_node);
  ------------------
  |  |   73|  1.74M|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  272|  1.74M|            if (VECTOR(next_nei)[act_node] == 0) {
  ------------------
  |  |   60|  1.74M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (272:17): [True: 801k, False: 941k]
  ------------------
  273|       |                /* this is the first time we've met this vertex */
  274|   801k|                VECTOR(next_nei)[act_node]++;
  ------------------
  |  |   60|   801k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  275|   941k|            } else if (VECTOR(next_nei)[act_node] <= igraph_vector_int_size(tmp)) {
  ------------------
  |  |   60|   941k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (275:24): [True: 139k, False: 801k]
  ------------------
  276|       |                /* we've already met this vertex but it has more children */
  277|   139k|                igraph_int_t neighbor = VECTOR(*tmp)[VECTOR(next_nei)[act_node] - 1];
  ------------------
  |  |   60|   139k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              igraph_int_t neighbor = VECTOR(*tmp)[VECTOR(next_nei)[act_node] - 1];
  ------------------
  |  |   60|   139k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  278|   139k|                if (VECTOR(next_nei)[neighbor] == 0) {
  ------------------
  |  |   60|   139k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (278:21): [True: 52.4k, False: 87.0k]
  ------------------
  279|  52.4k|                    IGRAPH_CHECK(igraph_dqueue_int_push(&q, neighbor));
  ------------------
  |  |  656|  52.4k|    do { \
  |  |  657|  52.4k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  52.4k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  52.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 52.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  52.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 52.4k]
  |  |  ------------------
  ------------------
  280|  52.4k|                }
  281|   139k|                VECTOR(next_nei)[act_node]++;
  ------------------
  |  |   60|   139k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  282|   801k|            } else {
  283|       |                /* we've met this vertex and it has no more children */
  284|   801k|                IGRAPH_CHECK(igraph_vector_int_push_back(&out, act_node));
  ------------------
  |  |  656|   801k|    do { \
  |  |  657|   801k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   801k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   801k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 801k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   801k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 801k]
  |  |  ------------------
  ------------------
  285|   801k|                igraph_dqueue_int_pop_back(&q);
  286|   801k|                num_seen++;
  287|       |
  288|   801k|                if (num_seen % 10000 == 0) {
  ------------------
  |  Branch (288:21): [True: 0, False: 801k]
  ------------------
  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|   801k|            }
  295|  1.74M|        } /* while q */
  296|   749k|    }  /* for */
  297|       |
  298|  4.06k|    IGRAPH_PROGRESS("Strongly connected components: ", 50.0, NULL);
  ------------------
  |  |  169|  4.06k|    do { \
  |  |  170|  4.06k|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  656|  4.06k|    do { \
  |  |  |  |  657|  4.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  4.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  4.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.06k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  4.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 4.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  171|  4.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (171:14): [Folded, False: 4.06k]
  |  |  ------------------
  ------------------
  299|       |
  300|  4.06k|    igraph_adjlist_destroy(&adjlist);
  301|  4.06k|    IGRAPH_FINALLY_CLEAN(1);
  302|       |
  303|  4.06k|    IGRAPH_CHECK(igraph_adjlist_init(graph, &adjlist, IGRAPH_IN, IGRAPH_LOOPS_ONCE, IGRAPH_MULTIPLE));
  ------------------
  |  |  656|  4.06k|    do { \
  |  |  657|  4.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  4.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.06k]
  |  |  ------------------
  ------------------
  304|  4.06k|    IGRAPH_FINALLY(igraph_adjlist_destroy, &adjlist);
  ------------------
  |  |  603|  4.06k|    do { \
  |  |  604|  4.06k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  4.06k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  4.06k|         * incorrect destructor function with the pointer */ \
  |  |  607|  4.06k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 4.06k]
  |  |  ------------------
  |  |  608|  4.06k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  4.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 4.06k]
  |  |  ------------------
  ------------------
  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|  4.06k|    igraph_vector_int_null(&next_nei);             /* mark already added vertices */
  310|  4.06k|    num_seen = 0;
  311|       |
  312|   805k|    while (!igraph_vector_int_empty(&out)) {
  ------------------
  |  Branch (312:12): [True: 801k, False: 4.06k]
  ------------------
  313|   801k|        igraph_int_t act_component_size;
  314|   801k|        igraph_int_t grandfather = igraph_vector_int_pop_back(&out);
  315|       |
  316|   801k|        if (VECTOR(next_nei)[grandfather] != 0) {
  ------------------
  |  |   60|   801k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (316:13): [True: 25.8k, False: 776k]
  ------------------
  317|  25.8k|            continue;
  318|  25.8k|        }
  319|   776k|        VECTOR(next_nei)[grandfather] = 1;
  ------------------
  |  |   60|   776k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  320|   776k|        act_component_size = 1;
  321|   776k|        if (membership) {
  ------------------
  |  Branch (321:13): [True: 776k, False: 0]
  ------------------
  322|   776k|            VECTOR(*membership)[grandfather] = no_of_components;
  ------------------
  |  |   60|   776k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  323|   776k|        }
  324|   776k|        IGRAPH_CHECK(igraph_dqueue_int_push(&q, grandfather));
  ------------------
  |  |  656|   776k|    do { \
  |  |  657|   776k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   776k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   776k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 776k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   776k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 776k]
  |  |  ------------------
  ------------------
  325|       |
  326|   776k|        num_seen++;
  327|   776k|        if (num_seen % 10000 == 0) {
  ------------------
  |  Branch (327:13): [True: 0, False: 776k]
  ------------------
  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|  1.57M|        while (!igraph_dqueue_int_empty(&q)) {
  ------------------
  |  Branch (334:16): [True: 801k, False: 776k]
  ------------------
  335|   801k|            igraph_int_t act_node = igraph_dqueue_int_pop_back(&q);
  336|   801k|            const igraph_vector_int_t *tmp = igraph_adjlist_get(&adjlist, act_node);
  ------------------
  |  |   73|   801k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  337|   801k|            const igraph_int_t n = igraph_vector_int_size(tmp);
  338|   941k|            for (igraph_int_t i = 0; i < n; i++) {
  ------------------
  |  Branch (338:38): [True: 139k, False: 801k]
  ------------------
  339|   139k|                igraph_int_t neighbor = VECTOR(*tmp)[i];
  ------------------
  |  |   60|   139k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  340|   139k|                if (VECTOR(next_nei)[neighbor] != 0) {
  ------------------
  |  |   60|   139k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (340:21): [True: 113k, False: 25.8k]
  ------------------
  341|   113k|                    continue;
  342|   113k|                }
  343|  25.8k|                IGRAPH_CHECK(igraph_dqueue_int_push(&q, neighbor));
  ------------------
  |  |  656|  25.8k|    do { \
  |  |  657|  25.8k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  25.8k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  25.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 25.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|  25.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 25.8k]
  |  |  ------------------
  ------------------
  344|  25.8k|                VECTOR(next_nei)[neighbor] = 1;
  ------------------
  |  |   60|  25.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  345|  25.8k|                act_component_size++;
  346|  25.8k|                if (membership) {
  ------------------
  |  Branch (346:21): [True: 25.8k, False: 0]
  ------------------
  347|  25.8k|                    VECTOR(*membership)[neighbor] = no_of_components;
  ------------------
  |  |   60|  25.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  348|  25.8k|                }
  349|       |
  350|  25.8k|                num_seen++;
  351|  25.8k|                if (num_seen % 10000 == 0) {
  ------------------
  |  Branch (351:21): [True: 0, False: 25.8k]
  ------------------
  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|  25.8k|            }
  358|   801k|        }
  359|       |
  360|   776k|        no_of_components++;
  361|   776k|        if (csize) {
  ------------------
  |  Branch (361:13): [True: 0, False: 776k]
  ------------------
  362|      0|            IGRAPH_CHECK(igraph_vector_int_push_back(csize, act_component_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]
  |  |  ------------------
  ------------------
  363|      0|        }
  364|   776k|    }
  365|       |
  366|  4.06k|    IGRAPH_PROGRESS("Strongly connected components: ", 100.0, NULL);
  ------------------
  |  |  169|  4.06k|    do { \
  |  |  170|  4.06k|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  656|  4.06k|    do { \
  |  |  |  |  657|  4.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  4.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  4.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.06k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  4.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 4.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  171|  4.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (171:14): [Folded, False: 4.06k]
  |  |  ------------------
  ------------------
  367|       |
  368|  4.06k|    if (no) {
  ------------------
  |  Branch (368:9): [True: 4.06k, False: 0]
  ------------------
  369|  4.06k|        *no = no_of_components;
  370|  4.06k|    }
  371|       |
  372|       |    /* Clean up */
  373|  4.06k|    igraph_adjlist_destroy(&adjlist);
  374|  4.06k|    igraph_vector_int_destroy(&out);
  375|  4.06k|    igraph_dqueue_int_destroy(&q);
  376|  4.06k|    igraph_vector_int_destroy(&next_nei);
  377|  4.06k|    IGRAPH_FINALLY_CLEAN(4);
  378|       |
  379|       |    /* Update cache */
  380|  4.06k|    igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_IS_STRONGLY_CONNECTED, no_of_components == 1);
  381|  4.06k|    if (no_of_components == 1) {
  ------------------
  |  Branch (381:9): [True: 59, False: 4.00k]
  ------------------
  382|     59|        igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_IS_WEAKLY_CONNECTED, true);
  383|     59|    }
  384|       |
  385|  4.06k|    return IGRAPH_SUCCESS;
  386|  4.06k|}

igraph_reachability:
   78|  4.12k|        igraph_neimode_t mode) {
   79|       |
   80|  4.12k|    const igraph_int_t no_of_nodes = igraph_vcount(graph);
   81|  4.12k|    igraph_int_t no_of_comps;
   82|  4.12k|    igraph_adjlist_t adjlist, dag;
   83|       |
   84|  4.12k|    if (mode != IGRAPH_ALL && mode != IGRAPH_OUT && mode != IGRAPH_IN) {
  ------------------
  |  Branch (84:9): [True: 4.12k, False: 0]
  |  Branch (84:31): [True: 0, False: 4.12k]
  |  Branch (84:53): [True: 0, False: 0]
  ------------------
   85|      0|        IGRAPH_ERROR("Invalid mode for reachability.", 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]
  |  |  ------------------
  ------------------
   86|      0|    }
   87|       |
   88|  4.12k|    if (! igraph_is_directed(graph)) {
  ------------------
  |  Branch (88:9): [True: 0, False: 4.12k]
  ------------------
   89|      0|        mode = IGRAPH_ALL;
   90|      0|    }
   91|       |
   92|  4.12k|    IGRAPH_CHECK(igraph_connected_components(graph,
  ------------------
  |  |  656|  4.12k|    do { \
  |  |  657|  8.24k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  ------------------
  |  |  |  Branch (657:40): [True: 0, False: 4.12k]
  |  |  ------------------
  |  |  658|  4.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.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|  4.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.12k]
  |  |  ------------------
  ------------------
   93|  4.12k|                                             membership, csize, &no_of_comps,
   94|  4.12k|                                             mode == IGRAPH_ALL ? IGRAPH_WEAK : IGRAPH_STRONG));
   95|       |
   96|  4.12k|    if (no_of_components) {
  ------------------
  |  Branch (96:9): [True: 0, False: 4.12k]
  ------------------
   97|      0|        *no_of_components = no_of_comps;
   98|      0|    }
   99|       |
  100|  4.12k|    IGRAPH_CHECK(igraph_bitset_list_resize(reach, no_of_comps));
  ------------------
  |  |  656|  4.12k|    do { \
  |  |  657|  4.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.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|  4.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.12k]
  |  |  ------------------
  ------------------
  101|       |
  102|   780k|    for (igraph_int_t comp = 0; comp < no_of_comps; comp++) {
  ------------------
  |  Branch (102:33): [True: 776k, False: 4.12k]
  ------------------
  103|   776k|        IGRAPH_CHECK(igraph_bitset_resize(igraph_bitset_list_get_ptr(reach, comp), no_of_nodes));
  ------------------
  |  |  656|   776k|    do { \
  |  |  657|   776k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   776k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   776k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 776k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   776k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 776k]
  |  |  ------------------
  ------------------
  104|   776k|    }
  105|   806k|    for (igraph_int_t v = 0; v < no_of_nodes; v++) {
  ------------------
  |  Branch (105:30): [True: 802k, False: 4.12k]
  ------------------
  106|   802k|        IGRAPH_BIT_SET(*igraph_bitset_list_get_ptr(reach, VECTOR(*membership)[v]), v);
  ------------------
  |  |  103|   802k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|   802k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|   802k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|   802k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|   802k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|   802k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  107|   802k|    }
  108|       |
  109|  4.12k|    if (mode == IGRAPH_ALL) {
  ------------------
  |  Branch (109:9): [True: 0, False: 4.12k]
  ------------------
  110|      0|        return IGRAPH_SUCCESS;
  111|      0|    }
  112|       |
  113|  4.12k|    IGRAPH_CHECK(igraph_adjlist_init(graph, &adjlist, mode, IGRAPH_LOOPS_ONCE, IGRAPH_MULTIPLE));
  ------------------
  |  |  656|  4.12k|    do { \
  |  |  657|  4.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.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|  4.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.12k]
  |  |  ------------------
  ------------------
  114|  4.12k|    IGRAPH_FINALLY(igraph_adjlist_destroy, &adjlist);
  ------------------
  |  |  603|  4.12k|    do { \
  |  |  604|  4.12k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  4.12k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  4.12k|         * incorrect destructor function with the pointer */ \
  |  |  607|  4.12k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 4.12k]
  |  |  ------------------
  |  |  608|  4.12k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  4.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 4.12k]
  |  |  ------------------
  ------------------
  115|       |
  116|  4.12k|    IGRAPH_CHECK(igraph_adjlist_init_empty(&dag, no_of_comps));
  ------------------
  |  |  656|  4.12k|    do { \
  |  |  657|  4.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.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|  4.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.12k]
  |  |  ------------------
  ------------------
  117|  4.12k|    IGRAPH_FINALLY(igraph_adjlist_destroy, &dag);
  ------------------
  |  |  603|  4.12k|    do { \
  |  |  604|  4.12k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  4.12k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  4.12k|         * incorrect destructor function with the pointer */ \
  |  |  607|  4.12k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 4.12k]
  |  |  ------------------
  |  |  608|  4.12k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  4.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 4.12k]
  |  |  ------------------
  ------------------
  118|       |
  119|   806k|    for (igraph_int_t v = 0; v < no_of_nodes; v++) {
  ------------------
  |  Branch (119:30): [True: 802k, False: 4.12k]
  ------------------
  120|   802k|        const igraph_vector_int_t *neighbours = igraph_adjlist_get(&adjlist, v);
  ------------------
  |  |   73|   802k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  121|   802k|        igraph_vector_int_t *dag_neighbours = igraph_adjlist_get(&dag, VECTOR(*membership)[v]);
  ------------------
  |  |   73|   802k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  122|   802k|        const igraph_int_t n = igraph_vector_int_size(neighbours);
  123|   943k|        for (igraph_int_t i = 0; i < n; i++) {
  ------------------
  |  Branch (123:34): [True: 141k, False: 802k]
  ------------------
  124|   141k|            igraph_int_t w = VECTOR(*neighbours)[i];
  ------------------
  |  |   60|   141k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  125|   141k|            if (VECTOR(*membership)[v] != VECTOR(*membership)[w]) {
  ------------------
  |  |   60|   141k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          if (VECTOR(*membership)[v] != VECTOR(*membership)[w]) {
  ------------------
  |  |   60|   141k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (125:17): [True: 65.2k, False: 76.2k]
  ------------------
  126|  65.2k|                IGRAPH_CHECK(igraph_vector_int_push_back(dag_neighbours, VECTOR(*membership)[w]));
  ------------------
  |  |  656|  65.2k|    do { \
  |  |  657|  65.2k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  65.2k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  65.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 65.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|  65.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 65.2k]
  |  |  ------------------
  ------------------
  127|  65.2k|            }
  128|   141k|        }
  129|   802k|    }
  130|       |
  131|       |    /* Iterate through strongly connected components in reverser topological order,
  132|       |     * exploiting the fact that they are indexed in topological order. */
  133|   780k|    for (igraph_int_t i = 0; i < no_of_comps; i++) {
  ------------------
  |  Branch (133:30): [True: 776k, False: 4.12k]
  ------------------
  134|   776k|        const igraph_int_t comp = mode == IGRAPH_IN ? i : no_of_comps - i - 1;
  ------------------
  |  Branch (134:35): [True: 0, False: 776k]
  ------------------
  135|   776k|        const igraph_vector_int_t *dag_neighbours = igraph_adjlist_get(&dag, comp);
  ------------------
  |  |   73|   776k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  136|   776k|        igraph_bitset_t *from_bitset = igraph_bitset_list_get_ptr(reach, comp);
  137|   776k|        const igraph_int_t n = igraph_vector_int_size(dag_neighbours);
  138|   841k|        for (igraph_int_t j = 0; j < n; j++) {
  ------------------
  |  Branch (138:34): [True: 65.2k, False: 776k]
  ------------------
  139|  65.2k|            const igraph_bitset_t *to_bitset = igraph_bitset_list_get_ptr(reach, VECTOR(*dag_neighbours)[j]);
  ------------------
  |  |   60|  65.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  140|  65.2k|            igraph_bitset_or(from_bitset, from_bitset, to_bitset);
  141|  65.2k|        }
  142|   776k|    }
  143|       |
  144|  4.12k|    igraph_adjlist_destroy(&adjlist);
  145|  4.12k|    igraph_adjlist_destroy(&dag);
  146|  4.12k|    IGRAPH_FINALLY_CLEAN(2);
  147|       |
  148|  4.12k|    return IGRAPH_SUCCESS;
  149|  4.12k|}
igraph_count_reachable:
  181|  2.06k|                                      igraph_neimode_t mode) {
  182|       |
  183|  2.06k|    igraph_vector_int_t membership;
  184|  2.06k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  185|  2.06k|    igraph_bitset_list_t reach;
  186|       |
  187|  2.06k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&membership, 0);
  ------------------
  |  |  119|  2.06k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.06k|    do { \
  |  |  |  |  657|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.06k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.06k|    do { \
  |  |  |  |  604|  2.06k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.06k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.06k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.06k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.06k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  188|  2.06k|    IGRAPH_BITSET_LIST_INIT_FINALLY(&reach, 0);
  ------------------
  |  |   41|  2.06k|    do { IGRAPH_CHECK(igraph_bitset_list_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.06k|    do { \
  |  |  |  |  657|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   42|  2.06k|        IGRAPH_FINALLY(igraph_bitset_list_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.06k|    do { \
  |  |  |  |  604|  2.06k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.06k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.06k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.06k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.06k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (42:65): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  189|       |
  190|  2.06k|    IGRAPH_CHECK(igraph_reachability(graph, &membership, NULL, NULL, &reach, mode));
  ------------------
  |  |  656|  2.06k|    do { \
  |  |  657|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  191|       |
  192|  2.06k|    IGRAPH_CHECK(igraph_vector_int_resize(counts, igraph_vcount(graph)));
  ------------------
  |  |  656|  2.06k|    do { \
  |  |  657|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  193|   403k|    for (igraph_int_t i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (193:30): [True: 401k, False: 2.06k]
  ------------------
  194|   401k|        VECTOR(*counts)[i] = igraph_bitset_popcount(igraph_bitset_list_get_ptr(&reach, VECTOR(membership)[i]));
  ------------------
  |  |   60|   401k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      VECTOR(*counts)[i] = igraph_bitset_popcount(igraph_bitset_list_get_ptr(&reach, VECTOR(membership)[i]));
  ------------------
  |  |   60|   401k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  195|   401k|    }
  196|       |
  197|  2.06k|    igraph_bitset_list_destroy(&reach);
  198|  2.06k|    igraph_vector_int_destroy(&membership);
  199|  2.06k|    IGRAPH_FINALLY_CLEAN(2);
  200|       |
  201|  2.06k|    return IGRAPH_SUCCESS;
  202|  2.06k|}
igraph_transitive_closure:
  225|  2.06k|igraph_error_t igraph_transitive_closure(const igraph_t *graph, igraph_t *closure) {
  226|  2.06k|    const igraph_int_t no_of_nodes = igraph_vcount(graph);
  227|  2.06k|    const igraph_bool_t directed = igraph_is_directed(graph);
  228|  2.06k|    igraph_vector_int_t membership, edges;
  229|  2.06k|    igraph_bitset_list_t reach;
  230|       |
  231|  2.06k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&membership, 0);
  ------------------
  |  |  119|  2.06k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.06k|    do { \
  |  |  |  |  657|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.06k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.06k|    do { \
  |  |  |  |  604|  2.06k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.06k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.06k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.06k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.06k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  232|  2.06k|    IGRAPH_BITSET_LIST_INIT_FINALLY(&reach, 0);
  ------------------
  |  |   41|  2.06k|    do { IGRAPH_CHECK(igraph_bitset_list_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.06k|    do { \
  |  |  |  |  657|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   42|  2.06k|        IGRAPH_FINALLY(igraph_bitset_list_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.06k|    do { \
  |  |  |  |  604|  2.06k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.06k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.06k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.06k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.06k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (42:65): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  233|       |
  234|  2.06k|    IGRAPH_CHECK(igraph_reachability(graph, &membership, NULL, NULL, &reach, IGRAPH_OUT));
  ------------------
  |  |  656|  2.06k|    do { \
  |  |  657|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  235|       |
  236|  2.06k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&edges, 0);
  ------------------
  |  |  119|  2.06k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.06k|    do { \
  |  |  |  |  657|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.06k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.06k|    do { \
  |  |  |  |  604|  2.06k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.06k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.06k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.06k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.06k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  237|   403k|    for (igraph_int_t u = 0; u < no_of_nodes; u++) {
  ------------------
  |  Branch (237:30): [True: 401k, False: 2.06k]
  ------------------
  238|   401k|        const igraph_bitset_t *row = igraph_bitset_list_get_ptr(&reach, VECTOR(membership)[u]);
  ------------------
  |  |   60|   401k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  239|  94.6M|        for (igraph_int_t v = directed ? 0 : u + 1; v < no_of_nodes; v++) {
  ------------------
  |  Branch (239:31): [True: 401k, False: 0]
  |  Branch (239:53): [True: 94.2M, False: 401k]
  ------------------
  240|  94.2M|            if (u != v && IGRAPH_BIT_TEST(*row, v)) {
  ------------------
  |  |  142|  93.8M|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|  93.8M|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|  93.8M|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  93.8M|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|  93.8M|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  93.8M|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (142:36): [True: 1.07M, False: 92.7M]
  |  |  ------------------
  ------------------
  |  Branch (240:17): [True: 93.8M, False: 401k]
  ------------------
  241|  1.07M|                IGRAPH_CHECK(igraph_vector_int_push_back(&edges, u));
  ------------------
  |  |  656|  1.07M|    do { \
  |  |  657|  1.07M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.07M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.07M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.07M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, 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.07M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.07M]
  |  |  ------------------
  ------------------
  242|  1.07M|                IGRAPH_CHECK(igraph_vector_int_push_back(&edges, v));
  ------------------
  |  |  656|  1.07M|    do { \
  |  |  657|  1.07M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.07M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.07M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.07M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, 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.07M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.07M]
  |  |  ------------------
  ------------------
  243|  1.07M|            }
  244|  94.2M|        }
  245|   401k|    }
  246|       |
  247|  2.06k|    igraph_bitset_list_destroy(&reach);
  248|  2.06k|    igraph_vector_int_destroy(&membership);
  249|  2.06k|    IGRAPH_FINALLY_CLEAN(2);
  250|       |
  251|  2.06k|    IGRAPH_CHECK(igraph_create(closure, &edges, no_of_nodes, directed));
  ------------------
  |  |  656|  2.06k|    do { \
  |  |  657|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  252|       |
  253|  2.06k|    igraph_vector_int_destroy(&edges);
  254|  2.06k|    IGRAPH_FINALLY_CLEAN(1);
  255|       |
  256|  2.06k|    return IGRAPH_SUCCESS;
  257|  2.06k|}

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

igraph_bitset_init:
  173|   786k|igraph_error_t igraph_bitset_init(igraph_bitset_t *bitset, igraph_int_t size) {
  174|   786k|    igraph_int_t alloc_size = IGRAPH_BIT_NSLOTS(size);
  ------------------
  |  |  161|   786k|#define IGRAPH_BIT_NSLOTS(nbits) ((nbits + IGRAPH_INTEGER_SIZE - (igraph_int_t)(1)) / IGRAPH_INTEGER_SIZE)
  |  |  ------------------
  |  |  |  |   32|   786k|#define IGRAPH_INTEGER_SIZE 64
  |  |  ------------------
  |  |               #define IGRAPH_BIT_NSLOTS(nbits) ((nbits + IGRAPH_INTEGER_SIZE - (igraph_int_t)(1)) / IGRAPH_INTEGER_SIZE)
  |  |  ------------------
  |  |  |  |   32|   786k|#define IGRAPH_INTEGER_SIZE 64
  |  |  ------------------
  ------------------
  175|   786k|    bitset->stor_begin = IGRAPH_CALLOC(alloc_size, igraph_uint_t);
  ------------------
  |  |   33|   786k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  1.57M|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 786k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 786k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 10.5k, False: 776k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  176|   786k|    IGRAPH_CHECK_OOM(bitset->stor_begin, "Cannot initialize bitset.");
  ------------------
  |  |  709|   786k|    do { \
  |  |  710|   786k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|   786k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 786k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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|   786k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 786k]
  |  |  ------------------
  ------------------
  177|   786k|    bitset->size = size;
  178|   786k|    bitset->stor_end = bitset->stor_begin + alloc_size;
  179|   786k|    return IGRAPH_SUCCESS;
  180|   786k|}
igraph_bitset_destroy:
  198|   786k|void igraph_bitset_destroy(igraph_bitset_t *bitset) {
  199|   786k|    IGRAPH_ASSERT(bitset != NULL);
  ------------------
  |  |  924|   786k|    do { \
  |  |  925|   786k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   786k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 786k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   786k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 786k]
  |  |  ------------------
  ------------------
  200|   786k|    IGRAPH_FREE(bitset->stor_begin);
  ------------------
  |  |   36|   786k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  201|   786k|    bitset->size = 0;
  202|   786k|}
igraph_bitset_capacity:
  280|   776k|igraph_int_t igraph_bitset_capacity(const igraph_bitset_t *bitset) {
  281|   776k|    return IGRAPH_INTEGER_SIZE * (bitset->stor_end - bitset->stor_begin);
  ------------------
  |  |   32|   776k|#define IGRAPH_INTEGER_SIZE 64
  ------------------
  282|   776k|}
igraph_bitset_reserve:
  328|   776k|igraph_error_t igraph_bitset_reserve(igraph_bitset_t *bitset, igraph_int_t capacity) {
  329|   776k|    igraph_int_t current_capacity;
  330|   776k|    igraph_uint_t *tmp;
  331|       |
  332|   776k|    IGRAPH_ASSERT(bitset != NULL);
  ------------------
  |  |  924|   776k|    do { \
  |  |  925|   776k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   776k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 776k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   776k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 776k]
  |  |  ------------------
  ------------------
  333|   776k|    IGRAPH_ASSERT(bitset->stor_begin != NULL);
  ------------------
  |  |  924|   776k|    do { \
  |  |  925|   776k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   776k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 776k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   776k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 776k]
  |  |  ------------------
  ------------------
  334|   776k|    IGRAPH_ASSERT(capacity >= 0);
  ------------------
  |  |  924|   776k|    do { \
  |  |  925|   776k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   776k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 776k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   776k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 776k]
  |  |  ------------------
  ------------------
  335|       |
  336|   776k|    current_capacity = igraph_bitset_capacity(bitset);
  337|       |
  338|   776k|    if (IGRAPH_BIT_NSLOTS(capacity) <= IGRAPH_BIT_NSLOTS(current_capacity)) {
  ------------------
  |  |  161|   776k|#define IGRAPH_BIT_NSLOTS(nbits) ((nbits + IGRAPH_INTEGER_SIZE - (igraph_int_t)(1)) / IGRAPH_INTEGER_SIZE)
  |  |  ------------------
  |  |  |  |   32|   776k|#define IGRAPH_INTEGER_SIZE 64
  |  |  ------------------
  |  |               #define IGRAPH_BIT_NSLOTS(nbits) ((nbits + IGRAPH_INTEGER_SIZE - (igraph_int_t)(1)) / IGRAPH_INTEGER_SIZE)
  |  |  ------------------
  |  |  |  |   32|   776k|#define IGRAPH_INTEGER_SIZE 64
  |  |  ------------------
  ------------------
                  if (IGRAPH_BIT_NSLOTS(capacity) <= IGRAPH_BIT_NSLOTS(current_capacity)) {
  ------------------
  |  |  161|   776k|#define IGRAPH_BIT_NSLOTS(nbits) ((nbits + IGRAPH_INTEGER_SIZE - (igraph_int_t)(1)) / IGRAPH_INTEGER_SIZE)
  |  |  ------------------
  |  |  |  |   32|   776k|#define IGRAPH_INTEGER_SIZE 64
  |  |  ------------------
  |  |               #define IGRAPH_BIT_NSLOTS(nbits) ((nbits + IGRAPH_INTEGER_SIZE - (igraph_int_t)(1)) / IGRAPH_INTEGER_SIZE)
  |  |  ------------------
  |  |  |  |   32|   776k|#define IGRAPH_INTEGER_SIZE 64
  |  |  ------------------
  ------------------
  |  Branch (338:9): [True: 0, False: 776k]
  ------------------
  339|      0|        return IGRAPH_SUCCESS;
  340|      0|    }
  341|       |
  342|   776k|    tmp = IGRAPH_REALLOC(bitset->stor_begin, IGRAPH_BIT_NSLOTS(capacity), igraph_uint_t);
  ------------------
  |  |   35|   776k|#define IGRAPH_REALLOC(p,n,t) IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, realloc((void*)(p), sizeof(t) * ((n) > 0 ? (n) : 1)))
  |  |  ------------------
  |  |  |  |   31|  1.55M|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 776k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 776k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 776k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  343|   776k|    IGRAPH_CHECK_OOM(tmp, "Cannot reserve space for bitset.");
  ------------------
  |  |  709|   776k|    do { \
  |  |  710|   776k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|   776k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 776k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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|   776k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 776k]
  |  |  ------------------
  ------------------
  344|       |
  345|   776k|    bitset->stor_begin = tmp;
  346|   776k|    bitset->stor_end = bitset->stor_begin + IGRAPH_BIT_NSLOTS(capacity);
  ------------------
  |  |  161|   776k|#define IGRAPH_BIT_NSLOTS(nbits) ((nbits + IGRAPH_INTEGER_SIZE - (igraph_int_t)(1)) / IGRAPH_INTEGER_SIZE)
  |  |  ------------------
  |  |  |  |   32|   776k|#define IGRAPH_INTEGER_SIZE 64
  |  |  ------------------
  |  |               #define IGRAPH_BIT_NSLOTS(nbits) ((nbits + IGRAPH_INTEGER_SIZE - (igraph_int_t)(1)) / IGRAPH_INTEGER_SIZE)
  |  |  ------------------
  |  |  |  |   32|   776k|#define IGRAPH_INTEGER_SIZE 64
  |  |  ------------------
  ------------------
  347|       |
  348|   776k|    return IGRAPH_SUCCESS;
  349|   776k|}
igraph_bitset_resize:
  379|   776k|igraph_error_t igraph_bitset_resize(igraph_bitset_t *bitset, igraph_int_t new_size) {
  380|   776k|    IGRAPH_ASSERT(bitset != NULL);
  ------------------
  |  |  924|   776k|    do { \
  |  |  925|   776k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   776k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 776k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   776k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 776k]
  |  |  ------------------
  ------------------
  381|   776k|    IGRAPH_ASSERT(bitset->stor_begin != NULL);
  ------------------
  |  |  924|   776k|    do { \
  |  |  925|   776k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   776k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 776k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   776k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 776k]
  |  |  ------------------
  ------------------
  382|   776k|    IGRAPH_CHECK(igraph_bitset_reserve(bitset, new_size));
  ------------------
  |  |  656|   776k|    do { \
  |  |  657|   776k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   776k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   776k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 776k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   776k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 776k]
  |  |  ------------------
  ------------------
  383|       |
  384|   776k|    if (new_size > bitset->size) {
  ------------------
  |  Branch (384:9): [True: 776k, False: 0]
  ------------------
  385|   776k|        for (igraph_int_t i = bitset->size; i % IGRAPH_INTEGER_SIZE != 0; ++i) {
  ------------------
  |  |   32|   776k|#define IGRAPH_INTEGER_SIZE 64
  ------------------
  |  Branch (385:45): [True: 0, False: 776k]
  ------------------
  386|      0|            IGRAPH_BIT_CLEAR(*bitset, i);
  ------------------
  |  |  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
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  387|      0|        }
  388|   776k|        memset(bitset->stor_begin + IGRAPH_BIT_NSLOTS(bitset->size), 0,
  ------------------
  |  |  161|   776k|#define IGRAPH_BIT_NSLOTS(nbits) ((nbits + IGRAPH_INTEGER_SIZE - (igraph_int_t)(1)) / IGRAPH_INTEGER_SIZE)
  |  |  ------------------
  |  |  |  |   32|   776k|#define IGRAPH_INTEGER_SIZE 64
  |  |  ------------------
  |  |               #define IGRAPH_BIT_NSLOTS(nbits) ((nbits + IGRAPH_INTEGER_SIZE - (igraph_int_t)(1)) / IGRAPH_INTEGER_SIZE)
  |  |  ------------------
  |  |  |  |   32|   776k|#define IGRAPH_INTEGER_SIZE 64
  |  |  ------------------
  ------------------
  389|   776k|               sizeof(igraph_uint_t) * (IGRAPH_BIT_NSLOTS(new_size) - IGRAPH_BIT_NSLOTS(bitset->size)));
  ------------------
  |  |  161|   776k|#define IGRAPH_BIT_NSLOTS(nbits) ((nbits + IGRAPH_INTEGER_SIZE - (igraph_int_t)(1)) / IGRAPH_INTEGER_SIZE)
  |  |  ------------------
  |  |  |  |   32|   776k|#define IGRAPH_INTEGER_SIZE 64
  |  |  ------------------
  |  |               #define IGRAPH_BIT_NSLOTS(nbits) ((nbits + IGRAPH_INTEGER_SIZE - (igraph_int_t)(1)) / IGRAPH_INTEGER_SIZE)
  |  |  ------------------
  |  |  |  |   32|   776k|#define IGRAPH_INTEGER_SIZE 64
  |  |  ------------------
  ------------------
                             sizeof(igraph_uint_t) * (IGRAPH_BIT_NSLOTS(new_size) - IGRAPH_BIT_NSLOTS(bitset->size)));
  ------------------
  |  |  161|   776k|#define IGRAPH_BIT_NSLOTS(nbits) ((nbits + IGRAPH_INTEGER_SIZE - (igraph_int_t)(1)) / IGRAPH_INTEGER_SIZE)
  |  |  ------------------
  |  |  |  |   32|   776k|#define IGRAPH_INTEGER_SIZE 64
  |  |  ------------------
  |  |               #define IGRAPH_BIT_NSLOTS(nbits) ((nbits + IGRAPH_INTEGER_SIZE - (igraph_int_t)(1)) / IGRAPH_INTEGER_SIZE)
  |  |  ------------------
  |  |  |  |   32|   776k|#define IGRAPH_INTEGER_SIZE 64
  |  |  ------------------
  ------------------
  390|   776k|    }
  391|   776k|    bitset->size = new_size;
  392|       |
  393|   776k|    return IGRAPH_SUCCESS;
  394|   776k|}
igraph_bitset_popcount:
  410|   401k|igraph_int_t igraph_bitset_popcount(const igraph_bitset_t *bitset) {
  411|   401k|    const igraph_int_t final_block_size = bitset->size % IGRAPH_INTEGER_SIZE ? bitset->size % IGRAPH_INTEGER_SIZE : IGRAPH_INTEGER_SIZE;
  ------------------
  |  |   32|   401k|#define IGRAPH_INTEGER_SIZE 64
  ------------------
                  const igraph_int_t final_block_size = bitset->size % IGRAPH_INTEGER_SIZE ? bitset->size % IGRAPH_INTEGER_SIZE : IGRAPH_INTEGER_SIZE;
  ------------------
  |  |   32|   180k|#define IGRAPH_INTEGER_SIZE 64
  ------------------
                  const igraph_int_t final_block_size = bitset->size % IGRAPH_INTEGER_SIZE ? bitset->size % IGRAPH_INTEGER_SIZE : IGRAPH_INTEGER_SIZE;
  ------------------
  |  |   32|   220k|#define IGRAPH_INTEGER_SIZE 64
  ------------------
  |  Branch (411:43): [True: 180k, False: 220k]
  ------------------
  412|   401k|    const igraph_int_t slots = IGRAPH_BIT_NSLOTS(bitset->size);
  ------------------
  |  |  161|   401k|#define IGRAPH_BIT_NSLOTS(nbits) ((nbits + IGRAPH_INTEGER_SIZE - (igraph_int_t)(1)) / IGRAPH_INTEGER_SIZE)
  |  |  ------------------
  |  |  |  |   32|   401k|#define IGRAPH_INTEGER_SIZE 64
  |  |  ------------------
  |  |               #define IGRAPH_BIT_NSLOTS(nbits) ((nbits + IGRAPH_INTEGER_SIZE - (igraph_int_t)(1)) / IGRAPH_INTEGER_SIZE)
  |  |  ------------------
  |  |  |  |   32|   401k|#define IGRAPH_INTEGER_SIZE 64
  |  |  ------------------
  ------------------
  413|   401k|    const igraph_uint_t one = 1, zero = 0; /* to avoid the need to cast 1 and 0 to igraph_uint_t below */
  414|   401k|    const igraph_uint_t mask = final_block_size == IGRAPH_INTEGER_SIZE ? ~zero : ((one << final_block_size) - 1);
  ------------------
  |  |   32|   401k|#define IGRAPH_INTEGER_SIZE 64
  ------------------
  |  Branch (414:32): [True: 220k, False: 180k]
  ------------------
  415|   401k|    igraph_int_t count = 0;
  416|       |
  417|  1.53M|    for (igraph_int_t i = 0; i + 1 < slots; ++i) {
  ------------------
  |  Branch (417:30): [True: 1.13M, False: 401k]
  ------------------
  418|  1.13M|        count += IGRAPH_POPCOUNT(VECTOR(*bitset)[i]);
  ------------------
  |  |  217|  1.13M|    #define IGRAPH_POPCOUNT IGRAPH_I_POPCOUNT64
  |  |  ------------------
  |  |  |  |  168|  1.13M|    #define IGRAPH_I_POPCOUNT64(x) __builtin_popcountll(x)
  |  |  ------------------
  ------------------
  419|  1.13M|    }
  420|   401k|    if (bitset->size) {
  ------------------
  |  Branch (420:9): [True: 401k, False: 0]
  ------------------
  421|   401k|        count += IGRAPH_POPCOUNT(mask & VECTOR(*bitset)[slots - 1]);
  ------------------
  |  |  217|   401k|    #define IGRAPH_POPCOUNT IGRAPH_I_POPCOUNT64
  |  |  ------------------
  |  |  |  |  168|   401k|    #define IGRAPH_I_POPCOUNT64(x) __builtin_popcountll(x)
  |  |  ------------------
  ------------------
  422|   401k|    }
  423|       |
  424|   401k|    return count;
  425|   401k|}
igraph_bitset_or:
  667|  65.2k|                      const igraph_bitset_t *src1, const igraph_bitset_t *src2) {
  668|   309k|    for (igraph_int_t i = 0; i < IGRAPH_BIT_NSLOTS(dest->size); ++i) {
  ------------------
  |  |  161|   309k|#define IGRAPH_BIT_NSLOTS(nbits) ((nbits + IGRAPH_INTEGER_SIZE - (igraph_int_t)(1)) / IGRAPH_INTEGER_SIZE)
  |  |  ------------------
  |  |  |  |   32|   309k|#define IGRAPH_INTEGER_SIZE 64
  |  |  ------------------
  |  |               #define IGRAPH_BIT_NSLOTS(nbits) ((nbits + IGRAPH_INTEGER_SIZE - (igraph_int_t)(1)) / IGRAPH_INTEGER_SIZE)
  |  |  ------------------
  |  |  |  |   32|   309k|#define IGRAPH_INTEGER_SIZE 64
  |  |  ------------------
  ------------------
  |  Branch (668:30): [True: 244k, False: 65.2k]
  ------------------
  669|   244k|        VECTOR(*dest)[i] = VECTOR(*src1)[i] | VECTOR(*src2)[i];
  ------------------
  |  |   60|   244k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      VECTOR(*dest)[i] = VECTOR(*src1)[i] | VECTOR(*src2)[i];
  ------------------
  |  |   60|   244k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      VECTOR(*dest)[i] = VECTOR(*src1)[i] | VECTOR(*src2)[i];
  ------------------
  |  |   60|   244k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  670|   244k|    }
  671|  65.2k|}

bitset_list.c:igraph_i_bitset_list_init_item:
   37|   776k|) {
   38|   776k|    IGRAPH_UNUSED(list);
  ------------------
  |  |   30|   776k|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
   39|   776k|    return igraph_bitset_init(item, 0);
   40|   776k|}
bitset_list.c:igraph_i_bitset_list_destroy_item:
   48|   776k|static void igraph_i_bitset_list_destroy_item(igraph_bitset_t* item) {
   49|   776k|    igraph_bitset_destroy(item);
   50|   776k|}

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

IGRAPH_FINALLY_REAL:
  320|  2.96M|void IGRAPH_FINALLY_REAL(void (*func)(void*), void* ptr) {
  321|  2.96M|    int no = igraph_i_finally_stack_size;
  322|  2.96M|    if (no < 0) {
  ------------------
  |  Branch (322:9): [True: 0, False: 2.96M]
  ------------------
  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|  2.96M|    if (no >= (int) (sizeof(igraph_i_finally_stack) / sizeof(igraph_i_finally_stack[0]))) {
  ------------------
  |  Branch (327:9): [True: 0, False: 2.96M]
  ------------------
  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|  2.96M|    igraph_i_finally_stack[no].ptr = ptr;
  333|  2.96M|    igraph_i_finally_stack[no].func = func;
  334|  2.96M|    igraph_i_finally_stack[no].level = igraph_i_finally_stack_level;
  335|  2.96M|    igraph_i_finally_stack_size++;
  336|  2.96M|}
IGRAPH_FINALLY_CLEAN:
  338|  1.47M|void IGRAPH_FINALLY_CLEAN(int minus) {
  339|  1.47M|    igraph_i_finally_stack_size -= minus;
  340|  1.47M|    if (igraph_i_finally_stack_size < 0) {
  ------------------
  |  Branch (340:9): [True: 0, False: 1.47M]
  ------------------
  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|  1.47M|}
IGRAPH_FINALLY_STACK_SIZE:
  359|  2.06k|int IGRAPH_FINALLY_STACK_SIZE(void) {
  360|  2.06k|    return igraph_i_finally_stack_size;
  361|  2.06k|}
IGRAPH_FINALLY_ENTER:
  377|  9.04k|void IGRAPH_FINALLY_ENTER(void) {
  378|  9.04k|    int no = igraph_i_finally_stack_size;
  379|       |    /* Level indices must always be in increasing order in the finally stack */
  380|  9.04k|    if (no > 0 && igraph_i_finally_stack[no-1].level > igraph_i_finally_stack_level) {
  ------------------
  |  Branch (380:9): [True: 9.04k, False: 0]
  |  Branch (380:19): [True: 0, False: 9.04k]
  ------------------
  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|  9.04k|    igraph_i_finally_stack_level++;
  386|  9.04k|}
IGRAPH_FINALLY_EXIT:
  399|  9.04k|void IGRAPH_FINALLY_EXIT(void) {
  400|  9.04k|    igraph_i_finally_stack_level--;
  401|  9.04k|    if (igraph_i_finally_stack_level < 0) {
  ------------------
  |  Branch (401:9): [True: 0, False: 9.04k]
  ------------------
  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|  9.04k|}
igraph_set_warning_handler:
  514|  2.07k|igraph_warning_handler_t *igraph_set_warning_handler(igraph_warning_handler_t *new_handler) {
  515|  2.07k|    igraph_warning_handler_t *previous_handler = igraph_i_warning_handler;
  516|  2.07k|    igraph_i_warning_handler = new_handler;
  517|  2.07k|    return previous_handler;
  518|  2.07k|}

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

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

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

igraph_vector_int_list_init:
  109|  6.18k|igraph_error_t FUNCTION(init)(TYPE *v, igraph_int_t size) {
  110|  6.18k|    igraph_int_t alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (110:31): [True: 0, False: 6.18k]
  ------------------
  111|  6.18k|    IGRAPH_ASSERT(size >= 0);
  ------------------
  |  |  924|  6.18k|    do { \
  |  |  925|  6.18k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  6.18k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 6.18k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  6.18k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 6.18k]
  |  |  ------------------
  ------------------
  112|  6.18k|    v->stor_begin = IGRAPH_CALLOC(alloc_size, ITEM_TYPE);
  ------------------
  |  |   33|  6.18k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  12.3k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 6.18k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 6.18k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 6.18k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  113|  6.18k|    if (v->stor_begin == 0) {
  ------------------
  |  Branch (113:9): [True: 0, False: 6.18k]
  ------------------
  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|  6.18k|    v->stor_end = v->stor_begin + alloc_size;
  117|  6.18k|    v->end = v->stor_begin + size;
  118|       |
  119|  6.18k|    IGRAPH_CHECK(INTERNAL_FUNCTION(init_slice)(v, v->stor_begin, v->end));
  ------------------
  |  |  656|  6.18k|    do { \
  |  |  657|  6.18k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  6.18k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  6.18k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 6.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|  6.18k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 6.18k]
  |  |  ------------------
  ------------------
  120|       |
  121|  6.18k|    return IGRAPH_SUCCESS;
  122|  6.18k|}
igraph_vector_int_list_destroy:
  176|  6.18k|void FUNCTION(destroy)(TYPE *v) {
  177|  6.18k|    IGRAPH_ASSERT(v != 0);
  ------------------
  |  |  924|  6.18k|    do { \
  |  |  925|  6.18k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  6.18k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 6.18k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  6.18k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 6.18k]
  |  |  ------------------
  ------------------
  178|       |
  179|  6.18k|    if (v->stor_begin != 0) {
  ------------------
  |  Branch (179:9): [True: 6.18k, False: 0]
  ------------------
  180|  6.18k|        FUNCTION(clear)(v);
  ------------------
  |  |  136|  6.18k|        #define FUNCTION(c) CONCAT4(igraph_vector,SHORT,list,c)
  |  |  ------------------
  |  |  |  |   24|  6.18k|#define CONCAT4(a,b,c,d) CONCAT4x(a,b,c,d)
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|  6.18k|#define CONCAT4x(a,b,c,d) a ## _ ## b ## _ ## c ## _ ## d
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  181|  6.18k|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   36|  6.18k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  182|       |        v->stor_begin = NULL;
  183|  6.18k|    }
  184|  6.18k|}
igraph_vector_int_list_capacity:
  203|  15.1k|igraph_int_t FUNCTION(capacity)(const TYPE *v) {
  204|  15.1k|    return v->stor_end - v->stor_begin;
  205|  15.1k|}
igraph_vector_int_list_reserve:
  233|  15.1k|igraph_error_t FUNCTION(reserve)(TYPE *v, igraph_int_t capacity) {
  234|  15.1k|    igraph_int_t current_capacity;
  235|  15.1k|    ITEM_TYPE *tmp;
  ------------------
  |  |   31|  15.1k|    #define ITEM_TYPE BASE_VECTOR
  |  |  ------------------
  |  |  |  |   67|  15.1k|    #define BASE_VECTOR igraph_vector_int_t
  |  |  ------------------
  ------------------
  236|       |
  237|  15.1k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  15.1k|    do { \
  |  |  925|  15.1k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  15.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 15.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  15.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 15.1k]
  |  |  ------------------
  ------------------
  238|  15.1k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  15.1k|    do { \
  |  |  925|  15.1k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  15.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 15.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  15.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 15.1k]
  |  |  ------------------
  ------------------
  239|  15.1k|    IGRAPH_ASSERT(capacity >= 0);
  ------------------
  |  |  924|  15.1k|    do { \
  |  |  925|  15.1k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  15.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 15.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  15.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 15.1k]
  |  |  ------------------
  ------------------
  240|       |
  241|  15.1k|    current_capacity = FUNCTION(capacity)(v);
  ------------------
  |  |  136|  15.1k|        #define FUNCTION(c) CONCAT4(igraph_vector,SHORT,list,c)
  |  |  ------------------
  |  |  |  |   24|  15.1k|#define CONCAT4(a,b,c,d) CONCAT4x(a,b,c,d)
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|  15.1k|#define CONCAT4x(a,b,c,d) a ## _ ## b ## _ ## c ## _ ## d
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  242|       |
  243|  15.1k|    if (capacity <= current_capacity) {
  ------------------
  |  Branch (243:9): [True: 3.61k, False: 11.4k]
  ------------------
  244|  3.61k|        return IGRAPH_SUCCESS;
  245|  3.61k|    }
  246|       |
  247|  11.4k|    tmp = IGRAPH_REALLOC(v->stor_begin, capacity, ITEM_TYPE);
  ------------------
  |  |   35|  11.4k|#define IGRAPH_REALLOC(p,n,t) IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, realloc((void*)(p), sizeof(t) * ((n) > 0 ? (n) : 1)))
  |  |  ------------------
  |  |  |  |   31|  22.9k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 11.4k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 11.4k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 11.4k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  248|  11.4k|    IGRAPH_CHECK_OOM(tmp, "Cannot reserve space for list.");
  ------------------
  |  |  709|  11.4k|    do { \
  |  |  710|  11.4k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  11.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 11.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|  11.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 11.4k]
  |  |  ------------------
  ------------------
  249|       |
  250|  11.4k|    v->end = tmp + (v->end - v->stor_begin);
  251|  11.4k|    v->stor_begin = tmp;
  252|  11.4k|    v->stor_end = v->stor_begin + capacity;
  253|       |
  254|  11.4k|    return IGRAPH_SUCCESS;
  255|  11.4k|}
igraph_vector_int_list_size:
  287|   197k|igraph_int_t FUNCTION(size)(const TYPE *v) {
  288|   197k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|   197k|    do { \
  |  |  925|   197k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   197k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 197k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   197k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 197k]
  |  |  ------------------
  ------------------
  289|   197k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|   197k|    do { \
  |  |  925|   197k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   197k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 197k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   197k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 197k]
  |  |  ------------------
  ------------------
  290|   197k|    return v->end - v->stor_begin;
  291|   197k|}
igraph_vector_int_list_clear:
  357|  12.3k|void FUNCTION(clear)(TYPE *v) {
  358|  12.3k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  12.3k|    do { \
  |  |  925|  12.3k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  12.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 12.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  359|  12.3k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  12.3k|    do { \
  |  |  925|  12.3k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  12.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 12.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  360|  12.3k|    INTERNAL_FUNCTION(destroy_slice)(v, v->stor_begin, v->end);
  ------------------
  |  |  137|  12.3k|        #define INTERNAL_FUNCTION(c) CONCAT4(igraph_i_vector,SHORT,list,c)
  |  |  ------------------
  |  |  |  |   24|  12.3k|#define CONCAT4(a,b,c,d) CONCAT4x(a,b,c,d)
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|  12.3k|#define CONCAT4x(a,b,c,d) a ## _ ## b ## _ ## c ## _ ## d
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  361|  12.3k|    v->end = v->stor_begin;
  362|  12.3k|}
igraph_vector_int_list_get_ptr:
  377|   816k|ITEM_TYPE *FUNCTION(get_ptr)(const TYPE *v, igraph_int_t pos) {
  378|   816k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|   816k|    do { \
  |  |  925|   816k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   816k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 816k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   816k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 816k]
  |  |  ------------------
  ------------------
  379|   816k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|   816k|    do { \
  |  |  925|   816k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   816k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 816k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   816k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 816k]
  |  |  ------------------
  ------------------
  380|   816k|    return v->stor_begin + pos;
  381|   816k|}
igraph_vector_int_list_push_back:
  587|   797k|igraph_error_t FUNCTION(push_back)(TYPE *v, ITEM_TYPE *e) {
  588|   797k|    IGRAPH_CHECK(INTERNAL_FUNCTION(expand_if_full)(v));
  ------------------
  |  |  656|   797k|    do { \
  |  |  657|   797k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   797k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   797k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 797k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   797k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 797k]
  |  |  ------------------
  ------------------
  589|   797k|    *(v->end) = *e;
  590|   797k|    v->end += 1;
  591|   797k|    return IGRAPH_SUCCESS;
  592|   797k|}
igraph_vector_int_list_push_back_copy:
  612|  86.0k|igraph_error_t FUNCTION(push_back_copy)(TYPE *v, const ITEM_TYPE *e) {
  613|  86.0k|    ITEM_TYPE copy;
  ------------------
  |  |   31|  86.0k|    #define ITEM_TYPE BASE_VECTOR
  |  |  ------------------
  |  |  |  |   67|  86.0k|    #define BASE_VECTOR igraph_vector_int_t
  |  |  ------------------
  ------------------
  614|  86.0k|    IGRAPH_CHECK(INTERNAL_FUNCTION(copy_item)(&copy, e));
  ------------------
  |  |  656|  86.0k|    do { \
  |  |  657|  86.0k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  86.0k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  86.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 86.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|  86.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 86.0k]
  |  |  ------------------
  ------------------
  615|  86.0k|    IGRAPH_FINALLY(INTERNAL_FUNCTION(destroy_item), &copy);
  ------------------
  |  |  603|  86.0k|    do { \
  |  |  604|  86.0k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  86.0k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  86.0k|         * incorrect destructor function with the pointer */ \
  |  |  607|  86.0k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 86.0k]
  |  |  ------------------
  |  |  608|  86.0k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  86.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 86.0k]
  |  |  ------------------
  ------------------
  616|  86.0k|    IGRAPH_CHECK(FUNCTION(push_back)(v, &copy));
  ------------------
  |  |  656|  86.0k|    do { \
  |  |  657|  86.0k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  86.0k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  86.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 86.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|  86.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 86.0k]
  |  |  ------------------
  ------------------
  617|  86.0k|    IGRAPH_FINALLY_CLEAN(1);
  618|  86.0k|    return IGRAPH_SUCCESS;
  619|  86.0k|}
igraph_vector_int_list_insert:
  669|  33.9k|igraph_error_t FUNCTION(insert)(TYPE *v, igraph_int_t pos, ITEM_TYPE *e) {
  670|  33.9k|    igraph_int_t size = FUNCTION(size)(v);
  ------------------
  |  |  136|  33.9k|        #define FUNCTION(c) CONCAT4(igraph_vector,SHORT,list,c)
  |  |  ------------------
  |  |  |  |   24|  33.9k|#define CONCAT4(a,b,c,d) CONCAT4x(a,b,c,d)
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|  33.9k|#define CONCAT4x(a,b,c,d) a ## _ ## b ## _ ## c ## _ ## d
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  671|  33.9k|    IGRAPH_ASSERT(0 <= pos && pos <= size);
  ------------------
  |  |  924|  33.9k|    do { \
  |  |  925|  33.9k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  67.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 33.9k]
  |  |  |  |  |  Branch (612:52): [True: 33.9k, False: 0]
  |  |  |  |  |  Branch (612:52): [True: 33.9k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  33.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 33.9k]
  |  |  ------------------
  ------------------
  672|  33.9k|    IGRAPH_CHECK(INTERNAL_FUNCTION(expand_if_full)(v));
  ------------------
  |  |  656|  33.9k|    do { \
  |  |  657|  33.9k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  33.9k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  33.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 33.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|  33.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 33.9k]
  |  |  ------------------
  ------------------
  673|  33.9k|    if (pos < size) {
  ------------------
  |  Branch (673:9): [True: 14.3k, False: 19.5k]
  ------------------
  674|  14.3k|        memmove(v->stor_begin + pos + 1, v->stor_begin + pos, sizeof(ITEM_TYPE) * (size - pos));
  675|  14.3k|    }
  676|  33.9k|    v->end += 1;
  677|  33.9k|    v->stor_begin[pos] = *e;
  678|  33.9k|    return IGRAPH_SUCCESS;
  679|  33.9k|}
igraph_vector_int_list_sort:
  915|  2.06k|void FUNCTION(sort)(TYPE *v, int (*cmp)(const ITEM_TYPE*, const ITEM_TYPE*)) {
  916|  2.06k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  2.06k|    do { \
  |  |  925|  2.06k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  917|  2.06k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  2.06k|    do { \
  |  |  925|  2.06k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  918|  2.06k|    igraph_qsort(
  919|  2.06k|        v->stor_begin, FUNCTION(size)(v), sizeof(ITEM_TYPE),
  ------------------
  |  |  136|  2.06k|        #define FUNCTION(c) CONCAT4(igraph_vector,SHORT,list,c)
  |  |  ------------------
  |  |  |  |   24|  2.06k|#define CONCAT4(a,b,c,d) CONCAT4x(a,b,c,d)
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|  2.06k|#define CONCAT4x(a,b,c,d) a ## _ ## b ## _ ## c ## _ ## d
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  920|  2.06k|        (int(*)(const void*, const void*))cmp
  921|  2.06k|    );
  922|  2.06k|}
igraph_vector_int_list_remove_consecutive_duplicates:
 1004|  2.06k|) {
 1005|  2.06k|    igraph_int_t i, j, n = FUNCTION(size)(v);
  ------------------
  |  |  136|  2.06k|        #define FUNCTION(c) CONCAT4(igraph_vector,SHORT,list,c)
  |  |  ------------------
  |  |  |  |   24|  2.06k|#define CONCAT4(a,b,c,d) CONCAT4x(a,b,c,d)
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|  2.06k|#define CONCAT4x(a,b,c,d) a ## _ ## b ## _ ## c ## _ ## d
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1006|  2.06k|    ITEM_TYPE *p = v->stor_begin;
  ------------------
  |  |   31|  2.06k|    #define ITEM_TYPE BASE_VECTOR
  |  |  ------------------
  |  |  |  |   67|  2.06k|    #define BASE_VECTOR igraph_vector_int_t
  |  |  ------------------
  ------------------
 1007|       |
 1008|  2.06k|    if (n < 2) {
  ------------------
  |  Branch (1008:9): [True: 687, False: 1.37k]
  ------------------
 1009|    687|        return;
 1010|    687|    }
 1011|       |
 1012|   677k|    for (i=0, j=0; i < n-1; ++i) {
  ------------------
  |  Branch (1012:20): [True: 675k, False: 1.37k]
  ------------------
 1013|   675k|        if (eq(&p[i], &p[i+1])) {
  ------------------
  |  Branch (1013:13): [True: 570k, False: 105k]
  ------------------
 1014|   570k|            INTERNAL_FUNCTION(destroy_item)(&p[i]);
  ------------------
  |  |  137|   570k|        #define INTERNAL_FUNCTION(c) CONCAT4(igraph_i_vector,SHORT,list,c)
  |  |  ------------------
  |  |  |  |   24|   570k|#define CONCAT4(a,b,c,d) CONCAT4x(a,b,c,d)
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|   570k|#define CONCAT4x(a,b,c,d) a ## _ ## b ## _ ## c ## _ ## d
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1015|   570k|        } else {
 1016|   105k|            p[j++] = p[i];
 1017|   105k|        }
 1018|   675k|    }
 1019|  1.37k|    p[j++] = p[n-1];
 1020|       |
 1021|  1.37k|    v->end = p + j;
 1022|  1.37k|}
vector_list.c:igraph_i_vector_int_list_copy_item:
 1056|  86.0k|static igraph_error_t INTERNAL_FUNCTION(copy_item)(ITEM_TYPE *dest, const ITEM_TYPE *source) {
 1057|  86.0k|    return ITEM_FUNCTION(init_copy)(dest, source);
  ------------------
  |  |   42|  86.0k|        #define ITEM_FUNCTION(f) CONCAT3(igraph_vector,SHORT,f)
  |  |  ------------------
  |  |  |  |   22|  86.0k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  86.0k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1058|  86.0k|}
vector_list.c:igraph_i_vector_int_list_destroy_item:
 1060|   831k|static void INTERNAL_FUNCTION(destroy_item)(ITEM_TYPE *item) {
 1061|   831k|    ITEM_FUNCTION(destroy)(item);
  ------------------
  |  |   42|   831k|        #define ITEM_FUNCTION(f) CONCAT3(igraph_vector,SHORT,f)
  |  |  ------------------
  |  |  |  |   22|   831k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|   831k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1062|   831k|}
vector_list.c:igraph_i_vector_int_list_init_slice:
 1068|  6.18k|static igraph_error_t INTERNAL_FUNCTION(init_slice)(const TYPE *list, ITEM_TYPE *start, ITEM_TYPE *end) {
 1069|  6.18k|    ITEM_TYPE *current;
  ------------------
  |  |   31|  6.18k|    #define ITEM_TYPE BASE_VECTOR
  |  |  ------------------
  |  |  |  |   67|  6.18k|    #define BASE_VECTOR igraph_vector_int_t
  |  |  ------------------
  ------------------
 1070|  6.18k|    igraph_error_t retval;
 1071|       |
 1072|  6.18k|    for (current = start; current < end; current++) {
  ------------------
  |  Branch (1072:27): [True: 0, False: 6.18k]
  ------------------
 1073|      0|        retval = INTERNAL_FUNCTION(init_item)(list, 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
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1074|      0|        if (retval) {
  ------------------
  |  Branch (1074:13): [True: 0, False: 0]
  ------------------
 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|      0|    }
 1079|       |
 1080|  6.18k|    return IGRAPH_SUCCESS;
 1081|  6.18k|}
vector_list.c:igraph_i_vector_int_list_destroy_slice:
 1083|  12.3k|static void INTERNAL_FUNCTION(destroy_slice)(const TYPE *list, ITEM_TYPE *start, ITEM_TYPE *end) {
 1084|  12.3k|    IGRAPH_UNUSED(list);
  ------------------
  |  |   30|  12.3k|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
 1085|   273k|    for (; start < end; start++) {
  ------------------
  |  Branch (1085:12): [True: 261k, False: 12.3k]
  ------------------
 1086|   261k|        INTERNAL_FUNCTION(destroy_item)(start);
  ------------------
  |  |  137|   261k|        #define INTERNAL_FUNCTION(c) CONCAT4(igraph_i_vector,SHORT,list,c)
  |  |  ------------------
  |  |  |  |   24|   261k|#define CONCAT4(a,b,c,d) CONCAT4x(a,b,c,d)
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|   261k|#define CONCAT4x(a,b,c,d) a ## _ ## b ## _ ## c ## _ ## d
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1087|   261k|    }
 1088|  12.3k|}
vector_list.c:igraph_i_vector_int_list_expand_if_full:
 1094|   831k|static igraph_error_t INTERNAL_FUNCTION(expand_if_full)(TYPE *v) {
 1095|   831k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|   831k|    do { \
  |  |  925|   831k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   831k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 831k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   831k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 831k]
  |  |  ------------------
  ------------------
 1096|   831k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|   831k|    do { \
  |  |  925|   831k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   831k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 831k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   831k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 831k]
  |  |  ------------------
  ------------------
 1097|       |
 1098|   831k|    if (v->stor_end == v->end) {
  ------------------
  |  Branch (1098:9): [True: 8.91k, False: 822k]
  ------------------
 1099|  8.91k|        igraph_int_t old_size = FUNCTION(size)(v);
  ------------------
  |  |  136|  8.91k|        #define FUNCTION(c) CONCAT4(igraph_vector,SHORT,list,c)
  |  |  ------------------
  |  |  |  |   24|  8.91k|#define CONCAT4(a,b,c,d) CONCAT4x(a,b,c,d)
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|  8.91k|#define CONCAT4x(a,b,c,d) a ## _ ## b ## _ ## c ## _ ## d
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1100|  8.91k|        igraph_int_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   72|  8.91k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
                      igraph_int_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   72|  8.91k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (1100:33): [True: 8.91k, False: 0]
  ------------------
 1101|  8.91k|        if (old_size == IGRAPH_INTEGER_MAX) {
  ------------------
  |  |   72|  8.91k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (1101:13): [True: 0, False: 8.91k]
  ------------------
 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|  8.91k|        if (new_size == 0) {
  ------------------
  |  Branch (1104:13): [True: 0, False: 8.91k]
  ------------------
 1105|      0|            new_size = 1;
 1106|      0|        }
 1107|  8.91k|        IGRAPH_CHECK(FUNCTION(reserve)(v, new_size));
  ------------------
  |  |  656|  8.91k|    do { \
  |  |  657|  8.91k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  8.91k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  8.91k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 8.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|  8.91k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 8.91k]
  |  |  ------------------
  ------------------
 1108|  8.91k|    }
 1109|       |
 1110|   831k|    return IGRAPH_SUCCESS;
 1111|   831k|}
igraph_bitset_list_init:
  109|  4.12k|igraph_error_t FUNCTION(init)(TYPE *v, igraph_int_t size) {
  110|  4.12k|    igraph_int_t alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (110:31): [True: 0, False: 4.12k]
  ------------------
  111|  4.12k|    IGRAPH_ASSERT(size >= 0);
  ------------------
  |  |  924|  4.12k|    do { \
  |  |  925|  4.12k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.12k]
  |  |  ------------------
  ------------------
  112|  4.12k|    v->stor_begin = IGRAPH_CALLOC(alloc_size, ITEM_TYPE);
  ------------------
  |  |   33|  4.12k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  8.24k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 4.12k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 4.12k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 4.12k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  113|  4.12k|    if (v->stor_begin == 0) {
  ------------------
  |  Branch (113:9): [True: 0, False: 4.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|  4.12k|    v->stor_end = v->stor_begin + alloc_size;
  117|  4.12k|    v->end = v->stor_begin + size;
  118|       |
  119|  4.12k|    IGRAPH_CHECK(INTERNAL_FUNCTION(init_slice)(v, v->stor_begin, v->end));
  ------------------
  |  |  656|  4.12k|    do { \
  |  |  657|  4.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.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|  4.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.12k]
  |  |  ------------------
  ------------------
  120|       |
  121|  4.12k|    return IGRAPH_SUCCESS;
  122|  4.12k|}
igraph_bitset_list_destroy:
  176|  4.12k|void FUNCTION(destroy)(TYPE *v) {
  177|  4.12k|    IGRAPH_ASSERT(v != 0);
  ------------------
  |  |  924|  4.12k|    do { \
  |  |  925|  4.12k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.12k]
  |  |  ------------------
  ------------------
  178|       |
  179|  4.12k|    if (v->stor_begin != 0) {
  ------------------
  |  Branch (179:9): [True: 4.12k, False: 0]
  ------------------
  180|  4.12k|        FUNCTION(clear)(v);
  ------------------
  |  |  165|  4.12k|    #define FUNCTION(c) CONCAT2x(igraph_bitset_list,c)
  |  |  ------------------
  |  |  |  |   19|  4.12k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
  181|  4.12k|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   36|  4.12k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  182|       |        v->stor_begin = NULL;
  183|  4.12k|    }
  184|  4.12k|}
igraph_bitset_list_capacity:
  203|  4.12k|igraph_int_t FUNCTION(capacity)(const TYPE *v) {
  204|  4.12k|    return v->stor_end - v->stor_begin;
  205|  4.12k|}
igraph_bitset_list_reserve:
  233|  4.12k|igraph_error_t FUNCTION(reserve)(TYPE *v, igraph_int_t capacity) {
  234|  4.12k|    igraph_int_t current_capacity;
  235|  4.12k|    ITEM_TYPE *tmp;
  ------------------
  |  |   61|  4.12k|    #define ITEM_TYPE BASE
  |  |  ------------------
  |  |  |  |  118|  4.12k|    #define BASE igraph_bitset_t
  |  |  ------------------
  ------------------
  236|       |
  237|  4.12k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  4.12k|    do { \
  |  |  925|  4.12k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.12k]
  |  |  ------------------
  ------------------
  238|  4.12k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  4.12k|    do { \
  |  |  925|  4.12k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.12k]
  |  |  ------------------
  ------------------
  239|  4.12k|    IGRAPH_ASSERT(capacity >= 0);
  ------------------
  |  |  924|  4.12k|    do { \
  |  |  925|  4.12k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.12k]
  |  |  ------------------
  ------------------
  240|       |
  241|  4.12k|    current_capacity = FUNCTION(capacity)(v);
  ------------------
  |  |  165|  4.12k|    #define FUNCTION(c) CONCAT2x(igraph_bitset_list,c)
  |  |  ------------------
  |  |  |  |   19|  4.12k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
  242|       |
  243|  4.12k|    if (capacity <= current_capacity) {
  ------------------
  |  Branch (243:9): [True: 120, False: 4.00k]
  ------------------
  244|    120|        return IGRAPH_SUCCESS;
  245|    120|    }
  246|       |
  247|  4.00k|    tmp = IGRAPH_REALLOC(v->stor_begin, capacity, ITEM_TYPE);
  ------------------
  |  |   35|  4.00k|#define IGRAPH_REALLOC(p,n,t) IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, realloc((void*)(p), sizeof(t) * ((n) > 0 ? (n) : 1)))
  |  |  ------------------
  |  |  |  |   31|  8.00k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 4.00k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 4.00k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 4.00k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  248|  4.00k|    IGRAPH_CHECK_OOM(tmp, "Cannot reserve space for list.");
  ------------------
  |  |  709|  4.00k|    do { \
  |  |  710|  4.00k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  4.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.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|  4.00k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 4.00k]
  |  |  ------------------
  ------------------
  249|       |
  250|  4.00k|    v->end = tmp + (v->end - v->stor_begin);
  251|  4.00k|    v->stor_begin = tmp;
  252|  4.00k|    v->stor_end = v->stor_begin + capacity;
  253|       |
  254|  4.00k|    return IGRAPH_SUCCESS;
  255|  4.00k|}
igraph_bitset_list_size:
  287|  4.12k|igraph_int_t FUNCTION(size)(const TYPE *v) {
  288|  4.12k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  4.12k|    do { \
  |  |  925|  4.12k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.12k]
  |  |  ------------------
  ------------------
  289|  4.12k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  4.12k|    do { \
  |  |  925|  4.12k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.12k]
  |  |  ------------------
  ------------------
  290|  4.12k|    return v->end - v->stor_begin;
  291|  4.12k|}
igraph_bitset_list_resize:
  324|  4.12k|igraph_error_t FUNCTION(resize)(TYPE *v, igraph_int_t new_size) {
  325|  4.12k|    igraph_int_t old_size;
  326|       |
  327|  4.12k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  4.12k|    do { \
  |  |  925|  4.12k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.12k]
  |  |  ------------------
  ------------------
  328|  4.12k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  4.12k|    do { \
  |  |  925|  4.12k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.12k]
  |  |  ------------------
  ------------------
  329|       |
  330|  4.12k|    IGRAPH_CHECK(FUNCTION(reserve)(v, new_size));
  ------------------
  |  |  656|  4.12k|    do { \
  |  |  657|  4.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.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|  4.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.12k]
  |  |  ------------------
  ------------------
  331|       |
  332|  4.12k|    old_size = FUNCTION(size)(v);
  ------------------
  |  |  165|  4.12k|    #define FUNCTION(c) CONCAT2x(igraph_bitset_list,c)
  |  |  ------------------
  |  |  |  |   19|  4.12k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
  333|       |
  334|  4.12k|    if (old_size < new_size) {
  ------------------
  |  Branch (334:9): [True: 4.12k, False: 2]
  ------------------
  335|  4.12k|        IGRAPH_CHECK(INTERNAL_FUNCTION(init_slice)(v, v->stor_begin + old_size, v->stor_begin + new_size));
  ------------------
  |  |  656|  4.12k|    do { \
  |  |  657|  4.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.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|  4.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.12k]
  |  |  ------------------
  ------------------
  336|  4.12k|    } else if (old_size > new_size) {
  ------------------
  |  Branch (336:16): [True: 0, False: 2]
  ------------------
  337|      0|        INTERNAL_FUNCTION(destroy_slice)(v, v->stor_begin + new_size, v->stor_begin + old_size);
  ------------------
  |  |  166|      0|    #define INTERNAL_FUNCTION(c) CONCAT2x(igraph_i_bitset_list,c)
  |  |  ------------------
  |  |  |  |   19|      0|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
  338|      0|    }
  339|       |
  340|  4.12k|    v->end = v->stor_begin + new_size;
  341|       |
  342|  4.12k|    return IGRAPH_SUCCESS;
  343|  4.12k|}
igraph_bitset_list_clear:
  357|  4.12k|void FUNCTION(clear)(TYPE *v) {
  358|  4.12k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  4.12k|    do { \
  |  |  925|  4.12k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.12k]
  |  |  ------------------
  ------------------
  359|  4.12k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  4.12k|    do { \
  |  |  925|  4.12k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.12k]
  |  |  ------------------
  ------------------
  360|  4.12k|    INTERNAL_FUNCTION(destroy_slice)(v, v->stor_begin, v->end);
  ------------------
  |  |  166|  4.12k|    #define INTERNAL_FUNCTION(c) CONCAT2x(igraph_i_bitset_list,c)
  |  |  ------------------
  |  |  |  |   19|  4.12k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
  361|  4.12k|    v->end = v->stor_begin;
  362|  4.12k|}
igraph_bitset_list_get_ptr:
  377|  3.22M|ITEM_TYPE *FUNCTION(get_ptr)(const TYPE *v, igraph_int_t pos) {
  378|  3.22M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  3.22M|    do { \
  |  |  925|  3.22M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  3.22M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.22M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  3.22M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 3.22M]
  |  |  ------------------
  ------------------
  379|  3.22M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  3.22M|    do { \
  |  |  925|  3.22M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  3.22M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.22M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  3.22M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 3.22M]
  |  |  ------------------
  ------------------
  380|  3.22M|    return v->stor_begin + pos;
  381|  3.22M|}
bitset_list.c:igraph_i_bitset_list_init_slice:
 1068|  8.24k|static igraph_error_t INTERNAL_FUNCTION(init_slice)(const TYPE *list, ITEM_TYPE *start, ITEM_TYPE *end) {
 1069|  8.24k|    ITEM_TYPE *current;
  ------------------
  |  |   61|  8.24k|    #define ITEM_TYPE BASE
  |  |  ------------------
  |  |  |  |  118|  8.24k|    #define BASE igraph_bitset_t
  |  |  ------------------
  ------------------
 1070|  8.24k|    igraph_error_t retval;
 1071|       |
 1072|   784k|    for (current = start; current < end; current++) {
  ------------------
  |  Branch (1072:27): [True: 776k, False: 8.24k]
  ------------------
 1073|   776k|        retval = INTERNAL_FUNCTION(init_item)(list, current);
  ------------------
  |  |  166|   776k|    #define INTERNAL_FUNCTION(c) CONCAT2x(igraph_i_bitset_list,c)
  |  |  ------------------
  |  |  |  |   19|   776k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
 1074|   776k|        if (retval) {
  ------------------
  |  Branch (1074:13): [True: 0, False: 776k]
  ------------------
 1075|      0|            INTERNAL_FUNCTION(destroy_slice)(list, start, current);
  ------------------
  |  |  166|      0|    #define INTERNAL_FUNCTION(c) CONCAT2x(igraph_i_bitset_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|   776k|    }
 1079|       |
 1080|  8.24k|    return IGRAPH_SUCCESS;
 1081|  8.24k|}
bitset_list.c:igraph_i_bitset_list_destroy_slice:
 1083|  4.12k|static void INTERNAL_FUNCTION(destroy_slice)(const TYPE *list, ITEM_TYPE *start, ITEM_TYPE *end) {
 1084|  4.12k|    IGRAPH_UNUSED(list);
  ------------------
  |  |   30|  4.12k|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
 1085|   780k|    for (; start < end; start++) {
  ------------------
  |  Branch (1085:12): [True: 776k, False: 4.12k]
  ------------------
 1086|   776k|        INTERNAL_FUNCTION(destroy_item)(start);
  ------------------
  |  |  166|   776k|    #define INTERNAL_FUNCTION(c) CONCAT2x(igraph_i_bitset_list,c)
  |  |  ------------------
  |  |  |  |   19|   776k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
 1087|   776k|    }
 1088|  4.12k|}

igraph_vector_int_pair_order:
  119|  27.0k|                                       igraph_vector_int_t* res, igraph_int_t nodes) {
  120|  27.0k|    igraph_int_t edges = igraph_vector_int_size(v);
  121|  27.0k|    igraph_vector_int_t ptr;
  122|  27.0k|    igraph_vector_int_t rad;
  123|  27.0k|    igraph_int_t i, j;
  124|       |
  125|  27.0k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  27.0k|    do { \
  |  |  925|  27.0k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  27.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 27.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  27.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 27.0k]
  |  |  ------------------
  ------------------
  126|  27.0k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  27.0k|    do { \
  |  |  925|  27.0k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  27.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 27.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  27.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 27.0k]
  |  |  ------------------
  ------------------
  127|       |
  128|  27.0k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&ptr, nodes + 1);
  ------------------
  |  |  119|  27.0k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  27.0k|    do { \
  |  |  |  |  657|  27.0k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  27.0k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  27.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 27.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|  27.0k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 27.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  27.0k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  27.0k|    do { \
  |  |  |  |  604|  27.0k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  27.0k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  27.0k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  27.0k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 27.0k]
  |  |  |  |  ------------------
  |  |  |  |  608|  27.0k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  27.0k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 27.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 27.0k]
  |  |  ------------------
  ------------------
  129|  27.0k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&rad, edges);
  ------------------
  |  |  119|  27.0k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  27.0k|    do { \
  |  |  |  |  657|  27.0k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  27.0k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  27.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 27.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|  27.0k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 27.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  27.0k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  27.0k|    do { \
  |  |  |  |  604|  27.0k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  27.0k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  27.0k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  27.0k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 27.0k]
  |  |  |  |  ------------------
  |  |  |  |  608|  27.0k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  27.0k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 27.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 27.0k]
  |  |  ------------------
  ------------------
  130|  27.0k|    IGRAPH_CHECK(igraph_vector_int_resize(res, edges));
  ------------------
  |  |  656|  27.0k|    do { \
  |  |  657|  27.0k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  27.0k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  27.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 27.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|  27.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 27.0k]
  |  |  ------------------
  ------------------
  131|       |
  132|  2.72M|    for (i = 0; i < edges; i++) {
  ------------------
  |  Branch (132:17): [True: 2.69M, False: 27.0k]
  ------------------
  133|  2.69M|        igraph_int_t radix = VECTOR(*v2)[i];
  ------------------
  |  |   60|  2.69M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  134|  2.69M|        if (VECTOR(ptr)[radix] != 0) {
  ------------------
  |  |   60|  2.69M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (134:13): [True: 2.39M, False: 304k]
  ------------------
  135|  2.39M|            VECTOR(rad)[i] = VECTOR(ptr)[radix];
  ------------------
  |  |   60|  2.39M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(rad)[i] = VECTOR(ptr)[radix];
  ------------------
  |  |   60|  2.39M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  136|  2.39M|        }
  137|  2.69M|        VECTOR(ptr)[radix] = i + 1;
  ------------------
  |  |   60|  2.69M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  138|  2.69M|    }
  139|       |
  140|  27.0k|    j = 0;
  141|  4.02M|    for (i = 0; i < nodes + 1; i++) {
  ------------------
  |  Branch (141:17): [True: 3.99M, False: 27.0k]
  ------------------
  142|  3.99M|        if (VECTOR(ptr)[i] != 0) {
  ------------------
  |  |   60|  3.99M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (142:13): [True: 304k, False: 3.69M]
  ------------------
  143|   304k|            igraph_int_t next = VECTOR(ptr)[i] - 1;
  ------------------
  |  |   60|   304k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  144|   304k|            VECTOR(*res)[j++] = next;
  ------------------
  |  |   60|   304k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  145|  2.69M|            while (VECTOR(rad)[next] != 0) {
  ------------------
  |  |   60|  2.69M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (145:20): [True: 2.39M, False: 304k]
  ------------------
  146|  2.39M|                next = VECTOR(rad)[next] - 1;
  ------------------
  |  |   60|  2.39M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  147|  2.39M|                VECTOR(*res)[j++] = next;
  ------------------
  |  |   60|  2.39M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  148|  2.39M|            }
  149|   304k|        }
  150|  3.99M|    }
  151|       |
  152|  27.0k|    igraph_vector_int_null(&ptr);
  153|  27.0k|    igraph_vector_int_null(&rad);
  154|       |
  155|  2.72M|    for (i = 0; i < edges; i++) {
  ------------------
  |  Branch (155:17): [True: 2.69M, False: 27.0k]
  ------------------
  156|  2.69M|        igraph_int_t edge = VECTOR(*res)[edges - i - 1];
  ------------------
  |  |   60|  2.69M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  157|  2.69M|        igraph_int_t radix = VECTOR(*v)[edge];
  ------------------
  |  |   60|  2.69M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  158|  2.69M|        if (VECTOR(ptr)[radix] != 0) {
  ------------------
  |  |   60|  2.69M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (158:13): [True: 2.39M, False: 304k]
  ------------------
  159|  2.39M|            VECTOR(rad)[edge] = VECTOR(ptr)[radix];
  ------------------
  |  |   60|  2.39M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(rad)[edge] = VECTOR(ptr)[radix];
  ------------------
  |  |   60|  2.39M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  160|  2.39M|        }
  161|  2.69M|        VECTOR(ptr)[radix] = edge + 1;
  ------------------
  |  |   60|  2.69M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  162|  2.69M|    }
  163|       |
  164|  27.0k|    j = 0;
  165|  4.02M|    for (i = 0; i < nodes + 1; i++) {
  ------------------
  |  Branch (165:17): [True: 3.99M, False: 27.0k]
  ------------------
  166|  3.99M|        if (VECTOR(ptr)[i] != 0) {
  ------------------
  |  |   60|  3.99M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (166:13): [True: 304k, False: 3.69M]
  ------------------
  167|   304k|            igraph_int_t next = VECTOR(ptr)[i] - 1;
  ------------------
  |  |   60|   304k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  168|   304k|            VECTOR(*res)[j++] = next;
  ------------------
  |  |   60|   304k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  169|  2.69M|            while (VECTOR(rad)[next] != 0) {
  ------------------
  |  |   60|  2.69M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (169:20): [True: 2.39M, False: 304k]
  ------------------
  170|  2.39M|                next = VECTOR(rad)[next] - 1;
  ------------------
  |  |   60|  2.39M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  171|  2.39M|                VECTOR(*res)[j++] = next;
  ------------------
  |  |   60|  2.39M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  172|  2.39M|            }
  173|   304k|        }
  174|  3.99M|    }
  175|       |
  176|  27.0k|    igraph_vector_int_destroy(&ptr);
  177|  27.0k|    igraph_vector_int_destroy(&rad);
  178|  27.0k|    IGRAPH_FINALLY_CLEAN(2);
  179|       |
  180|  27.0k|    return IGRAPH_SUCCESS;
  181|  27.0k|}
igraph_i_vector_int_order:
  197|  2.06k|        igraph_int_t maxval) {
  198|       |
  199|  2.06k|    const igraph_int_t size = igraph_vector_int_size(v);
  200|  2.06k|    igraph_vector_int_t ptr;
  201|  2.06k|    igraph_vector_int_t rad;
  202|  2.06k|    igraph_int_t j;
  203|       |
  204|  2.06k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  2.06k|    do { \
  |  |  925|  2.06k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  205|  2.06k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  2.06k|    do { \
  |  |  925|  2.06k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  206|       |
  207|  2.06k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&ptr, maxval + 1);
  ------------------
  |  |  119|  2.06k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.06k|    do { \
  |  |  |  |  657|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.06k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.06k|    do { \
  |  |  |  |  604|  2.06k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.06k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.06k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.06k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.06k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  208|  2.06k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&rad, size);
  ------------------
  |  |  119|  2.06k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.06k|    do { \
  |  |  |  |  657|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.06k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.06k|    do { \
  |  |  |  |  604|  2.06k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.06k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.06k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.06k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.06k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  209|  2.06k|    IGRAPH_CHECK(igraph_vector_int_resize(res, size));
  ------------------
  |  |  656|  2.06k|    do { \
  |  |  657|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  210|       |
  211|   403k|    for (igraph_int_t i = 0; i < size; i++) {
  ------------------
  |  Branch (211:30): [True: 401k, False: 2.06k]
  ------------------
  212|   401k|        igraph_int_t radix = VECTOR(*v)[i];
  ------------------
  |  |   60|   401k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  213|   401k|        if (VECTOR(ptr)[radix] != 0) {
  ------------------
  |  |   60|   401k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (213:13): [True: 393k, False: 7.15k]
  ------------------
  214|   393k|            VECTOR(rad)[i] = VECTOR(ptr)[radix];
  ------------------
  |  |   60|   393k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(rad)[i] = VECTOR(ptr)[radix];
  ------------------
  |  |   60|   393k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  215|   393k|        }
  216|   401k|        VECTOR(ptr)[radix] = i + 1;
  ------------------
  |  |   60|   401k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  217|   401k|    }
  218|       |
  219|  2.06k|    j = 0;
  220|  21.5k|    for (igraph_int_t i = 0; i < maxval + 1; i++) {
  ------------------
  |  Branch (220:30): [True: 19.4k, False: 2.06k]
  ------------------
  221|  19.4k|        if (VECTOR(ptr)[i] != 0) {
  ------------------
  |  |   60|  19.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (221:13): [True: 7.15k, False: 12.3k]
  ------------------
  222|  7.15k|            igraph_int_t next = VECTOR(ptr)[i] - 1;
  ------------------
  |  |   60|  7.15k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  223|  7.15k|            VECTOR(*res)[j++] = next;
  ------------------
  |  |   60|  7.15k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  224|   401k|            while (VECTOR(rad)[next] != 0) {
  ------------------
  |  |   60|   401k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (224:20): [True: 393k, False: 7.15k]
  ------------------
  225|   393k|                next = VECTOR(rad)[next] - 1;
  ------------------
  |  |   60|   393k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  226|   393k|                VECTOR(*res)[j++] = next;
  ------------------
  |  |   60|   393k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  227|   393k|            }
  228|  7.15k|        }
  229|  19.4k|    }
  230|       |
  231|  2.06k|    igraph_vector_int_destroy(&ptr);
  232|  2.06k|    igraph_vector_int_destroy(&rad);
  233|  2.06k|    IGRAPH_FINALLY_CLEAN(2);
  234|       |
  235|  2.06k|    return IGRAPH_SUCCESS;
  236|  2.06k|}

igraph_vector_init:
  134|  8.24k|igraph_error_t FUNCTION(igraph_vector, init)(TYPE(igraph_vector) *v, igraph_int_t size) {
  135|  8.24k|    igraph_int_t alloc_size;
  136|  8.24k|    IGRAPH_ASSERT(size >= 0);
  ------------------
  |  |  924|  8.24k|    do { \
  |  |  925|  8.24k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  8.24k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 8.24k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  8.24k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 8.24k]
  |  |  ------------------
  ------------------
  137|  8.24k|    alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (137:18): [True: 0, False: 8.24k]
  ------------------
  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|  8.24k|    v->stor_begin = IGRAPH_CALLOC(alloc_size, BASE);
  ------------------
  |  |   33|  8.24k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  16.4k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 8.24k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 8.24k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 8.24k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  144|  8.24k|    IGRAPH_CHECK_OOM(v->stor_begin, "Insufficient memory to initialize vector.");
  ------------------
  |  |  709|  8.24k|    do { \
  |  |  710|  8.24k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  8.24k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 8.24k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  8.24k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 8.24k]
  |  |  ------------------
  ------------------
  145|  8.24k|    v->stor_end = v->stor_begin + alloc_size;
  146|  8.24k|    v->end = v->stor_begin + size;
  147|       |
  148|  8.24k|    return IGRAPH_SUCCESS;
  149|  8.24k|}
igraph_vector_destroy:
  408|  8.24k|void FUNCTION(igraph_vector, destroy)(TYPE(igraph_vector) *v) {
  409|  8.24k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  8.24k|    do { \
  |  |  925|  8.24k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  8.24k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 8.24k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  8.24k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 8.24k]
  |  |  ------------------
  ------------------
  410|       |    /* vector_init() will leave stor_begin set to NULL when it fails.
  411|       |     * We handle these cases gracefully. */
  412|  8.24k|    if (v->stor_begin != NULL) {
  ------------------
  |  Branch (412:9): [True: 8.24k, False: 0]
  ------------------
  413|  8.24k|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   36|  8.24k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  414|       |        v->stor_begin = NULL;
  415|  8.24k|    }
  416|  8.24k|}
igraph_vector_capacity:
  436|  8.24k|igraph_int_t FUNCTION(igraph_vector, capacity)(const TYPE(igraph_vector) *v) {
  437|  8.24k|    return v->stor_end - v->stor_begin;
  438|  8.24k|}
igraph_vector_reserve:
  468|  8.24k|igraph_error_t FUNCTION(igraph_vector, reserve)(TYPE(igraph_vector) *v, igraph_int_t capacity) {
  469|  8.24k|    igraph_int_t current_capacity;
  470|  8.24k|    BASE *tmp;
  ------------------
  |  |   29|  8.24k|    #define BASE igraph_real_t
  ------------------
  471|       |
  472|  8.24k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  8.24k|    do { \
  |  |  925|  8.24k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  8.24k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 8.24k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  8.24k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 8.24k]
  |  |  ------------------
  ------------------
  473|  8.24k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  8.24k|    do { \
  |  |  925|  8.24k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  8.24k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 8.24k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  8.24k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 8.24k]
  |  |  ------------------
  ------------------
  474|  8.24k|    IGRAPH_ASSERT(capacity >= 0);
  ------------------
  |  |  924|  8.24k|    do { \
  |  |  925|  8.24k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  8.24k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 8.24k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  8.24k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 8.24k]
  |  |  ------------------
  ------------------
  475|       |
  476|  8.24k|    current_capacity = FUNCTION(igraph_vector, capacity)(v);
  ------------------
  |  |  170|  8.24k|        #define FUNCTION(a,c) CONCAT2(a,c)
  |  |  ------------------
  |  |  |  |   20|  8.24k|#define CONCAT2(a,b) CONCAT2x(a,b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|  8.24k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  477|       |
  478|  8.24k|    if (capacity <= current_capacity) {
  ------------------
  |  Branch (478:9): [True: 3.20k, False: 5.03k]
  ------------------
  479|  3.20k|        return IGRAPH_SUCCESS;
  480|  3.20k|    }
  481|       |
  482|  5.03k|    tmp = IGRAPH_REALLOC(v->stor_begin, capacity, BASE);
  ------------------
  |  |   35|  5.03k|#define IGRAPH_REALLOC(p,n,t) IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, realloc((void*)(p), sizeof(t) * ((n) > 0 ? (n) : 1)))
  |  |  ------------------
  |  |  |  |   31|  10.0k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 5.03k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 5.03k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 5.03k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  483|  5.03k|    IGRAPH_CHECK_OOM(tmp, "Cannot reserve space for vector.");
  ------------------
  |  |  709|  5.03k|    do { \
  |  |  710|  5.03k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  5.03k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.03k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  5.03k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 5.03k]
  |  |  ------------------
  ------------------
  484|       |
  485|  5.03k|    v->end = tmp + (v->end - v->stor_begin);
  486|  5.03k|    v->stor_begin = tmp;
  487|  5.03k|    v->stor_end = v->stor_begin + capacity;
  488|       |
  489|  5.03k|    return IGRAPH_SUCCESS;
  490|  5.03k|}
igraph_vector_size:
  522|  16.4k|igraph_int_t FUNCTION(igraph_vector, size)(const TYPE(igraph_vector) *v) {
  523|  16.4k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  16.4k|    do { \
  |  |  925|  16.4k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  16.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 16.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  16.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 16.4k]
  |  |  ------------------
  ------------------
  524|  16.4k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  16.4k|    do { \
  |  |  925|  16.4k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  16.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 16.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  16.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 16.4k]
  |  |  ------------------
  ------------------
  525|  16.4k|    return v->end - v->stor_begin;
  526|  16.4k|}
igraph_vector_null:
  725|  6.18k|void FUNCTION(igraph_vector, null)(TYPE(igraph_vector) *v) {
  726|  6.18k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  6.18k|    do { \
  |  |  925|  6.18k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  6.18k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 6.18k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  6.18k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 6.18k]
  |  |  ------------------
  ------------------
  727|  6.18k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  6.18k|    do { \
  |  |  925|  6.18k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  6.18k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 6.18k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  6.18k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 6.18k]
  |  |  ------------------
  ------------------
  728|  6.18k|    if (FUNCTION(igraph_vector, size)(v) > 0) {
  ------------------
  |  |  170|  6.18k|        #define FUNCTION(a,c) CONCAT2(a,c)
  |  |  ------------------
  |  |  |  |   20|  6.18k|#define CONCAT2(a,b) CONCAT2x(a,b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|  6.18k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (728:9): [True: 6.18k, False: 0]
  ------------------
  729|  6.18k|        memset(v->stor_begin, 0, sizeof(BASE) * FUNCTION(igraph_vector, size)(v));
  ------------------
  |  |  170|  6.18k|        #define FUNCTION(a,c) CONCAT2(a,c)
  |  |  ------------------
  |  |  |  |   20|  6.18k|#define CONCAT2(a,b) CONCAT2x(a,b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|  6.18k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  730|  6.18k|    }
  731|  6.18k|}
igraph_vector_resize:
 1264|  8.24k|igraph_error_t FUNCTION(igraph_vector, resize)(TYPE(igraph_vector)* v, igraph_int_t new_size) {
 1265|  8.24k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  8.24k|    do { \
  |  |  925|  8.24k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  8.24k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 8.24k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  8.24k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 8.24k]
  |  |  ------------------
  ------------------
 1266|  8.24k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  8.24k|    do { \
  |  |  925|  8.24k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  8.24k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 8.24k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  8.24k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 8.24k]
  |  |  ------------------
  ------------------
 1267|  8.24k|    IGRAPH_CHECK(FUNCTION(igraph_vector, reserve)(v, new_size));
  ------------------
  |  |  656|  8.24k|    do { \
  |  |  657|  8.24k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  8.24k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  8.24k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 8.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|  8.24k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 8.24k]
  |  |  ------------------
  ------------------
 1268|  8.24k|    v->end = v->stor_begin + new_size;
 1269|  8.24k|    return IGRAPH_SUCCESS;
 1270|  8.24k|}
igraph_vector_int_init:
  134|  9.43M|igraph_error_t FUNCTION(igraph_vector, init)(TYPE(igraph_vector) *v, igraph_int_t size) {
  135|  9.43M|    igraph_int_t alloc_size;
  136|  9.43M|    IGRAPH_ASSERT(size >= 0);
  ------------------
  |  |  924|  9.43M|    do { \
  |  |  925|  9.43M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  9.43M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.43M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  9.43M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 9.43M]
  |  |  ------------------
  ------------------
  137|  9.43M|    alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (137:18): [True: 1.97M, False: 7.45M]
  ------------------
  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.43M|    v->stor_begin = IGRAPH_CALLOC(alloc_size, BASE);
  ------------------
  |  |   33|  9.43M|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  18.8M|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 9.43M, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 9.43M, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 9.43M, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  144|  9.43M|    IGRAPH_CHECK_OOM(v->stor_begin, "Insufficient memory to initialize vector.");
  ------------------
  |  |  709|  9.43M|    do { \
  |  |  710|  9.43M|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  9.43M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.43M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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.43M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 9.43M]
  |  |  ------------------
  ------------------
  145|  9.43M|    v->stor_end = v->stor_begin + alloc_size;
  146|  9.43M|    v->end = v->stor_begin + size;
  147|       |
  148|  9.43M|    return IGRAPH_SUCCESS;
  149|  9.43M|}
igraph_vector_int_destroy:
  408|  9.43M|void FUNCTION(igraph_vector, destroy)(TYPE(igraph_vector) *v) {
  409|  9.43M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  9.43M|    do { \
  |  |  925|  9.43M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  9.43M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.43M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  9.43M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 9.43M]
  |  |  ------------------
  ------------------
  410|       |    /* vector_init() will leave stor_begin set to NULL when it fails.
  411|       |     * We handle these cases gracefully. */
  412|  9.43M|    if (v->stor_begin != NULL) {
  ------------------
  |  Branch (412:9): [True: 9.43M, False: 0]
  ------------------
  413|  9.43M|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   36|  9.43M|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  414|       |        v->stor_begin = NULL;
  415|  9.43M|    }
  416|  9.43M|}
igraph_vector_int_capacity:
  436|  17.1M|igraph_int_t FUNCTION(igraph_vector, capacity)(const TYPE(igraph_vector) *v) {
  437|  17.1M|    return v->stor_end - v->stor_begin;
  438|  17.1M|}
igraph_vector_int_reserve:
  468|  17.1M|igraph_error_t FUNCTION(igraph_vector, reserve)(TYPE(igraph_vector) *v, igraph_int_t capacity) {
  469|  17.1M|    igraph_int_t current_capacity;
  470|  17.1M|    BASE *tmp;
  ------------------
  |  |   66|  17.1M|    #define BASE igraph_int_t
  ------------------
  471|       |
  472|  17.1M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  17.1M|    do { \
  |  |  925|  17.1M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  17.1M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 17.1M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  17.1M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 17.1M]
  |  |  ------------------
  ------------------
  473|  17.1M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  17.1M|    do { \
  |  |  925|  17.1M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  17.1M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 17.1M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  17.1M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 17.1M]
  |  |  ------------------
  ------------------
  474|  17.1M|    IGRAPH_ASSERT(capacity >= 0);
  ------------------
  |  |  924|  17.1M|    do { \
  |  |  925|  17.1M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  17.1M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 17.1M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  17.1M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 17.1M]
  |  |  ------------------
  ------------------
  475|       |
  476|  17.1M|    current_capacity = FUNCTION(igraph_vector, capacity)(v);
  ------------------
  |  |  178|  17.1M|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  17.1M|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  17.1M|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  477|       |
  478|  17.1M|    if (capacity <= current_capacity) {
  ------------------
  |  Branch (478:9): [True: 16.7M, False: 431k]
  ------------------
  479|  16.7M|        return IGRAPH_SUCCESS;
  480|  16.7M|    }
  481|       |
  482|   431k|    tmp = IGRAPH_REALLOC(v->stor_begin, capacity, BASE);
  ------------------
  |  |   35|   431k|#define IGRAPH_REALLOC(p,n,t) IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, realloc((void*)(p), sizeof(t) * ((n) > 0 ? (n) : 1)))
  |  |  ------------------
  |  |  |  |   31|   863k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 431k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 431k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 431k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  483|   431k|    IGRAPH_CHECK_OOM(tmp, "Cannot reserve space for vector.");
  ------------------
  |  |  709|   431k|    do { \
  |  |  710|   431k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|   431k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 431k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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|   431k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 431k]
  |  |  ------------------
  ------------------
  484|       |
  485|   431k|    v->end = tmp + (v->end - v->stor_begin);
  486|   431k|    v->stor_begin = tmp;
  487|   431k|    v->stor_end = v->stor_begin + capacity;
  488|       |
  489|   431k|    return IGRAPH_SUCCESS;
  490|   431k|}
igraph_vector_int_empty:
  503|  5.46M|igraph_bool_t FUNCTION(igraph_vector, empty)(const TYPE(igraph_vector) *v) {
  504|  5.46M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  5.46M|    do { \
  |  |  925|  5.46M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  5.46M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.46M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  5.46M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 5.46M]
  |  |  ------------------
  ------------------
  505|  5.46M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  5.46M|    do { \
  |  |  925|  5.46M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  5.46M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.46M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  5.46M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 5.46M]
  |  |  ------------------
  ------------------
  506|  5.46M|    return v->stor_begin == v->end;
  507|  5.46M|}
igraph_vector_int_size:
  522|  90.7M|igraph_int_t FUNCTION(igraph_vector, size)(const TYPE(igraph_vector) *v) {
  523|  90.7M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  90.7M|    do { \
  |  |  925|  90.7M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  90.7M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 90.7M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  90.7M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 90.7M]
  |  |  ------------------
  ------------------
  524|  90.7M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  90.7M|    do { \
  |  |  925|  90.7M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  90.7M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 90.7M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  90.7M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 90.7M]
  |  |  ------------------
  ------------------
  525|  90.7M|    return v->end - v->stor_begin;
  526|  90.7M|}
igraph_vector_int_clear:
  542|  3.31M|void FUNCTION(igraph_vector, clear)(TYPE(igraph_vector)* v) {
  543|  3.31M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  3.31M|    do { \
  |  |  925|  3.31M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  3.31M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.31M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  3.31M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 3.31M]
  |  |  ------------------
  ------------------
  544|  3.31M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  3.31M|    do { \
  |  |  925|  3.31M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  3.31M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.31M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  3.31M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 3.31M]
  |  |  ------------------
  ------------------
  545|  3.31M|    v->end = v->stor_begin;
  546|  3.31M|}
igraph_vector_int_push_back:
  573|  28.6M|igraph_error_t FUNCTION(igraph_vector, push_back)(TYPE(igraph_vector) *v, BASE e) {
  574|  28.6M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  28.6M|    do { \
  |  |  925|  28.6M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  28.6M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 28.6M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  28.6M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 28.6M]
  |  |  ------------------
  ------------------
  575|  28.6M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  28.6M|    do { \
  |  |  925|  28.6M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  28.6M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 28.6M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  28.6M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 28.6M]
  |  |  ------------------
  ------------------
  576|       |
  577|  28.6M|    if (v->stor_end == v->end) {
  ------------------
  |  Branch (577:9): [True: 295k, False: 28.3M]
  ------------------
  578|       |        /* full, allocate more storage */
  579|   295k|        igraph_int_t old_size = FUNCTION(igraph_vector, size)(v);
  ------------------
  |  |  178|   295k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|   295k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|   295k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  580|   295k|        igraph_int_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   72|   295k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
                      igraph_int_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   72|   295k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (580:33): [True: 295k, False: 0]
  ------------------
  581|   295k|        if (old_size == IGRAPH_INTEGER_MAX) {
  ------------------
  |  |   72|   295k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (581:13): [True: 0, False: 295k]
  ------------------
  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|   295k|        if (new_size == 0) {
  ------------------
  |  Branch (584:13): [True: 0, False: 295k]
  ------------------
  585|      0|            new_size = 1;
  586|      0|        }
  587|   295k|        IGRAPH_CHECK(FUNCTION(igraph_vector, reserve)(v, new_size));
  ------------------
  |  |  656|   295k|    do { \
  |  |  657|   295k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   295k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   295k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 295k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   295k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 295k]
  |  |  ------------------
  ------------------
  588|   295k|    }
  589|       |
  590|  28.6M|    *(v->end) = e;
  591|  28.6M|    v->end += 1;
  592|       |
  593|  28.6M|    return IGRAPH_SUCCESS;
  594|  28.6M|}
igraph_vector_int_get_ptr:
  682|  2.05M|BASE* FUNCTION(igraph_vector, get_ptr)(const TYPE(igraph_vector) *v, igraph_int_t pos) {
  683|  2.05M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  2.05M|    do { \
  |  |  925|  2.05M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.05M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.05M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.05M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.05M]
  |  |  ------------------
  ------------------
  684|  2.05M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  2.05M|    do { \
  |  |  925|  2.05M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.05M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.05M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.05M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.05M]
  |  |  ------------------
  ------------------
  685|  2.05M|    return v->stor_begin + pos;
  686|  2.05M|}
igraph_vector_int_null:
  725|  95.1k|void FUNCTION(igraph_vector, null)(TYPE(igraph_vector) *v) {
  726|  95.1k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  95.1k|    do { \
  |  |  925|  95.1k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  95.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 95.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  95.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 95.1k]
  |  |  ------------------
  ------------------
  727|  95.1k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  95.1k|    do { \
  |  |  925|  95.1k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  95.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 95.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  95.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 95.1k]
  |  |  ------------------
  ------------------
  728|  95.1k|    if (FUNCTION(igraph_vector, size)(v) > 0) {
  ------------------
  |  |  178|  95.1k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  95.1k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  95.1k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (728:9): [True: 93.0k, False: 2.04k]
  ------------------
  729|  93.0k|        memset(v->stor_begin, 0, sizeof(BASE) * FUNCTION(igraph_vector, size)(v));
  ------------------
  |  |  178|  93.0k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  93.0k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  93.0k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  730|  93.0k|    }
  731|  95.1k|}
igraph_vector_int_fill:
  745|  1.71k|void FUNCTION(igraph_vector, fill)(TYPE(igraph_vector) *v, BASE e) {
  746|  1.71k|    BASE *ptr;
  ------------------
  |  |   66|  1.71k|    #define BASE igraph_int_t
  ------------------
  747|  1.71k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  1.71k|    do { \
  |  |  925|  1.71k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.71k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.71k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.71k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.71k]
  |  |  ------------------
  ------------------
  748|  1.71k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  1.71k|    do { \
  |  |  925|  1.71k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.71k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.71k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.71k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.71k]
  |  |  ------------------
  ------------------
  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|  1.71k|#if defined(BASE_INT)
  754|  1.71k|    if (e == 0) {
  ------------------
  |  Branch (754:9): [True: 0, False: 1.71k]
  ------------------
  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|  1.71k|    if (e == -1) {
  ------------------
  |  Branch (758:9): [True: 1.71k, False: 0]
  ------------------
  759|   366k|        for (ptr = v->stor_begin; ptr < v->end; ptr++) {
  ------------------
  |  Branch (759:35): [True: 364k, False: 1.71k]
  ------------------
  760|   364k|            *ptr = -1;
  761|   364k|        }
  762|  1.71k|        return;
  763|  1.71k|    }
  764|      0|#endif
  765|       |
  766|      0|    for (ptr = v->stor_begin; ptr < v->end; ptr++) {
  ------------------
  |  Branch (766:31): [True: 0, False: 0]
  ------------------
  767|      0|        *ptr = e;
  768|      0|    }
  769|      0|}
igraph_vector_int_tail:
  819|  4.96M|BASE FUNCTION(igraph_vector, tail)(const TYPE(igraph_vector) *v) {
  820|  4.96M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  4.96M|    do { \
  |  |  925|  4.96M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.96M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.96M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.96M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.96M]
  |  |  ------------------
  ------------------
  821|  4.96M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  4.96M|    do { \
  |  |  925|  4.96M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.96M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.96M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.96M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.96M]
  |  |  ------------------
  ------------------
  822|  4.96M|    return *((v->end) - 1);
  823|  4.96M|}
igraph_vector_int_pop_back:
  838|  17.8M|BASE FUNCTION(igraph_vector, pop_back)(TYPE(igraph_vector) *v) {
  839|  17.8M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  17.8M|    do { \
  |  |  925|  17.8M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  17.8M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 17.8M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  17.8M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 17.8M]
  |  |  ------------------
  ------------------
  840|  17.8M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  17.8M|    do { \
  |  |  925|  17.8M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  17.8M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 17.8M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  17.8M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 17.8M]
  |  |  ------------------
  ------------------
  841|  17.8M|    IGRAPH_ASSERT(v->end != NULL);
  ------------------
  |  |  924|  17.8M|    do { \
  |  |  925|  17.8M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  17.8M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 17.8M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  17.8M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 17.8M]
  |  |  ------------------
  ------------------
  842|  17.8M|    IGRAPH_ASSERT(v->end != v->stor_begin);
  ------------------
  |  |  924|  17.8M|    do { \
  |  |  925|  17.8M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  17.8M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 17.8M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  17.8M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 17.8M]
  |  |  ------------------
  ------------------
  843|       |
  844|  17.8M|    (v->end)--;
  845|       |
  846|  17.8M|    return *(v->end);
  847|  17.8M|}
igraph_vector_int_sort:
  958|   679k|void FUNCTION(igraph_vector, sort)(TYPE(igraph_vector) *v) {
  959|   679k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|   679k|    do { \
  |  |  925|   679k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   679k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 679k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   679k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 679k]
  |  |  ------------------
  ------------------
  960|   679k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|   679k|    do { \
  |  |  925|   679k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   679k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 679k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   679k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 679k]
  |  |  ------------------
  ------------------
  961|   679k|    igraph_qsort(v->stor_begin, FUNCTION(igraph_vector, size)(v),
  ------------------
  |  |  178|   679k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|   679k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|   679k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  962|   679k|                 sizeof(BASE), FUNCTION(igraph_vector, sort_cmp));
  ------------------
  |  |  178|   679k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|   679k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|   679k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  963|   679k|}
igraph_vector_int_lex_cmp:
 1095|  3.55M|) {
 1096|  3.55M|    igraph_int_t i, sa, sb;
 1097|  3.55M|    const TYPE(igraph_vector) *a = lhs, *b = rhs;
 1098|       |
 1099|  3.55M|    sa = FUNCTION(igraph_vector, size)(a);
  ------------------
  |  |  178|  3.55M|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  3.55M|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  3.55M|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1100|  3.55M|    sb = FUNCTION(igraph_vector, size)(b);
  ------------------
  |  |  178|  3.55M|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  3.55M|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  3.55M|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1101|       |
 1102|  6.93M|    for (i = 0; i < sa; i++) {
  ------------------
  |  Branch (1102:17): [True: 6.30M, False: 630k]
  ------------------
 1103|  6.30M|        if (i >= sb) {
  ------------------
  |  Branch (1103:13): [True: 0, False: 6.30M]
  ------------------
 1104|       |            /* b is shorter, and equal to the first part of a */
 1105|      0|            return 1;
 1106|      0|        }
 1107|  6.30M|        if (VECTOR(*a)[i] < VECTOR(*b)[i]) {
  ------------------
  |  |   60|  6.30M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      if (VECTOR(*a)[i] < VECTOR(*b)[i]) {
  ------------------
  |  |   60|  6.30M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1107:13): [True: 1.48M, False: 4.82M]
  ------------------
 1108|  1.48M|            return -1;
 1109|  1.48M|        }
 1110|  4.82M|        if (VECTOR(*a)[i] > VECTOR(*b)[i]) {
  ------------------
  |  |   60|  4.82M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      if (VECTOR(*a)[i] > VECTOR(*b)[i]) {
  ------------------
  |  |   60|  4.82M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1110:13): [True: 1.43M, False: 3.38M]
  ------------------
 1111|  1.43M|            return 1;
 1112|  1.43M|        }
 1113|  4.82M|    }
 1114|   630k|    if (i == sb) {
  ------------------
  |  Branch (1114:9): [True: 630k, False: 0]
  ------------------
 1115|   630k|        return 0;
 1116|   630k|    }
 1117|       |    /* a is shorter, and equal to the first part of b */
 1118|      0|    return -1;
 1119|   630k|}
igraph_vector_int_resize:
 1264|  16.7M|igraph_error_t FUNCTION(igraph_vector, resize)(TYPE(igraph_vector)* v, igraph_int_t new_size) {
 1265|  16.7M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  16.7M|    do { \
  |  |  925|  16.7M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  16.7M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 16.7M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  16.7M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 16.7M]
  |  |  ------------------
  ------------------
 1266|  16.7M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  16.7M|    do { \
  |  |  925|  16.7M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  16.7M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 16.7M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  16.7M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 16.7M]
  |  |  ------------------
  ------------------
 1267|  16.7M|    IGRAPH_CHECK(FUNCTION(igraph_vector, reserve)(v, new_size));
  ------------------
  |  |  656|  16.7M|    do { \
  |  |  657|  16.7M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  16.7M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  16.7M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 16.7M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  16.7M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 16.7M]
  |  |  ------------------
  ------------------
 1268|  16.7M|    v->end = v->stor_begin + new_size;
 1269|  16.7M|    return IGRAPH_SUCCESS;
 1270|  16.7M|}
igraph_vector_int_max:
 1327|  11.1k|BASE FUNCTION(igraph_vector, max)(const TYPE(igraph_vector) *v) {
 1328|  11.1k|    BASE max;
  ------------------
  |  |   66|  11.1k|    #define BASE igraph_int_t
  ------------------
 1329|  11.1k|    BASE *ptr;
  ------------------
  |  |   66|  11.1k|    #define BASE igraph_int_t
  ------------------
 1330|  11.1k|    IGRAPH_ASSERT(!FUNCTION(igraph_vector, empty)(v));
  ------------------
  |  |  924|  11.1k|    do { \
  |  |  925|  11.1k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  11.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 11.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  11.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 11.1k]
  |  |  ------------------
  ------------------
 1331|  11.1k|    max = *(v->stor_begin);
 1332|       |#if defined(BASE_IGRAPH_REAL)
 1333|       |    if (isnan(max)) { return max; }; /* Result is NaN */
 1334|       |#endif
 1335|  11.1k|    ptr = v->stor_begin + 1;
 1336|  2.96M|    while (ptr < v->end) {
  ------------------
  |  Branch (1336:12): [True: 2.95M, False: 11.1k]
  ------------------
 1337|  2.95M|        if ((*ptr) > max) {
  ------------------
  |  Branch (1337:13): [True: 64.0k, False: 2.88M]
  ------------------
 1338|  64.0k|            max = *ptr;
 1339|  64.0k|        }
 1340|       |#if defined(BASE_IGRAPH_REAL)
 1341|       |        else if (isnan(*ptr))
 1342|       |            return *ptr; /* Result is NaN */
 1343|       |#endif
 1344|  2.95M|        ptr++;
 1345|  2.95M|    }
 1346|  11.1k|    return max;
 1347|  11.1k|}
igraph_vector_int_init_copy:
 1538|   171k|) {
 1539|   171k|    igraph_int_t from_size;
 1540|       |
 1541|   171k|    IGRAPH_ASSERT(from != NULL);
  ------------------
  |  |  924|   171k|    do { \
  |  |  925|   171k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   171k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 171k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   171k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 171k]
  |  |  ------------------
  ------------------
 1542|   171k|    IGRAPH_ASSERT(from->stor_begin != NULL);
  ------------------
  |  |  924|   171k|    do { \
  |  |  925|   171k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   171k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 171k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   171k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 171k]
  |  |  ------------------
  ------------------
 1543|       |
 1544|   171k|    from_size = FUNCTION(igraph_vector, size)(from);
  ------------------
  |  |  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
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1545|   171k|    IGRAPH_CHECK(FUNCTION(igraph_vector, init)(to, from_size));
  ------------------
  |  |  656|   171k|    do { \
  |  |  657|   171k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   171k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   171k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 171k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   171k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 171k]
  |  |  ------------------
  ------------------
 1546|       |
 1547|   171k|    memcpy(to->stor_begin, from->stor_begin, from_size * sizeof(BASE));
 1548|       |
 1549|   171k|    return IGRAPH_SUCCESS;
 1550|   171k|}
igraph_vector_int_isininterval:
 1832|  29.6k|        BASE high) {
 1833|  29.6k|    BASE *ptr;
  ------------------
  |  |   66|  29.6k|    #define BASE igraph_int_t
  ------------------
 1834|  29.6k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  29.6k|    do { \
  |  |  925|  29.6k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  29.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 29.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  29.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 29.6k]
  |  |  ------------------
  ------------------
 1835|  29.6k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  29.6k|    do { \
  |  |  925|  29.6k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  29.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 29.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  29.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 29.6k]
  |  |  ------------------
  ------------------
 1836|  5.80M|    for (ptr = v->stor_begin; ptr < v->end; ptr++) {
  ------------------
  |  Branch (1836:31): [True: 5.77M, False: 29.6k]
  ------------------
 1837|       |        /* Note that the following is not equivalent to *ptr < low || *ptr > high
 1838|       |         * when *ptr is NaN! */
 1839|  5.77M|        if (!(*ptr >= low && *ptr <= high)) {
  ------------------
  |  Branch (1839:15): [True: 5.77M, False: 0]
  |  Branch (1839:30): [True: 5.77M, False: 0]
  ------------------
 1840|      0|            return 0;
 1841|      0|        }
 1842|  5.77M|    }
 1843|  29.6k|    return 1;
 1844|  29.6k|}
igraph_vector_int_all_e:
 1892|   675k|                                  const TYPE(igraph_vector) *rhs) {
 1893|   675k|    igraph_int_t i, s;
 1894|   675k|    IGRAPH_ASSERT(lhs != 0);
  ------------------
  |  |  924|   675k|    do { \
  |  |  925|   675k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   675k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 675k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   675k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 675k]
  |  |  ------------------
  ------------------
 1895|   675k|    IGRAPH_ASSERT(rhs != 0);
  ------------------
  |  |  924|   675k|    do { \
  |  |  925|   675k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   675k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 675k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   675k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 675k]
  |  |  ------------------
  ------------------
 1896|   675k|    IGRAPH_ASSERT(lhs->stor_begin != 0);
  ------------------
  |  |  924|   675k|    do { \
  |  |  925|   675k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   675k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 675k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   675k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 675k]
  |  |  ------------------
  ------------------
 1897|   675k|    IGRAPH_ASSERT(rhs->stor_begin != 0);
  ------------------
  |  |  924|   675k|    do { \
  |  |  925|   675k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   675k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 675k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   675k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 675k]
  |  |  ------------------
  ------------------
 1898|       |
 1899|   675k|    s = FUNCTION(igraph_vector, size)(lhs);
  ------------------
  |  |  178|   675k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|   675k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|   675k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1900|   675k|    if (s != FUNCTION(igraph_vector, size)(rhs)) {
  ------------------
  |  |  178|   675k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|   675k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|   675k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1900:9): [True: 4.41k, False: 671k]
  ------------------
 1901|  4.41k|        return false;
 1902|   671k|    } else {
 1903|  3.08M|        for (i = 0; i < s; i++) {
  ------------------
  |  Branch (1903:21): [True: 2.51M, False: 570k]
  ------------------
 1904|  2.51M|            BASE l = VECTOR(*lhs)[i];
  ------------------
  |  |   66|  2.51M|    #define BASE igraph_int_t
  ------------------
                          BASE l = VECTOR(*lhs)[i];
  ------------------
  |  |   60|  2.51M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1905|  2.51M|            BASE r = VECTOR(*rhs)[i];
  ------------------
  |  |   66|  2.51M|    #define BASE igraph_int_t
  ------------------
                          BASE r = VECTOR(*rhs)[i];
  ------------------
  |  |   60|  2.51M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1906|       |#ifdef EQ
 1907|       |            if (!EQ(l, r)) {
 1908|       |#else
 1909|  2.51M|            if (l != r) {
  ------------------
  |  Branch (1909:17): [True: 101k, False: 2.41M]
  ------------------
 1910|   101k|#endif
 1911|   101k|                return false;
 1912|   101k|            }
 1913|  2.51M|        }
 1914|   570k|        return true;
 1915|   671k|    }
 1916|   675k|}
igraph_vector_int_update:
 2524|  33.9k|                                    const TYPE(igraph_vector) *from) {
 2525|  33.9k|    igraph_int_t n = FUNCTION(igraph_vector, size)(from);
  ------------------
  |  |  178|  33.9k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  33.9k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  33.9k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2526|  33.9k|    IGRAPH_CHECK(FUNCTION(igraph_vector, resize)(to, n));
  ------------------
  |  |  656|  33.9k|    do { \
  |  |  657|  33.9k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  33.9k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  33.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 33.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|  33.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 33.9k]
  |  |  ------------------
  ------------------
 2527|  33.9k|    memcpy(to->stor_begin, from->stor_begin, sizeof(BASE)*n);
 2528|  33.9k|    return IGRAPH_SUCCESS;
 2529|  33.9k|}
igraph_vector_int_swap:
 2541|   212k|void FUNCTION(igraph_vector, swap)(TYPE(igraph_vector) *v1, TYPE(igraph_vector) *v2) {
 2542|       |
 2543|   212k|    TYPE(igraph_vector) tmp;
  ------------------
  |  |  179|   212k|        #define TYPE(a) CONCAT3(a,SHORT,t)
  |  |  ------------------
  |  |  |  |   22|   212k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|   212k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2544|       |
 2545|   212k|    tmp = *v1;
 2546|   212k|    *v1 = *v2;
 2547|   212k|    *v2 = tmp;
 2548|   212k|}
igraph_vector_int_intersection_size_sorted:
 3172|  58.8k|        const TYPE(igraph_vector) *v2) {
 3173|       |
 3174|  58.8k|    igraph_int_t size1, size2, count;
 3175|  58.8k|    igraph_real_t r;
 3176|       |
 3177|  58.8k|    size1 = FUNCTION(igraph_vector, size)(v1);
  ------------------
  |  |  178|  58.8k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  58.8k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  58.8k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3178|  58.8k|    size2 = FUNCTION(igraph_vector, size)(v2);
  ------------------
  |  |  178|  58.8k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  58.8k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  58.8k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3179|       |
 3180|  58.8k|    count = 0;
 3181|       |
 3182|  58.8k|    if (size1 == 0 || size2 == 0) {
  ------------------
  |  Branch (3182:9): [True: 0, False: 58.8k]
  |  Branch (3182:23): [True: 0, False: 58.8k]
  ------------------
 3183|      0|        return count;
 3184|      0|    }
 3185|       |
 3186|  58.8k|    r = size1 > size2 ? (igraph_real_t) size1 / size2 : (igraph_real_t) size2 / size1;
  ------------------
  |  Branch (3186:9): [True: 17.7k, False: 41.1k]
  ------------------
 3187|       |
 3188|       |    /* When the set size ratio is small, use a simple linear scan. The ideal ratio
 3189|       |     * seems to be affected by processor cache effects. It depends on the machine,
 3190|       |     * as well as on the input sizes. The threshold of 10 was determined empirically
 3191|       |     * by using the intersection.c (direct) and igraph_ecc.c (indirect) benchmarks.
 3192|       |     * See https://github.com/igraph/igraph/pull/2618 */
 3193|  58.8k|    if (r < 10) {
  ------------------
  |  Branch (3193:9): [True: 47.5k, False: 11.2k]
  ------------------
 3194|       |        /* This is a fast branchless implementation that uses arithmetic
 3195|       |         * instead of conditionals. */
 3196|  47.5k|        igraph_int_t i1 = 0, i2 = 0;
 3197|   246k|        while (i1 < size1 && i2 < size2) {
  ------------------
  |  Branch (3197:16): [True: 221k, False: 24.8k]
  |  Branch (3197:30): [True: 198k, False: 22.7k]
  ------------------
 3198|   198k|            BASE e1 = VECTOR(*v1)[i1], e2 = VECTOR(*v2)[i2];
  ------------------
  |  |   66|   198k|    #define BASE igraph_int_t
  ------------------
                          BASE e1 = VECTOR(*v1)[i1], e2 = VECTOR(*v2)[i2];
  ------------------
  |  |   60|   198k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          BASE e1 = VECTOR(*v1)[i1], e2 = VECTOR(*v2)[i2];
  ------------------
  |  |   60|   198k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 3199|   198k|            igraph_int_t d1 = (e1 <= e2), d2 = (e1 >= e2);
 3200|   198k|            i1 += d1; i2 += d2;
 3201|   198k|            count += (d1 == d2);
 3202|   198k|        }
 3203|  47.5k|    } else {
 3204|  11.2k|        FUNCTION(igraph_i_vector, intersection_size_sorted)(
  ------------------
  |  |  178|  11.2k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  11.2k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  11.2k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3205|  11.2k|            v1, 0, size1, v2, 0, size2, &count);
 3206|  11.2k|    }
 3207|       |
 3208|  58.8k|    return count;
 3209|  58.8k|}
vector.c:igraph_vector_int_sort_cmp:
  924|  7.09M|static int FUNCTION(igraph_vector, sort_cmp)(const void *a, const void *b) {
  925|  7.09M|    const BASE *da = (const BASE *) a;
  926|  7.09M|    const BASE *db = (const BASE *) b;
  927|       |
  928|  7.09M|    return (*da > *db) - (*da < *db);
  929|  7.09M|}
vector.c:igraph_i_vector_int_binsearch_slice:
 2183|  13.3k|        BASE what, igraph_int_t *pos, igraph_int_t start, igraph_int_t end) {
 2184|  13.3k|    igraph_int_t left  = start;
 2185|  13.3k|    igraph_int_t right = end - 1;
 2186|       |
 2187|  88.1k|    while (left <= right) {
  ------------------
  |  Branch (2187:12): [True: 75.7k, False: 12.3k]
  ------------------
 2188|       |        /* (right + left) / 2 could theoretically overflow for long vectors */
 2189|  75.7k|        igraph_int_t middle = left + ((right - left) >> 1);
 2190|  75.7k|        if (VECTOR(*v)[middle] > what) {
  ------------------
  |  |   60|  75.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (2190:13): [True: 40.1k, False: 35.5k]
  ------------------
 2191|  40.1k|            right = middle - 1;
 2192|  40.1k|        } else if (VECTOR(*v)[middle] < what) {
  ------------------
  |  |   60|  35.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (2192:20): [True: 34.6k, False: 971]
  ------------------
 2193|  34.6k|            left = middle + 1;
 2194|  34.6k|        } else {
 2195|    971|            if (pos != 0) {
  ------------------
  |  Branch (2195:17): [True: 971, False: 0]
  ------------------
 2196|    971|                *pos = middle;
 2197|    971|            }
 2198|    971|            return true;
 2199|    971|        }
 2200|  75.7k|    }
 2201|       |
 2202|       |    /* if we are here, the element was not found */
 2203|  12.3k|    if (pos != 0) {
  ------------------
  |  Branch (2203:9): [True: 12.3k, False: 0]
  ------------------
 2204|  12.3k|        *pos = left;
 2205|  12.3k|    }
 2206|       |
 2207|       |    return false;
 2208|  13.3k|}
vector.c:igraph_i_vector_int_intersection_size_sorted:
 3095|  38.0k|    igraph_int_t *result) {
 3096|       |
 3097|  38.0k|    igraph_int_t size1, size2, probe1, probe2;
 3098|       |
 3099|  38.0k|    if (begin1 == end1 || begin2 == end2) {
  ------------------
  |  Branch (3099:9): [True: 15.1k, False: 22.8k]
  |  Branch (3099:27): [True: 9.49k, False: 13.3k]
  ------------------
 3100|  24.6k|        return;
 3101|  24.6k|    }
 3102|       |
 3103|  13.3k|    size1 = end1 - begin1;
 3104|  13.3k|    size2 = end2 - begin2;
 3105|       |
 3106|  13.3k|    if (size1 < size2) {
  ------------------
  |  Branch (3106:9): [True: 6.56k, False: 6.80k]
  ------------------
 3107|  6.56k|        probe1 = begin1 + (size1 >> 1);      /* pick the median element */
 3108|  6.56k|        FUNCTION(igraph_i_vector, binsearch_slice)(v2, VECTOR(*v1)[probe1], &probe2, begin2, end2);
  ------------------
  |  |  178|  6.56k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  6.56k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  6.56k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      FUNCTION(igraph_i_vector, binsearch_slice)(v2, VECTOR(*v1)[probe1], &probe2, begin2, end2);
  ------------------
  |  |   60|  6.56k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 3109|  6.56k|        FUNCTION(igraph_i_vector, intersection_size_sorted)(
  ------------------
  |  |  178|  6.56k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  6.56k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  6.56k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3110|  6.56k|            v1, begin1, probe1, v2, begin2, probe2, result
 3111|  6.56k|        );
 3112|  6.56k|        if (!(probe2 == end2 || VECTOR(*v1)[probe1] < VECTOR(*v2)[probe2])) {
  ------------------
  |  |   60|  5.28k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      if (!(probe2 == end2 || VECTOR(*v1)[probe1] < VECTOR(*v2)[probe2])) {
  ------------------
  |  |   60|  5.28k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (3112:15): [True: 1.28k, False: 5.28k]
  |  Branch (3112:33): [True: 4.88k, False: 394]
  ------------------
 3113|    394|            (*result)++;
 3114|    394|            probe2++;
 3115|    394|        }
 3116|  6.56k|        FUNCTION(igraph_i_vector, intersection_size_sorted)(
  ------------------
  |  |  178|  6.56k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  6.56k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  6.56k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3117|  6.56k|            v1, probe1 + 1, end1, v2, probe2, end2, result
 3118|  6.56k|        );
 3119|  6.80k|    } else {
 3120|  6.80k|        probe2 = begin2 + (size2 >> 1);      /* pick the median element */
 3121|  6.80k|        FUNCTION(igraph_i_vector, binsearch_slice)(v1, VECTOR(*v2)[probe2], &probe1, begin1, end1);
  ------------------
  |  |  178|  6.80k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  6.80k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  6.80k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      FUNCTION(igraph_i_vector, binsearch_slice)(v1, VECTOR(*v2)[probe2], &probe1, begin1, end1);
  ------------------
  |  |   60|  6.80k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 3122|  6.80k|        FUNCTION(igraph_i_vector, intersection_size_sorted)(
  ------------------
  |  |  178|  6.80k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  6.80k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  6.80k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3123|  6.80k|            v1, begin1, probe1, v2, begin2, probe2, result
 3124|  6.80k|        );
 3125|  6.80k|        if (!(probe1 == end1 || VECTOR(*v2)[probe2] < VECTOR(*v1)[probe1])) {
  ------------------
  |  |   60|  5.45k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      if (!(probe1 == end1 || VECTOR(*v2)[probe2] < VECTOR(*v1)[probe1])) {
  ------------------
  |  |   60|  5.45k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (3125:15): [True: 1.34k, False: 5.45k]
  |  Branch (3125:33): [True: 4.87k, False: 577]
  ------------------
 3126|    577|            (*result)++;
 3127|    577|            probe1++;
 3128|    577|        }
 3129|  6.80k|        FUNCTION(igraph_i_vector, intersection_size_sorted)(
  ------------------
  |  |  178|  6.80k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  6.80k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  6.80k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3130|  6.80k|            v1, probe1, end1, v2, probe2 + 1, end2, result
 3131|  6.80k|        );
 3132|  6.80k|    }
 3133|  13.3k|}

igraph_vector_ptr_init:
   86|  4.12k|igraph_error_t igraph_vector_ptr_init(igraph_vector_ptr_t* v, igraph_int_t size) {
   87|  4.12k|    igraph_int_t alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (87:31): [True: 4.12k, False: 0]
  ------------------
   88|  4.12k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  4.12k|    do { \
  |  |  925|  4.12k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.12k]
  |  |  ------------------
  ------------------
   89|  4.12k|    if (size < 0) {
  ------------------
  |  Branch (89:9): [True: 0, False: 4.12k]
  ------------------
   90|      0|        size = 0;
   91|      0|    }
   92|  4.12k|    v->stor_begin = IGRAPH_CALLOC(alloc_size, void*);
  ------------------
  |  |   33|  4.12k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  8.24k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 4.12k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 4.12k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 4.12k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   93|  4.12k|    if (v->stor_begin == 0) {
  ------------------
  |  Branch (93:9): [True: 0, False: 4.12k]
  ------------------
   94|      0|        IGRAPH_ERROR("vector ptr init failed", 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]
  |  |  ------------------
  ------------------
   95|      0|    }
   96|  4.12k|    v->stor_end = v->stor_begin + alloc_size;
   97|  4.12k|    v->end = v->stor_begin + size;
   98|  4.12k|    v->item_destructor = 0;
   99|       |
  100|  4.12k|    return IGRAPH_SUCCESS;
  101|  4.12k|}
igraph_vector_ptr_destroy:
  132|  4.12k|void igraph_vector_ptr_destroy(igraph_vector_ptr_t* v) {
  133|  4.12k|    IGRAPH_ASSERT(v != 0);
  ------------------
  |  |  924|  4.12k|    do { \
  |  |  925|  4.12k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.12k]
  |  |  ------------------
  ------------------
  134|  4.12k|    if (v->stor_begin != 0) {
  ------------------
  |  Branch (134:9): [True: 4.12k, False: 0]
  ------------------
  135|  4.12k|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   36|  4.12k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  136|       |        v->stor_begin = NULL;
  137|  4.12k|    }
  138|  4.12k|}
igraph_vector_ptr_free_all:
  170|  4.12k|void igraph_vector_ptr_free_all(igraph_vector_ptr_t* v) {
  171|  4.12k|    void **ptr;
  172|  4.12k|    IGRAPH_ASSERT(v != 0);
  ------------------
  |  |  924|  4.12k|    do { \
  |  |  925|  4.12k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.12k]
  |  |  ------------------
  ------------------
  173|  4.12k|    IGRAPH_ASSERT(v->stor_begin != 0);
  ------------------
  |  |  924|  4.12k|    do { \
  |  |  925|  4.12k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.12k]
  |  |  ------------------
  ------------------
  174|       |
  175|  4.12k|    igraph_i_vector_ptr_call_item_destructor_all(v);
  176|   806k|    for (ptr = v->stor_begin; ptr < v->end; ptr++) {
  ------------------
  |  Branch (176:31): [True: 802k, False: 4.12k]
  ------------------
  177|       |        IGRAPH_FREE(*ptr);
  ------------------
  |  |   36|   802k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  178|   802k|    }
  179|  4.12k|}
igraph_vector_ptr_destroy_all:
  199|  4.12k|void igraph_vector_ptr_destroy_all(igraph_vector_ptr_t* v) {
  200|  4.12k|    IGRAPH_ASSERT(v != 0);
  ------------------
  |  |  924|  4.12k|    do { \
  |  |  925|  4.12k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.12k]
  |  |  ------------------
  ------------------
  201|  4.12k|    IGRAPH_ASSERT(v->stor_begin != 0);
  ------------------
  |  |  924|  4.12k|    do { \
  |  |  925|  4.12k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.12k]
  |  |  ------------------
  ------------------
  202|  4.12k|    igraph_vector_ptr_free_all(v);
  203|  4.12k|    igraph_vector_ptr_set_item_destructor(v, 0);
  204|  4.12k|    igraph_vector_ptr_destroy(v);
  205|  4.12k|}
igraph_vector_ptr_set_item_destructor:
  669|  8.24k|    igraph_vector_ptr_t *v, igraph_finally_func_t *func) {
  670|  8.24k|    igraph_finally_func_t* result = v->item_destructor;
  671|       |
  672|  8.24k|    v->item_destructor = func;
  673|       |
  674|  8.24k|    return result;
  675|  8.24k|}
vector_ptr.c:igraph_i_vector_ptr_call_item_destructor_all:
  140|  4.12k|static void igraph_i_vector_ptr_call_item_destructor_all(igraph_vector_ptr_t* v) {
  141|  4.12k|    void **ptr;
  142|       |
  143|  4.12k|    if (v->item_destructor != 0) {
  ------------------
  |  Branch (143:9): [True: 4.12k, False: 0]
  ------------------
  144|   806k|        for (ptr = v->stor_begin; ptr < v->end; ptr++) {
  ------------------
  |  Branch (144:35): [True: 802k, False: 4.12k]
  ------------------
  145|   802k|            if (*ptr != 0) {
  ------------------
  |  Branch (145:17): [True: 0, False: 802k]
  ------------------
  146|      0|                v->item_destructor(*ptr);
  147|      0|            }
  148|   802k|        }
  149|  4.12k|    }
  150|  4.12k|}

igraph_fundamental_cycles:
  209|  2.06k|        igraph_int_t start_vid, igraph_real_t bfs_cutoff) {
  210|       |
  211|  2.06k|    const igraph_int_t no_of_nodes = igraph_vcount(graph);
  212|  2.06k|    const igraph_int_t no_of_edges = igraph_ecount(graph);
  213|  2.06k|    igraph_int_t estimated_rank;
  214|  2.06k|    igraph_int_t i;
  215|  2.06k|    igraph_inclist_t inclist;
  216|  2.06k|    igraph_vector_int_t visited; /* see comments before igraph_i_fundamental_cycles_bfs() */
  217|       |
  218|  2.06k|    IGRAPH_UNUSED(weights);
  ------------------
  |  |   30|  2.06k|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
  219|       |
  220|  2.06k|    if (start_vid >= no_of_nodes) {
  ------------------
  |  Branch (220:9): [True: 0, False: 2.06k]
  ------------------
  221|      0|        IGRAPH_ERROR("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]
  |  |  ------------------
  ------------------
  222|      0|    }
  223|       |
  224|  2.06k|    IGRAPH_CHECK(igraph_inclist_init(graph, &inclist, IGRAPH_ALL, IGRAPH_LOOPS_ONCE));
  ------------------
  |  |  656|  2.06k|    do { \
  |  |  657|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  225|  2.06k|    IGRAPH_FINALLY(igraph_inclist_destroy, &inclist);
  ------------------
  |  |  603|  2.06k|    do { \
  |  |  604|  2.06k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.06k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.06k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.06k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.06k]
  |  |  ------------------
  |  |  608|  2.06k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  226|       |
  227|  2.06k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&visited, no_of_nodes);
  ------------------
  |  |  119|  2.06k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.06k|    do { \
  |  |  |  |  657|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.06k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.06k|    do { \
  |  |  |  |  604|  2.06k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.06k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.06k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.06k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.06k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  228|       |
  229|       |    /* Compute cycle rank assuming that the graph is connected. */
  230|  2.06k|    estimated_rank = no_of_edges - no_of_nodes + 1;
  231|  2.06k|    estimated_rank = estimated_rank < 0 ? 0 : estimated_rank;
  ------------------
  |  Branch (231:22): [True: 1.87k, False: 183]
  ------------------
  232|       |
  233|  2.06k|    igraph_vector_int_list_clear(result);
  234|  2.06k|    IGRAPH_CHECK(igraph_vector_int_list_reserve(result, estimated_rank));
  ------------------
  |  |  656|  2.06k|    do { \
  |  |  657|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  235|       |
  236|  2.06k|    if (start_vid < 0) {
  ------------------
  |  Branch (236:9): [True: 2.06k, False: 0]
  ------------------
  237|   403k|        for (i=0; i < no_of_nodes; ++i) {
  ------------------
  |  Branch (237:19): [True: 401k, False: 2.06k]
  ------------------
  238|   401k|            if (! VECTOR(visited)[i]) {
  ------------------
  |  |   60|   401k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (238:17): [True: 364k, False: 36.7k]
  ------------------
  239|   364k|                IGRAPH_CHECK(igraph_i_fundamental_cycles_bfs(graph, result, i, bfs_cutoff, &inclist,
  ------------------
  |  |  656|   364k|    do { \
  |  |  657|   364k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   364k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   364k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 364k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   364k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 364k]
  |  |  ------------------
  ------------------
  240|   364k|                                                             &visited, /* mark */ 0));
  241|   364k|            }
  242|   401k|        }
  243|  2.06k|    } else {
  244|      0|        IGRAPH_CHECK(igraph_i_fundamental_cycles_bfs(graph, result, start_vid, bfs_cutoff, &inclist,
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  245|      0|                                                     &visited, /* mark */ 0));
  246|      0|    }
  247|       |
  248|  2.06k|    igraph_vector_int_destroy(&visited);
  249|  2.06k|    igraph_inclist_destroy(&inclist);
  250|  2.06k|    IGRAPH_FINALLY_CLEAN(2);
  251|       |
  252|  2.06k|    return IGRAPH_SUCCESS;
  253|  2.06k|}
igraph_minimum_cycle_basis:
  420|  2.06k|        igraph_bool_t complete, igraph_bool_t use_cycle_order) {
  421|       |
  422|  2.06k|    const igraph_int_t no_of_nodes = igraph_vcount(graph);
  423|  2.06k|    const igraph_int_t no_of_edges = igraph_ecount(graph);
  424|  2.06k|    igraph_int_t rank;
  425|  2.06k|    igraph_vector_int_list_t candidates;
  426|       |
  427|  2.06k|    IGRAPH_UNUSED(weights);
  ------------------
  |  |   30|  2.06k|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
  428|       |
  429|       |    /* Compute candidate elements for the minimum weight basis. */
  430|  2.06k|    {
  431|  2.06k|        igraph_inclist_t inclist;
  432|  2.06k|        igraph_vector_int_t visited; /* visited[v] % 3 is zero for unvisited vertices, see igraph_i_fundamental_cycles_bfs() */
  433|  2.06k|        igraph_vector_int_t degrees;
  434|  2.06k|        igraph_int_t no_of_comps;
  435|  2.06k|        igraph_int_t mark;
  436|       |
  437|       |        /* We use the degrees to avoid doing a BFS from vertices with d < 3, except in special cases.
  438|       |         * Degrees cannot be computed from the inclist because there we use IGRAPH_LOOPS_ONCE. */
  439|  2.06k|        IGRAPH_VECTOR_INT_INIT_FINALLY(&degrees, no_of_nodes);
  ------------------
  |  |  119|  2.06k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.06k|    do { \
  |  |  |  |  657|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.06k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.06k|    do { \
  |  |  |  |  604|  2.06k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.06k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.06k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.06k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.06k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  440|  2.06k|        IGRAPH_CHECK(igraph_degree(graph, &degrees, igraph_vss_all(), IGRAPH_ALL, IGRAPH_LOOPS));
  ------------------
  |  |  656|  2.06k|    do { \
  |  |  657|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  441|       |
  442|  2.06k|        IGRAPH_CHECK(igraph_connected_components(graph, NULL, NULL, &no_of_comps, IGRAPH_WEAK));
  ------------------
  |  |  656|  2.06k|    do { \
  |  |  657|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  443|  2.06k|        rank = no_of_edges - no_of_nodes + no_of_comps;
  444|       |
  445|  2.06k|        IGRAPH_VECTOR_INT_INIT_FINALLY(&visited, no_of_nodes);
  ------------------
  |  |  119|  2.06k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.06k|    do { \
  |  |  |  |  657|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.06k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.06k|    do { \
  |  |  |  |  604|  2.06k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.06k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.06k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.06k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.06k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  446|       |
  447|  2.06k|        IGRAPH_CHECK(igraph_inclist_init(graph, &inclist, IGRAPH_ALL, IGRAPH_LOOPS_ONCE));
  ------------------
  |  |  656|  2.06k|    do { \
  |  |  657|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  448|  2.06k|        IGRAPH_FINALLY(igraph_inclist_destroy, &inclist);
  ------------------
  |  |  603|  2.06k|    do { \
  |  |  604|  2.06k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.06k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.06k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.06k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.06k]
  |  |  ------------------
  |  |  608|  2.06k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  449|       |
  450|       |         /* TODO: estimate space to reserve. 'rank' is a lower bound only. */
  451|  2.06k|        IGRAPH_VECTOR_INT_LIST_INIT_FINALLY(&candidates, 0);
  ------------------
  |  |   58|  2.06k|    do { IGRAPH_CHECK(igraph_vector_int_list_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.06k|    do { \
  |  |  |  |  657|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   59|  2.06k|        IGRAPH_FINALLY(igraph_vector_int_list_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.06k|    do { \
  |  |  |  |  604|  2.06k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.06k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.06k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.06k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.06k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (59:69): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  452|  2.06k|        IGRAPH_CHECK(igraph_vector_int_list_reserve(&candidates, rank));
  ------------------
  |  |  656|  2.06k|    do { \
  |  |  657|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  453|       |
  454|  2.06k|        mark = 0;
  455|   403k|        for (igraph_int_t i=0; i < no_of_nodes; ++i) {
  ------------------
  |  Branch (455:32): [True: 401k, False: 2.06k]
  ------------------
  456|   401k|            igraph_int_t degree = VECTOR(degrees)[i];
  ------------------
  |  |   60|   401k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  457|   401k|            igraph_bool_t vis = VECTOR(visited)[i] % 3 != 0; /* was vertex i visited already? */
  ------------------
  |  |   60|   401k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  458|       |
  459|       |            /* Generally, we only need to run a BFS from vertices of degree 3 or greater.
  460|       |             * The exception is a connected component which is itself a cycle, and therefore
  461|       |             * only contains vertices of degree 2. Thus from unvisited vertices we always run
  462|       |             * a full BFS while from already visited ones only if their degree is at least 3. */
  463|       |
  464|       |            /* TODO: mark entire component as visited, not just vertex. */
  465|   401k|            if (degree <= 1 || (vis && degree < 3)) {
  ------------------
  |  Branch (465:17): [True: 374k, False: 26.8k]
  |  Branch (465:33): [True: 24.2k, False: 2.54k]
  |  Branch (465:40): [True: 11.7k, False: 12.5k]
  ------------------
  466|   385k|                continue;
  467|   385k|            }
  468|       |
  469|       |            /* TODO: BFS is only necessary from a feedback vertex set, find fast FVS approximation algorithm. */
  470|       |
  471|  15.0k|            IGRAPH_CHECK(igraph_i_fundamental_cycles_bfs(
  ------------------
  |  |  656|  15.0k|    do { \
  |  |  657|  47.8k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  ------------------
  |  |  |  Branch (657:40): [True: 12.5k, False: 2.54k]
  |  |  |  Branch (657:40): [True: 0, False: 2.54k]
  |  |  ------------------
  |  |  658|  15.0k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  15.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 15.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|  15.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 15.0k]
  |  |  ------------------
  ------------------
  472|  15.0k|                    graph, &candidates, i, (vis || !complete) ? bfs_cutoff : -1, &inclist, &visited, mark));
  473|  15.0k|            mark += 3;
  474|  15.0k|        }
  475|       |
  476|  2.06k|        igraph_inclist_destroy(&inclist);
  477|  2.06k|        igraph_vector_int_destroy(&visited);
  478|  2.06k|        igraph_vector_int_destroy(&degrees);
  479|  2.06k|        IGRAPH_FINALLY_CLEAN(3);
  480|  2.06k|    }
  481|       |
  482|       |    /* Sort candidates by size (= weight) and remove duplicates. */
  483|      0|    {
  484|  2.06k|        igraph_int_t cand_count = igraph_vector_int_list_size(&candidates);
  485|       |
  486|   679k|        for (igraph_int_t i=0; i < cand_count; ++i) {
  ------------------
  |  Branch (486:32): [True: 677k, False: 2.06k]
  ------------------
  487|   677k|            igraph_vector_int_sort(igraph_vector_int_list_get_ptr(&candidates, i));
  488|   677k|        }
  489|  2.06k|        igraph_vector_int_list_sort(&candidates, &cycle_cmp);
  490|  2.06k|        igraph_vector_int_list_remove_consecutive_duplicates(&candidates, igraph_vector_int_all_e);
  491|  2.06k|    }
  492|       |
  493|  2.06k|    igraph_vector_int_list_clear(result);
  494|  2.06k|    IGRAPH_CHECK(igraph_vector_int_list_reserve(result, rank));
  ------------------
  |  |  656|  2.06k|    do { \
  |  |  657|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  495|       |
  496|       |    /* Find a complete basis, starting with smallest elements. */
  497|       |    /* This is typically the slowest part of the algorithm. */
  498|  2.06k|    {
  499|  2.06k|        igraph_int_t cand_len = igraph_vector_int_list_size(&candidates);
  500|  2.06k|        igraph_vector_int_list_t reduced_matrix;
  501|  2.06k|        igraph_bool_t independent;
  502|       |
  503|  2.06k|        IGRAPH_VECTOR_INT_LIST_INIT_FINALLY(&reduced_matrix, 0);
  ------------------
  |  |   58|  2.06k|    do { IGRAPH_CHECK(igraph_vector_int_list_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.06k|    do { \
  |  |  |  |  657|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   59|  2.06k|        IGRAPH_FINALLY(igraph_vector_int_list_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.06k|    do { \
  |  |  |  |  604|  2.06k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.06k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.06k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.06k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.06k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (59:69): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  504|       |
  505|  71.8k|        for (igraph_int_t i=0; i < cand_len; ++i) {
  ------------------
  |  Branch (505:32): [True: 71.3k, False: 473]
  ------------------
  506|  71.3k|            const igraph_vector_int_t *cycle = igraph_vector_int_list_get_ptr(&candidates, i);
  507|       |
  508|  71.3k|            IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|  71.3k|    do { \
  |  |   47|  71.3k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 71.3k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|  71.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 71.3k]
  |  |  ------------------
  ------------------
  509|       |
  510|  71.3k|            IGRAPH_CHECK(gaussian_elimination(&reduced_matrix, cycle, &independent));
  ------------------
  |  |  656|  71.3k|    do { \
  |  |  657|  71.3k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  71.3k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  71.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 71.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|  71.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 71.3k]
  |  |  ------------------
  ------------------
  511|  71.3k|            if (independent) {
  ------------------
  |  Branch (511:17): [True: 33.9k, False: 37.4k]
  ------------------
  512|  33.9k|                IGRAPH_CHECK(igraph_vector_int_list_push_back_copy(result, cycle));
  ------------------
  |  |  656|  33.9k|    do { \
  |  |  657|  33.9k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  33.9k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  33.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 33.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|  33.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 33.9k]
  |  |  ------------------
  ------------------
  513|  33.9k|            }
  514|       |
  515|  71.3k|            if (igraph_vector_int_list_size(&reduced_matrix) == rank) {
  ------------------
  |  Branch (515:17): [True: 1.58k, False: 69.7k]
  ------------------
  516|       |                /* We have a complete basis. */
  517|  1.58k|                break;
  518|  1.58k|            }
  519|  71.3k|        }
  520|       |
  521|  2.06k|        igraph_vector_int_list_destroy(&reduced_matrix);
  522|  2.06k|        IGRAPH_FINALLY_CLEAN(1);
  523|  2.06k|    }
  524|       |
  525|      0|    igraph_vector_int_list_destroy(&candidates);
  526|  2.06k|    IGRAPH_FINALLY_CLEAN(1);
  527|       |
  528|  2.06k|    if (use_cycle_order) {
  ------------------
  |  Branch (528:9): [True: 2.06k, False: 0]
  ------------------
  529|  2.06k|        igraph_int_t result_size = igraph_vector_int_list_size(result);
  530|  2.06k|        igraph_vector_int_t tmp;
  531|  2.06k|        IGRAPH_VECTOR_INT_INIT_FINALLY(&tmp, 0);
  ------------------
  |  |  119|  2.06k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.06k|    do { \
  |  |  |  |  657|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.06k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.06k|    do { \
  |  |  |  |  604|  2.06k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.06k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.06k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.06k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.06k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  532|  36.0k|        for (igraph_int_t i=0; i < result_size; ++i) {
  ------------------
  |  Branch (532:32): [True: 33.9k, False: 2.06k]
  ------------------
  533|  33.9k|            igraph_vector_int_t *cycle = igraph_vector_int_list_get_ptr(result, i);
  534|  33.9k|            IGRAPH_CHECK(igraph_vector_int_update(&tmp, cycle));
  ------------------
  |  |  656|  33.9k|    do { \
  |  |  657|  33.9k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  33.9k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  33.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 33.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|  33.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 33.9k]
  |  |  ------------------
  ------------------
  535|  33.9k|            IGRAPH_CHECK(igraph_i_order_cycle(graph, &tmp, cycle));
  ------------------
  |  |  656|  33.9k|    do { \
  |  |  657|  33.9k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  33.9k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  33.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 33.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|  33.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 33.9k]
  |  |  ------------------
  ------------------
  536|  33.9k|        }
  537|  2.06k|        igraph_vector_int_destroy(&tmp);
  538|  2.06k|        IGRAPH_FINALLY_CLEAN(1);
  539|  2.06k|    }
  540|       |
  541|  2.06k|    return IGRAPH_SUCCESS;
  542|  2.06k|}
cycle_bases.c:igraph_i_fundamental_cycles_bfs:
   53|   379k|        igraph_int_t mark /* mark used in 'visited' */) {
   54|       |
   55|   379k|    const igraph_int_t no_of_nodes = igraph_vcount(graph);
   56|   379k|    igraph_dqueue_int_t q;
   57|   379k|    igraph_vector_int_t pred_edge;
   58|   379k|    igraph_vector_int_t u_back, v_back;
   59|       |
   60|   379k|    if (start_vid < 0 || start_vid >= no_of_nodes) {
  ------------------
  |  Branch (60:9): [True: 0, False: 379k]
  |  Branch (60:26): [True: 0, False: 379k]
  ------------------
   61|      0|        IGRAPH_ERROR("Invalid starting vertex id.", 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]
  |  |  ------------------
  ------------------
   62|      0|    }
   63|       |
   64|   379k|    if (mark > IGRAPH_INTEGER_MAX - 2) {
  ------------------
  |  |   72|   379k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (64:9): [True: 0, False: 379k]
  ------------------
   65|      0|        IGRAPH_ERROR("Graph too large for cycle basis.", 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]
  |  |  ------------------
  ------------------
   66|      0|    }
   67|       |
   68|   379k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&pred_edge, no_of_nodes);
  ------------------
  |  |  119|   379k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|   379k|    do { \
  |  |  |  |  657|   379k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|   379k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|   379k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 379k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|   379k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 379k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|   379k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|   379k|    do { \
  |  |  |  |  604|   379k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|   379k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|   379k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|   379k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 379k]
  |  |  |  |  ------------------
  |  |  |  |  608|   379k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|   379k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 379k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 379k]
  |  |  ------------------
  ------------------
   69|   379k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&u_back, 0);
  ------------------
  |  |  119|   379k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|   379k|    do { \
  |  |  |  |  657|   379k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|   379k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|   379k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 379k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|   379k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 379k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|   379k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|   379k|    do { \
  |  |  |  |  604|   379k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|   379k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|   379k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|   379k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 379k]
  |  |  |  |  ------------------
  |  |  |  |  608|   379k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|   379k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 379k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 379k]
  |  |  ------------------
  ------------------
   70|   379k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&v_back, 0);
  ------------------
  |  |  119|   379k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|   379k|    do { \
  |  |  |  |  657|   379k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|   379k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|   379k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 379k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|   379k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 379k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|   379k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|   379k|    do { \
  |  |  |  |  604|   379k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|   379k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|   379k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|   379k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 379k]
  |  |  |  |  ------------------
  |  |  |  |  608|   379k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|   379k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 379k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 379k]
  |  |  ------------------
  ------------------
   71|       |
   72|   379k|    IGRAPH_DQUEUE_INT_INIT_FINALLY(&q, 0);
  ------------------
  |  |   61|   379k|    do { IGRAPH_CHECK(igraph_dqueue_int_init(q, capacity)); \
  |  |  ------------------
  |  |  |  |  656|   379k|    do { \
  |  |  |  |  657|   379k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|   379k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|   379k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 379k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|   379k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 379k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|   379k|        IGRAPH_FINALLY(igraph_dqueue_int_destroy, q); } while (0)
  |  |  ------------------
  |  |  |  |  603|   379k|    do { \
  |  |  |  |  604|   379k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|   379k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|   379k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|   379k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 379k]
  |  |  |  |  ------------------
  |  |  |  |  608|   379k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|   379k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 379k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (62:64): [Folded, False: 379k]
  |  |  ------------------
  ------------------
   73|       |
   74|   379k|    IGRAPH_CHECK(igraph_dqueue_int_push(&q, start_vid)); /* vertex id */
  ------------------
  |  |  656|   379k|    do { \
  |  |  657|   379k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   379k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   379k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 379k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   379k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 379k]
  |  |  ------------------
  ------------------
   75|   379k|    IGRAPH_CHECK(igraph_dqueue_int_push(&q, 0)); /* distance from start_vid*/
  ------------------
  |  |  656|   379k|    do { \
  |  |  657|   379k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   379k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   379k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 379k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   379k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 379k]
  |  |  ------------------
  ------------------
   76|   379k|    VECTOR(*visited)[start_vid] = mark + 1; /* mark as seen */
  ------------------
  |  |   60|   379k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   77|   379k|    VECTOR(pred_edge)[start_vid] = -1; /* non-valid predecessor edge id for root vertex */
  ------------------
  |  |   60|   379k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   78|       |
   79|  1.48M|    while (! igraph_dqueue_int_empty(&q)) {
  ------------------
  |  Branch (79:12): [True: 1.11M, False: 379k]
  ------------------
   80|  1.11M|        igraph_int_t v = igraph_dqueue_int_pop(&q);
   81|  1.11M|        igraph_int_t vdist = igraph_dqueue_int_pop(&q);
   82|       |
   83|  1.11M|        igraph_vector_int_t *incs = igraph_inclist_get(inclist, v);
  ------------------
  |  |  102|  1.11M|#define igraph_inclist_get(il,no) (&(il)->incs[(igraph_int_t)(no)])
  ------------------
   84|  1.11M|        igraph_int_t n = igraph_vector_int_size(incs);
   85|  1.11M|        igraph_int_t i, j;
   86|       |
   87|  1.11M|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|  1.11M|    do { \
  |  |   47|  1.11M|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 1.11M]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|  1.11M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 1.11M]
  |  |  ------------------
  ------------------
   88|       |
   89|  3.88M|        for (i=0; i < n; ++i) {
  ------------------
  |  Branch (89:19): [True: 2.77M, False: 1.11M]
  ------------------
   90|  2.77M|            igraph_int_t e = VECTOR(*incs)[i];
  ------------------
  |  |   60|  2.77M|#define VECTOR(v) ((v).stor_begin)
  ------------------
   91|  2.77M|            igraph_int_t u = IGRAPH_OTHER(graph, e, v);
  ------------------
  |  |  146|  2.77M|    ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|  2.77M|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  2.77M|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  115|  1.44M|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  1.44M|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|  1.33M|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  1.33M|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (146:21): [True: 1.44M, False: 1.33M]
  |  |  ------------------
  ------------------
   92|       |
   93|  2.77M|            if (e == VECTOR(pred_edge)[v]) {
  ------------------
  |  |   60|  2.77M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (93:17): [True: 731k, False: 2.04M]
  ------------------
   94|       |                /* do not follow the edge through which we came to v */
   95|   731k|                continue;
   96|   731k|            }
   97|       |
   98|  2.04M|            if (VECTOR(*visited)[u] == mark + 2) {
  ------------------
  |  |   60|  2.04M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (98:17): [True: 602k, False: 1.44M]
  ------------------
   99|       |                /* u has already been processed */
  100|   602k|                continue;
  101|  1.44M|            } else if (VECTOR(*visited)[u] == mark + 1) {
  ------------------
  |  |   60|  1.44M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (101:24): [True: 711k, False: 731k]
  ------------------
  102|       |                /* u has been seen but not yet processed */
  103|       |
  104|       |                /* Found cycle edge u-v. Now we walk back up the BFS tree
  105|       |                 * in order to find the common ancestor of u and v. We exploit
  106|       |                 * that the distance of u from the start vertex is either the
  107|       |                 * same as that of v, or one greater. */
  108|       |
  109|   711k|                igraph_int_t up = u, vp = v;
  110|   711k|                igraph_int_t u_back_len, v_back_len;
  111|   711k|                igraph_vector_int_t cycle;
  112|       |
  113|   711k|                IGRAPH_CHECK(igraph_vector_int_push_back(&v_back, e));
  ------------------
  |  |  656|   711k|    do { \
  |  |  657|   711k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   711k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   711k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 711k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   711k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 711k]
  |  |  ------------------
  ------------------
  114|  1.67M|                for (;;) {
  115|  1.67M|                    igraph_int_t upe, vpe;
  116|       |
  117|  1.67M|                    if (up == vp) {
  ------------------
  |  Branch (117:25): [True: 261k, False: 1.40M]
  ------------------
  118|   261k|                        break;
  119|   261k|                    }
  120|       |
  121|  1.40M|                    upe = VECTOR(pred_edge)[up];
  ------------------
  |  |   60|  1.40M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  122|  1.40M|                    IGRAPH_CHECK(igraph_vector_int_push_back(&u_back, upe));
  ------------------
  |  |  656|  1.40M|    do { \
  |  |  657|  1.40M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.40M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.40M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.40M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, 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.40M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.40M]
  |  |  ------------------
  ------------------
  123|  1.40M|                    up = IGRAPH_OTHER(graph, upe, up);
  ------------------
  |  |  146|  1.40M|    ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|  1.40M|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  1.40M|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  115|   740k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   740k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|   668k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   668k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (146:21): [True: 740k, False: 668k]
  |  |  ------------------
  ------------------
  124|       |
  125|  1.40M|                    if (up == vp) {
  ------------------
  |  Branch (125:25): [True: 449k, False: 959k]
  ------------------
  126|   449k|                        break;
  127|   449k|                    }
  128|       |
  129|   959k|                    vpe = VECTOR(pred_edge)[vp];
  ------------------
  |  |   60|   959k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  130|   959k|                    IGRAPH_CHECK(igraph_vector_int_push_back(&v_back, vpe));
  ------------------
  |  |  656|   959k|    do { \
  |  |  657|   959k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   959k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   959k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 959k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   959k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 959k]
  |  |  ------------------
  ------------------
  131|   959k|                    vp = IGRAPH_OTHER(graph, vpe, vp);
  ------------------
  |  |  146|   959k|    ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|   959k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   959k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  115|   493k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   493k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|   465k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   465k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (146:21): [True: 493k, False: 465k]
  |  |  ------------------
  ------------------
  132|   959k|                }
  133|       |
  134|   711k|                u_back_len = igraph_vector_int_size(&u_back);
  135|   711k|                v_back_len = igraph_vector_int_size(&v_back);
  136|   711k|                IGRAPH_VECTOR_INT_INIT_FINALLY(&cycle, u_back_len + v_back_len);
  ------------------
  |  |  119|   711k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|   711k|    do { \
  |  |  |  |  657|   711k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|   711k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|   711k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 711k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|   711k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 711k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|   711k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|   711k|    do { \
  |  |  |  |  604|   711k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|   711k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|   711k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|   711k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 711k]
  |  |  |  |  ------------------
  |  |  |  |  608|   711k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|   711k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 711k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 711k]
  |  |  ------------------
  ------------------
  137|       |
  138|  2.38M|                for (j=0; j < v_back_len; ++j) {
  ------------------
  |  Branch (138:27): [True: 1.67M, False: 711k]
  ------------------
  139|  1.67M|                    VECTOR(cycle)[j] = VECTOR(v_back)[j];
  ------------------
  |  |   60|  1.67M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  VECTOR(cycle)[j] = VECTOR(v_back)[j];
  ------------------
  |  |   60|  1.67M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  140|  1.67M|                }
  141|  2.12M|                for (j=0; j < u_back_len; ++j) {
  ------------------
  |  Branch (141:27): [True: 1.40M, False: 711k]
  ------------------
  142|  1.40M|                    VECTOR(cycle)[v_back_len + j] = VECTOR(u_back)[u_back_len - j - 1];
  ------------------
  |  |   60|  1.40M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  VECTOR(cycle)[v_back_len + j] = VECTOR(u_back)[u_back_len - j - 1];
  ------------------
  |  |   60|  1.40M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  143|  1.40M|                }
  144|       |
  145|   711k|                igraph_vector_int_clear(&v_back);
  146|   711k|                igraph_vector_int_clear(&u_back);
  147|       |
  148|   711k|                IGRAPH_CHECK(igraph_vector_int_list_push_back(result, &cycle));
  ------------------
  |  |  656|   711k|    do { \
  |  |  657|   711k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   711k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   711k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 711k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   711k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 711k]
  |  |  ------------------
  ------------------
  149|   711k|                IGRAPH_FINALLY_CLEAN(1); /* pass ownership of 'cycle' to 'result' */
  150|   731k|            } else {
  151|       |                /* encountering u for the first time, queue it for processing */
  152|       |
  153|       |                /* Only queue vertices with distance at most 'bfs_cutoff' from the root. */
  154|       |                /* Negative 'bfs_cutoff' indicates no cutoff. */
  155|   731k|                if (bfs_cutoff < 0 || vdist < bfs_cutoff) {
  ------------------
  |  Branch (155:21): [True: 731k, False: 0]
  |  Branch (155:39): [True: 0, False: 0]
  ------------------
  156|   731k|                    IGRAPH_CHECK(igraph_dqueue_int_push(&q, u));
  ------------------
  |  |  656|   731k|    do { \
  |  |  657|   731k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   731k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   731k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 731k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   731k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 731k]
  |  |  ------------------
  ------------------
  157|   731k|                    IGRAPH_CHECK(igraph_dqueue_int_push(&q, vdist + 1));
  ------------------
  |  |  656|   731k|    do { \
  |  |  657|   731k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   731k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   731k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 731k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   731k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 731k]
  |  |  ------------------
  ------------------
  158|   731k|                    VECTOR(*visited)[u] = mark + 1;
  ------------------
  |  |   60|   731k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  159|   731k|                    VECTOR(pred_edge)[u] = e;
  ------------------
  |  |   60|   731k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  160|   731k|                }
  161|   731k|            }
  162|  2.04M|        }
  163|       |
  164|  1.11M|        VECTOR(*visited)[v] = mark + 2; /* mark v as processed */
  ------------------
  |  |   60|  1.11M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  165|  1.11M|    } /* ! igraph_dqueue_int_empty(&q) */
  166|       |
  167|   379k|    igraph_dqueue_int_destroy(&q);
  168|   379k|    igraph_vector_int_destroy(&v_back);
  169|   379k|    igraph_vector_int_destroy(&u_back);
  170|   379k|    igraph_vector_int_destroy(&pred_edge);
  171|   379k|    IGRAPH_FINALLY_CLEAN(4);
  172|       |
  173|   379k|    return IGRAPH_SUCCESS;
  174|   379k|}
cycle_bases.c:cycle_cmp:
  265|  4.87M|static int cycle_cmp(const igraph_vector_int_t *v1, const igraph_vector_int_t *v2) {
  266|  4.87M|    igraph_int_t n1 = igraph_vector_int_size(v1), n2 = igraph_vector_int_size(v2);
  267|       |
  268|  4.87M|    if (n1 < n2) {
  ------------------
  |  Branch (268:9): [True: 603k, False: 4.27M]
  ------------------
  269|   603k|        return -1;
  270|  4.27M|    } else if (n1 > n2) {
  ------------------
  |  Branch (270:16): [True: 724k, False: 3.55M]
  ------------------
  271|   724k|        return 1;
  272|  3.55M|    } else {
  273|  3.55M|        return igraph_vector_int_lex_cmp(v1, v2);
  274|  3.55M|    }
  275|  4.87M|}
cycle_bases.c:gaussian_elimination:
  324|  71.3k|                                           igraph_bool_t *independent) {
  325|       |
  326|  71.3k|    const igraph_int_t nrow = igraph_vector_int_list_size(reduced_matrix);
  327|  71.3k|    igraph_int_t i;
  328|       |
  329|  71.3k|    igraph_vector_int_t work, tmp;
  330|       |
  331|  71.3k|    IGRAPH_CHECK(igraph_vector_int_init_copy(&work, cycle));
  ------------------
  |  |  656|  71.3k|    do { \
  |  |  657|  71.3k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  71.3k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  71.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 71.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|  71.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 71.3k]
  |  |  ------------------
  ------------------
  332|  71.3k|    IGRAPH_FINALLY(igraph_vector_int_destroy, &work);
  ------------------
  |  |  603|  71.3k|    do { \
  |  |  604|  71.3k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  71.3k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  71.3k|         * incorrect destructor function with the pointer */ \
  |  |  607|  71.3k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 71.3k]
  |  |  ------------------
  |  |  608|  71.3k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  71.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 71.3k]
  |  |  ------------------
  ------------------
  333|       |
  334|  71.3k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&tmp, 0);
  ------------------
  |  |  119|  71.3k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  71.3k|    do { \
  |  |  |  |  657|  71.3k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  71.3k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  71.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 71.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|  71.3k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 71.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  71.3k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  71.3k|    do { \
  |  |  |  |  604|  71.3k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  71.3k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  71.3k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  71.3k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 71.3k]
  |  |  |  |  ------------------
  |  |  |  |  608|  71.3k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  71.3k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 71.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 71.3k]
  |  |  ------------------
  ------------------
  335|       |
  336|  3.80M|    for (i=0; i < nrow; ++i) {
  ------------------
  |  Branch (336:15): [True: 3.78M, False: 19.5k]
  ------------------
  337|  3.78M|        igraph_vector_int_t *row = MATROW(*reduced_matrix, i);
  ------------------
  |  |  316|  3.78M|#define MATROW(m, i) (&VECTOR(m)[i])
  |  |  ------------------
  |  |  |  |   60|  3.78M|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  338|       |
  339|  3.78M|        if ( VECTOR(*row)[0] < VECTOR(work)[0] ) {
  ------------------
  |  |   60|  3.78M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      if ( VECTOR(*row)[0] < VECTOR(work)[0] ) {
  ------------------
  |  |   60|  3.78M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (339:14): [True: 3.51M, False: 264k]
  ------------------
  340|  3.51M|            continue;
  341|  3.51M|        } else if ( VECTOR(*row)[0] == VECTOR(work)[0] ) {
  ------------------
  |  |   60|   264k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      } else if ( VECTOR(*row)[0] == VECTOR(work)[0] ) {
  ------------------
  |  |   60|   264k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (341:21): [True: 250k, False: 14.3k]
  ------------------
  342|   250k|            IGRAPH_CHECK(cycle_add(row, &work, &tmp));
  ------------------
  |  |  656|   250k|    do { \
  |  |  657|   250k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   250k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   250k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 250k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   250k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 250k]
  |  |  ------------------
  ------------------
  343|   250k|            if (igraph_vector_int_empty(&tmp)) {
  ------------------
  |  Branch (343:17): [True: 37.4k, False: 212k]
  ------------------
  344|  37.4k|                *independent = false;
  345|  37.4k|                igraph_vector_int_destroy(&work);
  346|  37.4k|                igraph_vector_int_destroy(&tmp);
  347|  37.4k|                IGRAPH_FINALLY_CLEAN(2);
  348|  37.4k|                return IGRAPH_SUCCESS;
  349|  37.4k|            }
  350|   212k|            igraph_vector_int_swap(&work, &tmp);
  351|   212k|        } else { /* VECTOR(*row)[0] > VECTOR(work)[0] */
  352|  14.3k|            break;
  353|  14.3k|        }
  354|  3.78M|    }
  355|       |
  356|       |    /* 'cycle' was linearly independent, insert new row into matrix */
  357|  33.9k|    *independent = true;
  358|  33.9k|    IGRAPH_CHECK(igraph_vector_int_list_insert(reduced_matrix, i, &work)); /* transfers ownership */
  ------------------
  |  |  656|  33.9k|    do { \
  |  |  657|  33.9k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  33.9k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  33.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 33.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|  33.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 33.9k]
  |  |  ------------------
  ------------------
  359|       |
  360|  33.9k|    igraph_vector_int_destroy(&tmp);
  361|  33.9k|    IGRAPH_FINALLY_CLEAN(2); /* +1, transferring ownership of 'work' to 'reduced_matrix' */
  362|       |
  363|  33.9k|    return IGRAPH_SUCCESS;
  364|  33.9k|}
cycle_bases.c:cycle_add:
  278|   250k|static igraph_error_t cycle_add(const igraph_vector_int_t *a, const igraph_vector_int_t *b, igraph_vector_int_t *res) {
  279|   250k|    igraph_int_t na = igraph_vector_int_size(a), nb = igraph_vector_int_size(b);
  280|   250k|    const igraph_int_t *pa = VECTOR(*a), *pb = VECTOR(*b);
  ------------------
  |  |   60|   250k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                  const igraph_int_t *pa = VECTOR(*a), *pb = VECTOR(*b);
  ------------------
  |  |   60|   250k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  281|   250k|    const igraph_int_t *pa_end = pa + na, *pb_end = pb + nb;
  282|       |
  283|   250k|    igraph_vector_int_clear(res);
  284|   658k|    for (;;) {
  285|  1.04M|        while (pa != pa_end && pb != pb_end && *pa < *pb) {
  ------------------
  |  Branch (285:16): [True: 919k, False: 124k]
  |  Branch (285:32): [True: 919k, False: 0]
  |  Branch (285:48): [True: 385k, False: 534k]
  ------------------
  286|   385k|            IGRAPH_CHECK(igraph_vector_int_push_back(res, *pa));
  ------------------
  |  |  656|   385k|    do { \
  |  |  657|   385k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   385k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   385k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 385k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   385k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 385k]
  |  |  ------------------
  ------------------
  287|   385k|            pa++;
  288|   385k|        }
  289|  1.34M|        while (pa != pa_end && pb != pb_end && *pa == *pb) {
  ------------------
  |  Branch (289:16): [True: 1.12M, False: 214k]
  |  Branch (289:32): [True: 1.11M, False: 6.55k]
  |  Branch (289:48): [True: 682k, False: 437k]
  ------------------
  290|   682k|            pa++; pb++;
  291|   682k|        }
  292|  1.31M|        while (pa != pa_end && pb != pb_end && *pb < *pa) {
  ------------------
  |  Branch (292:16): [True: 1.10M, False: 214k]
  |  Branch (292:32): [True: 1.06M, False: 35.2k]
  |  Branch (292:48): [True: 656k, False: 408k]
  ------------------
  293|   656k|            IGRAPH_CHECK(igraph_vector_int_push_back(res, *pb));
  ------------------
  |  |  656|   656k|    do { \
  |  |  657|   656k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   656k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   656k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 656k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   656k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 656k]
  |  |  ------------------
  ------------------
  294|   656k|            pb++;
  295|   656k|        }
  296|   658k|        if (pa == pa_end) {
  ------------------
  |  Branch (296:13): [True: 214k, False: 443k]
  ------------------
  297|   588k|            while (pb != pb_end) {
  ------------------
  |  Branch (297:20): [True: 373k, False: 214k]
  ------------------
  298|   373k|                IGRAPH_CHECK(igraph_vector_int_push_back(res, *pb));
  ------------------
  |  |  656|   373k|    do { \
  |  |  657|   373k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   373k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   373k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 373k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   373k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 373k]
  |  |  ------------------
  ------------------
  299|   373k|                pb++;
  300|   373k|            }
  301|   214k|            break;
  302|   214k|        }
  303|   443k|        if (pb == pb_end) {
  ------------------
  |  Branch (303:13): [True: 35.2k, False: 408k]
  ------------------
  304|  81.3k|            while (pa != pa_end) {
  ------------------
  |  Branch (304:20): [True: 46.0k, False: 35.2k]
  ------------------
  305|  46.0k|                IGRAPH_CHECK(igraph_vector_int_push_back(res, *pa));
  ------------------
  |  |  656|  46.0k|    do { \
  |  |  657|  46.0k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  46.0k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  46.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 46.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  46.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 46.0k]
  |  |  ------------------
  ------------------
  306|  46.0k|                pa++;
  307|  46.0k|            }
  308|  35.2k|            break;
  309|  35.2k|        }
  310|   443k|    }
  311|       |
  312|   250k|    return IGRAPH_SUCCESS;
  313|   250k|}

igraph_i_order_cycle:
   44|  33.9k|        igraph_vector_int_t *res) {
   45|       |
   46|  33.9k|    IGRAPH_HANDLE_EXCEPTIONS_BEGIN;
  ------------------
  |  |   21|  33.9k|    try {
  ------------------
   47|       |
   48|  33.9k|    igraph_int_t n = igraph_vector_int_size(cycle);
   49|  33.9k|    IGRAPH_ASSERT(n > 0);
  ------------------
  |  |  924|  33.9k|    do { \
  |  |  925|  33.9k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  33.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 33.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  33.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 33.9k]
  |  |  ------------------
  ------------------
   50|       |
   51|  33.9k|    std::map<igraph_int_t, eid_pair_t> inclist;
   52|   117k|    for (igraph_int_t i=0; i < n; ++i) {
  ------------------
  |  Branch (52:28): [True: 83.0k, False: 33.9k]
  ------------------
   53|  83.0k|        igraph_int_t eid = VECTOR(*cycle)[i];
  ------------------
  |  |   60|  83.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   54|       |
   55|  83.0k|        {
   56|  83.0k|            igraph_int_t from = IGRAPH_FROM(graph, eid);
  ------------------
  |  |  115|  83.0k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  83.0k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
   57|  83.0k|            auto &p = inclist[from];
   58|  83.0k|            if (p.first < 0) {
  ------------------
  |  Branch (58:17): [True: 47.4k, False: 35.5k]
  ------------------
   59|  47.4k|                p.first = eid;
   60|  47.4k|            } else {
   61|  35.5k|                IGRAPH_ASSERT(p.second < 0);
  ------------------
  |  |  924|  35.5k|    do { \
  |  |  925|  35.5k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  35.5k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 35.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  35.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 35.5k]
  |  |  ------------------
  ------------------
   62|  35.5k|                p.second = eid;
   63|  35.5k|            }
   64|  83.0k|        }
   65|       |
   66|  83.0k|        {
   67|  83.0k|            igraph_int_t to = IGRAPH_TO(graph, eid);
  ------------------
  |  |  128|  83.0k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  83.0k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
   68|  83.0k|            auto &p = inclist[to];
   69|  83.0k|            if (p.first < 0) {
  ------------------
  |  Branch (69:17): [True: 35.5k, False: 47.4k]
  ------------------
   70|  35.5k|                p.first = eid;
   71|  47.4k|            } else {
   72|  47.4k|                IGRAPH_ASSERT(p.second < 0);
  ------------------
  |  |  924|  47.4k|    do { \
  |  |  925|  47.4k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  47.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 47.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  47.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 47.4k]
  |  |  ------------------
  ------------------
   73|  47.4k|                p.second = eid;
   74|  47.4k|            }
   75|  83.0k|        }
   76|  83.0k|    }
   77|       |
   78|  33.9k|    igraph_vector_int_clear(res);
   79|  33.9k|    IGRAPH_CHECK(igraph_vector_int_reserve(res, igraph_vector_int_size(cycle)));
  ------------------
  |  |  656|  33.9k|    do { \
  |  |  657|  33.9k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  33.9k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  33.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 33.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|  33.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 33.9k]
  |  |  ------------------
  ------------------
   80|  33.9k|    igraph_int_t current_e = VECTOR(*cycle)[0];
  ------------------
  |  |   60|  33.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   81|  33.9k|    igraph_int_t current_v = IGRAPH_FROM(graph, current_e);
  ------------------
  |  |  115|  33.9k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  33.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
   82|   117k|    for (igraph_int_t i=0; i < n; ++i) {
  ------------------
  |  Branch (82:28): [True: 83.0k, False: 33.9k]
  ------------------
   83|  83.0k|        const auto &p = inclist.at(current_v);
   84|  83.0k|        igraph_vector_int_push_back(res, current_e); /* reserved */
   85|  83.0k|        igraph_int_t next_e = p.first;
   86|  83.0k|        if (next_e == current_e) {
  ------------------
  |  Branch (86:13): [True: 47.3k, False: 35.7k]
  ------------------
   87|  47.3k|            next_e = p.second;
   88|  47.3k|        }
   89|  83.0k|        current_e = next_e;
   90|  83.0k|        igraph_int_t next_v = IGRAPH_FROM(graph, current_e);
  ------------------
  |  |  115|  83.0k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  83.0k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
   91|  83.0k|        if (next_v == current_v) {
  ------------------
  |  Branch (91:13): [True: 36.9k, False: 46.1k]
  ------------------
   92|  36.9k|            next_v = IGRAPH_TO(graph, current_e);
  ------------------
  |  |  128|  36.9k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  36.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
   93|  36.9k|        }
   94|  83.0k|        current_v = next_v;
   95|  83.0k|    }
   96|       |
   97|  33.9k|    IGRAPH_HANDLE_EXCEPTIONS_END;
  ------------------
  |  |   23|  33.9k|    } \
  |  |   24|  33.9k|    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|  33.9k|    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|  33.9k|    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|  33.9k|    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]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   98|       |
   99|  33.9k|    return IGRAPH_SUCCESS;
  100|  33.9k|}
_ZN10eid_pair_tC2Ev:
   30|  83.0k|    eid_pair_t() : std::pair<igraph_int_t, igraph_int_t>(-1, -1) { }

igraph_adjlist_init:
  155|  26.6k|                        igraph_bool_t multiple) {
  156|       |
  157|  26.6k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  158|  26.6k|    igraph_vector_int_t degrees;
  159|  26.6k|    int iter = 0;
  160|       |
  161|  26.6k|    multiple = !!multiple; /* normalize Boolean value to enable == comparisons below */
  162|       |
  163|  26.6k|    if (mode != IGRAPH_IN && mode != IGRAPH_OUT && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (163:9): [True: 22.6k, False: 4.06k]
  |  Branch (163:30): [True: 10.3k, False: 12.3k]
  |  Branch (163:52): [True: 0, False: 10.3k]
  ------------------
  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|  26.6k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (167:9): [True: 4.12k, False: 22.5k]
  ------------------
  168|  4.12k|        mode = IGRAPH_ALL;
  169|  4.12k|    }
  170|       |
  171|  26.6k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&degrees, no_of_nodes);
  ------------------
  |  |  119|  26.6k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  26.6k|    do { \
  |  |  |  |  657|  26.6k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  26.6k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  26.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 26.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  26.6k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 26.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  26.6k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  26.6k|    do { \
  |  |  |  |  604|  26.6k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  26.6k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  26.6k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  26.6k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 26.6k]
  |  |  |  |  ------------------
  |  |  |  |  608|  26.6k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  26.6k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 26.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 26.6k]
  |  |  ------------------
  ------------------
  172|       |    /* igraph_degree() is fast when loops=true */
  173|  26.6k|    IGRAPH_CHECK(igraph_degree(graph, &degrees, igraph_vss_all(), mode, IGRAPH_LOOPS));
  ------------------
  |  |  656|  26.6k|    do { \
  |  |  657|  26.6k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  26.6k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  26.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 26.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  26.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 26.6k]
  |  |  ------------------
  ------------------
  174|       |
  175|  26.6k|    al->length = no_of_nodes;
  176|  26.6k|    al->adjs = IGRAPH_CALLOC(al->length, igraph_vector_int_t);
  ------------------
  |  |   33|  26.6k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  53.3k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 26.6k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 26.6k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 26.6k, False: 12]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  177|  26.6k|    IGRAPH_CHECK_OOM(al->adjs, "Insufficient memory for creating adjacency list view.");
  ------------------
  |  |  709|  26.6k|    do { \
  |  |  710|  26.6k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  26.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 26.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|  26.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 26.6k]
  |  |  ------------------
  ------------------
  178|  26.6k|    IGRAPH_FINALLY(igraph_adjlist_destroy, al);
  ------------------
  |  |  603|  26.6k|    do { \
  |  |  604|  26.6k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  26.6k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  26.6k|         * incorrect destructor function with the pointer */ \
  |  |  607|  26.6k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 26.6k]
  |  |  ------------------
  |  |  608|  26.6k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  26.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 26.6k]
  |  |  ------------------
  ------------------
  179|       |
  180|       |    /* if we already know there are no multi-edges, they don't need to be removed */
  181|  26.6k|    if (igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_MULTI) &&
  ------------------
  |  Branch (181:9): [True: 7.78k, False: 18.8k]
  ------------------
  182|  7.78k|        !igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_HAS_MULTI)) {
  ------------------
  |  Branch (182:9): [True: 7.78k, False: 0]
  ------------------
  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.78k|        if (igraph_is_directed(graph) && mode == IGRAPH_ALL) {
  ------------------
  |  Branch (186:13): [True: 7.78k, False: 0]
  |  Branch (186:42): [True: 1.94k, False: 5.83k]
  ------------------
  187|  1.94k|            if (igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_MUTUAL) &&
  ------------------
  |  Branch (187:17): [True: 0, False: 1.94k]
  ------------------
  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|  5.83k|        } else {
  192|  5.83k|            multiple = IGRAPH_MULTIPLE;
  193|  5.83k|        }
  194|  7.78k|    }
  195|       |
  196|       |    /* if we already know there are no loops, they don't need to be removed */
  197|  26.6k|    if (igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_LOOP) &&
  ------------------
  |  Branch (197:9): [True: 16.3k, False: 10.3k]
  ------------------
  198|  16.3k|        !igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_HAS_LOOP)) {
  ------------------
  |  Branch (198:9): [True: 10.2k, False: 6.08k]
  ------------------
  199|  10.2k|        if (mode == IGRAPH_ALL) {
  ------------------
  |  Branch (199:13): [True: 2.58k, False: 7.70k]
  ------------------
  200|  2.58k|            loops = IGRAPH_LOOPS_TWICE;
  201|  7.70k|        } else {
  202|  7.70k|            loops = IGRAPH_LOOPS_ONCE;
  203|  7.70k|        }
  204|  10.2k|    }
  205|       |
  206|  26.6k|    igraph_bool_t has_loops = false;
  207|  26.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|  5.23M|    for (igraph_int_t i = 0; i < al->length; i++) {
  ------------------
  |  Branch (215:30): [True: 5.21M, False: 26.6k]
  ------------------
  216|  5.21M|        IGRAPH_ALLOW_INTERRUPTION_LIMITED(iter, 1000);
  ------------------
  |  |   71|  5.21M|    do { \
  |  |   72|  5.21M|        if (++iter >= skips) { \
  |  |  ------------------
  |  |  |  Branch (72:13): [True: 0, False: 5.21M]
  |  |  ------------------
  |  |   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|  5.21M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (76:14): [Folded, False: 5.21M]
  |  |  ------------------
  ------------------
  217|       |
  218|  5.21M|        IGRAPH_CHECK(igraph_vector_int_init(&al->adjs[i], VECTOR(degrees)[i]));
  ------------------
  |  |  656|  5.21M|    do { \
  |  |  657|  5.21M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  5.21M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  5.21M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.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|  5.21M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 5.21M]
  |  |  ------------------
  ------------------
  219|  5.21M|        IGRAPH_CHECK(igraph_neighbors(graph, &al->adjs[i], i, mode, IGRAPH_LOOPS, IGRAPH_MULTIPLE));
  ------------------
  |  |  656|  5.21M|    do { \
  |  |  657|  5.21M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  5.21M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  5.21M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.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|  5.21M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 5.21M]
  |  |  ------------------
  ------------------
  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|  5.21M|        IGRAPH_CHECK(igraph_i_simplify_sorted_int_adjacency_vector_in_place(
  ------------------
  |  |  656|  5.21M|    do { \
  |  |  657|  5.21M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  5.21M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  5.21M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.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|  5.21M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 5.21M]
  |  |  ------------------
  ------------------
  224|  5.21M|            &al->adjs[i], i, mode, loops, multiple, &has_loops, &has_multiple
  225|  5.21M|        ));
  226|  5.21M|    }
  227|  26.6k|    if (has_loops) {
  ------------------
  |  Branch (227:9): [True: 3.07k, False: 23.6k]
  ------------------
  228|       |        /* If we have found at least one loop above, set the cache to true. */
  229|  3.07k|        igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_HAS_LOOP, true);
  230|  23.6k|    } else if (loops == IGRAPH_NO_LOOPS) {
  ------------------
  |  Branch (230:16): [True: 1.29k, False: 22.3k]
  ------------------
  231|       |        /* If we explicitly _checked_ for loops (to remove them) and haven't
  232|       |         * found one, set the cache to false. This is the only case when a
  233|       |         * definite "no" from has_loops really means that there are no loops at
  234|       |         * all. */
  235|  1.29k|        igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_HAS_LOOP, false);
  236|  1.29k|    }
  237|  26.6k|    if (has_multiple) {
  ------------------
  |  Branch (237:9): [True: 3.25k, False: 23.4k]
  ------------------
  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|  3.25k|        if (! igraph_is_directed(graph) || mode != IGRAPH_ALL) {
  ------------------
  |  Branch (241:13): [True: 0, False: 3.25k]
  |  Branch (241:44): [True: 0, False: 3.25k]
  ------------------
  242|      0|            igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_HAS_MULTI, true);
  243|      0|        }
  244|  23.4k|    } else if (multiple == IGRAPH_NO_MULTIPLE) {
  ------------------
  |  Branch (244:16): [True: 2.92k, False: 20.4k]
  ------------------
  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|  2.92k|        igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_HAS_MULTI, false);
  250|  2.92k|    }
  251|       |
  252|  26.6k|    igraph_vector_int_destroy(&degrees);
  253|  26.6k|    IGRAPH_FINALLY_CLEAN(2); /* + igraph_adjlist_destroy */
  254|       |
  255|  26.6k|    return IGRAPH_SUCCESS;
  256|  26.6k|}
igraph_adjlist_init_empty:
  272|  4.12k|igraph_error_t igraph_adjlist_init_empty(igraph_adjlist_t *al, igraph_int_t no_of_nodes) {
  273|       |
  274|  4.12k|    al->length = no_of_nodes;
  275|  4.12k|    al->adjs = IGRAPH_CALLOC(al->length, igraph_vector_int_t);
  ------------------
  |  |   33|  4.12k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  8.24k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 4.12k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 4.12k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 4.12k, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  276|  4.12k|    IGRAPH_CHECK_OOM(al->adjs, "Insufficient memory for creating adjlist.");
  ------------------
  |  |  709|  4.12k|    do { \
  |  |  710|  4.12k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  4.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.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|  4.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 4.12k]
  |  |  ------------------
  ------------------
  277|  4.12k|    IGRAPH_FINALLY(igraph_adjlist_destroy, al);
  ------------------
  |  |  603|  4.12k|    do { \
  |  |  604|  4.12k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  4.12k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  4.12k|         * incorrect destructor function with the pointer */ \
  |  |  607|  4.12k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 4.12k]
  |  |  ------------------
  |  |  608|  4.12k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  4.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 4.12k]
  |  |  ------------------
  ------------------
  278|       |
  279|   780k|    for (igraph_int_t i = 0; i < al->length; i++) {
  ------------------
  |  Branch (279:30): [True: 776k, False: 4.12k]
  ------------------
  280|   776k|        IGRAPH_CHECK(igraph_vector_int_init(&al->adjs[i], 0));
  ------------------
  |  |  656|   776k|    do { \
  |  |  657|   776k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   776k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   776k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 776k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   776k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 776k]
  |  |  ------------------
  ------------------
  281|   776k|    }
  282|       |
  283|  4.12k|    IGRAPH_FINALLY_CLEAN(1);
  284|       |
  285|  4.12k|    return IGRAPH_SUCCESS;
  286|  4.12k|}
igraph_adjlist_destroy:
  475|  30.7k|void igraph_adjlist_destroy(igraph_adjlist_t *al) {
  476|  6.02M|    for (igraph_int_t i = 0; i < al->length; i++) {
  ------------------
  |  Branch (476:30): [True: 5.98M, False: 30.7k]
  ------------------
  477|       |        /* This works if some igraph_vector_int_t's contain NULL,
  478|       |           because igraph_vector_int_destroy can handle this. */
  479|  5.98M|        igraph_vector_int_destroy(&al->adjs[i]);
  480|  5.98M|    }
  481|       |    IGRAPH_FREE(al->adjs);
  ------------------
  |  |   36|  30.7k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  482|  30.7k|}
igraph_inclist_init:
  746|  4.12k|                        igraph_loops_t loops) {
  747|  4.12k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  748|  4.12k|    igraph_vector_int_t degrees;
  749|  4.12k|    int iter = 0;
  750|       |
  751|  4.12k|    if (mode != IGRAPH_IN && mode != IGRAPH_OUT && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (751:9): [True: 4.12k, False: 0]
  |  Branch (751:30): [True: 4.12k, False: 0]
  |  Branch (751:52): [True: 0, False: 4.12k]
  ------------------
  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|  4.12k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (755:9): [True: 0, False: 4.12k]
  ------------------
  756|      0|        mode = IGRAPH_ALL;
  757|      0|    }
  758|       |
  759|  4.12k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&degrees, no_of_nodes);
  ------------------
  |  |  119|  4.12k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  4.12k|    do { \
  |  |  |  |  657|  4.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  4.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  4.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.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|  4.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 4.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  4.12k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  4.12k|    do { \
  |  |  |  |  604|  4.12k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  4.12k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  4.12k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  4.12k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 4.12k]
  |  |  |  |  ------------------
  |  |  |  |  608|  4.12k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  4.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 4.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 4.12k]
  |  |  ------------------
  ------------------
  760|       |    /* igraph_degrees() is fast when loops=true */
  761|  4.12k|    IGRAPH_CHECK(igraph_degree(graph, &degrees, igraph_vss_all(), mode, IGRAPH_LOOPS));
  ------------------
  |  |  656|  4.12k|    do { \
  |  |  657|  4.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.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|  4.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.12k]
  |  |  ------------------
  ------------------
  762|       |
  763|  4.12k|    il->length = no_of_nodes;
  764|  4.12k|    il->incs = IGRAPH_CALLOC(il->length, igraph_vector_int_t);
  ------------------
  |  |   33|  4.12k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  8.24k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 4.12k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 4.12k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 4.12k, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  765|  4.12k|    if (il->incs == 0) {
  ------------------
  |  Branch (765:9): [True: 0, False: 4.12k]
  ------------------
  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|  4.12k|    IGRAPH_FINALLY(igraph_inclist_destroy, il);
  ------------------
  |  |  603|  4.12k|    do { \
  |  |  604|  4.12k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  4.12k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  4.12k|         * incorrect destructor function with the pointer */ \
  |  |  607|  4.12k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 4.12k]
  |  |  ------------------
  |  |  608|  4.12k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  4.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 4.12k]
  |  |  ------------------
  ------------------
  770|   806k|    for (igraph_int_t i = 0; i < il->length; i++) {
  ------------------
  |  Branch (770:30): [True: 802k, False: 4.12k]
  ------------------
  771|   802k|        IGRAPH_ALLOW_INTERRUPTION_LIMITED(iter, 1000);
  ------------------
  |  |   71|   802k|    do { \
  |  |   72|   802k|        if (++iter >= skips) { \
  |  |  ------------------
  |  |  |  Branch (72:13): [True: 0, False: 802k]
  |  |  ------------------
  |  |   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|   802k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (76:14): [Folded, False: 802k]
  |  |  ------------------
  ------------------
  772|       |
  773|   802k|        IGRAPH_CHECK(igraph_vector_int_init(&il->incs[i], VECTOR(degrees)[i]));
  ------------------
  |  |  656|   802k|    do { \
  |  |  657|   802k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   802k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   802k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 802k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   802k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 802k]
  |  |  ------------------
  ------------------
  774|   802k|        IGRAPH_CHECK(igraph_incident(graph, &il->incs[i], i, mode, loops));
  ------------------
  |  |  656|   802k|    do { \
  |  |  657|   802k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   802k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   802k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 802k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   802k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 802k]
  |  |  ------------------
  ------------------
  775|   802k|    }
  776|       |
  777|  4.12k|    igraph_vector_int_destroy(&degrees);
  778|  4.12k|    IGRAPH_FINALLY_CLEAN(2); /* + igraph_inclist_destroy */
  779|       |
  780|  4.12k|    return IGRAPH_SUCCESS;
  781|  4.12k|}
igraph_inclist_destroy:
  825|  4.12k|void igraph_inclist_destroy(igraph_inclist_t *il) {
  826|   806k|    for (igraph_int_t i = 0; i < il->length; i++) {
  ------------------
  |  Branch (826:30): [True: 802k, False: 4.12k]
  ------------------
  827|       |        /* This works if some igraph_vector_int_t's contain NULL,
  828|       |           because igraph_vector_int_destroy can handle this. */
  829|   802k|        igraph_vector_int_destroy(&il->incs[i]);
  830|   802k|    }
  831|       |    IGRAPH_FREE(il->incs);
  ------------------
  |  |   36|  4.12k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  832|  4.12k|}
igraph_lazy_adjlist_init:
 1070|  3.76k|                             igraph_bool_t multiple) {
 1071|  3.76k|    if (mode != IGRAPH_IN && mode != IGRAPH_OUT && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (1071:9): [True: 3.76k, False: 0]
  |  Branch (1071:30): [True: 3.76k, False: 0]
  |  Branch (1071:52): [True: 0, False: 3.76k]
  ------------------
 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|  3.76k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (1075:9): [True: 0, False: 3.76k]
  ------------------
 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|  3.76k|    if (igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_MULTI) &&
  ------------------
  |  Branch (1080:9): [True: 1.68k, False: 2.08k]
  ------------------
 1081|  1.68k|        !igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_HAS_MULTI)) {
  ------------------
  |  Branch (1081:9): [True: 1.68k, False: 0]
  ------------------
 1082|       |
 1083|       |        /* special case: if the graph is directed, but we are ignoring edge directions,
 1084|       |         * mutual edges also act as multi-edges */
 1085|  1.68k|        if (igraph_is_directed(graph) && mode == IGRAPH_ALL) {
  ------------------
  |  Branch (1085:13): [True: 1.68k, False: 0]
  |  Branch (1085:42): [True: 1.68k, False: 0]
  ------------------
 1086|  1.68k|            if (igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_MUTUAL) &&
  ------------------
  |  Branch (1086:17): [True: 0, False: 1.68k]
  ------------------
 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|  1.68k|        } else {
 1091|      0|            multiple = IGRAPH_MULTIPLE;
 1092|      0|        }
 1093|  1.68k|    }
 1094|       |
 1095|       |    /* if we already know there are no loops, they don't need to be removed */
 1096|  3.76k|    if (igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_LOOP) &&
  ------------------
  |  Branch (1096:9): [True: 3.76k, False: 0]
  ------------------
 1097|  3.76k|        !igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_HAS_LOOP)) {
  ------------------
  |  Branch (1097:9): [True: 2.33k, False: 1.43k]
  ------------------
 1098|  2.33k|        if (mode == IGRAPH_ALL) {
  ------------------
  |  Branch (1098:13): [True: 2.33k, False: 0]
  ------------------
 1099|  2.33k|            loops = IGRAPH_LOOPS_TWICE;
 1100|  2.33k|        } else {
 1101|      0|            loops = IGRAPH_LOOPS_ONCE;
 1102|      0|        }
 1103|  2.33k|    }
 1104|       |
 1105|  3.76k|    al->mode = mode;
 1106|  3.76k|    al->loops = loops;
 1107|  3.76k|    al->multiple = multiple;
 1108|  3.76k|    al->graph = graph;
 1109|       |
 1110|  3.76k|    al->length = igraph_vcount(graph);
 1111|  3.76k|    al->adjs = IGRAPH_CALLOC(al->length, igraph_vector_int_t*);
  ------------------
  |  |   33|  3.76k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  7.53k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 3.76k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 3.76k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 3.76k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1112|  3.76k|    IGRAPH_CHECK_OOM(al->adjs, "Insufficient memory for creating lazy adjacency list view.");
  ------------------
  |  |  709|  3.76k|    do { \
  |  |  710|  3.76k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  3.76k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.76k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  3.76k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 3.76k]
  |  |  ------------------
  ------------------
 1113|       |
 1114|  3.76k|    return IGRAPH_SUCCESS;
 1115|  3.76k|}
igraph_lazy_adjlist_destroy:
 1127|  3.76k|void igraph_lazy_adjlist_destroy(igraph_lazy_adjlist_t *al) {
 1128|  3.76k|    igraph_lazy_adjlist_clear(al);
 1129|       |    IGRAPH_FREE(al->adjs);
  ------------------
  |  |   36|  3.76k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1130|  3.76k|}
igraph_lazy_adjlist_clear:
 1140|  3.76k|void igraph_lazy_adjlist_clear(igraph_lazy_adjlist_t *al) {
 1141|  3.76k|    igraph_int_t i, n = al->length;
 1142|   764k|    for (i = 0; i < n; i++) {
  ------------------
  |  Branch (1142:17): [True: 761k, False: 3.76k]
  ------------------
 1143|   761k|        if (al->adjs[i] != 0) {
  ------------------
  |  Branch (1143:13): [True: 246k, False: 514k]
  ------------------
 1144|   246k|            igraph_vector_int_destroy(al->adjs[i]);
 1145|       |            IGRAPH_FREE(al->adjs[i]);
  ------------------
  |  |   36|   246k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1146|   246k|        }
 1147|   761k|    }
 1148|  3.76k|}
igraph_i_lazy_adjlist_get_real:
 1163|   246k|igraph_vector_int_t *igraph_i_lazy_adjlist_get_real(igraph_lazy_adjlist_t *al, igraph_int_t no) {
 1164|   246k|    igraph_error_t ret;
 1165|       |
 1166|   246k|    if (al->adjs[no] == NULL) {
  ------------------
  |  Branch (1166:9): [True: 246k, False: 0]
  ------------------
 1167|   246k|        al->adjs[no] = IGRAPH_CALLOC(1, igraph_vector_int_t);
  ------------------
  |  |   33|   246k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|   493k|    (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: 246k, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1168|   246k|        if (al->adjs[no] == NULL) {
  ------------------
  |  Branch (1168:13): [True: 0, False: 246k]
  ------------------
 1169|      0|            return NULL;
 1170|      0|        }
 1171|       |
 1172|   246k|        ret = igraph_vector_int_init(al->adjs[no], 0);
 1173|   246k|        if (ret != IGRAPH_SUCCESS) {
  ------------------
  |  Branch (1173:13): [True: 0, False: 246k]
  ------------------
 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|   246k|        ret = igraph_neighbors(al->graph, al->adjs[no], no, al->mode, al->loops, al->multiple);
 1179|   246k|        if (ret != IGRAPH_SUCCESS) {
  ------------------
  |  Branch (1179:13): [True: 0, False: 246k]
  ------------------
 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|   246k|    }
 1185|       |
 1186|   246k|    return al->adjs[no];
 1187|   246k|}
igraph_lazy_inclist_init:
 1232|  4.12k|                             igraph_loops_t loops) {
 1233|       |
 1234|  4.12k|    if (mode != IGRAPH_IN && mode != IGRAPH_OUT && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (1234:9): [True: 4.12k, False: 0]
  |  Branch (1234:30): [True: 4.12k, False: 0]
  |  Branch (1234:52): [True: 0, False: 4.12k]
  ------------------
 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|  4.12k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (1238:9): [True: 2.06k, False: 2.06k]
  ------------------
 1239|  2.06k|        mode = IGRAPH_ALL;
 1240|  2.06k|    }
 1241|       |
 1242|  4.12k|    il->graph = graph;
 1243|  4.12k|    il->loops = loops;
 1244|  4.12k|    il->mode = mode;
 1245|       |
 1246|  4.12k|    il->length = igraph_vcount(graph);
 1247|  4.12k|    il->incs = IGRAPH_CALLOC(il->length, igraph_vector_int_t*);
  ------------------
  |  |   33|  4.12k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  8.24k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 4.12k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 4.12k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 4.12k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1248|  4.12k|    if (il->incs == 0) {
  ------------------
  |  Branch (1248:9): [True: 0, False: 4.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|  4.12k|    return IGRAPH_SUCCESS;
 1253|       |
 1254|  4.12k|}
igraph_lazy_inclist_destroy:
 1267|  4.12k|void igraph_lazy_inclist_destroy(igraph_lazy_inclist_t *il) {
 1268|  4.12k|    igraph_lazy_inclist_clear(il);
 1269|       |    IGRAPH_FREE(il->incs);
  ------------------
  |  |   36|  4.12k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1270|  4.12k|}
igraph_lazy_inclist_clear:
 1281|  4.12k|void igraph_lazy_inclist_clear(igraph_lazy_inclist_t *il) {
 1282|  4.12k|    igraph_int_t i, n = il->length;
 1283|   806k|    for (i = 0; i < n; i++) {
  ------------------
  |  Branch (1283:17): [True: 802k, False: 4.12k]
  ------------------
 1284|   802k|        if (il->incs[i] != 0) {
  ------------------
  |  Branch (1284:13): [True: 26.4k, False: 775k]
  ------------------
 1285|  26.4k|            igraph_vector_int_destroy(il->incs[i]);
 1286|       |            IGRAPH_FREE(il->incs[i]);
  ------------------
  |  |   36|  26.4k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1287|  26.4k|        }
 1288|   802k|    }
 1289|  4.12k|}
igraph_i_lazy_inclist_get_real:
 1304|  26.4k|igraph_vector_int_t *igraph_i_lazy_inclist_get_real(igraph_lazy_inclist_t *il, igraph_int_t no) {
 1305|  26.4k|    igraph_error_t ret;
 1306|       |
 1307|  26.4k|    if (il->incs[no] == NULL) {
  ------------------
  |  Branch (1307:9): [True: 26.4k, False: 0]
  ------------------
 1308|  26.4k|        il->incs[no] = IGRAPH_CALLOC(1, igraph_vector_int_t);
  ------------------
  |  |   33|  26.4k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  52.9k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 0, Folded]
  |  |  |  |  |  Branch (31:24): [True: 0, Folded]
  |  |  |  |  |  Branch (31:66): [True: 26.4k, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1309|  26.4k|        if (il->incs[no] == NULL) {
  ------------------
  |  Branch (1309:13): [True: 0, False: 26.4k]
  ------------------
 1310|      0|            return NULL;
 1311|      0|        }
 1312|       |
 1313|  26.4k|        ret = igraph_vector_int_init(il->incs[no], 0);
 1314|  26.4k|        if (ret != IGRAPH_SUCCESS) {
  ------------------
  |  Branch (1314:13): [True: 0, False: 26.4k]
  ------------------
 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|  26.4k|        ret = igraph_incident(il->graph, il->incs[no], no, il->mode, il->loops);
 1320|  26.4k|        if (ret != IGRAPH_SUCCESS) {
  ------------------
  |  Branch (1320:13): [True: 0, False: 26.4k]
  ------------------
 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|  26.4k|    }
 1326|       |
 1327|  26.4k|    return il->incs[no];
 1328|  26.4k|}
adjlist.c:igraph_i_simplify_sorted_int_adjacency_vector_in_place:
  871|  5.21M|) {
  872|  5.21M|    igraph_bool_t dummy1 = true, dummy2 = true; /* set dummies to avoid uninitialized read */
  873|  5.21M|    if (has_loops == NULL) {
  ------------------
  |  Branch (873:9): [True: 0, False: 5.21M]
  ------------------
  874|      0|        has_loops = &dummy1;
  875|      0|    }
  876|  5.21M|    if (has_multiple == NULL) {
  ------------------
  |  Branch (876:9): [True: 0, False: 5.21M]
  ------------------
  877|      0|        has_multiple = &dummy2;
  878|      0|    }
  879|       |
  880|  5.21M|    igraph_int_t i, p = 0;
  881|  5.21M|    igraph_int_t n = igraph_vector_int_size(v);
  882|       |
  883|  5.21M|    multiple = !!multiple; /* normalize Boolean value to enable == comparisons below */
  884|       |
  885|  5.21M|    if (
  886|  5.21M|        multiple == IGRAPH_MULTIPLE &&
  ------------------
  |  Branch (886:9): [True: 4.01M, False: 1.20M]
  ------------------
  887|  4.01M|        (
  888|  4.01M|            loops == IGRAPH_LOOPS_TWICE ||
  ------------------
  |  Branch (888:13): [True: 802k, False: 3.20M]
  ------------------
  889|  3.20M|            (loops == IGRAPH_LOOPS_ONCE && (mode == IGRAPH_IN || mode == IGRAPH_OUT))
  ------------------
  |  Branch (889:14): [True: 3.20M, False: 0]
  |  Branch (889:45): [True: 801k, False: 2.40M]
  |  Branch (889:66): [True: 2.00M, False: 401k]
  ------------------
  890|  4.01M|        )
  891|  5.21M|    ) {
  892|       |        /* nothing to simplify */
  893|  3.60M|        return IGRAPH_SUCCESS;
  894|  3.60M|    }
  895|       |
  896|  1.60M|    if (loops == IGRAPH_NO_LOOPS) {
  ------------------
  |  Branch (896:9): [True: 694k, False: 909k]
  ------------------
  897|   694k|        if (multiple == IGRAPH_NO_MULTIPLE) {
  ------------------
  |  Branch (897:13): [True: 694k, False: 0]
  ------------------
  898|       |            /* We need to get rid of loops and multiple edges completely */
  899|  1.00M|            for (i = 0; i < n; i++) {
  ------------------
  |  Branch (899:25): [True: 305k, False: 694k]
  ------------------
  900|   305k|                if (VECTOR(*v)[i] != index &&
  ------------------
  |  |   60|   305k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (900:21): [True: 234k, False: 71.3k]
  ------------------
  901|   234k|                    (i == n - 1 || VECTOR(*v)[i + 1] != VECTOR(*v)[i])) {
  ------------------
  |  |   60|   160k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  (i == n - 1 || VECTOR(*v)[i + 1] != VECTOR(*v)[i])) {
  ------------------
  |  |   60|   160k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (901:22): [True: 73.8k, False: 160k]
  |  Branch (901:36): [True: 97.2k, False: 62.9k]
  ------------------
  902|   171k|                    VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   60|   171k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   60|   171k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  903|   171k|                    p++;
  904|   171k|                } else {
  905|   134k|                    if (VECTOR(*v)[i] == index) {
  ------------------
  |  |   60|   134k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (905:25): [True: 71.3k, False: 62.9k]
  ------------------
  906|  71.3k|                        *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|  71.3k|                        if (! *has_multiple) {
  ------------------
  |  Branch (909:29): [True: 5.67k, False: 65.7k]
  ------------------
  910|  5.67k|                            if (mode == IGRAPH_ALL) {
  ------------------
  |  Branch (910:33): [True: 5.67k, False: 0]
  ------------------
  911|       |                                /* Undirected loops appear twice in the neighbour list,
  912|       |                                 * so we check two following items instead of one. */
  913|  5.67k|                                if (i < n - 2 &&
  ------------------
  |  Branch (913:37): [True: 2.42k, False: 3.25k]
  ------------------
  914|  2.42k|                                    VECTOR(*v)[i + 1] == VECTOR(*v)[i] &&
  ------------------
  |  |   60|  2.42k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                                  VECTOR(*v)[i + 1] == VECTOR(*v)[i] &&
  ------------------
  |  |   60|  2.42k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (914:37): [True: 1.96k, False: 453]
  ------------------
  915|  1.96k|                                    VECTOR(*v)[i + 2] == VECTOR(*v)[i]) {
  ------------------
  |  |   60|  1.96k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                                  VECTOR(*v)[i + 2] == VECTOR(*v)[i]) {
  ------------------
  |  |   60|  1.96k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (915:37): [True: 771, False: 1.19k]
  ------------------
  916|    771|                                    *has_multiple = true;
  917|    771|                                }
  918|  5.67k|                            } 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|  5.67k|                        }
  924|  71.3k|                    } else if (i != n - 1 && VECTOR(*v)[i + 1] == VECTOR(*v)[i]) {
  ------------------
  |  |   60|  62.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  } else if (i != n - 1 && VECTOR(*v)[i + 1] == VECTOR(*v)[i]) {
  ------------------
  |  |   60|  62.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (924:32): [True: 62.9k, False: 0]
  |  Branch (924:46): [True: 62.9k, False: 0]
  ------------------
  925|  62.9k|                        *has_multiple = true;
  926|  62.9k|                    }
  927|   134k|                }
  928|   305k|            }
  929|   694k|        } 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|   909k|    } else if (loops == IGRAPH_LOOPS_ONCE) {
  ------------------
  |  Branch (940:16): [True: 401k, False: 508k]
  ------------------
  941|   401k|        if (multiple == IGRAPH_NO_MULTIPLE) {
  ------------------
  |  Branch (941:13): [True: 0, False: 401k]
  ------------------
  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|   401k|        } 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|   491k|            for (i = 0; i < n; i++) {
  ------------------
  |  Branch (970:25): [True: 90.8k, False: 401k]
  ------------------
  971|  90.8k|                VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   60|  90.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   60|  90.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  972|  90.8k|                if (VECTOR(*v)[i] == index) {
  ------------------
  |  |   60|  90.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (972:21): [True: 1.76k, False: 89.0k]
  ------------------
  973|  1.76k|                    *has_loops = true;
  974|       |                    /* this was a loop edge so if the next element is the same, we
  975|       |                    * need to skip that */
  976|  1.76k|                    if (i < n-1 && VECTOR(*v)[i + 1] == index) {
  ------------------
  |  |   60|  1.76k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (976:25): [True: 1.76k, False: 0]
  |  Branch (976:36): [True: 1.76k, False: 0]
  ------------------
  977|  1.76k|                        i++;
  978|  1.76k|                    }
  979|  1.76k|                }
  980|  90.8k|                p++;
  981|  90.8k|            }
  982|   401k|        }
  983|   508k|    } else if (loops == IGRAPH_LOOPS_TWICE && multiple == IGRAPH_NO_MULTIPLE) {
  ------------------
  |  Branch (983:16): [True: 508k, False: 0]
  |  Branch (983:47): [True: 508k, 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|   627k|        for (i = 0; i < n; i++) {
  ------------------
  |  Branch (986:21): [True: 118k, False: 508k]
  ------------------
  987|   118k|            if (i == n - 1 || VECTOR(*v)[i + 1] != VECTOR(*v)[i]) {
  ------------------
  |  |   60|  73.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          if (i == n - 1 || VECTOR(*v)[i + 1] != VECTOR(*v)[i]) {
  ------------------
  |  |   60|  73.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (987:17): [True: 45.3k, False: 73.5k]
  |  Branch (987:31): [True: 50.7k, False: 22.8k]
  ------------------
  988|  96.1k|                VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   60|  96.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   60|  96.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  989|  96.1k|                p++;
  990|  96.1k|            } else {
  991|  22.8k|                *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|  22.8k|                if (VECTOR(*v)[i] == index) {
  ------------------
  |  |   60|  22.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (996:21): [True: 0, False: 22.8k]
  ------------------
  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|  22.8k|            }
 1010|   118k|        }
 1011|   508k|    } 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|  1.60M|    igraph_vector_int_resize(v, p);
 1018|       |
 1019|  1.60M|    return IGRAPH_SUCCESS;
 1020|  1.60M|}

igraph_i_attribute_init:
  617|  9.95k|) {
  618|  9.95k|    graph->attr = NULL;
  619|  9.95k|    if (igraph_i_attribute_table) {
  ------------------
  |  Branch (619:9): [True: 0, False: 9.95k]
  ------------------
  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|  9.95k|    return IGRAPH_SUCCESS;
  626|  9.95k|}
igraph_i_attribute_destroy:
  628|  25.4k|void igraph_i_attribute_destroy(igraph_t *graph) {
  629|  25.4k|    if (graph->attr && igraph_i_attribute_table) {
  ------------------
  |  Branch (629:9): [True: 0, False: 25.4k]
  |  Branch (629:24): [True: 0, False: 0]
  ------------------
  630|      0|        igraph_i_attribute_table->destroy(graph);
  631|      0|    }
  632|       |    graph->attr = NULL;
  633|  25.4k|}
igraph_i_attribute_copy:
  636|  10.6k|                            igraph_bool_t va, igraph_bool_t ea) {
  637|  10.6k|    igraph_i_attribute_destroy(to);
  638|  10.6k|    if (from->attr && igraph_i_attribute_table) {
  ------------------
  |  Branch (638:9): [True: 0, False: 10.6k]
  |  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|  10.6k|    return IGRAPH_SUCCESS;
  645|  10.6k|}
igraph_i_attribute_permute_vertices:
  659|  1.71k|                                        const igraph_vector_int_t *idx) {
  660|       |    /* graph and newgraph may be the same, in which case we need to support
  661|       |     * in-place operations. If they are _not_ the same, it is assumed that the
  662|       |     * new graph has no vertex attributes yet */
  663|  1.71k|    if (igraph_i_attribute_table) {
  ------------------
  |  Branch (663:9): [True: 0, False: 1.71k]
  ------------------
  664|      0|        return igraph_i_attribute_table->permute_vertices(graph, newgraph, idx);
  665|  1.71k|    } else {
  666|  1.71k|        return IGRAPH_SUCCESS;
  667|  1.71k|    }
  668|  1.71k|}
igraph_i_attribute_permute_edges:
  700|  1.71k|                                     const igraph_vector_int_t *idx) {
  701|       |    /* graph and newgraph may be the same, in which case we need to support
  702|       |     * in-place operations. If they are _not_ the same, it is assumed that the
  703|       |     * new graph has no edge attributes yet */
  704|  1.71k|    if (igraph_i_attribute_table) {
  ------------------
  |  Branch (704:9): [True: 0, False: 1.71k]
  ------------------
  705|      0|        return igraph_i_attribute_table->permute_edges(graph, newgraph, idx);
  706|  1.71k|    } else {
  707|  1.71k|        return IGRAPH_SUCCESS;
  708|  1.71k|    }
  709|  1.71k|}

igraph_i_property_cache_init:
   32|  12.3k|igraph_error_t igraph_i_property_cache_init(igraph_i_property_cache_t *cache) {
   33|  12.3k|    IGRAPH_STATIC_ASSERT(IGRAPH_PROP_I_SIZE <= 32);
  ------------------
  |  |   68|  12.3k|#define IGRAPH_STATIC_ASSERT(condition) ((void)sizeof(char[1 - 2*!(condition)]))
  ------------------
   34|       |
   35|  12.3k|    memset(cache->value, 0, sizeof(cache->value));
   36|  12.3k|    cache->known = 0;
   37|  12.3k|    return IGRAPH_SUCCESS;
   38|  12.3k|}
igraph_i_property_cache_copy:
   45|  2.40k|        const igraph_i_property_cache_t *other_cache) {
   46|  2.40k|    *cache = *other_cache;
   47|  2.40k|    return IGRAPH_SUCCESS;
   48|  2.40k|}
igraph_i_property_cache_destroy:
   53|  14.7k|void igraph_i_property_cache_destroy(igraph_i_property_cache_t *cache) {
   54|  14.7k|    IGRAPH_UNUSED(cache);
  ------------------
  |  |   30|  14.7k|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
   55|       |    /* Nothing to do */
   56|  14.7k|}
igraph_i_property_cache_get_bool:
   72|  39.5k|igraph_bool_t igraph_i_property_cache_get_bool(const igraph_t *graph, igraph_cached_property_t prop) {
   73|  39.5k|    IGRAPH_ASSERT(prop >= 0 && prop < IGRAPH_PROP_I_SIZE);
  ------------------
  |  |  924|  39.5k|    do { \
  |  |  925|  39.5k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  79.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 39.5k]
  |  |  |  |  |  Branch (612:52): [True: 39.5k, False: 0]
  |  |  |  |  |  Branch (612:52): [True: 39.5k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  39.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 39.5k]
  |  |  ------------------
  ------------------
   74|  39.5k|    assert(graph->cache != NULL);
  ------------------
  |  Branch (74:5): [True: 0, False: 39.5k]
  |  Branch (74:5): [True: 39.5k, False: 0]
  ------------------
   75|  39.5k|    return graph->cache->value[prop];
   76|  39.5k|}
igraph_i_property_cache_has:
   84|  72.5k|igraph_bool_t igraph_i_property_cache_has(const igraph_t *graph, igraph_cached_property_t prop) {
   85|  72.5k|    IGRAPH_ASSERT(prop >= 0 && prop < IGRAPH_PROP_I_SIZE);
  ------------------
  |  |  924|  72.5k|    do { \
  |  |  925|  72.5k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   145k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 72.5k]
  |  |  |  |  |  Branch (612:52): [True: 72.5k, False: 0]
  |  |  |  |  |  Branch (612:52): [True: 72.5k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  72.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 72.5k]
  |  |  ------------------
  ------------------
   86|  72.5k|    assert(graph->cache != NULL);
  ------------------
  |  Branch (86:5): [True: 0, False: 72.5k]
  |  Branch (86:5): [True: 72.5k, False: 0]
  ------------------
   87|  72.5k|    return graph->cache->known & (1 << prop);
   88|  72.5k|}
igraph_i_property_cache_set_bool:
   97|  8.55k|void igraph_i_property_cache_set_bool(const igraph_t *graph, igraph_cached_property_t prop, igraph_bool_t value) {
   98|  8.55k|    IGRAPH_ASSERT(prop >= 0 && prop < IGRAPH_PROP_I_SIZE);
  ------------------
  |  |  924|  8.55k|    do { \
  |  |  925|  8.55k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  17.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 8.55k]
  |  |  |  |  |  Branch (612:52): [True: 8.55k, False: 0]
  |  |  |  |  |  Branch (612:52): [True: 8.55k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  8.55k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 8.55k]
  |  |  ------------------
  ------------------
   99|  8.55k|    assert(graph->cache != NULL);
  ------------------
  |  Branch (99:5): [True: 0, False: 8.55k]
  |  Branch (99:5): [True: 8.55k, 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|  8.55k|    graph->cache->value[prop] = value;
  104|  8.55k|    graph->cache->known |= (1 << prop);
  105|  8.55k|}
igraph_i_property_cache_set_bool_checked:
  123|  14.1k|void igraph_i_property_cache_set_bool_checked(const igraph_t *graph, igraph_cached_property_t prop, igraph_bool_t value) {
  124|  14.1k|    IGRAPH_ASSERT(prop >= 0 && prop < IGRAPH_PROP_I_SIZE);
  ------------------
  |  |  924|  14.1k|    do { \
  |  |  925|  14.1k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  28.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 14.1k]
  |  |  |  |  |  Branch (612:52): [True: 14.1k, False: 0]
  |  |  |  |  |  Branch (612:52): [True: 14.1k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  14.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 14.1k]
  |  |  ------------------
  ------------------
  125|  14.1k|    assert(graph->cache != NULL);
  ------------------
  |  Branch (125:5): [True: 0, False: 14.1k]
  |  Branch (125:5): [True: 14.1k, 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|  14.1k|    if (graph->cache->known & (1 << prop)) {
  ------------------
  |  Branch (129:9): [True: 5.54k, False: 8.55k]
  ------------------
  130|  5.54k|        IGRAPH_ASSERT(graph->cache->value[prop] == value);
  ------------------
  |  |  924|  5.54k|    do { \
  |  |  925|  5.54k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  5.54k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.54k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  5.54k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 5.54k]
  |  |  ------------------
  ------------------
  131|  8.55k|    } else {
  132|  8.55k|        igraph_i_property_cache_set_bool(graph, prop, value);
  133|  8.55k|    }
  134|  14.1k|}
igraph_i_property_cache_invalidate_conditionally:
  182|  25.2k|) {
  183|  25.2k|    uint32_t invalidate = ~keep_always;
  184|  25.2k|    uint32_t mask;
  185|  25.2k|    uint32_t maybe_keep;
  186|  25.2k|    igraph_bool_t cached_value;
  187|       |
  188|  25.2k|    assert(graph->cache != NULL);
  ------------------
  |  Branch (188:5): [True: 0, False: 25.2k]
  |  Branch (188:5): [True: 25.2k, False: 0]
  ------------------
  189|       |
  190|       |    /* The bits of maybe_keep are set to 1 for those properties that are:
  191|       |     *
  192|       |     * - currently cached
  193|       |     * - should _probably_ be invalidated
  194|       |     * - _but_ the current cached value of the property may change the decision
  195|       |     */
  196|  25.2k|    maybe_keep = graph->cache->known & invalidate & (keep_when_false | keep_when_true);
  197|       |
  198|  25.2k|    if (maybe_keep) {
  ------------------
  |  Branch (198:9): [True: 2.06k, False: 23.1k]
  ------------------
  199|  16.4k|        for (igraph_cached_property_t prop = (igraph_cached_property_t ) 0; prop < IGRAPH_PROP_I_SIZE; ++prop) {
  ------------------
  |  Branch (199:77): [True: 14.4k, False: 2.06k]
  ------------------
  200|  14.4k|            mask = 1 << prop;
  201|  14.4k|            if (maybe_keep & mask) {
  ------------------
  |  Branch (201:17): [True: 7.78k, False: 6.63k]
  ------------------
  202|       |                /* if we get here, we know that the property is cached; we have
  203|       |                 * masked maybe_keep with graph->cache->known */
  204|  7.78k|                cached_value = igraph_i_property_cache_get_bool(graph, prop);
  205|  7.78k|                if (
  206|  7.78k|                    ((keep_when_false & mask) && !cached_value) ||
  ------------------
  |  Branch (206:22): [True: 7.15k, False: 632]
  |  Branch (206:50): [True: 6.24k, False: 908]
  ------------------
  207|  1.54k|                    ((keep_when_true & mask) && cached_value)
  ------------------
  |  Branch (207:22): [True: 632, False: 908]
  |  Branch (207:49): [True: 0, False: 632]
  ------------------
  208|  7.78k|                ) {
  209|  6.24k|                    invalidate &= ~mask;
  210|  6.24k|                }
  211|  7.78k|            }
  212|  14.4k|        }
  213|  2.06k|    }
  214|       |
  215|  25.2k|    graph->cache->known &= ~invalidate;
  216|  25.2k|}

igraph_vss_all:
  115|  34.9k|igraph_vs_t igraph_vss_all(void) {
  116|  34.9k|    igraph_vs_t allvs;
  117|  34.9k|    allvs.type = IGRAPH_VS_ALL;
  118|  34.9k|    return allvs;
  119|  34.9k|}
igraph_vss_1:
  292|  2.04k|igraph_vs_t igraph_vss_1(igraph_int_t vid) {
  293|  2.04k|    igraph_vs_t onevs;
  294|  2.04k|    onevs.type = IGRAPH_VS_1;
  295|  2.04k|    onevs.data.vid = vid;
  296|  2.04k|    return onevs;
  297|  2.04k|}
igraph_vss_vector:
  344|  4.46k|igraph_vs_t igraph_vss_vector(const igraph_vector_int_t *v) {
  345|  4.46k|    igraph_vs_t vecvs;
  346|  4.46k|    vecvs.type = IGRAPH_VS_VECTORPTR;
  347|  4.46k|    vecvs.data.vecptr = v;
  348|  4.46k|    return vecvs;
  349|  4.46k|}
igraph_vs_is_all:
  544|  4.10k|igraph_bool_t igraph_vs_is_all(const igraph_vs_t *vs) {
  545|  4.10k|    return vs->type == IGRAPH_VS_ALL;
  546|  4.10k|}
igraph_vs_size:
  611|  2.06k|                   igraph_int_t *result) {
  612|  2.06k|    igraph_vector_int_t vec;
  613|  2.06k|    igraph_bool_t *seen;
  614|  2.06k|    igraph_int_t i;
  615|  2.06k|    igraph_int_t vec_len;
  616|       |
  617|  2.06k|    switch (vs->type) {
  ------------------
  |  Branch (617:13): [True: 2.06k, False: 0]
  ------------------
  618|      0|    case IGRAPH_VS_NONE:
  ------------------
  |  Branch (618:5): [True: 0, False: 2.06k]
  ------------------
  619|      0|        *result = 0; return IGRAPH_SUCCESS;
  620|       |
  621|      0|    case IGRAPH_VS_1:
  ------------------
  |  Branch (621:5): [True: 0, False: 2.06k]
  ------------------
  622|      0|        *result = 0;
  623|      0|        if (vs->data.vid < igraph_vcount(graph) && vs->data.vid >= 0) {
  ------------------
  |  Branch (623:13): [True: 0, False: 0]
  |  Branch (623:52): [True: 0, False: 0]
  ------------------
  624|      0|            *result = 1;
  625|      0|        }
  626|      0|        return IGRAPH_SUCCESS;
  627|       |
  628|      0|    case IGRAPH_VS_RANGE:
  ------------------
  |  Branch (628:5): [True: 0, False: 2.06k]
  ------------------
  629|      0|        *result = vs->data.range.end - vs->data.range.start;
  630|      0|        return IGRAPH_SUCCESS;
  631|       |
  632|      0|    case IGRAPH_VS_ALL:
  ------------------
  |  Branch (632:5): [True: 0, False: 2.06k]
  ------------------
  633|      0|        *result = igraph_vcount(graph); return IGRAPH_SUCCESS;
  634|       |
  635|      0|    case IGRAPH_VS_ADJ:
  ------------------
  |  Branch (635:5): [True: 0, False: 2.06k]
  ------------------
  636|      0|        IGRAPH_VECTOR_INT_INIT_FINALLY(&vec, 0);
  ------------------
  |  |  119|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|      0|    do { \
  |  |  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 0]
  |  |  ------------------
  ------------------
  637|      0|        IGRAPH_CHECK(igraph_neighbors(
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  638|      0|            graph, &vec, vs->data.adj.vid, vs->data.adj.mode,
  639|      0|            vs->data.adj.loops, vs->data.adj.multiple
  640|      0|        ));
  641|      0|        *result = igraph_vector_int_size(&vec);
  642|      0|        igraph_vector_int_destroy(&vec);
  643|      0|        IGRAPH_FINALLY_CLEAN(1);
  644|      0|        return IGRAPH_SUCCESS;
  645|       |
  646|      0|    case IGRAPH_VS_NONADJ:
  ------------------
  |  Branch (646:5): [True: 0, False: 2.06k]
  ------------------
  647|      0|        IGRAPH_VECTOR_INT_INIT_FINALLY(&vec, 0);
  ------------------
  |  |  119|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|      0|    do { \
  |  |  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 0]
  |  |  ------------------
  ------------------
  648|      0|        IGRAPH_CHECK(igraph_neighbors(
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  649|      0|            graph, &vec, vs->data.adj.vid, vs->data.adj.mode,
  650|      0|            vs->data.adj.loops, vs->data.adj.multiple
  651|      0|        ));
  652|      0|        vec_len = igraph_vector_int_size(&vec);
  653|      0|        *result = igraph_vcount(graph);
  654|      0|        seen = IGRAPH_CALLOC(*result, igraph_bool_t);
  ------------------
  |  |   33|      0|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|      0|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 0, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 0, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  655|      0|        IGRAPH_CHECK_OOM(seen, "Cannot calculate vertex selector length.");
  ------------------
  |  |  709|      0|    do { \
  |  |  710|      0|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  656|      0|        IGRAPH_FINALLY(igraph_free, seen);
  ------------------
  |  |  603|      0|    do { \
  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  ------------------
  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  657|      0|        for (i = 0; i < vec_len; i++) {
  ------------------
  |  Branch (657:21): [True: 0, False: 0]
  ------------------
  658|      0|            if (!seen[ VECTOR(vec)[i] ]) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (658:17): [True: 0, False: 0]
  ------------------
  659|      0|                (*result)--;
  660|      0|                seen[ VECTOR(vec)[i] ] = true;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  661|      0|            }
  662|      0|        }
  663|      0|        igraph_free(seen);
  664|      0|        igraph_vector_int_destroy(&vec);
  665|      0|        IGRAPH_FINALLY_CLEAN(2);
  666|      0|        return IGRAPH_SUCCESS;
  667|       |
  668|      0|    case IGRAPH_VS_VECTOR:
  ------------------
  |  Branch (668:5): [True: 0, False: 2.06k]
  ------------------
  669|  2.06k|    case IGRAPH_VS_VECTORPTR:
  ------------------
  |  Branch (669:5): [True: 2.06k, False: 0]
  ------------------
  670|  2.06k|        *result = igraph_vector_int_size(vs->data.vecptr);
  671|  2.06k|        return IGRAPH_SUCCESS;
  672|  2.06k|    }
  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|  41.4k|igraph_error_t igraph_vit_create(const igraph_t *graph, igraph_vs_t vs, igraph_vit_t *vit) {
  713|  41.4k|    igraph_vector_int_t vec;
  714|  41.4k|    igraph_vector_int_t *vec_int;
  715|  41.4k|    igraph_bool_t *seen;
  716|  41.4k|    igraph_int_t i, j, n;
  717|  41.4k|    igraph_int_t vec_len;
  718|       |
  719|  41.4k|    switch (vs.type) {
  720|  34.9k|    case IGRAPH_VS_ALL:
  ------------------
  |  Branch (720:5): [True: 34.9k, False: 6.50k]
  ------------------
  721|  34.9k|        vit->type = IGRAPH_VIT_RANGE;
  722|  34.9k|        vit->pos = 0;
  723|  34.9k|        vit->start = 0;
  724|  34.9k|        vit->end = igraph_vcount(graph);
  725|  34.9k|        break;
  726|      0|    case IGRAPH_VS_ADJ:
  ------------------
  |  Branch (726:5): [True: 0, False: 41.4k]
  ------------------
  727|      0|        vec_int = IGRAPH_CALLOC(1, igraph_vector_int_t);
  ------------------
  |  |   33|      0|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|      0|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 0, Folded]
  |  |  |  |  |  Branch (31:24): [True: 0, Folded]
  |  |  |  |  |  Branch (31:66): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  728|      0|        IGRAPH_CHECK_OOM(vec_int, "Cannot create vertex iterator.");
  ------------------
  |  |  709|      0|    do { \
  |  |  710|      0|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  729|      0|        IGRAPH_FINALLY(igraph_free, vec_int);
  ------------------
  |  |  603|      0|    do { \
  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  ------------------
  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  730|      0|        IGRAPH_VECTOR_INT_INIT_FINALLY(vec_int, 0);
  ------------------
  |  |  119|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|      0|    do { \
  |  |  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 0]
  |  |  ------------------
  ------------------
  731|      0|        IGRAPH_VECTOR_INT_INIT_FINALLY(&vec, 0);
  ------------------
  |  |  119|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|      0|    do { \
  |  |  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 0]
  |  |  ------------------
  ------------------
  732|      0|        IGRAPH_CHECK(igraph_neighbors(
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  733|      0|            graph, &vec, vs.data.adj.vid, vs.data.adj.mode,
  734|      0|            vs.data.adj.loops, vs.data.adj.multiple
  735|      0|        ));
  736|      0|        n = igraph_vector_int_size(&vec);
  737|      0|        IGRAPH_CHECK(igraph_vector_int_resize(vec_int, n));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  738|      0|        for (i = 0; i < n; i++) {
  ------------------
  |  Branch (738:21): [True: 0, False: 0]
  ------------------
  739|      0|            VECTOR(*vec_int)[i] = VECTOR(vec)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*vec_int)[i] = VECTOR(vec)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  740|      0|        }
  741|       |
  742|      0|        igraph_vector_int_destroy(&vec);
  743|      0|        IGRAPH_FINALLY_CLEAN(3);
  744|       |
  745|      0|        vit->type = IGRAPH_VIT_VECTOR;
  746|      0|        vit->pos = 0;
  747|      0|        vit->start = 0;
  748|      0|        vit->vec = vec_int;
  749|      0|        vit->end = n;
  750|       |
  751|      0|        break;
  752|      0|    case IGRAPH_VS_NONADJ:
  ------------------
  |  Branch (752:5): [True: 0, False: 41.4k]
  ------------------
  753|      0|        vec_int = IGRAPH_CALLOC(1, igraph_vector_int_t);
  ------------------
  |  |   33|      0|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|      0|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 0, Folded]
  |  |  |  |  |  Branch (31:24): [True: 0, Folded]
  |  |  |  |  |  Branch (31:66): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  754|      0|        IGRAPH_CHECK_OOM(vec_int, "Cannot create vertex iterator.");
  ------------------
  |  |  709|      0|    do { \
  |  |  710|      0|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  755|      0|        IGRAPH_FINALLY(igraph_free, vec_int);
  ------------------
  |  |  603|      0|    do { \
  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  ------------------
  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  756|      0|        IGRAPH_VECTOR_INT_INIT_FINALLY(vec_int, 0);
  ------------------
  |  |  119|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|      0|    do { \
  |  |  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 0]
  |  |  ------------------
  ------------------
  757|      0|        IGRAPH_VECTOR_INT_INIT_FINALLY(&vec, 0);
  ------------------
  |  |  119|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|      0|    do { \
  |  |  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 0]
  |  |  ------------------
  ------------------
  758|      0|        IGRAPH_CHECK(igraph_neighbors(
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  759|      0|            graph, &vec, vs.data.adj.vid, vs.data.adj.mode,
  760|      0|            vs.data.adj.loops, vs.data.adj.multiple
  761|      0|        ));
  762|      0|        vec_len = igraph_vector_int_size(&vec);
  763|      0|        n = igraph_vcount(graph);
  764|      0|        seen = IGRAPH_CALLOC(n, igraph_bool_t);
  ------------------
  |  |   33|      0|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|      0|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 0, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 0, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  765|      0|        IGRAPH_CHECK_OOM(seen, "Cannot create vertex iterator.");
  ------------------
  |  |  709|      0|    do { \
  |  |  710|      0|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  766|      0|        IGRAPH_FINALLY(igraph_free, seen);
  ------------------
  |  |  603|      0|    do { \
  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  ------------------
  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  767|      0|        for (i = 0; i < vec_len; i++) {
  ------------------
  |  Branch (767:21): [True: 0, False: 0]
  ------------------
  768|      0|            if (! seen [ VECTOR(vec)[i] ] ) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (768:17): [True: 0, False: 0]
  ------------------
  769|      0|                n--;
  770|      0|                seen[ VECTOR(vec)[i] ] = true;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  771|      0|            }
  772|      0|        }
  773|      0|        IGRAPH_CHECK(igraph_vector_int_resize(vec_int, n));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  774|      0|        for (i = 0, j = 0; j < n; i++) {
  ------------------
  |  Branch (774:28): [True: 0, False: 0]
  ------------------
  775|      0|            if (!seen[i]) {
  ------------------
  |  Branch (775:17): [True: 0, False: 0]
  ------------------
  776|      0|                VECTOR(*vec_int)[j++] = i;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  777|      0|            }
  778|      0|        }
  779|       |
  780|      0|        IGRAPH_FREE(seen);
  ------------------
  |  |   36|      0|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  781|      0|        igraph_vector_int_destroy(&vec);
  782|      0|        IGRAPH_FINALLY_CLEAN(4);
  783|       |
  784|      0|        vit->type = IGRAPH_VIT_VECTOR;
  785|      0|        vit->pos = 0;
  786|      0|        vit->start = 0;
  787|      0|        vit->vec = vec_int;
  788|      0|        vit->end = n;
  789|      0|        break;
  790|      0|    case IGRAPH_VS_NONE:
  ------------------
  |  Branch (790:5): [True: 0, False: 41.4k]
  ------------------
  791|      0|        vit->type = IGRAPH_VIT_RANGE;
  792|      0|        vit->pos = 0;
  793|      0|        vit->start = 0;
  794|      0|        vit->end = 0;
  795|      0|        break;
  796|  2.04k|    case IGRAPH_VS_1:
  ------------------
  |  Branch (796:5): [True: 2.04k, False: 39.3k]
  ------------------
  797|  2.04k|        vit->type = IGRAPH_VIT_RANGE;
  798|  2.04k|        vit->pos = vs.data.vid;
  799|  2.04k|        vit->start = vs.data.vid;
  800|  2.04k|        vit->end = vs.data.vid + 1;
  801|  2.04k|        if (vit->pos >= igraph_vcount(graph)) {
  ------------------
  |  Branch (801:13): [True: 0, False: 2.04k]
  ------------------
  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|  2.04k|        break;
  805|  4.46k|    case IGRAPH_VS_VECTORPTR:
  ------------------
  |  Branch (805:5): [True: 4.46k, False: 36.9k]
  ------------------
  806|  4.46k|    case IGRAPH_VS_VECTOR:
  ------------------
  |  Branch (806:5): [True: 0, False: 41.4k]
  ------------------
  807|  4.46k|        vit->type = IGRAPH_VIT_VECTORPTR;
  808|  4.46k|        vit->pos = 0;
  809|  4.46k|        vit->start = 0;
  810|  4.46k|        vit->vec = vs.data.vecptr;
  811|  4.46k|        vit->end = igraph_vector_int_size(vit->vec);
  812|  4.46k|        if (!igraph_vector_int_isininterval(vit->vec, 0, igraph_vcount(graph) - 1)) {
  ------------------
  |  Branch (812:13): [True: 0, False: 4.46k]
  ------------------
  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|  4.46k|        break;
  816|  4.46k|    case IGRAPH_VS_RANGE:
  ------------------
  |  Branch (816:5): [True: 0, False: 41.4k]
  ------------------
  817|      0|        {
  818|      0|            igraph_int_t no_of_nodes = igraph_vcount(graph);
  819|      0|            if (vs.data.range.start < 0 ||
  ------------------
  |  Branch (819:17): [True: 0, False: 0]
  ------------------
  820|      0|                vs.data.range.start > no_of_nodes ||
  ------------------
  |  Branch (820:17): [True: 0, False: 0]
  ------------------
  821|      0|                (no_of_nodes > 0 && vs.data.range.start == no_of_nodes)) {
  ------------------
  |  Branch (821:18): [True: 0, False: 0]
  |  Branch (821:37): [True: 0, False: 0]
  ------------------
  822|      0|                IGRAPH_ERROR("Cannot create range iterator, starting vertex ID out of range.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  823|      0|            }
  824|      0|            if (vs.data.range.end < 0 || vs.data.range.end > no_of_nodes) {
  ------------------
  |  Branch (824:17): [True: 0, False: 0]
  |  Branch (824:42): [True: 0, False: 0]
  ------------------
  825|      0|                IGRAPH_ERROR("Cannot create range iterator, ending vertex ID out of range.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  826|      0|            }
  827|      0|        }
  828|      0|        vit->type = IGRAPH_VIT_RANGE;
  829|      0|        vit->pos = vs.data.range.start;
  830|      0|        vit->start = vs.data.range.start;
  831|      0|        vit->end = vs.data.range.end;
  832|      0|        break;
  833|      0|    default:
  ------------------
  |  Branch (833:5): [True: 0, False: 41.4k]
  ------------------
  834|      0|        IGRAPH_ERROR("Cannot create iterator, invalid selector.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  835|      0|        break;
  836|  41.4k|    }
  837|  41.4k|    return IGRAPH_SUCCESS;
  838|  41.4k|}
igraph_vit_destroy:
  853|  41.4k|void igraph_vit_destroy(const igraph_vit_t *vit) {
  854|  41.4k|    switch (vit->type) {
  855|  36.9k|    case IGRAPH_VIT_RANGE:
  ------------------
  |  Branch (855:5): [True: 36.9k, False: 4.46k]
  ------------------
  856|  41.4k|    case IGRAPH_VIT_VECTORPTR:
  ------------------
  |  Branch (856:5): [True: 4.46k, False: 36.9k]
  ------------------
  857|  41.4k|        break;
  858|      0|    case IGRAPH_VIT_VECTOR:
  ------------------
  |  Branch (858:5): [True: 0, False: 41.4k]
  ------------------
  859|      0|        igraph_vector_int_destroy((igraph_vector_int_t*) vit->vec);
  860|      0|        igraph_free((igraph_vector_int_t*) vit->vec);
  861|      0|        break;
  862|      0|    default:
  ------------------
  |  Branch (862:5): [True: 0, False: 41.4k]
  ------------------
  863|       |        /*     IGRAPH_ERROR("Cannot destroy iterator, unknown type", IGRAPH_EINVAL); */
  864|      0|        break;
  865|  41.4k|    }
  866|  41.4k|}
igraph_vit_as_vector:
  868|  1.71k|igraph_error_t igraph_vit_as_vector(const igraph_vit_t *vit, igraph_vector_int_t *v) {
  869|  1.71k|    igraph_int_t i;
  870|       |
  871|  1.71k|    IGRAPH_CHECK(igraph_vector_int_resize(v, IGRAPH_VIT_SIZE(*vit)));
  ------------------
  |  |  656|  1.71k|    do { \
  |  |  657|  1.71k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.71k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.71k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.71k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.71k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.71k]
  |  |  ------------------
  ------------------
  872|       |
  873|  1.71k|    switch (vit->type) {
  874|      0|    case IGRAPH_VIT_RANGE:
  ------------------
  |  Branch (874:5): [True: 0, False: 1.71k]
  ------------------
  875|      0|        for (i = 0; i < IGRAPH_VIT_SIZE(*vit); i++) {
  ------------------
  |  |  190|      0|#define IGRAPH_VIT_SIZE(vit)  ((vit).end - (vit).start)
  ------------------
  |  Branch (875:21): [True: 0, False: 0]
  ------------------
  876|      0|            VECTOR(*v)[i] = vit->start + i;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  877|      0|        }
  878|      0|        break;
  879|      0|    case IGRAPH_VIT_VECTOR:
  ------------------
  |  Branch (879:5): [True: 0, False: 1.71k]
  ------------------
  880|  1.71k|    case IGRAPH_VIT_VECTORPTR:
  ------------------
  |  Branch (880:5): [True: 1.71k, False: 0]
  ------------------
  881|  33.9k|        for (i = 0; i < IGRAPH_VIT_SIZE(*vit); i++) {
  ------------------
  |  |  190|  33.9k|#define IGRAPH_VIT_SIZE(vit)  ((vit).end - (vit).start)
  ------------------
  |  Branch (881:21): [True: 32.2k, False: 1.71k]
  ------------------
  882|  32.2k|            VECTOR(*v)[i] = VECTOR(*vit->vec)[i];
  ------------------
  |  |   60|  32.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*v)[i] = VECTOR(*vit->vec)[i];
  ------------------
  |  |   60|  32.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  883|  32.2k|        }
  884|  1.71k|        break;
  885|      0|    default:
  ------------------
  |  Branch (885:5): [True: 0, False: 1.71k]
  ------------------
  886|      0|        IGRAPH_ERROR("Cannot convert to vector, unknown iterator type",
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  887|      0|                     IGRAPH_EINVAL);
  888|      0|        break;
  889|  1.71k|    }
  890|       |
  891|  1.71k|    return IGRAPH_SUCCESS;
  892|  1.71k|}
igraph_es_all:
  921|  4.12k|                  igraph_edgeorder_type_t order) {
  922|  4.12k|    switch (order) {
  923|  4.12k|    case IGRAPH_EDGEORDER_ID:
  ------------------
  |  Branch (923:5): [True: 4.12k, False: 0]
  ------------------
  924|  4.12k|        es->type = IGRAPH_ES_ALL;
  925|  4.12k|        break;
  926|      0|    case IGRAPH_EDGEORDER_FROM:
  ------------------
  |  Branch (926:5): [True: 0, False: 4.12k]
  ------------------
  927|      0|        es->type = IGRAPH_ES_ALLFROM;
  928|      0|        break;
  929|      0|    case IGRAPH_EDGEORDER_TO:
  ------------------
  |  Branch (929:5): [True: 0, False: 4.12k]
  ------------------
  930|      0|        es->type = IGRAPH_ES_ALLTO;
  931|      0|        break;
  932|      0|    default:
  ------------------
  |  Branch (932:5): [True: 0, False: 4.12k]
  ------------------
  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|  4.12k|    }
  936|  4.12k|    return IGRAPH_SUCCESS;
  937|  4.12k|}
igraph_ess_all:
  953|  4.12k|igraph_es_t igraph_ess_all(igraph_edgeorder_type_t order) {
  954|  4.12k|    igraph_es_t es;
  955|  4.12k|    igraph_es_all(&es, order); /* cannot fail */
  956|  4.12k|    return es;
  957|  4.12k|}
igraph_ess_vector:
 1139|  6.18k|igraph_es_t igraph_ess_vector(const igraph_vector_int_t *v) {
 1140|  6.18k|    igraph_es_t es;
 1141|  6.18k|    es.type = IGRAPH_ES_VECTORPTR;
 1142|  6.18k|    es.data.vecptr = v;
 1143|  6.18k|    return es;
 1144|  6.18k|}
igraph_es_is_all:
 1445|  4.12k|igraph_bool_t igraph_es_is_all(const igraph_es_t *es) {
 1446|  4.12k|    return es->type == IGRAPH_ES_ALL;
 1447|  4.12k|}
igraph_eit_create:
 1922|  10.3k|igraph_error_t igraph_eit_create(const igraph_t *graph, igraph_es_t es, igraph_eit_t *eit) {
 1923|  10.3k|    switch (es.type) {
 1924|  4.12k|    case IGRAPH_ES_ALL:
  ------------------
  |  Branch (1924:5): [True: 4.12k, False: 6.18k]
  ------------------
 1925|  4.12k|        eit->type = IGRAPH_EIT_RANGE;
 1926|  4.12k|        eit->pos = 0;
 1927|  4.12k|        eit->start = 0;
 1928|  4.12k|        eit->end = igraph_ecount(graph);
 1929|  4.12k|        break;
 1930|      0|    case IGRAPH_ES_ALLFROM:
  ------------------
  |  Branch (1930:5): [True: 0, False: 10.3k]
  ------------------
 1931|      0|        IGRAPH_CHECK(igraph_i_eit_create_allfromto(graph, eit, IGRAPH_OUT));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1932|      0|        break;
 1933|      0|    case IGRAPH_ES_ALLTO:
  ------------------
  |  Branch (1933:5): [True: 0, False: 10.3k]
  ------------------
 1934|      0|        IGRAPH_CHECK(igraph_i_eit_create_allfromto(graph, eit, IGRAPH_IN));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1935|      0|        break;
 1936|      0|    case IGRAPH_ES_INCIDENT:
  ------------------
  |  Branch (1936:5): [True: 0, False: 10.3k]
  ------------------
 1937|      0|        IGRAPH_CHECK(igraph_i_eit_create_incident(graph, es, eit));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1938|      0|        break;
 1939|      0|    case IGRAPH_ES_NONE:
  ------------------
  |  Branch (1939:5): [True: 0, False: 10.3k]
  ------------------
 1940|      0|        eit->type = IGRAPH_EIT_RANGE;
 1941|      0|        eit->pos = 0;
 1942|      0|        eit->start = 0;
 1943|      0|        eit->end = 0;
 1944|      0|        break;
 1945|      0|    case IGRAPH_ES_1:
  ------------------
  |  Branch (1945:5): [True: 0, False: 10.3k]
  ------------------
 1946|      0|        eit->type = IGRAPH_EIT_RANGE;
 1947|      0|        eit->pos = es.data.eid;
 1948|      0|        eit->start = es.data.eid;
 1949|      0|        eit->end = es.data.eid + 1;
 1950|      0|        if (eit->pos >= igraph_ecount(graph)) {
  ------------------
  |  Branch (1950:13): [True: 0, False: 0]
  ------------------
 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|      0|        break;
 1954|      0|    case IGRAPH_ES_VECTOR:
  ------------------
  |  Branch (1954:5): [True: 0, False: 10.3k]
  ------------------
 1955|  6.18k|    case IGRAPH_ES_VECTORPTR:
  ------------------
  |  Branch (1955:5): [True: 6.18k, False: 4.12k]
  ------------------
 1956|  6.18k|        eit->type = IGRAPH_EIT_VECTORPTR;
 1957|  6.18k|        eit->pos = 0;
 1958|  6.18k|        eit->start = 0;
 1959|  6.18k|        eit->vec = es.data.vecptr;
 1960|  6.18k|        eit->end = igraph_vector_int_size(eit->vec);
 1961|  6.18k|        if (!igraph_vector_int_isininterval(eit->vec, 0, igraph_ecount(graph) - 1)) {
  ------------------
  |  Branch (1961:13): [True: 0, False: 6.18k]
  ------------------
 1962|      0|            IGRAPH_ERROR("Cannot create iterator.", IGRAPH_EINVEID);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1963|      0|        }
 1964|  6.18k|        break;
 1965|  6.18k|    case IGRAPH_ES_RANGE:
  ------------------
  |  Branch (1965:5): [True: 0, False: 10.3k]
  ------------------
 1966|      0|        {
 1967|      0|            igraph_int_t no_of_edges = igraph_ecount(graph);
 1968|      0|            if (es.data.range.start < 0 ||
  ------------------
  |  Branch (1968:17): [True: 0, False: 0]
  ------------------
 1969|      0|                es.data.range.start > no_of_edges ||
  ------------------
  |  Branch (1969:17): [True: 0, False: 0]
  ------------------
 1970|      0|                (no_of_edges > 0 && es.data.range.start == no_of_edges)) {
  ------------------
  |  Branch (1970:18): [True: 0, False: 0]
  |  Branch (1970:37): [True: 0, False: 0]
  ------------------
 1971|      0|                IGRAPH_ERROR("Cannot create range iterator, starting edge ID out of range.", IGRAPH_EINVEID);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1972|      0|            }
 1973|      0|            if (es.data.range.end < 0 || es.data.range.end > no_of_edges) {
  ------------------
  |  Branch (1973:17): [True: 0, False: 0]
  |  Branch (1973:42): [True: 0, False: 0]
  ------------------
 1974|      0|                IGRAPH_ERROR("Cannot create range iterator, ending edge ID out of range.", IGRAPH_EINVEID);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1975|      0|            }
 1976|      0|        }
 1977|      0|        eit->type = IGRAPH_EIT_RANGE;
 1978|      0|        eit->pos = es.data.range.start;
 1979|      0|        eit->start = es.data.range.start;
 1980|      0|        eit->end = es.data.range.end;
 1981|      0|        break;
 1982|      0|    case IGRAPH_ES_PAIRS:
  ------------------
  |  Branch (1982:5): [True: 0, False: 10.3k]
  ------------------
 1983|      0|        IGRAPH_CHECK(igraph_i_eit_pairs(graph, es, eit));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1984|      0|        break;
 1985|      0|    case IGRAPH_ES_PATH:
  ------------------
  |  Branch (1985:5): [True: 0, False: 10.3k]
  ------------------
 1986|      0|        IGRAPH_CHECK(igraph_i_eit_path(graph, es, eit));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1987|      0|        break;
 1988|      0|    case IGRAPH_ES_ALL_BETWEEN:
  ------------------
  |  Branch (1988:5): [True: 0, False: 10.3k]
  ------------------
 1989|      0|        IGRAPH_CHECK(igraph_i_eit_all_between(graph, es, eit));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1990|      0|        break;
 1991|      0|    default:
  ------------------
  |  Branch (1991:5): [True: 0, False: 10.3k]
  ------------------
 1992|      0|        IGRAPH_ERROR("Cannot create iterator, invalid selector.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1993|      0|        break;
 1994|  10.3k|    }
 1995|  10.3k|    return IGRAPH_SUCCESS;
 1996|  10.3k|}
igraph_eit_destroy:
 2008|  10.3k|void igraph_eit_destroy(const igraph_eit_t *eit) {
 2009|  10.3k|    switch (eit->type) {
 2010|  4.12k|    case IGRAPH_EIT_RANGE:
  ------------------
  |  Branch (2010:5): [True: 4.12k, False: 6.18k]
  ------------------
 2011|  10.3k|    case IGRAPH_EIT_VECTORPTR:
  ------------------
  |  Branch (2011:5): [True: 6.18k, False: 4.12k]
  ------------------
 2012|  10.3k|        break;
 2013|      0|    case IGRAPH_EIT_VECTOR:
  ------------------
  |  Branch (2013:5): [True: 0, False: 10.3k]
  ------------------
 2014|      0|        igraph_vector_int_destroy((igraph_vector_int_t*)eit->vec);
 2015|      0|        igraph_free((igraph_vector_int_t*)eit->vec);
 2016|      0|        break;
 2017|      0|    default:
  ------------------
  |  Branch (2017:5): [True: 0, False: 10.3k]
  ------------------
 2018|       |        /*     IGRAPH_ERROR("Cannot destroy iterator, unknown type", IGRAPH_EINVAL); */
 2019|      0|        break;
 2020|  10.3k|    }
 2021|  10.3k|}

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

igraph_empty_attrs:
  102|  9.95k|) {
  103|       |
  104|  9.95k|    if (n < 0) {
  ------------------
  |  Branch (104:9): [True: 0, False: 9.95k]
  ------------------
  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|  9.95k|    memset(graph, 0, sizeof(igraph_t));
  109|       |
  110|  9.95k|    graph->n = 0;
  111|  9.95k|    graph->directed = directed;
  112|  9.95k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&graph->from, 0);
  ------------------
  |  |  119|  9.95k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  9.95k|    do { \
  |  |  |  |  657|  9.95k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  9.95k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  9.95k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.95k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  9.95k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 9.95k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  9.95k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  9.95k|    do { \
  |  |  |  |  604|  9.95k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  9.95k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  9.95k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  9.95k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 9.95k]
  |  |  |  |  ------------------
  |  |  |  |  608|  9.95k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  9.95k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 9.95k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 9.95k]
  |  |  ------------------
  ------------------
  113|  9.95k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&graph->to, 0);
  ------------------
  |  |  119|  9.95k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  9.95k|    do { \
  |  |  |  |  657|  9.95k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  9.95k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  9.95k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.95k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  9.95k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 9.95k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  9.95k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  9.95k|    do { \
  |  |  |  |  604|  9.95k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  9.95k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  9.95k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  9.95k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 9.95k]
  |  |  |  |  ------------------
  |  |  |  |  608|  9.95k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  9.95k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 9.95k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 9.95k]
  |  |  ------------------
  ------------------
  114|  9.95k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&graph->oi, 0);
  ------------------
  |  |  119|  9.95k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  9.95k|    do { \
  |  |  |  |  657|  9.95k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  9.95k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  9.95k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.95k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  9.95k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 9.95k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  9.95k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  9.95k|    do { \
  |  |  |  |  604|  9.95k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  9.95k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  9.95k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  9.95k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 9.95k]
  |  |  |  |  ------------------
  |  |  |  |  608|  9.95k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  9.95k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 9.95k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 9.95k]
  |  |  ------------------
  ------------------
  115|  9.95k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&graph->ii, 0);
  ------------------
  |  |  119|  9.95k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  9.95k|    do { \
  |  |  |  |  657|  9.95k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  9.95k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  9.95k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.95k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  9.95k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 9.95k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  9.95k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  9.95k|    do { \
  |  |  |  |  604|  9.95k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  9.95k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  9.95k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  9.95k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 9.95k]
  |  |  |  |  ------------------
  |  |  |  |  608|  9.95k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  9.95k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 9.95k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 9.95k]
  |  |  ------------------
  ------------------
  116|  9.95k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&graph->os, 1);
  ------------------
  |  |  119|  9.95k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  9.95k|    do { \
  |  |  |  |  657|  9.95k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  9.95k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  9.95k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.95k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  9.95k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 9.95k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  9.95k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  9.95k|    do { \
  |  |  |  |  604|  9.95k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  9.95k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  9.95k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  9.95k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 9.95k]
  |  |  |  |  ------------------
  |  |  |  |  608|  9.95k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  9.95k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 9.95k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 9.95k]
  |  |  ------------------
  ------------------
  117|  9.95k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&graph->is, 1);
  ------------------
  |  |  119|  9.95k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  9.95k|    do { \
  |  |  |  |  657|  9.95k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  9.95k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  9.95k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.95k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  9.95k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 9.95k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  9.95k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  9.95k|    do { \
  |  |  |  |  604|  9.95k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  9.95k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  9.95k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  9.95k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 9.95k]
  |  |  |  |  ------------------
  |  |  |  |  608|  9.95k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  9.95k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 9.95k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 9.95k]
  |  |  ------------------
  ------------------
  118|       |
  119|       |    /* init cache */
  120|  9.95k|    graph->cache = IGRAPH_CALLOC(1, igraph_i_property_cache_t);
  ------------------
  |  |   33|  9.95k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  19.9k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 0, Folded]
  |  |  |  |  |  Branch (31:24): [True: 0, Folded]
  |  |  |  |  |  Branch (31:66): [True: 9.95k, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  121|  9.95k|    IGRAPH_CHECK_OOM(graph->cache, "Cannot create graph.");
  ------------------
  |  |  709|  9.95k|    do { \
  |  |  710|  9.95k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  9.95k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.95k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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.95k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 9.95k]
  |  |  ------------------
  ------------------
  122|  9.95k|    IGRAPH_FINALLY(igraph_free, graph->cache);
  ------------------
  |  |  603|  9.95k|    do { \
  |  |  604|  9.95k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  9.95k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  9.95k|         * incorrect destructor function with the pointer */ \
  |  |  607|  9.95k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 9.95k]
  |  |  ------------------
  |  |  608|  9.95k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  9.95k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 9.95k]
  |  |  ------------------
  ------------------
  123|  9.95k|    IGRAPH_CHECK(igraph_i_property_cache_init(graph->cache));
  ------------------
  |  |  656|  9.95k|    do { \
  |  |  657|  9.95k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  9.95k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  9.95k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.95k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  9.95k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 9.95k]
  |  |  ------------------
  ------------------
  124|  9.95k|    IGRAPH_FINALLY(igraph_i_property_cache_destroy, graph->cache);
  ------------------
  |  |  603|  9.95k|    do { \
  |  |  604|  9.95k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  9.95k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  9.95k|         * incorrect destructor function with the pointer */ \
  |  |  607|  9.95k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 9.95k]
  |  |  ------------------
  |  |  608|  9.95k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  9.95k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 9.95k]
  |  |  ------------------
  ------------------
  125|       |
  126|  9.95k|    VECTOR(graph->os)[0] = 0;
  ------------------
  |  |   60|  9.95k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  127|  9.95k|    VECTOR(graph->is)[0] = 0;
  ------------------
  |  |   60|  9.95k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  128|       |
  129|       |    /* init attributes */
  130|  9.95k|    IGRAPH_CHECK(igraph_i_attribute_init(graph, attr));
  ------------------
  |  |  656|  9.95k|    do { \
  |  |  657|  9.95k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  9.95k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  9.95k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.95k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  9.95k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 9.95k]
  |  |  ------------------
  ------------------
  131|       |
  132|       |    /* add the vertices */
  133|  9.95k|    IGRAPH_CHECK(igraph_add_vertices(graph, n, 0));
  ------------------
  |  |  656|  9.95k|    do { \
  |  |  657|  9.95k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  9.95k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  9.95k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.95k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  9.95k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 9.95k]
  |  |  ------------------
  ------------------
  134|       |
  135|  9.95k|    IGRAPH_FINALLY_CLEAN(8);
  136|  9.95k|    return IGRAPH_SUCCESS;
  137|  9.95k|}
igraph_destroy:
  155|  14.7k|void igraph_destroy(igraph_t *graph) {
  156|  14.7k|    igraph_i_attribute_destroy(graph);
  157|       |
  158|  14.7k|    igraph_i_property_cache_destroy(graph->cache);
  159|  14.7k|    IGRAPH_FREE(graph->cache);
  ------------------
  |  |   36|  14.7k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  160|       |
  161|  14.7k|    igraph_vector_int_destroy(&graph->from);
  162|  14.7k|    igraph_vector_int_destroy(&graph->to);
  163|  14.7k|    igraph_vector_int_destroy(&graph->oi);
  164|  14.7k|    igraph_vector_int_destroy(&graph->ii);
  165|  14.7k|    igraph_vector_int_destroy(&graph->os);
  166|  14.7k|    igraph_vector_int_destroy(&graph->is);
  167|  14.7k|}
igraph_copy:
  195|  2.40k|igraph_error_t igraph_copy(igraph_t *to, const igraph_t *from) {
  196|  2.40k|    memset(to, 0, sizeof(igraph_t));
  197|       |
  198|  2.40k|    to->n = from->n;
  199|  2.40k|    to->directed = from->directed;
  200|  2.40k|    IGRAPH_CHECK(igraph_vector_int_init_copy(&to->from, &from->from));
  ------------------
  |  |  656|  2.40k|    do { \
  |  |  657|  2.40k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.40k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.40k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.40k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.40k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.40k]
  |  |  ------------------
  ------------------
  201|  2.40k|    IGRAPH_FINALLY(igraph_vector_int_destroy, &to->from);
  ------------------
  |  |  603|  2.40k|    do { \
  |  |  604|  2.40k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.40k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.40k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.40k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.40k]
  |  |  ------------------
  |  |  608|  2.40k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.40k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.40k]
  |  |  ------------------
  ------------------
  202|  2.40k|    IGRAPH_CHECK(igraph_vector_int_init_copy(&to->to, &from->to));
  ------------------
  |  |  656|  2.40k|    do { \
  |  |  657|  2.40k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.40k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.40k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.40k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.40k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.40k]
  |  |  ------------------
  ------------------
  203|  2.40k|    IGRAPH_FINALLY(igraph_vector_int_destroy, &to->to);
  ------------------
  |  |  603|  2.40k|    do { \
  |  |  604|  2.40k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.40k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.40k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.40k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.40k]
  |  |  ------------------
  |  |  608|  2.40k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.40k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.40k]
  |  |  ------------------
  ------------------
  204|  2.40k|    IGRAPH_CHECK(igraph_vector_int_init_copy(&to->oi, &from->oi));
  ------------------
  |  |  656|  2.40k|    do { \
  |  |  657|  2.40k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.40k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.40k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.40k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.40k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.40k]
  |  |  ------------------
  ------------------
  205|  2.40k|    IGRAPH_FINALLY(igraph_vector_int_destroy, &to->oi);
  ------------------
  |  |  603|  2.40k|    do { \
  |  |  604|  2.40k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.40k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.40k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.40k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.40k]
  |  |  ------------------
  |  |  608|  2.40k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.40k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.40k]
  |  |  ------------------
  ------------------
  206|  2.40k|    IGRAPH_CHECK(igraph_vector_int_init_copy(&to->ii, &from->ii));
  ------------------
  |  |  656|  2.40k|    do { \
  |  |  657|  2.40k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.40k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.40k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.40k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.40k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.40k]
  |  |  ------------------
  ------------------
  207|  2.40k|    IGRAPH_FINALLY(igraph_vector_int_destroy, &to->ii);
  ------------------
  |  |  603|  2.40k|    do { \
  |  |  604|  2.40k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.40k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.40k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.40k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.40k]
  |  |  ------------------
  |  |  608|  2.40k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.40k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.40k]
  |  |  ------------------
  ------------------
  208|  2.40k|    IGRAPH_CHECK(igraph_vector_int_init_copy(&to->os, &from->os));
  ------------------
  |  |  656|  2.40k|    do { \
  |  |  657|  2.40k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.40k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.40k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.40k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.40k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.40k]
  |  |  ------------------
  ------------------
  209|  2.40k|    IGRAPH_FINALLY(igraph_vector_int_destroy, &to->os);
  ------------------
  |  |  603|  2.40k|    do { \
  |  |  604|  2.40k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.40k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.40k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.40k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.40k]
  |  |  ------------------
  |  |  608|  2.40k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.40k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.40k]
  |  |  ------------------
  ------------------
  210|  2.40k|    IGRAPH_CHECK(igraph_vector_int_init_copy(&to->is, &from->is));
  ------------------
  |  |  656|  2.40k|    do { \
  |  |  657|  2.40k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.40k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.40k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.40k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.40k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.40k]
  |  |  ------------------
  ------------------
  211|  2.40k|    IGRAPH_FINALLY(igraph_vector_int_destroy, &to->is);
  ------------------
  |  |  603|  2.40k|    do { \
  |  |  604|  2.40k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.40k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.40k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.40k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.40k]
  |  |  ------------------
  |  |  608|  2.40k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.40k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.40k]
  |  |  ------------------
  ------------------
  212|       |
  213|  2.40k|    to->cache = IGRAPH_CALLOC(1, igraph_i_property_cache_t);
  ------------------
  |  |   33|  2.40k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  4.81k|    (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.40k, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  214|  2.40k|    IGRAPH_CHECK_OOM(to->cache, "Cannot copy graph.");
  ------------------
  |  |  709|  2.40k|    do { \
  |  |  710|  2.40k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  2.40k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.40k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  2.40k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 2.40k]
  |  |  ------------------
  ------------------
  215|  2.40k|    IGRAPH_FINALLY(igraph_free, to->cache);
  ------------------
  |  |  603|  2.40k|    do { \
  |  |  604|  2.40k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.40k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.40k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.40k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.40k]
  |  |  ------------------
  |  |  608|  2.40k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.40k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.40k]
  |  |  ------------------
  ------------------
  216|  2.40k|    IGRAPH_CHECK(igraph_i_property_cache_copy(to->cache, from->cache));
  ------------------
  |  |  656|  2.40k|    do { \
  |  |  657|  2.40k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.40k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.40k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.40k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.40k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.40k]
  |  |  ------------------
  ------------------
  217|  2.40k|    IGRAPH_FINALLY(igraph_i_property_cache_destroy, to->cache);
  ------------------
  |  |  603|  2.40k|    do { \
  |  |  604|  2.40k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.40k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.40k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.40k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.40k]
  |  |  ------------------
  |  |  608|  2.40k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.40k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.40k]
  |  |  ------------------
  ------------------
  218|       |
  219|  2.40k|    IGRAPH_CHECK(igraph_i_attribute_copy(to, from, true, true, true));
  ------------------
  |  |  656|  2.40k|    do { \
  |  |  657|  2.40k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.40k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.40k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.40k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.40k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.40k]
  |  |  ------------------
  ------------------
  220|       |
  221|  2.40k|    IGRAPH_FINALLY_CLEAN(8);
  222|  2.40k|    return IGRAPH_SUCCESS;
  223|  2.40k|}
igraph_add_edges:
  257|  9.04k|) {
  258|  9.04k|    igraph_int_t no_of_edges = igraph_vector_int_size(&graph->from);
  259|  9.04k|    igraph_int_t edges_to_add = igraph_vector_int_size(edges) / 2;
  260|  9.04k|    igraph_int_t new_no_of_edges;
  261|  9.04k|    igraph_int_t i = 0;
  262|  9.04k|    igraph_vector_int_t newoi, newii;
  263|  9.04k|    igraph_bool_t directed = igraph_is_directed(graph);
  264|       |
  265|  9.04k|    if (igraph_vector_int_size(edges) % 2 != 0) {
  ------------------
  |  Branch (265:9): [True: 0, False: 9.04k]
  ------------------
  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|  9.04k|    if (!igraph_vector_int_isininterval(edges, 0, igraph_vcount(graph) - 1)) {
  ------------------
  |  Branch (268:9): [True: 0, False: 9.04k]
  ------------------
  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|  9.04k|    IGRAPH_SAFE_ADD(no_of_edges, edges_to_add, &new_no_of_edges);
  ------------------
  |  |   47|  9.04k|    do { \
  |  |   48|  9.04k|        igraph_int_t _safe_a = (a), _safe_b = (b); \
  |  |   49|  9.04k|        igraph_int_t _safe_sum; \
  |  |   50|  9.04k|        if (__builtin_add_overflow(_safe_a, _safe_b, &_safe_sum)) { \
  |  |  ------------------
  |  |  |  Branch (50:13): [True: 0, False: 9.04k]
  |  |  ------------------
  |  |   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|  9.04k|        *(res) = _safe_sum; \
  |  |   54|  9.04k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (54:14): [Folded, False: 9.04k]
  |  |  ------------------
  ------------------
  274|  9.04k|    if (new_no_of_edges > IGRAPH_ECOUNT_MAX) {
  ------------------
  |  |  118|  9.04k|#define IGRAPH_ECOUNT_MAX (IGRAPH_INTEGER_MAX/2)
  |  |  ------------------
  |  |  |  |   72|  9.04k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  |  |  ------------------
  ------------------
  |  Branch (274:9): [True: 0, False: 9.04k]
  ------------------
  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|  9.04k|    IGRAPH_CHECK(igraph_vector_int_reserve(&graph->from, no_of_edges + edges_to_add));
  ------------------
  |  |  656|  9.04k|    do { \
  |  |  657|  9.04k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  9.04k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  9.04k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.04k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  9.04k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 9.04k]
  |  |  ------------------
  ------------------
  279|  9.04k|    IGRAPH_CHECK(igraph_vector_int_reserve(&graph->to, no_of_edges + edges_to_add));
  ------------------
  |  |  656|  9.04k|    do { \
  |  |  657|  9.04k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  9.04k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  9.04k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.04k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  9.04k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 9.04k]
  |  |  ------------------
  ------------------
  280|       |
  281|  1.29M|    while (i < edges_to_add * 2) {
  ------------------
  |  Branch (281:12): [True: 1.28M, False: 9.04k]
  ------------------
  282|  1.28M|        if (directed || VECTOR(*edges)[i] > VECTOR(*edges)[i + 1]) {
  ------------------
  |  |   60|  46.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      if (directed || VECTOR(*edges)[i] > VECTOR(*edges)[i + 1]) {
  ------------------
  |  |   60|  46.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (282:13): [True: 1.23M, False: 46.3k]
  |  Branch (282:25): [True: 44.5k, False: 1.76k]
  ------------------
  283|  1.27M|            igraph_vector_int_push_back(&graph->from, VECTOR(*edges)[i++]); /* reserved */
  ------------------
  |  |   60|  1.27M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  284|  1.27M|            igraph_vector_int_push_back(&graph->to,   VECTOR(*edges)[i++]); /* reserved */
  ------------------
  |  |   60|  1.27M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  285|  1.27M|        } else {
  286|  1.76k|            igraph_vector_int_push_back(&graph->to,   VECTOR(*edges)[i++]); /* reserved */
  ------------------
  |  |   60|  1.76k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  287|  1.76k|            igraph_vector_int_push_back(&graph->from, VECTOR(*edges)[i++]); /* reserved */
  ------------------
  |  |   60|  1.76k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  288|  1.76k|        }
  289|  1.28M|    }
  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|  9.04k|#define CHECK_ERR(expr) \
  299|  9.04k|    do { \
  300|  9.04k|        igraph_error_t err = (expr); \
  301|  9.04k|        if (err != IGRAPH_SUCCESS) { \
  302|  9.04k|            igraph_vector_int_resize(&graph->from, no_of_edges); /* gets smaller, error safe */ \
  303|  9.04k|            igraph_vector_int_resize(&graph->to, no_of_edges);   /* gets smaller, error safe */ \
  304|  9.04k|            IGRAPH_FINALLY_EXIT(); \
  305|  9.04k|            IGRAPH_ERROR("Cannot add edges.", err); \
  306|  9.04k|        } \
  307|  9.04k|    } while (0)
  308|       |
  309|       |    /* oi & ii */
  310|  9.04k|    IGRAPH_FINALLY_ENTER();
  311|  9.04k|    {
  312|  9.04k|        CHECK_ERR(igraph_vector_int_init(&newoi, no_of_edges));
  ------------------
  |  |  299|  9.04k|    do { \
  |  |  300|  9.04k|        igraph_error_t err = (expr); \
  |  |  301|  9.04k|        if (err != IGRAPH_SUCCESS) { \
  |  |  ------------------
  |  |  |  Branch (301:13): [True: 0, False: 9.04k]
  |  |  ------------------
  |  |  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|  9.04k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (307:14): [Folded, False: 9.04k]
  |  |  ------------------
  ------------------
  313|  9.04k|        IGRAPH_FINALLY(igraph_vector_int_destroy, &newoi);
  ------------------
  |  |  603|  9.04k|    do { \
  |  |  604|  9.04k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  9.04k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  9.04k|         * incorrect destructor function with the pointer */ \
  |  |  607|  9.04k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 9.04k]
  |  |  ------------------
  |  |  608|  9.04k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  9.04k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 9.04k]
  |  |  ------------------
  ------------------
  314|  9.04k|        CHECK_ERR(igraph_vector_int_init(&newii, no_of_edges));
  ------------------
  |  |  299|  9.04k|    do { \
  |  |  300|  9.04k|        igraph_error_t err = (expr); \
  |  |  301|  9.04k|        if (err != IGRAPH_SUCCESS) { \
  |  |  ------------------
  |  |  |  Branch (301:13): [True: 0, False: 9.04k]
  |  |  ------------------
  |  |  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|  9.04k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (307:14): [Folded, False: 9.04k]
  |  |  ------------------
  ------------------
  315|  9.04k|        IGRAPH_FINALLY(igraph_vector_int_destroy, &newii);
  ------------------
  |  |  603|  9.04k|    do { \
  |  |  604|  9.04k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  9.04k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  9.04k|         * incorrect destructor function with the pointer */ \
  |  |  607|  9.04k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 9.04k]
  |  |  ------------------
  |  |  608|  9.04k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  9.04k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 9.04k]
  |  |  ------------------
  ------------------
  316|  9.04k|        CHECK_ERR(igraph_vector_int_pair_order(&graph->from, &graph->to, &newoi, graph->n));
  ------------------
  |  |  299|  9.04k|    do { \
  |  |  300|  9.04k|        igraph_error_t err = (expr); \
  |  |  301|  9.04k|        if (err != IGRAPH_SUCCESS) { \
  |  |  ------------------
  |  |  |  Branch (301:13): [True: 0, False: 9.04k]
  |  |  ------------------
  |  |  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|  9.04k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (307:14): [Folded, False: 9.04k]
  |  |  ------------------
  ------------------
  317|  9.04k|        CHECK_ERR(igraph_vector_int_pair_order(&graph->to, &graph->from, &newii, graph->n));
  ------------------
  |  |  299|  9.04k|    do { \
  |  |  300|  9.04k|        igraph_error_t err = (expr); \
  |  |  301|  9.04k|        if (err != IGRAPH_SUCCESS) { \
  |  |  ------------------
  |  |  |  Branch (301:13): [True: 0, False: 9.04k]
  |  |  ------------------
  |  |  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|  9.04k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (307:14): [Folded, False: 9.04k]
  |  |  ------------------
  ------------------
  318|       |
  319|       |        /* Attributes */
  320|  9.04k|        if (graph->attr) {
  ------------------
  |  Branch (320:13): [True: 0, False: 9.04k]
  ------------------
  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|  9.04k|        igraph_i_create_start_vectors(&graph->os, &graph->from, &newoi, graph->n);
  327|  9.04k|        igraph_i_create_start_vectors(&graph->is, &graph->to, &newii, graph->n);
  328|       |
  329|       |        /* everything went fine */
  330|  9.04k|        igraph_vector_int_destroy(&graph->oi);
  331|  9.04k|        igraph_vector_int_destroy(&graph->ii);
  332|  9.04k|        IGRAPH_FINALLY_CLEAN(2);
  333|       |
  334|  9.04k|        graph->oi = newoi;
  335|  9.04k|        graph->ii = newii;
  336|  9.04k|    }
  337|      0|    IGRAPH_FINALLY_EXIT();
  338|       |
  339|  9.04k|#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|  9.04k|    igraph_i_property_cache_invalidate_conditionally(
  354|  9.04k|        graph,
  355|  9.04k|        /* keep_always = */ 0,
  356|       |        /* keep_when_false = */
  357|  9.04k|        (1 << IGRAPH_PROP_IS_DAG) | (1 << IGRAPH_PROP_IS_FOREST),
  358|       |        /* keep_when_true = */
  359|  9.04k|        (1 << IGRAPH_PROP_IS_WEAKLY_CONNECTED) |
  360|  9.04k|        (1 << IGRAPH_PROP_IS_STRONGLY_CONNECTED) |
  361|  9.04k|        (1 << IGRAPH_PROP_HAS_LOOP) |
  362|  9.04k|        (1 << IGRAPH_PROP_HAS_MULTI) |
  363|  9.04k|        (1 << IGRAPH_PROP_HAS_MUTUAL)
  364|  9.04k|    );
  365|       |
  366|  9.04k|    return IGRAPH_SUCCESS;
  367|  9.04k|}
igraph_add_vertices:
  391|  11.7k|) {
  392|  11.7k|    igraph_int_t ec = igraph_ecount(graph);
  393|  11.7k|    igraph_int_t vc = igraph_vcount(graph);
  394|  11.7k|    igraph_int_t new_vc;
  395|  11.7k|    igraph_int_t i;
  396|       |
  397|  11.7k|    if (nv < 0) {
  ------------------
  |  Branch (397:9): [True: 0, False: 11.7k]
  ------------------
  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|  11.7k|    IGRAPH_SAFE_ADD(graph->n, nv, &new_vc);
  ------------------
  |  |   47|  11.7k|    do { \
  |  |   48|  11.7k|        igraph_int_t _safe_a = (a), _safe_b = (b); \
  |  |   49|  11.7k|        igraph_int_t _safe_sum; \
  |  |   50|  11.7k|        if (__builtin_add_overflow(_safe_a, _safe_b, &_safe_sum)) { \
  |  |  ------------------
  |  |  |  Branch (50:13): [True: 0, False: 11.7k]
  |  |  ------------------
  |  |   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|  11.7k|        *(res) = _safe_sum; \
  |  |   54|  11.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (54:14): [Folded, False: 11.7k]
  |  |  ------------------
  ------------------
  402|  11.7k|    if (new_vc > IGRAPH_VCOUNT_MAX) {
  ------------------
  |  |  100|  11.7k|#define IGRAPH_VCOUNT_MAX (IGRAPH_INTEGER_MAX-1)
  |  |  ------------------
  |  |  |  |   72|  11.7k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  |  |  ------------------
  ------------------
  |  Branch (402:9): [True: 0, False: 11.7k]
  ------------------
  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|  11.7k|    IGRAPH_CHECK(igraph_vector_int_reserve(&graph->os, new_vc + 1));
  ------------------
  |  |  656|  11.7k|    do { \
  |  |  657|  11.7k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  11.7k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  11.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 11.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|  11.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 11.7k]
  |  |  ------------------
  ------------------
  407|  11.7k|    IGRAPH_CHECK(igraph_vector_int_reserve(&graph->is, new_vc + 1));
  ------------------
  |  |  656|  11.7k|    do { \
  |  |  657|  11.7k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  11.7k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  11.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 11.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|  11.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 11.7k]
  |  |  ------------------
  ------------------
  408|       |
  409|  11.7k|    igraph_vector_int_resize(&graph->os, new_vc + 1); /* reserved */
  410|  11.7k|    igraph_vector_int_resize(&graph->is, new_vc + 1); /* reserved */
  411|  1.62M|    for (i = graph->n + 1; i < new_vc + 1; i++) {
  ------------------
  |  Branch (411:28): [True: 1.61M, False: 11.7k]
  ------------------
  412|  1.61M|        VECTOR(graph->os)[i] = ec;
  ------------------
  |  |   60|  1.61M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  413|  1.61M|        VECTOR(graph->is)[i] = ec;
  ------------------
  |  |   60|  1.61M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  414|  1.61M|    }
  415|       |
  416|  11.7k|    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|  11.7k|    if (graph->attr) {
  ------------------
  |  Branch (422:9): [True: 0, False: 11.7k]
  ------------------
  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|  11.7k|    igraph_i_property_cache_invalidate_conditionally(
  458|  11.7k|        graph,
  459|       |        /* keep_always = */
  460|  11.7k|        (1 << IGRAPH_PROP_HAS_LOOP) |
  461|  11.7k|        (1 << IGRAPH_PROP_HAS_MULTI) |
  462|  11.7k|        (1 << IGRAPH_PROP_HAS_MUTUAL) |
  463|  11.7k|        (1 << IGRAPH_PROP_IS_DAG) |
  464|  11.7k|        (1 << IGRAPH_PROP_IS_FOREST),
  465|       |        /* keep_when_false = */
  466|  11.7k|        igraph_vcount(graph) >= 2 ? (
  ------------------
  |  Branch (466:9): [True: 10.6k, False: 1.06k]
  ------------------
  467|  10.6k|            (1 << IGRAPH_PROP_IS_STRONGLY_CONNECTED) |
  468|  10.6k|            (1 << IGRAPH_PROP_IS_WEAKLY_CONNECTED)
  469|  10.6k|        ) : 0,
  470|       |        /* keep_when_true = */
  471|  11.7k|        0
  472|  11.7k|    );
  473|       |
  474|  11.7k|    return IGRAPH_SUCCESS;
  475|  11.7k|}
igraph_delete_edges:
  500|  2.06k|igraph_error_t igraph_delete_edges(igraph_t *graph, igraph_es_t edges) {
  501|  2.06k|    igraph_int_t no_of_edges = igraph_ecount(graph);
  502|  2.06k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  503|  2.06k|    igraph_int_t edges_to_remove = 0;
  504|  2.06k|    igraph_int_t remaining_edges;
  505|  2.06k|    igraph_eit_t eit;
  506|       |
  507|  2.06k|    igraph_vector_int_t newfrom, newto;
  508|  2.06k|    igraph_vector_int_t newoi, newii;
  509|       |
  510|  2.06k|    igraph_bool_t *mark;
  511|  2.06k|    igraph_int_t i, j;
  512|       |
  513|  2.06k|    mark = IGRAPH_CALLOC(no_of_edges, igraph_bool_t);
  ------------------
  |  |   33|  2.06k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  4.12k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 2.06k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 2.06k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 1.97k, False: 83]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  514|  2.06k|    IGRAPH_CHECK_OOM(mark, "Cannot delete edges.");
  ------------------
  |  |  709|  2.06k|    do { \
  |  |  710|  2.06k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  515|  2.06k|    IGRAPH_FINALLY(igraph_free, mark);
  ------------------
  |  |  603|  2.06k|    do { \
  |  |  604|  2.06k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.06k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.06k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.06k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.06k]
  |  |  ------------------
  |  |  608|  2.06k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  516|       |
  517|  2.06k|    IGRAPH_CHECK(igraph_eit_create(graph, edges, &eit));
  ------------------
  |  |  656|  2.06k|    do { \
  |  |  657|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  518|  2.06k|    IGRAPH_FINALLY(igraph_eit_destroy, &eit);
  ------------------
  |  |  603|  2.06k|    do { \
  |  |  604|  2.06k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.06k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.06k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.06k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.06k]
  |  |  ------------------
  |  |  608|  2.06k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  519|       |
  520|  48.0k|    for (IGRAPH_EIT_RESET(eit); !IGRAPH_EIT_END(eit); IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  393|  2.06k|#define IGRAPH_EIT_RESET(eit) ((eit).pos = (eit).start)
  ------------------
                  for (IGRAPH_EIT_RESET(eit); !IGRAPH_EIT_END(eit); IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  371|  48.0k|#define IGRAPH_EIT_END(eit)   ((eit).pos >= (eit).end)
  ------------------
                  for (IGRAPH_EIT_RESET(eit); !IGRAPH_EIT_END(eit); IGRAPH_EIT_NEXT(eit)) {
  ------------------
  |  |  359|  46.0k|#define IGRAPH_EIT_NEXT(eit) (++((eit).pos))
  ------------------
  |  Branch (520:33): [True: 46.0k, False: 2.06k]
  ------------------
  521|  46.0k|        igraph_int_t e = IGRAPH_EIT_GET(eit);
  ------------------
  |  |  405|  46.0k|    (igraph_int_t)((((eit).type == IGRAPH_EIT_RANGE) ? (eit).pos : \
  |  |  ------------------
  |  |  |  Branch (405:21): [True: 0, False: 46.0k]
  |  |  ------------------
  |  |  406|  46.0k|                        VECTOR(*(eit).vec)[(eit).pos]))
  |  |  ------------------
  |  |  |  |   60|  46.0k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  522|  46.0k|        if (! mark[e]) {
  ------------------
  |  Branch (522:13): [True: 46.0k, False: 0]
  ------------------
  523|  46.0k|            edges_to_remove++;
  524|  46.0k|            mark[e] = true;
  525|  46.0k|        }
  526|  46.0k|    }
  527|  2.06k|    remaining_edges = no_of_edges - edges_to_remove;
  528|       |
  529|       |    /* We don't need the iterator any more */
  530|  2.06k|    igraph_eit_destroy(&eit);
  531|  2.06k|    IGRAPH_FINALLY_CLEAN(1);
  532|       |
  533|  2.06k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newfrom, remaining_edges);
  ------------------
  |  |  119|  2.06k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.06k|    do { \
  |  |  |  |  657|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.06k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.06k|    do { \
  |  |  |  |  604|  2.06k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.06k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.06k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.06k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.06k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  534|  2.06k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newto, remaining_edges);
  ------------------
  |  |  119|  2.06k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.06k|    do { \
  |  |  |  |  657|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.06k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.06k|    do { \
  |  |  |  |  604|  2.06k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.06k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.06k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.06k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.06k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  535|       |
  536|       |    /* Actually remove the edges, move from pos i to pos j in newfrom/newto */
  537|  57.2k|    for (i = 0, j = 0; j < remaining_edges; i++) {
  ------------------
  |  Branch (537:24): [True: 55.1k, False: 2.06k]
  ------------------
  538|  55.1k|        if (! mark[i]) {
  ------------------
  |  Branch (538:13): [True: 24.7k, False: 30.4k]
  ------------------
  539|  24.7k|            VECTOR(newfrom)[j] = VECTOR(graph->from)[i];
  ------------------
  |  |   60|  24.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(newfrom)[j] = VECTOR(graph->from)[i];
  ------------------
  |  |   60|  24.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  540|  24.7k|            VECTOR(newto)[j] = VECTOR(graph->to)[i];
  ------------------
  |  |   60|  24.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(newto)[j] = VECTOR(graph->to)[i];
  ------------------
  |  |   60|  24.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  541|  24.7k|            j++;
  542|  24.7k|        }
  543|  55.1k|    }
  544|       |
  545|       |    /* Create index, this might require additional memory */
  546|  2.06k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newoi, remaining_edges);
  ------------------
  |  |  119|  2.06k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.06k|    do { \
  |  |  |  |  657|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.06k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.06k|    do { \
  |  |  |  |  604|  2.06k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.06k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.06k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.06k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.06k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  547|  2.06k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newii, remaining_edges);
  ------------------
  |  |  119|  2.06k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.06k|    do { \
  |  |  |  |  657|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.06k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.06k|    do { \
  |  |  |  |  604|  2.06k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.06k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.06k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.06k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.06k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  548|  2.06k|    IGRAPH_CHECK(igraph_vector_int_pair_order(&newfrom, &newto, &newoi, no_of_nodes));
  ------------------
  |  |  656|  2.06k|    do { \
  |  |  657|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  549|  2.06k|    IGRAPH_CHECK(igraph_vector_int_pair_order(&newto, &newfrom, &newii, no_of_nodes));
  ------------------
  |  |  656|  2.06k|    do { \
  |  |  657|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  550|       |
  551|       |    /* Edge attributes, we need an index that gives the IDs of the
  552|       |       original edges for every new edge.
  553|       |    */
  554|  2.06k|    if (graph->attr) {
  ------------------
  |  Branch (554:9): [True: 0, False: 2.06k]
  ------------------
  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|  2.06k|    igraph_vector_int_destroy(&graph->from);
  569|  2.06k|    igraph_vector_int_destroy(&graph->to);
  570|  2.06k|    igraph_vector_int_destroy(&graph->oi);
  571|  2.06k|    igraph_vector_int_destroy(&graph->ii);
  572|  2.06k|    graph->from = newfrom;
  573|  2.06k|    graph->to = newto;
  574|  2.06k|    graph->oi = newoi;
  575|  2.06k|    graph->ii = newii;
  576|  2.06k|    IGRAPH_FINALLY_CLEAN(4);
  577|       |
  578|  2.06k|    IGRAPH_FREE(mark);
  ------------------
  |  |   36|  2.06k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  579|  2.06k|    IGRAPH_FINALLY_CLEAN(1);
  580|       |
  581|       |    /* Create start vectors, no memory is needed for this */
  582|  2.06k|    igraph_i_create_start_vectors(&graph->os, &graph->from, &graph->oi, no_of_nodes);
  583|  2.06k|    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|  2.06k|    igraph_i_property_cache_invalidate_conditionally(
  599|  2.06k|        graph,
  600|  2.06k|        /* keep_always = */ 0,
  601|       |        /* keep_when_false = */
  602|  2.06k|        (1 << IGRAPH_PROP_HAS_LOOP) |
  603|  2.06k|        (1 << IGRAPH_PROP_HAS_MULTI) |
  604|  2.06k|        (1 << IGRAPH_PROP_HAS_MUTUAL) |
  605|  2.06k|        (1 << IGRAPH_PROP_IS_STRONGLY_CONNECTED) |
  606|  2.06k|        (1 << IGRAPH_PROP_IS_WEAKLY_CONNECTED),
  607|       |        /* keep_when_true = */
  608|  2.06k|        (1 << IGRAPH_PROP_IS_DAG) |
  609|  2.06k|        (1 << IGRAPH_PROP_IS_FOREST)
  610|  2.06k|    );
  611|       |
  612|       |    /* Nothing to deallocate... */
  613|  2.06k|    return IGRAPH_SUCCESS;
  614|  2.06k|}
igraph_delete_vertices_map:
  648|  2.40k|) {
  649|  2.40k|    igraph_int_t no_of_edges = igraph_ecount(graph);
  650|  2.40k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  651|  2.40k|    igraph_vector_int_t edge_recoding, vertex_recoding;
  652|  2.40k|    igraph_vector_int_t *my_vertex_recoding = &vertex_recoding;
  653|  2.40k|    igraph_vit_t vit;
  654|  2.40k|    igraph_t newgraph;
  655|  2.40k|    igraph_int_t i, j;
  656|  2.40k|    igraph_int_t remaining_vertices, remaining_edges;
  657|       |
  658|  2.40k|    if (map) {
  ------------------
  |  Branch (658:9): [True: 0, False: 2.40k]
  ------------------
  659|      0|        my_vertex_recoding = map;
  660|      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]
  |  |  ------------------
  ------------------
  661|      0|        igraph_vector_int_null(map);
  662|  2.40k|    } else {
  663|  2.40k|        IGRAPH_VECTOR_INT_INIT_FINALLY(&vertex_recoding, no_of_nodes);
  ------------------
  |  |  119|  2.40k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.40k|    do { \
  |  |  |  |  657|  2.40k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.40k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.40k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.40k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.40k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.40k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.40k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.40k|    do { \
  |  |  |  |  604|  2.40k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.40k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.40k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.40k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.40k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.40k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.40k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.40k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.40k]
  |  |  ------------------
  ------------------
  664|  2.40k|    }
  665|       |
  666|  2.40k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&edge_recoding, no_of_edges);
  ------------------
  |  |  119|  2.40k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.40k|    do { \
  |  |  |  |  657|  2.40k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.40k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.40k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.40k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.40k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.40k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.40k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.40k|    do { \
  |  |  |  |  604|  2.40k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.40k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.40k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.40k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.40k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.40k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.40k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.40k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.40k]
  |  |  ------------------
  ------------------
  667|       |
  668|  2.40k|    IGRAPH_CHECK(igraph_vit_create(graph, vertices, &vit));
  ------------------
  |  |  656|  2.40k|    do { \
  |  |  657|  2.40k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.40k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.40k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.40k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.40k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.40k]
  |  |  ------------------
  ------------------
  669|  2.40k|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  603|  2.40k|    do { \
  |  |  604|  2.40k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.40k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.40k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.40k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.40k]
  |  |  ------------------
  |  |  608|  2.40k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.40k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.40k]
  |  |  ------------------
  ------------------
  670|       |
  671|       |    /* mark the vertices to delete */
  672|   421k|    for (; !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit) ) {
  ------------------
  |  |  179|   421k|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
                  for (; !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit) ) {
  ------------------
  |  |  167|   419k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  |  Branch (672:12): [True: 419k, False: 2.40k]
  ------------------
  673|   419k|        igraph_int_t vertex = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  214|   419k|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 0, False: 419k]
  |  |  ------------------
  |  |  215|   419k|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|   419k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  674|   419k|        if (vertex < 0 || vertex >= no_of_nodes) {
  ------------------
  |  Branch (674:13): [True: 0, False: 419k]
  |  Branch (674:27): [True: 0, False: 419k]
  ------------------
  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|   419k|        VECTOR(*my_vertex_recoding)[vertex] = 1;
  ------------------
  |  |   60|   419k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  678|   419k|    }
  679|       |    /* create vertex recoding vector */
  680|   439k|    for (remaining_vertices = 0, i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (680:41): [True: 437k, False: 2.40k]
  ------------------
  681|   437k|        if (VECTOR(*my_vertex_recoding)[i] == 0) {
  ------------------
  |  |   60|   437k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (681:13): [True: 18.0k, False: 419k]
  ------------------
  682|  18.0k|            VECTOR(*my_vertex_recoding)[i] = remaining_vertices;
  ------------------
  |  |   60|  18.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  683|  18.0k|            remaining_vertices++;
  684|   419k|        } else {
  685|   419k|            VECTOR(*my_vertex_recoding)[i] = -1;
  ------------------
  |  |   60|   419k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  686|   419k|        }
  687|   437k|    }
  688|       |    /* create edge recoding vector */
  689|  56.8k|    for (remaining_edges = 0, i = 0; i < no_of_edges; i++) {
  ------------------
  |  Branch (689:38): [True: 54.4k, False: 2.40k]
  ------------------
  690|  54.4k|        igraph_int_t from = VECTOR(graph->from)[i];
  ------------------
  |  |   60|  54.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  691|  54.4k|        igraph_int_t to = VECTOR(graph->to)[i];
  ------------------
  |  |   60|  54.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  692|  54.4k|        if (VECTOR(*my_vertex_recoding)[from] >= 0 &&
  ------------------
  |  |   60|  54.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (692:13): [True: 43.3k, False: 11.1k]
  ------------------
  693|  43.3k|            VECTOR(*my_vertex_recoding)[to  ] >= 0) {
  ------------------
  |  |   60|  43.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (693:13): [True: 41.8k, False: 1.45k]
  ------------------
  694|  41.8k|            VECTOR(edge_recoding)[i] = remaining_edges + 1;
  ------------------
  |  |   60|  41.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  695|  41.8k|            remaining_edges++;
  696|  41.8k|        }
  697|  54.4k|    }
  698|       |
  699|       |    /* start creating the graph */
  700|  2.40k|    memset(&newgraph, 0, sizeof(igraph_t));
  701|  2.40k|    newgraph.n = remaining_vertices;
  702|  2.40k|    newgraph.directed = graph->directed;
  703|       |
  704|       |    /* allocate vectors */
  705|  2.40k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newgraph.from, remaining_edges);
  ------------------
  |  |  119|  2.40k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.40k|    do { \
  |  |  |  |  657|  2.40k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.40k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.40k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.40k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.40k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.40k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.40k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.40k|    do { \
  |  |  |  |  604|  2.40k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.40k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.40k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.40k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.40k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.40k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.40k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.40k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.40k]
  |  |  ------------------
  ------------------
  706|  2.40k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newgraph.to, remaining_edges);
  ------------------
  |  |  119|  2.40k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.40k|    do { \
  |  |  |  |  657|  2.40k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.40k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.40k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.40k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.40k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.40k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.40k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.40k|    do { \
  |  |  |  |  604|  2.40k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.40k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.40k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.40k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.40k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.40k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.40k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.40k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.40k]
  |  |  ------------------
  ------------------
  707|  2.40k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newgraph.oi, remaining_edges);
  ------------------
  |  |  119|  2.40k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.40k|    do { \
  |  |  |  |  657|  2.40k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.40k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.40k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.40k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.40k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.40k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.40k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.40k|    do { \
  |  |  |  |  604|  2.40k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.40k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.40k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.40k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.40k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.40k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.40k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.40k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.40k]
  |  |  ------------------
  ------------------
  708|  2.40k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newgraph.ii, remaining_edges);
  ------------------
  |  |  119|  2.40k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.40k|    do { \
  |  |  |  |  657|  2.40k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.40k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.40k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.40k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.40k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.40k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.40k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.40k|    do { \
  |  |  |  |  604|  2.40k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.40k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.40k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.40k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.40k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.40k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.40k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.40k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.40k]
  |  |  ------------------
  ------------------
  709|  2.40k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newgraph.os, remaining_vertices + 1);
  ------------------
  |  |  119|  2.40k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.40k|    do { \
  |  |  |  |  657|  2.40k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.40k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.40k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.40k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.40k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.40k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.40k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.40k|    do { \
  |  |  |  |  604|  2.40k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.40k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.40k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.40k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.40k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.40k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.40k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.40k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.40k]
  |  |  ------------------
  ------------------
  710|  2.40k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&newgraph.is, remaining_vertices + 1);
  ------------------
  |  |  119|  2.40k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.40k|    do { \
  |  |  |  |  657|  2.40k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.40k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.40k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.40k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.40k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.40k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.40k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.40k|    do { \
  |  |  |  |  604|  2.40k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.40k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.40k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.40k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.40k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.40k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.40k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.40k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.40k]
  |  |  ------------------
  ------------------
  711|       |
  712|       |    /* Add the edges */
  713|  55.6k|    for (i = 0, j = 0; j < remaining_edges; i++) {
  ------------------
  |  Branch (713:24): [True: 53.1k, False: 2.40k]
  ------------------
  714|  53.1k|        if (VECTOR(edge_recoding)[i] > 0) {
  ------------------
  |  |   60|  53.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (714:13): [True: 41.8k, False: 11.3k]
  ------------------
  715|  41.8k|            igraph_int_t from = VECTOR(graph->from)[i];
  ------------------
  |  |   60|  41.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  716|  41.8k|            igraph_int_t to = VECTOR(graph->to  )[i];
  ------------------
  |  |   60|  41.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  717|  41.8k|            VECTOR(newgraph.from)[j] = VECTOR(*my_vertex_recoding)[from];
  ------------------
  |  |   60|  41.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(newgraph.from)[j] = VECTOR(*my_vertex_recoding)[from];
  ------------------
  |  |   60|  41.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  718|  41.8k|            VECTOR(newgraph.to  )[j] = VECTOR(*my_vertex_recoding)[to];
  ------------------
  |  |   60|  41.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(newgraph.to  )[j] = VECTOR(*my_vertex_recoding)[to];
  ------------------
  |  |   60|  41.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  719|  41.8k|            j++;
  720|  41.8k|        }
  721|  53.1k|    }
  722|       |
  723|       |    /* update oi & ii */
  724|  2.40k|    IGRAPH_CHECK(igraph_vector_int_pair_order(&newgraph.from, &newgraph.to, &newgraph.oi,
  ------------------
  |  |  656|  2.40k|    do { \
  |  |  657|  2.40k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.40k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.40k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.40k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.40k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.40k]
  |  |  ------------------
  ------------------
  725|  2.40k|                                         remaining_vertices));
  726|  2.40k|    IGRAPH_CHECK(igraph_vector_int_pair_order(&newgraph.to, &newgraph.from, &newgraph.ii,
  ------------------
  |  |  656|  2.40k|    do { \
  |  |  657|  2.40k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.40k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.40k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.40k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.40k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.40k]
  |  |  ------------------
  ------------------
  727|  2.40k|                                         remaining_vertices));
  728|       |
  729|  2.40k|    IGRAPH_CHECK(igraph_i_create_start_vectors(&newgraph.os, &newgraph.from,
  ------------------
  |  |  656|  2.40k|    do { \
  |  |  657|  2.40k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.40k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.40k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.40k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.40k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.40k]
  |  |  ------------------
  ------------------
  730|  2.40k|                                       &newgraph.oi, remaining_vertices));
  731|  2.40k|    IGRAPH_CHECK(igraph_i_create_start_vectors(&newgraph.is, &newgraph.to,
  ------------------
  |  |  656|  2.40k|    do { \
  |  |  657|  2.40k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.40k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.40k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.40k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.40k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.40k]
  |  |  ------------------
  ------------------
  732|  2.40k|                                       &newgraph.ii, remaining_vertices));
  733|       |
  734|  2.40k|    newgraph.cache = IGRAPH_CALLOC(1, igraph_i_property_cache_t);
  ------------------
  |  |   33|  2.40k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  4.81k|    (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.40k, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  735|  2.40k|    IGRAPH_CHECK_OOM(newgraph.cache, "Cannot delete vertices.");
  ------------------
  |  |  709|  2.40k|    do { \
  |  |  710|  2.40k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  2.40k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.40k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  2.40k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 2.40k]
  |  |  ------------------
  ------------------
  736|  2.40k|    IGRAPH_FINALLY(igraph_free, newgraph.cache);
  ------------------
  |  |  603|  2.40k|    do { \
  |  |  604|  2.40k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.40k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.40k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.40k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.40k]
  |  |  ------------------
  |  |  608|  2.40k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.40k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.40k]
  |  |  ------------------
  ------------------
  737|  2.40k|    IGRAPH_CHECK(igraph_i_property_cache_init(newgraph.cache));
  ------------------
  |  |  656|  2.40k|    do { \
  |  |  657|  2.40k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.40k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.40k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.40k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.40k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.40k]
  |  |  ------------------
  ------------------
  738|  2.40k|    IGRAPH_FINALLY(igraph_i_property_cache_destroy, newgraph.cache);
  ------------------
  |  |  603|  2.40k|    do { \
  |  |  604|  2.40k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.40k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.40k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.40k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.40k]
  |  |  ------------------
  |  |  608|  2.40k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.40k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.40k]
  |  |  ------------------
  ------------------
  739|       |
  740|       |    /* attributes */
  741|  2.40k|    IGRAPH_CHECK(igraph_i_attribute_copy(
  ------------------
  |  |  656|  2.40k|    do { \
  |  |  657|  2.40k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.40k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.40k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.40k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.40k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.40k]
  |  |  ------------------
  ------------------
  742|  2.40k|        &newgraph, graph, /* graph= */ true, /* vertex= */ false, /* edge= */ false
  743|  2.40k|    ));
  744|       |
  745|       |    /* at this point igraph_destroy can take over the responsibility of
  746|       |     * deallocating the graph */
  747|  2.40k|    IGRAPH_FINALLY_CLEAN(8);    /* 2 for the property cache, 6 for the vectors */
  748|  2.40k|    IGRAPH_FINALLY(igraph_destroy, &newgraph);
  ------------------
  |  |  603|  2.40k|    do { \
  |  |  604|  2.40k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.40k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.40k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.40k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.40k]
  |  |  ------------------
  |  |  608|  2.40k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.40k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.40k]
  |  |  ------------------
  ------------------
  749|       |
  750|  2.40k|    if (newgraph.attr) {
  ------------------
  |  Branch (750:9): [True: 0, False: 2.40k]
  ------------------
  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.40k|    igraph_vit_destroy(&vit);
  773|  2.40k|    igraph_vector_int_destroy(&edge_recoding);
  774|  2.40k|    igraph_destroy(graph);
  775|  2.40k|    *graph = newgraph;
  776|       |
  777|  2.40k|    IGRAPH_FINALLY_CLEAN(3);
  778|       |
  779|  2.40k|    if (invmap) {
  ------------------
  |  Branch (779:9): [True: 0, False: 2.40k]
  ------------------
  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.40k|    if (!map) {
  ------------------
  |  Branch (789:9): [True: 2.40k, False: 0]
  ------------------
  790|  2.40k|        igraph_vector_int_destroy(my_vertex_recoding);
  791|  2.40k|        IGRAPH_FINALLY_CLEAN(1);
  792|  2.40k|    }
  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.40k|    igraph_i_property_cache_invalidate_conditionally(
  805|  2.40k|        graph,
  806|  2.40k|        /* keep_always = */ 0,
  807|       |        /* keep_when_false = */
  808|  2.40k|        (1 << IGRAPH_PROP_HAS_LOOP) |
  809|  2.40k|        (1 << IGRAPH_PROP_HAS_MULTI) |
  810|  2.40k|        (1 << IGRAPH_PROP_HAS_MUTUAL),
  811|       |        /* keep_when_true = */
  812|  2.40k|        (1 << IGRAPH_PROP_IS_DAG) |
  813|  2.40k|        (1 << IGRAPH_PROP_IS_FOREST)
  814|  2.40k|    );
  815|       |
  816|  2.40k|    return IGRAPH_SUCCESS;
  817|  2.40k|}
igraph_vcount:
  829|  8.07M|igraph_int_t igraph_vcount(const igraph_t *graph) {
  830|  8.07M|    return graph->n;
  831|  8.07M|}
igraph_ecount:
  843|  51.1k|igraph_int_t igraph_ecount(const igraph_t *graph) {
  844|  51.1k|    return igraph_vector_int_size(&graph->from);
  845|  51.1k|}
igraph_neighbors:
  894|  5.86M|) {
  895|       |
  896|  5.86M|#define DEDUPLICATE_IF_NEEDED(vertex, n)                                          \
  897|  5.86M|    if (should_filter_duplicates) {                                               \
  898|  5.86M|        if (vertex == pnode) {                                                    \
  899|       |            /* This is a loop edge */                                             \
  900|  5.86M|            if (loops == IGRAPH_NO_LOOPS) {                                       \
  901|       |                /* Filtering loop edges unconditionally */                        \
  902|  5.86M|                length -= n;                                                      \
  903|  5.86M|                continue;                                                         \
  904|  5.86M|            } else if (loops == IGRAPH_LOOPS_ONCE && vertex == last_added) {      \
  905|       |                /* Filtering every second endpoint of loop edges */               \
  906|  5.86M|                length -= n;                                                      \
  907|  5.86M|                last_added = -1;                                                  \
  908|  5.86M|                seen_loop = true;                                                 \
  909|  5.86M|                continue;                                                         \
  910|  5.86M|            } else if (multiple == IGRAPH_NO_MULTIPLE && seen_loop) {             \
  911|       |                /* Filtering multi-loop edges */                                  \
  912|  5.86M|                length -= n;                                                      \
  913|  5.86M|                continue;                                                         \
  914|  5.86M|            } else {                                                              \
  915|  5.86M|                seen_loop = (loops != IGRAPH_LOOPS_TWICE || last_added == vertex);\
  916|  5.86M|                last_added = vertex;                                              \
  917|  5.86M|            }                                                                     \
  918|  5.86M|        } else {                                                                  \
  919|       |            /* Not a loop edge */                                                 \
  920|  5.86M|            if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {         \
  921|       |                /* Filtering multi-edges */                                       \
  922|  5.86M|                length -= n;                                                      \
  923|  5.86M|                continue;                                                         \
  924|  5.86M|            } else {                                                              \
  925|  5.86M|                last_added = vertex;                                              \
  926|  5.86M|            }                                                                     \
  927|  5.86M|        }                                                                         \
  928|  5.86M|    }
  929|       |
  930|  5.86M|    igraph_int_t length = 0, idx = 0;
  931|  5.86M|    igraph_int_t i, j;
  932|       |
  933|  5.86M|    igraph_int_t node = pnode;
  934|  5.86M|    igraph_int_t last_added = -1;
  935|  5.86M|    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.86M|    igraph_bool_t seen_loop = false;
  943|       |
  944|       |    /* normalize Boolean value to enable == comparisons below and in DEDUPLICATE_IF_NEEDED */
  945|  5.86M|    multiple = !!multiple;
  946|       |
  947|  5.86M|    if (node < 0 || node > igraph_vcount(graph) - 1) {
  ------------------
  |  Branch (947:9): [True: 0, False: 5.86M]
  |  Branch (947:21): [True: 0, False: 5.86M]
  ------------------
  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.86M|    if (mode != IGRAPH_OUT && mode != IGRAPH_IN && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (950:9): [True: 3.85M, False: 2.00M]
  |  Branch (950:31): [True: 3.05M, False: 801k]
  |  Branch (950:52): [True: 0, False: 3.05M]
  ------------------
  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.86M|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (954:9): [True: 802k, False: 5.05M]
  ------------------
  955|   802k|        mode = IGRAPH_ALL;
  956|   802k|    }
  957|       |
  958|  5.86M|    if (mode != IGRAPH_ALL && loops == IGRAPH_LOOPS_TWICE) {
  ------------------
  |  Branch (958:9): [True: 2.80M, False: 3.05M]
  |  Branch (958:31): [True: 2.80M, False: 0]
  ------------------
  959|       |        /*
  960|       |        IGRAPH_ERROR("For a directed graph (with directions not ignored), "
  961|       |                     "IGRAPH_LOOPS_TWICE does not make sense.", IGRAPH_EINVAL);
  962|       |        */
  963|  2.80M|        loops = IGRAPH_LOOPS_ONCE;
  964|  2.80M|    }
  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.86M|    if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (969:9): [True: 5.05M, False: 801k]
  ------------------
  970|  5.05M|        length += (VECTOR(graph->os)[node + 1] - VECTOR(graph->os)[node]);
  ------------------
  |  |   60|  5.05M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      length += (VECTOR(graph->os)[node + 1] - VECTOR(graph->os)[node]);
  ------------------
  |  |   60|  5.05M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  971|  5.05M|    }
  972|  5.86M|    if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (972:9): [True: 3.85M, False: 2.00M]
  ------------------
  973|  3.85M|        length += (VECTOR(graph->is)[node + 1] - VECTOR(graph->is)[node]);
  ------------------
  |  |   60|  3.85M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      length += (VECTOR(graph->is)[node + 1] - VECTOR(graph->is)[node]);
  ------------------
  |  |   60|  3.85M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  974|  3.85M|    }
  975|       |
  976|  5.86M|    IGRAPH_CHECK(igraph_vector_int_resize(neis, length));
  ------------------
  |  |  656|  5.86M|    do { \
  |  |  657|  5.86M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  5.86M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  5.86M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.86M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  5.86M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 5.86M]
  |  |  ------------------
  ------------------
  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.86M|    if (!igraph_is_directed(graph) || mode != IGRAPH_ALL) {
  ------------------
  |  Branch (987:9): [True: 802k, False: 5.05M]
  |  Branch (987:39): [True: 2.80M, False: 2.25M]
  ------------------
  988|       |        /* graph is undirected or we did not ask for both directions in a
  989|       |         * directed graph; this is the easy case */
  990|       |
  991|  3.60M|        should_filter_duplicates = !(multiple == IGRAPH_MULTIPLE &&
  ------------------
  |  Branch (991:38): [True: 3.60M, False: 0]
  ------------------
  992|  3.60M|                ((!igraph_is_directed(graph) && loops == IGRAPH_LOOPS_TWICE) ||
  ------------------
  |  Branch (992:19): [True: 802k, False: 2.80M]
  |  Branch (992:49): [True: 802k, False: 0]
  ------------------
  993|  2.80M|                 (igraph_is_directed(graph) && loops != IGRAPH_NO_LOOPS)));
  ------------------
  |  Branch (993:19): [True: 2.80M, False: 0]
  |  Branch (993:48): [True: 2.80M, False: 0]
  ------------------
  994|       |
  995|  3.60M|        if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (995:13): [True: 2.80M, False: 801k]
  ------------------
  996|  2.80M|            j = VECTOR(graph->os)[node + 1];
  ------------------
  |  |   60|  2.80M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  997|  3.25M|            for (i = VECTOR(graph->os)[node]; i < j; i++) {
  ------------------
  |  |   60|  2.80M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (997:47): [True: 444k, False: 2.80M]
  ------------------
  998|   444k|                igraph_int_t to = VECTOR(graph->to)[ VECTOR(graph->oi)[i] ];
  ------------------
  |  |   60|   444k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              igraph_int_t to = VECTOR(graph->to)[ VECTOR(graph->oi)[i] ];
  ------------------
  |  |   60|   444k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  999|   444k|                DEDUPLICATE_IF_NEEDED(to, 1);
  ------------------
  |  |  897|   444k|    if (should_filter_duplicates) {                                               \
  |  |  ------------------
  |  |  |  Branch (897:9): [True: 0, False: 444k]
  |  |  ------------------
  |  |  898|      0|        if (vertex == pnode) {                                                    \
  |  |  ------------------
  |  |  |  Branch (898:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  899|      0|            /* This is a loop edge */                                             \
  |  |  900|      0|            if (loops == IGRAPH_NO_LOOPS) {                                       \
  |  |  ------------------
  |  |  |  Branch (900:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  901|      0|                /* Filtering loop edges unconditionally */                        \
  |  |  902|      0|                length -= n;                                                      \
  |  |  903|      0|                continue;                                                         \
  |  |  904|      0|            } else if (loops == IGRAPH_LOOPS_ONCE && vertex == last_added) {      \
  |  |  ------------------
  |  |  |  Branch (904:24): [True: 0, False: 0]
  |  |  |  Branch (904:54): [True: 0, False: 0]
  |  |  ------------------
  |  |  905|      0|                /* Filtering every second endpoint of loop edges */               \
  |  |  906|      0|                length -= n;                                                      \
  |  |  907|      0|                last_added = -1;                                                  \
  |  |  908|      0|                seen_loop = true;                                                 \
  |  |  909|      0|                continue;                                                         \
  |  |  910|      0|            } else if (multiple == IGRAPH_NO_MULTIPLE && seen_loop) {             \
  |  |  ------------------
  |  |  |  Branch (910:24): [True: 0, False: 0]
  |  |  |  Branch (910:58): [True: 0, False: 0]
  |  |  ------------------
  |  |  911|      0|                /* Filtering multi-loop edges */                                  \
  |  |  912|      0|                length -= n;                                                      \
  |  |  913|      0|                continue;                                                         \
  |  |  914|      0|            } else {                                                              \
  |  |  915|      0|                seen_loop = (loops != IGRAPH_LOOPS_TWICE || last_added == vertex);\
  |  |  ------------------
  |  |  |  Branch (915:30): [True: 0, False: 0]
  |  |  |  Branch (915:61): [True: 0, False: 0]
  |  |  ------------------
  |  |  916|      0|                last_added = vertex;                                              \
  |  |  917|      0|            }                                                                     \
  |  |  918|      0|        } else {                                                                  \
  |  |  919|      0|            /* Not a loop edge */                                                 \
  |  |  920|      0|            if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {         \
  |  |  ------------------
  |  |  |  Branch (920:17): [True: 0, False: 0]
  |  |  |  Branch (920:51): [True: 0, False: 0]
  |  |  ------------------
  |  |  921|      0|                /* Filtering multi-edges */                                       \
  |  |  922|      0|                length -= n;                                                      \
  |  |  923|      0|                continue;                                                         \
  |  |  924|      0|            } else {                                                              \
  |  |  925|      0|                last_added = vertex;                                              \
  |  |  926|      0|            }                                                                     \
  |  |  927|      0|        }                                                                         \
  |  |  928|      0|    }
  ------------------
 1000|   444k|                VECTOR(*neis)[idx++] = to;
  ------------------
  |  |   60|   444k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1001|   444k|            }
 1002|  2.80M|        }
 1003|       |
 1004|  3.60M|        if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (1004:13): [True: 1.60M, False: 2.00M]
  ------------------
 1005|  1.60M|            j = VECTOR(graph->is)[node + 1];
  ------------------
  |  |   60|  1.60M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1006|  1.83M|            for (i = VECTOR(graph->is)[node]; i < j; i++) {
  ------------------
  |  |   60|  1.60M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1006:47): [True: 232k, False: 1.60M]
  ------------------
 1007|   232k|                igraph_int_t from = VECTOR(graph->from)[ VECTOR(graph->ii)[i] ];
  ------------------
  |  |   60|   232k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              igraph_int_t from = VECTOR(graph->from)[ VECTOR(graph->ii)[i] ];
  ------------------
  |  |   60|   232k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1008|   232k|                DEDUPLICATE_IF_NEEDED(from, 1);
  ------------------
  |  |  897|   232k|    if (should_filter_duplicates) {                                               \
  |  |  ------------------
  |  |  |  Branch (897:9): [True: 0, False: 232k]
  |  |  ------------------
  |  |  898|      0|        if (vertex == pnode) {                                                    \
  |  |  ------------------
  |  |  |  Branch (898:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  899|      0|            /* This is a loop edge */                                             \
  |  |  900|      0|            if (loops == IGRAPH_NO_LOOPS) {                                       \
  |  |  ------------------
  |  |  |  Branch (900:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  901|      0|                /* Filtering loop edges unconditionally */                        \
  |  |  902|      0|                length -= n;                                                      \
  |  |  903|      0|                continue;                                                         \
  |  |  904|      0|            } else if (loops == IGRAPH_LOOPS_ONCE && vertex == last_added) {      \
  |  |  ------------------
  |  |  |  Branch (904:24): [True: 0, False: 0]
  |  |  |  Branch (904:54): [True: 0, False: 0]
  |  |  ------------------
  |  |  905|      0|                /* Filtering every second endpoint of loop edges */               \
  |  |  906|      0|                length -= n;                                                      \
  |  |  907|      0|                last_added = -1;                                                  \
  |  |  908|      0|                seen_loop = true;                                                 \
  |  |  909|      0|                continue;                                                         \
  |  |  910|      0|            } else if (multiple == IGRAPH_NO_MULTIPLE && seen_loop) {             \
  |  |  ------------------
  |  |  |  Branch (910:24): [True: 0, False: 0]
  |  |  |  Branch (910:58): [True: 0, False: 0]
  |  |  ------------------
  |  |  911|      0|                /* Filtering multi-loop edges */                                  \
  |  |  912|      0|                length -= n;                                                      \
  |  |  913|      0|                continue;                                                         \
  |  |  914|      0|            } else {                                                              \
  |  |  915|      0|                seen_loop = (loops != IGRAPH_LOOPS_TWICE || last_added == vertex);\
  |  |  ------------------
  |  |  |  Branch (915:30): [True: 0, False: 0]
  |  |  |  Branch (915:61): [True: 0, False: 0]
  |  |  ------------------
  |  |  916|      0|                last_added = vertex;                                              \
  |  |  917|      0|            }                                                                     \
  |  |  918|      0|        } else {                                                                  \
  |  |  919|      0|            /* Not a loop edge */                                                 \
  |  |  920|      0|            if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {         \
  |  |  ------------------
  |  |  |  Branch (920:17): [True: 0, False: 0]
  |  |  |  Branch (920:51): [True: 0, False: 0]
  |  |  ------------------
  |  |  921|      0|                /* Filtering multi-edges */                                       \
  |  |  922|      0|                length -= n;                                                      \
  |  |  923|      0|                continue;                                                         \
  |  |  924|      0|            } else {                                                              \
  |  |  925|      0|                last_added = vertex;                                              \
  |  |  926|      0|            }                                                                     \
  |  |  927|      0|        }                                                                         \
  |  |  928|      0|    }
  ------------------
 1009|   232k|                VECTOR(*neis)[idx++] = from;
  ------------------
  |  |   60|   232k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1010|   232k|            }
 1011|  1.60M|        }
 1012|  3.60M|    } 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|  2.25M|        igraph_int_t j1 = VECTOR(graph->os)[node + 1];
  ------------------
  |  |   60|  2.25M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1017|  2.25M|        igraph_int_t j2 = VECTOR(graph->is)[node + 1];
  ------------------
  |  |   60|  2.25M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1018|  2.25M|        igraph_int_t i1 = VECTOR(graph->os)[node];
  ------------------
  |  |   60|  2.25M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1019|  2.25M|        igraph_int_t i2 = VECTOR(graph->is)[node];
  ------------------
  |  |   60|  2.25M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1020|  2.25M|        igraph_int_t eid1, eid2;
 1021|  2.25M|        igraph_int_t n1, n2;
 1022|       |
 1023|  2.25M|        should_filter_duplicates = !(multiple == IGRAPH_MULTIPLE &&
  ------------------
  |  Branch (1023:38): [True: 2.00M, False: 246k]
  ------------------
 1024|  2.00M|                loops == IGRAPH_LOOPS_TWICE);
  ------------------
  |  Branch (1024:17): [True: 1.60M, False: 401k]
  ------------------
 1025|       |
 1026|  2.63M|        while (i1 < j1 && i2 < j2) {
  ------------------
  |  Branch (1026:16): [True: 505k, False: 2.13M]
  |  Branch (1026:27): [True: 386k, False: 119k]
  ------------------
 1027|   386k|            eid1 = VECTOR(graph->oi)[i1];
  ------------------
  |  |   60|   386k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1028|   386k|            eid2 = VECTOR(graph->ii)[i2];
  ------------------
  |  |   60|   386k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1029|   386k|            n1 = VECTOR(graph->to)[eid1];
  ------------------
  |  |   60|   386k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1030|   386k|            n2 = VECTOR(graph->from)[eid2];
  ------------------
  |  |   60|   386k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1031|   386k|            if (n1 < n2) {
  ------------------
  |  Branch (1031:17): [True: 143k, False: 242k]
  ------------------
 1032|   143k|                i1++;
 1033|   143k|                DEDUPLICATE_IF_NEEDED(n1, 1);
  ------------------
  |  |  897|   143k|    if (should_filter_duplicates) {                                               \
  |  |  ------------------
  |  |  |  Branch (897:9): [True: 51.0k, False: 92.6k]
  |  |  ------------------
  |  |  898|  51.0k|        if (vertex == pnode) {                                                    \
  |  |  ------------------
  |  |  |  Branch (898:13): [True: 0, False: 51.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|  51.0k|        } else {                                                                  \
  |  |  919|  51.0k|            /* Not a loop edge */                                                 \
  |  |  920|  51.0k|            if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {         \
  |  |  ------------------
  |  |  |  Branch (920:17): [True: 27.9k, False: 23.1k]
  |  |  |  Branch (920:51): [True: 5.62k, False: 22.3k]
  |  |  ------------------
  |  |  921|  5.62k|                /* Filtering multi-edges */                                       \
  |  |  922|  5.62k|                length -= n;                                                      \
  |  |  923|  5.62k|                continue;                                                         \
  |  |  924|  45.4k|            } else {                                                              \
  |  |  925|  45.4k|                last_added = vertex;                                              \
  |  |  926|  45.4k|            }                                                                     \
  |  |  927|  51.0k|        }                                                                         \
  |  |  928|  51.0k|    }
  ------------------
 1034|   138k|                VECTOR(*neis)[idx++] = n1;
  ------------------
  |  |   60|   138k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1035|   242k|            } else if (n1 > n2) {
  ------------------
  |  Branch (1035:24): [True: 140k, False: 101k]
  ------------------
 1036|   140k|                i2++;
 1037|   140k|                DEDUPLICATE_IF_NEEDED(n2, 1);
  ------------------
  |  |  897|   140k|    if (should_filter_duplicates) {                                               \
  |  |  ------------------
  |  |  |  Branch (897:9): [True: 50.6k, False: 90.2k]
  |  |  ------------------
  |  |  898|  50.6k|        if (vertex == pnode) {                                                    \
  |  |  ------------------
  |  |  |  Branch (898:13): [True: 0, False: 50.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|  50.6k|        } else {                                                                  \
  |  |  919|  50.6k|            /* Not a loop edge */                                                 \
  |  |  920|  50.6k|            if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {         \
  |  |  ------------------
  |  |  |  Branch (920:17): [True: 28.0k, False: 22.5k]
  |  |  |  Branch (920:51): [True: 4.79k, False: 23.2k]
  |  |  ------------------
  |  |  921|  4.79k|                /* Filtering multi-edges */                                       \
  |  |  922|  4.79k|                length -= n;                                                      \
  |  |  923|  4.79k|                continue;                                                         \
  |  |  924|  45.8k|            } else {                                                              \
  |  |  925|  45.8k|                last_added = vertex;                                              \
  |  |  926|  45.8k|            }                                                                     \
  |  |  927|  50.6k|        }                                                                         \
  |  |  928|  50.6k|    }
  ------------------
 1038|   136k|                VECTOR(*neis)[idx++] = n2;
  ------------------
  |  |   60|   136k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1039|   136k|            } else {
 1040|   101k|                i1++;
 1041|   101k|                i2++;
 1042|   101k|                DEDUPLICATE_IF_NEEDED(n1, 2);
  ------------------
  |  |  897|   101k|    if (should_filter_duplicates) {                                               \
  |  |  ------------------
  |  |  |  Branch (897:9): [True: 38.4k, False: 63.3k]
  |  |  ------------------
  |  |  898|  38.4k|        if (vertex == pnode) {                                                    \
  |  |  ------------------
  |  |  |  Branch (898:13): [True: 28.6k, False: 9.78k]
  |  |  ------------------
  |  |  899|  28.6k|            /* This is a loop edge */                                             \
  |  |  900|  28.6k|            if (loops == IGRAPH_NO_LOOPS) {                                       \
  |  |  ------------------
  |  |  |  Branch (900:17): [True: 28.6k, False: 0]
  |  |  ------------------
  |  |  901|  28.6k|                /* Filtering loop edges unconditionally */                        \
  |  |  902|  28.6k|                length -= n;                                                      \
  |  |  903|  28.6k|                continue;                                                         \
  |  |  904|  28.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|  28.6k|        } else {                                                                  \
  |  |  919|  9.78k|            /* Not a loop edge */                                                 \
  |  |  920|  9.78k|            if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {         \
  |  |  ------------------
  |  |  |  Branch (920:17): [True: 5.85k, False: 3.93k]
  |  |  |  Branch (920:51): [True: 2.19k, False: 3.65k]
  |  |  ------------------
  |  |  921|  2.19k|                /* Filtering multi-edges */                                       \
  |  |  922|  2.19k|                length -= n;                                                      \
  |  |  923|  2.19k|                continue;                                                         \
  |  |  924|  7.58k|            } else {                                                              \
  |  |  925|  7.58k|                last_added = vertex;                                              \
  |  |  926|  7.58k|            }                                                                     \
  |  |  927|  9.78k|        }                                                                         \
  |  |  928|  38.4k|    }
  ------------------
 1043|  70.8k|                VECTOR(*neis)[idx++] = n1;
  ------------------
  |  |   60|  70.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1044|  70.8k|                DEDUPLICATE_IF_NEEDED(n2, 1);
  ------------------
  |  |  897|  70.8k|    if (should_filter_duplicates) {                                               \
  |  |  ------------------
  |  |  |  Branch (897:9): [True: 7.58k, False: 63.3k]
  |  |  ------------------
  |  |  898|  7.58k|        if (vertex == pnode) {                                                    \
  |  |  ------------------
  |  |  |  Branch (898:13): [True: 0, False: 7.58k]
  |  |  ------------------
  |  |  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|  7.58k|        } else {                                                                  \
  |  |  919|  7.58k|            /* Not a loop edge */                                                 \
  |  |  920|  7.58k|            if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {         \
  |  |  ------------------
  |  |  |  Branch (920:17): [True: 3.65k, False: 3.93k]
  |  |  |  Branch (920:51): [True: 3.65k, False: 0]
  |  |  ------------------
  |  |  921|  3.65k|                /* Filtering multi-edges */                                       \
  |  |  922|  3.65k|                length -= n;                                                      \
  |  |  923|  3.65k|                continue;                                                         \
  |  |  924|  3.93k|            } else {                                                              \
  |  |  925|  3.93k|                last_added = vertex;                                              \
  |  |  926|  3.93k|            }                                                                     \
  |  |  927|  7.58k|        }                                                                         \
  |  |  928|  7.58k|    }
  ------------------
 1045|  67.2k|                VECTOR(*neis)[idx++] = n2;
  ------------------
  |  |   60|  67.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1046|  67.2k|            }
 1047|   386k|        }
 1048|       |
 1049|  2.45M|        while (i1 < j1) {
  ------------------
  |  Branch (1049:16): [True: 198k, False: 2.25M]
  ------------------
 1050|   198k|            eid1 = VECTOR(graph->oi)[i1++];
  ------------------
  |  |   60|   198k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1051|   198k|            igraph_int_t to = VECTOR(graph->to)[eid1];
  ------------------
  |  |   60|   198k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1052|   198k|            DEDUPLICATE_IF_NEEDED(to, 1);
  ------------------
  |  |  897|   198k|    if (should_filter_duplicates) {                                               \
  |  |  ------------------
  |  |  |  Branch (897:9): [True: 71.8k, False: 126k]
  |  |  ------------------
  |  |  898|  71.8k|        if (vertex == pnode) {                                                    \
  |  |  ------------------
  |  |  |  Branch (898:13): [True: 0, False: 71.8k]
  |  |  ------------------
  |  |  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|  71.8k|        } else {                                                                  \
  |  |  919|  71.8k|            /* Not a loop edge */                                                 \
  |  |  920|  71.8k|            if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {         \
  |  |  ------------------
  |  |  |  Branch (920:17): [True: 40.0k, False: 31.7k]
  |  |  |  Branch (920:51): [True: 8.65k, False: 31.4k]
  |  |  ------------------
  |  |  921|  8.65k|                /* Filtering multi-edges */                                       \
  |  |  922|  8.65k|                length -= n;                                                      \
  |  |  923|  8.65k|                continue;                                                         \
  |  |  924|  63.1k|            } else {                                                              \
  |  |  925|  63.1k|                last_added = vertex;                                              \
  |  |  926|  63.1k|            }                                                                     \
  |  |  927|  71.8k|        }                                                                         \
  |  |  928|  71.8k|    }
  ------------------
 1053|   190k|            VECTOR(*neis)[idx++] = to;
  ------------------
  |  |   60|   190k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1054|   190k|        }
 1055|       |
 1056|  2.45M|        while (i2 < j2) {
  ------------------
  |  Branch (1056:16): [True: 201k, False: 2.25M]
  ------------------
 1057|   201k|            eid2 = VECTOR(graph->ii)[i2++];
  ------------------
  |  |   60|   201k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1058|   201k|            igraph_int_t from = VECTOR(graph->from)[eid2];
  ------------------
  |  |   60|   201k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1059|   201k|            DEDUPLICATE_IF_NEEDED(from, 1);
  ------------------
  |  |  897|   201k|    if (should_filter_duplicates) {                                               \
  |  |  ------------------
  |  |  |  Branch (897:9): [True: 72.4k, False: 129k]
  |  |  ------------------
  |  |  898|  72.4k|        if (vertex == pnode) {                                                    \
  |  |  ------------------
  |  |  |  Branch (898:13): [True: 0, False: 72.4k]
  |  |  ------------------
  |  |  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|  72.4k|        } else {                                                                  \
  |  |  919|  72.4k|            /* Not a loop edge */                                                 \
  |  |  920|  72.4k|            if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {         \
  |  |  ------------------
  |  |  |  Branch (920:17): [True: 40.0k, False: 32.3k]
  |  |  |  Branch (920:51): [True: 9.27k, False: 30.8k]
  |  |  ------------------
  |  |  921|  9.27k|                /* Filtering multi-edges */                                       \
  |  |  922|  9.27k|                length -= n;                                                      \
  |  |  923|  9.27k|                continue;                                                         \
  |  |  924|  63.1k|            } else {                                                              \
  |  |  925|  63.1k|                last_added = vertex;                                              \
  |  |  926|  63.1k|            }                                                                     \
  |  |  927|  72.4k|        }                                                                         \
  |  |  928|  72.4k|    }
  ------------------
 1060|   192k|            VECTOR(*neis)[idx++] = from;
  ------------------
  |  |   60|   192k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1061|   192k|        }
 1062|       |
 1063|  2.25M|    }
 1064|  5.86M|    IGRAPH_CHECK(igraph_vector_int_resize(neis, length));
  ------------------
  |  |  656|  5.86M|    do { \
  |  |  657|  5.86M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  5.86M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  5.86M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.86M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  5.86M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 5.86M]
  |  |  ------------------
  ------------------
 1065|       |
 1066|  5.86M|    return IGRAPH_SUCCESS;
 1067|  5.86M|#undef DEDUPLICATE_IF_NEEDED
 1068|  5.86M|}
igraph_is_directed:
 1133|  19.9M|igraph_bool_t igraph_is_directed(const igraph_t *graph) {
 1134|  19.9M|    return graph->directed;
 1135|  19.9M|}
igraph_degree:
 1268|  34.9k|) {
 1269|       |
 1270|  34.9k|    igraph_int_t nodes_to_calc;
 1271|  34.9k|    igraph_int_t i, j;
 1272|  34.9k|    igraph_vit_t vit;
 1273|       |
 1274|  34.9k|    IGRAPH_CHECK(igraph_vit_create(graph, vids, &vit));
  ------------------
  |  |  656|  34.9k|    do { \
  |  |  657|  34.9k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  34.9k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  34.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 34.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|  34.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 34.9k]
  |  |  ------------------
  ------------------
 1275|  34.9k|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  603|  34.9k|    do { \
  |  |  604|  34.9k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  34.9k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  34.9k|         * incorrect destructor function with the pointer */ \
  |  |  607|  34.9k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 34.9k]
  |  |  ------------------
  |  |  608|  34.9k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  34.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 34.9k]
  |  |  ------------------
  ------------------
 1276|       |
 1277|  34.9k|    if (mode != IGRAPH_OUT && mode != IGRAPH_IN && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (1277:9): [True: 24.6k, False: 10.2k]
  |  Branch (1277:31): [True: 20.6k, False: 4.06k]
  |  Branch (1277:52): [True: 0, False: 20.6k]
  ------------------
 1278|      0|        IGRAPH_ERROR("Invalid mode for degree calculation.", IGRAPH_EINVMODE);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1279|      0|    }
 1280|       |
 1281|  34.9k|    if (loops == IGRAPH_NO_LOOPS || loops == IGRAPH_LOOPS_ONCE) {
  ------------------
  |  Branch (1281:9): [True: 0, False: 34.9k]
  |  Branch (1281:37): [True: 0, False: 34.9k]
  ------------------
 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|      0|        if (igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_LOOP) &&
  ------------------
  |  Branch (1285:13): [True: 0, False: 0]
  ------------------
 1286|      0|            !igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_HAS_LOOP)) {
  ------------------
  |  Branch (1286:13): [True: 0, False: 0]
  ------------------
 1287|      0|            loops = IGRAPH_LOOPS_TWICE;
 1288|      0|        }
 1289|      0|    }
 1290|       |
 1291|  34.9k|    if (loops == IGRAPH_LOOPS_ONCE && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (1291:9): [True: 0, False: 34.9k]
  |  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|  34.9k|    nodes_to_calc = IGRAPH_VIT_SIZE(vit);
  ------------------
  |  |  190|  34.9k|#define IGRAPH_VIT_SIZE(vit)  ((vit).end - (vit).start)
  ------------------
 1297|  34.9k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (1297:9): [True: 4.12k, False: 30.7k]
  ------------------
 1298|  4.12k|        mode = IGRAPH_ALL;
 1299|  4.12k|    }
 1300|       |
 1301|  34.9k|    IGRAPH_CHECK(igraph_vector_int_resize(res, nodes_to_calc));
  ------------------
  |  |  656|  34.9k|    do { \
  |  |  657|  34.9k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  34.9k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  34.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 34.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|  34.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 34.9k]
  |  |  ------------------
  ------------------
 1302|  34.9k|    igraph_vector_int_null(res);
 1303|       |
 1304|  34.9k|    if (loops == IGRAPH_LOOPS_TWICE) {
  ------------------
  |  Branch (1304:9): [True: 34.9k, False: 0]
  ------------------
 1305|  34.9k|        if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (1305:13): [True: 30.8k, False: 4.06k]
  ------------------
 1306|  30.8k|            for (IGRAPH_VIT_RESET(vit), i = 0;
  ------------------
  |  |  201|  30.8k|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
 1307|  6.04M|                 !IGRAPH_VIT_END(vit);
  ------------------
  |  |  179|  6.04M|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (1307:18): [True: 6.01M, False: 30.8k]
  ------------------
 1308|  6.01M|                 IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  167|  6.01M|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
 1309|  6.01M|                igraph_int_t vid = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  214|  6.01M|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 6.01M, False: 0]
  |  |  ------------------
  |  |  215|  6.01M|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1310|  6.01M|                VECTOR(*res)[i] += (VECTOR(graph->os)[vid + 1] - VECTOR(graph->os)[vid]);
  ------------------
  |  |   60|  6.01M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[i] += (VECTOR(graph->os)[vid + 1] - VECTOR(graph->os)[vid]);
  ------------------
  |  |   60|  6.01M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[i] += (VECTOR(graph->os)[vid + 1] - VECTOR(graph->os)[vid]);
  ------------------
  |  |   60|  6.01M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1311|  6.01M|            }
 1312|  30.8k|        }
 1313|  34.9k|        if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (1313:13): [True: 24.6k, False: 10.2k]
  ------------------
 1314|  24.6k|            for (IGRAPH_VIT_RESET(vit), i = 0;
  ------------------
  |  |  201|  24.6k|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
 1315|  4.83M|                 !IGRAPH_VIT_END(vit);
  ------------------
  |  |  179|  4.83M|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (1315:18): [True: 4.81M, False: 24.6k]
  ------------------
 1316|  4.81M|                 IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  167|  4.81M|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
 1317|  4.81M|                igraph_int_t vid = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  214|  4.81M|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 4.81M, False: 0]
  |  |  ------------------
  |  |  215|  4.81M|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1318|  4.81M|                VECTOR(*res)[i] += (VECTOR(graph->is)[vid + 1] - VECTOR(graph->is)[vid]);
  ------------------
  |  |   60|  4.81M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[i] += (VECTOR(graph->is)[vid + 1] - VECTOR(graph->is)[vid]);
  ------------------
  |  |   60|  4.81M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[i] += (VECTOR(graph->is)[vid + 1] - VECTOR(graph->is)[vid]);
  ------------------
  |  |   60|  4.81M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1319|  4.81M|            }
 1320|  24.6k|        }
 1321|  34.9k|    } else if (loops == IGRAPH_LOOPS_ONCE) {
  ------------------
  |  Branch (1321:16): [True: 0, False: 0]
  ------------------
 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|      0|    } else {
 1368|       |        /* no loops should be counted */
 1369|      0|        if (igraph_vs_is_all(&vids)) {
  ------------------
  |  Branch (1369:13): [True: 0, False: 0]
  ------------------
 1370|       |            // When calculating degree for all vertices, iterating over edges is faster
 1371|      0|            igraph_int_t no_of_edges = igraph_ecount(graph);
 1372|       |
 1373|      0|            if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (1373:17): [True: 0, False: 0]
  ------------------
 1374|      0|                for (igraph_int_t edge = 0; edge < no_of_edges; ++edge) {
  ------------------
  |  Branch (1374:45): [True: 0, False: 0]
  ------------------
 1375|      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)
  |  |  ------------------
  ------------------
 1376|      0|                    if (from != 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)
  |  |  ------------------
  ------------------
  |  Branch (1376:25): [True: 0, False: 0]
  ------------------
 1377|      0|                        VECTOR(*res)[from]++;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1378|      0|                    }
 1379|      0|                }
 1380|      0|            }
 1381|      0|            if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (1381:17): [True: 0, False: 0]
  ------------------
 1382|      0|                for (igraph_int_t edge = 0; edge < no_of_edges; ++edge) {
  ------------------
  |  Branch (1382:45): [True: 0, False: 0]
  ------------------
 1383|      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)
  |  |  ------------------
  ------------------
 1384|      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 (1384:25): [True: 0, False: 0]
  ------------------
 1385|      0|                        VECTOR(*res)[to]++;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1386|      0|                    }
 1387|      0|                }
 1388|      0|            }
 1389|      0|        } 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|      0|    }
 1420|       |
 1421|  34.9k|    igraph_vit_destroy(&vit);
 1422|  34.9k|    IGRAPH_FINALLY_CLEAN(1);
 1423|       |
 1424|  34.9k|    return IGRAPH_SUCCESS;
 1425|  34.9k|}
igraph_incident:
 1778|  1.63M|) {
 1779|  1.63M|    igraph_int_t length = 0, idx = 0;
 1780|  1.63M|    igraph_int_t i, j;
 1781|  1.63M|    igraph_int_t node = pnode;
 1782|  1.63M|    igraph_bool_t directed = igraph_is_directed(graph);
 1783|       |
 1784|  1.63M|    if (node < 0 || node > igraph_vcount(graph) - 1) {
  ------------------
  |  Branch (1784:9): [True: 0, False: 1.63M]
  |  Branch (1784:21): [True: 0, False: 1.63M]
  ------------------
 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|  1.63M|    if (mode != IGRAPH_OUT && mode != IGRAPH_IN &&
  ------------------
  |  Branch (1787:9): [True: 1.22M, False: 410k]
  |  Branch (1787:31): [True: 828k, False: 401k]
  ------------------
 1788|   828k|        mode != IGRAPH_ALL) {
  ------------------
  |  Branch (1788:9): [True: 0, False: 828k]
  ------------------
 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|  1.63M|    if (!directed) {
  ------------------
  |  Branch (1792:9): [True: 12.8k, False: 1.62M]
  ------------------
 1793|  12.8k|        mode = IGRAPH_ALL;
 1794|  12.8k|    }
 1795|       |
 1796|  1.63M|    if (mode != IGRAPH_ALL && loops == IGRAPH_LOOPS_TWICE) {
  ------------------
  |  Branch (1796:9): [True: 811k, False: 828k]
  |  Branch (1796:31): [True: 811k, False: 0]
  ------------------
 1797|       |        /*
 1798|       |        IGRAPH_ERROR("For a directed graph (with directions not ignored), "
 1799|       |                     "IGRAPH_LOOPS_TWICE does not make sense.", IGRAPH_EINVAL);
 1800|       |        */
 1801|   811k|        loops = IGRAPH_LOOPS_ONCE;
 1802|   811k|    }
 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|  1.63M|    if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (1807:9): [True: 1.23M, False: 401k]
  ------------------
 1808|  1.23M|        length += (VECTOR(graph->os)[node + 1] - VECTOR(graph->os)[node]);
  ------------------
  |  |   60|  1.23M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      length += (VECTOR(graph->os)[node + 1] - VECTOR(graph->os)[node]);
  ------------------
  |  |   60|  1.23M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1809|  1.23M|    }
 1810|  1.63M|    if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (1810:9): [True: 1.22M, False: 410k]
  ------------------
 1811|  1.22M|        length += (VECTOR(graph->is)[node + 1] - VECTOR(graph->is)[node]);
  ------------------
  |  |   60|  1.22M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      length += (VECTOR(graph->is)[node + 1] - VECTOR(graph->is)[node]);
  ------------------
  |  |   60|  1.22M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1812|  1.22M|    }
 1813|       |
 1814|  1.63M|    IGRAPH_CHECK(igraph_vector_int_resize(eids, length));
  ------------------
  |  |  656|  1.63M|    do { \
  |  |  657|  1.63M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.63M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.63M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.63M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, 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.63M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.63M]
  |  |  ------------------
  ------------------
 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|  1.63M|    if (!directed || mode != IGRAPH_ALL) {
  ------------------
  |  Branch (1823:9): [True: 12.8k, False: 1.62M]
  |  Branch (1823:22): [True: 811k, False: 815k]
  ------------------
 1824|       |        /* We did not ask for both directions; this is the easy case */
 1825|       |
 1826|   824k|        if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (1826:13): [True: 423k, False: 401k]
  ------------------
 1827|   423k|            j = VECTOR(graph->os)[node + 1];
  ------------------
  |  |   60|   423k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1828|   531k|            for (i = VECTOR(graph->os)[node]; i < j; i++) {
  ------------------
  |  |   60|   423k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1828:47): [True: 107k, False: 423k]
  ------------------
 1829|   107k|                igraph_int_t edge = VECTOR(graph->oi)[i];
  ------------------
  |  |   60|   107k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1830|   107k|                igraph_int_t other = VECTOR(graph->to)[edge];
  ------------------
  |  |   60|   107k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1831|   107k|                if (loops == IGRAPH_NO_LOOPS && other == pnode) {
  ------------------
  |  Branch (1831:21): [True: 0, False: 107k]
  |  Branch (1831:49): [True: 0, False: 0]
  ------------------
 1832|      0|                    length--;
 1833|   107k|                } else {
 1834|   107k|                    VECTOR(*eids)[idx++] = edge;
  ------------------
  |  |   60|   107k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1835|   107k|                }
 1836|   107k|            }
 1837|   423k|        }
 1838|       |
 1839|   824k|        if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (1839:13): [True: 413k, False: 410k]
  ------------------
 1840|   413k|            j = VECTOR(graph->is)[node + 1];
  ------------------
  |  |   60|   413k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1841|   506k|            for (i = VECTOR(graph->is)[node]; i < j; i++) {
  ------------------
  |  |   60|   413k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1841:47): [True: 92.2k, False: 413k]
  ------------------
 1842|  92.2k|                igraph_int_t edge = VECTOR(graph->ii)[i];
  ------------------
  |  |   60|  92.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1843|  92.2k|                igraph_int_t other = VECTOR(graph->from)[edge];
  ------------------
  |  |   60|  92.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1844|  92.2k|                if ((loops == IGRAPH_NO_LOOPS || (loops == IGRAPH_LOOPS_ONCE && !directed)) && other == pnode) {
  ------------------
  |  Branch (1844:22): [True: 0, False: 92.2k]
  |  Branch (1844:51): [True: 70.7k, False: 21.5k]
  |  Branch (1844:81): [True: 0, False: 70.7k]
  |  Branch (1844:96): [True: 0, False: 0]
  ------------------
 1845|      0|                    length--;
 1846|  92.2k|                } else {
 1847|  92.2k|                    VECTOR(*eids)[idx++] = edge;
  ------------------
  |  |   60|  92.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1848|  92.2k|                }
 1849|  92.2k|            }
 1850|   413k|        }
 1851|   824k|    } else {
 1852|       |        /* both in- and out- neighbors in a directed graph,
 1853|       |           we need to merge the two 'vectors' */
 1854|   815k|        igraph_int_t j1 = VECTOR(graph->os)[node + 1];
  ------------------
  |  |   60|   815k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1855|   815k|        igraph_int_t j2 = VECTOR(graph->is)[node + 1];
  ------------------
  |  |   60|   815k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1856|   815k|        igraph_int_t i1 = VECTOR(graph->os)[node];
  ------------------
  |  |   60|   815k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1857|   815k|        igraph_int_t i2 = VECTOR(graph->is)[node];
  ------------------
  |  |   60|   815k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1858|   815k|        igraph_int_t eid1, eid2;
 1859|   815k|        igraph_int_t n1, n2;
 1860|   815k|        igraph_bool_t seen_loop_edge = false;
 1861|       |
 1862|   976k|        while (i1 < j1 && i2 < j2) {
  ------------------
  |  Branch (1862:16): [True: 204k, False: 771k]
  |  Branch (1862:27): [True: 160k, False: 44.4k]
  ------------------
 1863|   160k|            eid1 = VECTOR(graph->oi)[i1];
  ------------------
  |  |   60|   160k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1864|   160k|            eid2 = VECTOR(graph->ii)[i2];
  ------------------
  |  |   60|   160k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1865|   160k|            n1 = VECTOR(graph->to)[eid1];
  ------------------
  |  |   60|   160k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1866|   160k|            n2 = VECTOR(graph->from)[eid2];
  ------------------
  |  |   60|   160k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1867|   160k|            if (n1 < n2) {
  ------------------
  |  Branch (1867:17): [True: 58.5k, False: 101k]
  ------------------
 1868|  58.5k|                i1++;
 1869|  58.5k|                VECTOR(*eids)[idx++] = eid1;
  ------------------
  |  |   60|  58.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1870|   101k|            } else if (n1 > n2) {
  ------------------
  |  Branch (1870:24): [True: 57.8k, False: 44.0k]
  ------------------
 1871|  57.8k|                i2++;
 1872|  57.8k|                VECTOR(*eids)[idx++] = eid2;
  ------------------
  |  |   60|  57.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1873|  57.8k|            } else if (n1 != pnode) {
  ------------------
  |  Branch (1873:24): [True: 11.0k, False: 32.9k]
  ------------------
 1874|       |                /* multiple edge */
 1875|  11.0k|                i1++;
 1876|  11.0k|                i2++;
 1877|  11.0k|                VECTOR(*eids)[idx++] = eid1;
  ------------------
  |  |   60|  11.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1878|  11.0k|                VECTOR(*eids)[idx++] = eid2;
  ------------------
  |  |   60|  11.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1879|  32.9k|            } else {
 1880|       |                /* loop edge */
 1881|  32.9k|                i1++;
 1882|  32.9k|                i2++;
 1883|  32.9k|                if (loops == IGRAPH_NO_LOOPS) {
  ------------------
  |  Branch (1883:21): [True: 0, False: 32.9k]
  ------------------
 1884|      0|                    length -= 2;
 1885|  32.9k|                } else if (loops == IGRAPH_LOOPS_ONCE) {
  ------------------
  |  Branch (1885:28): [True: 23.7k, False: 9.19k]
  ------------------
 1886|  23.7k|                    length--;
 1887|  23.7k|                    if (!seen_loop_edge) {
  ------------------
  |  Branch (1887:25): [True: 13.4k, False: 10.3k]
  ------------------
 1888|  13.4k|                        VECTOR(*eids)[idx++] = eid1;
  ------------------
  |  |   60|  13.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1889|  13.4k|                    } else {
 1890|  10.3k|                        VECTOR(*eids)[idx++] = eid2;
  ------------------
  |  |   60|  10.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1891|  10.3k|                    }
 1892|  23.7k|                    seen_loop_edge = !seen_loop_edge;
 1893|  23.7k|                } else {
 1894|  9.19k|                    VECTOR(*eids)[idx++] = eid1;
  ------------------
  |  |   60|  9.19k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1895|  9.19k|                    VECTOR(*eids)[idx++] = eid2;
  ------------------
  |  |   60|  9.19k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1896|  9.19k|                }
 1897|  32.9k|            }
 1898|   160k|        }
 1899|       |
 1900|   891k|        while (i1 < j1) {
  ------------------
  |  Branch (1900:16): [True: 75.8k, False: 815k]
  ------------------
 1901|  75.8k|            eid1 = VECTOR(graph->oi)[i1++];
  ------------------
  |  |   60|  75.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1902|  75.8k|            VECTOR(*eids)[idx++] = eid1;
  ------------------
  |  |   60|  75.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1903|  75.8k|        }
 1904|       |
 1905|   892k|        while (i2 < j2) {
  ------------------
  |  Branch (1905:16): [True: 77.0k, False: 815k]
  ------------------
 1906|  77.0k|            eid2 = VECTOR(graph->ii)[i2++];
  ------------------
  |  |   60|  77.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1907|  77.0k|            VECTOR(*eids)[idx++] = eid2;
  ------------------
  |  |   60|  77.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1908|  77.0k|        }
 1909|   815k|    }
 1910|  1.63M|    IGRAPH_CHECK(igraph_vector_int_resize(eids, length));
  ------------------
  |  |  656|  1.63M|    do { \
  |  |  657|  1.63M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.63M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.63M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.63M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, 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.63M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.63M]
  |  |  ------------------
  ------------------
 1911|  1.63M|    return IGRAPH_SUCCESS;
 1912|  1.63M|}
type_indexededgelist.c:igraph_i_create_start_vectors:
 1076|  27.0k|        igraph_vector_int_t *iindex, igraph_int_t nodes) {
 1077|       |
 1078|  27.0k|# define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
 1079|       |
 1080|  27.0k|    igraph_int_t no_of_nodes;
 1081|  27.0k|    igraph_int_t no_of_edges;
 1082|  27.0k|    igraph_int_t i, j, idx;
 1083|       |
 1084|  27.0k|    no_of_nodes = nodes;
 1085|  27.0k|    no_of_edges = igraph_vector_int_size(el);
 1086|       |
 1087|       |    /* result */
 1088|       |
 1089|  27.0k|    IGRAPH_CHECK(igraph_vector_int_resize(res, nodes + 1));
  ------------------
  |  |  656|  27.0k|    do { \
  |  |  657|  27.0k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  27.0k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  27.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 27.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|  27.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 27.0k]
  |  |  ------------------
  ------------------
 1090|       |
 1091|       |    /* create the index */
 1092|       |
 1093|  27.0k|    if (no_of_edges == 0) {
  ------------------
  |  Branch (1093:9): [True: 2.02k, False: 25.0k]
  ------------------
 1094|       |        /* empty graph */
 1095|  2.02k|        igraph_vector_int_null(res);
 1096|  25.0k|    } else {
 1097|  25.0k|        idx = -1;
 1098|   411k|        for (i = 0; i <= EDGE(0); i++) {
  ------------------
  |  | 1078|   411k|# define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   60|   411k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               # define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   60|   411k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (1098:21): [True: 386k, False: 25.0k]
  ------------------
 1099|   386k|            idx++; VECTOR(*res)[idx] = 0;
  ------------------
  |  |   60|   386k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1100|   386k|        }
 1101|  2.69M|        for (i = 1; i < no_of_edges; i++) {
  ------------------
  |  Branch (1101:21): [True: 2.67M, False: 25.0k]
  ------------------
 1102|  2.67M|            igraph_int_t n = EDGE(i) - EDGE(VECTOR(*res)[idx]);
  ------------------
  |  | 1078|  2.67M|# define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   60|  2.67M|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               # define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   60|  2.67M|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
                          igraph_int_t n = EDGE(i) - EDGE(VECTOR(*res)[idx]);
  ------------------
  |  | 1078|  2.67M|# define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   60|  2.67M|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               # define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   60|  2.67M|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1103|  5.50M|            for (j = 0; j < n; j++) {
  ------------------
  |  Branch (1103:25): [True: 2.83M, False: 2.67M]
  ------------------
 1104|  2.83M|                idx++; VECTOR(*res)[idx] = i;
  ------------------
  |  |   60|  2.83M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1105|  2.83M|            }
 1106|  2.67M|        }
 1107|  25.0k|        j = EDGE(VECTOR(*res)[idx]);
  ------------------
  |  | 1078|  25.0k|# define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   60|  25.0k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               # define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   60|  25.0k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1108|   598k|        for (i = 0; i < no_of_nodes - j; i++) {
  ------------------
  |  Branch (1108:21): [True: 573k, False: 25.0k]
  ------------------
 1109|   573k|            idx++; VECTOR(*res)[idx] = no_of_edges;
  ------------------
  |  |   60|   573k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1110|   573k|        }
 1111|  25.0k|    }
 1112|       |
 1113|       |    /* clean */
 1114|       |
 1115|  27.0k|# undef EDGE
 1116|  27.0k|    return IGRAPH_SUCCESS;
 1117|  27.0k|}

igraph_qsort:
  264|   681k|{
  265|       |	local_qsort(a, n, es, cmp, NULL);
  266|   681k|}
qsort.c:local_qsort:
  121|   905k|{
  122|   905k|	char *pa, *pb, *pc, *pd, *pl, *pm, *pn;
  123|   905k|	size_t d1, d2;
  124|   905k|	int cmp_result;
  125|   905k|	int swap_cnt;
  126|       |
  127|       |    /* if there are less than 2 elements, then sorting is not needed */
  128|   905k|    if (IGRAPH_UNLIKELY(n < 2))
  ------------------
  |  |  612|   905k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  ------------------
  |  |  |  Branch (612:32): [True: 98.6k, False: 806k]
  |  |  ------------------
  ------------------
  129|  98.6k|        return;
  130|  1.06M|loop:
  131|  1.06M|	swap_cnt = 0;
  132|  1.06M|	if (n < 7) {
  ------------------
  |  Branch (132:6): [True: 773k, False: 296k]
  ------------------
  133|  2.49M|		for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es)
  ------------------
  |  Branch (133:29): [True: 1.72M, False: 773k]
  ------------------
  134|  1.72M|			for (pl = pm;
  135|  3.30M|			     pl > (char *)a && CMP(thunk, pl - es, pl) > 0;
  ------------------
  |  |   95|  2.82M|#define	CMP(t, x, y) (cmp((x), (y)))
  ------------------
  |  Branch (135:9): [True: 2.82M, False: 478k]
  |  Branch (135:27): [True: 1.57M, False: 1.24M]
  ------------------
  136|  1.72M|			     pl -= es)
  137|  1.57M|				swapfunc(pl, pl - es, es);
  138|   773k|		return;
  139|   773k|	}
  140|   296k|	pm = (char *)a + (n / 2) * es;
  141|   296k|	if (n > 7) {
  ------------------
  |  Branch (141:6): [True: 242k, False: 53.9k]
  ------------------
  142|   242k|		pl = a;
  143|   242k|		pn = (char *)a + (n - 1) * es;
  144|   242k|		if (n > 40) {
  ------------------
  |  Branch (144:7): [True: 20.9k, False: 221k]
  ------------------
  145|  20.9k|			size_t d = (n / 8) * es;
  146|       |
  147|  20.9k|			pl = med3(pl, pl + d, pl + 2 * d, cmp, thunk);
  148|  20.9k|			pm = med3(pm - d, pm, pm + d, cmp, thunk);
  149|  20.9k|			pn = med3(pn - 2 * d, pn - d, pn, cmp, thunk);
  150|  20.9k|		}
  151|   242k|		pm = med3(pl, pm, pn, cmp, thunk);
  152|   242k|	}
  153|   296k|	swapfunc(a, pm, es);
  154|   296k|	pa = pb = (char *)a + es;
  155|       |
  156|   296k|	pc = pd = (char *)a + (n - 1) * es;
  157|  1.72M|	for (;;) {
  158|  4.12M|		while (pb <= pc && (cmp_result = CMP(thunk, pb, a)) <= 0) {
  ------------------
  |  |   95|  3.98M|#define	CMP(t, x, y) (cmp((x), (y)))
  ------------------
  |  Branch (158:10): [True: 3.98M, False: 140k]
  |  Branch (158:22): [True: 2.39M, False: 1.58M]
  ------------------
  159|  2.39M|			if (cmp_result == 0) {
  ------------------
  |  Branch (159:8): [True: 356k, False: 2.04M]
  ------------------
  160|   356k|				swap_cnt = 1;
  161|   356k|				swapfunc(pa, pb, es);
  162|   356k|				pa += es;
  163|   356k|			}
  164|  2.39M|			pb += es;
  165|  2.39M|		}
  166|  4.07M|		while (pb <= pc && (cmp_result = CMP(thunk, pc, a)) >= 0) {
  ------------------
  |  |   95|  3.77M|#define	CMP(t, x, y) (cmp((x), (y)))
  ------------------
  |  Branch (166:10): [True: 3.77M, False: 296k]
  |  Branch (166:22): [True: 2.34M, False: 1.43M]
  ------------------
  167|  2.34M|			if (cmp_result == 0) {
  ------------------
  |  Branch (167:8): [True: 194k, False: 2.15M]
  ------------------
  168|   194k|				swap_cnt = 1;
  169|   194k|				swapfunc(pc, pd, es);
  170|   194k|				pd -= es;
  171|   194k|			}
  172|  2.34M|			pc -= es;
  173|  2.34M|		}
  174|  1.72M|		if (pb > pc)
  ------------------
  |  Branch (174:7): [True: 296k, False: 1.43M]
  ------------------
  175|   296k|			break;
  176|  1.43M|		swapfunc(pb, pc, es);
  177|  1.43M|		swap_cnt = 1;
  178|  1.43M|		pb += es;
  179|  1.43M|		pc -= es;
  180|  1.43M|	}
  181|   296k|	if (swap_cnt == 0) {  /* Switch to insertion sort */
  ------------------
  |  Branch (181:6): [True: 28.1k, False: 267k]
  ------------------
  182|   239k|		for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es)
  ------------------
  |  Branch (182:29): [True: 211k, False: 28.1k]
  ------------------
  183|   211k|			for (pl = pm;
  184|   624k|			     pl > (char *)a && CMP(thunk, pl - es, pl) > 0;
  ------------------
  |  |   95|   570k|#define	CMP(t, x, y) (cmp((x), (y)))
  ------------------
  |  Branch (184:9): [True: 570k, False: 53.7k]
  |  Branch (184:27): [True: 413k, False: 157k]
  ------------------
  185|   413k|			     pl -= es)
  186|   413k|				swapfunc(pl, pl - es, es);
  187|  28.1k|		return;
  188|  28.1k|	}
  189|       |
  190|   267k|	pn = (char *)a + n * es;
  191|   267k|	d1 = MIN(pa - (char *)a, pb - pa);
  ------------------
  |  |   69|   267k|#define	MIN(a, b)	((a) < (b) ? a : b)
  |  |  ------------------
  |  |  |  Branch (69:20): [True: 235k, False: 32.1k]
  |  |  ------------------
  ------------------
  192|   267k|	vecswap(a, pb - d1, d1);
  ------------------
  |  |   88|   267k|	if ((n) > 0) swapfunc(a, b, n)
  |  |  ------------------
  |  |  |  Branch (88:6): [True: 258k, False: 9.41k]
  |  |  ------------------
  ------------------
  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|   267k|	d1 = MIN(pd - pc, pn - pd - (ptrdiff_t)es);
  ------------------
  |  |   69|   267k|#define	MIN(a, b)	((a) < (b) ? a : b)
  |  |  ------------------
  |  |  |  Branch (69:20): [True: 1.91k, False: 266k]
  |  |  ------------------
  ------------------
  199|   267k|	vecswap(pb, pn - d1, d1);
  ------------------
  |  |   88|   267k|	if ((n) > 0) swapfunc(a, b, n)
  |  |  ------------------
  |  |  |  Branch (88:6): [True: 22.0k, False: 245k]
  |  |  ------------------
  ------------------
  200|       |
  201|   267k|	d1 = pb - pa;
  202|   267k|	d2 = pd - pc;
  203|   267k|	if (d1 <= d2) {
  ------------------
  |  Branch (203:6): [True: 157k, False: 110k]
  ------------------
  204|       |		/* Recurse on left partition, then iterate on right partition */
  205|   157k|		if (d1 > es) {
  ------------------
  |  Branch (205:7): [True: 129k, False: 27.5k]
  ------------------
  206|   129k|			local_qsort(a, d1 / es, es, cmp, thunk);
  207|   129k|		}
  208|   157k|		if (d2 > es) {
  ------------------
  |  Branch (208:7): [True: 152k, False: 4.84k]
  ------------------
  209|       |			/* Iterate rather than recurse to save stack space */
  210|       |			/* qsort(pn - d2, d2 / es, es, cmp); */
  211|   152k|			a = pn - d2;
  212|   152k|			n = d2 / es;
  213|   152k|			goto loop;
  214|   152k|		}
  215|   157k|	} else {
  216|       |		/* Recurse on right partition, then iterate on left partition */
  217|   110k|		if (d2 > es) {
  ------------------
  |  Branch (217:7): [True: 94.8k, False: 16.1k]
  ------------------
  218|  94.8k|			local_qsort(pn - d2, d2 / es, es, cmp, thunk);
  219|  94.8k|		}
  220|   110k|		if (d1 > es) {
  ------------------
  |  Branch (220:7): [True: 110k, False: 380]
  ------------------
  221|       |			/* Iterate rather than recurse to save stack space */
  222|       |			/* qsort(a, d1 / es, es, cmp); */
  223|   110k|			n = d1 / es;
  224|   110k|			goto loop;
  225|   110k|		}
  226|   110k|	}
  227|   267k|}
qsort.c:swapfunc:
   77|  4.55M|{
   78|  4.55M|	char t;
   79|       |
   80|  68.3M|	do {
   81|  68.3M|		t = *a;
   82|  68.3M|		*a++ = *b;
   83|  68.3M|		*b++ = t;
   84|  68.3M|	} while (--es > 0);
  ------------------
  |  Branch (84:11): [True: 63.8M, False: 4.55M]
  ------------------
   85|  4.55M|}
qsort.c:med3:
  104|   305k|{
  105|   305k|	return CMP(thunk, a, b) < 0 ?
  ------------------
  |  |   95|   305k|#define	CMP(t, x, y) (cmp((x), (y)))
  ------------------
  |  Branch (105:9): [True: 146k, False: 158k]
  ------------------
  106|   146k|	       (CMP(thunk, b, c) < 0 ? b : (CMP(thunk, a, c) < 0 ? c : a ))
  ------------------
  |  |   95|   146k|#define	CMP(t, x, y) (cmp((x), (y)))
  ------------------
              	       (CMP(thunk, b, c) < 0 ? b : (CMP(thunk, a, c) < 0 ? c : a ))
  ------------------
  |  |   95|  96.2k|#define	CMP(t, x, y) (cmp((x), (y)))
  ------------------
  |  Branch (106:10): [True: 50.4k, False: 96.2k]
  |  Branch (106:38): [True: 50.2k, False: 46.0k]
  ------------------
  107|   305k|	      :(CMP(thunk, b, c) > 0 ? b : (CMP(thunk, a, c) < 0 ? a : c ));
  ------------------
  |  |   95|   158k|#define	CMP(t, x, y) (cmp((x), (y)))
  ------------------
              	      :(CMP(thunk, b, c) > 0 ? b : (CMP(thunk, a, c) < 0 ? a : c ));
  ------------------
  |  |   95|   113k|#define	CMP(t, x, y) (cmp((x), (y)))
  ------------------
  |  Branch (107:10): [True: 45.2k, False: 113k]
  |  Branch (107:38): [True: 49.3k, False: 63.7k]
  ------------------
  108|   305k|}

igraph_get_edgelist:
  327|  2.06k|igraph_error_t igraph_get_edgelist(const igraph_t *graph, igraph_vector_int_t *res, igraph_bool_t bycol) {
  328|  2.06k|    return igraph_edges(graph, igraph_ess_all(IGRAPH_EDGEORDER_ID), res, bycol);
  329|  2.06k|}
igraph_to_undirected:
  498|  2.06k|                         const igraph_attribute_combination_t *edge_comb) {
  499|       |
  500|  2.06k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  501|  2.06k|    igraph_int_t no_of_edges = igraph_ecount(graph);
  502|  2.06k|    igraph_vector_int_t edges;
  503|  2.06k|    igraph_t newgraph;
  504|  2.06k|    igraph_bool_t attr = edge_comb && igraph_has_attribute_table();
  ------------------
  |  Branch (504:26): [True: 0, False: 2.06k]
  |  Branch (504:39): [True: 0, False: 0]
  ------------------
  505|       |
  506|  2.06k|    if (mode != IGRAPH_TO_UNDIRECTED_EACH &&
  ------------------
  |  Branch (506:9): [True: 2.06k, False: 0]
  ------------------
  507|  2.06k|        mode != IGRAPH_TO_UNDIRECTED_COLLAPSE &&
  ------------------
  |  Branch (507:9): [True: 0, False: 2.06k]
  ------------------
  508|      0|        mode != IGRAPH_TO_UNDIRECTED_MUTUAL) {
  ------------------
  |  Branch (508:9): [True: 0, False: 0]
  ------------------
  509|      0|        IGRAPH_ERROR("Cannot undirect graph, invalid 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]
  |  |  ------------------
  ------------------
  510|      0|    }
  511|       |
  512|  2.06k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (512:9): [True: 0, False: 2.06k]
  ------------------
  513|      0|        return IGRAPH_SUCCESS;
  514|      0|    }
  515|       |
  516|  2.06k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&edges, 0);
  ------------------
  |  |  119|  2.06k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.06k|    do { \
  |  |  |  |  657|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.06k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.06k|    do { \
  |  |  |  |  604|  2.06k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.06k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.06k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.06k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.06k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  517|       |
  518|  2.06k|    if (mode == IGRAPH_TO_UNDIRECTED_EACH) {
  ------------------
  |  Branch (518:9): [True: 0, False: 2.06k]
  ------------------
  519|      0|        igraph_es_t es;
  520|      0|        igraph_eit_t eit;
  521|       |
  522|      0|        IGRAPH_CHECK(igraph_vector_int_reserve(&edges, no_of_edges * 2));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  523|      0|        IGRAPH_CHECK(igraph_es_all(&es, IGRAPH_EDGEORDER_ID));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  524|      0|        IGRAPH_FINALLY(igraph_es_destroy, &es);
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  525|      0|        IGRAPH_CHECK(igraph_eit_create(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]
  |  |  ------------------
  ------------------
  526|      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]
  |  |  ------------------
  ------------------
  527|       |
  528|      0|        while (!IGRAPH_EIT_END(eit)) {
  ------------------
  |  |  371|      0|#define IGRAPH_EIT_END(eit)   ((eit).pos >= (eit).end)
  ------------------
  |  Branch (528:16): [True: 0, False: 0]
  ------------------
  529|      0|            igraph_int_t edge = 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)
  |  |  ------------------
  ------------------
  530|      0|            IGRAPH_CHECK(igraph_vector_int_push_back(&edges, IGRAPH_FROM(graph, edge)));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  531|      0|            IGRAPH_CHECK(igraph_vector_int_push_back(&edges, IGRAPH_TO(graph, edge)));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  532|      0|            IGRAPH_EIT_NEXT(eit);
  ------------------
  |  |  359|      0|#define IGRAPH_EIT_NEXT(eit) (++((eit).pos))
  ------------------
  533|      0|        }
  534|       |
  535|      0|        igraph_eit_destroy(&eit);
  536|      0|        igraph_es_destroy(&es);
  537|      0|        IGRAPH_FINALLY_CLEAN(2);
  538|       |
  539|      0|        IGRAPH_CHECK(igraph_create(&newgraph, &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]
  |  |  ------------------
  ------------------
  540|      0|                                   no_of_nodes,
  541|      0|                                   IGRAPH_UNDIRECTED));
  542|      0|        IGRAPH_FINALLY(igraph_destroy, &newgraph);
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  543|      0|        igraph_vector_int_destroy(&edges);
  544|      0|        IGRAPH_CHECK(igraph_i_attribute_copy(&newgraph, 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]
  |  |  ------------------
  ------------------
  545|      0|        IGRAPH_FINALLY_CLEAN(2);
  546|      0|        igraph_destroy(graph);
  547|      0|        *graph = newgraph;
  548|       |
  549|  2.06k|    } else if (mode == IGRAPH_TO_UNDIRECTED_COLLAPSE) {
  ------------------
  |  Branch (549:16): [True: 2.06k, False: 0]
  ------------------
  550|  2.06k|        igraph_vector_int_t inadj, outadj;
  551|  2.06k|        igraph_vector_int_t mergeinto;
  552|  2.06k|        igraph_int_t actedge = 0;
  553|       |
  554|  2.06k|        if (attr) {
  ------------------
  |  Branch (554:13): [True: 0, False: 2.06k]
  ------------------
  555|      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]
  |  |  ------------------
  ------------------
  556|      0|        }
  557|       |
  558|  2.06k|        IGRAPH_CHECK(igraph_vector_int_reserve(&edges, no_of_edges * 2));
  ------------------
  |  |  656|  2.06k|    do { \
  |  |  657|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  559|  2.06k|        IGRAPH_VECTOR_INT_INIT_FINALLY(&inadj, 0);
  ------------------
  |  |  119|  2.06k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.06k|    do { \
  |  |  |  |  657|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.06k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.06k|    do { \
  |  |  |  |  604|  2.06k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.06k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.06k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.06k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.06k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  560|  2.06k|        IGRAPH_VECTOR_INT_INIT_FINALLY(&outadj, 0);
  ------------------
  |  |  119|  2.06k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.06k|    do { \
  |  |  |  |  657|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.06k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.06k|    do { \
  |  |  |  |  604|  2.06k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.06k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.06k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.06k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.06k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  561|       |
  562|   403k|        for (igraph_int_t i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (562:34): [True: 401k, False: 2.06k]
  ------------------
  563|   401k|            igraph_int_t n_out, n_in;
  564|   401k|            igraph_int_t p1 = -1, p2 = -1;
  565|   401k|            igraph_int_t e1 = 0, e2 = 0, n1 = 0, n2 = 0, last;
  566|   401k|            IGRAPH_CHECK(igraph_incident(graph, &outadj, i, IGRAPH_OUT, IGRAPH_LOOPS));
  ------------------
  |  |  656|   401k|    do { \
  |  |  657|   401k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   401k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   401k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 401k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   401k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 401k]
  |  |  ------------------
  ------------------
  567|   401k|            IGRAPH_CHECK(igraph_incident(graph, &inadj, i, IGRAPH_IN, IGRAPH_LOOPS));
  ------------------
  |  |  656|   401k|    do { \
  |  |  657|   401k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   401k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   401k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 401k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   401k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 401k]
  |  |  ------------------
  ------------------
  568|   401k|            n_out = igraph_vector_int_size(&outadj);
  569|   401k|            n_in = igraph_vector_int_size(&inadj);
  570|       |
  571|   401k|#define STEPOUT() if ( (++p1) < n_out) {    \
  572|   401k|        e1 = VECTOR(outadj)[p1]; \
  573|   401k|        n1 = IGRAPH_TO(graph, e1);      \
  574|   401k|    }
  575|   401k|#define STEPIN()  if ( (++p2) < n_in) {         \
  576|   401k|        e2 = VECTOR(inadj )[p2]; \
  577|   401k|        n2 = IGRAPH_FROM(graph, e2);        \
  578|   401k|    }
  579|   401k|#define ADD_NEW_EDGE() { \
  580|   401k|    IGRAPH_CHECK(igraph_vector_int_push_back(&edges, i)); \
  581|   401k|    IGRAPH_CHECK(igraph_vector_int_push_back(&edges, last)); \
  582|   401k|}
  583|   401k|#define MERGE_INTO_CURRENT_EDGE(which) { \
  584|   401k|    if (attr) { \
  585|   401k|        VECTOR(mergeinto)[which] = actedge; \
  586|   401k|    } \
  587|   401k|}
  588|       |
  589|   401k|            STEPOUT();
  ------------------
  |  |  571|   401k|#define STEPOUT() if ( (++p1) < n_out) {    \
  |  |  ------------------
  |  |  |  Branch (571:24): [True: 31.7k, False: 369k]
  |  |  ------------------
  |  |  572|  31.7k|        e1 = VECTOR(outadj)[p1]; \
  |  |  ------------------
  |  |  |  |   60|  31.7k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  573|  31.7k|        n1 = IGRAPH_TO(graph, e1);      \
  |  |  ------------------
  |  |  |  |  128|  31.7k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  31.7k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  574|  31.7k|    }
  ------------------
  590|   401k|            STEPIN();
  ------------------
  |  |  575|   401k|#define STEPIN()  if ( (++p2) < n_in) {         \
  |  |  ------------------
  |  |  |  Branch (575:24): [True: 31.5k, False: 369k]
  |  |  ------------------
  |  |  576|  31.5k|        e2 = VECTOR(inadj )[p2]; \
  |  |  ------------------
  |  |  |  |   60|  31.5k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  577|  31.5k|        n2 = IGRAPH_FROM(graph, e2);        \
  |  |  ------------------
  |  |  |  |  115|  31.5k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  31.5k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  578|  31.5k|    }
  ------------------
  591|       |
  592|   418k|            while (p1 < n_out && n1 <= i && p2 < n_in && n2 <= i) {
  ------------------
  |  Branch (592:20): [True: 43.8k, False: 374k]
  |  Branch (592:34): [True: 29.9k, False: 13.8k]
  |  Branch (592:45): [True: 21.2k, False: 8.74k]
  |  Branch (592:58): [True: 17.1k, False: 4.12k]
  ------------------
  593|  17.1k|                last = (n1 <= n2) ? n1 : n2;
  ------------------
  |  Branch (593:24): [True: 10.5k, False: 6.54k]
  ------------------
  594|  17.1k|                ADD_NEW_EDGE();
  ------------------
  |  |  579|  17.1k|#define ADD_NEW_EDGE() { \
  |  |  580|  17.1k|    IGRAPH_CHECK(igraph_vector_int_push_back(&edges, i)); \
  |  |  ------------------
  |  |  |  |  656|  17.1k|    do { \
  |  |  |  |  657|  17.1k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  17.1k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  17.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 17.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|  17.1k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 17.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  581|  17.1k|    IGRAPH_CHECK(igraph_vector_int_push_back(&edges, last)); \
  |  |  ------------------
  |  |  |  |  656|  17.1k|    do { \
  |  |  |  |  657|  17.1k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  17.1k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  17.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 17.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|  17.1k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 17.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  582|  17.1k|}
  ------------------
  595|  41.1k|                while (p1 < n_out && last == n1) {
  ------------------
  |  Branch (595:24): [True: 36.0k, False: 5.05k]
  |  Branch (595:38): [True: 24.0k, False: 12.0k]
  ------------------
  596|  24.0k|                    MERGE_INTO_CURRENT_EDGE(e1);
  ------------------
  |  |  583|  24.0k|#define MERGE_INTO_CURRENT_EDGE(which) { \
  |  |  584|  24.0k|    if (attr) { \
  |  |  ------------------
  |  |  |  Branch (584:9): [True: 0, False: 24.0k]
  |  |  ------------------
  |  |  585|      0|        VECTOR(mergeinto)[which] = actedge; \
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  586|      0|    } \
  |  |  587|  24.0k|}
  ------------------
  597|  24.0k|                    STEPOUT();
  ------------------
  |  |  571|  24.0k|#define STEPOUT() if ( (++p1) < n_out) {    \
  |  |  ------------------
  |  |  |  Branch (571:24): [True: 18.9k, False: 5.05k]
  |  |  ------------------
  |  |  572|  18.9k|        e1 = VECTOR(outadj)[p1]; \
  |  |  ------------------
  |  |  |  |   60|  18.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  573|  18.9k|        n1 = IGRAPH_TO(graph, e1);      \
  |  |  ------------------
  |  |  |  |  128|  18.9k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  18.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  574|  18.9k|    }
  ------------------
  598|  24.0k|                }
  599|  41.4k|                while (p2 < n_in && last == n2) {
  ------------------
  |  Branch (599:24): [True: 36.4k, False: 5.03k]
  |  Branch (599:37): [True: 24.3k, False: 12.0k]
  ------------------
  600|  24.3k|                    MERGE_INTO_CURRENT_EDGE(e2);
  ------------------
  |  |  583|  24.3k|#define MERGE_INTO_CURRENT_EDGE(which) { \
  |  |  584|  24.3k|    if (attr) { \
  |  |  ------------------
  |  |  |  Branch (584:9): [True: 0, False: 24.3k]
  |  |  ------------------
  |  |  585|      0|        VECTOR(mergeinto)[which] = actedge; \
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  586|      0|    } \
  |  |  587|  24.3k|}
  ------------------
  601|  24.3k|                    STEPIN();
  ------------------
  |  |  575|  24.3k|#define STEPIN()  if ( (++p2) < n_in) {         \
  |  |  ------------------
  |  |  |  Branch (575:24): [True: 19.3k, False: 5.03k]
  |  |  ------------------
  |  |  576|  19.3k|        e2 = VECTOR(inadj )[p2]; \
  |  |  ------------------
  |  |  |  |   60|  19.3k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  577|  19.3k|        n2 = IGRAPH_FROM(graph, e2);        \
  |  |  ------------------
  |  |  |  |  115|  19.3k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  19.3k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  578|  19.3k|    }
  ------------------
  602|  24.3k|                }
  603|  17.1k|                actedge++;
  604|  17.1k|            }
  605|       |
  606|   415k|            while (p1 < n_out && n1 <= i) {
  ------------------
  |  Branch (606:20): [True: 30.4k, False: 385k]
  |  Branch (606:34): [True: 14.7k, False: 15.6k]
  ------------------
  607|  14.7k|                last = n1;
  608|  14.7k|                ADD_NEW_EDGE();
  ------------------
  |  |  579|  14.7k|#define ADD_NEW_EDGE() { \
  |  |  580|  14.7k|    IGRAPH_CHECK(igraph_vector_int_push_back(&edges, i)); \
  |  |  ------------------
  |  |  |  |  656|  14.7k|    do { \
  |  |  |  |  657|  14.7k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  14.7k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  14.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 14.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  14.7k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 14.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  581|  14.7k|    IGRAPH_CHECK(igraph_vector_int_push_back(&edges, last)); \
  |  |  ------------------
  |  |  |  |  656|  14.7k|    do { \
  |  |  |  |  657|  14.7k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  14.7k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  14.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 14.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  14.7k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 14.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  582|  14.7k|}
  ------------------
  609|  32.2k|                while (p1 < n_out && last == n1) {
  ------------------
  |  Branch (609:24): [True: 21.1k, False: 11.0k]
  |  Branch (609:38): [True: 17.4k, False: 3.68k]
  ------------------
  610|  17.4k|                    MERGE_INTO_CURRENT_EDGE(e1);
  ------------------
  |  |  583|  17.4k|#define MERGE_INTO_CURRENT_EDGE(which) { \
  |  |  584|  17.4k|    if (attr) { \
  |  |  ------------------
  |  |  |  Branch (584:9): [True: 0, False: 17.4k]
  |  |  ------------------
  |  |  585|      0|        VECTOR(mergeinto)[which] = actedge; \
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  586|      0|    } \
  |  |  587|  17.4k|}
  ------------------
  611|  17.4k|                    STEPOUT();
  ------------------
  |  |  571|  17.4k|#define STEPOUT() if ( (++p1) < n_out) {    \
  |  |  ------------------
  |  |  |  Branch (571:24): [True: 6.39k, False: 11.0k]
  |  |  ------------------
  |  |  572|  6.39k|        e1 = VECTOR(outadj)[p1]; \
  |  |  ------------------
  |  |  |  |   60|  6.39k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  573|  6.39k|        n1 = IGRAPH_TO(graph, e1);      \
  |  |  ------------------
  |  |  |  |  128|  6.39k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  6.39k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  574|  6.39k|    }
  ------------------
  612|  17.4k|                }
  613|  14.7k|                actedge++;
  614|  14.7k|            }
  615|       |
  616|   415k|            while (p2 < n_in && n2 <= i) {
  ------------------
  |  Branch (616:20): [True: 30.3k, False: 385k]
  |  Branch (616:33): [True: 14.4k, False: 15.9k]
  ------------------
  617|  14.4k|                last = n2;
  618|  14.4k|                ADD_NEW_EDGE();
  ------------------
  |  |  579|  14.4k|#define ADD_NEW_EDGE() { \
  |  |  580|  14.4k|    IGRAPH_CHECK(igraph_vector_int_push_back(&edges, i)); \
  |  |  ------------------
  |  |  |  |  656|  14.4k|    do { \
  |  |  |  |  657|  14.4k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  14.4k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  14.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 14.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|  14.4k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 14.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  581|  14.4k|    IGRAPH_CHECK(igraph_vector_int_push_back(&edges, last)); \
  |  |  ------------------
  |  |  |  |  656|  14.4k|    do { \
  |  |  |  |  657|  14.4k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  14.4k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  14.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 14.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|  14.4k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 14.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  582|  14.4k|}
  ------------------
  619|  31.2k|                while (p2 < n_in && last == n2) {
  ------------------
  |  Branch (619:24): [True: 20.5k, False: 10.6k]
  |  Branch (619:37): [True: 16.7k, False: 3.82k]
  ------------------
  620|  16.7k|                    MERGE_INTO_CURRENT_EDGE(e2);
  ------------------
  |  |  583|  16.7k|#define MERGE_INTO_CURRENT_EDGE(which) { \
  |  |  584|  16.7k|    if (attr) { \
  |  |  ------------------
  |  |  |  Branch (584:9): [True: 0, False: 16.7k]
  |  |  ------------------
  |  |  585|      0|        VECTOR(mergeinto)[which] = actedge; \
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  586|      0|    } \
  |  |  587|  16.7k|}
  ------------------
  621|  16.7k|                    STEPIN();
  ------------------
  |  |  575|  16.7k|#define STEPIN()  if ( (++p2) < n_in) {         \
  |  |  ------------------
  |  |  |  Branch (575:24): [True: 6.16k, False: 10.6k]
  |  |  ------------------
  |  |  576|  6.16k|        e2 = VECTOR(inadj )[p2]; \
  |  |  ------------------
  |  |  |  |   60|  6.16k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  577|  6.16k|        n2 = IGRAPH_FROM(graph, e2);        \
  |  |  ------------------
  |  |  |  |  115|  6.16k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  6.16k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  578|  6.16k|    }
  ------------------
  622|  16.7k|                }
  623|  14.4k|                actedge++;
  624|  14.4k|            }
  625|   401k|        }
  626|       |
  627|  2.06k|#undef MERGE_INTO_CURRENT_EDGE
  628|  2.06k|#undef ADD_NEW_EDGE
  629|  2.06k|#undef STEPOUT
  630|  2.06k|#undef STEPIN
  631|       |
  632|  2.06k|        igraph_vector_int_destroy(&outadj);
  633|  2.06k|        igraph_vector_int_destroy(&inadj);
  634|  2.06k|        IGRAPH_FINALLY_CLEAN(2);
  635|       |
  636|  2.06k|        IGRAPH_CHECK(igraph_create(&newgraph, &edges,
  ------------------
  |  |  656|  2.06k|    do { \
  |  |  657|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  637|  2.06k|                                   no_of_nodes,
  638|  2.06k|                                   IGRAPH_UNDIRECTED));
  639|  2.06k|        IGRAPH_FINALLY(igraph_destroy, &newgraph);
  ------------------
  |  |  603|  2.06k|    do { \
  |  |  604|  2.06k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.06k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.06k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.06k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.06k]
  |  |  ------------------
  |  |  608|  2.06k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  640|  2.06k|        igraph_vector_int_destroy(&edges);
  641|  2.06k|        IGRAPH_CHECK(igraph_i_attribute_copy(&newgraph, graph, true, true, /* edges= */ false));
  ------------------
  |  |  656|  2.06k|    do { \
  |  |  657|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  642|       |
  643|  2.06k|        if (attr) {
  ------------------
  |  Branch (643:13): [True: 0, False: 2.06k]
  ------------------
  644|      0|            igraph_fixed_vectorlist_t vl;
  645|      0|            IGRAPH_CHECK(igraph_fixed_vectorlist_convert(&vl, &mergeinto, actedge));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  646|      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]
  |  |  ------------------
  ------------------
  647|       |
  648|      0|            IGRAPH_CHECK(igraph_i_attribute_combine_edges(graph, &newgraph, &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]
  |  |  ------------------
  ------------------
  649|       |
  650|      0|            igraph_fixed_vectorlist_destroy(&vl);
  651|      0|            IGRAPH_FINALLY_CLEAN(1);
  652|      0|        }
  653|       |
  654|  2.06k|        IGRAPH_FINALLY_CLEAN(2);
  655|  2.06k|        igraph_destroy(graph);
  656|  2.06k|        *graph = newgraph;
  657|       |
  658|  2.06k|        if (attr) {
  ------------------
  |  Branch (658:13): [True: 0, False: 2.06k]
  ------------------
  659|      0|            igraph_vector_int_destroy(&mergeinto);
  660|      0|            IGRAPH_FINALLY_CLEAN(1);
  661|      0|        }
  662|  2.06k|    } else if (mode == IGRAPH_TO_UNDIRECTED_MUTUAL) {
  ------------------
  |  Branch (662:16): [True: 0, False: 0]
  ------------------
  663|      0|        igraph_vector_int_t inadj, outadj;
  664|      0|        igraph_vector_int_t mergeinto;
  665|      0|        igraph_int_t actedge = 0;
  666|       |
  667|      0|        if (attr) {
  ------------------
  |  Branch (667:13): [True: 0, False: 0]
  ------------------
  668|      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]
  |  |  ------------------
  ------------------
  669|      0|            igraph_vector_int_fill(&mergeinto, -1);
  670|      0|        }
  671|       |
  672|      0|        IGRAPH_CHECK(igraph_vector_int_reserve(&edges, no_of_edges * 2));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  673|      0|        IGRAPH_VECTOR_INT_INIT_FINALLY(&inadj, 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]
  |  |  ------------------
  ------------------
  674|      0|        IGRAPH_VECTOR_INT_INIT_FINALLY(&outadj, 0);
  ------------------
  |  |  119|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|      0|    do { \
  |  |  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 0]
  |  |  ------------------
  ------------------
  675|       |
  676|      0|        for (igraph_int_t i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (676:34): [True: 0, False: 0]
  ------------------
  677|      0|            igraph_int_t n_out, n_in;
  678|      0|            igraph_int_t p1 = -1, p2 = -1;
  679|      0|            igraph_int_t e1 = 0, e2 = 0, n1 = 0, n2 = 0;
  680|      0|            IGRAPH_CHECK(igraph_incident(graph, &outadj, i, IGRAPH_OUT, 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]
  |  |  ------------------
  ------------------
  681|      0|            IGRAPH_CHECK(igraph_incident(graph, &inadj,  i, IGRAPH_IN, 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]
  |  |  ------------------
  ------------------
  682|      0|            n_out = igraph_vector_int_size(&outadj);
  683|      0|            n_in = igraph_vector_int_size(&inadj);
  684|       |
  685|      0|#define STEPOUT() if ( (++p1) < n_out) {    \
  686|      0|        e1 = VECTOR(outadj)[p1]; \
  687|      0|        n1 = IGRAPH_TO(graph, e1);      \
  688|      0|    }
  689|      0|#define STEPIN()  if ( (++p2) < n_in) {         \
  690|      0|        e2 = VECTOR(inadj )[p2]; \
  691|      0|        n2 = IGRAPH_FROM(graph, e2);        \
  692|      0|    }
  693|       |
  694|      0|            STEPOUT();
  ------------------
  |  |  685|      0|#define STEPOUT() if ( (++p1) < n_out) {    \
  |  |  ------------------
  |  |  |  Branch (685:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  686|      0|        e1 = VECTOR(outadj)[p1]; \
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  687|      0|        n1 = IGRAPH_TO(graph, e1);      \
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  688|      0|    }
  ------------------
  695|      0|            STEPIN();
  ------------------
  |  |  689|      0|#define STEPIN()  if ( (++p2) < n_in) {         \
  |  |  ------------------
  |  |  |  Branch (689:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  690|      0|        e2 = VECTOR(inadj )[p2]; \
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  691|      0|        n2 = IGRAPH_FROM(graph, e2);        \
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  692|      0|    }
  ------------------
  696|       |
  697|      0|            while (p1 < n_out && n1 <= i && p2 < n_in && n2 <= i) {
  ------------------
  |  Branch (697:20): [True: 0, False: 0]
  |  Branch (697:34): [True: 0, False: 0]
  |  Branch (697:45): [True: 0, False: 0]
  |  Branch (697:58): [True: 0, False: 0]
  ------------------
  698|      0|                if (n1 == n2) {
  ------------------
  |  Branch (698:21): [True: 0, False: 0]
  ------------------
  699|      0|                    IGRAPH_CHECK(igraph_vector_int_push_back(&edges, i));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  700|      0|                    IGRAPH_CHECK(igraph_vector_int_push_back(&edges, n1));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  701|      0|                    if (attr) {
  ------------------
  |  Branch (701:25): [True: 0, False: 0]
  ------------------
  702|      0|                        VECTOR(mergeinto)[e1] = actedge;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  703|      0|                        VECTOR(mergeinto)[e2] = actedge;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  704|      0|                        actedge++;
  705|      0|                    }
  706|      0|                    STEPOUT();
  ------------------
  |  |  685|      0|#define STEPOUT() if ( (++p1) < n_out) {    \
  |  |  ------------------
  |  |  |  Branch (685:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  686|      0|        e1 = VECTOR(outadj)[p1]; \
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  687|      0|        n1 = IGRAPH_TO(graph, e1);      \
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  688|      0|    }
  ------------------
  707|      0|                    STEPIN();
  ------------------
  |  |  689|      0|#define STEPIN()  if ( (++p2) < n_in) {         \
  |  |  ------------------
  |  |  |  Branch (689:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  690|      0|        e2 = VECTOR(inadj )[p2]; \
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  691|      0|        n2 = IGRAPH_FROM(graph, e2);        \
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  692|      0|    }
  ------------------
  708|      0|                } else if (n1 < n2) {
  ------------------
  |  Branch (708:28): [True: 0, False: 0]
  ------------------
  709|      0|                    STEPOUT();
  ------------------
  |  |  685|      0|#define STEPOUT() if ( (++p1) < n_out) {    \
  |  |  ------------------
  |  |  |  Branch (685:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  686|      0|        e1 = VECTOR(outadj)[p1]; \
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  687|      0|        n1 = IGRAPH_TO(graph, e1);      \
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  688|      0|    }
  ------------------
  710|      0|                } else { /* n2<n1 */
  711|      0|                    STEPIN();
  ------------------
  |  |  689|      0|#define STEPIN()  if ( (++p2) < n_in) {         \
  |  |  ------------------
  |  |  |  Branch (689:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  690|      0|        e2 = VECTOR(inadj )[p2]; \
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  691|      0|        n2 = IGRAPH_FROM(graph, e2);        \
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  692|      0|    }
  ------------------
  712|      0|                }
  713|      0|            }
  714|      0|        }
  715|       |
  716|      0|#undef STEPOUT
  717|      0|#undef STEPIN
  718|       |
  719|      0|        igraph_vector_int_destroy(&outadj);
  720|      0|        igraph_vector_int_destroy(&inadj);
  721|      0|        IGRAPH_FINALLY_CLEAN(2);
  722|       |
  723|      0|        IGRAPH_CHECK(igraph_create(&newgraph, &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]
  |  |  ------------------
  ------------------
  724|      0|                                   no_of_nodes,
  725|      0|                                   IGRAPH_UNDIRECTED));
  726|      0|        IGRAPH_FINALLY(igraph_destroy, &newgraph);
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  727|      0|        igraph_vector_int_destroy(&edges);
  728|      0|        IGRAPH_CHECK(igraph_i_attribute_copy(&newgraph, 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]
  |  |  ------------------
  ------------------
  729|       |
  730|      0|        if (attr) {
  ------------------
  |  Branch (730:13): [True: 0, False: 0]
  ------------------
  731|      0|            igraph_fixed_vectorlist_t vl;
  732|      0|            IGRAPH_CHECK(igraph_fixed_vectorlist_convert(&vl, &mergeinto, actedge));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return 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|            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]
  |  |  ------------------
  ------------------
  734|       |
  735|      0|            IGRAPH_CHECK(igraph_i_attribute_combine_edges(graph, &newgraph, &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]
  |  |  ------------------
  ------------------
  736|       |
  737|      0|            igraph_fixed_vectorlist_destroy(&vl);
  738|      0|            IGRAPH_FINALLY_CLEAN(1);
  739|      0|        }
  740|       |
  741|      0|        IGRAPH_FINALLY_CLEAN(2);
  742|      0|        igraph_destroy(graph);
  743|      0|        *graph = newgraph;
  744|       |
  745|      0|        if (attr) {
  ------------------
  |  Branch (745:13): [True: 0, False: 0]
  ------------------
  746|      0|            igraph_vector_int_destroy(&mergeinto);
  747|      0|            IGRAPH_FINALLY_CLEAN(1);
  748|      0|        }
  749|      0|    }
  750|       |
  751|  2.06k|    return IGRAPH_SUCCESS;
  752|  2.06k|}

igraph_motifs_randesu:
  119|  4.12k|                          igraph_int_t size, const igraph_vector_t *cut_prob) {
  120|  4.12k|    igraph_bool_t directed = igraph_is_directed(graph);
  121|  4.12k|    igraph_int_t histlen;
  122|       |
  123|  4.12k|    if (directed) {
  ------------------
  |  Branch (123:9): [True: 2.06k, False: 2.06k]
  ------------------
  124|  2.06k|        switch (size) {
  125|  2.06k|        case 3:
  ------------------
  |  Branch (125:9): [True: 2.06k, False: 0]
  ------------------
  126|  2.06k|            histlen = 16;
  127|  2.06k|            break;
  128|      0|        case 4:
  ------------------
  |  Branch (128:9): [True: 0, False: 2.06k]
  ------------------
  129|      0|            histlen = 218;
  130|      0|            break;
  131|      0|        default:
  ------------------
  |  Branch (131:9): [True: 0, False: 2.06k]
  ------------------
  132|      0|            IGRAPH_ERROR("In directed graphs, only 3 and 4 vertex motifs are supported.",
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  133|  2.06k|                         IGRAPH_UNIMPLEMENTED);
  134|  2.06k|        }
  135|  2.06k|    } else {
  136|  2.06k|        switch (size) {
  137|      0|        case 3:
  ------------------
  |  Branch (137:9): [True: 0, False: 2.06k]
  ------------------
  138|      0|            histlen = 4;
  139|      0|            break;
  140|  2.06k|        case 4:
  ------------------
  |  Branch (140:9): [True: 2.06k, False: 0]
  ------------------
  141|  2.06k|            histlen = 11;
  142|  2.06k|            break;
  143|      0|        case 5:
  ------------------
  |  Branch (143:9): [True: 0, False: 2.06k]
  ------------------
  144|      0|            histlen = 34;
  145|      0|            break;
  146|      0|        case 6:
  ------------------
  |  Branch (146:9): [True: 0, False: 2.06k]
  ------------------
  147|      0|            histlen = 156;
  148|      0|            break;
  149|      0|        default:
  ------------------
  |  Branch (149:9): [True: 0, False: 2.06k]
  ------------------
  150|      0|            IGRAPH_ERROR("In undirected graphs, only 3 to 6 vertex motifs are supported.",
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        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|  2.06k|                         IGRAPH_UNIMPLEMENTED);
  152|  2.06k|        }
  153|  2.06k|    }
  154|       |
  155|  4.12k|    if (cut_prob != NULL && igraph_vector_size(cut_prob) != size) {
  ------------------
  |  Branch (155:9): [True: 2.06k, False: 2.06k]
  |  Branch (155:29): [True: 0, False: 2.06k]
  ------------------
  156|      0|        IGRAPH_ERRORF("Cut probability vector size (%" IGRAPH_PRId ") must agree with motif size (%" 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]
  |  |  ------------------
  ------------------
  157|      0|                      IGRAPH_EINVAL, igraph_vector_size(cut_prob), size);
  158|      0|    }
  159|       |
  160|  4.12k|    IGRAPH_CHECK(igraph_vector_resize(hist, histlen));
  ------------------
  |  |  656|  4.12k|    do { \
  |  |  657|  4.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.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|  4.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.12k]
  |  |  ------------------
  ------------------
  161|  4.12k|    igraph_vector_null(hist);
  162|       |
  163|  4.12k|    IGRAPH_CHECK(igraph_motifs_randesu_callback(graph, size, cut_prob,
  ------------------
  |  |  656|  4.12k|    do { \
  |  |  657|  4.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.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|  4.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.12k]
  |  |  ------------------
  ------------------
  164|  4.12k|                 &igraph_i_motifs_randesu_update_hist, hist));
  165|       |
  166|  4.12k|    if (size == 3) {
  ------------------
  |  Branch (166:9): [True: 2.06k, False: 2.06k]
  ------------------
  167|  2.06k|        if (directed) {
  ------------------
  |  Branch (167:13): [True: 2.06k, False: 0]
  ------------------
  168|  2.06k|            VECTOR(*hist)[0] = VECTOR(*hist)[1] = VECTOR(*hist)[3] = IGRAPH_NAN;
  ------------------
  |  |   60|  2.06k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*hist)[0] = VECTOR(*hist)[1] = VECTOR(*hist)[3] = IGRAPH_NAN;
  ------------------
  |  |   60|  2.06k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*hist)[0] = VECTOR(*hist)[1] = VECTOR(*hist)[3] = IGRAPH_NAN;
  ------------------
  |  |   60|  2.06k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*hist)[0] = VECTOR(*hist)[1] = VECTOR(*hist)[3] = IGRAPH_NAN;
  ------------------
  |  |  138|  2.06k|#define IGRAPH_NAN ((double)NAN)
  ------------------
  169|  2.06k|        } else {
  170|      0|            VECTOR(*hist)[0] = VECTOR(*hist)[1] = IGRAPH_NAN;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*hist)[0] = VECTOR(*hist)[1] = IGRAPH_NAN;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*hist)[0] = VECTOR(*hist)[1] = IGRAPH_NAN;
  ------------------
  |  |  138|      0|#define IGRAPH_NAN ((double)NAN)
  ------------------
  171|      0|        }
  172|  2.06k|    } else if (size == 4) {
  ------------------
  |  Branch (172:16): [True: 2.06k, False: 0]
  ------------------
  173|  2.06k|        if (directed) {
  ------------------
  |  Branch (173:13): [True: 0, False: 2.06k]
  ------------------
  174|      0|            const int not_connected[] = { 0, 1, 2, 4, 5, 6, 9, 10, 11, 15, 22, 23, 27,
  175|      0|                                          28, 33, 34, 39, 62, 120 };
  176|      0|            size_t i, n = sizeof(not_connected) / sizeof(not_connected[0]);
  177|      0|            for (i = 0; i < n; i++) {
  ------------------
  |  Branch (177:25): [True: 0, False: 0]
  ------------------
  178|      0|                VECTOR(*hist)[not_connected[i]] = IGRAPH_NAN;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*hist)[not_connected[i]] = IGRAPH_NAN;
  ------------------
  |  |  138|      0|#define IGRAPH_NAN ((double)NAN)
  ------------------
  179|      0|            }
  180|  2.06k|        } else {
  181|  2.06k|            VECTOR(*hist)[0] = VECTOR(*hist)[1] = VECTOR(*hist)[2] =
  ------------------
  |  |   60|  2.06k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*hist)[0] = VECTOR(*hist)[1] = VECTOR(*hist)[2] =
  ------------------
  |  |   60|  2.06k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*hist)[0] = VECTOR(*hist)[1] = VECTOR(*hist)[2] =
  ------------------
  |  |   60|  2.06k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  182|  2.06k|                    VECTOR(*hist)[3] = VECTOR(*hist)[5] = IGRAPH_NAN;
  ------------------
  |  |   60|  2.06k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  VECTOR(*hist)[3] = VECTOR(*hist)[5] = IGRAPH_NAN;
  ------------------
  |  |   60|  2.06k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  VECTOR(*hist)[3] = VECTOR(*hist)[5] = IGRAPH_NAN;
  ------------------
  |  |  138|  2.06k|#define IGRAPH_NAN ((double)NAN)
  ------------------
  183|  2.06k|        }
  184|  2.06k|    } else if (size == 5) {
  ------------------
  |  Branch (184:16): [True: 0, False: 0]
  ------------------
  185|       |        /* undirected only */
  186|      0|        const int not_connected[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 19 };
  187|      0|        size_t i, n = sizeof(not_connected) / sizeof(int);
  188|      0|        for (i = 0; i < n; i++) {
  ------------------
  |  Branch (188:21): [True: 0, False: 0]
  ------------------
  189|      0|            VECTOR(*hist)[not_connected[i]] = IGRAPH_NAN;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*hist)[not_connected[i]] = IGRAPH_NAN;
  ------------------
  |  |  138|      0|#define IGRAPH_NAN ((double)NAN)
  ------------------
  190|      0|        }
  191|      0|    } else if (size == 6) {
  ------------------
  |  Branch (191:16): [True: 0, False: 0]
  ------------------
  192|       |        /* undirected only */
  193|      0|        const int not_connected[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
  194|      0|                                     16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
  195|      0|                                     30, 31, 32, 33, 35, 38, 44, 50, 51, 54, 74, 77, 89, 120};
  196|      0|        size_t i, n = sizeof(not_connected) / sizeof(int);
  197|      0|        for (i = 0; i < n; i++) {
  ------------------
  |  Branch (197:21): [True: 0, False: 0]
  ------------------
  198|      0|            VECTOR(*hist)[not_connected[i]] = IGRAPH_NAN;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*hist)[not_connected[i]] = IGRAPH_NAN;
  ------------------
  |  |  138|      0|#define IGRAPH_NAN ((double)NAN)
  ------------------
  199|      0|        }
  200|      0|    }
  201|       |
  202|  4.12k|    return IGRAPH_SUCCESS;
  203|  4.12k|}
igraph_motifs_randesu_callback:
  244|  4.12k|        igraph_motifs_handler_t *callback, void* extra) {
  245|       |
  246|  4.12k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  247|  4.12k|    igraph_adjlist_t allneis, alloutneis;
  248|  4.12k|    igraph_vector_int_t *neis;
  249|  4.12k|    igraph_int_t parent;
  250|  4.12k|    igraph_int_t i, j, s;
  251|  4.12k|    igraph_int_t motifs = 0;
  252|  4.12k|    IGRAPH_UNUSED(motifs);    /* We mark it as unused to prevent warnings about unused-but-set-variables. */
  ------------------
  |  |   30|  4.12k|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
  253|       |
  254|  4.12k|    igraph_vector_int_t vids;     /* this is G */
  255|  4.12k|    igraph_vector_int_t adjverts; /* this is V_E */
  256|  4.12k|    igraph_stack_int_t stack;     /* this is S */
  257|  4.12k|    igraph_int_t *added;
  258|  4.12k|    char *subg;
  259|       |
  260|  4.12k|    const unsigned int *arr_idx, *arr_code;
  261|  4.12k|    unsigned int code = 0;
  262|  4.12k|    unsigned int mul, idx;
  263|       |
  264|  4.12k|    igraph_bool_t terminate = false;
  265|       |
  266|  4.12k|    if (igraph_is_directed(graph)) {
  ------------------
  |  Branch (266:9): [True: 2.06k, False: 2.06k]
  ------------------
  267|  2.06k|        switch (size) {
  268|  2.06k|        case 3:
  ------------------
  |  Branch (268:9): [True: 2.06k, False: 0]
  ------------------
  269|  2.06k|            arr_idx = igraph_i_isoclass_3_idx;
  270|  2.06k|            arr_code = igraph_i_isoclass2_3;
  271|  2.06k|            mul = 3;
  272|  2.06k|            break;
  273|      0|        case 4:
  ------------------
  |  Branch (273:9): [True: 0, False: 2.06k]
  ------------------
  274|      0|            arr_idx = igraph_i_isoclass_4_idx;
  275|      0|            arr_code = igraph_i_isoclass2_4;
  276|      0|            mul = 4;
  277|      0|            break;
  278|      0|        default:
  ------------------
  |  Branch (278:9): [True: 0, False: 2.06k]
  ------------------
  279|      0|            IGRAPH_ERROR("In directed graphs, only 3 and 4 vertex motifs are supported.",
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  280|  2.06k|                         IGRAPH_UNIMPLEMENTED);
  281|  2.06k|        }
  282|  2.06k|    } else {
  283|  2.06k|        switch (size) {
  284|      0|        case 3:
  ------------------
  |  Branch (284:9): [True: 0, False: 2.06k]
  ------------------
  285|      0|            arr_idx = igraph_i_isoclass_3u_idx;
  286|      0|            arr_code = igraph_i_isoclass2_3u;
  287|      0|            mul = 3;
  288|      0|            break;
  289|  2.06k|        case 4:
  ------------------
  |  Branch (289:9): [True: 2.06k, False: 0]
  ------------------
  290|  2.06k|            arr_idx = igraph_i_isoclass_4u_idx;
  291|  2.06k|            arr_code = igraph_i_isoclass2_4u;
  292|  2.06k|            mul = 4;
  293|  2.06k|            break;
  294|      0|        case 5:
  ------------------
  |  Branch (294:9): [True: 0, False: 2.06k]
  ------------------
  295|      0|            arr_idx = igraph_i_isoclass_5u_idx;
  296|      0|            arr_code = igraph_i_isoclass2_5u;
  297|      0|            mul = 5;
  298|      0|            break;
  299|      0|        case 6:
  ------------------
  |  Branch (299:9): [True: 0, False: 2.06k]
  ------------------
  300|      0|            arr_idx = igraph_i_isoclass_6u_idx;
  301|      0|            arr_code = igraph_i_isoclass2_6u;
  302|      0|            mul = 6;
  303|      0|            break;
  304|      0|        default:
  ------------------
  |  Branch (304:9): [True: 0, False: 2.06k]
  ------------------
  305|      0|            IGRAPH_ERROR("In undirected graphs, only 3 to 6 vertex motifs are supported.",
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        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|  2.06k|                         IGRAPH_UNIMPLEMENTED);
  307|  2.06k|        }
  308|  2.06k|    }
  309|       |
  310|  4.12k|    if (cut_prob != NULL && igraph_vector_size(cut_prob) != size) {
  ------------------
  |  Branch (310:9): [True: 2.06k, False: 2.06k]
  |  Branch (310:29): [True: 0, False: 2.06k]
  ------------------
  311|      0|        IGRAPH_ERRORF("Cut probability vector size (%" IGRAPH_PRId ") must agree with motif size (%" 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]
  |  |  ------------------
  ------------------
  312|      0|                      IGRAPH_EINVAL, igraph_vector_size(cut_prob), size);
  313|      0|    }
  314|       |
  315|  4.12k|    added = IGRAPH_CALLOC(no_of_nodes, igraph_int_t);
  ------------------
  |  |   33|  4.12k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  8.24k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 4.12k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 4.12k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 4.12k, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  316|  4.12k|    IGRAPH_CHECK_OOM(added, "Insufficient memory to find motifs.");
  ------------------
  |  |  709|  4.12k|    do { \
  |  |  710|  4.12k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  4.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.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|  4.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 4.12k]
  |  |  ------------------
  ------------------
  317|  4.12k|    IGRAPH_FINALLY(igraph_free, added);
  ------------------
  |  |  603|  4.12k|    do { \
  |  |  604|  4.12k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  4.12k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  4.12k|         * incorrect destructor function with the pointer */ \
  |  |  607|  4.12k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 4.12k]
  |  |  ------------------
  |  |  608|  4.12k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  4.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 4.12k]
  |  |  ------------------
  ------------------
  318|       |
  319|  4.12k|    subg = IGRAPH_CALLOC(no_of_nodes, char);
  ------------------
  |  |   33|  4.12k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  8.24k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 4.12k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 4.12k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 4.12k, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  320|  4.12k|    IGRAPH_CHECK_OOM(subg, "Insufficient memory to find motifs.");
  ------------------
  |  |  709|  4.12k|    do { \
  |  |  710|  4.12k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  4.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.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|  4.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 4.12k]
  |  |  ------------------
  ------------------
  321|  4.12k|    IGRAPH_FINALLY(igraph_free, subg);
  ------------------
  |  |  603|  4.12k|    do { \
  |  |  604|  4.12k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  4.12k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  4.12k|         * incorrect destructor function with the pointer */ \
  |  |  607|  4.12k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 4.12k]
  |  |  ------------------
  |  |  608|  4.12k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  4.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 4.12k]
  |  |  ------------------
  ------------------
  322|       |
  323|  4.12k|    IGRAPH_CHECK(igraph_adjlist_init(graph, &allneis, IGRAPH_ALL, IGRAPH_LOOPS_TWICE, IGRAPH_MULTIPLE));
  ------------------
  |  |  656|  4.12k|    do { \
  |  |  657|  4.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.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|  4.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.12k]
  |  |  ------------------
  ------------------
  324|  4.12k|    IGRAPH_FINALLY(igraph_adjlist_destroy, &allneis);
  ------------------
  |  |  603|  4.12k|    do { \
  |  |  604|  4.12k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  4.12k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  4.12k|         * incorrect destructor function with the pointer */ \
  |  |  607|  4.12k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 4.12k]
  |  |  ------------------
  |  |  608|  4.12k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  4.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 4.12k]
  |  |  ------------------
  ------------------
  325|  4.12k|    IGRAPH_CHECK(igraph_adjlist_init(graph, &alloutneis, IGRAPH_OUT, IGRAPH_LOOPS_ONCE, IGRAPH_MULTIPLE));
  ------------------
  |  |  656|  4.12k|    do { \
  |  |  657|  4.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.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|  4.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.12k]
  |  |  ------------------
  ------------------
  326|  4.12k|    IGRAPH_FINALLY(igraph_adjlist_destroy, &alloutneis);
  ------------------
  |  |  603|  4.12k|    do { \
  |  |  604|  4.12k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  4.12k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  4.12k|         * incorrect destructor function with the pointer */ \
  |  |  607|  4.12k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 4.12k]
  |  |  ------------------
  |  |  608|  4.12k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  4.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 4.12k]
  |  |  ------------------
  ------------------
  327|       |
  328|  4.12k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&vids, 0);
  ------------------
  |  |  119|  4.12k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  4.12k|    do { \
  |  |  |  |  657|  4.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  4.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  4.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.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|  4.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 4.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  4.12k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  4.12k|    do { \
  |  |  |  |  604|  4.12k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  4.12k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  4.12k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  4.12k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 4.12k]
  |  |  |  |  ------------------
  |  |  |  |  608|  4.12k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  4.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 4.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 4.12k]
  |  |  ------------------
  ------------------
  329|  4.12k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&adjverts, 0);
  ------------------
  |  |  119|  4.12k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  4.12k|    do { \
  |  |  |  |  657|  4.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  4.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  4.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.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|  4.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 4.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  4.12k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  4.12k|    do { \
  |  |  |  |  604|  4.12k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  4.12k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  4.12k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  4.12k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 4.12k]
  |  |  |  |  ------------------
  |  |  |  |  608|  4.12k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  4.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 4.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 4.12k]
  |  |  ------------------
  ------------------
  330|  4.12k|    IGRAPH_CHECK(igraph_stack_int_init(&stack, 0));
  ------------------
  |  |  656|  4.12k|    do { \
  |  |  657|  4.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.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|  4.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.12k]
  |  |  ------------------
  ------------------
  331|  4.12k|    IGRAPH_FINALLY(igraph_stack_int_destroy, &stack);
  ------------------
  |  |  603|  4.12k|    do { \
  |  |  604|  4.12k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  4.12k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  4.12k|         * incorrect destructor function with the pointer */ \
  |  |  607|  4.12k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 4.12k]
  |  |  ------------------
  |  |  608|  4.12k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  4.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 4.12k]
  |  |  ------------------
  ------------------
  332|       |
  333|   806k|    for (parent = 0; parent < no_of_nodes; parent++) {
  ------------------
  |  Branch (333:22): [True: 802k, False: 4.12k]
  ------------------
  334|   802k|        igraph_int_t level;
  335|       |
  336|   802k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|   802k|    do { \
  |  |   47|   802k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 802k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|   802k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 802k]
  |  |  ------------------
  ------------------
  337|       |
  338|   802k|        if (cut_prob) {
  ------------------
  |  Branch (338:13): [True: 401k, False: 401k]
  ------------------
  339|   401k|            if (VECTOR(*cut_prob)[0] == 1 || RNG_UNIF01() < VECTOR(*cut_prob)[0]) {
  ------------------
  |  |   60|   401k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          if (VECTOR(*cut_prob)[0] == 1 || RNG_UNIF01() < VECTOR(*cut_prob)[0]) {
  ------------------
  |  |  155|   401k|#define RNG_UNIF01()     (igraph_rng_get_unif01(igraph_rng_default()))
  ------------------
                          if (VECTOR(*cut_prob)[0] == 1 || RNG_UNIF01() < VECTOR(*cut_prob)[0]) {
  ------------------
  |  |   60|   401k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (339:17): [True: 0, False: 401k]
  |  Branch (339:46): [True: 0, False: 401k]
  ------------------
  340|      0|                continue;
  341|      0|            }
  342|   401k|        }
  343|       |
  344|       |        /* init G */
  345|   802k|        igraph_vector_int_clear(&vids); level = 0;
  346|   802k|        IGRAPH_CHECK(igraph_vector_int_push_back(&vids, parent));
  ------------------
  |  |  656|   802k|    do { \
  |  |  657|   802k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   802k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   802k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 802k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   802k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 802k]
  |  |  ------------------
  ------------------
  347|   802k|        subg[parent] = 1; added[parent] += 1; level += 1;
  348|       |
  349|       |        /* init V_E */
  350|   802k|        igraph_vector_int_clear(&adjverts);
  351|   802k|        neis = igraph_adjlist_get(&allneis, parent);
  ------------------
  |  |   73|   802k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  352|   802k|        s = igraph_vector_int_size(neis);
  353|  1.03M|        for (i = 0; i < s; i++) {
  ------------------
  |  Branch (353:21): [True: 234k, False: 802k]
  ------------------
  354|   234k|            igraph_int_t nei = VECTOR(*neis)[i];
  ------------------
  |  |   60|   234k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  355|   234k|            if (!added[nei] && nei > parent) {
  ------------------
  |  Branch (355:17): [True: 178k, False: 55.9k]
  |  Branch (355:32): [True: 89.0k, False: 89.0k]
  ------------------
  356|  89.0k|                IGRAPH_CHECK(igraph_vector_int_push_back(&adjverts, nei));
  ------------------
  |  |  656|  89.0k|    do { \
  |  |  657|  89.0k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  89.0k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  89.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 89.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|  89.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 89.0k]
  |  |  ------------------
  ------------------
  357|  89.0k|                IGRAPH_CHECK(igraph_vector_int_push_back(&adjverts, parent));
  ------------------
  |  |  656|  89.0k|    do { \
  |  |  657|  89.0k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  89.0k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  89.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 89.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|  89.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 89.0k]
  |  |  ------------------
  ------------------
  358|  89.0k|            }
  359|   234k|            added[nei] += 1;
  360|   234k|        }
  361|       |
  362|       |        /* init S */
  363|   802k|        igraph_stack_int_clear(&stack);
  364|       |
  365|  1.83M|        while (level > 1 || !igraph_vector_int_empty(&adjverts)) {
  ------------------
  |  Branch (365:16): [True: 941k, False: 891k]
  |  Branch (365:29): [True: 89.0k, False: 802k]
  ------------------
  366|  1.03M|            igraph_real_t cp = cut_prob ? VECTOR(*cut_prob)[level] : 0;
  ------------------
  |  |   60|   941k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (366:32): [True: 941k, False: 89.0k]
  ------------------
  367|       |
  368|  1.03M|            if (level == size - 1) {
  ------------------
  |  Branch (368:17): [True: 470k, False: 559k]
  ------------------
  369|   470k|                s = igraph_vector_int_size(&adjverts) / 2;
  370|  13.0M|                for (i = 0; i < s; i++) {
  ------------------
  |  Branch (370:29): [True: 12.6M, False: 470k]
  ------------------
  371|  12.6M|                    igraph_int_t k, s2;
  372|  12.6M|                    igraph_int_t last;
  373|  12.6M|                    igraph_error_t ret;
  374|       |
  375|  12.6M|                    if (cp != 0 && RNG_UNIF01() < cp) {
  ------------------
  |  |  155|      0|#define RNG_UNIF01()     (igraph_rng_get_unif01(igraph_rng_default()))
  ------------------
  |  Branch (375:25): [True: 0, False: 12.6M]
  |  Branch (375:36): [True: 0, False: 0]
  ------------------
  376|      0|                        continue;
  377|      0|                    }
  378|  12.6M|                    motifs += 1;
  379|       |
  380|  12.6M|                    last = VECTOR(adjverts)[2 * i];
  ------------------
  |  |   60|  12.6M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  381|  12.6M|                    IGRAPH_CHECK(igraph_vector_int_push_back(&vids, last));
  ------------------
  |  |  656|  12.6M|    do { \
  |  |  657|  12.6M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  12.6M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  12.6M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 12.6M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, 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.6M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 12.6M]
  |  |  ------------------
  ------------------
  382|  12.6M|                    subg[last] = (char) size;
  383|       |
  384|  12.6M|                    code = 0; idx = 0;
  385|  62.6M|                    for (k = 0; k < size; k++) {
  ------------------
  |  Branch (385:33): [True: 50.0M, False: 12.6M]
  ------------------
  386|  50.0M|                        igraph_int_t from = VECTOR(vids)[k];
  ------------------
  |  |   60|  50.0M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  387|  50.0M|                        neis = igraph_adjlist_get(&alloutneis, from);
  ------------------
  |  |   73|  50.0M|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  388|  50.0M|                        s2 = igraph_vector_int_size(neis);
  389|  1.50G|                        for (j = 0; j < s2; j++) {
  ------------------
  |  Branch (389:37): [True: 1.45G, False: 50.0M]
  ------------------
  390|  1.45G|                            igraph_int_t nei = VECTOR(*neis)[j];
  ------------------
  |  |   60|  1.45G|#define VECTOR(v) ((v).stor_begin)
  ------------------
  391|  1.45G|                            if (subg[nei] && k != subg[nei] - 1) {
  ------------------
  |  Branch (391:33): [True: 77.2M, False: 1.37G]
  |  Branch (391:46): [True: 74.2M, False: 2.96M]
  ------------------
  392|  74.2M|                                idx = (unsigned char) (mul * k + (subg[nei] - 1));
  393|  74.2M|                                code |= arr_idx[idx];
  394|  74.2M|                            }
  395|  1.45G|                        }
  396|  50.0M|                    }
  397|       |
  398|  12.6M|                    IGRAPH_CHECK_CALLBACK(
  ------------------
  |  |  689|  12.6M|    do { \
  |  |  690|  12.6M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  691|  12.6M|        *(code) = igraph_i_ret; \
  |  |  692|  12.6M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS && igraph_i_ret != IGRAPH_STOP)) { \
  |  |  ------------------
  |  |  |  |  612|  12.6M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 12.6M]
  |  |  |  |  |  Branch (612:52): [True: 0, False: 12.6M]
  |  |  |  |  |  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|  12.6M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (695:14): [Folded, False: 12.6M]
  |  |  ------------------
  ------------------
  399|  12.6M|                        callback(graph, &vids, arr_code[code], extra),
  400|  12.6M|                        &ret
  401|  12.6M|                    );
  402|       |
  403|  12.6M|                    if (ret == IGRAPH_STOP) {
  ------------------
  |  Branch (403:25): [True: 0, False: 12.6M]
  ------------------
  404|      0|                        terminate = true;
  405|      0|                        break;
  406|      0|                    }
  407|       |
  408|  12.6M|                    igraph_vector_int_pop_back(&vids);
  409|  12.6M|                    subg[last] = 0;
  410|  12.6M|                }
  411|   470k|            }
  412|       |
  413|       |            /* did the callback function asked us to terminate the search? */
  414|  1.03M|            if (terminate) {
  ------------------
  |  Branch (414:17): [True: 0, False: 1.03M]
  ------------------
  415|      0|                break;
  416|      0|            }
  417|       |
  418|       |            /* can we step down? */
  419|  1.03M|            if (level < size - 1 &&
  ------------------
  |  Branch (419:17): [True: 559k, False: 470k]
  ------------------
  420|   559k|                !igraph_vector_int_empty(&adjverts)) {
  ------------------
  |  Branch (420:17): [True: 515k, False: 44.5k]
  ------------------
  421|       |                /* we might step down */
  422|   515k|                igraph_int_t neiparent = igraph_vector_int_pop_back(&adjverts);
  423|   515k|                igraph_int_t nei = igraph_vector_int_pop_back(&adjverts);
  424|       |
  425|   515k|                if (cp == 0 || RNG_UNIF01() > cp) {
  ------------------
  |  |  155|      0|#define RNG_UNIF01()     (igraph_rng_get_unif01(igraph_rng_default()))
  ------------------
  |  Branch (425:21): [True: 515k, False: 0]
  |  Branch (425:32): [True: 0, False: 0]
  ------------------
  426|       |                    /* yes, step down */
  427|   515k|                    IGRAPH_CHECK(igraph_vector_int_push_back(&vids, nei));
  ------------------
  |  |  656|   515k|    do { \
  |  |  657|   515k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   515k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   515k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 515k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   515k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 515k]
  |  |  ------------------
  ------------------
  428|   515k|                    subg[nei] = (char) level + 1; added[nei] += 1; level += 1;
  429|       |
  430|   515k|                    IGRAPH_CHECK(igraph_stack_int_push(&stack, neiparent));
  ------------------
  |  |  656|   515k|    do { \
  |  |  657|   515k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   515k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   515k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 515k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   515k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 515k]
  |  |  ------------------
  ------------------
  431|   515k|                    IGRAPH_CHECK(igraph_stack_int_push(&stack, nei));
  ------------------
  |  |  656|   515k|    do { \
  |  |  657|   515k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   515k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   515k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 515k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   515k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 515k]
  |  |  ------------------
  ------------------
  432|   515k|                    IGRAPH_CHECK(igraph_stack_int_push(&stack, level));
  ------------------
  |  |  656|   515k|    do { \
  |  |  657|   515k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   515k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   515k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 515k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   515k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 515k]
  |  |  ------------------
  ------------------
  433|       |
  434|   515k|                    neis = igraph_adjlist_get(&allneis, nei);
  ------------------
  |  |   73|   515k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  435|   515k|                    s = igraph_vector_int_size(neis);
  436|  1.91M|                    for (i = 0; i < s; i++) {
  ------------------
  |  Branch (436:33): [True: 1.40M, False: 515k]
  ------------------
  437|  1.40M|                        igraph_int_t nei2 = VECTOR(*neis)[i];
  ------------------
  |  |   60|  1.40M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  438|  1.40M|                        if (!added[nei2] && nei2 > parent) {
  ------------------
  |  Branch (438:29): [True: 627k, False: 773k]
  |  Branch (438:45): [True: 380k, False: 246k]
  ------------------
  439|   380k|                            IGRAPH_CHECK(igraph_vector_int_push_back(&adjverts, nei2));
  ------------------
  |  |  656|   380k|    do { \
  |  |  657|   380k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   380k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   380k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 380k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   380k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 380k]
  |  |  ------------------
  ------------------
  440|   380k|                            IGRAPH_CHECK(igraph_vector_int_push_back(&adjverts, nei));
  ------------------
  |  |  656|   380k|    do { \
  |  |  657|   380k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   380k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   380k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 380k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   380k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 380k]
  |  |  ------------------
  ------------------
  441|   380k|                        }
  442|  1.40M|                        added[nei2] += 1;
  443|  1.40M|                    }
  444|   515k|                }
  445|   515k|            } else {
  446|       |                /* no, step back */
  447|   515k|                igraph_int_t nei, neiparent;
  448|   941k|                while (!igraph_stack_int_empty(&stack) &&
  ------------------
  |  Branch (448:24): [True: 941k, False: 0]
  ------------------
  449|   941k|                       level == igraph_stack_int_top(&stack) - 1) {
  ------------------
  |  Branch (449:24): [True: 426k, False: 515k]
  ------------------
  450|   426k|                    igraph_stack_int_pop(&stack);
  451|   426k|                    nei = igraph_stack_int_pop(&stack);
  452|   426k|                    neiparent = igraph_stack_int_pop(&stack);
  453|   426k|                    IGRAPH_CHECK(igraph_vector_int_push_back(&adjverts, nei));
  ------------------
  |  |  656|   426k|    do { \
  |  |  657|   426k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   426k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   426k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 426k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   426k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 426k]
  |  |  ------------------
  ------------------
  454|   426k|                    IGRAPH_CHECK(igraph_vector_int_push_back(&adjverts, neiparent));
  ------------------
  |  |  656|   426k|    do { \
  |  |  657|   426k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   426k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   426k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 426k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   426k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 426k]
  |  |  ------------------
  ------------------
  455|   426k|                }
  456|       |
  457|   515k|                nei = igraph_vector_int_pop_back(&vids);
  458|   515k|                subg[nei] = 0; added[nei] -= 1; level -= 1;
  459|   515k|                neis = igraph_adjlist_get(&allneis, nei);
  ------------------
  |  |   73|   515k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  460|   515k|                s = igraph_vector_int_size(neis);
  461|  1.91M|                for (i = 0; i < s; i++) {
  ------------------
  |  Branch (461:29): [True: 1.40M, False: 515k]
  ------------------
  462|  1.40M|                    added[ VECTOR(*neis)[i] ] -= 1;
  ------------------
  |  |   60|  1.40M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  463|  1.40M|                }
  464|   896k|                while (!igraph_vector_int_empty(&adjverts) &&
  ------------------
  |  Branch (464:24): [True: 813k, False: 82.8k]
  ------------------
  465|   813k|                       igraph_vector_int_tail(&adjverts) == nei) {
  ------------------
  |  Branch (465:24): [True: 380k, False: 432k]
  ------------------
  466|   380k|                    igraph_vector_int_pop_back(&adjverts);
  467|   380k|                    igraph_vector_int_pop_back(&adjverts);
  468|   380k|                }
  469|   515k|            }
  470|       |
  471|  1.03M|        } /* while */
  472|       |
  473|       |        /* did the callback function asked us to terminate the search? */
  474|   802k|        if (terminate) {
  ------------------
  |  Branch (474:13): [True: 0, False: 802k]
  ------------------
  475|      0|            break;
  476|      0|        }
  477|       |
  478|       |        /* clear the added vector */
  479|   802k|        added[parent] -= 1;
  480|   802k|        subg[parent] = 0;
  481|   802k|        neis = igraph_adjlist_get(&allneis, parent);
  ------------------
  |  |   73|   802k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  482|   802k|        s = igraph_vector_int_size(neis);
  483|  1.03M|        for (i = 0; i < s; i++) {
  ------------------
  |  Branch (483:21): [True: 234k, False: 802k]
  ------------------
  484|   234k|            added[ VECTOR(*neis)[i] ] -= 1;
  ------------------
  |  |   60|   234k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  485|   234k|        }
  486|       |
  487|   802k|    } /* for parent */
  488|       |
  489|  4.12k|    IGRAPH_FREE(added);
  ------------------
  |  |   36|  4.12k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  490|  4.12k|    IGRAPH_FREE(subg);
  ------------------
  |  |   36|  4.12k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  491|  4.12k|    igraph_vector_int_destroy(&vids);
  492|  4.12k|    igraph_vector_int_destroy(&adjverts);
  493|  4.12k|    igraph_adjlist_destroy(&alloutneis);
  494|  4.12k|    igraph_adjlist_destroy(&allneis);
  495|  4.12k|    igraph_stack_int_destroy(&stack);
  496|  4.12k|    IGRAPH_FINALLY_CLEAN(7);
  497|       |
  498|  4.12k|    return IGRAPH_SUCCESS;
  499|  4.12k|}
motifs.c:igraph_i_motifs_randesu_update_hist:
   43|  12.6M|        igraph_int_t isoclass, void* extra) {
   44|       |
   45|  12.6M|    igraph_vector_t *hist = (igraph_vector_t*)extra;
   46|  12.6M|    IGRAPH_UNUSED(graph); IGRAPH_UNUSED(vids);
  ------------------
  |  |   30|  12.6M|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
                  IGRAPH_UNUSED(graph); IGRAPH_UNUSED(vids);
  ------------------
  |  |   30|  12.6M|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
   47|  12.6M|    VECTOR(*hist)[isoclass]++;
  ------------------
  |  |   60|  12.6M|#define VECTOR(v) ((v).stor_begin)
  ------------------
   48|  12.6M|    return IGRAPH_SUCCESS;
   49|  12.6M|}

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

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

igraph_random_walk:
  295|  4.12k|                       igraph_random_walk_stuck_t stuck) {
  296|       |
  297|  4.12k|    igraph_int_t vc = igraph_vcount(graph);
  298|  4.12k|    igraph_int_t ec = igraph_ecount(graph);
  299|       |
  300|  4.12k|    if (!(mode == IGRAPH_ALL || mode == IGRAPH_IN || mode == IGRAPH_OUT)) {
  ------------------
  |  Branch (300:11): [True: 4.12k, False: 0]
  |  Branch (300:33): [True: 0, False: 0]
  |  Branch (300:54): [True: 0, False: 0]
  ------------------
  301|      0|        IGRAPH_ERROR("Invalid mode parameter.", 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]
  |  |  ------------------
  ------------------
  302|      0|    }
  303|       |
  304|  4.12k|    if (start < 0 || start >= vc) {
  ------------------
  |  Branch (304:9): [True: 0, False: 4.12k]
  |  Branch (304:22): [True: 0, False: 4.12k]
  ------------------
  305|      0|        IGRAPH_ERRORF("Starting vertex must be between 0 and the "
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  306|      0|                      "number of vertices in the graph (%" IGRAPH_PRId
  307|      0|                      "), got %" IGRAPH_PRId ".", IGRAPH_EINVAL,
  308|      0|                      vc, start);
  309|      0|    }
  310|  4.12k|    if (steps < 0) {
  ------------------
  |  Branch (310:9): [True: 0, False: 4.12k]
  ------------------
  311|      0|        IGRAPH_ERRORF("Number of steps should be non-negative, got %"
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  312|      0|                      IGRAPH_PRId ".", IGRAPH_EINVAL, steps);
  313|      0|    }
  314|       |
  315|  4.12k|    if (weights) {
  ------------------
  |  Branch (315:9): [True: 0, False: 4.12k]
  ------------------
  316|      0|        if (igraph_vector_size(weights) != ec) {
  ------------------
  |  Branch (316:13): [True: 0, False: 0]
  ------------------
  317|      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]
  |  |  ------------------
  ------------------
  318|      0|        }
  319|      0|        if (ec > 0) {
  ------------------
  |  Branch (319:13): [True: 0, False: 0]
  ------------------
  320|      0|            igraph_real_t min = igraph_vector_min(weights);
  321|      0|            if (min < 0) {
  ------------------
  |  Branch (321:17): [True: 0, False: 0]
  ------------------
  322|      0|                IGRAPH_ERROR("Weights 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]
  |  |  ------------------
  ------------------
  323|      0|            } else if (isnan(min)) {
  ------------------
  |  Branch (323:24): [True: 0, False: 0]
  ------------------
  324|      0|                IGRAPH_ERROR("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]
  |  |  ------------------
  ------------------
  325|      0|            }
  326|      0|        }
  327|      0|    }
  328|       |
  329|  4.12k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (329:9): [True: 2.06k, False: 2.06k]
  ------------------
  330|  2.06k|        mode = IGRAPH_ALL;
  331|  2.06k|    }
  332|       |
  333|  4.12k|    if (edges || weights) {
  ------------------
  |  Branch (333:9): [True: 4.12k, False: 0]
  |  Branch (333:18): [True: 0, False: 0]
  ------------------
  334|  4.12k|        return igraph_i_random_walk_inclist(graph, weights, vertices, edges,
  335|  4.12k|                                            start, mode, steps, stuck);
  336|  4.12k|    } else {
  337|      0|        return igraph_i_random_walk_adjlist(graph, vertices,
  338|      0|                                            start, mode, steps, stuck);
  339|      0|    }
  340|  4.12k|}
random_walk.c:igraph_i_random_walk_inclist:
  123|  4.12k|        igraph_random_walk_stuck_t stuck) {
  124|       |
  125|  4.12k|    igraph_int_t vc = igraph_vcount(graph);
  126|  4.12k|    igraph_int_t i, next;
  127|  4.12k|    igraph_vector_t weight_temp;
  128|  4.12k|    igraph_lazy_inclist_t il;
  129|  4.12k|    igraph_vector_ptr_t cdfs; /* cumulative distribution vectors for each node, used for weighted choice */
  130|       |
  131|  4.12k|    if (vertices) {
  ------------------
  |  Branch (131:9): [True: 4.12k, False: 0]
  ------------------
  132|  4.12k|        IGRAPH_CHECK(igraph_vector_int_resize(vertices, steps + 1)); /* size: steps + 1 because vertices includes start vertex */
  ------------------
  |  |  656|  4.12k|    do { \
  |  |  657|  4.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.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|  4.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.12k]
  |  |  ------------------
  ------------------
  133|  4.12k|    }
  134|  4.12k|    if (edges) {
  ------------------
  |  Branch (134:9): [True: 4.12k, False: 0]
  ------------------
  135|  4.12k|        IGRAPH_CHECK(igraph_vector_int_resize(edges, steps));
  ------------------
  |  |  656|  4.12k|    do { \
  |  |  657|  4.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.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|  4.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.12k]
  |  |  ------------------
  ------------------
  136|  4.12k|    }
  137|       |
  138|  4.12k|    IGRAPH_CHECK(igraph_lazy_inclist_init(graph, &il, mode, IGRAPH_LOOPS));
  ------------------
  |  |  656|  4.12k|    do { \
  |  |  657|  4.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.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|  4.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.12k]
  |  |  ------------------
  ------------------
  139|  4.12k|    IGRAPH_FINALLY(igraph_lazy_inclist_destroy, &il);
  ------------------
  |  |  603|  4.12k|    do { \
  |  |  604|  4.12k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  4.12k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  4.12k|         * incorrect destructor function with the pointer */ \
  |  |  607|  4.12k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 4.12k]
  |  |  ------------------
  |  |  608|  4.12k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  4.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 4.12k]
  |  |  ------------------
  ------------------
  140|       |
  141|  4.12k|    IGRAPH_VECTOR_INIT_FINALLY(&weight_temp, 0);
  ------------------
  |  |  104|  4.12k|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  4.12k|    do { \
  |  |  |  |  657|  4.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  4.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  4.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.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|  4.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 4.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  4.12k|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  4.12k|    do { \
  |  |  |  |  604|  4.12k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  4.12k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  4.12k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  4.12k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 4.12k]
  |  |  |  |  ------------------
  |  |  |  |  608|  4.12k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  4.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 4.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (105:60): [Folded, False: 4.12k]
  |  |  ------------------
  ------------------
  142|       |
  143|       |    /* cdf vectors will be computed lazily; that's why we are still using
  144|       |     * igraph_vector_ptr_t as it does not require us to pre-initialize all
  145|       |     * the vectors in the vector list */
  146|  4.12k|    IGRAPH_CHECK(igraph_vector_ptr_init(&cdfs, vc));
  ------------------
  |  |  656|  4.12k|    do { \
  |  |  657|  4.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.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|  4.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.12k]
  |  |  ------------------
  ------------------
  147|  4.12k|    IGRAPH_FINALLY(igraph_vector_ptr_destroy_all, &cdfs);
  ------------------
  |  |  603|  4.12k|    do { \
  |  |  604|  4.12k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  4.12k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  4.12k|         * incorrect destructor function with the pointer */ \
  |  |  607|  4.12k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 4.12k]
  |  |  ------------------
  |  |  608|  4.12k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  4.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 4.12k]
  |  |  ------------------
  ------------------
  148|  4.12k|    IGRAPH_VECTOR_PTR_SET_ITEM_DESTRUCTOR(&cdfs, vec_destr);
  ------------------
  |  |   94|  4.12k|    igraph_vector_ptr_set_item_destructor((v), (igraph_finally_func_t*)(func))
  ------------------
  149|   806k|    for (i = 0; i < vc; ++i) {
  ------------------
  |  Branch (149:17): [True: 802k, False: 4.12k]
  ------------------
  150|   802k|        VECTOR(cdfs)[i] = NULL;
  ------------------
  |  |   60|   802k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  151|   802k|    }
  152|       |
  153|  4.12k|    if (vertices) {
  ------------------
  |  Branch (153:9): [True: 4.12k, False: 0]
  ------------------
  154|  4.12k|        VECTOR(*vertices)[0] = start;
  ------------------
  |  |   60|  4.12k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  155|  4.12k|    }
  156|   103k|    for (i = 0; i < steps; ++i) {
  ------------------
  |  Branch (156:17): [True: 100k, False: 3.27k]
  ------------------
  157|   100k|        igraph_int_t degree, edge, idx;
  158|   100k|        igraph_vector_int_t *inc_edges = igraph_lazy_inclist_get(&il, start);
  ------------------
  |  |  214|   100k|    (igraph_lazy_inclist_has(il,no) ? ((il)->incs[(igraph_int_t)(no)]) \
  |  |  ------------------
  |  |  |  |  189|   100k|#define igraph_lazy_inclist_has(il,no) ((il)->incs[(igraph_int_t)(no)] != NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (189:40): [True: 73.9k, False: 26.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  215|   100k|                                    : (igraph_i_lazy_inclist_get_real(il,no)))
  ------------------
  159|       |
  160|   100k|        IGRAPH_CHECK_OOM(inc_edges, "Failed to query incident edges.");
  ------------------
  |  |  709|   100k|    do { \
  |  |  710|   100k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|   100k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 100k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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|   100k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 100k]
  |  |  ------------------
  ------------------
  161|   100k|        degree = igraph_vector_int_size(inc_edges);
  162|       |
  163|       |        /* are we stuck? */
  164|   100k|        if (IGRAPH_UNLIKELY(degree == 0)) {
  ------------------
  |  |  612|   100k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  ------------------
  |  |  |  Branch (612:32): [True: 844, False: 99.5k]
  |  |  ------------------
  ------------------
  165|       |            /* can't fail since size is reduced, skip IGRAPH_CHECK */
  166|    844|            if (vertices) {
  ------------------
  |  Branch (166:17): [True: 844, False: 0]
  ------------------
  167|    844|                igraph_vector_int_resize(vertices, i + 1); /* size: i + 1 because vertices includes start vertex */
  168|    844|            }
  169|    844|            if (edges) {
  ------------------
  |  Branch (169:17): [True: 844, False: 0]
  ------------------
  170|    844|                igraph_vector_int_resize(edges, i);
  171|    844|            }
  172|    844|            if (stuck == IGRAPH_RANDOM_WALK_STUCK_RETURN) {
  ------------------
  |  Branch (172:17): [True: 844, False: 0]
  ------------------
  173|    844|                break;
  174|    844|            } else {
  175|      0|                IGRAPH_ERROR("Random walk got stuck.", IGRAPH_ERWSTUCK);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  176|      0|            }
  177|    844|        }
  178|       |
  179|  99.5k|        if (weights) { /* weighted: choose an out-edge with probability proportional to its weight */
  ------------------
  |  Branch (179:13): [True: 0, False: 99.5k]
  ------------------
  180|      0|            igraph_real_t r;
  181|      0|            igraph_vector_t **cd = (igraph_vector_t**) &(VECTOR(cdfs)[start]);
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  182|       |
  183|       |            /* compute out-edge cdf for this node if not already done */
  184|      0|            if (IGRAPH_UNLIKELY(! *cd)) {
  ------------------
  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  ------------------
  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  185|      0|                igraph_int_t j;
  186|       |
  187|      0|                *cd = IGRAPH_CALLOC(1, igraph_vector_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]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  188|      0|                IGRAPH_CHECK_OOM(*cd, "Insufficient memory for random walk.");
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  189|      0|                IGRAPH_CHECK(igraph_vector_init(*cd, degree));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  190|       |
  191|      0|                IGRAPH_CHECK(igraph_vector_resize(&weight_temp, degree));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  192|      0|                for (j = 0; j < degree; ++j) {
  ------------------
  |  Branch (192:29): [True: 0, False: 0]
  ------------------
  193|      0|                    VECTOR(weight_temp)[j] = VECTOR(*weights)[VECTOR(*inc_edges)[j]];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  VECTOR(weight_temp)[j] = VECTOR(*weights)[VECTOR(*inc_edges)[j]];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  VECTOR(weight_temp)[j] = VECTOR(*weights)[VECTOR(*inc_edges)[j]];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  194|      0|                }
  195|       |
  196|      0|                IGRAPH_CHECK(igraph_vector_cumsum(*cd, &weight_temp));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  197|      0|            }
  198|       |
  199|      0|            r = RNG_UNIF(0, VECTOR(**cd)[degree - 1]);
  ------------------
  |  |  154|      0|#define RNG_UNIF(l,h)    (igraph_rng_get_unif(igraph_rng_default(),(l),(h)))
  ------------------
  200|      0|            igraph_vector_binsearch(*cd, r, &idx);
  201|      0|        }
  202|  99.5k|        else {
  203|  99.5k|            idx = RNG_INTEGER(0, degree - 1);
  ------------------
  |  |  152|  99.5k|#define RNG_INTEGER(l,h) (igraph_rng_get_integer(igraph_rng_default(),(l),(h)))
  ------------------
  204|  99.5k|        }
  205|       |
  206|  99.5k|        edge = VECTOR(*inc_edges)[idx];
  ------------------
  |  |   60|  99.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  207|  99.5k|        if (edges) {
  ------------------
  |  Branch (207:13): [True: 99.5k, False: 0]
  ------------------
  208|  99.5k|            VECTOR(*edges)[i] = edge;
  ------------------
  |  |   60|  99.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  209|  99.5k|        }
  210|       |
  211|       |        /* travel along edge in a direction specified by 'mode' */
  212|       |        /* note: 'mode' is always set to IGRAPH_ALL for undirected graphs */
  213|  99.5k|        switch (mode) {
  ------------------
  |  Branch (213:17): [True: 99.5k, False: 0]
  ------------------
  214|      0|        case IGRAPH_OUT:
  ------------------
  |  Branch (214:9): [True: 0, False: 99.5k]
  ------------------
  215|      0|            next = 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)
  |  |  ------------------
  ------------------
  216|      0|            break;
  217|      0|        case IGRAPH_IN:
  ------------------
  |  Branch (217:9): [True: 0, False: 99.5k]
  ------------------
  218|      0|            next = 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)
  |  |  ------------------
  ------------------
  219|      0|            break;
  220|  99.5k|        case IGRAPH_ALL:
  ------------------
  |  Branch (220:9): [True: 99.5k, False: 0]
  ------------------
  221|  99.5k|            next = IGRAPH_OTHER(graph, edge, start);
  ------------------
  |  |  146|  99.5k|    ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|  99.5k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  99.5k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  115|  57.8k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  57.8k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|  41.7k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  41.7k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (146:21): [True: 57.8k, False: 41.7k]
  |  |  ------------------
  ------------------
  222|  99.5k|            break;
  223|  99.5k|        }
  224|       |
  225|  99.5k|        if (vertices) {
  ------------------
  |  Branch (225:13): [True: 99.5k, False: 0]
  ------------------
  226|  99.5k|            VECTOR(*vertices)[i + 1] = next; /* index i + 1 because vertices includes start vertex at position 0 */
  ------------------
  |  |   60|  99.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  227|  99.5k|        }
  228|  99.5k|        start = next;
  229|       |
  230|  99.5k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|  99.5k|    do { \
  |  |   47|  99.5k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 99.5k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|  99.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 99.5k]
  |  |  ------------------
  ------------------
  231|  99.5k|    }
  232|       |
  233|  4.12k|    igraph_vector_ptr_destroy_all(&cdfs);
  234|  4.12k|    igraph_vector_destroy(&weight_temp);
  235|  4.12k|    igraph_lazy_inclist_destroy(&il);
  236|  4.12k|    IGRAPH_FINALLY_CLEAN(3);
  237|       |
  238|  4.12k|    return IGRAPH_SUCCESS;
  239|  4.12k|}

igraph_get_all_simple_paths:
   81|  2.04k|        igraph_int_t max_results) {
   82|       |
   83|  2.04k|    const igraph_int_t vcount = igraph_vcount(graph);
   84|  2.04k|    const igraph_bool_t toall = igraph_vs_is_all(&to);
   85|  2.04k|    igraph_vit_t vit;
   86|  2.04k|    igraph_lazy_adjlist_t adjlist;
   87|  2.04k|    igraph_vector_int_t stack, dist; /* used as a stack, but represented as a vector,
   88|       |                                        in order to be appendable the result vector list */
   89|  2.04k|    igraph_bitset_t markto, added;
   90|  2.04k|    igraph_vector_int_t nptr;
   91|  2.04k|    int iter = 0;
   92|       |
   93|  2.04k|    if (from < 0 || from >= vcount) {
  ------------------
  |  Branch (93:9): [True: 0, False: 2.04k]
  |  Branch (93:21): [True: 0, False: 2.04k]
  ------------------
   94|      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]
  |  |  ------------------
  ------------------
   95|      0|    }
   96|       |
   97|  2.04k|    igraph_vector_int_list_clear(res);
   98|       |
   99|  2.04k|    if (max_results == 0) {
  ------------------
  |  Branch (99:9): [True: 0, False: 2.04k]
  ------------------
  100|      0|        return IGRAPH_SUCCESS;
  101|      0|    }
  102|       |
  103|  2.04k|    if (!toall) {
  ------------------
  |  Branch (103:9): [True: 2.04k, False: 0]
  ------------------
  104|  2.04k|        IGRAPH_BITSET_INIT_FINALLY(&markto, vcount);
  ------------------
  |  |  259|  2.04k|#define IGRAPH_BITSET_INIT_FINALLY(bitset, size) \
  |  |  260|  2.04k|do { IGRAPH_CHECK(igraph_bitset_init(bitset, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.04k|    do { \
  |  |  |  |  657|  2.04k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.04k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.04k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.04k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.04k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.04k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  261|  2.04k|     IGRAPH_FINALLY(igraph_bitset_destroy, bitset); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.04k|    do { \
  |  |  |  |  604|  2.04k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.04k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.04k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.04k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.04k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.04k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.04k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.04k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (261:62): [Folded, False: 2.04k]
  |  |  ------------------
  ------------------
  105|  2.04k|        IGRAPH_CHECK(igraph_vit_create(graph, to, &vit));
  ------------------
  |  |  656|  2.04k|    do { \
  |  |  657|  2.04k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.04k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.04k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.04k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.04k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.04k]
  |  |  ------------------
  ------------------
  106|  2.04k|        IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  603|  2.04k|    do { \
  |  |  604|  2.04k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.04k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.04k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.04k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.04k]
  |  |  ------------------
  |  |  608|  2.04k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.04k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.04k]
  |  |  ------------------
  ------------------
  107|  4.08k|        for (; !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  179|  4.08k|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
                      for (; !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  167|  2.04k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  |  Branch (107:16): [True: 2.04k, False: 2.04k]
  ------------------
  108|  2.04k|            IGRAPH_BIT_SET(markto, IGRAPH_VIT_GET(vit));
  ------------------
  |  |  103|  2.04k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|  2.04k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|  4.08k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  2.04k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (85:30): [True: 2.04k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|  4.08k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  2.04k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (66:53): [True: 2.04k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  109|  2.04k|        }
  110|  2.04k|        igraph_vit_destroy(&vit);
  111|  2.04k|        IGRAPH_FINALLY_CLEAN(1);
  112|  2.04k|    }
  113|       |
  114|  2.04k|    IGRAPH_BITSET_INIT_FINALLY(&added, vcount);
  ------------------
  |  |  259|  2.04k|#define IGRAPH_BITSET_INIT_FINALLY(bitset, size) \
  |  |  260|  2.04k|do { IGRAPH_CHECK(igraph_bitset_init(bitset, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.04k|    do { \
  |  |  |  |  657|  2.04k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.04k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.04k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.04k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.04k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.04k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  261|  2.04k|     IGRAPH_FINALLY(igraph_bitset_destroy, bitset); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.04k|    do { \
  |  |  |  |  604|  2.04k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.04k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.04k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.04k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.04k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.04k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.04k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.04k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (261:62): [Folded, False: 2.04k]
  |  |  ------------------
  ------------------
  115|  2.04k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&stack, 100);
  ------------------
  |  |  119|  2.04k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.04k|    do { \
  |  |  |  |  657|  2.04k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.04k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.04k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.04k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.04k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.04k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.04k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.04k|    do { \
  |  |  |  |  604|  2.04k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.04k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.04k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.04k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.04k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.04k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.04k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.04k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.04k]
  |  |  ------------------
  ------------------
  116|  2.04k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&dist, 100);
  ------------------
  |  |  119|  2.04k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.04k|    do { \
  |  |  |  |  657|  2.04k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.04k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.04k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.04k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.04k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.04k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.04k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.04k|    do { \
  |  |  |  |  604|  2.04k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.04k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.04k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.04k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.04k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.04k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.04k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.04k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.04k]
  |  |  ------------------
  ------------------
  117|  2.04k|    IGRAPH_CHECK(igraph_lazy_adjlist_init(
  ------------------
  |  |  656|  2.04k|    do { \
  |  |  657|  2.04k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.04k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.04k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.04k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.04k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.04k]
  |  |  ------------------
  ------------------
  118|  2.04k|        graph, &adjlist, mode, IGRAPH_NO_LOOPS, IGRAPH_NO_MULTIPLE
  119|  2.04k|    ));
  120|  2.04k|    IGRAPH_FINALLY(igraph_lazy_adjlist_destroy, &adjlist);
  ------------------
  |  |  603|  2.04k|    do { \
  |  |  604|  2.04k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.04k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.04k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.04k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.04k]
  |  |  ------------------
  |  |  608|  2.04k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.04k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.04k]
  |  |  ------------------
  ------------------
  121|  2.04k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&nptr, vcount);
  ------------------
  |  |  119|  2.04k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.04k|    do { \
  |  |  |  |  657|  2.04k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.04k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.04k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.04k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.04k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.04k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.04k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.04k|    do { \
  |  |  |  |  604|  2.04k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.04k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.04k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.04k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.04k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.04k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.04k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.04k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.04k]
  |  |  ------------------
  ------------------
  122|       |
  123|  2.04k|    igraph_vector_int_clear(&stack);
  124|  2.04k|    igraph_vector_int_clear(&dist);
  125|  2.04k|    igraph_vector_int_push_back(&stack, from); /* reserved enough for initial push */
  126|  2.04k|    igraph_vector_int_push_back(&dist, 0); /* reserved enough for initial push */
  127|  2.04k|    IGRAPH_BIT_SET(added, from);
  ------------------
  |  |  103|  2.04k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|  2.04k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|  2.04k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  2.04k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|  2.04k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  2.04k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  128|  2.05M|    while (!igraph_vector_int_empty(&stack)) {
  ------------------
  |  Branch (128:12): [True: 2.05M, False: 2.04k]
  ------------------
  129|  2.05M|        const igraph_int_t act = igraph_vector_int_tail(&stack);
  130|  2.05M|        const igraph_int_t curdist = igraph_vector_int_tail(&dist);
  131|       |
  132|  2.05M|        const igraph_vector_int_t *neis = igraph_lazy_adjlist_get(&adjlist, act);
  ------------------
  |  |  158|  2.05M|    (igraph_lazy_adjlist_has(al,no) ? ((al)->adjs[(igraph_int_t)(no)]) \
  |  |  ------------------
  |  |  |  |  133|  2.05M|#define igraph_lazy_adjlist_has(al,no) ((al)->adjs[(igraph_int_t)(no)] != NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (133:40): [True: 2.03M, False: 20.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  159|  2.05M|                                    : (igraph_i_lazy_adjlist_get_real(al, no)))
  ------------------
  133|  2.05M|        IGRAPH_CHECK_OOM(neis, "Failed to query neighbors.");
  ------------------
  |  |  709|  2.05M|    do { \
  |  |  710|  2.05M|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  2.05M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.05M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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.05M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 2.05M]
  |  |  ------------------
  ------------------
  134|       |
  135|  2.05M|        const igraph_int_t n = igraph_vector_int_size(neis);
  136|  2.05M|        igraph_int_t *ptr = igraph_vector_int_get_ptr(&nptr, act);
  137|  2.05M|        igraph_bool_t any;
  138|  2.05M|        igraph_bool_t within_dist;
  139|  2.05M|        igraph_int_t nei;
  140|       |
  141|  2.05M|        within_dist = (curdist < maxlen || maxlen < 0);
  ------------------
  |  Branch (141:24): [True: 1.22M, False: 823k]
  |  Branch (141:44): [True: 0, False: 823k]
  ------------------
  142|  2.05M|        if (within_dist) {
  ------------------
  |  Branch (142:13): [True: 1.22M, False: 823k]
  ------------------
  143|       |            /* Search for a neighbor that was not yet visited */
  144|  1.22M|            any = false;
  145|  2.75M|            while (!any && (*ptr) < n) {
  ------------------
  |  Branch (145:20): [True: 1.72M, False: 1.02M]
  |  Branch (145:28): [True: 1.52M, False: 203k]
  ------------------
  146|  1.52M|                nei = VECTOR(*neis)[(*ptr)];
  ------------------
  |  |   60|  1.52M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  147|  1.52M|                any = !IGRAPH_BIT_TEST(added, nei);
  ------------------
  |  |  142|  1.52M|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|  1.52M|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|  1.52M|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  1.52M|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|  1.52M|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  1.52M|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  148|  1.52M|                (*ptr) ++;
  149|  1.52M|            }
  150|  1.22M|        }
  151|  2.05M|        if (within_dist && any) {
  ------------------
  |  Branch (151:13): [True: 1.22M, False: 823k]
  |  Branch (151:28): [True: 1.02M, False: 203k]
  ------------------
  152|       |            /* There is such a neighbor, add it */
  153|  1.02M|            IGRAPH_CHECK(igraph_vector_int_push_back(&stack, nei));
  ------------------
  |  |  656|  1.02M|    do { \
  |  |  657|  1.02M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.02M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.02M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.02M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.02M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.02M]
  |  |  ------------------
  ------------------
  154|  1.02M|            IGRAPH_CHECK(igraph_vector_int_push_back(&dist, curdist + 1));
  ------------------
  |  |  656|  1.02M|    do { \
  |  |  657|  1.02M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.02M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.02M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.02M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.02M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.02M]
  |  |  ------------------
  ------------------
  155|  1.02M|            IGRAPH_BIT_SET(added, nei);
  ------------------
  |  |  103|  1.02M|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|  1.02M|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|  1.02M|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  1.02M|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|  1.02M|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  1.02M|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  156|       |            /* Add to results */
  157|  1.02M|            if (toall || IGRAPH_BIT_TEST(markto, nei)) {
  ------------------
  |  |  142|  1.02M|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|  1.02M|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|  1.02M|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  1.02M|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|  1.02M|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  1.02M|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (142:36): [True: 52.0k, False: 972k]
  |  |  ------------------
  ------------------
  |  Branch (157:17): [True: 0, False: 1.02M]
  ------------------
  158|  52.0k|                if (curdist + 1 >= minlen) {
  ------------------
  |  Branch (158:21): [True: 52.0k, False: 0]
  ------------------
  159|  52.0k|                    IGRAPH_CHECK(igraph_vector_int_list_push_back_copy(res, &stack));
  ------------------
  |  |  656|  52.0k|    do { \
  |  |  657|  52.0k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  52.0k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  52.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 52.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|  52.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 52.0k]
  |  |  ------------------
  ------------------
  160|  52.0k|                    if (max_results >= 0 && igraph_vector_int_list_size(res) == max_results) {
  ------------------
  |  Branch (160:25): [True: 0, False: 52.0k]
  |  Branch (160:45): [True: 0, False: 0]
  ------------------
  161|      0|                        break;
  162|      0|                    }
  163|  52.0k|                }
  164|  52.0k|            }
  165|  1.02M|        } else {
  166|       |            /* There is no such neighbor, finished with the subtree */
  167|  1.02M|            igraph_int_t up = igraph_vector_int_pop_back(&stack);
  168|  1.02M|            igraph_vector_int_pop_back(&dist);
  169|  1.02M|            IGRAPH_BIT_CLEAR(added, up);
  ------------------
  |  |  121|  1.02M|#define IGRAPH_BIT_CLEAR(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] &= ~IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|  1.02M|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_CLEAR(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] &= ~IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|  1.02M|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  1.02M|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_CLEAR(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] &= ~IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|  1.02M|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  1.02M|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  170|  1.02M|            VECTOR(nptr)[up] = 0;
  ------------------
  |  |   60|  1.02M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  171|  1.02M|        }
  172|       |
  173|  2.05M|        IGRAPH_ALLOW_INTERRUPTION_LIMITED(iter, 1 << 13);
  ------------------
  |  |   71|  2.05M|    do { \
  |  |   72|  2.05M|        if (++iter >= skips) { \
  |  |  ------------------
  |  |  |  Branch (72:13): [True: 208, False: 2.05M]
  |  |  ------------------
  |  |   73|    208|            IGRAPH_ALLOW_INTERRUPTION(); \
  |  |  ------------------
  |  |  |  |   46|    208|    do { \
  |  |  |  |   47|    208|        if (igraph_i_interruption_handler) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (47:13): [True: 0, False: 208]
  |  |  |  |  ------------------
  |  |  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |  |  |   50|      0|            } \
  |  |  |  |   51|      0|        } \
  |  |  |  |   52|    208|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:14): [Folded, False: 208]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   74|    208|            iter = 0; \
  |  |   75|    208|        } \
  |  |   76|  2.05M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (76:14): [Folded, False: 2.05M]
  |  |  ------------------
  ------------------
  174|  2.05M|    }
  175|       |
  176|  2.04k|    igraph_vector_int_destroy(&nptr);
  177|  2.04k|    igraph_lazy_adjlist_destroy(&adjlist);
  178|  2.04k|    igraph_vector_int_destroy(&dist);
  179|  2.04k|    igraph_vector_int_destroy(&stack);
  180|  2.04k|    igraph_bitset_destroy(&added);
  181|  2.04k|    IGRAPH_FINALLY_CLEAN(5);
  182|       |
  183|  2.04k|    if (!toall) {
  ------------------
  |  Branch (183:9): [True: 2.04k, False: 0]
  ------------------
  184|  2.04k|        igraph_bitset_destroy(&markto);
  185|  2.04k|        IGRAPH_FINALLY_CLEAN(1);
  186|  2.04k|    }
  187|       |
  188|  2.04k|    return IGRAPH_SUCCESS;
  189|  2.04k|}

igraph_ecc:
  361|  2.06k|                          igraph_bool_t offset, igraph_bool_t normalize) {
  362|       |
  363|  2.06k|    if (k < 3) {
  ------------------
  |  Branch (363:9): [True: 0, False: 2.06k]
  ------------------
  364|      0|        IGRAPH_ERRORF("Cycle size for edge clustering coefficient must be at least 3, got %" 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]
  |  |  ------------------
  ------------------
  365|      0|                      IGRAPH_EINVAL, k);
  366|      0|    }
  367|       |
  368|  2.06k|    switch (k) {
  369|  2.06k|    case 3:
  ------------------
  |  Branch (369:5): [True: 2.06k, False: 0]
  ------------------
  370|  2.06k|        if (igraph_es_is_all(&eids)) {
  ------------------
  |  Branch (370:13): [True: 2.06k, False: 0]
  ------------------
  371|  2.06k|            return igraph_i_ecc3_1(graph, res, eids, offset, normalize);
  372|  2.06k|        } else {
  373|      0|            return igraph_i_ecc3_2(graph, res, eids, offset, normalize);
  374|      0|        }
  375|      0|    case 4:
  ------------------
  |  Branch (375:5): [True: 0, False: 2.06k]
  ------------------
  376|      0|        if (igraph_es_is_all(&eids)) {
  ------------------
  |  Branch (376:13): [True: 0, False: 0]
  ------------------
  377|      0|            return igraph_i_ecc4_1(graph, res, eids, offset, normalize);
  378|      0|        } else {
  379|      0|            return igraph_i_ecc4_2(graph, res, eids, offset, normalize);
  380|      0|        }
  381|      0|    default:
  ------------------
  |  Branch (381:5): [True: 0, False: 2.06k]
  ------------------
  382|      0|        IGRAPH_ERROR("Edge clustering coefficient calculation is only implemented for cycle sizes 3 and 4.",
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  383|  2.06k|                     IGRAPH_UNIMPLEMENTED);
  384|  2.06k|    }
  385|  2.06k|}
ecc.c:igraph_i_ecc3_1:
   35|  2.06k|        igraph_bool_t offset, igraph_bool_t normalize) {
   36|       |
   37|  2.06k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
   38|  2.06k|    igraph_vector_int_t degree;
   39|  2.06k|    igraph_adjlist_t al;
   40|  2.06k|    igraph_eit_t eit;
   41|  2.06k|    const igraph_real_t c = offset ? 1.0 : 0.0;
  ------------------
  |  Branch (41:29): [True: 0, False: 2.06k]
  ------------------
   42|       |
   43|  2.06k|    IGRAPH_CHECK(igraph_adjlist_init(graph, &al, IGRAPH_ALL, IGRAPH_NO_LOOPS, IGRAPH_NO_MULTIPLE));
  ------------------
  |  |  656|  2.06k|    do { \
  |  |  657|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
   44|  2.06k|    IGRAPH_FINALLY(igraph_adjlist_destroy, &al);
  ------------------
  |  |  603|  2.06k|    do { \
  |  |  604|  2.06k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.06k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.06k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.06k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.06k]
  |  |  ------------------
  |  |  608|  2.06k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
   45|       |
   46|  2.06k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&degree, no_of_nodes);
  ------------------
  |  |  119|  2.06k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.06k|    do { \
  |  |  |  |  657|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.06k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.06k|    do { \
  |  |  |  |  604|  2.06k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.06k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.06k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.06k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.06k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
   47|  2.06k|    IGRAPH_CHECK(igraph_degree(graph, &degree, igraph_vss_all(), IGRAPH_ALL, IGRAPH_LOOPS));
  ------------------
  |  |  656|  2.06k|    do { \
  |  |  657|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
   48|       |
   49|  2.06k|    IGRAPH_CHECK(igraph_eit_create(graph, eids, &eit));
  ------------------
  |  |  656|  2.06k|    do { \
  |  |  657|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
   50|  2.06k|    IGRAPH_FINALLY(igraph_eit_destroy, &eit);
  ------------------
  |  |  603|  2.06k|    do { \
  |  |  604|  2.06k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.06k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.06k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.06k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.06k]
  |  |  ------------------
  |  |  608|  2.06k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
   51|       |
   52|  2.06k|    IGRAPH_CHECK(igraph_vector_resize(res, IGRAPH_EIT_SIZE(eit)));
  ------------------
  |  |  656|  2.06k|    do { \
  |  |  657|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
   53|       |
   54|  2.06k|    for (igraph_int_t i=0;
   55|  72.7k|         ! IGRAPH_EIT_END(eit);
  ------------------
  |  |  371|  72.7k|#define IGRAPH_EIT_END(eit)   ((eit).pos >= (eit).end)
  ------------------
  |  Branch (55:10): [True: 70.7k, False: 2.06k]
  ------------------
   56|  70.7k|         IGRAPH_EIT_NEXT(eit), i++) {
  ------------------
  |  |  359|  70.7k|#define IGRAPH_EIT_NEXT(eit) (++((eit).pos))
  ------------------
   57|       |
   58|  70.7k|        igraph_int_t edge = IGRAPH_EIT_GET(eit);
  ------------------
  |  |  405|  70.7k|    (igraph_int_t)((((eit).type == IGRAPH_EIT_RANGE) ? (eit).pos : \
  |  |  ------------------
  |  |  |  Branch (405:21): [True: 70.7k, False: 0]
  |  |  ------------------
  |  |  406|  70.7k|                        VECTOR(*(eit).vec)[(eit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
   59|  70.7k|        igraph_int_t v1 = IGRAPH_FROM(graph, edge), v2 = IGRAPH_TO(graph, edge);
  ------------------
  |  |  115|  70.7k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  70.7k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
                      igraph_int_t v1 = IGRAPH_FROM(graph, edge), v2 = IGRAPH_TO(graph, edge);
  ------------------
  |  |  128|  70.7k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  70.7k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
   60|       |
   61|  70.7k|        igraph_real_t z; /* number of triangles the edge participates in */
   62|  70.7k|        igraph_real_t s; /* max number of triangles the edge could be part of */
   63|       |
   64|  70.7k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|  70.7k|    do { \
  |  |   47|  70.7k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 70.7k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|  70.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 70.7k]
  |  |  ------------------
  ------------------
   65|       |
   66|  70.7k|        if (v1 == v2) {
  ------------------
  |  Branch (66:13): [True: 11.8k, False: 58.8k]
  ------------------
   67|       |            /* A self-loop isn't, and cannot be part of any triangles. */
   68|  11.8k|            z = 0.0;
   69|  11.8k|            s = 0.0;
   70|  58.8k|        } else {
   71|  58.8k|            const igraph_vector_int_t *a1 = igraph_adjlist_get(&al, v1), *a2 = igraph_adjlist_get(&al, v2);
  ------------------
  |  |   73|  58.8k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
                          const igraph_vector_int_t *a1 = igraph_adjlist_get(&al, v1), *a2 = igraph_adjlist_get(&al, v2);
  ------------------
  |  |   73|  58.8k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
   72|  58.8k|            igraph_int_t d1 = VECTOR(degree)[v1], d2 = VECTOR(degree)[v2];
  ------------------
  |  |   60|  58.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          igraph_int_t d1 = VECTOR(degree)[v1], d2 = VECTOR(degree)[v2];
  ------------------
  |  |   60|  58.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   73|       |
   74|  58.8k|            z = igraph_vector_int_intersection_size_sorted(a1, a2);
   75|  58.8k|            s = (d1 < d2 ? d1 : d2) - 1.0;
  ------------------
  |  Branch (75:18): [True: 17.5k, False: 41.2k]
  ------------------
   76|  58.8k|        }
   77|       |
   78|  70.7k|        VECTOR(*res)[i] = z + c;
  ------------------
  |  |   60|  70.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   79|  70.7k|        if (normalize) VECTOR(*res)[i] /= s;
  ------------------
  |  |   60|  70.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (79:13): [True: 70.7k, False: 0]
  ------------------
   80|  70.7k|    }
   81|       |
   82|  2.06k|    igraph_eit_destroy(&eit);
   83|  2.06k|    igraph_vector_int_destroy(&degree);
   84|  2.06k|    igraph_adjlist_destroy(&al);
   85|  2.06k|    IGRAPH_FINALLY_CLEAN(3);
   86|       |
   87|  2.06k|    return IGRAPH_SUCCESS;
   88|  2.06k|}

igraph_i_trans4_al_simplify:
  286|  2.06k|                                const igraph_vector_int_t *rank) {
  287|  2.06k|    igraph_int_t i;
  288|  2.06k|    igraph_int_t n = al->length;
  289|  2.06k|    igraph_vector_int_t mark;
  290|       |
  291|  2.06k|    IGRAPH_CHECK(igraph_vector_int_init(&mark, n));
  ------------------
  |  |  656|  2.06k|    do { \
  |  |  657|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  292|  2.06k|    IGRAPH_FINALLY(igraph_vector_int_destroy, &mark);
  ------------------
  |  |  603|  2.06k|    do { \
  |  |  604|  2.06k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.06k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.06k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.06k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.06k]
  |  |  ------------------
  |  |  608|  2.06k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  293|       |
  294|   403k|    for (i = 0; i < n; i++) {
  ------------------
  |  Branch (294:17): [True: 401k, False: 2.06k]
  ------------------
  295|   401k|        igraph_vector_int_t *v = &al->adjs[i];
  296|   401k|        igraph_int_t j, l = igraph_vector_int_size(v);
  297|   401k|        igraph_int_t irank = VECTOR(*rank)[i];
  ------------------
  |  |   60|   401k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  298|   401k|        VECTOR(mark)[i] = i + 1;
  ------------------
  |  |   60|   401k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  299|   490k|        for (j = 0; j < l; /* nothing */) {
  ------------------
  |  Branch (299:21): [True: 89.0k, False: 401k]
  ------------------
  300|  89.0k|            igraph_int_t e = VECTOR(*v)[j];
  ------------------
  |  |   60|  89.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  301|  89.0k|            if (VECTOR(*rank)[e] > irank && VECTOR(mark)[e] != i + 1) {
  ------------------
  |  |   60|  89.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          if (VECTOR(*rank)[e] > irank && VECTOR(mark)[e] != i + 1) {
  ------------------
  |  |   60|  44.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (301:17): [True: 44.5k, False: 44.5k]
  |  Branch (301:45): [True: 44.5k, False: 0]
  ------------------
  302|  44.5k|                VECTOR(mark)[e] = i + 1;
  ------------------
  |  |   60|  44.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  303|  44.5k|                j++;
  304|  44.5k|            } else {
  305|  44.5k|                VECTOR(*v)[j] = igraph_vector_int_tail(v);
  ------------------
  |  |   60|  44.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  306|  44.5k|                igraph_vector_int_pop_back(v);
  307|  44.5k|                l--;
  308|  44.5k|            }
  309|  89.0k|        }
  310|   401k|    }
  311|       |
  312|  2.06k|    igraph_vector_int_destroy(&mark);
  313|  2.06k|    IGRAPH_FINALLY_CLEAN(1);
  314|       |
  315|  2.06k|    return IGRAPH_SUCCESS;
  316|  2.06k|}
igraph_count_triangles:
  501|  2.06k|igraph_error_t igraph_count_triangles(const igraph_t *graph, igraph_real_t *res) {
  502|       |    return count_triangles_and_triples(graph, res, NULL);
  503|  2.06k|}
igraph_list_triangles:
  563|  2.06k|                          igraph_vector_int_t *res) {
  564|  2.06k|# define TRIANGLES
  565|  2.06k|# include "properties/triangles_template.h"
  ------------------
  |  |    1|       |/*
  |  |    2|       |   igraph library.
  |  |    3|       |   Copyright (C) 2005-2012  Gabor Csardi <csardi.gabor@gmail.com>
  |  |    4|       |   334 Harvard street, Cambridge, MA 02139 USA
  |  |    5|       |
  |  |    6|       |   This program is free software; you can redistribute it and/or modify
  |  |    7|       |   it under the terms of the GNU General Public License as published by
  |  |    8|       |   the Free Software Foundation; either version 2 of the License, or
  |  |    9|       |   (at your option) any later version.
  |  |   10|       |
  |  |   11|       |   This program is distributed in the hope that it will be useful,
  |  |   12|       |   but WITHOUT ANY WARRANTY; without even the implied warranty of
  |  |   13|       |   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  |  |   14|       |   GNU General Public License for more details.
  |  |   15|       |
  |  |   16|       |   You should have received a copy of the GNU General Public License
  |  |   17|       |   along with this program; if not, write to the Free Software
  |  |   18|       |   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  |  |   19|       |   02110-1301 USA
  |  |   20|       |
  |  |   21|       |*/
  |  |   22|       |
  |  |   23|       |#ifdef TRANSIT
  |  |   24|       |#define TRANSIT_TRIEDGES
  |  |   25|       |#endif
  |  |   26|       |
  |  |   27|  2.06k|igraph_int_t no_of_nodes = igraph_vcount(graph);
  |  |   28|  2.06k|igraph_int_t node, i, j, nn;
  |  |   29|  2.06k|igraph_adjlist_t allneis;
  |  |   30|  2.06k|igraph_vector_int_t *neis1, *neis2;
  |  |   31|  2.06k|igraph_int_t neilen1, neilen2;
  |  |   32|  2.06k|igraph_int_t *neis;
  |  |   33|  2.06k|igraph_int_t maxdegree;
  |  |   34|       |
  |  |   35|       |#ifdef TRANSIT_TRIEDGES
  |  |   36|       |igraph_int_t deg1;
  |  |   37|       |#endif
  |  |   38|       |
  |  |   39|  2.06k|igraph_vector_int_t order;
  |  |   40|  2.06k|igraph_vector_int_t rank;
  |  |   41|  2.06k|igraph_vector_int_t degree;
  |  |   42|       |
  |  |   43|  2.06k|if (no_of_nodes == 0) {
  |  |  ------------------
  |  |  |  Branch (43:5): [True: 1, False: 2.06k]
  |  |  ------------------
  |  |   44|       |#ifndef TRIANGLES
  |  |   45|       |    igraph_vector_clear(res);
  |  |   46|       |#else
  |  |   47|      1|    igraph_vector_int_clear(res);
  |  |   48|      1|#endif
  |  |   49|      1|    return IGRAPH_SUCCESS;
  |  |   50|      1|}
  |  |   51|       |
  |  |   52|  2.06k|IGRAPH_VECTOR_INT_INIT_FINALLY(&order, no_of_nodes);
  |  |  ------------------
  |  |  |  |  119|  2.06k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  656|  2.06k|    do { \
  |  |  |  |  |  |  657|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  660|      0|        } \
  |  |  |  |  |  |  661|  2.06k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  120|  2.06k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  603|  2.06k|    do { \
  |  |  |  |  |  |  604|  2.06k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  |  |  605|  2.06k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  |  |  606|  2.06k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  |  |  607|  2.06k|        if (0) { func(ptr); } \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (607:13): [Folded, False: 2.06k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  608|  2.06k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  |  |  609|  2.06k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (609:14): [Folded, False: 2.06k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (120:64): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   53|  2.06k|IGRAPH_VECTOR_INT_INIT_FINALLY(&degree, no_of_nodes);
  |  |  ------------------
  |  |  |  |  119|  2.06k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  656|  2.06k|    do { \
  |  |  |  |  |  |  657|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  660|      0|        } \
  |  |  |  |  |  |  661|  2.06k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  120|  2.06k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  603|  2.06k|    do { \
  |  |  |  |  |  |  604|  2.06k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  |  |  605|  2.06k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  |  |  606|  2.06k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  |  |  607|  2.06k|        if (0) { func(ptr); } \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (607:13): [Folded, False: 2.06k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  608|  2.06k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  |  |  609|  2.06k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (609:14): [Folded, False: 2.06k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (120:64): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   54|       |
  |  |   55|  2.06k|IGRAPH_CHECK(igraph_adjlist_init(graph, &allneis, IGRAPH_ALL, IGRAPH_NO_LOOPS, IGRAPH_NO_MULTIPLE));
  |  |  ------------------
  |  |  |  |  656|  2.06k|    do { \
  |  |  |  |  657|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|  2.06k|IGRAPH_FINALLY(igraph_adjlist_destroy, &allneis);
  |  |  ------------------
  |  |  |  |  603|  2.06k|    do { \
  |  |  |  |  604|  2.06k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.06k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.06k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.06k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.06k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   57|       |
  |  |   58|   403k|for (i = 0; i < no_of_nodes; i++) {
  |  |  ------------------
  |  |  |  Branch (58:13): [True: 401k, False: 2.06k]
  |  |  ------------------
  |  |   59|   401k|    VECTOR(degree)[i] = igraph_vector_int_size(igraph_adjlist_get(&allneis, i));
  |  |  ------------------
  |  |  |  |   60|   401k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |                   VECTOR(degree)[i] = igraph_vector_int_size(igraph_adjlist_get(&allneis, i));
  |  |  ------------------
  |  |  |  |   73|   401k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  |  |  ------------------
  |  |   60|   401k|}
  |  |   61|       |
  |  |   62|  2.06k|maxdegree = igraph_vector_int_max(&degree) + 1;
  |  |   63|  2.06k|IGRAPH_CHECK(igraph_i_vector_int_order(&degree, &order, maxdegree));
  |  |  ------------------
  |  |  |  |  656|  2.06k|    do { \
  |  |  |  |  657|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   64|  2.06k|IGRAPH_VECTOR_INT_INIT_FINALLY(&rank, no_of_nodes);
  |  |  ------------------
  |  |  |  |  119|  2.06k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  656|  2.06k|    do { \
  |  |  |  |  |  |  657|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  660|      0|        } \
  |  |  |  |  |  |  661|  2.06k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  120|  2.06k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  603|  2.06k|    do { \
  |  |  |  |  |  |  604|  2.06k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  |  |  605|  2.06k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  |  |  606|  2.06k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  |  |  607|  2.06k|        if (0) { func(ptr); } \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (607:13): [Folded, False: 2.06k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  608|  2.06k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  |  |  609|  2.06k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (609:14): [Folded, False: 2.06k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (120:64): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   65|   403k|for (i = 0; i < no_of_nodes; i++) {
  |  |  ------------------
  |  |  |  Branch (65:13): [True: 401k, False: 2.06k]
  |  |  ------------------
  |  |   66|   401k|    VECTOR(rank)[ VECTOR(order)[i] ] = no_of_nodes - i - 1;
  |  |  ------------------
  |  |  |  |   60|   401k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |                   VECTOR(rank)[ VECTOR(order)[i] ] = no_of_nodes - i - 1;
  |  |  ------------------
  |  |  |  |   60|   401k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |   67|   401k|}
  |  |   68|       |
  |  |   69|  2.06k|IGRAPH_CHECK(igraph_i_trans4_al_simplify(&allneis, &rank));
  |  |  ------------------
  |  |  |  |  656|  2.06k|    do { \
  |  |  |  |  657|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   70|       |
  |  |   71|  2.06k|neis = IGRAPH_CALLOC(no_of_nodes, igraph_int_t);
  |  |  ------------------
  |  |  |  |   33|  2.06k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  4.12k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (31:12): [True: 2.06k, False: 0]
  |  |  |  |  |  |  |  Branch (31:24): [True: 2.06k, False: 0]
  |  |  |  |  |  |  |  Branch (31:66): [True: 2.06k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   72|  2.06k|IGRAPH_CHECK_OOM(neis, "Insufficient memory to count triangles.");
  |  |  ------------------
  |  |  |  |  709|  2.06k|    do { \
  |  |  |  |  710|  2.06k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  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.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (713:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   73|  2.06k|IGRAPH_FINALLY(igraph_free, neis);
  |  |  ------------------
  |  |  |  |  603|  2.06k|    do { \
  |  |  |  |  604|  2.06k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.06k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.06k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.06k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.06k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   74|       |
  |  |   75|       |#ifndef TRIANGLES
  |  |   76|       |    IGRAPH_CHECK(igraph_vector_resize(res, no_of_nodes));
  |  |   77|       |    igraph_vector_null(res);
  |  |   78|       |#else
  |  |   79|  2.06k|    igraph_vector_int_clear(res);
  |  |   80|  2.06k|#endif
  |  |   81|       |
  |  |   82|   403k|for (nn = no_of_nodes - 1; nn >= 0; nn--) {
  |  |  ------------------
  |  |  |  Branch (82:28): [True: 401k, False: 2.06k]
  |  |  ------------------
  |  |   83|   401k|    node = VECTOR(order)[nn];
  |  |  ------------------
  |  |  |  |   60|   401k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |   84|       |
  |  |   85|   401k|    IGRAPH_ALLOW_INTERRUPTION();
  |  |  ------------------
  |  |  |  |   46|   401k|    do { \
  |  |  |  |   47|   401k|        if (igraph_i_interruption_handler) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (47:13): [True: 0, False: 401k]
  |  |  |  |  ------------------
  |  |  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |  |  |   50|      0|            } \
  |  |  |  |   51|      0|        } \
  |  |  |  |   52|   401k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:14): [Folded, False: 401k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   86|       |
  |  |   87|   401k|    neis1 = igraph_adjlist_get(&allneis, node);
  |  |  ------------------
  |  |  |  |   73|   401k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  |  |  ------------------
  |  |   88|   401k|    neilen1 = igraph_vector_int_size(neis1);
  |  |   89|       |
  |  |   90|       |#ifdef TRANSIT_TRIEDGES
  |  |   91|       |    deg1 = VECTOR(degree)[node];
  |  |   92|       |#endif
  |  |   93|       |
  |  |   94|       |    /* Mark the neighbors of the node */
  |  |   95|   445k|    for (i = 0; i < neilen1; i++) {
  |  |  ------------------
  |  |  |  Branch (95:17): [True: 44.5k, False: 401k]
  |  |  ------------------
  |  |   96|  44.5k|        neis[ VECTOR(*neis1)[i] ] = node + 1;
  |  |  ------------------
  |  |  |  |   60|  44.5k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |   97|  44.5k|    }
  |  |   98|       |
  |  |   99|   445k|    for (i = 0; i < neilen1; i++) {
  |  |  ------------------
  |  |  |  Branch (99:17): [True: 44.5k, False: 401k]
  |  |  ------------------
  |  |  100|  44.5k|        igraph_int_t nei = VECTOR(*neis1)[i];
  |  |  ------------------
  |  |  |  |   60|  44.5k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  101|  44.5k|        neis2 = igraph_adjlist_get(&allneis, nei);
  |  |  ------------------
  |  |  |  |   73|  44.5k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  |  |  ------------------
  |  |  102|  44.5k|        neilen2 = igraph_vector_int_size(neis2);
  |  |  103|  67.5k|        for (j = 0; j < neilen2; j++) {
  |  |  ------------------
  |  |  |  Branch (103:21): [True: 22.9k, False: 44.5k]
  |  |  ------------------
  |  |  104|  22.9k|            igraph_int_t nei2 = VECTOR(*neis2)[j];
  |  |  ------------------
  |  |  |  |   60|  22.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  105|  22.9k|            if (neis[nei2] == node + 1) {
  |  |  ------------------
  |  |  |  Branch (105:17): [True: 6.00k, False: 16.9k]
  |  |  ------------------
  |  |  106|       |#ifndef TRIANGLES
  |  |  107|       |                VECTOR(*res)[nei2] += 1;
  |  |  108|       |                VECTOR(*res)[nei] += 1;
  |  |  109|       |                VECTOR(*res)[node] += 1;
  |  |  110|       |#else
  |  |  111|  6.00k|                IGRAPH_CHECK(igraph_vector_int_push_back(res, node));
  |  |  ------------------
  |  |  |  |  656|  6.00k|    do { \
  |  |  |  |  657|  6.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  6.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  6.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 6.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  6.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 6.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  112|  6.00k|                IGRAPH_CHECK(igraph_vector_int_push_back(res, nei));
  |  |  ------------------
  |  |  |  |  656|  6.00k|    do { \
  |  |  |  |  657|  6.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  6.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  6.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 6.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  6.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 6.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  113|  6.00k|                IGRAPH_CHECK(igraph_vector_int_push_back(res, nei2));
  |  |  ------------------
  |  |  |  |  656|  6.00k|    do { \
  |  |  |  |  657|  6.00k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  6.00k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  6.00k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 6.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  6.00k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 6.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  114|  6.00k|#endif
  |  |  115|  6.00k|            }
  |  |  116|  22.9k|        }
  |  |  117|  44.5k|    }
  |  |  118|       |
  |  |  119|       |#ifdef TRANSIT
  |  |  120|       |    if (mode == IGRAPH_TRANSITIVITY_ZERO && deg1 < 2) {
  |  |  121|       |        VECTOR(*res)[node] = 0.0;
  |  |  122|       |    } else {
  |  |  123|       |        VECTOR(*res)[node] = VECTOR(*res)[node] / deg1 / (deg1 - 1) * 2.0;
  |  |  124|       |    }
  |  |  125|       |#endif
  |  |  126|   401k|}
  |  |  127|       |
  |  |  128|  2.06k|igraph_free(neis);
  |  |  129|  2.06k|igraph_adjlist_destroy(&allneis);
  |  |  130|  2.06k|igraph_vector_int_destroy(&rank);
  |  |  131|  2.06k|igraph_vector_int_destroy(&degree);
  |  |  132|  2.06k|igraph_vector_int_destroy(&order);
  |  |  133|  2.06k|IGRAPH_FINALLY_CLEAN(5);
  |  |  134|       |
  |  |  135|       |#ifdef TRANSIT_TRIEDGES
  |  |  136|       |#undef TRANSIT_TRIEDGES
  |  |  137|       |#endif
  ------------------
  566|  2.06k|# undef TRIANGLES
  567|  2.06k|    return IGRAPH_SUCCESS;
  568|  16.4k|}
igraph_is_triangle_free:
  944|  2.06k|igraph_error_t igraph_is_triangle_free(const igraph_t *graph, igraph_bool_t *res) {
  945|  2.06k|    const igraph_int_t vcount = igraph_vcount(graph);
  946|  2.06k|    const igraph_int_t ecount = igraph_ecount(graph);
  947|       |
  948|       |    /* Can't have triangles without at least 3 vertices and at least 3 edges. */
  949|  2.06k|    if (vcount < 3 || ecount < 3) {
  ------------------
  |  Branch (949:9): [True: 50, False: 2.01k]
  |  Branch (949:23): [True: 283, False: 1.72k]
  ------------------
  950|    333|        *res = true;
  951|    333|        return IGRAPH_SUCCESS;
  952|    333|    }
  953|       |
  954|       |    /* Attempt using Mantel's theorem:
  955|       |     *
  956|       |     * If ecount > vcount^2 / 4, the graph has a triangle.
  957|       |     *
  958|       |     * This calculation needs to be made with care to avoid integer overflow
  959|       |     * or false positives due to rounding errors. Note that in igraph, 2*ecount
  960|       |     * never overflows.
  961|       |     *
  962|       |     * However, Mantel's condition is valid only for simple graphs. If it holds,
  963|       |     * we will check if the graph is already known to be simple from the property
  964|       |     * cache.
  965|       |     *
  966|       |     * If the graph is not known to be simple from the cache, it is not worth
  967|       |     * calling igraph_is_simple(). When Mantel's condition holds, the graph is
  968|       |     * so dense that starting to look for triangles directly is likely to
  969|       |     * short-circuit quickly.
  970|       |     */
  971|  1.72k|    if (IGRAPH_INTEGER_MAX / vcount >= vcount/2 && /* avoid overflow */
  ------------------
  |  |   72|  1.72k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (971:9): [True: 1.72k, False: 0]
  ------------------
  972|  1.72k|        2*ecount > (vcount / 2) * vcount /* Mantel */) {
  ------------------
  |  Branch (972:9): [True: 84, False: 1.64k]
  ------------------
  973|     84|        igraph_bool_t known_simple = true;
  974|       |
  975|     84|        if (! igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_LOOP)) {
  ------------------
  |  Branch (975:13): [True: 0, False: 84]
  ------------------
  976|      0|            known_simple = false;
  977|      0|        }
  978|       |
  979|     84|        if (known_simple && igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_HAS_LOOP)) {
  ------------------
  |  Branch (979:13): [True: 84, False: 0]
  |  Branch (979:29): [True: 41, False: 43]
  ------------------
  980|     41|            known_simple = false;
  981|     41|        }
  982|       |
  983|     84|        if (known_simple && ! igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_MULTI)) {
  ------------------
  |  Branch (983:13): [True: 43, False: 41]
  |  Branch (983:29): [True: 37, False: 6]
  ------------------
  984|     37|            known_simple = false;
  985|     37|        }
  986|       |
  987|     84|        if (known_simple && igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_HAS_MULTI)) {
  ------------------
  |  Branch (987:13): [True: 6, False: 78]
  |  Branch (987:29): [True: 0, False: 6]
  ------------------
  988|      0|            known_simple = false;
  989|      0|        }
  990|       |
  991|       |        /* Edge directions are ignored, thus for directed graphs we must also check that
  992|       |         * there are no mutual edges. */
  993|     84|        if (igraph_is_directed(graph)) {
  ------------------
  |  Branch (993:13): [True: 84, False: 0]
  ------------------
  994|     84|            if (known_simple && ! igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_MUTUAL)) {
  ------------------
  |  Branch (994:17): [True: 6, False: 78]
  |  Branch (994:33): [True: 6, False: 0]
  ------------------
  995|      6|                known_simple = false;
  996|      6|            }
  997|       |
  998|     84|            if (known_simple && igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_HAS_MUTUAL)) {
  ------------------
  |  Branch (998:17): [True: 0, False: 84]
  |  Branch (998:33): [True: 0, False: 0]
  ------------------
  999|      0|                known_simple = false;
 1000|      0|            }
 1001|     84|        }
 1002|       |
 1003|     84|        if (known_simple) {
  ------------------
  |  Branch (1003:13): [True: 0, False: 84]
  ------------------
 1004|      0|            *res = false;
 1005|      0|            return IGRAPH_SUCCESS;
 1006|      0|        }
 1007|     84|    }
 1008|       |
 1009|       |    /* Acyclic graphs are triangle-free. Check if the graph is known to be acyclic. */
 1010|  1.72k|    if (igraph_i_property_cache_has(graph, IGRAPH_PROP_IS_FOREST) &&
  ------------------
  |  Branch (1010:9): [True: 0, False: 1.72k]
  ------------------
 1011|      0|        igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_IS_FOREST))
  ------------------
  |  Branch (1011:9): [True: 0, False: 0]
  ------------------
 1012|      0|    {
 1013|      0|        *res = true;
 1014|      0|        return IGRAPH_SUCCESS;
 1015|      0|    }
 1016|       |
 1017|       |    /* Look for triangles directly, working with the adjacency list of the
 1018|       |     * underlying simple graph. */
 1019|       |
 1020|  1.72k|    igraph_lazy_adjlist_t al;
 1021|       |
 1022|  1.72k|    IGRAPH_CHECK(igraph_lazy_adjlist_init(graph, &al, IGRAPH_ALL, IGRAPH_NO_LOOPS, IGRAPH_NO_MULTIPLE));
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
 1023|  1.72k|    IGRAPH_FINALLY(igraph_lazy_adjlist_destroy, &al);
  ------------------
  |  |  603|  1.72k|    do { \
  |  |  604|  1.72k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  1.72k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  1.72k|         * incorrect destructor function with the pointer */ \
  |  |  607|  1.72k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 1.72k]
  |  |  ------------------
  |  |  608|  1.72k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  1.72k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 1.72k]
  |  |  ------------------
  ------------------
 1024|       |
 1025|   225k|    for (igraph_int_t u=0; u < vcount; u++) {
  ------------------
  |  Branch (1025:28): [True: 224k, False: 1.09k]
  ------------------
 1026|   224k|        igraph_vector_int_t *uneis;
 1027|   224k|        igraph_int_t du;
 1028|       |
 1029|   224k|        uneis = igraph_lazy_adjlist_get(&al, u);
  ------------------
  |  |  158|   224k|    (igraph_lazy_adjlist_has(al,no) ? ((al)->adjs[(igraph_int_t)(no)]) \
  |  |  ------------------
  |  |  |  |  133|   224k|#define igraph_lazy_adjlist_has(al,no) ((al)->adjs[(igraph_int_t)(no)] != NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (133:40): [True: 15.3k, False: 208k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  159|   224k|                                    : (igraph_i_lazy_adjlist_get_real(al, no)))
  ------------------
 1030|   224k|        IGRAPH_CHECK_OOM(uneis, "Insufficient memory for checking for triangles.");
  ------------------
  |  |  709|   224k|    do { \
  |  |  710|   224k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|   224k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 224k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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|   224k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 224k]
  |  |  ------------------
  ------------------
 1031|       |
 1032|   224k|        du = igraph_vector_int_size(uneis);
 1033|       |
 1034|   224k|        if (du < 2) continue;
  ------------------
  |  Branch (1034:13): [True: 208k, False: 15.3k]
  ------------------
 1035|       |
 1036|  55.0k|        for (igraph_int_t i = 0; i < du; i++) {
  ------------------
  |  Branch (1036:34): [True: 40.3k, False: 14.7k]
  ------------------
 1037|  40.3k|            igraph_vector_int_t *vneis;
 1038|  40.3k|            igraph_int_t dv;
 1039|  40.3k|            igraph_int_t v = VECTOR(*uneis)[i];
  ------------------
  |  |   60|  40.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1040|       |
 1041|       |            /* Avoid duplicate checks for the u-v edge. */
 1042|  40.3k|            if (v < u) continue;
  ------------------
  |  Branch (1042:17): [True: 17.7k, False: 22.6k]
  ------------------
 1043|       |
 1044|  22.6k|            vneis = igraph_lazy_adjlist_get(&al, v);
  ------------------
  |  |  158|  22.6k|    (igraph_lazy_adjlist_has(al,no) ? ((al)->adjs[(igraph_int_t)(no)]) \
  |  |  ------------------
  |  |  |  |  133|  22.6k|#define igraph_lazy_adjlist_has(al,no) ((al)->adjs[(igraph_int_t)(no)] != NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (133:40): [True: 5.45k, False: 17.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  159|  22.6k|                                    : (igraph_i_lazy_adjlist_get_real(al, no)))
  ------------------
 1045|  22.6k|            IGRAPH_CHECK_OOM(vneis, "Insufficient memory for checking for triangles.");
  ------------------
  |  |  709|  22.6k|    do { \
  |  |  710|  22.6k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  22.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 22.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|  22.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 22.6k]
  |  |  ------------------
  ------------------
 1046|       |
 1047|  22.6k|            dv = igraph_vector_int_size(vneis);
 1048|       |
 1049|  22.6k|            if (dv < 2) continue;
  ------------------
  |  Branch (1049:17): [True: 6.15k, False: 16.4k]
  ------------------
 1050|       |
 1051|       |            /* In a simple triangle-free graph, the degree sum of an edge's
 1052|       |             * endpoints is no greater than the vertex count. If it is, their
 1053|       |             * neighbor sets must intersect. */
 1054|  16.4k|            if (du + dv > vcount) {
  ------------------
  |  Branch (1054:17): [True: 26, False: 16.4k]
  ------------------
 1055|     26|                *res = false;
 1056|     26|                goto cleanup;
 1057|     26|            }
 1058|       |
 1059|       |            /* Exploit that the neighbor lists are sorted and check for an
 1060|       |             * intersection. */
 1061|  16.4k|            {
 1062|  16.4k|                igraph_int_t ju = 0, jv = 0;
 1063|  96.5k|                while (ju < du && jv < dv) {
  ------------------
  |  Branch (1063:24): [True: 91.7k, False: 4.78k]
  |  Branch (1063:35): [True: 80.7k, False: 11.0k]
  ------------------
 1064|  80.7k|                    igraph_int_t wu = VECTOR(*uneis)[ju];
  ------------------
  |  |   60|  80.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1065|  80.7k|                    igraph_int_t wv = VECTOR(*vneis)[jv];
  ------------------
  |  |   60|  80.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1066|       |
 1067|  80.7k|                    if (wu == wv) {
  ------------------
  |  Branch (1067:25): [True: 606, False: 80.1k]
  ------------------
 1068|    606|                        *res = false;
 1069|    606|                        goto cleanup;
 1070|  80.1k|                    } else if (wu < wv) {
  ------------------
  |  Branch (1070:32): [True: 24.0k, False: 56.1k]
  ------------------
 1071|  24.0k|                        ju++;
 1072|  56.1k|                    } else /* wv < wu */ {
 1073|  56.1k|                        jv++;
 1074|  56.1k|                    }
 1075|  80.7k|                }
 1076|  16.4k|            }
 1077|  16.4k|        }
 1078|  15.3k|    }
 1079|       |
 1080|  1.09k|    *res = true;
 1081|       |
 1082|  1.72k|cleanup:
 1083|       |
 1084|  1.72k|    igraph_lazy_adjlist_destroy(&al);
 1085|  1.72k|    IGRAPH_FINALLY_CLEAN(1);
 1086|       |
 1087|       |    /* Opportunity to set cache: If triangles exist, the graph is not acyclic. */
 1088|  1.72k|    if (! *res) {
  ------------------
  |  Branch (1088:9): [True: 632, False: 1.09k]
  ------------------
 1089|    632|        igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_IS_FOREST, false);
 1090|    632|    }
 1091|       |
 1092|  1.72k|    return IGRAPH_SUCCESS;
 1093|  1.09k|}
triangles.c:count_triangles_and_triples:
  407|  2.06k|{
  408|  2.06k|    const igraph_int_t vcount = igraph_vcount(graph);
  409|  2.06k|    igraph_vector_int_t mark;
  410|  2.06k|    igraph_adjlist_t al;
  411|       |
  412|  2.06k|    IGRAPH_CHECK(igraph_adjlist_init(graph, &al, IGRAPH_ALL, IGRAPH_NO_LOOPS, IGRAPH_NO_MULTIPLE));
  ------------------
  |  |  656|  2.06k|    do { \
  |  |  657|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  413|  2.06k|    IGRAPH_FINALLY(igraph_adjlist_destroy, &al);
  ------------------
  |  |  603|  2.06k|    do { \
  |  |  604|  2.06k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.06k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.06k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.06k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.06k]
  |  |  ------------------
  |  |  608|  2.06k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  414|       |
  415|  2.06k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&mark, vcount);
  ------------------
  |  |  119|  2.06k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.06k|    do { \
  |  |  |  |  657|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.06k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.06k|    do { \
  |  |  |  |  604|  2.06k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.06k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.06k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.06k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.06k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.06k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  416|       |
  417|  2.06k|    *triangles = 0;
  418|  2.06k|    if (connected_triples) *connected_triples = 0;
  ------------------
  |  Branch (418:9): [True: 0, False: 2.06k]
  ------------------
  419|       |
  420|       |    /* In a simple graph we could loop through all edges and count how many common
  421|       |     * neighbours their endpoints have. However, we only need to consider each
  422|       |     * connected vertex pair once, even if there are multiple edges between them.
  423|       |     * The nested for loop below uses an adjlist that already has multi-edges and
  424|       |     * self-loops filtered, and solves this problem.
  425|       |     *
  426|       |     * Performance trick:
  427|       |     *
  428|       |     * We only consider connected u-v pairs when v < u to avoid triple-counting
  429|       |     * and speed up the procedure. This effectively orients an undirected graph
  430|       |     * as directed acyclic. In an arbitrary orientation, an originally undirected
  431|       |     * triangle may appear as one of these two directed patterns:
  432|       |     *  - A -> B -> C -> A. This is NOT acyclic, so we don't encounter it.
  433|       |     *  - A -> B -> C, A -> C. This is the only one we need to count.
  434|       |     * This is implemented through the `if (v >= u) break;` lines below.
  435|       |     *
  436|       |     * Some other functions achieve the same via igraph_i_trans4_al_simplify().
  437|       |     */
  438|   403k|    for (igraph_int_t v1 = 0; v1 < vcount; v1++) {
  ------------------
  |  Branch (438:31): [True: 401k, False: 2.06k]
  ------------------
  439|   401k|        const igraph_vector_int_t *nei1 = igraph_adjlist_get(&al, v1);
  ------------------
  |  |   73|   401k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  440|   401k|        const igraph_int_t d1 = igraph_vector_int_size(nei1);
  441|   401k|        if (d1 > 1) {
  ------------------
  |  Branch (441:13): [True: 24.6k, False: 376k]
  ------------------
  442|  24.6k|            if (connected_triples) {
  ------------------
  |  Branch (442:17): [True: 0, False: 24.6k]
  ------------------
  443|      0|                *connected_triples += (igraph_real_t) d1 * (d1 - 1.0) / 2.0;
  444|      0|            }
  445|       |
  446|  59.4k|            for (igraph_int_t i=0; i < d1; i++) {
  ------------------
  |  Branch (446:36): [True: 52.3k, False: 7.14k]
  ------------------
  447|  52.3k|                const igraph_int_t v2 = VECTOR(*nei1)[i];
  ------------------
  |  |   60|  52.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  448|  52.3k|                if (v2 >= v1) break;
  ------------------
  |  Branch (448:21): [True: 17.5k, False: 34.8k]
  ------------------
  449|       |
  450|  34.8k|                VECTOR(mark)[v2] = v1+1;
  ------------------
  |  |   60|  34.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  451|  34.8k|            }
  452|  59.4k|            for (igraph_int_t i=0; i < d1; i++) {
  ------------------
  |  Branch (452:36): [True: 52.3k, False: 7.14k]
  ------------------
  453|  52.3k|                const igraph_int_t v2 = VECTOR(*nei1)[i];
  ------------------
  |  |   60|  52.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  454|  52.3k|                if (v2 >= v1) break;
  ------------------
  |  Branch (454:21): [True: 17.5k, False: 34.8k]
  ------------------
  455|       |
  456|  34.8k|                const igraph_vector_int_t *nei2 = igraph_adjlist_get(&al, v2);
  ------------------
  |  |   73|  34.8k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  457|  34.8k|                const igraph_int_t d2 = igraph_vector_int_size(nei2);
  458|  59.3k|                for (igraph_int_t j=0; j < d2; j++) {
  ------------------
  |  Branch (458:40): [True: 59.3k, False: 0]
  ------------------
  459|  59.3k|                    const igraph_int_t v3 = VECTOR(*nei2)[j];
  ------------------
  |  |   60|  59.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  460|  59.3k|                    if (v3 >= v2) break;
  ------------------
  |  Branch (460:25): [True: 34.8k, False: 24.5k]
  ------------------
  461|       |
  462|  24.5k|                    if (VECTOR(mark)[v3] == v1+1) {
  ------------------
  |  |   60|  24.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (462:25): [True: 6.00k, False: 18.5k]
  ------------------
  463|  6.00k|                        *triangles += 1;
  464|  6.00k|                    }
  465|  24.5k|                }
  466|  34.8k|            }
  467|  24.6k|        }
  468|   401k|    }
  469|       |
  470|  2.06k|    igraph_vector_int_destroy(&mark);
  471|  2.06k|    igraph_adjlist_destroy(&al);
  472|  2.06k|    IGRAPH_FINALLY_CLEAN(2);
  473|       |
  474|  2.06k|    return IGRAPH_SUCCESS;
  475|  2.06k|}

igraph_rng_default:
  188|   502k|igraph_rng_t *igraph_rng_default(void) {
  189|   502k|    return igraph_i_rng_default_ptr;
  190|   502k|}
igraph_rng_seed:
  260|  2.06k|igraph_error_t igraph_rng_seed(igraph_rng_t *rng, igraph_uint_t seed) {
  261|  2.06k|    const igraph_rng_type_t *type = rng->type;
  262|  2.06k|    IGRAPH_CHECK(type->seed(rng->state, seed));
  ------------------
  |  |  656|  2.06k|    do { \
  |  |  657|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.06k]
  |  |  ------------------
  ------------------
  263|  2.06k|    rng->is_seeded = true;
  264|  2.06k|    return IGRAPH_SUCCESS;
  265|  2.06k|}
igraph_rng_bits:
  277|   490k|igraph_int_t igraph_rng_bits(const igraph_rng_t* rng) {
  278|   490k|    return rng->type->bits;
  279|   490k|}
igraph_rng_get_integer:
  593|  99.5k|) {
  594|  99.5k|    const igraph_rng_type_t *type = rng->type;
  595|  99.5k|    igraph_uint_t range;
  596|       |
  597|  99.5k|    assert(h >= l);
  ------------------
  |  Branch (597:5): [True: 0, False: 99.5k]
  |  Branch (597:5): [True: 99.5k, False: 0]
  ------------------
  598|       |
  599|  99.5k|    if (h == l) {
  ------------------
  |  Branch (599:9): [True: 10.5k, False: 89.0k]
  ------------------
  600|  10.5k|        return l;
  601|  10.5k|    }
  602|       |
  603|  89.0k|    if (type->get_int) {
  ------------------
  |  Branch (603:9): [True: 0, False: 89.0k]
  ------------------
  604|      0|        return type->get_int(rng->state, l, h);
  605|      0|    }
  606|       |
  607|  89.0k|    if (IGRAPH_UNLIKELY(l == IGRAPH_INTEGER_MIN && h == IGRAPH_INTEGER_MAX)) {
  ------------------
  |  |  612|  89.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  ------------------
  |  |  |  Branch (612:32): [True: 0, False: 89.0k]
  |  |  |  Branch (612:52): [True: 0, False: 89.0k]
  |  |  |  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|  89.0k|    } else if (l >= 0 || h < 0) {
  ------------------
  |  Branch (611:16): [True: 89.0k, False: 0]
  |  Branch (611:26): [True: 0, False: 0]
  ------------------
  612|       |        /* this is okay, (h - l) will not overflow an igraph_int_t */
  613|  89.0k|        range = (igraph_uint_t)(h - l) + 1;
  614|  89.0k|    } 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|  89.0k|    return l + igraph_i_rng_get_uint_bounded(rng, range);
  622|  89.0k|}
igraph_rng_get_unif01:
  698|   401k|igraph_real_t igraph_rng_get_unif01(igraph_rng_t *rng) {
  699|   401k|    const igraph_rng_type_t *type = rng->type;
  700|   401k|    if (type->get_real) {
  ------------------
  |  Branch (700:9): [True: 0, False: 401k]
  ------------------
  701|      0|        return type->get_real(rng->state);
  702|   401k|    } else {
  703|       |        /* We extract 52 random bits from a 64-bit uint and fill that directly
  704|       |         * into the mantissa of a double, bit-by-bit, clear the sign bit and
  705|       |         * set the exponent to 2^0. This way we get a 52-bit random double
  706|       |         * between 1 (inclusive) and 2 (exclusive), uniformly distributed.
  707|       |         * Then we subtract 1 to arrive at the [0; 1) interval. This is fast
  708|       |         * but we lose one bit of precision as there are 2^53 possible doubles
  709|       |         * between 0 and 1. */
  710|   401k|        union {
  711|   401k|            uint64_t as_uint64_t;
  712|   401k|            double as_double;
  713|   401k|        } value;
  714|   401k|        value.as_uint64_t =
  715|   401k|            (igraph_i_rng_get_random_bits_uint64(rng, 52) & 0xFFFFFFFFFFFFFull) | 0x3FF0000000000000ull;
  716|   401k|        return value.as_double - 1.0;
  717|   401k|    }
  718|   401k|}
random.c:igraph_i_rng_get_random_bits:
  336|  89.0k|static igraph_uint_t igraph_i_rng_get_random_bits(igraph_rng_t *rng, uint8_t bits) {
  337|  89.0k|    const igraph_rng_type_t *type = rng->type;
  338|  89.0k|    igraph_int_t rng_bitwidth = igraph_rng_bits(rng);
  339|  89.0k|    igraph_uint_t result;
  340|       |
  341|  89.0k|    if (rng_bitwidth >= bits) {
  ------------------
  |  Branch (341:9): [True: 89.0k, False: 0]
  ------------------
  342|       |        /* keep the high bits as RNGs sometimes tend to have lower entropy in
  343|       |         * low bits than in high bits */
  344|  89.0k|        result = type->get(rng->state) >> (rng_bitwidth - bits);
  345|  89.0k|    } 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|  89.0k|    return result;
  357|  89.0k|}
random.c:igraph_i_rng_get_uint_bounded:
  532|  89.0k|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|  89.0k|    if (range <= UINT32_MAX) {
  ------------------
  |  Branch (541:9): [True: 89.0k, False: 0]
  ------------------
  542|  89.0k|        return igraph_i_rng_get_uint32_bounded(rng, range);
  543|  89.0k|    } else {
  544|      0|        return igraph_i_rng_get_uint64_bounded(rng, range);
  545|      0|    }
  546|  89.0k|#endif
  547|  89.0k|}
random.c:igraph_i_rng_get_uint32_bounded:
  428|  89.0k|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|  89.0k|    uint32_t x, l, t = (-range) % range;
  432|  89.0k|    uint64_t m;
  433|  89.0k|    do {
  434|  89.0k|        x = igraph_i_rng_get_uint32(rng);
  435|  89.0k|        m = (uint64_t)(x) * (uint64_t)(range);
  436|  89.0k|        l = (uint32_t)m;
  437|  89.0k|    } while (l < t);
  ------------------
  |  Branch (437:14): [True: 0, False: 89.0k]
  ------------------
  438|  89.0k|    return m >> 32;
  439|  89.0k|}
random.c:igraph_i_rng_get_uint32:
  416|  89.0k|static uint32_t igraph_i_rng_get_uint32(igraph_rng_t *rng) {
  417|  89.0k|    return igraph_i_rng_get_random_bits(rng, 32);
  418|  89.0k|}
random.c:igraph_i_rng_get_random_bits_uint64:
  375|   401k|static uint64_t igraph_i_rng_get_random_bits_uint64(igraph_rng_t *rng, uint8_t bits) {
  376|   401k|    const igraph_rng_type_t *type = rng->type;
  377|   401k|    igraph_int_t rng_bitwidth = igraph_rng_bits(rng);
  378|   401k|    uint64_t result;
  379|       |
  380|   401k|    if (rng_bitwidth >= bits) {
  ------------------
  |  Branch (380:9): [True: 0, False: 401k]
  ------------------
  381|       |        /* keep the high bits as RNGs sometimes tend to have lower entropy in
  382|       |         * low bits than in high bits */
  383|      0|        result = type->get(rng->state) >> (rng_bitwidth - bits);
  384|   401k|    } else {
  385|   401k|        result = 0;
  386|   401k|        do {
  387|   401k|            result = (result << rng_bitwidth) + type->get(rng->state);
  388|   401k|            bits -= rng_bitwidth;
  389|   401k|        } while (bits > rng_bitwidth);
  ------------------
  |  Branch (389:18): [True: 0, False: 401k]
  ------------------
  390|       |
  391|       |        /* and now the last piece */
  392|   401k|        result = (result << bits) + (type->get(rng->state) >> (rng_bitwidth - bits));
  393|   401k|    }
  394|       |
  395|   401k|    return result;
  396|   401k|}

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

