_Z23vector_isininterval_epsPK15igraph_vector_tdd:
   26|  3.28k|bool vector_isininterval_eps(const igraph_vector_t *v, igraph_real_t lo, igraph_real_t hi) {
   27|  3.28k|    const igraph_int_t n = igraph_vector_size(v);
   28|       |
   29|   113k|    for (igraph_int_t i=0; i < n; i++) {
  ------------------
  |  Branch (29:28): [True: 110k, False: 3.28k]
  ------------------
   30|   110k|        igraph_real_t x = VECTOR(*v)[i];
  ------------------
  |  |   60|   110k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   31|   110k|        if (igraph_cmp_epsilon(lo, x, eps) > 0 || igraph_cmp_epsilon(x, hi, eps) > 0) {
  ------------------
  |  Branch (31:13): [True: 0, False: 110k]
  |  Branch (31:51): [True: 0, False: 110k]
  ------------------
   32|      0|            return false;
   33|      0|        }
   34|   110k|    }
   35|       |
   36|  3.28k|    return true;
   37|  3.28k|}
LLVMFuzzerTestOneInput:
   39|    867|extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
   40|    867|    igraph_t graph;
   41|    867|    igraph_vector_int_t edges;
   42|    867|    igraph_vector_t weights;
   43|       |
   44|    867|    igraph_set_warning_handler(igraph_warning_handler_ignore);
   45|       |
   46|    867|    if (Size % 3 == 0 || Size % 3 == 2 || Size > (3 * 256) + 1 || Size < 1) {
  ------------------
  |  Branch (46:9): [True: 1, False: 866]
  |  Branch (46:26): [True: 1, False: 865]
  |  Branch (46:43): [True: 13, False: 852]
  |  Branch (46:67): [True: 0, False: 852]
  ------------------
   47|     15|        return 0;
   48|     15|    }
   49|       |
   50|    852|    igraph_vector_int_init(&edges, ((Size-1) / 3) * 2);
   51|    852|    igraph_vector_init(&weights, (Size-1) / 3);
   52|  19.5k|    for (size_t i=0; i < ((Size-1) / 3); ++i) {
  ------------------
  |  Branch (52:22): [True: 18.7k, False: 852]
  ------------------
   53|  18.7k|        VECTOR(edges)[i * 2] = Data[i * 3 + 1];
  ------------------
  |  |   60|  18.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   54|  18.7k|        VECTOR(edges)[i * 2 + 1] = Data[i * 3 + 2];
  ------------------
  |  |   60|  18.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   55|       |        // We keep the weights strictly positive, as this is required by some algorithms.
   56|       |        // Error at src/centrality/betweenness.c:437 : Weight vector must be positive. - Invalid value.
   57|  18.7k|        VECTOR(weights)[i] = ((double) Data[i * 3 + 3] + 1.0) / 105.0;
  ------------------
  |  |   60|  18.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   58|  18.7k|    }
   59|       |
   60|       |    // Turn on attribute handling. Weights will be stored as an edge attribute
   61|       |    // in order to allow graph simplification while retainingweights.
   62|    852|    igraph_set_attribute_table(&igraph_cattribute_table);
   63|       |
   64|    852|    igraph_rng_seed(igraph_rng_default(), 42);
   65|       |
   66|    852|    if (igraph_create(&graph, &edges, Data[0], IGRAPH_DIRECTED) == IGRAPH_SUCCESS) {
  ------------------
  |  Branch (66:9): [True: 852, False: 0]
  ------------------
   67|    852|        const igraph_int_t vcount = igraph_vcount(&graph);
   68|    852|        igraph_vector_t v;
   69|    852|        igraph_vector_int_t iv;
   70|    852|        igraph_bool_t b;
   71|    852|        igraph_real_t r;
   72|       |
   73|       |        /* Limit graph size for the sake of performance. */
   74|    852|        if (vcount <= 64) {
  ------------------
  |  Branch (74:13): [True: 822, False: 30]
  ------------------
   75|    822|            igraph_vector_init(&v, 0);
   76|    822|            igraph_vector_int_init(&iv, 0);
   77|       |
   78|    822|            igraph_betweenness_cutoff(&graph, &weights, &v, igraph_vss_all(), IGRAPH_UNDIRECTED, false, 4);
   79|    822|            IGRAPH_ASSERT(vector_isininterval_eps(&v, 0, vcount == 0 ? 0 : (vcount-1)*(vcount-2)/2));
  ------------------
  |  |  924|    822|    do { \
  |  |  925|    822|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  |  Branch (612:52): [True: 1, False: 821]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  ------------------
  |  |  |  |  401|       |#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  927|      0|        } \
  |  |  928|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
   80|       |
   81|    822|            igraph_betweenness_cutoff(&graph, &weights, &v, igraph_vss_all(), IGRAPH_DIRECTED, false, 5);
   82|    822|            IGRAPH_ASSERT(vector_isininterval_eps(&v, 0, vcount == 0 ? 0 : (vcount-1)*(vcount-2)));
  ------------------
  |  |  924|    822|    do { \
  |  |  925|    822|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  |  Branch (612:52): [True: 1, False: 821]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  ------------------
  |  |  |  |  401|       |#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  927|      0|        } \
  |  |  928|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
   83|       |
   84|       |            /* Paths using u->v cannot start at v or end at u. Excluding equal
   85|       |             * endpoints leaves at most (n-1)^2-(n-2) = n^2-3n+3 pairs. */
   86|    822|            igraph_edge_betweenness_cutoff(&graph, &weights, &v, igraph_ess_all(IGRAPH_EDGEORDER_ID), IGRAPH_DIRECTED,
   87|    822|                                           false, 4);
   88|    822|            IGRAPH_ASSERT(vector_isininterval_eps(&v, 0, vcount < 2 ? 0 : vcount*vcount - 3*vcount + 3));
  ------------------
  |  |  924|    822|    do { \
  |  |  925|    822|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  |  Branch (612:52): [True: 9, False: 813]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  ------------------
  |  |  |  |  401|       |#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  927|      0|        } \
  |  |  928|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
   89|       |
   90|       |            /* Undirected paths cross between disjoint sets closer to u and v.
   91|       |             * At most a*b <= floor(n^2/4) pairs can contribute. */
   92|    822|            igraph_edge_betweenness_cutoff(&graph, &weights, &v, igraph_ess_all(IGRAPH_EDGEORDER_ID), IGRAPH_UNDIRECTED,
   93|    822|                                           false, 3);
   94|    822|            IGRAPH_ASSERT(vector_isininterval_eps(&v, 0, vcount*vcount/4));
  ------------------
  |  |  924|    822|    do { \
  |  |  925|    822|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  ------------------
  |  |  |  |  401|       |#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  927|      0|        } \
  |  |  928|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
   95|       |
   96|    822|            if (vcount >= 10) {
  ------------------
  |  Branch (96:17): [True: 748, False: 74]
  ------------------
   97|    748|                igraph_betweenness_subset(&graph, &weights,
   98|    748|                                          &v,
   99|    748|                                          igraph_vss_range(0,5), igraph_vss_range(5,10),
  100|    748|                                          igraph_vss_all(), IGRAPH_DIRECTED, false);
  101|    748|                igraph_edge_betweenness_subset(&graph, &weights,
  102|    748|                                               &v,
  103|    748|                                               igraph_vss_range(0,10), igraph_vss_range(0, 10),
  104|    748|                                               igraph_ess_all(IGRAPH_EDGEORDER_ID), IGRAPH_DIRECTED,false);
  105|    748|            }
  106|    822|            igraph_closeness_cutoff(&graph, &v, &iv, &b, igraph_vss_all(), IGRAPH_ALL, &weights, true, 3);
  107|    822|            igraph_closeness_cutoff(&graph, &v, &iv, &b, igraph_vss_all(), IGRAPH_OUT, &weights, true, 4);
  108|    822|            igraph_harmonic_centrality_cutoff(&graph, &v, igraph_vss_all(), IGRAPH_ALL, &weights, true, 3);
  109|    822|            igraph_harmonic_centrality_cutoff(&graph, &v, igraph_vss_all(), IGRAPH_IN, &weights, true, 4);
  110|    822|            igraph_global_efficiency(&graph, &weights, &r, IGRAPH_DIRECTED);
  111|    822|            igraph_local_efficiency(&graph, &weights, &v, igraph_vss_all(), IGRAPH_DIRECTED, IGRAPH_OUT);
  112|       |
  113|    822|            igraph_pagerank(&graph, &weights, &v, &r, 0.6, IGRAPH_DIRECTED, igraph_vss_all(),
  114|    822|                            IGRAPH_PAGERANK_ALGO_PRPACK, NULL);
  115|    822|            IGRAPH_ASSERT(vcount == 0 || igraph_almost_equals(igraph_vector_sum(&v), 1.0, 1e-10));
  ------------------
  |  |  924|    822|    do { \
  |  |  925|    822|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  |  Branch (612:52): [True: 1, False: 821]
  |  |  |  |  |  Branch (612:52): [True: 821, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  ------------------
  |  |  |  |  401|       |#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  927|      0|        } \
  |  |  928|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
  116|       |
  117|    822|            igraph_constraint(&graph, &v, igraph_vss_all(), &weights);
  118|       |
  119|    822|            {
  120|    822|                igraph_attribute_combination_t comb;
  121|    822|                SETEANV(&graph, "weight", &weights);
  ------------------
  |  |  846|    822|#define SETEANV(graph,n,v) (igraph_cattribute_EAN_setv((graph),(n),(v)))
  ------------------
  122|    822|                igraph_attribute_combination(&comb,
  123|    822|                                             "weight", IGRAPH_ATTRIBUTE_COMBINE_SUM,
  124|    822|                                             IGRAPH_NO_MORE_ATTRIBUTES);
  ------------------
  |  |  214|    822|#define IGRAPH_NO_MORE_ATTRIBUTES ((const char*)0)
  ------------------
  125|       |                // This operation would be simpler if we use IGRAPH_TO_UNDIRECTED_EACH,
  126|       |                // as collapsing edges happens in the simplification step anyway.
  127|       |                // We use IGRAPH_TO_UNDIRECTED_COLLAPSE to exercise more code.
  128|    822|                igraph_to_undirected(&graph, IGRAPH_TO_UNDIRECTED_COLLAPSE, &comb);
  129|    822|                igraph_simplify(&graph, true, true, &comb);
  130|    822|                igraph_attribute_combination_destroy(&comb);
  131|    822|                EANV(&graph, "weight", &weights);
  ------------------
  |  |  669|    822|#define EANV(graph,n,vec) (igraph_cattribute_EANV((graph),(n), \
  |  |  670|    822|                           igraph_ess_all(IGRAPH_EDGEORDER_ID), (vec)))
  ------------------
  132|    822|                DELEA(&graph, "weight");
  ------------------
  |  |  894|    822|#define DELEA(graph,n) (igraph_cattribute_remove_e((graph),(n)))
  ------------------
  133|    822|            }
  134|       |
  135|    822|            igraph_diversity(&graph, &weights, &v, igraph_vss_all());
  136|    822|            igraph_transitivity_barrat(&graph, &v, igraph_vss_all(), &weights, IGRAPH_TRANSITIVITY_NAN);
  137|       |
  138|    822|            igraph_vector_int_destroy(&iv);
  139|    822|            igraph_vector_destroy(&v);
  140|    822|        }
  141|       |
  142|    852|        igraph_destroy(&graph);
  143|    852|    }
  144|       |
  145|    852|    igraph_vector_int_destroy(&edges);
  146|    852|    igraph_vector_destroy(&weights);
  147|       |
  148|    852|    IGRAPH_ASSERT(IGRAPH_FINALLY_STACK_EMPTY);
  ------------------
  |  |  924|    852|    do { \
  |  |  925|    852|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|    852|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 852]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  ------------------
  |  |  |  |  401|       |#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  927|      0|        } \
  |  |  928|    852|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 852]
  |  |  ------------------
  ------------------
  149|       |
  150|    852|    return 0;  // Non-zero return values are reserved for future use.
  151|    852|}

igraph_betweenness_cutoff:
  560|  1.64k|        igraph_real_t cutoff) {
  561|       |
  562|  1.64k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  563|  1.64k|    igraph_int_t no_of_edges = igraph_ecount(graph);
  564|  1.64k|    igraph_adjlist_t adjlist, parents;
  565|  1.64k|    igraph_inclist_t inclist;
  566|  1.64k|    igraph_int_t source, j, neighbor;
  567|  1.64k|    igraph_stack_int_t S;
  568|  1.64k|    igraph_neimode_t mode;
  569|  1.64k|    igraph_vector_t dist;
  570|       |    /* Note: nrgeo holds the number of shortest paths, which may be very large in some cases,
  571|       |     * e.g. in a grid graph. If using an integer type, this results in overflow.
  572|       |     * With a 'long long int', overflow already affects the result for a grid as small as 36*36.
  573|       |     * Therefore, we use a 'igraph_real_t' instead. While a 'igraph_real_t' holds fewer digits than a
  574|       |     * 'long long int', i.e. its precision is lower, it is effectively immune to overflow.
  575|       |     * The impact on the precision of the final result is negligible. The max betweenness
  576|       |     * is correct to 14 decimal digits, i.e. the precision limit of 'igraph_real_t', even
  577|       |     * for a 101*101 grid graph. */
  578|  1.64k|    igraph_real_t *nrgeo = 0;
  579|  1.64k|    igraph_real_t *tmpscore;
  580|  1.64k|    igraph_vector_t v_tmpres, *tmpres = &v_tmpres;
  581|  1.64k|    igraph_vit_t vit;
  582|  1.64k|    igraph_real_t normalization_factor;
  583|       |
  584|  1.64k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (584:9): [True: 0, False: 1.64k]
  ------------------
  585|      0|        directed = false;
  586|      0|    }
  587|  1.64k|    mode = directed ? IGRAPH_OUT : IGRAPH_ALL;
  ------------------
  |  Branch (587:12): [True: 822, False: 822]
  ------------------
  588|       |
  589|  1.64k|    IGRAPH_CHECK(betweenness_check_weights(weights, no_of_edges));
  ------------------
  |  |  656|  1.64k|    do { \
  |  |  657|  1.64k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.64k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  590|       |
  591|  1.64k|    if (isnan(cutoff)) {
  ------------------
  |  Branch (591:9): [True: 0, False: 1.64k]
  ------------------
  592|      0|        IGRAPH_ERROR("The cutoff must not be NaN.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  593|      0|    }
  594|       |
  595|  1.64k|    if (weights) {
  ------------------
  |  Branch (595:9): [True: 1.64k, False: 0]
  ------------------
  596|  1.64k|        IGRAPH_CHECK(igraph_inclist_init(graph, &inclist, mode, IGRAPH_NO_LOOPS));
  ------------------
  |  |  656|  1.64k|    do { \
  |  |  657|  1.64k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.64k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  597|  1.64k|        IGRAPH_FINALLY(igraph_inclist_destroy, &inclist);
  ------------------
  |  |  603|  1.64k|    do { \
  |  |  604|  1.64k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  1.64k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  1.64k|         * incorrect destructor function with the pointer */ \
  |  |  607|  1.64k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 1.64k]
  |  |  ------------------
  |  |  608|  1.64k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  598|  1.64k|    } else {
  599|      0|        IGRAPH_CHECK(igraph_adjlist_init(graph, &adjlist, mode, IGRAPH_NO_LOOPS, IGRAPH_MULTIPLE));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  600|      0|        IGRAPH_FINALLY(igraph_adjlist_destroy, &adjlist);
  ------------------
  |  |  603|      0|    do { \
  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  ------------------
  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  601|      0|    }
  602|       |
  603|  1.64k|    IGRAPH_CHECK(igraph_adjlist_init_empty(&parents, no_of_nodes));
  ------------------
  |  |  656|  1.64k|    do { \
  |  |  657|  1.64k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.64k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  604|  1.64k|    IGRAPH_FINALLY(igraph_adjlist_destroy, &parents);
  ------------------
  |  |  603|  1.64k|    do { \
  |  |  604|  1.64k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  1.64k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  1.64k|         * incorrect destructor function with the pointer */ \
  |  |  607|  1.64k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 1.64k]
  |  |  ------------------
  |  |  608|  1.64k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  605|       |
  606|  1.64k|    IGRAPH_CHECK(igraph_stack_int_init(&S, no_of_nodes));
  ------------------
  |  |  656|  1.64k|    do { \
  |  |  657|  1.64k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.64k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  607|  1.64k|    IGRAPH_FINALLY(igraph_stack_int_destroy, &S);
  ------------------
  |  |  603|  1.64k|    do { \
  |  |  604|  1.64k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  1.64k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  1.64k|         * incorrect destructor function with the pointer */ \
  |  |  607|  1.64k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 1.64k]
  |  |  ------------------
  |  |  608|  1.64k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  608|       |
  609|  1.64k|    IGRAPH_VECTOR_INIT_FINALLY(&dist, no_of_nodes);
  ------------------
  |  |  104|  1.64k|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  1.64k|    do { \
  |  |  |  |  657|  1.64k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.64k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.64k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  1.64k|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  1.64k|    do { \
  |  |  |  |  604|  1.64k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.64k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.64k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.64k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.64k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.64k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.64k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (105:60): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  610|       |
  611|  1.64k|    nrgeo = IGRAPH_CALLOC(no_of_nodes, igraph_real_t);
  ------------------
  |  |   33|  1.64k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  3.28k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 1.64k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 1.64k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 1.64k, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  612|  1.64k|    IGRAPH_CHECK_OOM(nrgeo, "Insufficient memory for betweenness calculation.");
  ------------------
  |  |  709|  1.64k|    do { \
  |  |  710|  1.64k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  613|  1.64k|    IGRAPH_FINALLY(igraph_free, nrgeo);
  ------------------
  |  |  603|  1.64k|    do { \
  |  |  604|  1.64k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  1.64k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  1.64k|         * incorrect destructor function with the pointer */ \
  |  |  607|  1.64k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 1.64k]
  |  |  ------------------
  |  |  608|  1.64k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  614|       |
  615|  1.64k|    tmpscore = IGRAPH_CALLOC(no_of_nodes, igraph_real_t);
  ------------------
  |  |   33|  1.64k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  3.28k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 1.64k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 1.64k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 1.64k, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  616|  1.64k|    IGRAPH_CHECK_OOM(tmpscore, "Insufficient memory for betweenness calculation.");
  ------------------
  |  |  709|  1.64k|    do { \
  |  |  710|  1.64k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  617|  1.64k|    IGRAPH_FINALLY(igraph_free, tmpscore);
  ------------------
  |  |  603|  1.64k|    do { \
  |  |  604|  1.64k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  1.64k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  1.64k|         * incorrect destructor function with the pointer */ \
  |  |  607|  1.64k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 1.64k]
  |  |  ------------------
  |  |  608|  1.64k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  618|       |
  619|  1.64k|    if (igraph_vs_is_all(&vids)) {
  ------------------
  |  Branch (619:9): [True: 1.64k, False: 0]
  ------------------
  620|       |        /* result covers all vertices */
  621|  1.64k|        IGRAPH_CHECK(igraph_vector_resize(res, no_of_nodes));
  ------------------
  |  |  656|  1.64k|    do { \
  |  |  657|  1.64k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.64k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  622|  1.64k|        igraph_vector_null(res);
  623|  1.64k|        tmpres = res;
  624|  1.64k|    } else {
  625|       |        /* result needed only for a subset of the vertices */
  626|      0|        IGRAPH_VECTOR_INIT_FINALLY(tmpres, no_of_nodes);
  ------------------
  |  |  104|      0|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|      0|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|      0|    do { \
  |  |  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (105:60): [Folded, False: 0]
  |  |  ------------------
  ------------------
  627|      0|    }
  628|       |
  629|  75.4k|    for (source = 0; source < no_of_nodes; source++) {
  ------------------
  |  Branch (629:22): [True: 73.8k, False: 1.64k]
  ------------------
  630|       |
  631|       |        /* Loop invariant that is valid at this point:
  632|       |         *
  633|       |         * - the stack S is empty
  634|       |         * - the 'dist' vector contains zeros only
  635|       |         * - the 'nrgeo' array contains zeros only
  636|       |         * - the 'tmpscore' array contains zeros only
  637|       |         * - the 'parents' adjacency list contains empty vectors only
  638|       |         */
  639|       |
  640|  73.8k|        IGRAPH_PROGRESS("Betweenness centrality: ", 100.0 * source / no_of_nodes, 0);
  ------------------
  |  |  169|  73.8k|    do { \
  |  |  170|  73.8k|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  656|  73.8k|    do { \
  |  |  |  |  657|  73.8k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  73.8k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  73.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 73.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|  73.8k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 73.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  171|  73.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (171:14): [Folded, False: 73.8k]
  |  |  ------------------
  ------------------
  641|  73.8k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|  73.8k|    do { \
  |  |   47|  73.8k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 73.8k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|  73.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 73.8k]
  |  |  ------------------
  ------------------
  642|       |
  643|       |        /* Conduct a single-source shortest path search from the source node */
  644|  73.8k|        if (weights) {
  ------------------
  |  Branch (644:13): [True: 73.8k, False: 0]
  ------------------
  645|  73.8k|            IGRAPH_CHECK(sspf_weighted(graph, source, &dist, nrgeo, weights, &S, &parents, &inclist, cutoff));
  ------------------
  |  |  656|  73.8k|    do { \
  |  |  657|  73.8k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  73.8k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  73.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 73.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|  73.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 73.8k]
  |  |  ------------------
  ------------------
  646|  73.8k|        } else {
  647|      0|            IGRAPH_CHECK(sspf(source, &dist, nrgeo, &S, &parents, &adjlist, cutoff));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  648|      0|        }
  649|       |
  650|       |        /* Aggregate betweenness scores for the nodes we have reached in this
  651|       |         * traversal */
  652|   365k|        while (!igraph_stack_int_empty(&S)) {
  ------------------
  |  Branch (652:16): [True: 291k, False: 73.8k]
  ------------------
  653|   291k|            igraph_int_t actnode = igraph_stack_int_pop(&S);
  654|   291k|            igraph_vector_int_t *neis = igraph_adjlist_get(&parents, actnode);
  ------------------
  |  |   73|   291k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  655|   291k|            igraph_int_t nneis = igraph_vector_int_size(neis);
  656|   291k|            igraph_real_t coeff = (1 + tmpscore[actnode]) / nrgeo[actnode];
  657|       |
  658|   539k|            for (j = 0; j < nneis; j++) {
  ------------------
  |  Branch (658:25): [True: 247k, False: 291k]
  ------------------
  659|   247k|                neighbor = VECTOR(*neis)[j];
  ------------------
  |  |   60|   247k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  660|   247k|                tmpscore[neighbor] += nrgeo[neighbor] * coeff;
  661|   247k|            }
  662|       |
  663|   291k|            if (actnode != source) {
  ------------------
  |  Branch (663:17): [True: 217k, False: 73.8k]
  ------------------
  664|   217k|                VECTOR(*tmpres)[actnode] += tmpscore[actnode];
  ------------------
  |  |   60|   217k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  665|   217k|            }
  666|       |
  667|       |            /* Reset variables to ensure that the 'for' loop invariant will
  668|       |             * still be valid in the next iteration */
  669|       |
  670|   291k|            VECTOR(dist)[actnode] = 0;
  ------------------
  |  |   60|   291k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  671|   291k|            nrgeo[actnode] = 0;
  672|   291k|            tmpscore[actnode] = 0;
  673|   291k|            igraph_vector_int_clear(neis);
  674|   291k|        }
  675|       |
  676|  73.8k|    } /* for source < no_of_nodes */
  677|       |
  678|       |    /* Keep only the requested vertices */
  679|  1.64k|    if (!igraph_vs_is_all(&vids)) {
  ------------------
  |  Branch (679:9): [True: 0, False: 1.64k]
  ------------------
  680|      0|        IGRAPH_CHECK(igraph_vit_create(graph, vids, &vit));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  681|      0|        IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  603|      0|    do { \
  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  ------------------
  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  682|      0|        IGRAPH_CHECK(igraph_vector_resize(res, IGRAPH_VIT_SIZE(vit)));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  683|       |
  684|      0|        for (j = 0, IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit);
  ------------------
  |  |  201|      0|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
                      for (j = 0, IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit);
  ------------------
  |  |  179|      0|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (684:44): [True: 0, False: 0]
  ------------------
  685|      0|             IGRAPH_VIT_NEXT(vit), j++) {
  ------------------
  |  |  167|      0|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  686|      0|            igraph_int_t node = 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)
  |  |  ------------------
  ------------------
  687|      0|            VECTOR(*res)[j] = VECTOR(*tmpres)[node];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*res)[j] = VECTOR(*tmpres)[node];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  688|      0|        }
  689|       |
  690|      0|        igraph_vit_destroy(&vit);
  691|      0|        igraph_vector_destroy(tmpres);
  692|      0|        IGRAPH_FINALLY_CLEAN(2);
  693|      0|    }
  694|       |
  695|       |    /* The betweenness calculation is always done for all _ordered_ vertex pairs.
  696|       |     * We only need to correct for this in undirected graphs when normalized=false. */
  697|  1.64k|    if (normalized) {
  ------------------
  |  Branch (697:9): [True: 0, False: 1.64k]
  ------------------
  698|      0|        normalization_factor = 1.0 / (no_of_nodes * (no_of_nodes - 1.0));
  699|  1.64k|    } else {
  700|  1.64k|        normalization_factor = directed ? 1.0 : 0.5;
  ------------------
  |  Branch (700:32): [True: 822, False: 822]
  ------------------
  701|  1.64k|    }
  702|       |
  703|  1.64k|    igraph_vector_scale(res, normalization_factor);
  704|       |
  705|  1.64k|    IGRAPH_PROGRESS("Betweenness centrality: ", 100.0, 0);
  ------------------
  |  |  169|  1.64k|    do { \
  |  |  170|  1.64k|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  656|  1.64k|    do { \
  |  |  |  |  657|  1.64k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.64k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.64k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  171|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (171:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  706|       |
  707|  1.64k|    IGRAPH_FREE(nrgeo);
  ------------------
  |  |   36|  1.64k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  708|  1.64k|    IGRAPH_FREE(tmpscore);
  ------------------
  |  |   36|  1.64k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  709|  1.64k|    igraph_vector_destroy(&dist);
  710|  1.64k|    igraph_stack_int_destroy(&S);
  711|  1.64k|    igraph_adjlist_destroy(&parents);
  712|  1.64k|    if (weights) {
  ------------------
  |  Branch (712:9): [True: 1.64k, False: 0]
  ------------------
  713|  1.64k|        igraph_inclist_destroy(&inclist);
  714|  1.64k|    } else {
  715|      0|        igraph_adjlist_destroy(&adjlist);
  716|      0|    }
  717|  1.64k|    IGRAPH_FINALLY_CLEAN(6);
  718|       |
  719|  1.64k|    return IGRAPH_SUCCESS;
  720|  1.64k|}
igraph_edge_betweenness_cutoff:
  829|  1.64k|        igraph_real_t cutoff) {
  830|       |
  831|  1.64k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  832|  1.64k|    igraph_int_t no_of_edges = igraph_ecount(graph);
  833|  1.64k|    igraph_inclist_t inclist, parents;
  834|  1.64k|    igraph_neimode_t mode;
  835|  1.64k|    igraph_vector_t dist;
  836|  1.64k|    igraph_vector_t v_tmpres, *tmpres = &v_tmpres;
  837|  1.64k|    igraph_real_t *nrgeo;
  838|  1.64k|    igraph_real_t *tmpscore;
  839|  1.64k|    igraph_int_t source, j;
  840|  1.64k|    igraph_stack_int_t S;
  841|  1.64k|    igraph_real_t normalization_factor;
  842|       |
  843|  1.64k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (843:9): [True: 0, False: 1.64k]
  ------------------
  844|      0|        directed = false;
  845|      0|    }
  846|  1.64k|    mode = directed ? IGRAPH_OUT : IGRAPH_ALL;
  ------------------
  |  Branch (846:12): [True: 822, False: 822]
  ------------------
  847|       |
  848|  1.64k|    IGRAPH_CHECK(betweenness_check_weights(weights, no_of_edges));
  ------------------
  |  |  656|  1.64k|    do { \
  |  |  657|  1.64k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.64k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  849|       |
  850|  1.64k|    if (isnan(cutoff)) {
  ------------------
  |  Branch (850:9): [True: 0, False: 1.64k]
  ------------------
  851|      0|        IGRAPH_ERROR("The cutoff must not be NaN.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  852|      0|    }
  853|       |
  854|  1.64k|    IGRAPH_CHECK(igraph_inclist_init(graph, &inclist, mode, IGRAPH_NO_LOOPS));
  ------------------
  |  |  656|  1.64k|    do { \
  |  |  657|  1.64k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.64k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  855|  1.64k|    IGRAPH_FINALLY(igraph_inclist_destroy, &inclist);
  ------------------
  |  |  603|  1.64k|    do { \
  |  |  604|  1.64k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  1.64k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  1.64k|         * incorrect destructor function with the pointer */ \
  |  |  607|  1.64k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 1.64k]
  |  |  ------------------
  |  |  608|  1.64k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  856|       |
  857|  1.64k|    IGRAPH_CHECK(igraph_inclist_init_empty(&parents, no_of_nodes));
  ------------------
  |  |  656|  1.64k|    do { \
  |  |  657|  1.64k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.64k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  858|  1.64k|    IGRAPH_FINALLY(igraph_inclist_destroy, &parents);
  ------------------
  |  |  603|  1.64k|    do { \
  |  |  604|  1.64k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  1.64k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  1.64k|         * incorrect destructor function with the pointer */ \
  |  |  607|  1.64k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 1.64k]
  |  |  ------------------
  |  |  608|  1.64k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  859|       |
  860|  1.64k|    IGRAPH_VECTOR_INIT_FINALLY(&dist, no_of_nodes);
  ------------------
  |  |  104|  1.64k|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  1.64k|    do { \
  |  |  |  |  657|  1.64k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.64k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.64k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  1.64k|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  1.64k|    do { \
  |  |  |  |  604|  1.64k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.64k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.64k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.64k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.64k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.64k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.64k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (105:60): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  861|       |
  862|  1.64k|    nrgeo = IGRAPH_CALLOC(no_of_nodes, igraph_real_t);
  ------------------
  |  |   33|  1.64k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  3.28k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 1.64k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 1.64k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 1.64k, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  863|  1.64k|    IGRAPH_CHECK_OOM(nrgeo, "Insufficient memory for edge betweenness calculation.");
  ------------------
  |  |  709|  1.64k|    do { \
  |  |  710|  1.64k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  864|  1.64k|    IGRAPH_FINALLY(igraph_free, nrgeo);
  ------------------
  |  |  603|  1.64k|    do { \
  |  |  604|  1.64k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  1.64k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  1.64k|         * incorrect destructor function with the pointer */ \
  |  |  607|  1.64k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 1.64k]
  |  |  ------------------
  |  |  608|  1.64k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  865|       |
  866|  1.64k|    tmpscore = IGRAPH_CALLOC(no_of_nodes, igraph_real_t);
  ------------------
  |  |   33|  1.64k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  3.28k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 1.64k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 1.64k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 1.64k, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  867|  1.64k|    if (tmpscore == 0) {
  ------------------
  |  Branch (867:9): [True: 0, False: 1.64k]
  ------------------
  868|      0|        IGRAPH_ERROR("Insufficient memory for edge betweenness calculation.", 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]
  |  |  ------------------
  ------------------
  869|      0|    }
  870|  1.64k|    IGRAPH_FINALLY(igraph_free, tmpscore);
  ------------------
  |  |  603|  1.64k|    do { \
  |  |  604|  1.64k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  1.64k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  1.64k|         * incorrect destructor function with the pointer */ \
  |  |  607|  1.64k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 1.64k]
  |  |  ------------------
  |  |  608|  1.64k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  871|       |
  872|  1.64k|    IGRAPH_CHECK(igraph_stack_int_init(&S, no_of_nodes));
  ------------------
  |  |  656|  1.64k|    do { \
  |  |  657|  1.64k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.64k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  873|  1.64k|    IGRAPH_FINALLY(igraph_stack_int_destroy, &S);
  ------------------
  |  |  603|  1.64k|    do { \
  |  |  604|  1.64k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  1.64k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  1.64k|         * incorrect destructor function with the pointer */ \
  |  |  607|  1.64k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 1.64k]
  |  |  ------------------
  |  |  608|  1.64k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  874|       |
  875|  1.64k|    if (!igraph_es_is_all(&eids)) {
  ------------------
  |  Branch (875:9): [True: 0, False: 1.64k]
  ------------------
  876|       |        /* result needed only for a subset of the vertices */
  877|      0|        IGRAPH_VECTOR_INIT_FINALLY(tmpres, no_of_edges);
  ------------------
  |  |  104|      0|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|      0|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|      0|    do { \
  |  |  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (105:60): [Folded, False: 0]
  |  |  ------------------
  ------------------
  878|  1.64k|    } else {
  879|       |        /* result covers all vertices */
  880|  1.64k|        IGRAPH_CHECK(igraph_vector_resize(res, no_of_edges));
  ------------------
  |  |  656|  1.64k|    do { \
  |  |  657|  1.64k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.64k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  881|  1.64k|        igraph_vector_null(res);
  882|  1.64k|        tmpres = res;
  883|  1.64k|    }
  884|       |
  885|  75.4k|    for (source = 0; source < no_of_nodes; source++) {
  ------------------
  |  Branch (885:22): [True: 73.8k, False: 1.64k]
  ------------------
  886|       |
  887|       |        /* Loop invariant that is valid at this point:
  888|       |         *
  889|       |         * - the stack S is empty
  890|       |         * - the 'dist' vector contains zeros only
  891|       |         * - the 'nrgeo' array contains zeros only
  892|       |         * - the 'tmpscore' array contains zeros only
  893|       |         * - the 'parents' incidence list contains empty vectors only
  894|       |         */
  895|       |
  896|  73.8k|        IGRAPH_PROGRESS("Edge betweenness centrality: ", 100.0 * source / no_of_nodes, 0);
  ------------------
  |  |  169|  73.8k|    do { \
  |  |  170|  73.8k|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  656|  73.8k|    do { \
  |  |  |  |  657|  73.8k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  73.8k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  73.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 73.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|  73.8k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 73.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  171|  73.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (171:14): [Folded, False: 73.8k]
  |  |  ------------------
  ------------------
  897|  73.8k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|  73.8k|    do { \
  |  |   47|  73.8k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 73.8k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|  73.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 73.8k]
  |  |  ------------------
  ------------------
  898|       |
  899|       |        /* Conduct a single-source shortest path search from the source node */
  900|  73.8k|        if (weights) {
  ------------------
  |  Branch (900:13): [True: 73.8k, False: 0]
  ------------------
  901|  73.8k|            IGRAPH_CHECK(sspf_weighted_edge(graph, source, &dist, nrgeo, weights, &S, &parents, &inclist, cutoff));
  ------------------
  |  |  656|  73.8k|    do { \
  |  |  657|  73.8k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  73.8k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  73.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 73.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|  73.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 73.8k]
  |  |  ------------------
  ------------------
  902|  73.8k|        } else {
  903|      0|            IGRAPH_CHECK(sspf_edge(graph, source, &dist, nrgeo, &S, &parents, &inclist, cutoff));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  904|      0|        }
  905|       |
  906|       |        /* Aggregate betweenness scores for the edges we have reached in this
  907|       |         * traversal */
  908|   357k|        while (!igraph_stack_int_empty(&S)) {
  ------------------
  |  Branch (908:16): [True: 283k, False: 73.8k]
  ------------------
  909|   283k|            igraph_int_t actnode = igraph_stack_int_pop(&S);
  910|   283k|            igraph_vector_int_t *parentv = igraph_inclist_get(&parents, actnode);
  ------------------
  |  |  102|   283k|#define igraph_inclist_get(il,no) (&(il)->incs[(igraph_int_t)(no)])
  ------------------
  911|   283k|            igraph_int_t parentv_len = igraph_vector_int_size(parentv);
  912|   283k|            igraph_real_t coeff = (1 + tmpscore[actnode]) / nrgeo[actnode];
  913|       |
  914|   523k|            for (j = 0; j < parentv_len; j++) {
  ------------------
  |  Branch (914:25): [True: 240k, False: 283k]
  ------------------
  915|   240k|                igraph_int_t fedge = VECTOR(*parentv)[j];
  ------------------
  |  |   60|   240k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  916|   240k|                igraph_int_t neighbor = IGRAPH_OTHER(graph, fedge, actnode);
  ------------------
  |  |  146|   240k|    ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|   240k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   240k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  115|   165k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   165k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|  74.8k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  74.8k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (146:21): [True: 165k, False: 74.8k]
  |  |  ------------------
  ------------------
  917|   240k|                tmpscore[neighbor] += nrgeo[neighbor] * coeff;
  918|   240k|                VECTOR(*tmpres)[fedge] += nrgeo[neighbor] * coeff;
  ------------------
  |  |   60|   240k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  919|   240k|            }
  920|       |
  921|       |            /* Reset variables to ensure that the 'for' loop invariant will
  922|       |             * still be valid in the next iteration */
  923|       |
  924|   283k|            VECTOR(dist)[actnode] = 0;
  ------------------
  |  |   60|   283k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  925|   283k|            nrgeo[actnode] = 0;
  926|   283k|            tmpscore[actnode] = 0;
  927|   283k|            igraph_vector_int_clear(parentv);
  928|   283k|        }
  929|  73.8k|    } /* source < no_of_nodes */
  930|       |
  931|       |    /* Keep only the requested edges */
  932|  1.64k|    if (!igraph_es_is_all(&eids)) {
  ------------------
  |  Branch (932:9): [True: 0, False: 1.64k]
  ------------------
  933|      0|        igraph_eit_t eit;
  934|       |
  935|      0|        IGRAPH_CHECK(igraph_eit_create(graph, eids, &eit));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  936|      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]
  |  |  ------------------
  ------------------
  937|       |
  938|      0|        IGRAPH_CHECK(igraph_vector_resize(res, IGRAPH_EIT_SIZE(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]
  |  |  ------------------
  ------------------
  939|       |
  940|      0|        for (j = 0, IGRAPH_EIT_RESET(eit); !IGRAPH_EIT_END(eit);
  ------------------
  |  |  393|      0|#define IGRAPH_EIT_RESET(eit) ((eit).pos = (eit).start)
  ------------------
                      for (j = 0, IGRAPH_EIT_RESET(eit); !IGRAPH_EIT_END(eit);
  ------------------
  |  |  371|      0|#define IGRAPH_EIT_END(eit)   ((eit).pos >= (eit).end)
  ------------------
  |  Branch (940:44): [True: 0, False: 0]
  ------------------
  941|      0|             IGRAPH_EIT_NEXT(eit), j++) {
  ------------------
  |  |  359|      0|#define IGRAPH_EIT_NEXT(eit) (++((eit).pos))
  ------------------
  942|      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)
  |  |  ------------------
  ------------------
  943|      0|            VECTOR(*res)[j] = VECTOR(*tmpres)[edge];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*res)[j] = VECTOR(*tmpres)[edge];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  944|      0|        }
  945|       |
  946|      0|        igraph_eit_destroy(&eit);
  947|      0|        igraph_vector_destroy(tmpres);
  948|      0|        IGRAPH_FINALLY_CLEAN(2);
  949|      0|    }
  950|       |
  951|       |    /* The betweenness calculation is always done for all _ordered_ vertex pairs.
  952|       |     * We only need to correct for this in undirected graphs when normalized=false. */
  953|  1.64k|    if (normalized) {
  ------------------
  |  Branch (953:9): [True: 0, False: 1.64k]
  ------------------
  954|      0|        normalization_factor = 1.0 / (no_of_nodes * (no_of_nodes - 1.0));
  955|  1.64k|    } else {
  956|  1.64k|        normalization_factor = directed ? 1.0 : 0.5;
  ------------------
  |  Branch (956:32): [True: 822, False: 822]
  ------------------
  957|  1.64k|    }
  958|       |
  959|  1.64k|    igraph_vector_scale(res, normalization_factor);
  960|       |
  961|  1.64k|    IGRAPH_PROGRESS("Edge betweenness centrality: ", 100.0, 0);
  ------------------
  |  |  169|  1.64k|    do { \
  |  |  170|  1.64k|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  656|  1.64k|    do { \
  |  |  |  |  657|  1.64k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.64k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.64k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  171|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (171:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  962|       |
  963|  1.64k|    igraph_stack_int_destroy(&S);
  964|  1.64k|    igraph_inclist_destroy(&inclist);
  965|  1.64k|    igraph_inclist_destroy(&parents);
  966|  1.64k|    igraph_vector_destroy(&dist);
  967|  1.64k|    IGRAPH_FREE(tmpscore);
  ------------------
  |  |   36|  1.64k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  968|  1.64k|    IGRAPH_FREE(nrgeo);
  ------------------
  |  |   36|  1.64k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  969|  1.64k|    IGRAPH_FINALLY_CLEAN(6);
  970|       |
  971|  1.64k|    return IGRAPH_SUCCESS;
  972|  1.64k|}
igraph_betweenness_subset:
 1017|    748|        igraph_bool_t directed, igraph_bool_t normalized) {
 1018|       |
 1019|    748|    igraph_int_t no_of_nodes = igraph_vcount(graph);
 1020|    748|    igraph_int_t no_of_edges = igraph_ecount(graph);
 1021|    748|    igraph_int_t no_of_sources;
 1022|    748|    igraph_int_t no_of_processed_sources;
 1023|    748|    igraph_adjlist_t adjlist, parents;
 1024|    748|    igraph_inclist_t inclist;
 1025|    748|    igraph_int_t source, j;
 1026|    748|    igraph_stack_int_t S;
 1027|    748|    igraph_vector_t v_tmpres, *tmpres = &v_tmpres;
 1028|    748|    igraph_neimode_t mode = directed ? IGRAPH_OUT : IGRAPH_ALL;
  ------------------
  |  Branch (1028:29): [True: 748, False: 0]
  ------------------
 1029|    748|    igraph_int_t parent;
 1030|    748|    igraph_vector_t dist;
 1031|    748|    igraph_real_t *nrgeo;
 1032|    748|    igraph_real_t *tmpscore;
 1033|    748|    igraph_vit_t vit;
 1034|    748|    bool *is_target;
 1035|       |
 1036|    748|    if (normalized) {
  ------------------
  |  Branch (1036:9): [True: 0, False: 748]
  ------------------
 1037|      0|        IGRAPH_ERROR("Normalization is not yet implemented for subset betweenness.", IGRAPH_UNIMPLEMENTED);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1038|      0|    }
 1039|       |
 1040|    748|    IGRAPH_CHECK(betweenness_check_weights(weights, no_of_edges));
  ------------------
  |  |  656|    748|    do { \
  |  |  657|    748|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    748|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    748|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 748]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    748|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 748]
  |  |  ------------------
  ------------------
 1041|       |
 1042|    748|    IGRAPH_CHECK(igraph_vs_size(graph, &sources, &no_of_sources));
  ------------------
  |  |  656|    748|    do { \
  |  |  657|    748|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    748|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    748|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 748]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    748|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 748]
  |  |  ------------------
  ------------------
 1043|       |
 1044|    748|    if (weights) {
  ------------------
  |  Branch (1044:9): [True: 748, False: 0]
  ------------------
 1045|    748|        IGRAPH_CHECK(igraph_inclist_init(graph, &inclist, mode, IGRAPH_NO_LOOPS));
  ------------------
  |  |  656|    748|    do { \
  |  |  657|    748|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    748|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    748|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 748]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    748|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 748]
  |  |  ------------------
  ------------------
 1046|    748|        IGRAPH_FINALLY(igraph_inclist_destroy, &inclist);
  ------------------
  |  |  603|    748|    do { \
  |  |  604|    748|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    748|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    748|         * incorrect destructor function with the pointer */ \
  |  |  607|    748|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 748]
  |  |  ------------------
  |  |  608|    748|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    748|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 748]
  |  |  ------------------
  ------------------
 1047|    748|    } else {
 1048|      0|        IGRAPH_CHECK(igraph_adjlist_init(graph, &adjlist, mode, IGRAPH_NO_LOOPS, IGRAPH_MULTIPLE));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1049|      0|        IGRAPH_FINALLY(igraph_adjlist_destroy, &adjlist);
  ------------------
  |  |  603|      0|    do { \
  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  ------------------
  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1050|      0|    }
 1051|       |
 1052|    748|    IGRAPH_CHECK(igraph_adjlist_init_empty(&parents, no_of_nodes));
  ------------------
  |  |  656|    748|    do { \
  |  |  657|    748|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    748|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    748|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 748]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    748|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 748]
  |  |  ------------------
  ------------------
 1053|    748|    IGRAPH_FINALLY(igraph_adjlist_destroy, &parents);
  ------------------
  |  |  603|    748|    do { \
  |  |  604|    748|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    748|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    748|         * incorrect destructor function with the pointer */ \
  |  |  607|    748|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 748]
  |  |  ------------------
  |  |  608|    748|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    748|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 748]
  |  |  ------------------
  ------------------
 1054|       |
 1055|    748|    IGRAPH_CHECK(igraph_stack_int_init(&S, no_of_nodes));
  ------------------
  |  |  656|    748|    do { \
  |  |  657|    748|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    748|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    748|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 748]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    748|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 748]
  |  |  ------------------
  ------------------
 1056|    748|    IGRAPH_FINALLY(igraph_stack_int_destroy, &S);
  ------------------
  |  |  603|    748|    do { \
  |  |  604|    748|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    748|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    748|         * incorrect destructor function with the pointer */ \
  |  |  607|    748|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 748]
  |  |  ------------------
  |  |  608|    748|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    748|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 748]
  |  |  ------------------
  ------------------
 1057|       |
 1058|    748|    IGRAPH_VECTOR_INIT_FINALLY(&dist, no_of_nodes);
  ------------------
  |  |  104|    748|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    748|    do { \
  |  |  |  |  657|    748|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    748|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    748|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 748]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    748|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 748]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|    748|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    748|    do { \
  |  |  |  |  604|    748|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    748|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    748|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    748|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 748]
  |  |  |  |  ------------------
  |  |  |  |  608|    748|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    748|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 748]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (105:60): [Folded, False: 748]
  |  |  ------------------
  ------------------
 1059|       |
 1060|    748|    nrgeo = IGRAPH_CALLOC(no_of_nodes, igraph_real_t);
  ------------------
  |  |   33|    748|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  1.49k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 748, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 748, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 748, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1061|    748|    IGRAPH_CHECK_OOM(nrgeo, "Insufficient memory for subset betweenness calculation.");
  ------------------
  |  |  709|    748|    do { \
  |  |  710|    748|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|    748|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 748]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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|    748|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 748]
  |  |  ------------------
  ------------------
 1062|    748|    IGRAPH_FINALLY(igraph_free, nrgeo);
  ------------------
  |  |  603|    748|    do { \
  |  |  604|    748|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    748|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    748|         * incorrect destructor function with the pointer */ \
  |  |  607|    748|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 748]
  |  |  ------------------
  |  |  608|    748|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    748|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 748]
  |  |  ------------------
  ------------------
 1063|       |
 1064|    748|    tmpscore = IGRAPH_CALLOC(no_of_nodes, igraph_real_t);
  ------------------
  |  |   33|    748|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  1.49k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 748, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 748, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 748, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1065|    748|    IGRAPH_CHECK_OOM(tmpscore, "Insufficient memory for subset betweenness calculation.");
  ------------------
  |  |  709|    748|    do { \
  |  |  710|    748|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|    748|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 748]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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|    748|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 748]
  |  |  ------------------
  ------------------
 1066|    748|    IGRAPH_FINALLY(igraph_free, tmpscore);
  ------------------
  |  |  603|    748|    do { \
  |  |  604|    748|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    748|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    748|         * incorrect destructor function with the pointer */ \
  |  |  607|    748|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 748]
  |  |  ------------------
  |  |  608|    748|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    748|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 748]
  |  |  ------------------
  ------------------
 1067|       |
 1068|    748|    is_target = IGRAPH_CALLOC(no_of_nodes, bool);
  ------------------
  |  |   33|    748|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  1.49k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 748, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 748, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 748, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1069|    748|    IGRAPH_CHECK_OOM(is_target, "Insufficient memory for subset betweenness calculation.");
  ------------------
  |  |  709|    748|    do { \
  |  |  710|    748|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|    748|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 748]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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|    748|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 748]
  |  |  ------------------
  ------------------
 1070|    748|    IGRAPH_FINALLY(igraph_free, is_target);
  ------------------
  |  |  603|    748|    do { \
  |  |  604|    748|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    748|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    748|         * incorrect destructor function with the pointer */ \
  |  |  607|    748|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 748]
  |  |  ------------------
  |  |  608|    748|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    748|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 748]
  |  |  ------------------
  ------------------
 1071|       |
 1072|    748|    IGRAPH_CHECK(igraph_vit_create(graph, targets, &vit));
  ------------------
  |  |  656|    748|    do { \
  |  |  657|    748|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    748|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    748|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 748]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    748|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 748]
  |  |  ------------------
  ------------------
 1073|    748|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  603|    748|    do { \
  |  |  604|    748|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    748|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    748|         * incorrect destructor function with the pointer */ \
  |  |  607|    748|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 748]
  |  |  ------------------
  |  |  608|    748|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    748|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 748]
  |  |  ------------------
  ------------------
 1074|  4.48k|    for (IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  201|    748|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
                  for (IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  179|  4.48k|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
                  for (IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  167|  3.74k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  |  Branch (1074:33): [True: 3.74k, False: 748]
  ------------------
 1075|  3.74k|        is_target[IGRAPH_VIT_GET(vit)] = true;
  ------------------
  |  |  214|  3.74k|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 3.74k, False: 0]
  |  |  ------------------
  |  |  215|  3.74k|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1076|  3.74k|    }
 1077|    748|    igraph_vit_destroy(&vit);
 1078|    748|    IGRAPH_FINALLY_CLEAN(1);
 1079|       |
 1080|    748|    if (!igraph_vs_is_all(&vids)) {
  ------------------
  |  Branch (1080:9): [True: 0, False: 748]
  ------------------
 1081|       |        /* result needed only for a subset of the vertices */
 1082|      0|        IGRAPH_VECTOR_INIT_FINALLY(tmpres, no_of_nodes);
  ------------------
  |  |  104|      0|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|      0|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|      0|    do { \
  |  |  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (105:60): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1083|    748|    } else {
 1084|       |        /* result covers all vertices */
 1085|    748|        IGRAPH_CHECK(igraph_vector_resize(res, no_of_nodes));
  ------------------
  |  |  656|    748|    do { \
  |  |  657|    748|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    748|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    748|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 748]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    748|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 748]
  |  |  ------------------
  ------------------
 1086|    748|        igraph_vector_null(res);
 1087|    748|        tmpres = res;
 1088|    748|    }
 1089|       |
 1090|    748|    IGRAPH_CHECK(igraph_vit_create(graph, sources, &vit));
  ------------------
  |  |  656|    748|    do { \
  |  |  657|    748|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    748|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    748|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 748]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    748|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 748]
  |  |  ------------------
  ------------------
 1091|    748|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  603|    748|    do { \
  |  |  604|    748|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    748|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    748|         * incorrect destructor function with the pointer */ \
  |  |  607|    748|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 748]
  |  |  ------------------
  |  |  608|    748|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    748|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 748]
  |  |  ------------------
  ------------------
 1092|       |
 1093|    748|    for (
 1094|    748|        no_of_processed_sources = 0, IGRAPH_VIT_RESET(vit);
  ------------------
  |  |  201|    748|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
 1095|  4.48k|        !IGRAPH_VIT_END(vit);
  ------------------
  |  |  179|  4.48k|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (1095:9): [True: 3.74k, False: 748]
  ------------------
 1096|  3.74k|        IGRAPH_VIT_NEXT(vit), no_of_processed_sources++
  ------------------
  |  |  167|  3.74k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
 1097|  3.74k|    ) {
 1098|  3.74k|        source = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  214|  3.74k|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 3.74k, False: 0]
  |  |  ------------------
  |  |  215|  3.74k|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1099|       |
 1100|  3.74k|        IGRAPH_PROGRESS(
  ------------------
  |  |  169|  3.74k|    do { \
  |  |  170|  3.74k|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  656|  3.74k|    do { \
  |  |  |  |  657|  3.74k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  3.74k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  3.74k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.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|  3.74k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 3.74k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  171|  3.74k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (171:14): [Folded, False: 3.74k]
  |  |  ------------------
  ------------------
 1101|  3.74k|            "Betweenness centrality (subset): ",
 1102|  3.74k|            100.0 * no_of_processed_sources / no_of_sources, 0
 1103|  3.74k|        );
 1104|  3.74k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|  3.74k|    do { \
  |  |   47|  3.74k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 3.74k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|  3.74k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 3.74k]
  |  |  ------------------
  ------------------
 1105|       |
 1106|       |        /* Loop invariant that is valid at this point:
 1107|       |         *
 1108|       |         * - the stack S is empty
 1109|       |         * - the 'dist' vector contains zeros only
 1110|       |         * - the 'nrgeo' array contains zeros only
 1111|       |         * - the 'tmpscore' array contains zeros only
 1112|       |         * - the 'parents' adjacency list contains empty vectors only
 1113|       |         */
 1114|       |
 1115|       |        /* TODO: there is more room for optimization here; the single-source
 1116|       |         * shortest path search runs until it reaches all the nodes in the
 1117|       |         * component of the source node even if we are only interested in a
 1118|       |         * smaller target subset. We could stop the search when all target
 1119|       |         * nodes were reached.
 1120|       |         */
 1121|       |
 1122|       |        /* Conduct a single-source shortest path search from the source node */
 1123|  3.74k|        if (weights) {
  ------------------
  |  Branch (1123:13): [True: 3.74k, False: 0]
  ------------------
 1124|  3.74k|            IGRAPH_CHECK(sspf_weighted(graph, source, &dist, nrgeo, weights, &S, &parents, &inclist, -1));
  ------------------
  |  |  656|  3.74k|    do { \
  |  |  657|  3.74k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  3.74k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  3.74k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.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|  3.74k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 3.74k]
  |  |  ------------------
  ------------------
 1125|  3.74k|        } else {
 1126|      0|            IGRAPH_CHECK(sspf(source, &dist, nrgeo, &S, &parents, &adjlist, -1));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1127|      0|        }
 1128|       |
 1129|       |        /* Aggregate betweenness scores for the nodes we have reached in this
 1130|       |         * traversal */
 1131|  19.1k|        while (!igraph_stack_int_empty(&S)) {
  ------------------
  |  Branch (1131:16): [True: 15.3k, False: 3.74k]
  ------------------
 1132|  15.3k|            igraph_int_t actnode = igraph_stack_int_pop(&S);
 1133|  15.3k|            igraph_vector_int_t *parentv = igraph_adjlist_get(&parents, actnode);
  ------------------
  |  |   73|  15.3k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
 1134|  15.3k|            igraph_int_t parentv_len = igraph_vector_int_size(parentv);
 1135|  15.3k|            igraph_real_t coeff;
 1136|       |
 1137|  15.3k|            if (is_target[actnode]) {
  ------------------
  |  Branch (1137:17): [True: 1.15k, False: 14.2k]
  ------------------
 1138|  1.15k|                coeff = (1 + tmpscore[actnode]) / nrgeo[actnode];
 1139|  14.2k|            } else {
 1140|  14.2k|                coeff = tmpscore[actnode] / nrgeo[actnode];
 1141|  14.2k|            }
 1142|       |
 1143|  31.3k|            for (j = 0; j < parentv_len; j++) {
  ------------------
  |  Branch (1143:25): [True: 15.9k, False: 15.3k]
  ------------------
 1144|  15.9k|                parent = VECTOR(*parentv)[j];
  ------------------
  |  |   60|  15.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1145|  15.9k|                tmpscore[parent] += nrgeo[parent] * coeff;
 1146|  15.9k|            }
 1147|       |
 1148|  15.3k|            if (actnode != source) {
  ------------------
  |  Branch (1148:17): [True: 11.6k, False: 3.74k]
  ------------------
 1149|  11.6k|                VECTOR(*tmpres)[actnode] += tmpscore[actnode];
  ------------------
  |  |   60|  11.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1150|  11.6k|            }
 1151|       |
 1152|       |            /* Reset variables to ensure that the 'for' loop invariant will
 1153|       |             * still be valid in the next iteration */
 1154|       |
 1155|  15.3k|            VECTOR(dist)[actnode] = 0;
  ------------------
  |  |   60|  15.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1156|  15.3k|            nrgeo[actnode] = 0;
 1157|  15.3k|            tmpscore[actnode] = 0;
 1158|  15.3k|            igraph_vector_int_clear(parentv);
 1159|  15.3k|        }
 1160|  3.74k|    }
 1161|       |
 1162|    748|    igraph_vit_destroy(&vit);
 1163|    748|    IGRAPH_FINALLY_CLEAN(1);
 1164|       |
 1165|       |    /* Keep only the requested vertices */
 1166|    748|    if (!igraph_vs_is_all(&vids)) {
  ------------------
  |  Branch (1166:9): [True: 0, False: 748]
  ------------------
 1167|      0|        IGRAPH_CHECK(igraph_vit_create(graph, vids, &vit));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1168|      0|        IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  603|      0|    do { \
  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  ------------------
  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1169|       |
 1170|      0|        IGRAPH_CHECK(igraph_vector_resize(res, IGRAPH_VIT_SIZE(vit)));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1171|      0|        for (j = 0, IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit);
  ------------------
  |  |  201|      0|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
                      for (j = 0, IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit);
  ------------------
  |  |  179|      0|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (1171:44): [True: 0, False: 0]
  ------------------
 1172|      0|             IGRAPH_VIT_NEXT(vit), j++) {
  ------------------
  |  |  167|      0|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
 1173|      0|            igraph_int_t node = 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)
  |  |  ------------------
  ------------------
 1174|      0|            VECTOR(*res)[j] = VECTOR(*tmpres)[node];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*res)[j] = VECTOR(*tmpres)[node];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1175|      0|        }
 1176|       |
 1177|      0|        igraph_vit_destroy(&vit);
 1178|      0|        igraph_vector_destroy(tmpres);
 1179|      0|        IGRAPH_FINALLY_CLEAN(2);
 1180|      0|    }
 1181|       |
 1182|    748|   if (!directed || !igraph_is_directed(graph)) {
  ------------------
  |  Branch (1182:8): [True: 0, False: 748]
  |  Branch (1182:21): [True: 0, False: 748]
  ------------------
 1183|      0|        igraph_vector_scale(res, 0.5);
 1184|      0|    }
 1185|       |
 1186|    748|    IGRAPH_FREE(is_target);
  ------------------
  |  |   36|    748|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1187|    748|    IGRAPH_FREE(tmpscore);
  ------------------
  |  |   36|    748|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1188|    748|    IGRAPH_FREE(nrgeo);
  ------------------
  |  |   36|    748|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1189|    748|    igraph_vector_destroy(&dist);
 1190|    748|    igraph_stack_int_destroy(&S);
 1191|    748|    igraph_adjlist_destroy(&parents);
 1192|    748|    if (weights) {
  ------------------
  |  Branch (1192:9): [True: 748, False: 0]
  ------------------
 1193|    748|        igraph_inclist_destroy(&inclist);
 1194|    748|    } else {
 1195|      0|        igraph_adjlist_destroy(&adjlist);
 1196|      0|    }
 1197|    748|    IGRAPH_FINALLY_CLEAN(7);
 1198|       |
 1199|    748|    return IGRAPH_SUCCESS;
 1200|    748|}
igraph_edge_betweenness_subset:
 1244|    748|        igraph_bool_t directed, igraph_bool_t normalized) {
 1245|       |
 1246|    748|    igraph_int_t no_of_nodes = igraph_vcount(graph);
 1247|    748|    igraph_int_t no_of_edges = igraph_ecount(graph);
 1248|    748|    igraph_int_t no_of_sources;
 1249|    748|    igraph_int_t no_of_processed_sources;
 1250|    748|    igraph_inclist_t inclist, parents;
 1251|    748|    igraph_vit_t vit;
 1252|    748|    igraph_eit_t eit;
 1253|    748|    igraph_neimode_t mode = directed ? IGRAPH_OUT : IGRAPH_ALL;
  ------------------
  |  Branch (1253:29): [True: 748, False: 0]
  ------------------
 1254|    748|    igraph_vector_t dist;
 1255|    748|    igraph_vector_t v_tmpres, *tmpres = &v_tmpres;
 1256|    748|    igraph_real_t *nrgeo;
 1257|    748|    igraph_real_t *tmpscore;
 1258|    748|    igraph_int_t source, j;
 1259|    748|    bool *is_target;
 1260|    748|    igraph_stack_int_t S;
 1261|       |
 1262|    748|    if (normalized) {
  ------------------
  |  Branch (1262:9): [True: 0, False: 748]
  ------------------
 1263|      0|        IGRAPH_ERROR("Normalization is not yet implemented for subset edge betweenness.", IGRAPH_UNIMPLEMENTED);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1264|      0|    }
 1265|       |
 1266|    748|    IGRAPH_CHECK(betweenness_check_weights(weights, no_of_edges));
  ------------------
  |  |  656|    748|    do { \
  |  |  657|    748|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    748|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    748|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 748]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    748|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 748]
  |  |  ------------------
  ------------------
 1267|       |
 1268|    748|    IGRAPH_CHECK(igraph_vs_size(graph, &sources, &no_of_sources));
  ------------------
  |  |  656|    748|    do { \
  |  |  657|    748|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    748|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    748|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 748]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    748|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 748]
  |  |  ------------------
  ------------------
 1269|       |
 1270|    748|    is_target = IGRAPH_CALLOC(no_of_nodes, bool);
  ------------------
  |  |   33|    748|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  1.49k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 748, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 748, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 748, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1271|    748|    IGRAPH_CHECK_OOM(is_target, "Insufficient memory for subset edge betweenness calculation.");
  ------------------
  |  |  709|    748|    do { \
  |  |  710|    748|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|    748|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 748]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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|    748|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 748]
  |  |  ------------------
  ------------------
 1272|    748|    IGRAPH_FINALLY(igraph_free, is_target);
  ------------------
  |  |  603|    748|    do { \
  |  |  604|    748|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    748|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    748|         * incorrect destructor function with the pointer */ \
  |  |  607|    748|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 748]
  |  |  ------------------
  |  |  608|    748|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    748|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 748]
  |  |  ------------------
  ------------------
 1273|       |
 1274|    748|    IGRAPH_CHECK(igraph_vit_create(graph, targets, &vit));
  ------------------
  |  |  656|    748|    do { \
  |  |  657|    748|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    748|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    748|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 748]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    748|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 748]
  |  |  ------------------
  ------------------
 1275|    748|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  603|    748|    do { \
  |  |  604|    748|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    748|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    748|         * incorrect destructor function with the pointer */ \
  |  |  607|    748|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 748]
  |  |  ------------------
  |  |  608|    748|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    748|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 748]
  |  |  ------------------
  ------------------
 1276|  8.22k|    for (IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  201|    748|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
                  for (IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  179|  8.22k|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
                  for (IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  167|  7.48k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  |  Branch (1276:33): [True: 7.48k, False: 748]
  ------------------
 1277|  7.48k|        is_target[IGRAPH_VIT_GET(vit)] = true;
  ------------------
  |  |  214|  7.48k|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 7.48k, False: 0]
  |  |  ------------------
  |  |  215|  7.48k|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1278|  7.48k|    }
 1279|    748|    igraph_vit_destroy(&vit);
 1280|    748|    IGRAPH_FINALLY_CLEAN(1);
 1281|       |
 1282|    748|    IGRAPH_CHECK(igraph_inclist_init(graph, &inclist, mode, IGRAPH_NO_LOOPS));
  ------------------
  |  |  656|    748|    do { \
  |  |  657|    748|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    748|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    748|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 748]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    748|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 748]
  |  |  ------------------
  ------------------
 1283|    748|    IGRAPH_FINALLY(igraph_inclist_destroy, &inclist);
  ------------------
  |  |  603|    748|    do { \
  |  |  604|    748|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    748|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    748|         * incorrect destructor function with the pointer */ \
  |  |  607|    748|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 748]
  |  |  ------------------
  |  |  608|    748|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    748|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 748]
  |  |  ------------------
  ------------------
 1284|    748|    IGRAPH_CHECK(igraph_inclist_init_empty(&parents, no_of_nodes));
  ------------------
  |  |  656|    748|    do { \
  |  |  657|    748|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    748|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    748|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 748]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    748|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 748]
  |  |  ------------------
  ------------------
 1285|    748|    IGRAPH_FINALLY(igraph_inclist_destroy, &parents);
  ------------------
  |  |  603|    748|    do { \
  |  |  604|    748|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    748|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    748|         * incorrect destructor function with the pointer */ \
  |  |  607|    748|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 748]
  |  |  ------------------
  |  |  608|    748|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    748|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 748]
  |  |  ------------------
  ------------------
 1286|       |
 1287|    748|    IGRAPH_VECTOR_INIT_FINALLY(&dist, no_of_nodes);
  ------------------
  |  |  104|    748|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    748|    do { \
  |  |  |  |  657|    748|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    748|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    748|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 748]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    748|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 748]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|    748|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    748|    do { \
  |  |  |  |  604|    748|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    748|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    748|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    748|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 748]
  |  |  |  |  ------------------
  |  |  |  |  608|    748|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    748|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 748]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (105:60): [Folded, False: 748]
  |  |  ------------------
  ------------------
 1288|       |
 1289|    748|    nrgeo = IGRAPH_CALLOC(no_of_nodes, igraph_real_t);
  ------------------
  |  |   33|    748|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  1.49k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 748, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 748, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 748, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1290|    748|    IGRAPH_CHECK_OOM(nrgeo, "Insufficient memory for subset edge betweenness calculation.");
  ------------------
  |  |  709|    748|    do { \
  |  |  710|    748|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|    748|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 748]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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|    748|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 748]
  |  |  ------------------
  ------------------
 1291|    748|    IGRAPH_FINALLY(igraph_free, nrgeo);
  ------------------
  |  |  603|    748|    do { \
  |  |  604|    748|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    748|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    748|         * incorrect destructor function with the pointer */ \
  |  |  607|    748|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 748]
  |  |  ------------------
  |  |  608|    748|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    748|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 748]
  |  |  ------------------
  ------------------
 1292|       |
 1293|    748|    tmpscore = IGRAPH_CALLOC(no_of_nodes, igraph_real_t);
  ------------------
  |  |   33|    748|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  1.49k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 748, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 748, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 748, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1294|    748|    IGRAPH_CHECK_OOM(tmpscore, "Insufficient memory for subset edge betweenness calculation.");
  ------------------
  |  |  709|    748|    do { \
  |  |  710|    748|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|    748|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 748]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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|    748|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 748]
  |  |  ------------------
  ------------------
 1295|    748|    IGRAPH_FINALLY(igraph_free, tmpscore);
  ------------------
  |  |  603|    748|    do { \
  |  |  604|    748|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    748|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    748|         * incorrect destructor function with the pointer */ \
  |  |  607|    748|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 748]
  |  |  ------------------
  |  |  608|    748|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    748|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 748]
  |  |  ------------------
  ------------------
 1296|       |
 1297|    748|    IGRAPH_CHECK(igraph_stack_int_init(&S, no_of_nodes));
  ------------------
  |  |  656|    748|    do { \
  |  |  657|    748|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    748|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    748|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 748]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    748|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 748]
  |  |  ------------------
  ------------------
 1298|    748|    IGRAPH_FINALLY(igraph_stack_int_destroy, &S);
  ------------------
  |  |  603|    748|    do { \
  |  |  604|    748|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    748|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    748|         * incorrect destructor function with the pointer */ \
  |  |  607|    748|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 748]
  |  |  ------------------
  |  |  608|    748|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    748|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 748]
  |  |  ------------------
  ------------------
 1299|       |
 1300|    748|    if (!igraph_es_is_all(&eids)) {
  ------------------
  |  Branch (1300:9): [True: 0, False: 748]
  ------------------
 1301|       |        /* result needed only for a subset of the vertices */
 1302|      0|        IGRAPH_VECTOR_INIT_FINALLY(tmpres, no_of_edges);
  ------------------
  |  |  104|      0|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|      0|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|      0|    do { \
  |  |  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (105:60): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1303|    748|    } else {
 1304|       |        /* result covers all vertices */
 1305|    748|        IGRAPH_CHECK(igraph_vector_resize(res, no_of_edges));
  ------------------
  |  |  656|    748|    do { \
  |  |  657|    748|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    748|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    748|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 748]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    748|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 748]
  |  |  ------------------
  ------------------
 1306|    748|        igraph_vector_null(res);
 1307|    748|        tmpres = res;
 1308|    748|    }
 1309|       |
 1310|    748|    IGRAPH_CHECK(igraph_vit_create(graph, sources, &vit));
  ------------------
  |  |  656|    748|    do { \
  |  |  657|    748|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    748|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    748|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 748]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    748|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 748]
  |  |  ------------------
  ------------------
 1311|    748|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  603|    748|    do { \
  |  |  604|    748|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    748|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    748|         * incorrect destructor function with the pointer */ \
  |  |  607|    748|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 748]
  |  |  ------------------
  |  |  608|    748|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    748|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 748]
  |  |  ------------------
  ------------------
 1312|       |
 1313|    748|    for (
 1314|    748|        no_of_processed_sources = 0, IGRAPH_VIT_RESET(vit);
  ------------------
  |  |  201|    748|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
 1315|  8.22k|        !IGRAPH_VIT_END(vit);
  ------------------
  |  |  179|  8.22k|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (1315:9): [True: 7.48k, False: 748]
  ------------------
 1316|  7.48k|        IGRAPH_VIT_NEXT(vit), no_of_processed_sources++
  ------------------
  |  |  167|  7.48k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
 1317|  7.48k|    ) {
 1318|  7.48k|        source = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  214|  7.48k|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 7.48k, False: 0]
  |  |  ------------------
  |  |  215|  7.48k|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1319|       |
 1320|  7.48k|        IGRAPH_PROGRESS(
  ------------------
  |  |  169|  7.48k|    do { \
  |  |  170|  7.48k|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  656|  7.48k|    do { \
  |  |  |  |  657|  7.48k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  7.48k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  7.48k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 7.48k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  7.48k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 7.48k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  171|  7.48k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (171:14): [Folded, False: 7.48k]
  |  |  ------------------
  ------------------
 1321|  7.48k|            "Edge betweenness centrality (subset): ",
 1322|  7.48k|            100.0 * no_of_processed_sources / no_of_sources, 0
 1323|  7.48k|        );
 1324|  7.48k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|  7.48k|    do { \
  |  |   47|  7.48k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 7.48k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|  7.48k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 7.48k]
  |  |  ------------------
  ------------------
 1325|       |
 1326|       |        /* Loop invariant that is valid at this point:
 1327|       |         *
 1328|       |         * - the stack S is empty
 1329|       |         * - the 'dist' vector contains zeros only
 1330|       |         * - the 'nrgeo' array contains zeros only
 1331|       |         * - the 'tmpscore' array contains zeros only
 1332|       |         * - the 'parents' incidence list contains empty vectors only
 1333|       |         */
 1334|       |
 1335|       |        /* TODO: there is more room for optimization here; the single-source
 1336|       |         * shortest path search runs until it reaches all the nodes in the
 1337|       |         * component of the source node even if we are only interested in a
 1338|       |         * smaller target subset. We could stop the search when all target
 1339|       |         * nodes were reached.
 1340|       |         */
 1341|       |
 1342|       |        /* Conduct a single-source shortest path search from the source node */
 1343|  7.48k|        if (weights) {
  ------------------
  |  Branch (1343:13): [True: 7.48k, False: 0]
  ------------------
 1344|  7.48k|            IGRAPH_CHECK(sspf_weighted_edge(graph, source, &dist, nrgeo, weights, &S, &parents, &inclist, -1));
  ------------------
  |  |  656|  7.48k|    do { \
  |  |  657|  7.48k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  7.48k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  7.48k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 7.48k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  7.48k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 7.48k]
  |  |  ------------------
  ------------------
 1345|  7.48k|        } else {
 1346|      0|            IGRAPH_CHECK(sspf_edge(graph, source, &dist, nrgeo, &S, &parents, &inclist, -1));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1347|      0|        }
 1348|       |
 1349|       |        /* Aggregate betweenness scores for the nodes we have reached in this
 1350|       |         * traversal */
 1351|  32.3k|        while (!igraph_stack_int_empty(&S)) {
  ------------------
  |  Branch (1351:16): [True: 24.9k, False: 7.48k]
  ------------------
 1352|  24.9k|            igraph_int_t actnode = igraph_stack_int_pop(&S);
 1353|  24.9k|            igraph_vector_int_t *parentv = igraph_inclist_get(&parents, actnode);
  ------------------
  |  |  102|  24.9k|#define igraph_inclist_get(il,no) (&(il)->incs[(igraph_int_t)(no)])
  ------------------
 1354|  24.9k|            igraph_int_t parentv_len = igraph_vector_int_size(parentv);
 1355|  24.9k|            igraph_real_t coeff;
 1356|       |
 1357|  24.9k|            if (is_target[actnode]) {
  ------------------
  |  Branch (1357:17): [True: 11.9k, False: 12.9k]
  ------------------
 1358|  11.9k|                coeff = (1 + tmpscore[actnode]) / nrgeo[actnode];
 1359|  12.9k|            } else {
 1360|  12.9k|                coeff = tmpscore[actnode] / nrgeo[actnode];
 1361|  12.9k|            }
 1362|       |
 1363|  47.2k|            for (j = 0; j < parentv_len; j++) {
  ------------------
  |  Branch (1363:25): [True: 22.3k, False: 24.9k]
  ------------------
 1364|  22.3k|                igraph_int_t parent_edge = VECTOR(*parentv)[j];
  ------------------
  |  |   60|  22.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1365|  22.3k|                igraph_int_t neighbor = IGRAPH_OTHER(graph, parent_edge, actnode);
  ------------------
  |  |  146|  22.3k|    ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|  22.3k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  22.3k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  115|  22.3k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  22.3k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|      0|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (146:21): [True: 22.3k, False: 0]
  |  |  ------------------
  ------------------
 1366|  22.3k|                tmpscore[neighbor] += nrgeo[neighbor] * coeff;
 1367|  22.3k|                VECTOR(*tmpres)[parent_edge] += nrgeo[neighbor] * coeff;
  ------------------
  |  |   60|  22.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1368|  22.3k|            }
 1369|       |
 1370|       |            /* Reset variables to ensure that the 'for' loop invariant will
 1371|       |             * still be valid in the next iteration */
 1372|       |
 1373|  24.9k|            VECTOR(dist)[actnode] = 0;
  ------------------
  |  |   60|  24.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1374|  24.9k|            nrgeo[actnode] = 0;
 1375|  24.9k|            tmpscore[actnode] = 0;
 1376|  24.9k|            igraph_vector_int_clear(parentv);
 1377|  24.9k|        }
 1378|  7.48k|    }
 1379|       |
 1380|    748|    igraph_vit_destroy(&vit);
 1381|    748|    IGRAPH_FINALLY_CLEAN(1);
 1382|       |
 1383|       |    /* Keep only the requested edges */
 1384|    748|    if (!igraph_es_is_all(&eids)) {
  ------------------
  |  Branch (1384:9): [True: 0, False: 748]
  ------------------
 1385|      0|        IGRAPH_CHECK(igraph_eit_create(graph, eids, &eit));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1386|      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]
  |  |  ------------------
  ------------------
 1387|       |
 1388|      0|        IGRAPH_CHECK(igraph_vector_resize(res, IGRAPH_EIT_SIZE(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]
  |  |  ------------------
  ------------------
 1389|       |
 1390|      0|        for (j = 0, IGRAPH_EIT_RESET(eit); !IGRAPH_EIT_END(eit);
  ------------------
  |  |  393|      0|#define IGRAPH_EIT_RESET(eit) ((eit).pos = (eit).start)
  ------------------
                      for (j = 0, IGRAPH_EIT_RESET(eit); !IGRAPH_EIT_END(eit);
  ------------------
  |  |  371|      0|#define IGRAPH_EIT_END(eit)   ((eit).pos >= (eit).end)
  ------------------
  |  Branch (1390:44): [True: 0, False: 0]
  ------------------
 1391|      0|             IGRAPH_EIT_NEXT(eit), j++) {
  ------------------
  |  |  359|      0|#define IGRAPH_EIT_NEXT(eit) (++((eit).pos))
  ------------------
 1392|      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)
  |  |  ------------------
  ------------------
 1393|      0|            VECTOR(*res)[j] = VECTOR(*tmpres)[edge];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*res)[j] = VECTOR(*tmpres)[edge];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1394|      0|        }
 1395|       |
 1396|      0|        igraph_eit_destroy(&eit);
 1397|      0|        igraph_vector_destroy(tmpres);
 1398|      0|        IGRAPH_FINALLY_CLEAN(2);
 1399|      0|    }
 1400|       |
 1401|       |
 1402|    748|    if (!directed || !igraph_is_directed(graph)) {
  ------------------
  |  Branch (1402:9): [True: 0, False: 748]
  |  Branch (1402:22): [True: 0, False: 748]
  ------------------
 1403|      0|        igraph_vector_scale(res, 0.5);
 1404|      0|    }
 1405|       |
 1406|    748|    igraph_stack_int_destroy(&S);
 1407|    748|    IGRAPH_FREE(tmpscore);
  ------------------
  |  |   36|    748|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1408|    748|    IGRAPH_FREE(nrgeo);
  ------------------
  |  |   36|    748|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1409|    748|    igraph_vector_destroy(&dist);
 1410|    748|    igraph_inclist_destroy(&parents);
 1411|    748|    igraph_inclist_destroy(&inclist);
 1412|    748|    IGRAPH_FREE(is_target);
  ------------------
  |  |   36|    748|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1413|    748|    IGRAPH_FINALLY_CLEAN(7);
 1414|       |
 1415|    748|    return IGRAPH_SUCCESS;
 1416|    748|}
betweenness.c:betweenness_check_weights:
  427|  4.78k|) {
  428|  4.78k|    igraph_real_t minweight;
  429|       |
  430|  4.78k|    if (weights) {
  ------------------
  |  Branch (430:9): [True: 4.78k, False: 0]
  ------------------
  431|  4.78k|        if (igraph_vector_size(weights) != no_of_edges) {
  ------------------
  |  Branch (431:13): [True: 0, False: 4.78k]
  ------------------
  432|      0|            IGRAPH_ERROR("Edge weight vector length must match the number of edges.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  433|      0|        }
  434|  4.78k|        if (no_of_edges > 0) {
  ------------------
  |  Branch (434:13): [True: 4.53k, False: 252]
  ------------------
  435|  4.53k|            minweight = igraph_vector_min(weights);
  436|  4.53k|            if (minweight <= 0) {
  ------------------
  |  Branch (436:17): [True: 0, False: 4.53k]
  ------------------
  437|      0|                IGRAPH_ERROR("Edge weights must be positive for betweenness.", 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]
  |  |  ------------------
  ------------------
  438|  4.53k|            } else if (isnan(minweight)) {
  ------------------
  |  Branch (438:24): [True: 0, False: 4.53k]
  ------------------
  439|      0|                IGRAPH_ERROR("Edge weights must not contain NaN values.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  440|  4.53k|            } else if (minweight <= IGRAPH_SHORTEST_PATH_EPSILON) {
  ------------------
  |  |   35|  4.53k|#define IGRAPH_SHORTEST_PATH_EPSILON 1e-10
  ------------------
  |  Branch (440:24): [True: 0, False: 4.53k]
  ------------------
  441|      0|                IGRAPH_WARNINGF(
  ------------------
  |  |  777|      0|    do { \
  |  |  778|      0|        igraph_warningf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  779|      0|                        __VA_ARGS__); \
  |  |  780|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (780:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  442|      0|                    "Some weights are smaller than the path length comparison tolerance (%g); "
  443|      0|                    "betweenness calculations may suffer from numerical precision issues.",
  444|      0|                    IGRAPH_SHORTEST_PATH_EPSILON
  445|      0|                );
  446|      0|            }
  447|  4.53k|        }
  448|  4.78k|    }
  449|       |
  450|  4.78k|    return IGRAPH_SUCCESS;
  451|  4.78k|}
betweenness.c:sspf_weighted:
  234|  77.5k|        igraph_real_t cutoff) {
  235|       |
  236|  77.5k|    const igraph_real_t eps = IGRAPH_SHORTEST_PATH_EPSILON;
  ------------------
  |  |   35|  77.5k|#define IGRAPH_SHORTEST_PATH_EPSILON 1e-10
  ------------------
  237|       |
  238|  77.5k|    int cmp_result;
  239|  77.5k|    igraph_2wheap_t queue;
  240|  77.5k|    const igraph_vector_int_t *neis;
  241|  77.5k|    igraph_vector_int_t *v;
  242|  77.5k|    igraph_int_t nlen;
  243|       |
  244|       |    /* TODO: this is an O|V| step here. We could save some time by pre-allocating
  245|       |     * the two-way heap in the caller and re-using it here */
  246|  77.5k|    IGRAPH_CHECK(igraph_2wheap_init(&queue, igraph_vcount(graph)));
  ------------------
  |  |  656|  77.5k|    do { \
  |  |  657|  77.5k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  77.5k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  77.5k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 77.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  77.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 77.5k]
  |  |  ------------------
  ------------------
  247|  77.5k|    IGRAPH_FINALLY(igraph_2wheap_destroy, &queue);
  ------------------
  |  |  603|  77.5k|    do { \
  |  |  604|  77.5k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  77.5k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  77.5k|         * incorrect destructor function with the pointer */ \
  |  |  607|  77.5k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 77.5k]
  |  |  ------------------
  |  |  608|  77.5k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  77.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 77.5k]
  |  |  ------------------
  ------------------
  248|       |
  249|  77.5k|    igraph_2wheap_push_with_index(&queue, source, -1.0); /* reserved */
  250|  77.5k|    VECTOR(*dist)[source] = 1.0;
  ------------------
  |  |   60|  77.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  251|  77.5k|    nrgeo[source] = 1;
  252|       |
  253|   387k|    while (!igraph_2wheap_empty(&queue)) {
  ------------------
  |  Branch (253:12): [True: 310k, False: 77.5k]
  ------------------
  254|   310k|        igraph_int_t minnei = igraph_2wheap_max_index(&queue);
  255|   310k|        igraph_real_t mindist = -igraph_2wheap_delete_max(&queue);
  256|       |
  257|       |        /* Ignore vertices that are more distant than the cutoff */
  258|   310k|        if (cutoff >= 0 && mindist > cutoff + 1.0) {
  ------------------
  |  Branch (258:13): [True: 295k, False: 15.3k]
  |  Branch (258:28): [True: 3.26k, False: 291k]
  ------------------
  259|       |            /* Reset variables if node is too distant */
  260|  3.26k|            VECTOR(*dist)[minnei] = 0;
  ------------------
  |  |   60|  3.26k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  261|  3.26k|            nrgeo[minnei] = 0;
  262|  3.26k|            igraph_vector_int_clear(igraph_adjlist_get(parents, minnei));
  ------------------
  |  |   73|  3.26k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  263|  3.26k|            continue;
  264|  3.26k|        }
  265|       |
  266|       |        /* Record that we have visited this node */
  267|   307k|        IGRAPH_CHECK(igraph_stack_int_push(stack, minnei));
  ------------------
  |  |  656|   307k|    do { \
  |  |  657|   307k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   307k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   307k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 307k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   307k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 307k]
  |  |  ------------------
  ------------------
  268|       |
  269|       |        /* Now check all neighbors of 'minnei' for a shorter path */
  270|   307k|        neis = igraph_inclist_get(inclist, minnei);
  ------------------
  |  |  102|   307k|#define igraph_inclist_get(il,no) (&(il)->incs[(igraph_int_t)(no)])
  ------------------
  271|   307k|        nlen = igraph_vector_int_size(neis);
  272|  1.05M|        for (igraph_int_t j = 0; j < nlen; j++) {
  ------------------
  |  Branch (272:34): [True: 750k, False: 307k]
  ------------------
  273|   750k|            igraph_int_t edge = VECTOR(*neis)[j];
  ------------------
  |  |   60|   750k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  274|   750k|            igraph_int_t to = IGRAPH_OTHER(graph, edge, minnei);
  ------------------
  |  |  146|   750k|    ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|   750k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   750k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  115|   292k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   292k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|   458k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   458k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (146:21): [True: 292k, False: 458k]
  |  |  ------------------
  ------------------
  275|   750k|            igraph_real_t altdist = mindist + VECTOR(*weights)[edge];
  ------------------
  |  |   60|   750k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  276|   750k|            igraph_real_t curdist = VECTOR(*dist)[to];
  ------------------
  |  |   60|   750k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  277|       |
  278|   750k|            if (curdist == 0) {
  ------------------
  |  Branch (278:17): [True: 232k, False: 518k]
  ------------------
  279|       |                /* this means curdist is infinity */
  280|   232k|                cmp_result = -1;
  281|   518k|            } else {
  282|   518k|                cmp_result = igraph_cmp_epsilon(altdist, curdist, eps);
  283|   518k|            }
  284|       |
  285|   750k|            if (curdist == 0) {
  ------------------
  |  Branch (285:17): [True: 232k, False: 518k]
  ------------------
  286|       |                /* This is the first non-infinite distance */
  287|   232k|                v = igraph_adjlist_get(parents, to);
  ------------------
  |  |   73|   232k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  288|   232k|                IGRAPH_CHECK(igraph_vector_int_resize(v, 1));
  ------------------
  |  |  656|   232k|    do { \
  |  |  657|   232k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   232k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   232k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 232k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   232k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 232k]
  |  |  ------------------
  ------------------
  289|   232k|                VECTOR(*v)[0] = minnei;
  ------------------
  |  |   60|   232k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  290|   232k|                nrgeo[to] = nrgeo[minnei];
  291|   232k|                VECTOR(*dist)[to] = altdist;
  ------------------
  |  |   60|   232k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  292|   232k|                IGRAPH_CHECK(igraph_2wheap_push_with_index(&queue, to, -altdist));
  ------------------
  |  |  656|   232k|    do { \
  |  |  657|   232k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   232k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   232k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 232k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   232k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 232k]
  |  |  ------------------
  ------------------
  293|   518k|            } else if (cmp_result < 0) {
  ------------------
  |  Branch (293:24): [True: 44.1k, False: 473k]
  ------------------
  294|       |                /* This is a shorter path */
  295|  44.1k|                v = igraph_adjlist_get(parents, to);
  ------------------
  |  |   73|  44.1k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  296|  44.1k|                IGRAPH_CHECK(igraph_vector_int_resize(v, 1));
  ------------------
  |  |  656|  44.1k|    do { \
  |  |  657|  44.1k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  44.1k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  44.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 44.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|  44.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 44.1k]
  |  |  ------------------
  ------------------
  297|  44.1k|                VECTOR(*v)[0] = minnei;
  ------------------
  |  |   60|  44.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  298|  44.1k|                nrgeo[to] = nrgeo[minnei];
  299|  44.1k|                VECTOR(*dist)[to] = altdist;
  ------------------
  |  |   60|  44.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  300|  44.1k|                igraph_2wheap_modify(&queue, to, -altdist);
  301|   473k|            } else if (cmp_result == 0 && (altdist <= cutoff + 1.0 || cutoff < 0)) {
  ------------------
  |  Branch (301:24): [True: 38.1k, False: 435k]
  |  Branch (301:44): [True: 33.3k, False: 4.88k]
  |  Branch (301:71): [True: 4.49k, False: 393]
  ------------------
  302|       |                /* Only add if the node is not more distant than the cutoff */
  303|  37.8k|                v = igraph_adjlist_get(parents, to);
  ------------------
  |  |   73|  37.8k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  304|  37.8k|                IGRAPH_CHECK(igraph_vector_int_push_back(v, minnei));
  ------------------
  |  |  656|  37.8k|    do { \
  |  |  657|  37.8k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  37.8k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  37.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 37.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|  37.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 37.8k]
  |  |  ------------------
  ------------------
  305|  37.8k|                nrgeo[to] += nrgeo[minnei];
  306|  37.8k|            }
  307|   750k|        }
  308|   307k|    }
  309|       |
  310|  77.5k|    igraph_2wheap_destroy(&queue);
  311|  77.5k|    IGRAPH_FINALLY_CLEAN(1);
  312|       |
  313|  77.5k|    return IGRAPH_SUCCESS;
  314|  77.5k|}
betweenness.c:sspf_weighted_edge:
  343|  81.3k|        igraph_real_t cutoff) {
  344|       |
  345|  81.3k|    const igraph_real_t eps = IGRAPH_SHORTEST_PATH_EPSILON;
  ------------------
  |  |   35|  81.3k|#define IGRAPH_SHORTEST_PATH_EPSILON 1e-10
  ------------------
  346|       |
  347|  81.3k|    int cmp_result;
  348|  81.3k|    igraph_2wheap_t queue;
  349|  81.3k|    const igraph_vector_int_t *neis;
  350|  81.3k|    igraph_vector_int_t *v;
  351|  81.3k|    igraph_int_t nlen;
  352|       |
  353|       |    /* TODO: this is an O|V| step here. We could save some time by pre-allocating
  354|       |     * the two-way heap in the caller and re-using it here */
  355|  81.3k|    IGRAPH_CHECK(igraph_2wheap_init(&queue, igraph_vcount(graph)));
  ------------------
  |  |  656|  81.3k|    do { \
  |  |  657|  81.3k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  81.3k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  81.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 81.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|  81.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 81.3k]
  |  |  ------------------
  ------------------
  356|  81.3k|    IGRAPH_FINALLY(igraph_2wheap_destroy, &queue);
  ------------------
  |  |  603|  81.3k|    do { \
  |  |  604|  81.3k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  81.3k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  81.3k|         * incorrect destructor function with the pointer */ \
  |  |  607|  81.3k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 81.3k]
  |  |  ------------------
  |  |  608|  81.3k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  81.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 81.3k]
  |  |  ------------------
  ------------------
  357|       |
  358|  81.3k|    igraph_2wheap_push_with_index(&queue, source, -1.0); /* reserved */
  359|  81.3k|    VECTOR(*dist)[source] = 1.0;
  ------------------
  |  |   60|  81.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  360|  81.3k|    nrgeo[source] = 1;
  361|       |
  362|   396k|    while (!igraph_2wheap_empty(&queue)) {
  ------------------
  |  Branch (362:12): [True: 315k, False: 81.3k]
  ------------------
  363|   315k|        igraph_int_t minnei = igraph_2wheap_max_index(&queue);
  364|   315k|        igraph_real_t mindist = -igraph_2wheap_delete_max(&queue);
  365|       |
  366|       |        /* Ignore vertices that are more distant than the cutoff */
  367|   315k|        if (cutoff >= 0 && mindist > cutoff + 1.0) {
  ------------------
  |  Branch (367:13): [True: 290k, False: 24.9k]
  |  Branch (367:28): [True: 6.74k, False: 283k]
  ------------------
  368|       |            /* Reset variables if node is too distant */
  369|  6.74k|            VECTOR(*dist)[minnei] = 0;
  ------------------
  |  |   60|  6.74k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  370|  6.74k|            nrgeo[minnei] = 0;
  371|  6.74k|            igraph_vector_int_clear(igraph_inclist_get(parents, minnei));
  ------------------
  |  |  102|  6.74k|#define igraph_inclist_get(il,no) (&(il)->incs[(igraph_int_t)(no)])
  ------------------
  372|  6.74k|            continue;
  373|  6.74k|        }
  374|       |
  375|       |        /* Record that we have visited this node */
  376|   308k|        IGRAPH_CHECK(igraph_stack_int_push(stack, minnei));
  ------------------
  |  |  656|   308k|    do { \
  |  |  657|   308k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   308k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   308k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 308k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   308k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 308k]
  |  |  ------------------
  ------------------
  377|       |
  378|       |        /* Now check all neighbors of 'minnei' for a shorter path */
  379|   308k|        neis = igraph_inclist_get(inclist, minnei);
  ------------------
  |  |  102|   308k|#define igraph_inclist_get(il,no) (&(il)->incs[(igraph_int_t)(no)])
  ------------------
  380|   308k|        nlen = igraph_vector_int_size(neis);
  381|  1.05M|        for (igraph_int_t j = 0; j < nlen; j++) {
  ------------------
  |  Branch (381:34): [True: 750k, False: 308k]
  ------------------
  382|   750k|            igraph_int_t edge = VECTOR(*neis)[j];
  ------------------
  |  |   60|   750k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  383|   750k|            igraph_int_t to = IGRAPH_OTHER(graph, edge, minnei);
  ------------------
  |  |  146|   750k|    ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|   750k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   750k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  115|   286k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   286k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|   464k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   464k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (146:21): [True: 286k, False: 464k]
  |  |  ------------------
  ------------------
  384|   750k|            igraph_real_t altdist = mindist + VECTOR(*weights)[edge];
  ------------------
  |  |   60|   750k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  385|   750k|            igraph_real_t curdist = VECTOR(*dist)[to];
  ------------------
  |  |   60|   750k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  386|       |
  387|   750k|            if (curdist == 0) {
  ------------------
  |  Branch (387:17): [True: 234k, False: 516k]
  ------------------
  388|       |                /* this means curdist is infinity */
  389|   234k|                cmp_result = -1;
  390|   516k|            } else {
  391|   516k|                cmp_result = igraph_cmp_epsilon(altdist, curdist, eps);
  392|   516k|            }
  393|       |
  394|   750k|            if (curdist == 0) {
  ------------------
  |  Branch (394:17): [True: 234k, False: 516k]
  ------------------
  395|       |                /* This is the first non-infinite distance */
  396|   234k|                v = igraph_inclist_get(parents, to);
  ------------------
  |  |  102|   234k|#define igraph_inclist_get(il,no) (&(il)->incs[(igraph_int_t)(no)])
  ------------------
  397|   234k|                IGRAPH_CHECK(igraph_vector_int_resize(v, 1));
  ------------------
  |  |  656|   234k|    do { \
  |  |  657|   234k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   234k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   234k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 234k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   234k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 234k]
  |  |  ------------------
  ------------------
  398|   234k|                VECTOR(*v)[0] = edge;
  ------------------
  |  |   60|   234k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  399|   234k|                nrgeo[to] = nrgeo[minnei];
  400|   234k|                VECTOR(*dist)[to] = altdist;
  ------------------
  |  |   60|   234k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  401|   234k|                IGRAPH_CHECK(igraph_2wheap_push_with_index(&queue, to, -altdist));
  ------------------
  |  |  656|   234k|    do { \
  |  |  657|   234k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   234k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   234k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 234k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   234k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 234k]
  |  |  ------------------
  ------------------
  402|   516k|            } else if (cmp_result < 0) {
  ------------------
  |  Branch (402:24): [True: 44.5k, False: 472k]
  ------------------
  403|       |                /* This is a shorter path */
  404|  44.5k|                v = igraph_inclist_get(parents, to);
  ------------------
  |  |  102|  44.5k|#define igraph_inclist_get(il,no) (&(il)->incs[(igraph_int_t)(no)])
  ------------------
  405|  44.5k|                IGRAPH_CHECK(igraph_vector_int_resize(v, 1));
  ------------------
  |  |  656|  44.5k|    do { \
  |  |  657|  44.5k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  44.5k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  44.5k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 44.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  44.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 44.5k]
  |  |  ------------------
  ------------------
  406|  44.5k|                VECTOR(*v)[0] = edge;
  ------------------
  |  |   60|  44.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  407|  44.5k|                nrgeo[to] = nrgeo[minnei];
  408|  44.5k|                VECTOR(*dist)[to] = altdist;
  ------------------
  |  |   60|  44.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  409|  44.5k|                igraph_2wheap_modify(&queue, to, -altdist);
  410|   472k|            } else if (cmp_result == 0 && (altdist <= cutoff + 1.0 || cutoff < 0)) {
  ------------------
  |  Branch (410:24): [True: 38.8k, False: 433k]
  |  Branch (410:44): [True: 33.2k, False: 5.60k]
  |  Branch (410:71): [True: 5.13k, False: 472]
  ------------------
  411|       |                /* Only add if the node is not more distant than the cutoff */
  412|  38.3k|                v = igraph_inclist_get(parents, to);
  ------------------
  |  |  102|  38.3k|#define igraph_inclist_get(il,no) (&(il)->incs[(igraph_int_t)(no)])
  ------------------
  413|  38.3k|                IGRAPH_CHECK(igraph_vector_int_push_back(v, edge));
  ------------------
  |  |  656|  38.3k|    do { \
  |  |  657|  38.3k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  38.3k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  38.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 38.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|  38.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 38.3k]
  |  |  ------------------
  ------------------
  414|  38.3k|                nrgeo[to] += nrgeo[minnei];
  415|  38.3k|            }
  416|   750k|        }
  417|   308k|    }
  418|       |
  419|  81.3k|    igraph_2wheap_destroy(&queue);
  420|  81.3k|    IGRAPH_FINALLY_CLEAN(1);
  421|       |
  422|  81.3k|    return IGRAPH_SUCCESS;
  423|  81.3k|}

igraph_closeness_cutoff:
  329|  1.64k|                            igraph_real_t cutoff) {
  330|       |
  331|  1.64k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  332|  1.64k|    igraph_vector_int_t already_counted;
  333|  1.64k|    igraph_vector_int_t *neis;
  334|  1.64k|    igraph_int_t i, j;
  335|  1.64k|    igraph_int_t nodes_reached;
  336|  1.64k|    igraph_adjlist_t allneis;
  337|       |
  338|  1.64k|    igraph_int_t actdist = 0;
  339|       |
  340|  1.64k|    igraph_dqueue_int_t q;
  341|       |
  342|  1.64k|    igraph_int_t nodes_to_calc;
  343|  1.64k|    igraph_vit_t vit;
  344|       |
  345|  1.64k|    if (isnan(cutoff)) {
  ------------------
  |  Branch (345:9): [True: 0, False: 1.64k]
  ------------------
  346|      0|        IGRAPH_ERROR("The cutoff must not be NaN.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  347|      0|    }
  348|       |
  349|  1.64k|    if (weights) {
  ------------------
  |  Branch (349:9): [True: 1.64k, False: 0]
  ------------------
  350|  1.64k|        return igraph_i_closeness_cutoff_weighted(graph, res, reachable_count, all_reachable, vids, mode, cutoff,
  351|  1.64k|                weights, normalized);
  352|  1.64k|    }
  353|       |
  354|      0|    IGRAPH_CHECK(igraph_vit_create(graph, vids, &vit));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  355|      0|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  603|      0|    do { \
  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  ------------------
  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  356|       |
  357|      0|    nodes_to_calc = IGRAPH_VIT_SIZE(vit);
  ------------------
  |  |  190|      0|#define IGRAPH_VIT_SIZE(vit)  ((vit).end - (vit).start)
  ------------------
  358|       |
  359|      0|    if (reachable_count) {
  ------------------
  |  Branch (359:9): [True: 0, False: 0]
  ------------------
  360|      0|        IGRAPH_CHECK(igraph_vector_int_resize(reachable_count, nodes_to_calc));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  361|      0|    }
  362|       |
  363|      0|    if (all_reachable) {
  ------------------
  |  Branch (363:9): [True: 0, False: 0]
  ------------------
  364|      0|        *all_reachable = true; /* be optimistic */
  365|      0|    }
  366|       |
  367|      0|    if (mode != IGRAPH_OUT && mode != IGRAPH_IN && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (367:9): [True: 0, False: 0]
  |  Branch (367:31): [True: 0, False: 0]
  |  Branch (367:52): [True: 0, False: 0]
  ------------------
  368|      0|        IGRAPH_ERROR("Invalid mode for closeness.", 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]
  |  |  ------------------
  ------------------
  369|      0|    }
  370|       |
  371|      0|    IGRAPH_VECTOR_INT_INIT_FINALLY(&already_counted, no_of_nodes);
  ------------------
  |  |  119|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|      0|    do { \
  |  |  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 0]
  |  |  ------------------
  ------------------
  372|      0|    IGRAPH_DQUEUE_INT_INIT_FINALLY(&q, 100);
  ------------------
  |  |   61|      0|    do { IGRAPH_CHECK(igraph_dqueue_int_init(q, capacity)); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|      0|        IGRAPH_FINALLY(igraph_dqueue_int_destroy, q); } 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 (62:64): [Folded, False: 0]
  |  |  ------------------
  ------------------
  373|       |
  374|      0|    IGRAPH_CHECK(igraph_adjlist_init(graph, &allneis, mode, IGRAPH_LOOPS, IGRAPH_MULTIPLE));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  375|      0|    IGRAPH_FINALLY(igraph_adjlist_destroy, &allneis);
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  376|       |
  377|      0|    IGRAPH_CHECK(igraph_vector_resize(res, nodes_to_calc));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  378|      0|    igraph_vector_null(res);
  379|       |
  380|      0|    for (IGRAPH_VIT_RESET(vit), i = 0;
  ------------------
  |  |  201|      0|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
  381|      0|         !IGRAPH_VIT_END(vit);
  ------------------
  |  |  179|      0|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (381:10): [True: 0, False: 0]
  ------------------
  382|      0|         IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  167|      0|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  383|      0|        nodes_reached = 0;
  384|       |
  385|      0|        igraph_dqueue_int_clear(&q);
  386|      0|        IGRAPH_CHECK(igraph_dqueue_int_push(&q, IGRAPH_VIT_GET(vit)));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  ------------------
  |  |  |  Branch (657:40): [True: 0, False: 0]
  |  |  ------------------
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  387|      0|        IGRAPH_CHECK(igraph_dqueue_int_push(&q, 0));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  388|      0|        VECTOR(already_counted)[IGRAPH_VIT_GET(vit)] = i + 1;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      VECTOR(already_counted)[IGRAPH_VIT_GET(vit)] = i + 1;
  ------------------
  |  |  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)
  |  |  ------------------
  ------------------
  389|       |
  390|      0|        IGRAPH_PROGRESS("Closeness: ", 100.0 * i / nodes_to_calc, NULL);
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  391|      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]
  |  |  ------------------
  ------------------
  392|       |
  393|      0|        while (!igraph_dqueue_int_empty(&q)) {
  ------------------
  |  Branch (393:16): [True: 0, False: 0]
  ------------------
  394|      0|            igraph_int_t act = igraph_dqueue_int_pop(&q);
  395|      0|            actdist = igraph_dqueue_int_pop(&q);
  396|       |
  397|      0|            if (cutoff >= 0 && actdist > cutoff) {
  ------------------
  |  Branch (397:17): [True: 0, False: 0]
  |  Branch (397:32): [True: 0, False: 0]
  ------------------
  398|      0|                continue;    /* NOT break!!! */
  399|      0|            }
  400|       |
  401|      0|            VECTOR(*res)[i] += actdist;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  402|      0|            nodes_reached++;
  403|       |
  404|       |            /* check the neighbors */
  405|      0|            neis = igraph_adjlist_get(&allneis, act);
  ------------------
  |  |   73|      0|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  406|      0|            igraph_int_t nei_count = igraph_vector_int_size(neis);
  407|      0|            for (j = 0; j < nei_count; j++) {
  ------------------
  |  Branch (407:25): [True: 0, False: 0]
  ------------------
  408|      0|                igraph_int_t neighbor = VECTOR(*neis)[j];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  409|      0|                if (VECTOR(already_counted)[neighbor] == i + 1) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (409:21): [True: 0, False: 0]
  ------------------
  410|      0|                    continue;
  411|      0|                }
  412|      0|                VECTOR(already_counted)[neighbor] = i + 1;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  413|      0|                IGRAPH_CHECK(igraph_dqueue_int_push(&q, neighbor));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  414|      0|                IGRAPH_CHECK(igraph_dqueue_int_push(&q, actdist + 1));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  415|      0|            }
  416|      0|        }
  417|       |
  418|      0|        if (reachable_count) {
  ------------------
  |  Branch (418:13): [True: 0, False: 0]
  ------------------
  419|      0|            VECTOR(*reachable_count)[i] = nodes_reached - 1;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  420|      0|        }
  421|       |
  422|      0|        if (normalized) {
  ------------------
  |  Branch (422:13): [True: 0, False: 0]
  ------------------
  423|       |            /* compute the inverse of the average distance, considering only reachable nodes */
  424|      0|            VECTOR(*res)[i] = VECTOR(*res)[i] == 0 ? IGRAPH_NAN : ((igraph_real_t) (nodes_reached-1)) / VECTOR(*res)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*res)[i] = VECTOR(*res)[i] == 0 ? IGRAPH_NAN : ((igraph_real_t) (nodes_reached-1)) / VECTOR(*res)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*res)[i] = VECTOR(*res)[i] == 0 ? IGRAPH_NAN : ((igraph_real_t) (nodes_reached-1)) / VECTOR(*res)[i];
  ------------------
  |  |  140|      0|#define IGRAPH_NAN ((double)NAN)
  ------------------
                          VECTOR(*res)[i] = VECTOR(*res)[i] == 0 ? IGRAPH_NAN : ((igraph_real_t) (nodes_reached-1)) / VECTOR(*res)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (424:31): [True: 0, False: 0]
  ------------------
  425|      0|        } else {
  426|       |            /* compute the inverse of the sum of distances */
  427|      0|            VECTOR(*res)[i] = VECTOR(*res)[i] == 0 ? IGRAPH_NAN : 1.0 / VECTOR(*res)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*res)[i] = VECTOR(*res)[i] == 0 ? IGRAPH_NAN : 1.0 / VECTOR(*res)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*res)[i] = VECTOR(*res)[i] == 0 ? IGRAPH_NAN : 1.0 / VECTOR(*res)[i];
  ------------------
  |  |  140|      0|#define IGRAPH_NAN ((double)NAN)
  ------------------
                          VECTOR(*res)[i] = VECTOR(*res)[i] == 0 ? IGRAPH_NAN : 1.0 / VECTOR(*res)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (427:31): [True: 0, False: 0]
  ------------------
  428|      0|        }
  429|       |
  430|      0|        if (all_reachable) {
  ------------------
  |  Branch (430:13): [True: 0, False: 0]
  ------------------
  431|      0|            if (nodes_reached < no_of_nodes) {
  ------------------
  |  Branch (431:17): [True: 0, False: 0]
  ------------------
  432|      0|                *all_reachable = false;
  433|      0|            }
  434|      0|        }
  435|      0|    }
  436|       |
  437|      0|    IGRAPH_PROGRESS("Closeness: ", 100.0, NULL);
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  438|       |
  439|       |    /* Clean */
  440|      0|    igraph_dqueue_int_destroy(&q);
  441|      0|    igraph_vector_int_destroy(&already_counted);
  442|      0|    igraph_vit_destroy(&vit);
  443|      0|    igraph_adjlist_destroy(&allneis);
  444|      0|    IGRAPH_FINALLY_CLEAN(4);
  445|       |
  446|      0|    return IGRAPH_SUCCESS;
  447|      0|}
igraph_harmonic_centrality_cutoff:
  730|  1.64k|                                      igraph_real_t cutoff) {
  731|  1.64k|    if (isnan(cutoff)) {
  ------------------
  |  Branch (731:9): [True: 0, False: 1.64k]
  ------------------
  732|      0|        IGRAPH_ERROR("The cutoff must not be NaN.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  733|      0|    }
  734|       |
  735|  1.64k|    if (weights) {
  ------------------
  |  Branch (735:9): [True: 1.64k, False: 0]
  ------------------
  736|  1.64k|        return igraph_i_harmonic_centrality_weighted(graph, res, vids, mode, weights, normalized, cutoff);
  737|  1.64k|    } else {
  738|      0|        return igraph_i_harmonic_centrality_unweighted(graph, res, vids, mode, normalized, cutoff);
  739|      0|    }
  740|  1.64k|}
closeness.c:igraph_i_closeness_cutoff_weighted:
  131|  1.64k|                                                igraph_bool_t normalized) {
  132|       |
  133|       |    /* See igraph_distances_dijkstra() for the implementation
  134|       |       details and the dirty tricks. */
  135|       |
  136|  1.64k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  137|  1.64k|    igraph_int_t no_of_edges = igraph_ecount(graph);
  138|       |
  139|  1.64k|    igraph_2wheap_t Q;
  140|  1.64k|    igraph_vit_t vit;
  141|  1.64k|    igraph_int_t nodes_to_calc;
  142|       |
  143|  1.64k|    igraph_lazy_inclist_t inclist;
  144|  1.64k|    igraph_int_t i, j;
  145|       |
  146|  1.64k|    igraph_vector_t dist;
  147|  1.64k|    igraph_vector_int_t which;
  148|  1.64k|    igraph_int_t nodes_reached;
  149|       |
  150|  1.64k|    igraph_real_t mindist = 0;
  151|       |
  152|  1.64k|    if (igraph_vector_size(weights) != no_of_edges) {
  ------------------
  |  Branch (152:9): [True: 0, False: 1.64k]
  ------------------
  153|      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]
  |  |  ------------------
  ------------------
  154|      0|    }
  155|       |
  156|  1.64k|    if (no_of_edges > 0) {
  ------------------
  |  Branch (156:9): [True: 1.55k, False: 90]
  ------------------
  157|  1.55k|        igraph_real_t minweight = igraph_vector_min(weights);
  158|  1.55k|        if (minweight <= 0) {
  ------------------
  |  Branch (158:13): [True: 0, False: 1.55k]
  ------------------
  159|      0|            IGRAPH_ERROR("Weight vector must be positive.", 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]
  |  |  ------------------
  ------------------
  160|  1.55k|        } else if (isnan(minweight)) {
  ------------------
  |  Branch (160:20): [True: 0, False: 1.55k]
  ------------------
  161|      0|            IGRAPH_ERROR("Weight vector 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]
  |  |  ------------------
  ------------------
  162|      0|        }
  163|  1.55k|    }
  164|       |
  165|  1.64k|    IGRAPH_CHECK(igraph_vit_create(graph, vids, &vit));
  ------------------
  |  |  656|  1.64k|    do { \
  |  |  657|  1.64k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.64k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  166|  1.64k|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  603|  1.64k|    do { \
  |  |  604|  1.64k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  1.64k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  1.64k|         * incorrect destructor function with the pointer */ \
  |  |  607|  1.64k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 1.64k]
  |  |  ------------------
  |  |  608|  1.64k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  167|       |
  168|  1.64k|    nodes_to_calc = IGRAPH_VIT_SIZE(vit);
  ------------------
  |  |  190|  1.64k|#define IGRAPH_VIT_SIZE(vit)  ((vit).end - (vit).start)
  ------------------
  169|       |
  170|  1.64k|    if (reachable_count) {
  ------------------
  |  Branch (170:9): [True: 1.64k, False: 0]
  ------------------
  171|  1.64k|        IGRAPH_CHECK(igraph_vector_int_resize(reachable_count, nodes_to_calc));
  ------------------
  |  |  656|  1.64k|    do { \
  |  |  657|  1.64k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.64k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  172|  1.64k|    }
  173|       |
  174|  1.64k|    if (all_reachable) {
  ------------------
  |  Branch (174:9): [True: 1.64k, False: 0]
  ------------------
  175|  1.64k|        *all_reachable = true; /* be optimistic */
  176|  1.64k|    }
  177|       |
  178|  1.64k|    IGRAPH_CHECK(igraph_2wheap_init(&Q, no_of_nodes));
  ------------------
  |  |  656|  1.64k|    do { \
  |  |  657|  1.64k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.64k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  179|  1.64k|    IGRAPH_FINALLY(igraph_2wheap_destroy, &Q);
  ------------------
  |  |  603|  1.64k|    do { \
  |  |  604|  1.64k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  1.64k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  1.64k|         * incorrect destructor function with the pointer */ \
  |  |  607|  1.64k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 1.64k]
  |  |  ------------------
  |  |  608|  1.64k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  180|  1.64k|    IGRAPH_CHECK(igraph_lazy_inclist_init(graph, &inclist, mode, IGRAPH_LOOPS));
  ------------------
  |  |  656|  1.64k|    do { \
  |  |  657|  1.64k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.64k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  181|  1.64k|    IGRAPH_FINALLY(igraph_lazy_inclist_destroy, &inclist);
  ------------------
  |  |  603|  1.64k|    do { \
  |  |  604|  1.64k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  1.64k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  1.64k|         * incorrect destructor function with the pointer */ \
  |  |  607|  1.64k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 1.64k]
  |  |  ------------------
  |  |  608|  1.64k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  182|       |
  183|  1.64k|    IGRAPH_VECTOR_INIT_FINALLY(&dist, no_of_nodes);
  ------------------
  |  |  104|  1.64k|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  1.64k|    do { \
  |  |  |  |  657|  1.64k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.64k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.64k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  1.64k|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  1.64k|    do { \
  |  |  |  |  604|  1.64k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.64k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.64k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.64k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.64k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.64k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.64k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (105:60): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  184|  1.64k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&which, no_of_nodes);
  ------------------
  |  |  119|  1.64k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  1.64k|    do { \
  |  |  |  |  657|  1.64k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.64k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.64k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  1.64k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  1.64k|    do { \
  |  |  |  |  604|  1.64k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.64k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.64k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.64k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.64k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.64k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.64k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  185|       |
  186|  1.64k|    IGRAPH_CHECK(igraph_vector_resize(res, nodes_to_calc));
  ------------------
  |  |  656|  1.64k|    do { \
  |  |  657|  1.64k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.64k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  187|  1.64k|    igraph_vector_null(res);
  188|       |
  189|  75.4k|    for (i = 0; !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  179|  75.4k|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
                  for (i = 0; !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  167|  73.8k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  |  Branch (189:17): [True: 73.8k, False: 1.64k]
  ------------------
  190|       |
  191|  73.8k|        igraph_int_t source = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  214|  73.8k|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 73.8k, False: 0]
  |  |  ------------------
  |  |  215|  73.8k|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  192|  73.8k|        igraph_2wheap_clear(&Q);
  193|  73.8k|        igraph_2wheap_push_with_index(&Q, source, -1.0); /* reserved */
  194|  73.8k|        VECTOR(which)[source] = i + 1;
  ------------------
  |  |   60|  73.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  195|  73.8k|        VECTOR(dist)[source] = 1.0;     /* actual distance is zero but we need to store distance + 1 */
  ------------------
  |  |   60|  73.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  196|  73.8k|        nodes_reached = 0;
  197|       |
  198|   364k|        while (!igraph_2wheap_empty(&Q)) {
  ------------------
  |  Branch (198:16): [True: 290k, False: 73.8k]
  ------------------
  199|   290k|            igraph_int_t minnei = igraph_2wheap_max_index(&Q);
  200|       |            /* Now check all neighbors of minnei for a shorter path */
  201|   290k|            igraph_vector_int_t *neis = igraph_lazy_inclist_get(&inclist, minnei);
  ------------------
  |  |  214|   290k|    (igraph_lazy_inclist_has(il,no) ? ((il)->incs[(igraph_int_t)(no)]) \
  |  |  ------------------
  |  |  |  |  189|   290k|#define igraph_lazy_inclist_has(il,no) ((il)->incs[(igraph_int_t)(no)] != NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (189:40): [True: 216k, False: 73.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  215|   290k|                                    : (igraph_i_lazy_inclist_get_real(il,no)))
  ------------------
  202|   290k|            igraph_int_t nlen;
  203|       |
  204|   290k|            IGRAPH_CHECK_OOM(neis, "Failed to query incident edges.");
  ------------------
  |  |  709|   290k|    do { \
  |  |  710|   290k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|   290k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 290k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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|   290k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 290k]
  |  |  ------------------
  ------------------
  205|       |
  206|   290k|            nlen = igraph_vector_int_size(neis);
  207|   290k|            mindist = -igraph_2wheap_delete_max(&Q);
  208|       |
  209|   290k|            if (cutoff >= 0 && (mindist - 1.0) > cutoff) {
  ------------------
  |  Branch (209:17): [True: 290k, False: 0]
  |  Branch (209:32): [True: 6.74k, False: 283k]
  ------------------
  210|  6.74k|                continue;    /* NOT break!!! */
  211|  6.74k|            }
  212|       |
  213|   283k|            VECTOR(*res)[i] += (mindist - 1.0);
  ------------------
  |  |   60|   283k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  214|   283k|            nodes_reached++;
  215|       |
  216|  1.05M|            for (j = 0; j < nlen; j++) {
  ------------------
  |  Branch (216:25): [True: 771k, False: 283k]
  ------------------
  217|   771k|                igraph_int_t edge = VECTOR(*neis)[j];
  ------------------
  |  |   60|   771k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  218|   771k|                igraph_int_t to = IGRAPH_OTHER(graph, edge, minnei);
  ------------------
  |  |  146|   771k|    ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|   771k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   771k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  115|   345k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   345k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|   425k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   425k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (146:21): [True: 345k, False: 425k]
  |  |  ------------------
  ------------------
  219|   771k|                igraph_real_t altdist = mindist + VECTOR(*weights)[edge];
  ------------------
  |  |   60|   771k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  220|   771k|                igraph_real_t curdist = VECTOR(dist)[to];
  ------------------
  |  |   60|   771k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  221|       |
  222|   771k|                if (VECTOR(which)[to] != i + 1) {
  ------------------
  |  |   60|   771k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (222:21): [True: 216k, False: 554k]
  ------------------
  223|       |                    /* First non-infinite distance */
  224|   216k|                    VECTOR(which)[to] = i + 1;
  ------------------
  |  |   60|   216k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  225|   216k|                    VECTOR(dist)[to] = altdist;
  ------------------
  |  |   60|   216k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  226|   216k|                    IGRAPH_CHECK(igraph_2wheap_push_with_index(&Q, to, -altdist));
  ------------------
  |  |  656|   216k|    do { \
  |  |  657|   216k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   216k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   216k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 216k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   216k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 216k]
  |  |  ------------------
  ------------------
  227|   554k|                } else if (curdist == 0 /* this means curdist is infinity */ || altdist < curdist) {
  ------------------
  |  Branch (227:28): [True: 0, False: 554k]
  |  Branch (227:81): [True: 43.1k, False: 511k]
  ------------------
  228|       |                    /* This is a shorter path */
  229|  43.1k|                    VECTOR(dist)[to] = altdist;
  ------------------
  |  |   60|  43.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  230|  43.1k|                    igraph_2wheap_modify(&Q, to, -altdist);
  231|  43.1k|                }
  232|   771k|            }
  233|       |
  234|   283k|        } /* !igraph_2wheap_empty(&Q) */
  235|       |
  236|  73.8k|        if (reachable_count) {
  ------------------
  |  Branch (236:13): [True: 73.8k, False: 0]
  ------------------
  237|  73.8k|            VECTOR(*reachable_count)[i] = nodes_reached - 1;
  ------------------
  |  |   60|  73.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  238|  73.8k|        }
  239|       |
  240|  73.8k|        if (normalized) {
  ------------------
  |  Branch (240:13): [True: 73.8k, False: 0]
  ------------------
  241|       |            /* compute the inverse of the average distance, considering only reachable nodes */
  242|  73.8k|            VECTOR(*res)[i] = VECTOR(*res)[i] == 0 ? IGRAPH_NAN : ((igraph_real_t) (nodes_reached-1)) / VECTOR(*res)[i];
  ------------------
  |  |   60|  73.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*res)[i] = VECTOR(*res)[i] == 0 ? IGRAPH_NAN : ((igraph_real_t) (nodes_reached-1)) / VECTOR(*res)[i];
  ------------------
  |  |   60|  73.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*res)[i] = VECTOR(*res)[i] == 0 ? IGRAPH_NAN : ((igraph_real_t) (nodes_reached-1)) / VECTOR(*res)[i];
  ------------------
  |  |  140|  61.0k|#define IGRAPH_NAN ((double)NAN)
  ------------------
                          VECTOR(*res)[i] = VECTOR(*res)[i] == 0 ? IGRAPH_NAN : ((igraph_real_t) (nodes_reached-1)) / VECTOR(*res)[i];
  ------------------
  |  |   60|  12.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (242:31): [True: 61.0k, False: 12.8k]
  ------------------
  243|  73.8k|        } else {
  244|       |            /* compute the inverse of the sum of distances */
  245|      0|            VECTOR(*res)[i] = VECTOR(*res)[i] == 0 ? IGRAPH_NAN : 1.0 / VECTOR(*res)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*res)[i] = VECTOR(*res)[i] == 0 ? IGRAPH_NAN : 1.0 / VECTOR(*res)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*res)[i] = VECTOR(*res)[i] == 0 ? IGRAPH_NAN : 1.0 / VECTOR(*res)[i];
  ------------------
  |  |  140|      0|#define IGRAPH_NAN ((double)NAN)
  ------------------
                          VECTOR(*res)[i] = VECTOR(*res)[i] == 0 ? IGRAPH_NAN : 1.0 / VECTOR(*res)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (245:31): [True: 0, False: 0]
  ------------------
  246|      0|        }
  247|       |
  248|  73.8k|        if (all_reachable) {
  ------------------
  |  Branch (248:13): [True: 73.8k, False: 0]
  ------------------
  249|  73.8k|            if (nodes_reached < no_of_nodes) {
  ------------------
  |  Branch (249:17): [True: 73.5k, False: 259]
  ------------------
  250|  73.5k|                *all_reachable = false;
  251|  73.5k|            }
  252|  73.8k|        }
  253|  73.8k|    } /* !IGRAPH_VIT_END(vit) */
  254|       |
  255|  1.64k|    igraph_vector_int_destroy(&which);
  256|  1.64k|    igraph_vector_destroy(&dist);
  257|  1.64k|    igraph_lazy_inclist_destroy(&inclist);
  258|  1.64k|    igraph_2wheap_destroy(&Q);
  259|  1.64k|    igraph_vit_destroy(&vit);
  260|  1.64k|    IGRAPH_FINALLY_CLEAN(5);
  261|       |
  262|  1.64k|    return IGRAPH_SUCCESS;
  263|  1.64k|}
closeness.c:igraph_i_harmonic_centrality_weighted:
  554|  1.64k|                                                 igraph_real_t cutoff) {
  555|       |
  556|       |    /* See igraph_distances_dijkstra() for the implementation
  557|       |       details and the dirty tricks. */
  558|       |
  559|  1.64k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  560|  1.64k|    igraph_int_t no_of_edges = igraph_ecount(graph);
  561|       |
  562|  1.64k|    igraph_2wheap_t Q;
  563|  1.64k|    igraph_vit_t vit;
  564|  1.64k|    igraph_int_t nodes_to_calc;
  565|       |
  566|  1.64k|    igraph_lazy_inclist_t inclist;
  567|  1.64k|    igraph_int_t i, j;
  568|       |
  569|  1.64k|    igraph_vector_t dist;
  570|  1.64k|    igraph_vector_int_t which;
  571|       |
  572|  1.64k|    igraph_real_t mindist = 0;
  573|       |
  574|  1.64k|    if (igraph_vector_size(weights) != no_of_edges) {
  ------------------
  |  Branch (574:9): [True: 0, False: 1.64k]
  ------------------
  575|      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]
  |  |  ------------------
  ------------------
  576|      0|    }
  577|       |
  578|  1.64k|    if (no_of_edges > 0) {
  ------------------
  |  Branch (578:9): [True: 1.55k, False: 90]
  ------------------
  579|  1.55k|        igraph_real_t minweight = igraph_vector_min(weights);
  580|  1.55k|        if (minweight <= 0) {
  ------------------
  |  Branch (580:13): [True: 0, False: 1.55k]
  ------------------
  581|      0|            IGRAPH_ERROR("Weight vector must be positive.", 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]
  |  |  ------------------
  ------------------
  582|  1.55k|        } else if (isnan(minweight)) {
  ------------------
  |  Branch (582:20): [True: 0, False: 1.55k]
  ------------------
  583|      0|            IGRAPH_ERROR("Weight vector 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]
  |  |  ------------------
  ------------------
  584|      0|        }
  585|  1.55k|    }
  586|       |
  587|  1.64k|    IGRAPH_CHECK(igraph_vit_create(graph, vids, &vit));
  ------------------
  |  |  656|  1.64k|    do { \
  |  |  657|  1.64k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.64k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  588|  1.64k|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  603|  1.64k|    do { \
  |  |  604|  1.64k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  1.64k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  1.64k|         * incorrect destructor function with the pointer */ \
  |  |  607|  1.64k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 1.64k]
  |  |  ------------------
  |  |  608|  1.64k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  589|       |
  590|  1.64k|    nodes_to_calc = IGRAPH_VIT_SIZE(vit);
  ------------------
  |  |  190|  1.64k|#define IGRAPH_VIT_SIZE(vit)  ((vit).end - (vit).start)
  ------------------
  591|       |
  592|  1.64k|    IGRAPH_CHECK(igraph_2wheap_init(&Q, no_of_nodes));
  ------------------
  |  |  656|  1.64k|    do { \
  |  |  657|  1.64k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.64k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  593|  1.64k|    IGRAPH_FINALLY(igraph_2wheap_destroy, &Q);
  ------------------
  |  |  603|  1.64k|    do { \
  |  |  604|  1.64k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  1.64k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  1.64k|         * incorrect destructor function with the pointer */ \
  |  |  607|  1.64k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 1.64k]
  |  |  ------------------
  |  |  608|  1.64k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  594|  1.64k|    IGRAPH_CHECK(igraph_lazy_inclist_init(graph, &inclist, mode, IGRAPH_LOOPS));
  ------------------
  |  |  656|  1.64k|    do { \
  |  |  657|  1.64k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.64k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  595|  1.64k|    IGRAPH_FINALLY(igraph_lazy_inclist_destroy, &inclist);
  ------------------
  |  |  603|  1.64k|    do { \
  |  |  604|  1.64k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  1.64k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  1.64k|         * incorrect destructor function with the pointer */ \
  |  |  607|  1.64k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 1.64k]
  |  |  ------------------
  |  |  608|  1.64k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  596|       |
  597|  1.64k|    IGRAPH_VECTOR_INIT_FINALLY(&dist, no_of_nodes);
  ------------------
  |  |  104|  1.64k|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  1.64k|    do { \
  |  |  |  |  657|  1.64k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.64k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.64k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  1.64k|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  1.64k|    do { \
  |  |  |  |  604|  1.64k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.64k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.64k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.64k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.64k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.64k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.64k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (105:60): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  598|  1.64k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&which, no_of_nodes);
  ------------------
  |  |  119|  1.64k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  1.64k|    do { \
  |  |  |  |  657|  1.64k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.64k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.64k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  1.64k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  1.64k|    do { \
  |  |  |  |  604|  1.64k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.64k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.64k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.64k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.64k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.64k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.64k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  599|       |
  600|  1.64k|    IGRAPH_CHECK(igraph_vector_resize(res, nodes_to_calc));
  ------------------
  |  |  656|  1.64k|    do { \
  |  |  657|  1.64k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.64k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  601|  1.64k|    igraph_vector_null(res);
  602|       |
  603|  75.4k|    for (i = 0; !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  179|  75.4k|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
                  for (i = 0; !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  167|  73.8k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  |  Branch (603:17): [True: 73.8k, False: 1.64k]
  ------------------
  604|       |
  605|  73.8k|        igraph_int_t source = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  214|  73.8k|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 73.8k, False: 0]
  |  |  ------------------
  |  |  215|  73.8k|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  606|  73.8k|        igraph_2wheap_clear(&Q);
  607|  73.8k|        igraph_2wheap_push_with_index(&Q, source, -1.0); /* reserved */
  608|  73.8k|        VECTOR(which)[source] = i + 1;
  ------------------
  |  |   60|  73.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  609|  73.8k|        VECTOR(dist)[source] = 1.0;     /* actual distance is zero but we need to store distance + 1 */
  ------------------
  |  |   60|  73.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  610|       |
  611|   364k|        while (!igraph_2wheap_empty(&Q)) {
  ------------------
  |  Branch (611:16): [True: 290k, False: 73.8k]
  ------------------
  612|   290k|            igraph_int_t minnei = igraph_2wheap_max_index(&Q);
  613|       |            /* Now check all neighbors of minnei for a shorter path */
  614|   290k|            igraph_vector_int_t *neis = igraph_lazy_inclist_get(&inclist, minnei);
  ------------------
  |  |  214|   290k|    (igraph_lazy_inclist_has(il,no) ? ((il)->incs[(igraph_int_t)(no)]) \
  |  |  ------------------
  |  |  |  |  189|   290k|#define igraph_lazy_inclist_has(il,no) ((il)->incs[(igraph_int_t)(no)] != NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (189:40): [True: 216k, False: 73.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  215|   290k|                                    : (igraph_i_lazy_inclist_get_real(il,no)))
  ------------------
  615|   290k|            igraph_int_t nlen;
  616|       |
  617|   290k|            IGRAPH_CHECK_OOM(neis, "Failed to query incident edges.");
  ------------------
  |  |  709|   290k|    do { \
  |  |  710|   290k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|   290k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 290k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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|   290k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 290k]
  |  |  ------------------
  ------------------
  618|       |
  619|   290k|            nlen = igraph_vector_int_size(neis);
  620|   290k|            mindist = -igraph_2wheap_delete_max(&Q);
  621|       |
  622|   290k|            if (cutoff >= 0 && (mindist - 1.0) > cutoff) {
  ------------------
  |  Branch (622:17): [True: 290k, False: 0]
  |  Branch (622:32): [True: 6.66k, False: 283k]
  ------------------
  623|  6.66k|                continue;    /* NOT break!!! */
  624|  6.66k|            }
  625|       |
  626|       |            /* Exclude self-distance, which is zero. */
  627|   283k|            if (source != minnei) {
  ------------------
  |  Branch (627:17): [True: 210k, False: 73.8k]
  ------------------
  628|   210k|                VECTOR(*res)[i] += 1.0 / (mindist - 1.0);
  ------------------
  |  |   60|   210k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  629|   210k|            }
  630|       |
  631|  1.05M|            for (j = 0; j < nlen; j++) {
  ------------------
  |  Branch (631:25): [True: 768k, False: 283k]
  ------------------
  632|   768k|                igraph_int_t edge = VECTOR(*neis)[j];
  ------------------
  |  |   60|   768k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  633|   768k|                igraph_int_t to = IGRAPH_OTHER(graph, edge, minnei);
  ------------------
  |  |  146|   768k|    ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|   768k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   768k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  115|   480k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   480k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|   287k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   287k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (146:21): [True: 480k, False: 287k]
  |  |  ------------------
  ------------------
  634|   768k|                igraph_real_t altdist = mindist + VECTOR(*weights)[edge];
  ------------------
  |  |   60|   768k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  635|   768k|                igraph_real_t curdist = VECTOR(dist)[to];
  ------------------
  |  |   60|   768k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  636|       |
  637|   768k|                if (VECTOR(which)[to] != i + 1) {
  ------------------
  |  |   60|   768k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (637:21): [True: 216k, False: 551k]
  ------------------
  638|       |                    /* First non-infinite distance */
  639|   216k|                    VECTOR(which)[to] = i + 1;
  ------------------
  |  |   60|   216k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  640|   216k|                    VECTOR(dist)[to] = altdist;
  ------------------
  |  |   60|   216k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  641|   216k|                    IGRAPH_CHECK(igraph_2wheap_push_with_index(&Q, to, -altdist));
  ------------------
  |  |  656|   216k|    do { \
  |  |  657|   216k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   216k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   216k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 216k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   216k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 216k]
  |  |  ------------------
  ------------------
  642|   551k|                } else if (curdist == 0 /* this means curdist is infinity */ || altdist < curdist) {
  ------------------
  |  Branch (642:28): [True: 0, False: 551k]
  |  Branch (642:81): [True: 42.5k, False: 509k]
  ------------------
  643|       |                    /* This is a shorter path */
  644|  42.5k|                    VECTOR(dist)[to] = altdist;
  ------------------
  |  |   60|  42.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  645|  42.5k|                    igraph_2wheap_modify(&Q, to, -altdist);
  646|  42.5k|                }
  647|   768k|            }
  648|       |
  649|   283k|        } /* !igraph_2wheap_empty(&Q) */
  650|       |
  651|  73.8k|    } /* !IGRAPH_VIT_END(vit) */
  652|       |
  653|  1.64k|    if (normalized && no_of_nodes > 1 /* not a null graph or singleton graph */) {
  ------------------
  |  Branch (653:9): [True: 1.64k, False: 0]
  |  Branch (653:23): [True: 1.62k, False: 18]
  ------------------
  654|  1.62k|        igraph_vector_scale(res, 1.0 / (no_of_nodes - 1));
  655|  1.62k|    }
  656|       |
  657|  1.64k|    igraph_vector_int_destroy(&which);
  658|  1.64k|    igraph_vector_destroy(&dist);
  659|  1.64k|    igraph_lazy_inclist_destroy(&inclist);
  660|  1.64k|    igraph_2wheap_destroy(&Q);
  661|  1.64k|    igraph_vit_destroy(&vit);
  662|  1.64k|    IGRAPH_FINALLY_CLEAN(5);
  663|       |
  664|  1.64k|    return IGRAPH_SUCCESS;
  665|  1.64k|}

igraph_pagerank:
  283|    822|        igraph_arpack_options_t *options) {
  284|    822|    return igraph_personalized_pagerank(
  285|    822|            graph, weights,
  286|    822|            vector, value,
  287|       |            NULL,
  288|    822|            damping, directed,
  289|    822|            vids,
  290|    822|            algo,
  291|    822|            options);
  292|    822|}
igraph_personalized_pagerank:
  466|    822|        igraph_arpack_options_t *options) {
  467|       |
  468|    822|    if (!(damping >= 0.0 && damping <= 1.0)) {
  ------------------
  |  Branch (468:11): [True: 822, False: 0]
  |  Branch (468:29): [True: 822, False: 0]
  ------------------
  469|      0|        IGRAPH_ERROR("The PageRank damping factor must be in the range [0,1].", 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]
  |  |  ------------------
  ------------------
  470|      0|    }
  471|       |
  472|    822|    if (algo == IGRAPH_PAGERANK_ALGO_ARPACK) {
  ------------------
  |  Branch (472:9): [True: 0, False: 822]
  ------------------
  473|      0|        return igraph_i_personalized_pagerank_arpack(graph, vector, value, vids,
  474|      0|                directed, damping, reset,
  475|      0|                weights, options ? options : igraph_arpack_options_get_default()
  ------------------
  |  Branch (475:26): [True: 0, False: 0]
  ------------------
  476|      0|        );
  477|    822|    } else if (algo == IGRAPH_PAGERANK_ALGO_PRPACK) {
  ------------------
  |  Branch (477:16): [True: 822, False: 0]
  ------------------
  478|    822|        return igraph_i_personalized_pagerank_prpack(graph, vector, value, vids,
  479|    822|                directed, damping, reset,
  480|    822|                weights);
  481|    822|    }
  482|       |
  483|      0|    IGRAPH_ERROR("Unknown PageRank algorithm.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  484|      0|}

igraph_i_personalized_pagerank_prpack:
   40|    822|                                          const igraph_vector_t *weights) {
   41|    822|    IGRAPH_HANDLE_EXCEPTIONS_BEGIN;
  ------------------
  |  |   21|    822|    try {
  ------------------
   42|       |
   43|    822|    igraph_int_t i, no_of_nodes = igraph_vcount(graph);
   44|       |
   45|    822|    double *u = nullptr;
   46|    822|    std::unique_ptr<double[]> v;
   47|       |
   48|    822|    if (reset) {
  ------------------
  |  Branch (48:9): [True: 0, False: 822]
  ------------------
   49|      0|        if (igraph_vector_size(reset) != no_of_nodes) {
  ------------------
  |  Branch (49:13): [True: 0, False: 0]
  ------------------
   50|      0|            IGRAPH_ERROR("Invalid length of reset vector when calculating personalized PageRank scores.", 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]
  |  |  ------------------
  ------------------
   51|      0|        }
   52|       |
   53|       |        /* Normalize reset vector so the sum is 1 */
   54|      0|        double reset_min = igraph_vector_min(reset);
   55|      0|        if (reset_min < 0) {
  ------------------
  |  Branch (55:13): [True: 0, False: 0]
  ------------------
   56|      0|            IGRAPH_ERROR("The reset vector must not contain negative elements.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
   57|      0|        }
   58|       |
   59|      0|        double reset_sum = igraph_vector_sum(reset);
   60|      0|        if (reset_sum == 0) {
  ------------------
  |  Branch (60:13): [True: 0, False: 0]
  ------------------
   61|      0|            IGRAPH_ERROR("The sum of the elements in the reset vector must not be zero.", 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|      0|        if (!isfinite(reset_sum)) {
  ------------------
  |  Branch (64:13): [True: 0, False: 0]
  ------------------
   65|      0|            IGRAPH_ERROR("The reset vector must not contain infinite or 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]
  |  |  ------------------
  ------------------
   66|      0|        }
   67|       |
   68|       |        // Construct the personalization vector
   69|      0|        v.reset(new double[no_of_nodes]);
   70|      0|        for (i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (70:21): [True: 0, False: 0]
  ------------------
   71|      0|            v[i] = VECTOR(*reset)[i] / reset_sum;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
   72|      0|        }
   73|       |
   74|       |        // u is the distribution used when restarting the walk due to being stuck in a sink
   75|       |        // v is the distribution used when restarting due to damping
   76|       |        // Here we use the same distribution for both
   77|      0|        u = v.get();
   78|      0|    }
   79|       |
   80|       |    // Since PRPACK uses the algebraic method to solve PageRank, damping factors very close to 1.0
   81|       |    // may lead to numerical instability, the appearance of non-finite values, or the iteration
   82|       |    // never terminating.
   83|    822|    if (damping > 0.999) {
  ------------------
  |  Branch (83:9): [True: 0, False: 822]
  ------------------
   84|      0|        IGRAPH_WARNINGF(
  ------------------
  |  |  777|      0|    do { \
  |  |  778|      0|        igraph_warningf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  779|      0|                        __VA_ARGS__); \
  |  |  780|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (780:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
   85|      0|                "Damping factor is %g. "
   86|      0|                "Damping values close to 1 may lead to numerical instability when using PRPACK.",
   87|      0|                damping);
   88|      0|    }
   89|       |
   90|       |    // Construct and run the solver
   91|    822|    prpack_igraph_graph prpack_graph;
   92|    822|    IGRAPH_CHECK(prpack_graph.convert_from_igraph(graph, weights, directed));
  ------------------
  |  |  656|    822|    do { \
  |  |  657|    822|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    822|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
   93|    822|    prpack_solver solver(&prpack_graph, false);
   94|    822|    std::unique_ptr<const prpack_result> res( solver.solve(damping, 1e-10, u, v.get(), "") );
   95|       |
   96|       |    // Delete the personalization vector
   97|    822|    v.reset();
   98|       |
   99|       |    // Check whether the solver converged
  100|       |    // TODO: this is commented out because some of the solvers do not implement it yet
  101|       |    /*
  102|       |    if (!res->converged) {
  103|       |        IGRAPH_WARNING("PRPACK solver failed to converge. Results may be inaccurate.");
  104|       |    }
  105|       |    */
  106|       |
  107|       |    // Fill the result vector
  108|    822|    {
  109|       |        // Use of igraph "finally" stack is safe in this block
  110|       |        // since no exceptions can be thrown from here.
  111|       |
  112|    822|        igraph_vit_t vit;
  113|    822|        IGRAPH_CHECK(igraph_vit_create(graph, vids, &vit));
  ------------------
  |  |  656|    822|    do { \
  |  |  657|    822|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    822|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
  114|    822|        IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  603|    822|    do { \
  |  |  604|    822|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    822|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    822|         * incorrect destructor function with the pointer */ \
  |  |  607|    822|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 822]
  |  |  ------------------
  |  |  608|    822|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
  115|    822|        igraph_int_t nodes_to_calc = IGRAPH_VIT_SIZE(vit);
  ------------------
  |  |  190|    822|#define IGRAPH_VIT_SIZE(vit)  ((vit).end - (vit).start)
  ------------------
  116|    822|        IGRAPH_CHECK(igraph_vector_resize(vector, nodes_to_calc));
  ------------------
  |  |  656|    822|    do { \
  |  |  657|    822|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    822|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
  117|  37.7k|        for (IGRAPH_VIT_RESET(vit), i = 0; !IGRAPH_VIT_END(vit);
  ------------------
  |  |  201|    822|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
                      for (IGRAPH_VIT_RESET(vit), i = 0; !IGRAPH_VIT_END(vit);
  ------------------
  |  |  179|  37.7k|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (117:44): [True: 36.9k, False: 822]
  ------------------
  118|  36.9k|             IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  167|  36.9k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  119|  36.9k|            VECTOR(*vector)[i] = res->x[IGRAPH_VIT_GET(vit)];
  ------------------
  |  |   60|  36.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*vector)[i] = res->x[IGRAPH_VIT_GET(vit)];
  ------------------
  |  |  214|  36.9k|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 36.9k, False: 0]
  |  |  ------------------
  |  |  215|  36.9k|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  120|  36.9k|        }
  121|    822|        igraph_vit_destroy(&vit);
  122|    822|        IGRAPH_FINALLY_CLEAN(1);
  123|    822|    }
  124|       |
  125|       |    // PRPACK calculates PageRank scores by solving a linear system,
  126|       |    // so there is no eigenvalue. We return an exact 1.0 in all cases.
  127|    822|    if (value) {
  ------------------
  |  Branch (127:9): [True: 822, False: 0]
  ------------------
  128|    822|        *value = 1.0;
  129|    822|    }
  130|       |
  131|    822|    return IGRAPH_SUCCESS;
  132|       |
  133|    822|    IGRAPH_HANDLE_EXCEPTIONS_END;
  ------------------
  |  |   23|    822|    } \
  |  |   24|    822|    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|    822|    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|    822|    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|    822|    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]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  134|      0|}

_ZN6prpack17prpack_base_graph10initializeEv:
   13|    822|void prpack_base_graph::initialize() {
   14|    822|    heads = NULL;
   15|    822|    tails = NULL;
   16|       |    vals = NULL;
   17|    822|}
_ZN6prpack17prpack_base_graphC2Ev:
   19|    822|prpack_base_graph::prpack_base_graph() {
   20|    822|    initialize();
   21|    822|    num_vs = num_es = 0;
   22|    822|}
_ZN6prpack17prpack_base_graphD2Ev:
  165|    822|prpack_base_graph::~prpack_base_graph() {
  166|    822|    delete[] heads;
  167|    822|    delete[] tails;
  168|    822|    delete[] vals;
  169|    822|}
_ZN6prpack17prpack_base_graph17normalize_weightsEv:
  322|    822|void prpack_base_graph::normalize_weights() {
  323|    822|    if (!vals) {
  ------------------
  |  Branch (323:9): [True: 0, False: 822]
  ------------------
  324|       |        // skip normalizing weights if not using values
  325|      0|        return;
  326|      0|    }
  327|    822|    std::vector<double> rowsums(num_vs,0.);
  328|       |    // the graph is in a compressed in-edge list.
  329|  37.7k|    for (int i=0; i<num_vs; ++i) {
  ------------------
  |  Branch (329:19): [True: 36.9k, False: 822]
  ------------------
  330|  36.9k|        int end_ei = (i + 1 != num_vs) ? tails[i + 1] : num_es;
  ------------------
  |  Branch (330:22): [True: 36.0k, False: 821]
  ------------------
  331|  55.1k|        for (int ei=tails[i]; ei < end_ei; ++ei) {
  ------------------
  |  Branch (331:31): [True: 18.2k, False: 36.9k]
  ------------------
  332|  18.2k|            int head = heads[ei];
  333|  18.2k|            rowsums[head] += vals[ei];
  334|  18.2k|        }
  335|  36.9k|    }
  336|  37.7k|    for (int i=0; i<num_vs; ++i) {
  ------------------
  |  Branch (336:19): [True: 36.9k, False: 822]
  ------------------
  337|  36.9k|        rowsums[i] = 1./rowsums[i];
  338|  36.9k|    }
  339|  37.7k|    for (int i=0; i<num_vs; ++i) {
  ------------------
  |  Branch (339:19): [True: 36.9k, False: 822]
  ------------------
  340|  36.9k|        int end_ei = (i + 1 != num_vs) ? tails[i + 1] : num_es;
  ------------------
  |  Branch (340:22): [True: 36.0k, False: 821]
  ------------------
  341|  55.1k|        for (int ei=tails[i]; ei < end_ei; ++ei) {
  ------------------
  |  Branch (341:31): [True: 18.2k, False: 36.9k]
  ------------------
  342|  18.2k|            vals[ei] *= rowsums[heads[ei]];
  343|  18.2k|        }
  344|  36.9k|    }
  345|    822|}

_ZN6prpack19prpack_igraph_graph19convert_from_igraphEPK8igraph_tPK15igraph_vector_tb:
   14|    822|        const igraph_t *g, const igraph_vector_t *weights, bool directed) {
   15|       |
   16|    822|    const bool treat_as_directed = igraph_is_directed(g) && directed;
  ------------------
  |  Branch (16:36): [True: 822, False: 0]
  |  Branch (16:61): [True: 822, False: 0]
  ------------------
   17|    822|    const igraph_int_t vcount = igraph_vcount(g);
   18|    822|    const igraph_int_t ecount = igraph_ecount(g);
   19|    822|    double *p_weight;
   20|    822|    int *p_head;
   21|       |
   22|    822|    if (vcount > INT_MAX) {
  ------------------
  |  Branch (22:9): [True: 0, False: 822]
  ------------------
   23|      0|        IGRAPH_ERROR("Too many vertices for PRPACK.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  ------------------
  |  |  |  |  401|       |#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
   24|      0|    }
   25|    822|    if (ecount > (treat_as_directed ? INT_MAX : INT_MAX/2)) {
  ------------------
  |  Branch (25:9): [True: 0, False: 822]
  |  Branch (25:19): [True: 822, False: 0]
  ------------------
   26|      0|        IGRAPH_ERROR("Too many edges for PRPACK.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  ------------------
  |  |  |  |  401|       |#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
   27|      0|    }
   28|       |
   29|    822|    if (weights && igraph_vector_size(weights) != ecount) {
  ------------------
  |  Branch (29:9): [True: 822, False: 0]
  |  Branch (29:20): [True: 0, False: 822]
  ------------------
   30|      0|        IGRAPH_ERROR("Weight vector length must agree with number of edges.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  ------------------
  |  |  |  |  401|       |#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
   31|      0|    }
   32|       |
   33|    822|    if (weights && ecount > 0) {
  ------------------
  |  Branch (33:9): [True: 822, False: 0]
  |  Branch (33:20): [True: 777, False: 45]
  ------------------
   34|    777|        igraph_real_t min, max;
   35|    777|        igraph_vector_minmax(weights, &min, &max);
   36|    777|        if (min < 0) {
  ------------------
  |  Branch (36:13): [True: 0, False: 777]
  ------------------
   37|      0|            IGRAPH_ERROR("Edge weights must not be negative.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  ------------------
  |  |  |  |  401|       |#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
   38|      0|        }
   39|    777|        if (isnan(min)) {
  ------------------
  |  Branch (39:13): [True: 0, False: 777]
  ------------------
   40|      0|            IGRAPH_ERROR("Edge weights must not be NaN.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  ------------------
  |  |  |  |  401|       |#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
   41|      0|        }
   42|    777|        if (!isfinite(max)) {
  ------------------
  |  Branch (42:13): [True: 0, False: 777]
  ------------------
   43|      0|            IGRAPH_ERROR("Edge weights must not be infinite.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  ------------------
  |  |  |  |  401|       |#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
   44|      0|        }
   45|    777|    }
   46|       |
   47|       |    // Get the number of vertices and edges. For undirected graphs, we add
   48|       |    // an edge in both directions.
   49|    822|    num_vs = (int) vcount;
   50|    822|    num_es = (int) ecount;
   51|    822|    num_self_es = 0;
   52|    822|    if (!treat_as_directed) {
  ------------------
  |  Branch (52:9): [True: 0, False: 822]
  ------------------
   53|      0|        num_es *= 2;
   54|      0|    }
   55|       |
   56|       |    // Allocate memory for heads and tails
   57|    822|    p_head = heads = new int[num_es];
   58|    822|    tails = new int[num_vs];
   59|    822|    memset(tails, 0, num_vs * sizeof(tails[0]));
   60|       |
   61|       |    // Allocate memory for weights if needed
   62|    822|    if (weights) {
  ------------------
  |  Branch (62:9): [True: 822, False: 0]
  ------------------
   63|    822|        p_weight = vals = new double[num_es];
   64|    822|    }
   65|       |
   66|       |    // Count the number of ignored edges (those with zero weight)
   67|    822|    int num_ignored_es = 0;
   68|       |
   69|    822|    if (treat_as_directed) {
  ------------------
  |  Branch (69:9): [True: 822, False: 0]
  ------------------
   70|       |        // Use of igraph "finally" stack is safe in this block
   71|       |        // since no exceptions can be thrown from here.
   72|       |
   73|       |        // Select all the edges and iterate over them by the source vertices
   74|       |        // Add the edges
   75|    822|        igraph_eit_t eit;
   76|    822|        IGRAPH_CHECK(igraph_eit_create(g, igraph_ess_all(IGRAPH_EDGEORDER_TO), &eit));
  ------------------
  |  |  656|    822|    do { \
  |  |  657|    822|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    822|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  ------------------
  |  |  |  |  |  |  401|       |#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  |  |  ------------------
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
   77|    822|        IGRAPH_FINALLY(igraph_eit_destroy, &eit);
  ------------------
  |  |  603|    822|    do { \
  |  |  604|    822|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    822|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    822|         * incorrect destructor function with the pointer */ \
  |  |  607|    822|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 822]
  |  |  ------------------
  |  |  608|    822|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
   78|  19.0k|        while (!IGRAPH_EIT_END(eit)) {
  ------------------
  |  |  371|  19.0k|#define IGRAPH_EIT_END(eit)   ((eit).pos >= (eit).end)
  ------------------
  |  Branch (78:16): [True: 18.2k, False: 822]
  ------------------
   79|  18.2k|            igraph_int_t eid = IGRAPH_EIT_GET(eit);
  ------------------
  |  |  405|  18.2k|    (igraph_int_t)((((eit).type == IGRAPH_EIT_RANGE) ? (eit).pos : \
  |  |  ------------------
  |  |  |  Branch (405:21): [True: 0, False: 18.2k]
  |  |  ------------------
  |  |  406|  18.2k|                        VECTOR(*(eit).vec)[(eit).pos]))
  |  |  ------------------
  |  |  |  |   60|  18.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
   80|  18.2k|            IGRAPH_EIT_NEXT(eit);
  ------------------
  |  |  359|  18.2k|#define IGRAPH_EIT_NEXT(eit) (++((eit).pos))
  ------------------
   81|       |
   82|       |            // Handle the weight
   83|  18.2k|            if (weights != NULL) {
  ------------------
  |  Branch (83:17): [True: 18.2k, False: 0]
  ------------------
   84|  18.2k|                if (VECTOR(*weights)[eid] == 0) {
  ------------------
  |  |   60|  18.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (84:21): [True: 0, False: 18.2k]
  ------------------
   85|       |                    // Edges with zero weight are ignored.
   86|      0|                    num_ignored_es++;
   87|      0|                    continue;
   88|      0|                }
   89|       |
   90|  18.2k|                *p_weight = VECTOR(*weights)[eid];
  ------------------
  |  |   60|  18.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   91|  18.2k|                ++p_weight;
   92|  18.2k|            }
   93|       |
   94|  18.2k|            *p_head = IGRAPH_FROM(g, eid);
  ------------------
  |  |  115|  18.2k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  18.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
   95|  18.2k|            ++p_head;
   96|  18.2k|            ++tails[IGRAPH_TO(g, eid)];
  ------------------
  |  |  128|  18.2k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  18.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
   97|       |
   98|  18.2k|            if (IGRAPH_FROM(g, eid) == IGRAPH_TO(g, eid)) {
  ------------------
  |  |  115|  18.2k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  18.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
                          if (IGRAPH_FROM(g, eid) == IGRAPH_TO(g, eid)) {
  ------------------
  |  |  128|  18.2k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  18.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (98:17): [True: 3.01k, False: 15.2k]
  ------------------
   99|  3.01k|                ++num_self_es;
  100|  3.01k|            }
  101|  18.2k|        }
  102|    822|        igraph_eit_destroy(&eit);
  103|    822|        IGRAPH_FINALLY_CLEAN(1);
  104|    822|    } else {
  105|       |        // Use of igraph "finally" stack is safe in this block
  106|       |        // since no exceptions can be thrown from here.
  107|       |
  108|       |        // Select all the edges and iterate over them by the target vertices
  109|      0|        igraph_vector_int_t neis;
  110|      0|        IGRAPH_CHECK(igraph_vector_int_init(&neis, 0));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  ------------------
  |  |  |  |  |  |  401|       |#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  |  |  ------------------
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  111|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, &neis);
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  112|       |
  113|      0|        for (int i = 0; i < num_vs; i++) {
  ------------------
  |  Branch (113:25): [True: 0, False: 0]
  ------------------
  114|      0|            IGRAPH_CHECK(igraph_incident(g, &neis, i, IGRAPH_ALL, IGRAPH_LOOPS));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  ------------------
  |  |  |  |  |  |  401|       |#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  |  |  ------------------
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  115|       |
  116|      0|            int temp = igraph_vector_int_size(&neis);
  117|       |
  118|      0|            int *p_head_copy = p_head;
  119|      0|            for (int j = 0; j < temp; j++) {
  ------------------
  |  Branch (119:29): [True: 0, False: 0]
  ------------------
  120|      0|                if (weights != NULL) {
  ------------------
  |  Branch (120:21): [True: 0, False: 0]
  ------------------
  121|      0|                    if (VECTOR(*weights)[VECTOR(neis)[j]] == 0) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  if (VECTOR(*weights)[VECTOR(neis)[j]] == 0) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (121:25): [True: 0, False: 0]
  ------------------
  122|       |                        // Edges with zero weight are ignored.
  123|      0|                        num_ignored_es++;
  124|      0|                        continue;
  125|      0|                    }
  126|       |
  127|      0|                    *p_weight = VECTOR(*weights)[VECTOR(neis)[j]];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  *p_weight = VECTOR(*weights)[VECTOR(neis)[j]];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  128|      0|                    ++p_weight;
  129|      0|                }
  130|       |
  131|      0|                *p_head = IGRAPH_OTHER(g, VECTOR(neis)[j], i);
  ------------------
  |  |  146|      0|    ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|      0|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  115|      0|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|      0|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (146:21): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  132|      0|                if (i == *p_head) {
  ------------------
  |  Branch (132:21): [True: 0, False: 0]
  ------------------
  133|      0|                    num_self_es++;
  134|      0|                }
  135|      0|                ++p_head;
  136|      0|            }
  137|      0|            tails[i] = p_head - p_head_copy;
  138|      0|        }
  139|       |
  140|      0|        igraph_vector_int_destroy(&neis);
  141|      0|        IGRAPH_FINALLY_CLEAN(1);
  142|      0|    }
  143|       |
  144|       |    // Decrease num_es by the number of ignored edges
  145|    822|    num_es -= num_ignored_es;
  146|       |
  147|       |    // Finalize the tails vector
  148|  37.7k|    for (int i = 0, sum = 0; i < num_vs; ++i) {
  ------------------
  |  Branch (148:30): [True: 36.9k, False: 822]
  ------------------
  149|  36.9k|        int temp = sum;
  150|  36.9k|        sum += tails[i];
  151|  36.9k|        tails[i] = temp;
  152|  36.9k|    }
  153|       |
  154|       |    // Normalize the weights
  155|    822|    normalize_weights();
  156|       |
  157|       |    // Debug
  158|       |    /*
  159|       |    printf("Heads:");
  160|       |    for (i = 0; i < num_es; ++i) {
  161|       |        printf(" %d", heads[i]);
  162|       |    }
  163|       |    printf("\n");
  164|       |    printf("Tails:");
  165|       |    for (i = 0; i < num_vs; ++i) {
  166|       |        printf(" %d", tails[i]);
  167|       |    }
  168|       |    printf("\n");
  169|       |    if (vals) {
  170|       |        printf("Vals:");
  171|       |        for (i = 0; i < num_es; ++i) {
  172|       |            printf(" %.4f", vals[i]);
  173|       |        }
  174|       |        printf("\n");
  175|       |    }
  176|       |    printf("===========================\n");
  177|       |    */
  178|       |
  179|    822|    return IGRAPH_SUCCESS;
  180|    822|}

_ZN6prpack19prpack_igraph_graphC2Ev:
   16|    822|        prpack_igraph_graph() { }

_ZN6prpack28prpack_preprocessed_ge_graph10initializeEv:
    6|    822|void prpack_preprocessed_ge_graph::initialize() {
    7|    822|    matrix = NULL;
    8|       |    d = NULL;
    9|    822|}
_ZN6prpack28prpack_preprocessed_ge_graph19initialize_weightedEPKNS_17prpack_base_graphE:
   11|    822|void prpack_preprocessed_ge_graph::initialize_weighted(const prpack_base_graph* bg) {
   12|       |    // initialize d
   13|    822|    fill(d, d + num_vs, 1);
   14|       |    // fill in the matrix
   15|  37.7k|    for (int i = 0, inum_vs = 0; i < num_vs; ++i, inum_vs += num_vs) {
  ------------------
  |  Branch (15:34): [True: 36.9k, False: 822]
  ------------------
   16|  36.9k|        const int start_j = bg->tails[i];
   17|  36.9k|        const int end_j = (i + 1 != num_vs) ? bg->tails[i + 1] : bg->num_es;
  ------------------
  |  Branch (17:27): [True: 36.0k, False: 821]
  ------------------
   18|  55.1k|        for (int j = start_j; j < end_j; ++j) {
  ------------------
  |  Branch (18:31): [True: 18.2k, False: 36.9k]
  ------------------
   19|  18.2k|            matrix[inum_vs + bg->heads[j]] += bg->vals[j];
   20|  18.2k|            d[bg->heads[j]] -= bg->vals[j];
   21|  18.2k|        }
   22|  36.9k|    }
   23|    822|}
_ZN6prpack28prpack_preprocessed_ge_graphC2EPKNS_17prpack_base_graphE:
   49|    822|prpack_preprocessed_ge_graph::prpack_preprocessed_ge_graph(const prpack_base_graph* bg) {
   50|    822|    initialize();
   51|    822|    num_vs = bg->num_vs;
   52|    822|    num_es = bg->num_es;
   53|    822|    matrix = new double[num_vs*num_vs];
   54|    822|    d = new double[num_vs];
   55|    822|    fill(matrix, matrix + num_vs*num_vs, 0);
   56|    822|    if (bg->vals != NULL)
  ------------------
  |  Branch (56:9): [True: 822, False: 0]
  ------------------
   57|    822|        initialize_weighted(bg);
   58|      0|    else
   59|      0|        initialize_unweighted(bg);
   60|    822|}
_ZN6prpack28prpack_preprocessed_ge_graphD2Ev:
   62|    822|prpack_preprocessed_ge_graph::~prpack_preprocessed_ge_graph() {
   63|    822|    delete[] matrix;
   64|    822|    delete[] d;
   65|    822|}

_ZN6prpack13prpack_resultC2Ev:
    5|    822|prpack_result::prpack_result() {
    6|       |    x = NULL;
    7|    822|}
_ZN6prpack13prpack_resultD2Ev:
    9|    822|prpack_result::~prpack_result() {
   10|    822|    delete[] x;
   11|    822|}

_ZN6prpack13prpack_solver10initializeEv:
   11|    822|void prpack_solver::initialize() {
   12|    822|    geg = NULL;
   13|    822|    gsg = NULL;
   14|    822|    sg = NULL;
   15|       |    sccg = NULL;
   16|    822|    owns_bg = true;
   17|    822|}
_ZN6prpack13prpack_solverC2EPNS_17prpack_base_graphEb:
   39|    822|prpack_solver::prpack_solver(prpack_base_graph* g, bool owns_bg) {
   40|    822|    initialize();
   41|    822|    this->owns_bg = owns_bg;
   42|    822|    TIME(read_time, bg = g);
  ------------------
  |  |   10|    822|    (T) = prpack_utils::get_time(); \
  |  |   11|    822|    (X);                            \
  |  |   12|    822|    (T) = prpack_utils::get_time() - (T)
  ------------------
   43|    822|}
_ZN6prpack13prpack_solverD2Ev:
   52|    822|prpack_solver::~prpack_solver() {
   53|    822|    if (owns_bg) {
  ------------------
  |  Branch (53:9): [True: 0, False: 822]
  ------------------
   54|      0|        delete bg;
   55|      0|    }
   56|    822|    delete geg;
   57|    822|    delete gsg;
   58|    822|    delete sg;
   59|    822|    delete sccg;
   60|    822|}
_ZN6prpack13prpack_solver5solveEddPKdS2_PKc:
   75|    822|        const char* method) {
   76|    822|    double preprocess_time = 0;
   77|    822|    double compute_time = 0;
   78|    822|    prpack_result* ret = NULL;
   79|       |    // decide which method to run
   80|    822|    string m;
   81|    822|    if (strcmp(method, "") != 0)
  ------------------
  |  Branch (81:9): [True: 0, False: 822]
  ------------------
   82|      0|        m = string(method);
   83|    822|    else {
   84|    822|        if (bg->num_vs < 128)
  ------------------
  |  Branch (84:13): [True: 822, False: 0]
  ------------------
   85|    822|            m = "ge";
   86|      0|        else if (sccg != NULL)
  ------------------
  |  Branch (86:18): [True: 0, False: 0]
  ------------------
   87|      0|            m = "sccgs";
   88|      0|        else if (sg != NULL)
  ------------------
  |  Branch (88:18): [True: 0, False: 0]
  ------------------
   89|      0|            m = "sg";
   90|      0|        else
   91|      0|            m = "sccgs";
   92|    822|        if (u != v)
  ------------------
  |  Branch (92:13): [True: 0, False: 822]
  ------------------
   93|      0|            m += "_uv";
   94|    822|    }
   95|       |    // run the appropriate method
   96|    822|    if (m == "ge") {
  ------------------
  |  Branch (96:9): [True: 822, False: 0]
  ------------------
   97|    822|        if (geg == NULL) {
  ------------------
  |  Branch (97:13): [True: 822, False: 0]
  ------------------
   98|    822|            TIME(preprocess_time, geg = new prpack_preprocessed_ge_graph(bg));
  ------------------
  |  |   10|    822|    (T) = prpack_utils::get_time(); \
  |  |   11|    822|    (X);                            \
  |  |   12|    822|    (T) = prpack_utils::get_time() - (T)
  ------------------
   99|    822|        }
  100|    822|        TIME(compute_time, ret = solve_via_ge(
  ------------------
  |  |   10|    822|    (T) = prpack_utils::get_time(); \
  |  |   11|    822|    (X);                            \
  |  |   12|    822|    (T) = prpack_utils::get_time() - (T)
  ------------------
  101|    822|                alpha,
  102|    822|                tol,
  103|    822|                geg->num_vs,
  104|    822|                geg->matrix,
  105|    822|                u));
  106|    822|    } else if (m == "ge_uv") {
  ------------------
  |  Branch (106:16): [True: 0, False: 0]
  ------------------
  107|      0|        if (geg == NULL) {
  ------------------
  |  Branch (107:13): [True: 0, False: 0]
  ------------------
  108|      0|            TIME(preprocess_time, geg = new prpack_preprocessed_ge_graph(bg));
  ------------------
  |  |   10|      0|    (T) = prpack_utils::get_time(); \
  |  |   11|      0|    (X);                            \
  |  |   12|      0|    (T) = prpack_utils::get_time() - (T)
  ------------------
  109|      0|        }
  110|      0|        TIME(compute_time, ret = solve_via_ge_uv(
  ------------------
  |  |   10|      0|    (T) = prpack_utils::get_time(); \
  |  |   11|      0|    (X);                            \
  |  |   12|      0|    (T) = prpack_utils::get_time() - (T)
  ------------------
  111|      0|                alpha,
  112|      0|                tol,
  113|      0|                geg->num_vs,
  114|      0|                geg->matrix,
  115|      0|                geg->d,
  116|      0|                u,
  117|      0|                v));
  118|      0|    } else if (m == "gs") {
  ------------------
  |  Branch (118:16): [True: 0, False: 0]
  ------------------
  119|      0|        if (gsg == NULL) {
  ------------------
  |  Branch (119:13): [True: 0, False: 0]
  ------------------
  120|      0|            TIME(preprocess_time, gsg = new prpack_preprocessed_gs_graph(bg));
  ------------------
  |  |   10|      0|    (T) = prpack_utils::get_time(); \
  |  |   11|      0|    (X);                            \
  |  |   12|      0|    (T) = prpack_utils::get_time() - (T)
  ------------------
  121|      0|        }
  122|      0|        TIME(compute_time, ret = solve_via_gs(
  ------------------
  |  |   10|      0|    (T) = prpack_utils::get_time(); \
  |  |   11|      0|    (X);                            \
  |  |   12|      0|    (T) = prpack_utils::get_time() - (T)
  ------------------
  123|      0|                alpha,
  124|      0|                tol,
  125|      0|                gsg->num_vs,
  126|      0|                gsg->num_es,
  127|      0|                gsg->heads,
  128|      0|                gsg->tails,
  129|      0|                gsg->vals,
  130|      0|                gsg->ii,
  131|      0|                gsg->d,
  132|      0|                gsg->num_outlinks,
  133|      0|                u,
  134|      0|                v));
  135|      0|    } else if (m == "gserr") {
  ------------------
  |  Branch (135:16): [True: 0, False: 0]
  ------------------
  136|      0|        if (gsg == NULL) {
  ------------------
  |  Branch (136:13): [True: 0, False: 0]
  ------------------
  137|      0|            TIME(preprocess_time, gsg = new prpack_preprocessed_gs_graph(bg));
  ------------------
  |  |   10|      0|    (T) = prpack_utils::get_time(); \
  |  |   11|      0|    (X);                            \
  |  |   12|      0|    (T) = prpack_utils::get_time() - (T)
  ------------------
  138|      0|        }
  139|      0|        TIME(compute_time, ret = solve_via_gs_err(
  ------------------
  |  |   10|      0|    (T) = prpack_utils::get_time(); \
  |  |   11|      0|    (X);                            \
  |  |   12|      0|    (T) = prpack_utils::get_time() - (T)
  ------------------
  140|      0|                alpha,
  141|      0|                tol,
  142|      0|                gsg->num_vs,
  143|      0|                gsg->num_es,
  144|      0|                gsg->heads,
  145|      0|                gsg->tails,
  146|      0|                gsg->ii,
  147|      0|                gsg->num_outlinks,
  148|      0|                u,
  149|      0|                v));
  150|      0|    } else if (m == "sgs") {
  ------------------
  |  Branch (150:16): [True: 0, False: 0]
  ------------------
  151|      0|        if (sg == NULL) {
  ------------------
  |  Branch (151:13): [True: 0, False: 0]
  ------------------
  152|      0|            TIME(preprocess_time, sg = new prpack_preprocessed_schur_graph(bg));
  ------------------
  |  |   10|      0|    (T) = prpack_utils::get_time(); \
  |  |   11|      0|    (X);                            \
  |  |   12|      0|    (T) = prpack_utils::get_time() - (T)
  ------------------
  153|      0|        }
  154|      0|        TIME(compute_time, ret = solve_via_schur_gs(
  ------------------
  |  |   10|      0|    (T) = prpack_utils::get_time(); \
  |  |   11|      0|    (X);                            \
  |  |   12|      0|    (T) = prpack_utils::get_time() - (T)
  ------------------
  155|      0|                alpha,
  156|      0|                tol,
  157|      0|                sg->num_vs,
  158|      0|                sg->num_no_in_vs,
  159|      0|                sg->num_no_out_vs,
  160|      0|                sg->num_es,
  161|      0|                sg->heads,
  162|      0|                sg->tails,
  163|      0|                sg->vals,
  164|      0|                sg->ii,
  165|      0|                sg->d,
  166|      0|                sg->num_outlinks,
  167|      0|                u,
  168|      0|                sg->encoding,
  169|      0|                sg->decoding));
  170|      0|    } else if (m == "sgs_uv") {
  ------------------
  |  Branch (170:16): [True: 0, False: 0]
  ------------------
  171|      0|        if (sg == NULL) {
  ------------------
  |  Branch (171:13): [True: 0, False: 0]
  ------------------
  172|      0|            TIME(preprocess_time, sg = new prpack_preprocessed_schur_graph(bg));
  ------------------
  |  |   10|      0|    (T) = prpack_utils::get_time(); \
  |  |   11|      0|    (X);                            \
  |  |   12|      0|    (T) = prpack_utils::get_time() - (T)
  ------------------
  173|      0|        }
  174|      0|        TIME(compute_time, ret = solve_via_schur_gs_uv(
  ------------------
  |  |   10|      0|    (T) = prpack_utils::get_time(); \
  |  |   11|      0|    (X);                            \
  |  |   12|      0|    (T) = prpack_utils::get_time() - (T)
  ------------------
  175|      0|                alpha,
  176|      0|                tol,
  177|      0|                sg->num_vs,
  178|      0|                sg->num_no_in_vs,
  179|      0|                sg->num_no_out_vs,
  180|      0|                sg->num_es,
  181|      0|                sg->heads,
  182|      0|                sg->tails,
  183|      0|                sg->vals,
  184|      0|                sg->ii,
  185|      0|                sg->d,
  186|      0|                sg->num_outlinks,
  187|      0|                u,
  188|      0|                v,
  189|      0|                sg->encoding,
  190|      0|                sg->decoding));
  191|      0|    } else if (m == "sccgs") {
  ------------------
  |  Branch (191:16): [True: 0, False: 0]
  ------------------
  192|      0|        if (sccg == NULL) {
  ------------------
  |  Branch (192:13): [True: 0, False: 0]
  ------------------
  193|      0|            TIME(preprocess_time, sccg = new prpack_preprocessed_scc_graph(bg));
  ------------------
  |  |   10|      0|    (T) = prpack_utils::get_time(); \
  |  |   11|      0|    (X);                            \
  |  |   12|      0|    (T) = prpack_utils::get_time() - (T)
  ------------------
  194|      0|        }
  195|      0|        TIME(compute_time, ret = solve_via_scc_gs(
  ------------------
  |  |   10|      0|    (T) = prpack_utils::get_time(); \
  |  |   11|      0|    (X);                            \
  |  |   12|      0|    (T) = prpack_utils::get_time() - (T)
  ------------------
  196|      0|                alpha,
  197|      0|                tol,
  198|      0|                sccg->num_vs,
  199|      0|                sccg->num_es_inside,
  200|      0|                sccg->heads_inside,
  201|      0|                sccg->tails_inside,
  202|      0|                sccg->vals_inside,
  203|      0|                sccg->num_es_outside,
  204|      0|                sccg->heads_outside,
  205|      0|                sccg->tails_outside,
  206|      0|                sccg->vals_outside,
  207|      0|                sccg->ii,
  208|      0|                sccg->d,
  209|      0|                sccg->num_outlinks,
  210|      0|                u,
  211|      0|                sccg->num_comps,
  212|      0|                sccg->divisions,
  213|      0|                sccg->encoding,
  214|      0|                sccg->decoding));
  215|      0|    } else if (m == "sccgs_uv") {
  ------------------
  |  Branch (215:16): [True: 0, False: 0]
  ------------------
  216|      0|        if (sccg == NULL) {
  ------------------
  |  Branch (216:13): [True: 0, False: 0]
  ------------------
  217|      0|            TIME(preprocess_time, sccg = new prpack_preprocessed_scc_graph(bg));
  ------------------
  |  |   10|      0|    (T) = prpack_utils::get_time(); \
  |  |   11|      0|    (X);                            \
  |  |   12|      0|    (T) = prpack_utils::get_time() - (T)
  ------------------
  218|      0|        }
  219|      0|        TIME(compute_time, ret = solve_via_scc_gs_uv(
  ------------------
  |  |   10|      0|    (T) = prpack_utils::get_time(); \
  |  |   11|      0|    (X);                            \
  |  |   12|      0|    (T) = prpack_utils::get_time() - (T)
  ------------------
  220|      0|                alpha,
  221|      0|                tol,
  222|      0|                sccg->num_vs,
  223|      0|                sccg->num_es_inside,
  224|      0|                sccg->heads_inside,
  225|      0|                sccg->tails_inside,
  226|      0|                sccg->vals_inside,
  227|      0|                sccg->num_es_outside,
  228|      0|                sccg->heads_outside,
  229|      0|                sccg->tails_outside,
  230|      0|                sccg->vals_outside,
  231|      0|                sccg->ii,
  232|      0|                sccg->d,
  233|      0|                sccg->num_outlinks,
  234|      0|                u,
  235|      0|                v,
  236|      0|                sccg->num_comps,
  237|      0|                sccg->divisions,
  238|      0|                sccg->encoding,
  239|      0|                sccg->decoding));
  240|      0|    } else {
  241|      0|        throw invalid_argument("Unknown method specified for PRPACK: '" + m + "'.");
  242|      0|    }
  243|    822|    ret->method = m;
  244|    822|    ret->read_time = read_time;
  245|    822|    ret->preprocess_time = preprocess_time;
  246|    822|    ret->compute_time = compute_time;
  247|    822|    ret->num_vs = bg->num_vs;
  248|    822|    ret->num_es = bg->num_es;
  249|    822|    return ret;
  250|    822|}
_ZN6prpack13prpack_solver12solve_via_geEddiPKdS2_:
  259|    822|        const double* uv) {
  260|    822|    prpack_result* ret = new prpack_result();
  261|       |    // initialize uv values
  262|    822|    const double uv_const = 1.0/num_vs;
  263|    822|    const int uv_exists = (uv) ? 1 : 0;
  ------------------
  |  Branch (263:27): [True: 0, False: 822]
  ------------------
  264|    822|    uv = (uv) ? uv : &uv_const;
  ------------------
  |  Branch (264:10): [True: 0, False: 822]
  ------------------
  265|       |    // create matrix A
  266|    822|    double* A = new double[num_vs*num_vs];
  267|  1.97M|    for (int i = 0; i < num_vs*num_vs; ++i)
  ------------------
  |  Branch (267:21): [True: 1.97M, False: 822]
  ------------------
  268|  1.97M|        A[i] = -alpha*matrix[i];
  269|  37.7k|    for (int i = 0; i < num_vs*num_vs; i += num_vs + 1)
  ------------------
  |  Branch (269:21): [True: 36.9k, False: 822]
  ------------------
  270|  36.9k|        ++A[i];
  271|       |    // create vector b
  272|    822|    double* b = new double[num_vs];
  273|  37.7k|    for (int i = 0; i < num_vs; ++i)
  ------------------
  |  Branch (273:21): [True: 36.9k, False: 822]
  ------------------
  274|  36.9k|        b[i] = uv[uv_exists*i];
  275|       |    // solve and normalize
  276|    822|    ge(num_vs, A, b);
  277|    822|    normalize(num_vs, b);
  278|       |    // clean up and return
  279|    822|    delete[] A;
  280|    822|    ret->num_es_touched = -1;
  281|    822|    ret->x = b;
  282|    822|    return ret;
  283|    822|}
_ZN6prpack13prpack_solver2geEiPdS1_:
  827|    822|void prpack_solver::ge(const int sz, double* A, double* b) {
  828|       |    // put into triangular form
  829|  37.7k|    for (int i = 0, isz = 0; i < sz; ++i, isz += sz)
  ------------------
  |  Branch (829:30): [True: 36.9k, False: 822]
  ------------------
  830|  1.00M|        for (int k = 0, ksz = 0; k < i; ++k, ksz += sz)
  ------------------
  |  Branch (830:34): [True: 970k, False: 36.9k]
  ------------------
  831|   970k|            if (A[isz + k] != 0) {
  ------------------
  |  Branch (831:17): [True: 15.2k, False: 955k]
  ------------------
  832|  15.2k|                const double coeff = A[isz + k]/A[ksz + k];
  833|  15.2k|                A[isz + k] = 0;
  834|   595k|                for (int j = k + 1; j < sz; ++j)
  ------------------
  |  Branch (834:37): [True: 579k, False: 15.2k]
  ------------------
  835|   579k|                    A[isz + j] -= coeff*A[ksz + j];
  836|  15.2k|                b[i] -= coeff*b[k];
  837|  15.2k|            }
  838|       |    // backwards substitution
  839|  37.7k|    for (int i = sz - 1, isz = (sz - 1)*sz; i >= 0; --i, isz -= sz) {
  ------------------
  |  Branch (839:45): [True: 36.9k, False: 822]
  ------------------
  840|  1.00M|        for (int j = i + 1; j < sz; ++j)
  ------------------
  |  Branch (840:29): [True: 970k, False: 36.9k]
  ------------------
  841|   970k|            b[i] -= A[isz + j]*b[j];
  842|  36.9k|        b[i] /= A[isz + i];
  843|  36.9k|    }
  844|    822|}
_ZN6prpack13prpack_solver9normalizeEiPd:
  847|    822|void prpack_solver::normalize(const int length, double* x) {
  848|    822|    double norm = 0, c = 0;
  849|  37.7k|    for (int i = 0; i < length; ++i) {
  ------------------
  |  Branch (849:21): [True: 36.9k, False: 822]
  ------------------
  850|  36.9k|        COMPENSATED_SUM(norm, x[i], c);
  ------------------
  |  |   17|  36.9k|    double compensated_sum_y = (A) - (C);               \
  |  |   18|  36.9k|    double compensated_sum_t = (S) + compensated_sum_y; \
  |  |   19|  36.9k|    (C) = compensated_sum_t - (S) - compensated_sum_y;  \
  |  |   20|  36.9k|    (S) = compensated_sum_t
  ------------------
  851|  36.9k|    }
  852|    822|    norm = 1/norm;
  853|  37.7k|    for (int i = 0; i < length; ++i)
  ------------------
  |  Branch (853:21): [True: 36.9k, False: 822]
  ------------------
  854|  36.9k|        x[i] *= norm;
  855|    822|}

_ZN6prpack12prpack_utils8get_timeEv:
   33|  4.93k|double prpack_utils::get_time() {
   34|  4.93k|    struct timeval t;
   35|       |    gettimeofday(&t, NULL);
   36|  4.93k|    return (t.tv_sec*1.0 + t.tv_usec/1000000.0);
   37|  4.93k|}

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

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

igraph_fixed_vectorlist_destroy:
   25|  1.64k|void igraph_fixed_vectorlist_destroy(igraph_fixed_vectorlist_t *l) {
   26|  1.64k|    igraph_vector_int_list_destroy(&l->vecs);
   27|  1.64k|}
igraph_fixed_vectorlist_convert:
   32|  1.64k|) {
   33|  1.64k|    igraph_vector_int_t sizes;
   34|  1.64k|    igraph_int_t i, no = igraph_vector_int_size(from), to;
   35|       |
   36|  1.64k|    IGRAPH_VECTOR_INT_LIST_INIT_FINALLY(&l->vecs, size);
  ------------------
  |  |   58|  1.64k|    do { IGRAPH_CHECK(igraph_vector_int_list_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  1.64k|    do { \
  |  |  |  |  657|  1.64k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.64k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.64k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   59|  1.64k|        IGRAPH_FINALLY(igraph_vector_int_list_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  1.64k|    do { \
  |  |  |  |  604|  1.64k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.64k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.64k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.64k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.64k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.64k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.64k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (59:69): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
   37|  1.64k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&sizes, size);
  ------------------
  |  |  119|  1.64k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  1.64k|    do { \
  |  |  |  |  657|  1.64k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.64k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.64k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  1.64k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  1.64k|    do { \
  |  |  |  |  604|  1.64k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.64k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.64k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.64k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.64k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.64k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.64k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
   38|       |
   39|  29.3k|    for (i = 0; i < no; i++) {
  ------------------
  |  Branch (39:17): [True: 27.6k, False: 1.64k]
  ------------------
   40|  27.6k|        to = VECTOR(*from)[i];
  ------------------
  |  |   60|  27.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   41|  27.6k|        if (to >= 0) {
  ------------------
  |  Branch (41:13): [True: 27.3k, False: 303]
  ------------------
   42|  27.3k|            VECTOR(sizes)[to] += 1;
  ------------------
  |  |   60|  27.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   43|  27.3k|        }
   44|  27.6k|    }
   45|       |
   46|  29.3k|    for (i = 0; i < no; i++) {
  ------------------
  |  Branch (46:17): [True: 27.6k, False: 1.64k]
  ------------------
   47|  27.6k|        to = VECTOR(*from)[i];
  ------------------
  |  |   60|  27.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   48|  27.6k|        if (to >= 0) {
  ------------------
  |  Branch (48:13): [True: 27.3k, False: 303]
  ------------------
   49|  27.3k|            igraph_vector_int_t *v = igraph_vector_int_list_get_ptr(&l->vecs, to);
   50|  27.3k|            IGRAPH_CHECK(igraph_vector_int_push_back(v, i));
  ------------------
  |  |  656|  27.3k|    do { \
  |  |  657|  27.3k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  27.3k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  27.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 27.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  27.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 27.3k]
  |  |  ------------------
  ------------------
   51|  27.3k|        }
   52|  27.6k|    }
   53|       |
   54|  1.64k|    igraph_vector_int_destroy(&sizes);
   55|  1.64k|    IGRAPH_FINALLY_CLEAN(2);  /* + l->vecs */
   56|       |
   57|  1.64k|    return IGRAPH_SUCCESS;
   58|  1.64k|}

igraph_2wheap_init:
  800|   163k|igraph_error_t igraph_2wheap_init(igraph_2wheap_t *h, igraph_int_t max_size) {
  801|   163k|    h->max_size = max_size;
  802|       |    /* We start with the biggest */
  803|   163k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&h->index2, max_size);
  ------------------
  |  |  119|   163k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|   163k|    do { \
  |  |  |  |  657|   163k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|   163k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|   163k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 163k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|   163k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 163k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|   163k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|   163k|    do { \
  |  |  |  |  604|   163k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|   163k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|   163k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|   163k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 163k]
  |  |  |  |  ------------------
  |  |  |  |  608|   163k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|   163k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 163k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 163k]
  |  |  ------------------
  ------------------
  804|   163k|    IGRAPH_VECTOR_INIT_FINALLY(&h->data, 0);
  ------------------
  |  |  104|   163k|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|   163k|    do { \
  |  |  |  |  657|   163k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|   163k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|   163k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 163k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|   163k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 163k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|   163k|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|   163k|    do { \
  |  |  |  |  604|   163k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|   163k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|   163k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|   163k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 163k]
  |  |  |  |  ------------------
  |  |  |  |  608|   163k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|   163k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 163k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (105:60): [Folded, False: 163k]
  |  |  ------------------
  ------------------
  805|   163k|    IGRAPH_CHECK(igraph_vector_int_init(&h->index, 0));
  ------------------
  |  |  656|   163k|    do { \
  |  |  657|   163k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   163k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   163k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 163k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   163k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 163k]
  |  |  ------------------
  ------------------
  806|       |    /* IGRAPH_FINALLY(igraph_vector_int_destroy, &h->index); */
  807|       |
  808|   163k|    IGRAPH_FINALLY_CLEAN(2);
  809|   163k|    return IGRAPH_SUCCESS;
  810|   163k|}
igraph_2wheap_destroy:
  815|   163k|void igraph_2wheap_destroy(igraph_2wheap_t *h) {
  816|   163k|    igraph_vector_destroy(&h->data);
  817|   163k|    igraph_vector_int_destroy(&h->index);
  818|   163k|    igraph_vector_int_destroy(&h->index2);
  819|   163k|}
igraph_2wheap_clear:
  824|   190k|void igraph_2wheap_clear(igraph_2wheap_t *h) {
  825|   190k|    igraph_vector_clear(&h->data);
  826|   190k|    igraph_vector_int_clear(&h->index);
  827|   190k|    igraph_vector_int_null(&h->index2);
  828|   190k|}
igraph_2wheap_empty:
  833|  1.73M|igraph_bool_t igraph_2wheap_empty(const igraph_2wheap_t *h) {
  834|  1.73M|    return igraph_vector_empty(&h->data);
  835|  1.73M|}
igraph_2wheap_push_with_index:
  844|  1.38M|                                  igraph_int_t idx, igraph_real_t elem) {
  845|       |
  846|       |    /*   printf("-> %.2g [%li]\n", elem, idx); */
  847|       |
  848|  1.38M|    igraph_int_t size = igraph_vector_size(&h->data);
  849|       |
  850|  1.38M|    if (size > IGRAPH_INTEGER_MAX - 2) {
  ------------------
  |  |   74|  1.38M|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (850:9): [True: 0, False: 1.38M]
  ------------------
  851|       |        /* to allow size+2 below */
  852|      0|        IGRAPH_ERROR("Cannot push to 2wheap, already at maximum size.", IGRAPH_EOVERFLOW);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  853|      0|    }
  854|       |
  855|  1.38M|    IGRAPH_CHECK(igraph_vector_push_back(&h->data, elem));
  ------------------
  |  |  656|  1.38M|    do { \
  |  |  657|  1.38M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.38M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.38M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.38M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, 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.38M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.38M]
  |  |  ------------------
  ------------------
  856|  1.38M|    IGRAPH_CHECK(igraph_vector_int_push_back(&h->index, idx));
  ------------------
  |  |  656|  1.38M|    do { \
  |  |  657|  1.38M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.38M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.38M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.38M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, 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.38M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.38M]
  |  |  ------------------
  ------------------
  857|  1.38M|    VECTOR(h->index2)[idx] = size + 2;
  ------------------
  |  |   60|  1.38M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  858|       |
  859|       |    /* maintain heap */
  860|  1.38M|    igraph_i_2wheap_shift_up(h, size);
  861|  1.38M|    return IGRAPH_SUCCESS;
  862|  1.38M|}
igraph_2wheap_size:
  867|  4.87M|igraph_int_t igraph_2wheap_size(const igraph_2wheap_t *h) {
  868|  4.87M|    return igraph_vector_size(&h->data);
  869|  4.87M|}
igraph_2wheap_max_index:
  891|  1.38M|igraph_int_t igraph_2wheap_max_index(const igraph_2wheap_t *h) {
  892|  1.38M|    return VECTOR(h->index)[0];
  ------------------
  |  |   60|  1.38M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  893|  1.38M|}
igraph_2wheap_has_elem:
  899|   362k|igraph_bool_t igraph_2wheap_has_elem(const igraph_2wheap_t *h, igraph_int_t idx) {
  900|   362k|    return (VECTOR(h->index2)[idx] != 0);
  ------------------
  |  |   60|   362k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  901|   362k|}
igraph_2wheap_has_active:
  907|   362k|igraph_bool_t igraph_2wheap_has_active(const igraph_2wheap_t *h, igraph_int_t idx) {
  908|   362k|    return VECTOR(h->index2)[idx] > 1;
  ------------------
  |  |   60|   362k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  909|   362k|}
igraph_2wheap_get:
  914|  77.8k|igraph_real_t igraph_2wheap_get(const igraph_2wheap_t *h, igraph_int_t idx) {
  915|  77.8k|    igraph_int_t i = VECTOR(h->index2)[idx] - 2;
  ------------------
  |  |   60|  77.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  916|  77.8k|    return VECTOR(h->data)[i];
  ------------------
  |  |   60|  77.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  917|  77.8k|}
igraph_2wheap_delete_max:
  925|  1.20M|igraph_real_t igraph_2wheap_delete_max(igraph_2wheap_t *h) {
  926|       |
  927|  1.20M|    igraph_real_t tmp = VECTOR(h->data)[0];
  ------------------
  |  |   60|  1.20M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  928|  1.20M|    igraph_int_t tmpidx = VECTOR(h->index)[0];
  ------------------
  |  |   60|  1.20M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  929|  1.20M|    igraph_i_2wheap_switch(h, 0, igraph_2wheap_size(h) - 1);
  930|  1.20M|    igraph_vector_pop_back(&h->data);
  931|  1.20M|    igraph_vector_int_pop_back(&h->index);
  932|  1.20M|    VECTOR(h->index2)[tmpidx] = 0;
  ------------------
  |  |   60|  1.20M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  933|  1.20M|    igraph_i_2wheap_sink(h, 0);
  934|       |
  935|       |    /*   printf("<-max %.2g\n", tmp); */
  936|       |
  937|  1.20M|    return tmp;
  938|  1.20M|}
igraph_2wheap_deactivate_max:
  946|   177k|igraph_real_t igraph_2wheap_deactivate_max(igraph_2wheap_t *h) {
  947|       |
  948|   177k|    igraph_real_t tmp = VECTOR(h->data)[0];
  ------------------
  |  |   60|   177k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  949|   177k|    igraph_int_t tmpidx = VECTOR(h->index)[0];
  ------------------
  |  |   60|   177k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  950|   177k|    igraph_i_2wheap_switch(h, 0, igraph_2wheap_size(h) - 1);
  951|   177k|    igraph_vector_pop_back(&h->data);
  952|   177k|    igraph_vector_int_pop_back(&h->index);
  953|   177k|    VECTOR(h->index2)[tmpidx] = 1;
  ------------------
  |  |   60|   177k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  954|   177k|    igraph_i_2wheap_sink(h, 0);
  955|       |
  956|   177k|    return tmp;
  957|   177k|}
igraph_2wheap_modify:
  985|   196k|void igraph_2wheap_modify(igraph_2wheap_t *h, igraph_int_t idx, igraph_real_t elem) {
  986|       |
  987|   196k|    igraph_int_t pos = VECTOR(h->index2)[idx] - 2;
  ------------------
  |  |   60|   196k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  988|       |
  989|       |    /*   printf("-- %.2g -> %.2g\n", VECTOR(h->data)[pos], elem); */
  990|       |
  991|   196k|    VECTOR(h->data)[pos] = elem;
  ------------------
  |  |   60|   196k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  992|   196k|    igraph_i_2wheap_sink(h, pos);
  993|   196k|    igraph_i_2wheap_shift_up(h, pos);
  994|   196k|}
indheap.c:igraph_i_2wheap_shift_up:
  762|  2.63M|                                     igraph_int_t elem) {
  763|  2.63M|    if (elem == 0 || VECTOR(h->data)[elem] < VECTOR(h->data)[PARENT(elem)]) {
  ------------------
  |  |   60|  1.88M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                  if (elem == 0 || VECTOR(h->data)[elem] < VECTOR(h->data)[PARENT(elem)]) {
  ------------------
  |  |   60|  1.88M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                  if (elem == 0 || VECTOR(h->data)[elem] < VECTOR(h->data)[PARENT(elem)]) {
  ------------------
  |  |  733|  1.88M|#define PARENT(x)     (((x)+1)/2-1)
  ------------------
  |  Branch (763:9): [True: 746k, False: 1.88M]
  |  Branch (763:22): [True: 835k, False: 1.04M]
  ------------------
  764|       |        /* at the top */
  765|  1.58M|    } else {
  766|  1.04M|        igraph_i_2wheap_switch(h, elem, PARENT(elem));
  ------------------
  |  |  733|  1.04M|#define PARENT(x)     (((x)+1)/2-1)
  ------------------
  767|  1.04M|        igraph_i_2wheap_shift_up(h, PARENT(elem));
  ------------------
  |  |  733|  1.04M|#define PARENT(x)     (((x)+1)/2-1)
  ------------------
  768|  1.04M|    }
  769|  2.63M|}
indheap.c:igraph_i_2wheap_switch:
  743|  4.34M|                                   igraph_int_t e1, igraph_int_t e2) {
  744|  4.34M|    if (e1 != e2) {
  ------------------
  |  Branch (744:9): [True: 3.86M, False: 478k]
  ------------------
  745|  3.86M|        igraph_int_t tmp1, tmp2;
  746|  3.86M|        igraph_real_t tmp3 = VECTOR(h->data)[e1];
  ------------------
  |  |   60|  3.86M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  747|  3.86M|        VECTOR(h->data)[e1] = VECTOR(h->data)[e2];
  ------------------
  |  |   60|  3.86M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      VECTOR(h->data)[e1] = VECTOR(h->data)[e2];
  ------------------
  |  |   60|  3.86M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  748|  3.86M|        VECTOR(h->data)[e2] = tmp3;
  ------------------
  |  |   60|  3.86M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  749|       |
  750|  3.86M|        tmp1 = VECTOR(h->index)[e1];
  ------------------
  |  |   60|  3.86M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  751|  3.86M|        tmp2 = VECTOR(h->index)[e2];
  ------------------
  |  |   60|  3.86M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  752|       |
  753|  3.86M|        VECTOR(h->index2)[tmp1] = e2 + 2;
  ------------------
  |  |   60|  3.86M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  754|  3.86M|        VECTOR(h->index2)[tmp2] = e1 + 2;
  ------------------
  |  |   60|  3.86M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  755|       |
  756|  3.86M|        VECTOR(h->index)[e1] = tmp2;
  ------------------
  |  |   60|  3.86M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  757|  3.86M|        VECTOR(h->index)[e2] = tmp1;
  ------------------
  |  |   60|  3.86M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  758|  3.86M|    }
  759|  4.34M|}
indheap.c:igraph_i_2wheap_sink:
  772|  3.49M|                                 igraph_int_t head) {
  773|  3.49M|    igraph_int_t size = igraph_2wheap_size(h);
  774|  3.49M|    if (LEFTCHILD(head) >= size) {
  ------------------
  |  |  734|  3.49M|#define LEFTCHILD(x)  (((x)+1)*2-1)
  ------------------
  |  Branch (774:9): [True: 1.33M, False: 2.16M]
  ------------------
  775|       |        /* no subtrees */
  776|  2.16M|    } else if (RIGHTCHILD(head) == size ||
  ------------------
  |  |  735|  2.16M|#define RIGHTCHILD(x) (((x)+1)*2)
  ------------------
  |  Branch (776:16): [True: 189k, False: 1.97M]
  ------------------
  777|  1.97M|               VECTOR(h->data)[LEFTCHILD(head)] >= VECTOR(h->data)[RIGHTCHILD(head)]) {
  ------------------
  |  |   60|  1.97M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                             VECTOR(h->data)[LEFTCHILD(head)] >= VECTOR(h->data)[RIGHTCHILD(head)]) {
  ------------------
  |  |  734|  1.97M|#define LEFTCHILD(x)  (((x)+1)*2-1)
  ------------------
                             VECTOR(h->data)[LEFTCHILD(head)] >= VECTOR(h->data)[RIGHTCHILD(head)]) {
  ------------------
  |  |   60|  1.97M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                             VECTOR(h->data)[LEFTCHILD(head)] >= VECTOR(h->data)[RIGHTCHILD(head)]) {
  ------------------
  |  |  735|  1.97M|#define RIGHTCHILD(x) (((x)+1)*2)
  ------------------
  |  Branch (777:16): [True: 1.11M, False: 859k]
  ------------------
  778|       |        /* sink to the left if needed */
  779|  1.30M|        if (VECTOR(h->data)[head] < VECTOR(h->data)[LEFTCHILD(head)]) {
  ------------------
  |  |   60|  1.30M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      if (VECTOR(h->data)[head] < VECTOR(h->data)[LEFTCHILD(head)]) {
  ------------------
  |  |   60|  1.30M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      if (VECTOR(h->data)[head] < VECTOR(h->data)[LEFTCHILD(head)]) {
  ------------------
  |  |  734|  1.30M|#define LEFTCHILD(x)  (((x)+1)*2-1)
  ------------------
  |  Branch (779:13): [True: 1.11M, False: 184k]
  ------------------
  780|  1.11M|            igraph_i_2wheap_switch(h, head, LEFTCHILD(head));
  ------------------
  |  |  734|  1.11M|#define LEFTCHILD(x)  (((x)+1)*2-1)
  ------------------
  781|  1.11M|            igraph_i_2wheap_sink(h, LEFTCHILD(head));
  ------------------
  |  |  734|  1.11M|#define LEFTCHILD(x)  (((x)+1)*2-1)
  ------------------
  782|  1.11M|        }
  783|  1.30M|    } else {
  784|       |        /* sink to the right */
  785|   859k|        if (VECTOR(h->data)[head] < VECTOR(h->data)[RIGHTCHILD(head)]) {
  ------------------
  |  |   60|   859k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      if (VECTOR(h->data)[head] < VECTOR(h->data)[RIGHTCHILD(head)]) {
  ------------------
  |  |   60|   859k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      if (VECTOR(h->data)[head] < VECTOR(h->data)[RIGHTCHILD(head)]) {
  ------------------
  |  |  735|   859k|#define RIGHTCHILD(x) (((x)+1)*2)
  ------------------
  |  Branch (785:13): [True: 794k, False: 64.2k]
  ------------------
  786|   794k|            igraph_i_2wheap_switch(h, head, RIGHTCHILD(head));
  ------------------
  |  |  735|   794k|#define RIGHTCHILD(x) (((x)+1)*2)
  ------------------
  787|   794k|            igraph_i_2wheap_sink(h, RIGHTCHILD(head));
  ------------------
  |  |  735|   794k|#define RIGHTCHILD(x) (((x)+1)*2)
  ------------------
  788|   794k|        }
  789|   859k|    }
  790|  3.49M|}

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

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

igraph_stack_int_init:
   44|  4.78k|igraph_error_t FUNCTION(igraph_stack, init)(TYPE(igraph_stack)* s, igraph_int_t capacity) {
   45|  4.78k|    igraph_int_t alloc_size;
   46|  4.78k|    IGRAPH_ASSERT(capacity >= 0);
  ------------------
  |  |  924|  4.78k|    do { \
  |  |  925|  4.78k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.78k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.78k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.78k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.78k]
  |  |  ------------------
  ------------------
   47|  4.78k|    alloc_size = capacity > 0 ? capacity : 1;
  ------------------
  |  Branch (47:18): [True: 4.78k, False: 4]
  ------------------
   48|  4.78k|    IGRAPH_ASSERT(s != NULL);
  ------------------
  |  |  924|  4.78k|    do { \
  |  |  925|  4.78k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.78k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.78k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.78k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.78k]
  |  |  ------------------
  ------------------
   49|  4.78k|    s->stor_begin = IGRAPH_CALLOC(alloc_size, BASE);
  ------------------
  |  |   33|  4.78k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  9.56k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 4.78k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 4.78k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 4.78k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   50|  4.78k|    if (s->stor_begin == NULL) {
  ------------------
  |  Branch (50:9): [True: 0, False: 4.78k]
  ------------------
   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.78k|    s->stor_end = s->stor_begin + alloc_size;
   54|  4.78k|    s->end = s->stor_begin;
   55|       |
   56|  4.78k|    return IGRAPH_SUCCESS;
   57|  4.78k|}
igraph_stack_int_destroy:
   72|  4.78k|void FUNCTION(igraph_stack, destroy)    (TYPE(igraph_stack)* s) {
   73|  4.78k|    IGRAPH_ASSERT(s != NULL);
  ------------------
  |  |  924|  4.78k|    do { \
  |  |  925|  4.78k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.78k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.78k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.78k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.78k]
  |  |  ------------------
  ------------------
   74|  4.78k|    if (s->stor_begin != NULL) {
  ------------------
  |  Branch (74:9): [True: 4.78k, False: 0]
  ------------------
   75|  4.78k|        IGRAPH_FREE(s->stor_begin);
  ------------------
  |  |   36|  4.78k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
   76|       |        s->stor_begin = NULL;
   77|  4.78k|    }
   78|  4.78k|}
igraph_stack_int_empty:
  154|   774k|igraph_bool_t FUNCTION(igraph_stack, empty)(TYPE(igraph_stack)* s) {
  155|   774k|    IGRAPH_ASSERT(s != NULL);
  ------------------
  |  |  924|   774k|    do { \
  |  |  925|   774k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   774k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 774k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   774k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 774k]
  |  |  ------------------
  ------------------
  156|   774k|    IGRAPH_ASSERT(s->stor_begin != NULL);
  ------------------
  |  |  924|   774k|    do { \
  |  |  925|   774k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   774k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 774k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   774k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 774k]
  |  |  ------------------
  ------------------
  157|   774k|    return s->stor_begin == s->end;
  158|   774k|}
igraph_stack_int_push:
  208|   615k|igraph_error_t FUNCTION(igraph_stack, push)(TYPE(igraph_stack)* s, BASE elem) {
  209|   615k|    IGRAPH_ASSERT(s != NULL);
  ------------------
  |  |  924|   615k|    do { \
  |  |  925|   615k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   615k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 615k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   615k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 615k]
  |  |  ------------------
  ------------------
  210|   615k|    IGRAPH_ASSERT(s->stor_begin != NULL);
  ------------------
  |  |  924|   615k|    do { \
  |  |  925|   615k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   615k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 615k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   615k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 615k]
  |  |  ------------------
  ------------------
  211|       |
  212|   615k|    if (s->stor_end == s->end) {
  ------------------
  |  Branch (212:9): [True: 0, False: 615k]
  ------------------
  213|       |        /* full, allocate more storage */
  214|      0|        igraph_int_t old_size = FUNCTION(igraph_stack, size)(s);
  ------------------
  |  |  181|      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
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  215|      0|        igraph_int_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   74|      0|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
                      igraph_int_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   74|      0|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (215:33): [True: 0, False: 0]
  ------------------
  216|      0|        if (old_size == IGRAPH_INTEGER_MAX) {
  ------------------
  |  |   74|      0|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (216:13): [True: 0, False: 0]
  ------------------
  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|      0|        if (new_size == 0) {
  ------------------
  |  Branch (219:13): [True: 0, False: 0]
  ------------------
  220|      0|            new_size = 1;
  221|      0|        }
  222|      0|        IGRAPH_CHECK(FUNCTION(igraph_stack, reserve)(s, new_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]
  |  |  ------------------
  ------------------
  223|      0|    }
  224|       |
  225|   615k|    *(s->end) = elem;
  226|   615k|    s->end += 1;
  227|       |
  228|   615k|    return IGRAPH_SUCCESS;
  229|   615k|}
igraph_stack_int_pop:
  244|   615k|BASE FUNCTION(igraph_stack, pop)(TYPE(igraph_stack)* s) {
  245|   615k|    IGRAPH_ASSERT(s != NULL);
  ------------------
  |  |  924|   615k|    do { \
  |  |  925|   615k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   615k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 615k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   615k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 615k]
  |  |  ------------------
  ------------------
  246|   615k|    IGRAPH_ASSERT(s->stor_begin != NULL);
  ------------------
  |  |  924|   615k|    do { \
  |  |  925|   615k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   615k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 615k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   615k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 615k]
  |  |  ------------------
  ------------------
  247|   615k|    IGRAPH_ASSERT(s->end != NULL);
  ------------------
  |  |  924|   615k|    do { \
  |  |  925|   615k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   615k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 615k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   615k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 615k]
  |  |  ------------------
  ------------------
  248|   615k|    IGRAPH_ASSERT(s->end != s->stor_begin);
  ------------------
  |  |  924|   615k|    do { \
  |  |  925|   615k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   615k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 615k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   615k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 615k]
  |  |  ------------------
  ------------------
  249|       |
  250|   615k|    (s->end)--;
  251|       |
  252|   615k|    return *(s->end);
  253|   615k|}

igraph_attribute_record_list_init:
  109|  12.4k|igraph_error_t FUNCTION(init)(TYPE *v, igraph_int_t size) {
  110|  12.4k|    igraph_int_t alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (110:31): [True: 0, False: 12.4k]
  ------------------
  111|  12.4k|    IGRAPH_ASSERT(size >= 0);
  ------------------
  |  |  924|  12.4k|    do { \
  |  |  925|  12.4k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  12.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 12.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  12.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 12.4k]
  |  |  ------------------
  ------------------
  112|  12.4k|    v->stor_begin = IGRAPH_CALLOC(alloc_size, ITEM_TYPE);
  ------------------
  |  |   33|  12.4k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  24.8k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 12.4k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 12.4k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 12.4k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  113|  12.4k|    if (v->stor_begin == 0) {
  ------------------
  |  Branch (113:9): [True: 0, False: 12.4k]
  ------------------
  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|  12.4k|    v->stor_end = v->stor_begin + alloc_size;
  117|  12.4k|    v->end = v->stor_begin + size;
  118|       |
  119|  12.4k|    IGRAPH_CHECK(INTERNAL_FUNCTION(init_slice)(v, v->stor_begin, v->end));
  ------------------
  |  |  656|  12.4k|    do { \
  |  |  657|  12.4k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  12.4k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  12.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 12.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  12.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 12.4k]
  |  |  ------------------
  ------------------
  120|       |
  121|  12.4k|    return IGRAPH_SUCCESS;
  122|  12.4k|}
igraph_attribute_record_list_init_copy:
  141|  3.28k|igraph_error_t FUNCTION(init_copy)(TYPE* to, const TYPE* from) {
  142|  3.28k|    igraph_int_t i, size = FUNCTION(size)(from);
  ------------------
  |  |  164|  3.28k|    #define FUNCTION(c) CONCAT2x(igraph_attribute_record_list,c)
  |  |  ------------------
  |  |  |  |   19|  3.28k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
  143|       |
  144|  3.28k|    IGRAPH_CHECK(FUNCTION(init)(to, 0));
  ------------------
  |  |  656|  3.28k|    do { \
  |  |  657|  3.28k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  3.28k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  3.28k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.28k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  3.28k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 3.28k]
  |  |  ------------------
  ------------------
  145|  3.28k|    IGRAPH_FINALLY(FUNCTION(destroy), to);
  ------------------
  |  |  603|  3.28k|    do { \
  |  |  604|  3.28k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  3.28k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  3.28k|         * incorrect destructor function with the pointer */ \
  |  |  607|  3.28k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 3.28k]
  |  |  ------------------
  |  |  608|  3.28k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  3.28k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 3.28k]
  |  |  ------------------
  ------------------
  146|       |
  147|  3.28k|    for (i = 0; i < size; i++) {
  ------------------
  |  Branch (147:17): [True: 0, False: 3.28k]
  ------------------
  148|      0|        IGRAPH_CHECK(FUNCTION(push_back_copy)(to, FUNCTION(get_ptr)(from, 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]
  |  |  ------------------
  ------------------
  149|      0|    }
  150|       |
  151|  3.28k|    IGRAPH_FINALLY_CLEAN(1);
  152|       |
  153|  3.28k|    return IGRAPH_SUCCESS;
  154|  3.28k|}
igraph_attribute_record_list_destroy:
  176|  12.4k|void FUNCTION(destroy)(TYPE *v) {
  177|  12.4k|    IGRAPH_ASSERT(v != 0);
  ------------------
  |  |  924|  12.4k|    do { \
  |  |  925|  12.4k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  12.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 12.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  12.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 12.4k]
  |  |  ------------------
  ------------------
  178|       |
  179|  12.4k|    if (v->stor_begin != 0) {
  ------------------
  |  Branch (179:9): [True: 12.4k, False: 0]
  ------------------
  180|  12.4k|        FUNCTION(clear)(v);
  ------------------
  |  |  164|  12.4k|    #define FUNCTION(c) CONCAT2x(igraph_attribute_record_list,c)
  |  |  ------------------
  |  |  |  |   19|  12.4k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
  181|  12.4k|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   36|  12.4k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  182|       |        v->stor_begin = NULL;
  183|  12.4k|    }
  184|  12.4k|}
igraph_attribute_record_list_empty:
  268|  1.64k|igraph_bool_t FUNCTION(empty)(const TYPE *v) {
  269|  1.64k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  1.64k|    do { \
  |  |  925|  1.64k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  270|  1.64k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  1.64k|    do { \
  |  |  925|  1.64k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  271|  1.64k|    return v->stor_begin == v->end;
  272|  1.64k|}
igraph_attribute_record_list_size:
  287|  13.6k|igraph_int_t FUNCTION(size)(const TYPE *v) {
  288|  13.6k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  13.6k|    do { \
  |  |  925|  13.6k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  13.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 13.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  13.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 13.6k]
  |  |  ------------------
  ------------------
  289|  13.6k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  13.6k|    do { \
  |  |  925|  13.6k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  13.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 13.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  13.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 13.6k]
  |  |  ------------------
  ------------------
  290|  13.6k|    return v->end - v->stor_begin;
  291|  13.6k|}
igraph_attribute_record_list_clear:
  357|  12.4k|void FUNCTION(clear)(TYPE *v) {
  358|  12.4k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  12.4k|    do { \
  |  |  925|  12.4k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  12.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 12.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  12.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 12.4k]
  |  |  ------------------
  ------------------
  359|  12.4k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  12.4k|    do { \
  |  |  925|  12.4k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  12.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 12.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  12.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 12.4k]
  |  |  ------------------
  ------------------
  360|  12.4k|    INTERNAL_FUNCTION(destroy_slice)(v, v->stor_begin, v->end);
  ------------------
  |  |  165|  12.4k|    #define INTERNAL_FUNCTION(c) CONCAT2x(igraph_i_attribute_record_list,c)
  |  |  ------------------
  |  |  |  |   19|  12.4k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
  361|  12.4k|    v->end = v->stor_begin;
  362|  12.4k|}
igraph_attribute_record_list_get_ptr:
  377|  5.75k|ITEM_TYPE *FUNCTION(get_ptr)(const TYPE *v, igraph_int_t pos) {
  378|  5.75k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  5.75k|    do { \
  |  |  925|  5.75k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  5.75k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.75k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  5.75k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 5.75k]
  |  |  ------------------
  ------------------
  379|  5.75k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  5.75k|    do { \
  |  |  925|  5.75k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  5.75k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.75k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  5.75k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 5.75k]
  |  |  ------------------
  ------------------
  380|  5.75k|    return v->stor_begin + pos;
  381|  5.75k|}
igraph_attribute_record_list_discard:
  504|    822|void FUNCTION(discard)(TYPE *v, igraph_int_t index) {
  505|    822|    igraph_int_t size = FUNCTION(size)(v);
  ------------------
  |  |  164|    822|    #define FUNCTION(c) CONCAT2x(igraph_attribute_record_list,c)
  |  |  ------------------
  |  |  |  |   19|    822|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
  506|       |
  507|    822|    if (size > 0) {
  ------------------
  |  Branch (507:9): [True: 822, False: 0]
  ------------------
  508|    822|        INTERNAL_FUNCTION(destroy_item)(v->stor_begin + index);
  ------------------
  |  |  165|    822|    #define INTERNAL_FUNCTION(c) CONCAT2x(igraph_i_attribute_record_list,c)
  |  |  ------------------
  |  |  |  |   19|    822|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
  509|    822|        memmove(v->stor_begin + index, v->stor_begin + index + 1, sizeof(ITEM_TYPE) * (size - index - 1));
  510|    822|        v->end -= 1;
  511|    822|    }
  512|    822|}
igraph_attribute_record_list_push_back:
  585|  1.64k|igraph_error_t FUNCTION(push_back)(TYPE *v, ITEM_TYPE *e) {
  586|  1.64k|    IGRAPH_CHECK(INTERNAL_FUNCTION(expand_if_full)(v));
  ------------------
  |  |  656|  1.64k|    do { \
  |  |  657|  1.64k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.64k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  587|  1.64k|    *(v->end) = *e;
  588|  1.64k|    v->end += 1;
  589|  1.64k|    return IGRAPH_SUCCESS;
  590|  1.64k|}
igraph_attribute_record_list_push_back_new:
  638|    822|igraph_error_t FUNCTION(push_back_new)(TYPE *v, ITEM_TYPE** e) {
  639|    822|    IGRAPH_CHECK(INTERNAL_FUNCTION(expand_if_full)(v));
  ------------------
  |  |  656|    822|    do { \
  |  |  657|    822|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    822|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
  640|    822|    IGRAPH_CHECK(INTERNAL_FUNCTION(init_item)(v, v->end));
  ------------------
  |  |  656|    822|    do { \
  |  |  657|    822|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    822|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
  641|    822|    if (e) {
  ------------------
  |  Branch (641:9): [True: 822, False: 0]
  ------------------
  642|    822|        *e = v->end;
  643|    822|    }
  644|    822|    v->end += 1;
  645|    822|    return IGRAPH_SUCCESS;
  646|    822|}
attributes.c:igraph_i_attribute_record_list_init_slice:
 1065|  12.4k|static igraph_error_t INTERNAL_FUNCTION(init_slice)(const TYPE *list, ITEM_TYPE *start, ITEM_TYPE *end) {
 1066|  12.4k|    ITEM_TYPE *current;
  ------------------
  |  |   61|  12.4k|    #define ITEM_TYPE BASE
  |  |  ------------------
  |  |  |  |  118|  12.4k|    #define BASE igraph_attribute_record_t
  |  |  ------------------
  ------------------
 1067|  12.4k|    igraph_error_t retval;
 1068|       |
 1069|  12.4k|    for (current = start; current < end; current++) {
  ------------------
  |  Branch (1069:27): [True: 0, False: 12.4k]
  ------------------
 1070|      0|        retval = INTERNAL_FUNCTION(init_item)(list, current);
  ------------------
  |  |  165|      0|    #define INTERNAL_FUNCTION(c) CONCAT2x(igraph_i_attribute_record_list,c)
  |  |  ------------------
  |  |  |  |   19|      0|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
 1071|      0|        if (retval) {
  ------------------
  |  Branch (1071:13): [True: 0, False: 0]
  ------------------
 1072|      0|            INTERNAL_FUNCTION(destroy_slice)(list, start, current);
  ------------------
  |  |  165|      0|    #define INTERNAL_FUNCTION(c) CONCAT2x(igraph_i_attribute_record_list,c)
  |  |  ------------------
  |  |  |  |   19|      0|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
 1073|      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]
  |  |  ------------------
  ------------------
 1074|      0|        }
 1075|      0|    }
 1076|       |
 1077|  12.4k|    return IGRAPH_SUCCESS;
 1078|  12.4k|}
attributes.c:igraph_i_attribute_record_list_destroy_slice:
 1080|  12.4k|static void INTERNAL_FUNCTION(destroy_slice)(const TYPE *list, ITEM_TYPE *start, ITEM_TYPE *end) {
 1081|  12.4k|    IGRAPH_UNUSED(list);
  ------------------
  |  |   30|  12.4k|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
 1082|  14.0k|    for (; start < end; start++) {
  ------------------
  |  Branch (1082:12): [True: 1.64k, False: 12.4k]
  ------------------
 1083|  1.64k|        INTERNAL_FUNCTION(destroy_item)(start);
  ------------------
  |  |  165|  1.64k|    #define INTERNAL_FUNCTION(c) CONCAT2x(igraph_i_attribute_record_list,c)
  |  |  ------------------
  |  |  |  |   19|  1.64k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
 1084|  1.64k|    }
 1085|  12.4k|}
attributes.c:igraph_i_attribute_record_list_expand_if_full:
 1091|  2.46k|static igraph_error_t INTERNAL_FUNCTION(expand_if_full)(TYPE *v) {
 1092|  2.46k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  2.46k|    do { \
  |  |  925|  2.46k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.46k]
  |  |  ------------------
  ------------------
 1093|  2.46k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  2.46k|    do { \
  |  |  925|  2.46k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.46k]
  |  |  ------------------
  ------------------
 1094|       |
 1095|  2.46k|    if (v->stor_end == v->end) {
  ------------------
  |  Branch (1095:9): [True: 0, False: 2.46k]
  ------------------
 1096|      0|        igraph_int_t old_size = FUNCTION(size)(v);
  ------------------
  |  |  164|      0|    #define FUNCTION(c) CONCAT2x(igraph_attribute_record_list,c)
  |  |  ------------------
  |  |  |  |   19|      0|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
 1097|      0|        igraph_int_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   74|      0|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
                      igraph_int_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   74|      0|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (1097:33): [True: 0, False: 0]
  ------------------
 1098|      0|        if (old_size == IGRAPH_INTEGER_MAX) {
  ------------------
  |  |   74|      0|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (1098:13): [True: 0, False: 0]
  ------------------
 1099|      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]
  |  |  ------------------
  ------------------
 1100|      0|        }
 1101|      0|        if (new_size == 0) {
  ------------------
  |  Branch (1101:13): [True: 0, False: 0]
  ------------------
 1102|      0|            new_size = 1;
 1103|      0|        }
 1104|      0|        IGRAPH_CHECK(FUNCTION(reserve)(v, new_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]
  |  |  ------------------
  ------------------
 1105|      0|    }
 1106|       |
 1107|  2.46k|    return IGRAPH_SUCCESS;
 1108|  2.46k|}
igraph_vector_int_list_init:
  109|  1.64k|igraph_error_t FUNCTION(init)(TYPE *v, igraph_int_t size) {
  110|  1.64k|    igraph_int_t alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (110:31): [True: 1.53k, False: 114]
  ------------------
  111|  1.64k|    IGRAPH_ASSERT(size >= 0);
  ------------------
  |  |  924|  1.64k|    do { \
  |  |  925|  1.64k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  112|  1.64k|    v->stor_begin = IGRAPH_CALLOC(alloc_size, ITEM_TYPE);
  ------------------
  |  |   33|  1.64k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  3.28k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 1.64k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 1.64k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 1.64k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  113|  1.64k|    if (v->stor_begin == 0) {
  ------------------
  |  Branch (113:9): [True: 0, False: 1.64k]
  ------------------
  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|  1.64k|    v->stor_end = v->stor_begin + alloc_size;
  117|  1.64k|    v->end = v->stor_begin + size;
  118|       |
  119|  1.64k|    IGRAPH_CHECK(INTERNAL_FUNCTION(init_slice)(v, v->stor_begin, v->end));
  ------------------
  |  |  656|  1.64k|    do { \
  |  |  657|  1.64k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.64k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  120|       |
  121|  1.64k|    return IGRAPH_SUCCESS;
  122|  1.64k|}
igraph_vector_int_list_destroy:
  176|  1.64k|void FUNCTION(destroy)(TYPE *v) {
  177|  1.64k|    IGRAPH_ASSERT(v != 0);
  ------------------
  |  |  924|  1.64k|    do { \
  |  |  925|  1.64k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  178|       |
  179|  1.64k|    if (v->stor_begin != 0) {
  ------------------
  |  Branch (179:9): [True: 1.64k, False: 0]
  ------------------
  180|  1.64k|        FUNCTION(clear)(v);
  ------------------
  |  |  139|  1.64k|        #define FUNCTION(c) CONCAT4(igraph_vector,SHORT,list,c)
  |  |  ------------------
  |  |  |  |   24|  1.64k|#define CONCAT4(a,b,c,d) CONCAT4x(a,b,c,d)
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|  1.64k|#define CONCAT4x(a,b,c,d) a ## _ ## b ## _ ## c ## _ ## d
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  181|  1.64k|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   36|  1.64k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  182|       |        v->stor_begin = NULL;
  183|  1.64k|    }
  184|  1.64k|}
igraph_vector_int_list_size:
  287|  3.28k|igraph_int_t FUNCTION(size)(const TYPE *v) {
  288|  3.28k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  3.28k|    do { \
  |  |  925|  3.28k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  3.28k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.28k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  3.28k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 3.28k]
  |  |  ------------------
  ------------------
  289|  3.28k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  3.28k|    do { \
  |  |  925|  3.28k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  3.28k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.28k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  3.28k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 3.28k]
  |  |  ------------------
  ------------------
  290|  3.28k|    return v->end - v->stor_begin;
  291|  3.28k|}
igraph_vector_int_list_clear:
  357|  1.64k|void FUNCTION(clear)(TYPE *v) {
  358|  1.64k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  1.64k|    do { \
  |  |  925|  1.64k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  359|  1.64k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  1.64k|    do { \
  |  |  925|  1.64k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  360|  1.64k|    INTERNAL_FUNCTION(destroy_slice)(v, v->stor_begin, v->end);
  ------------------
  |  |  140|  1.64k|        #define INTERNAL_FUNCTION(c) CONCAT4(igraph_i_vector,SHORT,list,c)
  |  |  ------------------
  |  |  |  |   24|  1.64k|#define CONCAT4(a,b,c,d) CONCAT4x(a,b,c,d)
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|  1.64k|#define CONCAT4x(a,b,c,d) a ## _ ## b ## _ ## c ## _ ## d
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  361|  1.64k|    v->end = v->stor_begin;
  362|  1.64k|}
igraph_vector_int_list_get_ptr:
  377|  45.9k|ITEM_TYPE *FUNCTION(get_ptr)(const TYPE *v, igraph_int_t pos) {
  378|  45.9k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  45.9k|    do { \
  |  |  925|  45.9k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  45.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 45.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  45.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 45.9k]
  |  |  ------------------
  ------------------
  379|  45.9k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  45.9k|    do { \
  |  |  925|  45.9k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  45.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 45.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  45.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 45.9k]
  |  |  ------------------
  ------------------
  380|  45.9k|    return v->stor_begin + pos;
  381|  45.9k|}
vector_list.c:igraph_i_vector_int_list_init_item:
 1048|  18.5k|static igraph_error_t INTERNAL_FUNCTION(init_item)(const TYPE *list, ITEM_TYPE *item) {
 1049|  18.5k|    IGRAPH_UNUSED(list);
  ------------------
  |  |   30|  18.5k|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
 1050|  18.5k|    return ITEM_FUNCTION(init)(item, 0);
  ------------------
  |  |   42|  18.5k|        #define ITEM_FUNCTION(f) CONCAT3(igraph_vector,SHORT,f)
  |  |  ------------------
  |  |  |  |   22|  18.5k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  18.5k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1051|  18.5k|}
vector_list.c:igraph_i_vector_int_list_destroy_item:
 1057|  18.5k|static void INTERNAL_FUNCTION(destroy_item)(ITEM_TYPE *item) {
 1058|  18.5k|    ITEM_FUNCTION(destroy)(item);
  ------------------
  |  |   42|  18.5k|        #define ITEM_FUNCTION(f) CONCAT3(igraph_vector,SHORT,f)
  |  |  ------------------
  |  |  |  |   22|  18.5k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  18.5k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1059|  18.5k|}
vector_list.c:igraph_i_vector_int_list_init_slice:
 1065|  1.64k|static igraph_error_t INTERNAL_FUNCTION(init_slice)(const TYPE *list, ITEM_TYPE *start, ITEM_TYPE *end) {
 1066|  1.64k|    ITEM_TYPE *current;
  ------------------
  |  |   31|  1.64k|    #define ITEM_TYPE BASE_VECTOR
  |  |  ------------------
  |  |  |  |   70|  1.64k|    #define BASE_VECTOR igraph_vector_int_t
  |  |  ------------------
  ------------------
 1067|  1.64k|    igraph_error_t retval;
 1068|       |
 1069|  20.1k|    for (current = start; current < end; current++) {
  ------------------
  |  Branch (1069:27): [True: 18.5k, False: 1.64k]
  ------------------
 1070|  18.5k|        retval = INTERNAL_FUNCTION(init_item)(list, current);
  ------------------
  |  |  140|  18.5k|        #define INTERNAL_FUNCTION(c) CONCAT4(igraph_i_vector,SHORT,list,c)
  |  |  ------------------
  |  |  |  |   24|  18.5k|#define CONCAT4(a,b,c,d) CONCAT4x(a,b,c,d)
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|  18.5k|#define CONCAT4x(a,b,c,d) a ## _ ## b ## _ ## c ## _ ## d
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1071|  18.5k|        if (retval) {
  ------------------
  |  Branch (1071:13): [True: 0, False: 18.5k]
  ------------------
 1072|      0|            INTERNAL_FUNCTION(destroy_slice)(list, start, current);
  ------------------
  |  |  140|      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
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1073|      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]
  |  |  ------------------
  ------------------
 1074|      0|        }
 1075|  18.5k|    }
 1076|       |
 1077|  1.64k|    return IGRAPH_SUCCESS;
 1078|  1.64k|}
vector_list.c:igraph_i_vector_int_list_destroy_slice:
 1080|  1.64k|static void INTERNAL_FUNCTION(destroy_slice)(const TYPE *list, ITEM_TYPE *start, ITEM_TYPE *end) {
 1081|  1.64k|    IGRAPH_UNUSED(list);
  ------------------
  |  |   30|  1.64k|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
 1082|  20.1k|    for (; start < end; start++) {
  ------------------
  |  Branch (1082:12): [True: 18.5k, False: 1.64k]
  ------------------
 1083|  18.5k|        INTERNAL_FUNCTION(destroy_item)(start);
  ------------------
  |  |  140|  18.5k|        #define INTERNAL_FUNCTION(c) CONCAT4(igraph_i_vector,SHORT,list,c)
  |  |  ------------------
  |  |  |  |   24|  18.5k|#define CONCAT4(a,b,c,d) CONCAT4x(a,b,c,d)
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|  18.5k|#define CONCAT4x(a,b,c,d) a ## _ ## b ## _ ## c ## _ ## d
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1084|  18.5k|    }
 1085|  1.64k|}

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

igraph_vector_init:
  134|   180k|igraph_error_t FUNCTION(igraph_vector, init)(TYPE(igraph_vector) *v, igraph_int_t size) {
  135|   180k|    igraph_int_t alloc_size;
  136|   180k|    IGRAPH_ASSERT(size >= 0);
  ------------------
  |  |  924|   180k|    do { \
  |  |  925|   180k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   180k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 180k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   180k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 180k]
  |  |  ------------------
  ------------------
  137|   180k|    alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (137:18): [True: 12.9k, False: 167k]
  ------------------
  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|   180k|    v->stor_begin = IGRAPH_CALLOC(alloc_size, BASE);
  ------------------
  |  |   33|   180k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|   360k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 180k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 180k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 180k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  144|   180k|    IGRAPH_CHECK_OOM(v->stor_begin, "Insufficient memory to initialize vector.");
  ------------------
  |  |  709|   180k|    do { \
  |  |  710|   180k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|   180k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 180k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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|   180k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 180k]
  |  |  ------------------
  ------------------
  145|   180k|    v->stor_end = v->stor_begin + alloc_size;
  146|   180k|    v->end = v->stor_begin + size;
  147|       |
  148|   180k|    return IGRAPH_SUCCESS;
  149|   180k|}
igraph_vector_destroy:
  408|   180k|void FUNCTION(igraph_vector, destroy)(TYPE(igraph_vector) *v) {
  409|   180k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|   180k|    do { \
  |  |  925|   180k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   180k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 180k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   180k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 180k]
  |  |  ------------------
  ------------------
  410|       |    /* vector_init() will leave stor_begin set to NULL when it fails.
  411|       |     * We handle these cases gracefully. */
  412|   180k|    if (v->stor_begin != NULL) {
  ------------------
  |  Branch (412:9): [True: 180k, False: 0]
  ------------------
  413|   180k|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   36|   180k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  414|       |        v->stor_begin = NULL;
  415|   180k|    }
  416|   180k|}
igraph_vector_capacity:
  436|  92.2k|igraph_int_t FUNCTION(igraph_vector, capacity)(const TYPE(igraph_vector) *v) {
  437|  92.2k|    return v->stor_end - v->stor_begin;
  438|  92.2k|}
igraph_vector_reserve:
  468|  91.4k|igraph_error_t FUNCTION(igraph_vector, reserve)(TYPE(igraph_vector) *v, igraph_int_t capacity) {
  469|  91.4k|    igraph_int_t current_capacity;
  470|  91.4k|    BASE *tmp;
  ------------------
  |  |   29|  91.4k|    #define BASE igraph_real_t
  ------------------
  471|       |
  472|  91.4k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  91.4k|    do { \
  |  |  925|  91.4k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  91.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 91.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  91.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 91.4k]
  |  |  ------------------
  ------------------
  473|  91.4k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  91.4k|    do { \
  |  |  925|  91.4k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  91.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 91.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  91.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 91.4k]
  |  |  ------------------
  ------------------
  474|  91.4k|    IGRAPH_ASSERT(capacity >= 0);
  ------------------
  |  |  924|  91.4k|    do { \
  |  |  925|  91.4k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  91.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 91.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  91.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 91.4k]
  |  |  ------------------
  ------------------
  475|       |
  476|  91.4k|    current_capacity = FUNCTION(igraph_vector, capacity)(v);
  ------------------
  |  |  173|  91.4k|        #define FUNCTION(a,c) CONCAT2(a,c)
  |  |  ------------------
  |  |  |  |   20|  91.4k|#define CONCAT2(a,b) CONCAT2x(a,b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|  91.4k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  477|       |
  478|  91.4k|    if (capacity <= current_capacity) {
  ------------------
  |  Branch (478:9): [True: 14.1k, False: 77.3k]
  ------------------
  479|  14.1k|        return IGRAPH_SUCCESS;
  480|  14.1k|    }
  481|       |
  482|  77.3k|    tmp = IGRAPH_REALLOC(v->stor_begin, capacity, BASE);
  ------------------
  |  |   35|  77.3k|#define IGRAPH_REALLOC(p,n,t) IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, realloc((void*)(p), sizeof(t) * ((n) > 0 ? (n) : 1)))
  |  |  ------------------
  |  |  |  |   31|   154k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 77.3k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 77.3k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 77.3k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  483|  77.3k|    IGRAPH_CHECK_OOM(tmp, "Cannot reserve space for vector.");
  ------------------
  |  |  709|  77.3k|    do { \
  |  |  710|  77.3k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  77.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 77.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  77.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 77.3k]
  |  |  ------------------
  ------------------
  484|       |
  485|  77.3k|    v->end = tmp + (v->end - v->stor_begin);
  486|  77.3k|    v->stor_begin = tmp;
  487|  77.3k|    v->stor_end = v->stor_begin + capacity;
  488|       |
  489|  77.3k|    return IGRAPH_SUCCESS;
  490|  77.3k|}
igraph_vector_empty:
  503|  1.74M|igraph_bool_t FUNCTION(igraph_vector, empty)(const TYPE(igraph_vector) *v) {
  504|  1.74M|    IGRAPH_ASSERT(v != 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]
  |  |  ------------------
  ------------------
  505|  1.74M|    IGRAPH_ASSERT(v->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]
  |  |  ------------------
  ------------------
  506|  1.74M|    return v->stor_begin == v->end;
  507|  1.74M|}
igraph_vector_size:
  522|  6.39M|igraph_int_t FUNCTION(igraph_vector, size)(const TYPE(igraph_vector) *v) {
  523|  6.39M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  6.39M|    do { \
  |  |  925|  6.39M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  6.39M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 6.39M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  6.39M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 6.39M]
  |  |  ------------------
  ------------------
  524|  6.39M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  6.39M|    do { \
  |  |  925|  6.39M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  6.39M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 6.39M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  6.39M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 6.39M]
  |  |  ------------------
  ------------------
  525|  6.39M|    return v->end - v->stor_begin;
  526|  6.39M|}
igraph_vector_clear:
  542|   192k|void FUNCTION(igraph_vector, clear)(TYPE(igraph_vector)* v) {
  543|   192k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|   192k|    do { \
  |  |  925|   192k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   192k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 192k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   192k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 192k]
  |  |  ------------------
  ------------------
  544|   192k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|   192k|    do { \
  |  |  925|   192k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   192k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 192k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   192k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 192k]
  |  |  ------------------
  ------------------
  545|   192k|    v->end = v->stor_begin;
  546|   192k|}
igraph_vector_push_back:
  573|  1.42M|igraph_error_t FUNCTION(igraph_vector, push_back)(TYPE(igraph_vector) *v, BASE e) {
  574|  1.42M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  1.42M|    do { \
  |  |  925|  1.42M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.42M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.42M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.42M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.42M]
  |  |  ------------------
  ------------------
  575|  1.42M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  1.42M|    do { \
  |  |  925|  1.42M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.42M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.42M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.42M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.42M]
  |  |  ------------------
  ------------------
  576|       |
  577|  1.42M|    if (v->stor_end == v->end) {
  ------------------
  |  Branch (577:9): [True: 74.3k, False: 1.34M]
  ------------------
  578|       |        /* full, allocate more storage */
  579|  74.3k|        igraph_int_t old_size = FUNCTION(igraph_vector, size)(v);
  ------------------
  |  |  173|  74.3k|        #define FUNCTION(a,c) CONCAT2(a,c)
  |  |  ------------------
  |  |  |  |   20|  74.3k|#define CONCAT2(a,b) CONCAT2x(a,b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|  74.3k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  580|  74.3k|        igraph_int_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   74|  74.3k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
                      igraph_int_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   74|  74.3k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (580:33): [True: 74.3k, False: 0]
  ------------------
  581|  74.3k|        if (old_size == IGRAPH_INTEGER_MAX) {
  ------------------
  |  |   74|  74.3k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (581:13): [True: 0, False: 74.3k]
  ------------------
  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|  74.3k|        if (new_size == 0) {
  ------------------
  |  Branch (584:13): [True: 0, False: 74.3k]
  ------------------
  585|      0|            new_size = 1;
  586|      0|        }
  587|  74.3k|        IGRAPH_CHECK(FUNCTION(igraph_vector, reserve)(v, new_size));
  ------------------
  |  |  656|  74.3k|    do { \
  |  |  657|  74.3k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  74.3k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  74.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 74.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|  74.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 74.3k]
  |  |  ------------------
  ------------------
  588|  74.3k|    }
  589|       |
  590|  1.42M|    *(v->end) = e;
  591|  1.42M|    v->end += 1;
  592|       |
  593|  1.42M|    return IGRAPH_SUCCESS;
  594|  1.42M|}
igraph_vector_null:
  725|  11.3k|void FUNCTION(igraph_vector, null)(TYPE(igraph_vector) *v) {
  726|  11.3k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  11.3k|    do { \
  |  |  925|  11.3k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  11.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 11.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  11.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 11.3k]
  |  |  ------------------
  ------------------
  727|  11.3k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  11.3k|    do { \
  |  |  925|  11.3k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  11.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 11.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  11.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 11.3k]
  |  |  ------------------
  ------------------
  728|  11.3k|    if (FUNCTION(igraph_vector, size)(v) > 0) {
  ------------------
  |  |  173|  11.3k|        #define FUNCTION(a,c) CONCAT2(a,c)
  |  |  ------------------
  |  |  |  |   20|  11.3k|#define CONCAT2(a,b) CONCAT2x(a,b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|  11.3k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (728:9): [True: 11.2k, False: 134]
  ------------------
  729|  11.2k|        memset(v->stor_begin, 0, sizeof(BASE) * FUNCTION(igraph_vector, size)(v));
  ------------------
  |  |  173|  11.2k|        #define FUNCTION(a,c) CONCAT2(a,c)
  |  |  ------------------
  |  |  |  |   20|  11.2k|#define CONCAT2(a,b) CONCAT2x(a,b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|  11.2k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  730|  11.2k|    }
  731|  11.3k|}
igraph_vector_pop_back:
  838|  1.38M|BASE FUNCTION(igraph_vector, pop_back)(TYPE(igraph_vector) *v) {
  839|  1.38M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  1.38M|    do { \
  |  |  925|  1.38M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.38M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.38M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.38M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.38M]
  |  |  ------------------
  ------------------
  840|  1.38M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  1.38M|    do { \
  |  |  925|  1.38M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.38M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.38M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.38M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.38M]
  |  |  ------------------
  ------------------
  841|  1.38M|    IGRAPH_ASSERT(v->end != NULL);
  ------------------
  |  |  924|  1.38M|    do { \
  |  |  925|  1.38M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.38M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.38M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.38M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.38M]
  |  |  ------------------
  ------------------
  842|  1.38M|    IGRAPH_ASSERT(v->end != v->stor_begin);
  ------------------
  |  |  924|  1.38M|    do { \
  |  |  925|  1.38M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.38M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.38M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.38M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.38M]
  |  |  ------------------
  ------------------
  843|       |
  844|  1.38M|    (v->end)--;
  845|       |
  846|  1.38M|    return *(v->end);
  847|  1.38M|}
igraph_vector_resize:
 1264|  16.2k|igraph_error_t FUNCTION(igraph_vector, resize)(TYPE(igraph_vector)* v, igraph_int_t new_size) {
 1265|  16.2k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  16.2k|    do { \
  |  |  925|  16.2k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  16.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 16.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  16.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 16.2k]
  |  |  ------------------
  ------------------
 1266|  16.2k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  16.2k|    do { \
  |  |  925|  16.2k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  16.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 16.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  16.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 16.2k]
  |  |  ------------------
  ------------------
 1267|  16.2k|    IGRAPH_CHECK(FUNCTION(igraph_vector, reserve)(v, new_size));
  ------------------
  |  |  656|  16.2k|    do { \
  |  |  657|  16.2k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  16.2k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  16.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 16.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|  16.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 16.2k]
  |  |  ------------------
  ------------------
 1268|  16.2k|    v->end = v->stor_begin + new_size;
 1269|  16.2k|    return IGRAPH_SUCCESS;
 1270|  16.2k|}
igraph_vector_min:
 1401|  9.94k|BASE FUNCTION(igraph_vector, min)(const TYPE(igraph_vector) *v) {
 1402|  9.94k|    BASE min;
  ------------------
  |  |   29|  9.94k|    #define BASE igraph_real_t
  ------------------
 1403|  9.94k|    BASE *ptr;
  ------------------
  |  |   29|  9.94k|    #define BASE igraph_real_t
  ------------------
 1404|  9.94k|    IGRAPH_ASSERT(!FUNCTION(igraph_vector, empty)(v));
  ------------------
  |  |  924|  9.94k|    do { \
  |  |  925|  9.94k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  9.94k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.94k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  9.94k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 9.94k]
  |  |  ------------------
  ------------------
 1405|  9.94k|    min = *(v->stor_begin);
 1406|  9.94k|#if defined(BASE_IGRAPH_REAL)
 1407|  9.94k|    if (isnan(min)) { return min; }; /* Result is NaN */
  ------------------
  |  Branch (1407:9): [True: 0, False: 9.94k]
  ------------------
 1408|  9.94k|#endif
 1409|  9.94k|    ptr = v->stor_begin + 1;
 1410|   226k|    while (ptr < v->end) {
  ------------------
  |  Branch (1410:12): [True: 216k, False: 9.94k]
  ------------------
 1411|   216k|        if ((*ptr) < min) {
  ------------------
  |  Branch (1411:13): [True: 9.61k, False: 206k]
  ------------------
 1412|  9.61k|            min = *ptr;
 1413|  9.61k|        }
 1414|   206k|#if defined(BASE_IGRAPH_REAL)
 1415|   206k|        else if (isnan(*ptr)) {
  ------------------
  |  Branch (1415:18): [True: 0, False: 206k]
  ------------------
 1416|      0|            return *ptr; /* Result is NaN */
 1417|      0|        }
 1418|   216k|#endif
 1419|   216k|        ptr++;
 1420|   216k|    }
 1421|  9.94k|    return min;
 1422|  9.94k|}
igraph_vector_sum:
 1568|    821|BASE FUNCTION(igraph_vector, sum)(const TYPE(igraph_vector) *v) {
 1569|    821|    BASE res = ZERO;
  ------------------
  |  |   29|    821|    #define BASE igraph_real_t
  ------------------
                  BASE res = ZERO;
  ------------------
  |  |   38|    821|    #define ZERO 0.0
  ------------------
 1570|    821|    const BASE *p;
 1571|    821|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|    821|    do { \
  |  |  925|    821|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|    821|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 821]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|    821|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 821]
  |  |  ------------------
  ------------------
 1572|    821|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|    821|    do { \
  |  |  925|    821|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|    821|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 821]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|    821|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 821]
  |  |  ------------------
  ------------------
 1573|  37.7k|    for (p = v->stor_begin; p < v->end; p++) {
  ------------------
  |  Branch (1573:29): [True: 36.9k, False: 821]
  ------------------
 1574|       |#ifdef SUM
 1575|       |        SUM(res, res, *p);
 1576|       |#else
 1577|  36.9k|        res += *p;
 1578|  36.9k|#endif
 1579|  36.9k|    }
 1580|    821|    return res;
 1581|    821|}
igraph_vector_scale:
 2261|  4.91k|void FUNCTION(igraph_vector, scale)(TYPE(igraph_vector) *v, BASE by) {
 2262|  4.91k|    const igraph_int_t n = FUNCTION(igraph_vector, size)(v);
  ------------------
  |  |  173|  4.91k|        #define FUNCTION(a,c) CONCAT2(a,c)
  |  |  ------------------
  |  |  |  |   20|  4.91k|#define CONCAT2(a,b) CONCAT2x(a,b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|  4.91k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2263|       |#ifdef EQ
 2264|       |    const BASE one = ONE;
 2265|       |    if (EQ(by, one)) {
 2266|       |        return;
 2267|       |    }
 2268|       |#else
 2269|  4.91k|    if (by == ONE) {
  ------------------
  |  |   39|  4.91k|    #define ONE 1.0
  ------------------
  |  Branch (2269:9): [True: 1.66k, False: 3.24k]
  ------------------
 2270|  1.66k|        return;
 2271|  1.66k|    }
 2272|  3.24k|#endif
 2273|   132k|    for (igraph_int_t i = 0; i < n; i++) {
  ------------------
  |  Branch (2273:30): [True: 128k, False: 3.24k]
  ------------------
 2274|       |#ifdef PROD
 2275|       |        PROD(VECTOR(*v)[i], VECTOR(*v)[i], by);
 2276|       |#else
 2277|   128k|        VECTOR(*v)[i] *= by;
  ------------------
  |  |   60|   128k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 2278|   128k|#endif
 2279|   128k|    }
 2280|  3.24k|}
igraph_vector_append:
 2432|    822|                                               const TYPE(igraph_vector) *from) {
 2433|    822|    IGRAPH_ASSERT(to != NULL);
  ------------------
  |  |  924|    822|    do { \
  |  |  925|    822|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
 2434|    822|    IGRAPH_ASSERT(to->stor_begin != NULL);
  ------------------
  |  |  924|    822|    do { \
  |  |  925|    822|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
 2435|       |
 2436|    822|    const igraph_int_t to_size = FUNCTION(igraph_vector, size)(to);
  ------------------
  |  |  173|    822|        #define FUNCTION(a,c) CONCAT2(a,c)
  |  |  ------------------
  |  |  |  |   20|    822|#define CONCAT2(a,b) CONCAT2x(a,b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|    822|#define CONCAT2x(a,b) a ## _ ## b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2437|    822|    const igraph_int_t from_size = FUNCTION(igraph_vector, size)(from);
  ------------------
  |  |  173|    822|        #define FUNCTION(a,c) CONCAT2(a,c)
  |  |  ------------------
  |  |  |  |   20|    822|#define CONCAT2(a,b) CONCAT2x(a,b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|    822|#define CONCAT2x(a,b) a ## _ ## b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2438|    822|    const igraph_int_t to_capacity = FUNCTION(igraph_vector, capacity)(to);
  ------------------
  |  |  173|    822|        #define FUNCTION(a,c) CONCAT2(a,c)
  |  |  ------------------
  |  |  |  |   20|    822|#define CONCAT2(a,b) CONCAT2x(a,b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|    822|#define CONCAT2x(a,b) a ## _ ## b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2439|    822|    igraph_int_t new_to_size;
 2440|       |
 2441|    822|    IGRAPH_SAFE_ADD(to_size, from_size, &new_to_size);
  ------------------
  |  |   47|    822|    do { \
  |  |   48|    822|        igraph_int_t _safe_a = (a), _safe_b = (b); \
  |  |   49|    822|        igraph_int_t _safe_sum; \
  |  |   50|    822|        if (__builtin_add_overflow(_safe_a, _safe_b, &_safe_sum)) { \
  |  |  ------------------
  |  |  |  Branch (50:13): [True: 0, False: 822]
  |  |  ------------------
  |  |   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|    822|        *(res) = _safe_sum; \
  |  |   54|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (54:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
 2442|       |
 2443|    822|    if (to_capacity < new_to_size) {
  ------------------
  |  Branch (2443:9): [True: 0, False: 822]
  ------------------
 2444|      0|        igraph_int_t new_to_capacity = to_capacity < IGRAPH_INTEGER_MAX/2 ? to_capacity * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   74|      0|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
                      igraph_int_t new_to_capacity = to_capacity < IGRAPH_INTEGER_MAX/2 ? to_capacity * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   74|      0|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (2444:40): [True: 0, False: 0]
  ------------------
 2445|      0|        if (new_to_capacity < new_to_size) {
  ------------------
  |  Branch (2445:13): [True: 0, False: 0]
  ------------------
 2446|      0|            new_to_capacity = new_to_size;
 2447|      0|        }
 2448|      0|        IGRAPH_CHECK(FUNCTION(igraph_vector, reserve)(to, new_to_capacity));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2449|      0|    }
 2450|       |
 2451|    822|    memcpy(to->stor_begin + to_size, from->stor_begin,
 2452|    822|           sizeof(BASE) * from_size);
 2453|    822|    to->end = to->stor_begin + new_to_size;
 2454|       |
 2455|    822|    return IGRAPH_SUCCESS;
 2456|    822|}
igraph_vector_update:
 2529|    822|                                    const TYPE(igraph_vector) *from) {
 2530|    822|    igraph_int_t n = FUNCTION(igraph_vector, size)(from);
  ------------------
  |  |  173|    822|        #define FUNCTION(a,c) CONCAT2(a,c)
  |  |  ------------------
  |  |  |  |   20|    822|#define CONCAT2(a,b) CONCAT2x(a,b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|    822|#define CONCAT2x(a,b) a ## _ ## b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2531|    822|    IGRAPH_CHECK(FUNCTION(igraph_vector, resize)(to, n));
  ------------------
  |  |  656|    822|    do { \
  |  |  657|    822|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    822|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
 2532|    822|    memcpy(to->stor_begin, from->stor_begin, sizeof(BASE)*n);
 2533|    822|    return IGRAPH_SUCCESS;
 2534|    822|}
igraph_vector_minmax:
 2876|    777|                          BASE *min, BASE *max) {
 2877|    777|    BASE* ptr;
  ------------------
  |  |   29|    777|    #define BASE igraph_real_t
  ------------------
 2878|    777|    IGRAPH_ASSERT(!FUNCTION(igraph_vector, empty)(v));
  ------------------
  |  |  924|    777|    do { \
  |  |  925|    777|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|    777|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 777]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|    777|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 777]
  |  |  ------------------
  ------------------
 2879|    777|    *min = *max = *(v->stor_begin);
 2880|    777|    #if defined(BASE_IGRAPH_REAL)
 2881|    777|        if (isnan(*min)) { return; }; /* Result is NaN */
  ------------------
  |  Branch (2881:13): [True: 0, False: 777]
  ------------------
 2882|    777|    #endif
 2883|    777|    ptr = v->stor_begin + 1;
 2884|  18.2k|    while (ptr < v->end) {
  ------------------
  |  Branch (2884:12): [True: 17.4k, False: 777]
  ------------------
 2885|  17.4k|        if (*ptr > *max) {
  ------------------
  |  Branch (2885:13): [True: 1.18k, False: 16.3k]
  ------------------
 2886|  1.18k|            *max = *ptr;
 2887|  16.3k|        } else if (*ptr < *min) {
  ------------------
  |  Branch (2887:20): [True: 748, False: 15.5k]
  ------------------
 2888|    748|            *min = *ptr;
 2889|    748|        }
 2890|  15.5k|        #if defined(BASE_IGRAPH_REAL)
 2891|  15.5k|        else if (isnan(*ptr)) { /* Result is NaN */
  ------------------
  |  Branch (2891:18): [True: 0, False: 15.5k]
  ------------------
 2892|      0|            *min = *max = *ptr;
 2893|      0|            return;
 2894|  17.4k|        };
 2895|  17.4k|        #endif
 2896|  17.4k|        ptr++;
 2897|  17.4k|    }
 2898|    777|}
igraph_vector_char_init:
  134|    822|igraph_error_t FUNCTION(igraph_vector, init)(TYPE(igraph_vector) *v, igraph_int_t size) {
  135|    822|    igraph_int_t alloc_size;
  136|    822|    IGRAPH_ASSERT(size >= 0);
  ------------------
  |  |  924|    822|    do { \
  |  |  925|    822|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
  137|    822|    alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (137:18): [True: 821, False: 1]
  ------------------
  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|    822|    v->stor_begin = IGRAPH_CALLOC(alloc_size, BASE);
  ------------------
  |  |   33|    822|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  1.64k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 822, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 822, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 822, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  144|    822|    IGRAPH_CHECK_OOM(v->stor_begin, "Insufficient memory to initialize vector.");
  ------------------
  |  |  709|    822|    do { \
  |  |  710|    822|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
  145|    822|    v->stor_end = v->stor_begin + alloc_size;
  146|    822|    v->end = v->stor_begin + size;
  147|       |
  148|    822|    return IGRAPH_SUCCESS;
  149|    822|}
igraph_vector_char_destroy:
  408|    822|void FUNCTION(igraph_vector, destroy)(TYPE(igraph_vector) *v) {
  409|    822|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|    822|    do { \
  |  |  925|    822|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
  410|       |    /* vector_init() will leave stor_begin set to NULL when it fails.
  411|       |     * We handle these cases gracefully. */
  412|    822|    if (v->stor_begin != NULL) {
  ------------------
  |  Branch (412:9): [True: 822, False: 0]
  ------------------
  413|    822|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   36|    822|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  414|       |        v->stor_begin = NULL;
  415|    822|    }
  416|    822|}
igraph_vector_char_size:
  522|  73.8k|igraph_int_t FUNCTION(igraph_vector, size)(const TYPE(igraph_vector) *v) {
  523|  73.8k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  73.8k|    do { \
  |  |  925|  73.8k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  73.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 73.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  73.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 73.8k]
  |  |  ------------------
  ------------------
  524|  73.8k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  73.8k|    do { \
  |  |  925|  73.8k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  73.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 73.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  73.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 73.8k]
  |  |  ------------------
  ------------------
  525|  73.8k|    return v->end - v->stor_begin;
  526|  73.8k|}
igraph_vector_char_null:
  725|  36.9k|void FUNCTION(igraph_vector, null)(TYPE(igraph_vector) *v) {
  726|  36.9k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  36.9k|    do { \
  |  |  925|  36.9k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  36.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 36.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  36.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 36.9k]
  |  |  ------------------
  ------------------
  727|  36.9k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  36.9k|    do { \
  |  |  925|  36.9k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  36.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 36.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  36.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 36.9k]
  |  |  ------------------
  ------------------
  728|  36.9k|    if (FUNCTION(igraph_vector, size)(v) > 0) {
  ------------------
  |  |  181|  36.9k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  36.9k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  36.9k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (728:9): [True: 36.9k, False: 0]
  ------------------
  729|  36.9k|        memset(v->stor_begin, 0, sizeof(BASE) * FUNCTION(igraph_vector, size)(v));
  ------------------
  |  |  181|  36.9k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  36.9k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  36.9k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  730|  36.9k|    }
  731|  36.9k|}
igraph_vector_int_init:
  134|  1.07M|igraph_error_t FUNCTION(igraph_vector, init)(TYPE(igraph_vector) *v, igraph_int_t size) {
  135|  1.07M|    igraph_int_t alloc_size;
  136|  1.07M|    IGRAPH_ASSERT(size >= 0);
  ------------------
  |  |  924|  1.07M|    do { \
  |  |  925|  1.07M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.07M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.07M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.07M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.07M]
  |  |  ------------------
  ------------------
  137|  1.07M|    alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (137:18): [True: 239k, False: 832k]
  ------------------
  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|  1.07M|    v->stor_begin = IGRAPH_CALLOC(alloc_size, BASE);
  ------------------
  |  |   33|  1.07M|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  2.14M|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 1.07M, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 1.07M, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 1.07M, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  144|  1.07M|    IGRAPH_CHECK_OOM(v->stor_begin, "Insufficient memory to initialize vector.");
  ------------------
  |  |  709|  1.07M|    do { \
  |  |  710|  1.07M|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  1.07M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.07M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  1.07M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 1.07M]
  |  |  ------------------
  ------------------
  145|  1.07M|    v->stor_end = v->stor_begin + alloc_size;
  146|  1.07M|    v->end = v->stor_begin + size;
  147|       |
  148|  1.07M|    return IGRAPH_SUCCESS;
  149|  1.07M|}
igraph_vector_int_destroy:
  408|  1.07M|void FUNCTION(igraph_vector, destroy)(TYPE(igraph_vector) *v) {
  409|  1.07M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  1.07M|    do { \
  |  |  925|  1.07M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.07M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.07M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.07M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.07M]
  |  |  ------------------
  ------------------
  410|       |    /* vector_init() will leave stor_begin set to NULL when it fails.
  411|       |     * We handle these cases gracefully. */
  412|  1.07M|    if (v->stor_begin != NULL) {
  ------------------
  |  Branch (412:9): [True: 1.07M, False: 0]
  ------------------
  413|  1.07M|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   36|  1.07M|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  414|       |        v->stor_begin = NULL;
  415|  1.07M|    }
  416|  1.07M|}
igraph_vector_int_capacity:
  436|  2.31M|igraph_int_t FUNCTION(igraph_vector, capacity)(const TYPE(igraph_vector) *v) {
  437|  2.31M|    return v->stor_end - v->stor_begin;
  438|  2.31M|}
igraph_vector_int_reserve:
  468|  2.28M|igraph_error_t FUNCTION(igraph_vector, reserve)(TYPE(igraph_vector) *v, igraph_int_t capacity) {
  469|  2.28M|    igraph_int_t current_capacity;
  470|  2.28M|    BASE *tmp;
  ------------------
  |  |   69|  2.28M|    #define BASE igraph_int_t
  ------------------
  471|       |
  472|  2.28M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  2.28M|    do { \
  |  |  925|  2.28M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.28M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.28M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.28M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.28M]
  |  |  ------------------
  ------------------
  473|  2.28M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  2.28M|    do { \
  |  |  925|  2.28M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.28M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.28M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.28M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.28M]
  |  |  ------------------
  ------------------
  474|  2.28M|    IGRAPH_ASSERT(capacity >= 0);
  ------------------
  |  |  924|  2.28M|    do { \
  |  |  925|  2.28M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.28M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.28M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.28M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.28M]
  |  |  ------------------
  ------------------
  475|       |
  476|  2.28M|    current_capacity = FUNCTION(igraph_vector, capacity)(v);
  ------------------
  |  |  181|  2.28M|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  2.28M|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  2.28M|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  477|       |
  478|  2.28M|    if (capacity <= current_capacity) {
  ------------------
  |  Branch (478:9): [True: 2.16M, False: 119k]
  ------------------
  479|  2.16M|        return IGRAPH_SUCCESS;
  480|  2.16M|    }
  481|       |
  482|   119k|    tmp = IGRAPH_REALLOC(v->stor_begin, capacity, BASE);
  ------------------
  |  |   35|   119k|#define IGRAPH_REALLOC(p,n,t) IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, realloc((void*)(p), sizeof(t) * ((n) > 0 ? (n) : 1)))
  |  |  ------------------
  |  |  |  |   31|   239k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 119k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 119k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 119k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  483|   119k|    IGRAPH_CHECK_OOM(tmp, "Cannot reserve space for vector.");
  ------------------
  |  |  709|   119k|    do { \
  |  |  710|   119k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|   119k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 119k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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|   119k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 119k]
  |  |  ------------------
  ------------------
  484|       |
  485|   119k|    v->end = tmp + (v->end - v->stor_begin);
  486|   119k|    v->stor_begin = tmp;
  487|   119k|    v->stor_end = v->stor_begin + capacity;
  488|       |
  489|   119k|    return IGRAPH_SUCCESS;
  490|   119k|}
igraph_vector_int_empty:
  503|  3.15k|igraph_bool_t FUNCTION(igraph_vector, empty)(const TYPE(igraph_vector) *v) {
  504|  3.15k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  3.15k|    do { \
  |  |  925|  3.15k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  3.15k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.15k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  3.15k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 3.15k]
  |  |  ------------------
  ------------------
  505|  3.15k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  3.15k|    do { \
  |  |  925|  3.15k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  3.15k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.15k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  3.15k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 3.15k]
  |  |  ------------------
  ------------------
  506|  3.15k|    return v->stor_begin == v->end;
  507|  3.15k|}
igraph_vector_int_size:
  522|  3.28M|igraph_int_t FUNCTION(igraph_vector, size)(const TYPE(igraph_vector) *v) {
  523|  3.28M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  3.28M|    do { \
  |  |  925|  3.28M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  3.28M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.28M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  3.28M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 3.28M]
  |  |  ------------------
  ------------------
  524|  3.28M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  3.28M|    do { \
  |  |  925|  3.28M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  3.28M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.28M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  3.28M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 3.28M]
  |  |  ------------------
  ------------------
  525|  3.28M|    return v->end - v->stor_begin;
  526|  3.28M|}
igraph_vector_int_clear:
  542|   816k|void FUNCTION(igraph_vector, clear)(TYPE(igraph_vector)* v) {
  543|   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]
  |  |  ------------------
  ------------------
  544|   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]
  |  |  ------------------
  ------------------
  545|   816k|    v->end = v->stor_begin;
  546|   816k|}
igraph_vector_int_push_back:
  573|  1.60M|igraph_error_t FUNCTION(igraph_vector, push_back)(TYPE(igraph_vector) *v, BASE e) {
  574|  1.60M|    IGRAPH_ASSERT(v != 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]
  |  |  ------------------
  ------------------
  575|  1.60M|    IGRAPH_ASSERT(v->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]
  |  |  ------------------
  ------------------
  576|       |
  577|  1.60M|    if (v->stor_end == v->end) {
  ------------------
  |  Branch (577:9): [True: 80.8k, False: 1.52M]
  ------------------
  578|       |        /* full, allocate more storage */
  579|  80.8k|        igraph_int_t old_size = FUNCTION(igraph_vector, size)(v);
  ------------------
  |  |  181|  80.8k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  80.8k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  80.8k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  580|  80.8k|        igraph_int_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   74|  80.8k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
                      igraph_int_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   74|  80.8k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (580:33): [True: 80.8k, False: 0]
  ------------------
  581|  80.8k|        if (old_size == IGRAPH_INTEGER_MAX) {
  ------------------
  |  |   74|  80.8k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (581:13): [True: 0, False: 80.8k]
  ------------------
  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|  80.8k|        if (new_size == 0) {
  ------------------
  |  Branch (584:13): [True: 0, False: 80.8k]
  ------------------
  585|      0|            new_size = 1;
  586|      0|        }
  587|  80.8k|        IGRAPH_CHECK(FUNCTION(igraph_vector, reserve)(v, new_size));
  ------------------
  |  |  656|  80.8k|    do { \
  |  |  657|  80.8k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  80.8k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  80.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 80.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|  80.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 80.8k]
  |  |  ------------------
  ------------------
  588|  80.8k|    }
  589|       |
  590|  1.60M|    *(v->end) = e;
  591|  1.60M|    v->end += 1;
  592|       |
  593|  1.60M|    return IGRAPH_SUCCESS;
  594|  1.60M|}
igraph_vector_int_null:
  725|   206k|void FUNCTION(igraph_vector, null)(TYPE(igraph_vector) *v) {
  726|   206k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|   206k|    do { \
  |  |  925|   206k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   206k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 206k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   206k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 206k]
  |  |  ------------------
  ------------------
  727|   206k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|   206k|    do { \
  |  |  925|   206k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   206k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 206k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   206k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 206k]
  |  |  ------------------
  ------------------
  728|   206k|    if (FUNCTION(igraph_vector, size)(v) > 0) {
  ------------------
  |  |  181|   206k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|   206k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|   206k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (728:9): [True: 206k, False: 4]
  ------------------
  729|   206k|        memset(v->stor_begin, 0, sizeof(BASE) * FUNCTION(igraph_vector, size)(v));
  ------------------
  |  |  181|   206k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|   206k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|   206k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  730|   206k|    }
  731|   206k|}
igraph_vector_int_pop_back:
  838|  1.38M|BASE FUNCTION(igraph_vector, pop_back)(TYPE(igraph_vector) *v) {
  839|  1.38M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  1.38M|    do { \
  |  |  925|  1.38M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.38M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.38M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.38M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.38M]
  |  |  ------------------
  ------------------
  840|  1.38M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  1.38M|    do { \
  |  |  925|  1.38M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.38M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.38M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.38M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.38M]
  |  |  ------------------
  ------------------
  841|  1.38M|    IGRAPH_ASSERT(v->end != NULL);
  ------------------
  |  |  924|  1.38M|    do { \
  |  |  925|  1.38M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.38M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.38M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.38M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.38M]
  |  |  ------------------
  ------------------
  842|  1.38M|    IGRAPH_ASSERT(v->end != v->stor_begin);
  ------------------
  |  |  924|  1.38M|    do { \
  |  |  925|  1.38M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.38M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.38M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.38M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.38M]
  |  |  ------------------
  ------------------
  843|       |
  844|  1.38M|    (v->end)--;
  845|       |
  846|  1.38M|    return *(v->end);
  847|  1.38M|}
igraph_vector_int_resize:
 1264|  2.18M|igraph_error_t FUNCTION(igraph_vector, resize)(TYPE(igraph_vector)* v, igraph_int_t new_size) {
 1265|  2.18M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  2.18M|    do { \
  |  |  925|  2.18M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.18M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.18M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.18M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.18M]
  |  |  ------------------
  ------------------
 1266|  2.18M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  2.18M|    do { \
  |  |  925|  2.18M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.18M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.18M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.18M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.18M]
  |  |  ------------------
  ------------------
 1267|  2.18M|    IGRAPH_CHECK(FUNCTION(igraph_vector, reserve)(v, new_size));
  ------------------
  |  |  656|  2.18M|    do { \
  |  |  657|  2.18M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.18M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.18M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.18M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.18M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.18M]
  |  |  ------------------
  ------------------
 1268|  2.18M|    v->end = v->stor_begin + new_size;
 1269|  2.18M|    return IGRAPH_SUCCESS;
 1270|  2.18M|}
igraph_vector_int_max:
 1327|  3.15k|BASE FUNCTION(igraph_vector, max)(const TYPE(igraph_vector) *v) {
 1328|  3.15k|    BASE max;
  ------------------
  |  |   69|  3.15k|    #define BASE igraph_int_t
  ------------------
 1329|  3.15k|    BASE *ptr;
  ------------------
  |  |   69|  3.15k|    #define BASE igraph_int_t
  ------------------
 1330|  3.15k|    IGRAPH_ASSERT(!FUNCTION(igraph_vector, empty)(v));
  ------------------
  |  |  924|  3.15k|    do { \
  |  |  925|  3.15k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  3.15k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.15k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  3.15k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 3.15k]
  |  |  ------------------
  ------------------
 1331|  3.15k|    max = *(v->stor_begin);
 1332|       |#if defined(BASE_IGRAPH_REAL)
 1333|       |    if (isnan(max)) { return max; }; /* Result is NaN */
 1334|       |#endif
 1335|  3.15k|    ptr = v->stor_begin + 1;
 1336|   111k|    while (ptr < v->end) {
  ------------------
  |  Branch (1336:12): [True: 108k, False: 3.15k]
  ------------------
 1337|   108k|        if ((*ptr) > max) {
  ------------------
  |  Branch (1337:13): [True: 9.78k, False: 98.4k]
  ------------------
 1338|  9.78k|            max = *ptr;
 1339|  9.78k|        }
 1340|       |#if defined(BASE_IGRAPH_REAL)
 1341|       |        else if (isnan(*ptr))
 1342|       |            return *ptr; /* Result is NaN */
 1343|       |#endif
 1344|   108k|        ptr++;
 1345|   108k|    }
 1346|  3.15k|    return max;
 1347|  3.15k|}
igraph_vector_int_isininterval:
 1837|  4.82k|        BASE high) {
 1838|  4.82k|    BASE *ptr;
  ------------------
  |  |   69|  4.82k|    #define BASE igraph_int_t
  ------------------
 1839|  4.82k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  4.82k|    do { \
  |  |  925|  4.82k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.82k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.82k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.82k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.82k]
  |  |  ------------------
  ------------------
 1840|  4.82k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  4.82k|    do { \
  |  |  925|  4.82k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.82k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.82k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.82k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.82k]
  |  |  ------------------
  ------------------
 1841|   153k|    for (ptr = v->stor_begin; ptr < v->end; ptr++) {
  ------------------
  |  Branch (1841:31): [True: 148k, False: 4.82k]
  ------------------
 1842|       |        /* Note that the following is not equivalent to *ptr < low || *ptr > high
 1843|       |         * when *ptr is NaN! */
 1844|   148k|        if (!(*ptr >= low && *ptr <= high)) {
  ------------------
  |  Branch (1844:15): [True: 148k, False: 0]
  |  Branch (1844:30): [True: 148k, False: 0]
  ------------------
 1845|      0|            return 0;
 1846|      0|        }
 1847|   148k|    }
 1848|  4.82k|    return 1;
 1849|  4.82k|}
igraph_vector_int_append:
 2432|  36.9k|                                               const TYPE(igraph_vector) *from) {
 2433|  36.9k|    IGRAPH_ASSERT(to != NULL);
  ------------------
  |  |  924|  36.9k|    do { \
  |  |  925|  36.9k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  36.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 36.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  36.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 36.9k]
  |  |  ------------------
  ------------------
 2434|  36.9k|    IGRAPH_ASSERT(to->stor_begin != NULL);
  ------------------
  |  |  924|  36.9k|    do { \
  |  |  925|  36.9k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  36.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 36.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  36.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 36.9k]
  |  |  ------------------
  ------------------
 2435|       |
 2436|  36.9k|    const igraph_int_t to_size = FUNCTION(igraph_vector, size)(to);
  ------------------
  |  |  181|  36.9k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  36.9k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  36.9k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2437|  36.9k|    const igraph_int_t from_size = FUNCTION(igraph_vector, size)(from);
  ------------------
  |  |  181|  36.9k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  36.9k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  36.9k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2438|  36.9k|    const igraph_int_t to_capacity = FUNCTION(igraph_vector, capacity)(to);
  ------------------
  |  |  181|  36.9k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  36.9k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  36.9k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2439|  36.9k|    igraph_int_t new_to_size;
 2440|       |
 2441|  36.9k|    IGRAPH_SAFE_ADD(to_size, from_size, &new_to_size);
  ------------------
  |  |   47|  36.9k|    do { \
  |  |   48|  36.9k|        igraph_int_t _safe_a = (a), _safe_b = (b); \
  |  |   49|  36.9k|        igraph_int_t _safe_sum; \
  |  |   50|  36.9k|        if (__builtin_add_overflow(_safe_a, _safe_b, &_safe_sum)) { \
  |  |  ------------------
  |  |  |  Branch (50:13): [True: 0, False: 36.9k]
  |  |  ------------------
  |  |   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|  36.9k|        *(res) = _safe_sum; \
  |  |   54|  36.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (54:14): [Folded, False: 36.9k]
  |  |  ------------------
  ------------------
 2442|       |
 2443|  36.9k|    if (to_capacity < new_to_size) {
  ------------------
  |  Branch (2443:9): [True: 0, False: 36.9k]
  ------------------
 2444|      0|        igraph_int_t new_to_capacity = to_capacity < IGRAPH_INTEGER_MAX/2 ? to_capacity * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   74|      0|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
                      igraph_int_t new_to_capacity = to_capacity < IGRAPH_INTEGER_MAX/2 ? to_capacity * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   74|      0|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (2444:40): [True: 0, False: 0]
  ------------------
 2445|      0|        if (new_to_capacity < new_to_size) {
  ------------------
  |  Branch (2445:13): [True: 0, False: 0]
  ------------------
 2446|      0|            new_to_capacity = new_to_size;
 2447|      0|        }
 2448|      0|        IGRAPH_CHECK(FUNCTION(igraph_vector, reserve)(to, new_to_capacity));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2449|      0|    }
 2450|       |
 2451|  36.9k|    memcpy(to->stor_begin + to_size, from->stor_begin,
 2452|  36.9k|           sizeof(BASE) * from_size);
 2453|  36.9k|    to->end = to->stor_begin + new_to_size;
 2454|       |
 2455|  36.9k|    return IGRAPH_SUCCESS;
 2456|  36.9k|}

igraph_vector_ptr_init:
   86|    822|igraph_error_t igraph_vector_ptr_init(igraph_vector_ptr_t* v, igraph_int_t size) {
   87|    822|    igraph_int_t alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (87:31): [True: 0, False: 822]
  ------------------
   88|    822|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|    822|    do { \
  |  |  925|    822|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
   89|    822|    if (size < 0) {
  ------------------
  |  Branch (89:9): [True: 0, False: 822]
  ------------------
   90|      0|        size = 0;
   91|      0|    }
   92|    822|    v->stor_begin = IGRAPH_CALLOC(alloc_size, void*);
  ------------------
  |  |   33|    822|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  1.64k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 822, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 822, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 822, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   93|    822|    if (v->stor_begin == 0) {
  ------------------
  |  Branch (93:9): [True: 0, False: 822]
  ------------------
   94|      0|        IGRAPH_ERROR("Insufficient memory for initializing a pointer vector.", 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|    822|    v->stor_end = v->stor_begin + alloc_size;
   97|    822|    v->end = v->stor_begin + size;
   98|    822|    v->item_destructor = 0;
   99|       |
  100|    822|    return IGRAPH_SUCCESS;
  101|    822|}
igraph_vector_ptr_destroy:
  132|    822|void igraph_vector_ptr_destroy(igraph_vector_ptr_t* v) {
  133|    822|    IGRAPH_ASSERT(v != 0);
  ------------------
  |  |  924|    822|    do { \
  |  |  925|    822|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
  134|    822|    if (v->stor_begin != 0) {
  ------------------
  |  Branch (134:9): [True: 822, False: 0]
  ------------------
  135|    822|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   36|    822|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  136|       |        v->stor_begin = NULL;
  137|    822|    }
  138|    822|}
igraph_vector_ptr_size:
  294|  3.28k|igraph_int_t igraph_vector_ptr_size(const igraph_vector_ptr_t* v) {
  295|  3.28k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  3.28k|    do { \
  |  |  925|  3.28k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  3.28k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.28k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  3.28k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 3.28k]
  |  |  ------------------
  ------------------
  296|  3.28k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  3.28k|    do { \
  |  |  925|  3.28k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  3.28k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.28k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  3.28k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 3.28k]
  |  |  ------------------
  ------------------
  297|  3.28k|    return v->end - v->stor_begin;
  298|  3.28k|}
igraph_vector_ptr_push_back:
  363|    822|igraph_error_t igraph_vector_ptr_push_back(igraph_vector_ptr_t* v, void* e) {
  364|    822|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|    822|    do { \
  |  |  925|    822|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
  365|    822|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|    822|    do { \
  |  |  925|    822|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
  366|       |
  367|       |    /* full, allocate more storage */
  368|    822|    if (v->stor_end == v->end) {
  ------------------
  |  Branch (368:9): [True: 0, False: 822]
  ------------------
  369|      0|        igraph_int_t new_size = igraph_vector_ptr_size(v) * 2;
  370|      0|        if (new_size == 0) {
  ------------------
  |  Branch (370:13): [True: 0, False: 0]
  ------------------
  371|      0|            new_size = 1;
  372|      0|        }
  373|      0|        IGRAPH_CHECK(igraph_vector_ptr_reserve(v, new_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]
  |  |  ------------------
  ------------------
  374|      0|    }
  375|       |
  376|    822|    *(v->end) = e;
  377|    822|    v->end += 1;
  378|       |
  379|    822|    return IGRAPH_SUCCESS;
  380|    822|}

igraph_adjlist_init_empty:
  276|  2.39k|igraph_error_t igraph_adjlist_init_empty(igraph_adjlist_t *al, igraph_int_t no_of_nodes) {
  277|       |
  278|  2.39k|    al->length = no_of_nodes;
  279|  2.39k|    al->adjs = IGRAPH_CALLOC(al->length, igraph_vector_int_t);
  ------------------
  |  |   33|  2.39k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  4.78k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 2.39k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 2.39k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 2.39k, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  280|  2.39k|    IGRAPH_CHECK_OOM(al->adjs, "Insufficient memory for creating adjlist.");
  ------------------
  |  |  709|  2.39k|    do { \
  |  |  710|  2.39k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  2.39k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.39k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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.39k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 2.39k]
  |  |  ------------------
  ------------------
  281|  2.39k|    IGRAPH_FINALLY(igraph_adjlist_destroy, al);
  ------------------
  |  |  603|  2.39k|    do { \
  |  |  604|  2.39k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.39k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.39k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.39k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.39k]
  |  |  ------------------
  |  |  608|  2.39k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.39k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.39k]
  |  |  ------------------
  ------------------
  282|       |
  283|   112k|    for (igraph_int_t i = 0; i < al->length; i++) {
  ------------------
  |  Branch (283:30): [True: 110k, False: 2.39k]
  ------------------
  284|   110k|        IGRAPH_CHECK(igraph_vector_int_init(&al->adjs[i], 0));
  ------------------
  |  |  656|   110k|    do { \
  |  |  657|   110k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   110k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   110k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 110k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   110k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 110k]
  |  |  ------------------
  ------------------
  285|   110k|    }
  286|       |
  287|  2.39k|    IGRAPH_FINALLY_CLEAN(1);
  288|       |
  289|  2.39k|    return IGRAPH_SUCCESS;
  290|  2.39k|}
igraph_adjlist_destroy:
  480|  2.39k|void igraph_adjlist_destroy(igraph_adjlist_t *al) {
  481|   112k|    for (igraph_int_t i = 0; i < al->length; i++) {
  ------------------
  |  Branch (481:30): [True: 110k, False: 2.39k]
  ------------------
  482|       |        /* This works if some igraph_vector_int_t's contain NULL,
  483|       |           because igraph_vector_int_destroy can handle this. */
  484|   110k|        igraph_vector_int_destroy(&al->adjs[i]);
  485|   110k|    }
  486|       |    IGRAPH_FREE(al->adjs);
  ------------------
  |  |   36|  2.39k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  487|  2.39k|}
igraph_inclist_init:
  751|  5.60k|                        igraph_loops_t loops) {
  752|  5.60k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  753|  5.60k|    igraph_vector_int_t degrees;
  754|  5.60k|    int iter = 0;
  755|       |
  756|  5.60k|    if (mode != IGRAPH_IN && mode != IGRAPH_OUT && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (756:9): [True: 5.60k, False: 0]
  |  Branch (756:30): [True: 2.46k, False: 3.14k]
  |  Branch (756:52): [True: 0, False: 2.46k]
  ------------------
  757|      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]
  |  |  ------------------
  ------------------
  758|      0|    }
  759|       |
  760|  5.60k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (760:9): [True: 821, False: 4.78k]
  ------------------
  761|    821|        mode = IGRAPH_ALL;
  762|    821|    }
  763|       |
  764|  5.60k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&degrees, no_of_nodes);
  ------------------
  |  |  119|  5.60k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  5.60k|    do { \
  |  |  |  |  657|  5.60k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  5.60k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  5.60k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.60k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  5.60k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 5.60k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  5.60k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  5.60k|    do { \
  |  |  |  |  604|  5.60k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  5.60k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  5.60k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  5.60k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 5.60k]
  |  |  |  |  ------------------
  |  |  |  |  608|  5.60k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  5.60k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 5.60k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 5.60k]
  |  |  ------------------
  ------------------
  765|       |    /* igraph_degrees() is fast when loops=true */
  766|  5.60k|    IGRAPH_CHECK(igraph_degree(graph, &degrees, igraph_vss_all(), mode, IGRAPH_LOOPS));
  ------------------
  |  |  656|  5.60k|    do { \
  |  |  657|  5.60k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  5.60k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  5.60k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.60k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  5.60k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 5.60k]
  |  |  ------------------
  ------------------
  767|       |
  768|  5.60k|    il->length = no_of_nodes;
  769|  5.60k|    il->incs = IGRAPH_CALLOC(il->length, igraph_vector_int_t);
  ------------------
  |  |   33|  5.60k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  11.2k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 5.60k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 5.60k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 5.60k, False: 4]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  770|  5.60k|    if (il->incs == 0) {
  ------------------
  |  Branch (770:9): [True: 0, False: 5.60k]
  ------------------
  771|      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]
  |  |  ------------------
  ------------------
  772|      0|    }
  773|       |
  774|  5.60k|    IGRAPH_FINALLY(igraph_inclist_destroy, il);
  ------------------
  |  |  603|  5.60k|    do { \
  |  |  604|  5.60k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  5.60k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  5.60k|         * incorrect destructor function with the pointer */ \
  |  |  607|  5.60k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 5.60k]
  |  |  ------------------
  |  |  608|  5.60k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  5.60k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 5.60k]
  |  |  ------------------
  ------------------
  775|   263k|    for (igraph_int_t i = 0; i < il->length; i++) {
  ------------------
  |  Branch (775:30): [True: 257k, False: 5.60k]
  ------------------
  776|   257k|        IGRAPH_ALLOW_INTERRUPTION_LIMITED(iter, 1000);
  ------------------
  |  |   71|   257k|    do { \
  |  |   72|   257k|        if (++iter >= skips) { \
  |  |  ------------------
  |  |  |  Branch (72:13): [True: 0, False: 257k]
  |  |  ------------------
  |  |   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|   257k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (76:14): [Folded, False: 257k]
  |  |  ------------------
  ------------------
  777|       |
  778|   257k|        IGRAPH_CHECK(igraph_vector_int_init(&il->incs[i], VECTOR(degrees)[i]));
  ------------------
  |  |  656|   257k|    do { \
  |  |  657|   257k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   257k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   257k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 257k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   257k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 257k]
  |  |  ------------------
  ------------------
  779|   257k|        IGRAPH_CHECK(igraph_incident(graph, &il->incs[i], i, mode, loops));
  ------------------
  |  |  656|   257k|    do { \
  |  |  657|   257k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   257k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   257k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 257k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   257k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 257k]
  |  |  ------------------
  ------------------
  780|   257k|    }
  781|       |
  782|  5.60k|    igraph_vector_int_destroy(&degrees);
  783|  5.60k|    IGRAPH_FINALLY_CLEAN(2); /* + igraph_inclist_destroy */
  784|       |
  785|  5.60k|    return IGRAPH_SUCCESS;
  786|  5.60k|}
igraph_inclist_init_empty:
  803|  2.39k|igraph_error_t igraph_inclist_init_empty(igraph_inclist_t *il, igraph_int_t n) {
  804|  2.39k|    igraph_int_t i;
  805|       |
  806|  2.39k|    il->length = n;
  807|  2.39k|    il->incs = IGRAPH_CALLOC(il->length, igraph_vector_int_t);
  ------------------
  |  |   33|  2.39k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  4.78k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 2.39k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 2.39k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 2.39k, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  808|  2.39k|    if (il->incs == 0) {
  ------------------
  |  Branch (808:9): [True: 0, False: 2.39k]
  ------------------
  809|      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]
  |  |  ------------------
  ------------------
  810|      0|    }
  811|       |
  812|  2.39k|    IGRAPH_FINALLY(igraph_inclist_destroy, il);
  ------------------
  |  |  603|  2.39k|    do { \
  |  |  604|  2.39k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.39k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.39k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.39k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.39k]
  |  |  ------------------
  |  |  608|  2.39k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.39k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.39k]
  |  |  ------------------
  ------------------
  813|   112k|    for (i = 0; i < n; i++) {
  ------------------
  |  Branch (813:17): [True: 110k, False: 2.39k]
  ------------------
  814|   110k|        IGRAPH_CHECK(igraph_vector_int_init(&il->incs[i], 0));
  ------------------
  |  |  656|   110k|    do { \
  |  |  657|   110k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   110k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   110k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 110k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   110k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 110k]
  |  |  ------------------
  ------------------
  815|   110k|    }
  816|       |
  817|  2.39k|    IGRAPH_FINALLY_CLEAN(1);
  818|  2.39k|    return IGRAPH_SUCCESS;
  819|  2.39k|}
igraph_inclist_destroy:
  830|  7.99k|void igraph_inclist_destroy(igraph_inclist_t *il) {
  831|   376k|    for (igraph_int_t i = 0; i < il->length; i++) {
  ------------------
  |  Branch (831:30): [True: 368k, False: 7.99k]
  ------------------
  832|       |        /* This works if some igraph_vector_int_t's contain NULL,
  833|       |           because igraph_vector_int_destroy can handle this. */
  834|   368k|        igraph_vector_int_destroy(&il->incs[i]);
  835|   368k|    }
  836|       |    IGRAPH_FREE(il->incs);
  ------------------
  |  |   36|  7.99k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  837|  7.99k|}
igraph_lazy_inclist_init:
 1247|  4.93k|                             igraph_loops_t loops) {
 1248|       |
 1249|  4.93k|    if (mode != IGRAPH_IN && mode != IGRAPH_OUT && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (1249:9): [True: 4.11k, False: 822]
  |  Branch (1249:30): [True: 1.64k, False: 2.46k]
  |  Branch (1249:52): [True: 0, False: 1.64k]
  ------------------
 1250|      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]
  |  |  ------------------
  ------------------
 1251|      0|    }
 1252|       |
 1253|  4.93k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (1253:9): [True: 0, False: 4.93k]
  ------------------
 1254|      0|        mode = IGRAPH_ALL;
 1255|      0|    }
 1256|       |
 1257|  4.93k|    il->graph = graph;
 1258|  4.93k|    il->loops = loops;
 1259|  4.93k|    il->mode = mode;
 1260|       |
 1261|  4.93k|    il->length = igraph_vcount(graph);
 1262|  4.93k|    il->incs = IGRAPH_CALLOC(il->length, igraph_vector_int_t*);
  ------------------
  |  |   33|  4.93k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  9.86k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 4.93k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 4.93k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 4.92k, False: 6]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1263|  4.93k|    if (il->incs == 0) {
  ------------------
  |  Branch (1263:9): [True: 0, False: 4.93k]
  ------------------
 1264|      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]
  |  |  ------------------
  ------------------
 1265|      0|    }
 1266|       |
 1267|  4.93k|    return IGRAPH_SUCCESS;
 1268|       |
 1269|  4.93k|}
igraph_lazy_inclist_destroy:
 1282|  4.93k|void igraph_lazy_inclist_destroy(igraph_lazy_inclist_t *il) {
 1283|  4.93k|    igraph_lazy_inclist_clear(il);
 1284|       |    IGRAPH_FREE(il->incs);
  ------------------
  |  |   36|  4.93k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1285|  4.93k|}
igraph_lazy_inclist_clear:
 1296|  4.93k|void igraph_lazy_inclist_clear(igraph_lazy_inclist_t *il) {
 1297|  4.93k|    igraph_int_t i, n = il->length;
 1298|   226k|    for (i = 0; i < n; i++) {
  ------------------
  |  Branch (1298:17): [True: 221k, False: 4.93k]
  ------------------
 1299|   221k|        if (il->incs[i] != 0) {
  ------------------
  |  Branch (1299:13): [True: 188k, False: 32.7k]
  ------------------
 1300|   188k|            igraph_vector_int_destroy(il->incs[i]);
 1301|       |            IGRAPH_FREE(il->incs[i]);
  ------------------
  |  |   36|   188k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1302|   188k|        }
 1303|   221k|    }
 1304|  4.93k|}
igraph_i_lazy_inclist_get_real:
 1319|   188k|igraph_vector_int_t *igraph_i_lazy_inclist_get_real(igraph_lazy_inclist_t *il, igraph_int_t no) {
 1320|   188k|    igraph_error_t ret;
 1321|       |
 1322|   188k|    if (il->incs[no] == NULL) {
  ------------------
  |  Branch (1322:9): [True: 188k, False: 0]
  ------------------
 1323|   188k|        il->incs[no] = IGRAPH_CALLOC(1, igraph_vector_int_t);
  ------------------
  |  |   33|   188k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|   377k|    (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: 188k, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1324|   188k|        if (il->incs[no] == NULL) {
  ------------------
  |  Branch (1324:13): [True: 0, False: 188k]
  ------------------
 1325|      0|            return NULL;
 1326|      0|        }
 1327|       |
 1328|   188k|        ret = igraph_vector_int_init(il->incs[no], 0);
 1329|   188k|        if (ret != IGRAPH_SUCCESS) {
  ------------------
  |  Branch (1329:13): [True: 0, False: 188k]
  ------------------
 1330|      0|            IGRAPH_FREE(il->incs[no]);
  ------------------
  |  |   36|      0|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1331|      0|            return NULL;
 1332|      0|        }
 1333|       |
 1334|   188k|        ret = igraph_incident(il->graph, il->incs[no], no, il->mode, il->loops);
 1335|   188k|        if (ret != IGRAPH_SUCCESS) {
  ------------------
  |  Branch (1335:13): [True: 0, False: 188k]
  ------------------
 1336|      0|            igraph_vector_int_destroy(il->incs[no]);
 1337|      0|            IGRAPH_FREE(il->incs[no]);
  ------------------
  |  |   36|      0|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1338|      0|            return NULL;
 1339|      0|        }
 1340|   188k|    }
 1341|       |
 1342|   188k|    return il->incs[no];
 1343|   188k|}

igraph_attribute_record_init:
  126|  2.46k|) {
  127|  2.46k|    attr->name = NULL;
  128|  2.46k|    attr->type = IGRAPH_ATTRIBUTE_UNSPECIFIED;
  129|  2.46k|    attr->value.as_raw = NULL;
  130|  2.46k|    attr->default_value.string = NULL;
  131|       |
  132|  2.46k|    IGRAPH_CHECK(igraph_attribute_record_set_name(attr, name));
  ------------------
  |  |  656|  2.46k|    do { \
  |  |  657|  2.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.46k]
  |  |  ------------------
  ------------------
  133|  2.46k|    IGRAPH_FINALLY(igraph_free, attr->name);
  ------------------
  |  |  603|  2.46k|    do { \
  |  |  604|  2.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.46k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.46k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.46k]
  |  |  ------------------
  |  |  608|  2.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.46k]
  |  |  ------------------
  ------------------
  134|  2.46k|    IGRAPH_CHECK(igraph_attribute_record_set_type(attr, type));
  ------------------
  |  |  656|  2.46k|    do { \
  |  |  657|  2.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.46k]
  |  |  ------------------
  ------------------
  135|  2.46k|    IGRAPH_FINALLY_CLEAN(1);
  136|       |
  137|  2.46k|    return IGRAPH_SUCCESS;
  138|  2.46k|}
igraph_attribute_record_destroy:
  241|  2.46k|void igraph_attribute_record_destroy(igraph_attribute_record_t *attr) {
  242|  2.46k|    igraph_i_attribute_record_destroy_values(attr);
  243|       |
  244|  2.46k|    if (attr->name) {
  ------------------
  |  Branch (244:9): [True: 2.46k, False: 0]
  ------------------
  245|  2.46k|        igraph_free(attr->name);
  246|       |        attr->name = NULL;
  247|  2.46k|    }
  248|  2.46k|}
igraph_attribute_record_check_type:
  264|    822|) {
  265|    822|    if (type != attr->type) {
  ------------------
  |  Branch (265:9): [True: 0, False: 822]
  ------------------
  266|      0|        switch (type) {
  267|      0|            case IGRAPH_ATTRIBUTE_STRING:
  ------------------
  |  Branch (267:13): [True: 0, False: 0]
  ------------------
  268|      0|                IGRAPH_ERROR("String attribute expected.", 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]
  |  |  ------------------
  ------------------
  269|      0|                break;
  270|      0|            case IGRAPH_ATTRIBUTE_NUMERIC:
  ------------------
  |  Branch (270:13): [True: 0, False: 0]
  ------------------
  271|      0|                IGRAPH_ERROR("Numeric attribute expected.", 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]
  |  |  ------------------
  ------------------
  272|      0|                break;
  273|      0|            case IGRAPH_ATTRIBUTE_BOOLEAN:
  ------------------
  |  Branch (273:13): [True: 0, False: 0]
  ------------------
  274|      0|                IGRAPH_ERROR("Boolean attribute expected.", 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]
  |  |  ------------------
  ------------------
  275|      0|                break;
  276|      0|            case IGRAPH_ATTRIBUTE_OBJECT:
  ------------------
  |  Branch (276:13): [True: 0, False: 0]
  ------------------
  277|      0|                IGRAPH_ERROR("Object attribute expected.", 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]
  |  |  ------------------
  ------------------
  278|      0|                break;
  279|      0|            default:
  ------------------
  |  Branch (279:13): [True: 0, False: 0]
  ------------------
  280|      0|                IGRAPH_ERROR("Attribute with unknown type expected.", 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]
  |  |  ------------------
  ------------------
  281|      0|                break;
  282|      0|        }
  283|      0|    }
  284|       |
  285|    822|    return IGRAPH_SUCCESS;
  286|    822|}
igraph_attribute_record_size:
  295|    777|igraph_int_t igraph_attribute_record_size(const igraph_attribute_record_t *attr) {
  296|    777|    IGRAPH_ASSERT(attr != NULL);
  ------------------
  |  |  924|    777|    do { \
  |  |  925|    777|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|    777|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 777]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|    777|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 777]
  |  |  ------------------
  ------------------
  297|       |
  298|    777|    switch (attr->type) {
  299|    777|        case IGRAPH_ATTRIBUTE_NUMERIC:
  ------------------
  |  Branch (299:9): [True: 777, False: 0]
  ------------------
  300|    777|            return igraph_vector_size(attr->value.as_vector);
  301|       |
  302|      0|        case IGRAPH_ATTRIBUTE_STRING:
  ------------------
  |  Branch (302:9): [True: 0, False: 777]
  ------------------
  303|      0|            return igraph_strvector_size(attr->value.as_strvector);
  304|       |
  305|      0|        case IGRAPH_ATTRIBUTE_BOOLEAN:
  ------------------
  |  Branch (305:9): [True: 0, False: 777]
  ------------------
  306|      0|            return igraph_vector_bool_size(attr->value.as_vector_bool);
  307|       |
  308|      0|        case IGRAPH_ATTRIBUTE_UNSPECIFIED:
  ------------------
  |  Branch (308:9): [True: 0, False: 777]
  ------------------
  309|      0|            return 0;
  310|       |
  311|      0|        default:
  ------------------
  |  Branch (311:9): [True: 0, False: 777]
  ------------------
  312|      0|            IGRAPH_FATALF("Unsupported attribute type: %d.", (int) attr->type);
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  313|    777|    }
  314|    777|}
igraph_attribute_record_resize:
  332|  2.42k|) {
  333|  2.42k|    igraph_int_t i;
  334|  2.42k|    igraph_vector_t *vec;
  335|  2.42k|    igraph_vector_bool_t *log;
  336|  2.42k|    igraph_strvector_t *str;
  337|       |
  338|  2.42k|    IGRAPH_ASSERT(attr != NULL);
  ------------------
  |  |  924|  2.42k|    do { \
  |  |  925|  2.42k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.42k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.42k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.42k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.42k]
  |  |  ------------------
  ------------------
  339|       |
  340|  2.42k|    switch (attr->type) {
  341|       |
  342|  2.42k|        case IGRAPH_ATTRIBUTE_NUMERIC:
  ------------------
  |  Branch (342:9): [True: 2.42k, False: 0]
  ------------------
  343|  2.42k|            vec = attr->value.as_vector;
  344|  2.42k|            i = igraph_vector_size(vec);
  345|  2.42k|            IGRAPH_CHECK(igraph_vector_resize(vec, new_size));
  ------------------
  |  |  656|  2.42k|    do { \
  |  |  657|  2.42k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.42k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.42k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.42k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.42k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.42k]
  |  |  ------------------
  ------------------
  346|  39.2k|            while (i < new_size) {
  ------------------
  |  Branch (346:20): [True: 36.7k, False: 2.42k]
  ------------------
  347|  36.7k|                VECTOR(*vec)[i++] = attr->default_value.numeric;
  ------------------
  |  |   60|  36.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  348|  36.7k|            }
  349|  2.42k|            break;
  350|       |
  351|      0|        case IGRAPH_ATTRIBUTE_BOOLEAN:
  ------------------
  |  Branch (351:9): [True: 0, False: 2.42k]
  ------------------
  352|      0|            log = attr->value.as_vector_bool;
  353|      0|            i = igraph_vector_bool_size(log);
  354|      0|            IGRAPH_CHECK(igraph_vector_bool_resize(log, new_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]
  |  |  ------------------
  ------------------
  355|      0|            while (i < new_size) {
  ------------------
  |  Branch (355:20): [True: 0, False: 0]
  ------------------
  356|      0|                VECTOR(*log)[i++] = attr->default_value.boolean;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  357|      0|            }
  358|      0|            break;
  359|       |
  360|      0|        case IGRAPH_ATTRIBUTE_STRING:
  ------------------
  |  Branch (360:9): [True: 0, False: 2.42k]
  ------------------
  361|      0|            str = attr->value.as_strvector;
  362|      0|            if (attr->default_value.string == 0 || (*attr->default_value.string == 0)) {
  ------------------
  |  Branch (362:17): [True: 0, False: 0]
  |  Branch (362:52): [True: 0, False: 0]
  ------------------
  363|      0|                IGRAPH_CHECK(igraph_strvector_resize(str, new_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]
  |  |  ------------------
  ------------------
  364|      0|            } else {
  365|      0|                i = igraph_strvector_size(str);
  366|      0|                IGRAPH_CHECK(igraph_strvector_resize(str, new_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]
  |  |  ------------------
  ------------------
  367|      0|                while (i < new_size) {
  ------------------
  |  Branch (367:24): [True: 0, False: 0]
  ------------------
  368|      0|                    IGRAPH_CHECK(igraph_strvector_set(str, i++, attr->default_value.string));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  369|      0|                }
  370|      0|            }
  371|      0|            break;
  372|       |
  373|      0|        case IGRAPH_ATTRIBUTE_UNSPECIFIED:
  ------------------
  |  Branch (373:9): [True: 0, False: 2.42k]
  ------------------
  374|      0|            IGRAPH_ERROR("Attribute record has no type yet.", 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]
  |  |  ------------------
  ------------------
  375|      0|            break;
  376|       |
  377|      0|        default:
  ------------------
  |  Branch (377:9): [True: 0, False: 2.42k]
  ------------------
  378|      0|            IGRAPH_ERRORF("Unsupported attribute type: %d.", IGRAPH_EINVAL, (int) attr->type);
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  379|  2.42k|    }
  380|       |
  381|  2.42k|    return IGRAPH_SUCCESS;
  382|  2.42k|}
igraph_attribute_record_set_default_numeric:
  399|  2.46k|) {
  400|  2.46k|    if (attr->type != IGRAPH_ATTRIBUTE_NUMERIC) {
  ------------------
  |  Branch (400:9): [True: 0, False: 2.46k]
  ------------------
  401|      0|        return IGRAPH_EINVAL;
  402|      0|    }
  403|       |
  404|  2.46k|    attr->default_value.numeric = value;
  405|  2.46k|    return IGRAPH_SUCCESS;
  406|  2.46k|}
igraph_attribute_record_set_name:
  483|  3.28k|) {
  484|  3.28k|    char *new_name;
  485|       |
  486|  3.28k|    IGRAPH_ASSERT(attr != NULL);
  ------------------
  |  |  924|  3.28k|    do { \
  |  |  925|  3.28k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  3.28k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.28k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  3.28k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 3.28k]
  |  |  ------------------
  ------------------
  487|       |
  488|  3.28k|    if (name != NULL) {
  ------------------
  |  Branch (488:9): [True: 2.46k, False: 822]
  ------------------
  489|  2.46k|        new_name = strdup(name);
  490|  2.46k|        IGRAPH_CHECK_OOM(new_name, "Insufficient memory for allocating attribute name.");
  ------------------
  |  |  709|  2.46k|    do { \
  |  |  710|  2.46k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  2.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 2.46k]
  |  |  ------------------
  ------------------
  491|  2.46k|    } else {
  492|    822|        new_name = NULL;
  493|    822|    }
  494|       |
  495|  3.28k|    if (attr->name) {
  ------------------
  |  Branch (495:9): [True: 0, False: 3.28k]
  ------------------
  496|      0|        igraph_free(attr->name);
  497|      0|    }
  498|       |
  499|  3.28k|    attr->name = new_name;
  500|       |
  501|  3.28k|    return IGRAPH_SUCCESS;
  502|  3.28k|}
igraph_attribute_record_set_type:
  539|  3.28k|) {
  540|  3.28k|    void *ptr;
  541|       |
  542|  3.28k|    IGRAPH_ASSERT(attr != NULL);
  ------------------
  |  |  924|  3.28k|    do { \
  |  |  925|  3.28k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  3.28k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.28k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  3.28k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 3.28k]
  |  |  ------------------
  ------------------
  543|       |
  544|  3.28k|    if (attr->type != type) {
  ------------------
  |  Branch (544:9): [True: 2.46k, False: 822]
  ------------------
  545|  2.46k|        switch (type) {
  546|  2.46k|            case IGRAPH_ATTRIBUTE_NUMERIC: {
  ------------------
  |  Branch (546:13): [True: 2.46k, False: 0]
  ------------------
  547|  2.46k|                igraph_vector_t *vec = IGRAPH_CALLOC(1, igraph_vector_t);
  ------------------
  |  |   33|  2.46k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  4.93k|    (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.46k, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  548|  2.46k|                IGRAPH_CHECK_OOM(vec, "Insufficient memory for attribute record.");
  ------------------
  |  |  709|  2.46k|    do { \
  |  |  710|  2.46k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  2.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 2.46k]
  |  |  ------------------
  ------------------
  549|  2.46k|                IGRAPH_FINALLY(igraph_free, vec);
  ------------------
  |  |  603|  2.46k|    do { \
  |  |  604|  2.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.46k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.46k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.46k]
  |  |  ------------------
  |  |  608|  2.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.46k]
  |  |  ------------------
  ------------------
  550|  2.46k|                IGRAPH_VECTOR_INIT_FINALLY(vec, 0);
  ------------------
  |  |  104|  2.46k|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.46k|    do { \
  |  |  |  |  657|  2.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  2.46k|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.46k|    do { \
  |  |  |  |  604|  2.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.46k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.46k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.46k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (105:60): [Folded, False: 2.46k]
  |  |  ------------------
  ------------------
  551|  2.46k|                ptr = vec;
  552|  2.46k|            }
  553|      0|            break;
  554|       |
  555|      0|            case IGRAPH_ATTRIBUTE_STRING: {
  ------------------
  |  Branch (555:13): [True: 0, False: 2.46k]
  ------------------
  556|      0|                igraph_strvector_t *strvec = IGRAPH_CALLOC(1, igraph_strvector_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]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  557|      0|                IGRAPH_CHECK_OOM(strvec, "Insufficient memory for attribute record.");
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  558|      0|                IGRAPH_FINALLY(igraph_free, strvec);
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  559|      0|                IGRAPH_STRVECTOR_INIT_FINALLY(strvec, 0);
  ------------------
  |  |   62|      0|    do { IGRAPH_CHECK(igraph_strvector_init(sv, 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]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   63|      0|        IGRAPH_FINALLY( igraph_strvector_destroy, sv); } 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 (63:65): [Folded, False: 0]
  |  |  ------------------
  ------------------
  560|      0|                ptr = strvec;
  561|      0|            }
  562|      0|            break;
  563|       |
  564|      0|            case IGRAPH_ATTRIBUTE_BOOLEAN: {
  ------------------
  |  Branch (564:13): [True: 0, False: 2.46k]
  ------------------
  565|      0|                igraph_vector_bool_t *boolvec = IGRAPH_CALLOC(1, igraph_vector_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, Folded]
  |  |  |  |  |  Branch (31:24): [True: 0, Folded]
  |  |  |  |  |  Branch (31:66): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  566|      0|                IGRAPH_CHECK_OOM(boolvec, "Insufficient memory for attribute record.");
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  567|      0|                IGRAPH_FINALLY(igraph_free, boolvec);
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  568|      0|                IGRAPH_VECTOR_BOOL_INIT_FINALLY(boolvec, 0);
  ------------------
  |  |  109|      0|    do { IGRAPH_CHECK(igraph_vector_bool_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]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  110|      0|        IGRAPH_FINALLY(igraph_vector_bool_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 (110:65): [Folded, False: 0]
  |  |  ------------------
  ------------------
  569|      0|                ptr = boolvec;
  570|      0|            }
  571|      0|            break;
  572|       |
  573|      0|            default:
  ------------------
  |  Branch (573:13): [True: 0, False: 2.46k]
  ------------------
  574|      0|                IGRAPH_FATALF("Unsupported attribute type: %d.", (int) type);
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  575|  2.46k|        }
  576|       |
  577|  2.46k|        igraph_i_attribute_record_set_type(attr, type, ptr);
  578|  2.46k|        IGRAPH_FINALLY_CLEAN(2);
  579|  2.46k|    }
  580|       |
  581|  3.28k|    return IGRAPH_SUCCESS;
  582|  3.28k|}
igraph_i_attribute_init:
  617|  2.49k|) {
  618|  2.49k|    graph->attr = NULL;
  619|  2.49k|    if (igraph_i_attribute_table) {
  ------------------
  |  Branch (619:9): [True: 2.49k, False: 0]
  ------------------
  620|  2.49k|        IGRAPH_CHECK(igraph_i_attribute_table->init(graph, attr));
  ------------------
  |  |  656|  2.49k|    do { \
  |  |  657|  2.49k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.49k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.49k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.49k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.49k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.49k]
  |  |  ------------------
  ------------------
  621|  2.49k|        if (graph->attr == NULL) {
  ------------------
  |  Branch (621:13): [True: 0, False: 2.49k]
  ------------------
  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|  2.49k|    }
  625|  2.49k|    return IGRAPH_SUCCESS;
  626|  2.49k|}
igraph_i_attribute_destroy:
  628|  4.14k|void igraph_i_attribute_destroy(igraph_t *graph) {
  629|  4.14k|    if (graph->attr && igraph_i_attribute_table) {
  ------------------
  |  Branch (629:9): [True: 4.14k, False: 0]
  |  Branch (629:24): [True: 4.14k, False: 0]
  ------------------
  630|  4.14k|        igraph_i_attribute_table->destroy(graph);
  631|  4.14k|    }
  632|       |    graph->attr = NULL;
  633|  4.14k|}
igraph_i_attribute_copy:
  636|  1.64k|                            igraph_bool_t va, igraph_bool_t ea) {
  637|  1.64k|    igraph_i_attribute_destroy(to);
  638|  1.64k|    if (from->attr && igraph_i_attribute_table) {
  ------------------
  |  Branch (638:9): [True: 1.64k, False: 0]
  |  Branch (638:23): [True: 1.64k, False: 0]
  ------------------
  639|  1.64k|        IGRAPH_CHECK(igraph_i_attribute_table->copy(to, from, ga, va, ea));
  ------------------
  |  |  656|  1.64k|    do { \
  |  |  657|  1.64k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.64k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  640|  1.64k|        if (to->attr == NULL) {
  ------------------
  |  Branch (640:13): [True: 0, False: 1.64k]
  ------------------
  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|  1.64k|    }
  644|  1.64k|    return IGRAPH_SUCCESS;
  645|  1.64k|}
igraph_i_attribute_add_vertices:
  649|  3.12k|) {
  650|  3.12k|    if (igraph_i_attribute_table) {
  ------------------
  |  Branch (650:9): [True: 3.12k, False: 0]
  ------------------
  651|  3.12k|        return igraph_i_attribute_table->add_vertices(graph, nv, attr);
  652|  3.12k|    } else {
  653|      0|        return IGRAPH_SUCCESS;
  654|      0|    }
  655|  3.12k|}
igraph_i_attribute_add_edges:
  690|  2.33k|) {
  691|  2.33k|    if (igraph_i_attribute_table) {
  ------------------
  |  Branch (691:9): [True: 2.33k, False: 0]
  ------------------
  692|  2.33k|        return igraph_i_attribute_table->add_edges(graph, edges, attr);
  693|  2.33k|    } else {
  694|      0|        return IGRAPH_SUCCESS;
  695|      0|    }
  696|  2.33k|}
igraph_i_attribute_combine_edges:
  714|  1.64k|                                     const igraph_attribute_combination_t *comb) {
  715|       |    /* It is assumed that the two graphs are not the same and that the new
  716|       |     * graph has no eedge attributes yet. We cannot assert the latter but we
  717|       |     * can assert the former */
  718|  1.64k|    IGRAPH_ASSERT(graph != newgraph);
  ------------------
  |  |  924|  1.64k|    do { \
  |  |  925|  1.64k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  719|  1.64k|    if (igraph_i_attribute_table) {
  ------------------
  |  Branch (719:9): [True: 1.64k, False: 0]
  ------------------
  720|  1.64k|        return igraph_i_attribute_table->combine_edges(graph, newgraph,
  721|  1.64k|                merges,
  722|  1.64k|                comb);
  723|  1.64k|    } else {
  724|      0|        return IGRAPH_SUCCESS;
  725|      0|    }
  726|  1.64k|}
igraph_set_attribute_table:
  895|    852|igraph_set_attribute_table(const igraph_attribute_table_t * table) {
  896|    852|    igraph_attribute_table_t *old = igraph_i_attribute_table;
  897|    852|    igraph_i_attribute_table = (igraph_attribute_table_t*) table;
  898|    852|    return old;
  899|    852|}
igraph_has_attribute_table:
  901|  1.64k|igraph_bool_t igraph_has_attribute_table(void) {
  902|       |    return igraph_i_attribute_table != NULL;
  903|  1.64k|}
igraph_attribute_combination_init:
  915|    822|igraph_error_t igraph_attribute_combination_init(igraph_attribute_combination_t *comb) {
  916|    822|    IGRAPH_CHECK(igraph_vector_ptr_init(&comb->list, 0));
  ------------------
  |  |  656|    822|    do { \
  |  |  657|    822|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    822|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
  917|    822|    return IGRAPH_SUCCESS;
  918|    822|}
igraph_attribute_combination_destroy:
  929|    822|void igraph_attribute_combination_destroy(igraph_attribute_combination_t *comb) {
  930|    822|    igraph_int_t i, n = igraph_vector_ptr_size(&comb->list);
  931|  1.64k|    for (i = 0; i < n; i++) {
  ------------------
  |  Branch (931:17): [True: 822, False: 822]
  ------------------
  932|    822|        igraph_attribute_combination_record_t *rec = VECTOR(comb->list)[i];
  ------------------
  |  |   60|    822|#define VECTOR(v) ((v).stor_begin)
  ------------------
  933|    822|        if (rec->name) {
  ------------------
  |  Branch (933:13): [True: 822, False: 0]
  ------------------
  934|    822|            IGRAPH_FREE(rec->name);
  ------------------
  |  |   36|    822|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  935|    822|        }
  936|       |        IGRAPH_FREE(rec);
  ------------------
  |  |   36|    822|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  937|    822|    }
  938|    822|    igraph_vector_ptr_destroy(&comb->list);
  939|    822|}
igraph_attribute_combination_add:
  968|    822|                                     igraph_function_pointer_t func) {
  969|    822|    igraph_int_t i, n = igraph_vector_ptr_size(&comb->list);
  970|       |
  971|       |    /* Search, in case it is already there */
  972|    822|    for (i = 0; i < n; i++) {
  ------------------
  |  Branch (972:17): [True: 0, False: 822]
  ------------------
  973|      0|        igraph_attribute_combination_record_t *r = VECTOR(comb->list)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  974|      0|        const char *n = r->name;
  975|      0|        if ( (!name && !n) ||
  ------------------
  |  Branch (975:15): [True: 0, False: 0]
  |  Branch (975:24): [True: 0, False: 0]
  ------------------
  976|      0|             (name && n && !strcmp(n, name)) ) {
  ------------------
  |  Branch (976:15): [True: 0, False: 0]
  |  Branch (976:23): [True: 0, False: 0]
  |  Branch (976:28): [True: 0, False: 0]
  ------------------
  977|      0|            r->type = type;
  978|      0|            r->func = func;
  979|      0|            break;
  980|      0|        }
  981|      0|    }
  982|       |
  983|    822|    if (i == n) {
  ------------------
  |  Branch (983:9): [True: 822, False: 0]
  ------------------
  984|       |        /* This is a new attribute name */
  985|    822|        igraph_attribute_combination_record_t *rec =
  986|    822|            IGRAPH_CALLOC(1, igraph_attribute_combination_record_t);
  ------------------
  |  |   33|    822|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  1.64k|    (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: 822, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  987|    822|        if (! rec) {
  ------------------
  |  Branch (987:13): [True: 0, False: 822]
  ------------------
  988|      0|            IGRAPH_ERROR("Cannot create attribute combination data.",
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  989|      0|                         IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */
  990|      0|        }
  991|    822|        IGRAPH_FINALLY(igraph_free, rec);
  ------------------
  |  |  603|    822|    do { \
  |  |  604|    822|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    822|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    822|         * incorrect destructor function with the pointer */ \
  |  |  607|    822|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 822]
  |  |  ------------------
  |  |  608|    822|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
  992|    822|        if (! name) {
  ------------------
  |  Branch (992:13): [True: 0, False: 822]
  ------------------
  993|      0|            rec->name = NULL;
  994|    822|        } else {
  995|    822|            rec->name = strdup(name);
  996|    822|            if (! rec->name) {
  ------------------
  |  Branch (996:17): [True: 0, False: 822]
  ------------------
  997|      0|                IGRAPH_ERROR("Cannot create attribute combination data.",
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  998|      0|                             IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */
  999|      0|            }
 1000|    822|        }
 1001|    822|        IGRAPH_FINALLY(igraph_free, (char *) rec->name); /* free() is safe on NULL */
  ------------------
  |  |  603|    822|    do { \
  |  |  604|    822|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    822|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    822|         * incorrect destructor function with the pointer */ \
  |  |  607|    822|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 822]
  |  |  ------------------
  |  |  608|    822|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
 1002|    822|        rec->type = type;
 1003|    822|        rec->func = func;
 1004|       |
 1005|    822|        IGRAPH_CHECK(igraph_vector_ptr_push_back(&comb->list, rec));
  ------------------
  |  |  656|    822|    do { \
  |  |  657|    822|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    822|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
 1006|    822|        IGRAPH_FINALLY_CLEAN(2); /* ownership of 'rec' transferred to 'comb->list' */
 1007|       |
 1008|    822|    }
 1009|       |
 1010|    822|    return IGRAPH_SUCCESS;
 1011|    822|}
igraph_attribute_combination_query:
 1058|  1.64k|                                       igraph_function_pointer_t *func) {
 1059|  1.64k|    igraph_int_t i, def = -1, len = igraph_vector_ptr_size(&comb->list);
 1060|       |
 1061|  1.64k|    for (i = 0; i < len; i++) {
  ------------------
  |  Branch (1061:17): [True: 1.64k, False: 0]
  ------------------
 1062|  1.64k|        igraph_attribute_combination_record_t *rec = VECTOR(comb->list)[i];
  ------------------
  |  |   60|  1.64k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1063|  1.64k|        const char *n = rec->name;
 1064|  1.64k|        if ( (!name && !n) ||
  ------------------
  |  Branch (1064:15): [True: 0, False: 1.64k]
  |  Branch (1064:24): [True: 0, False: 0]
  ------------------
 1065|  1.64k|             (name && n && !strcmp(n, name)) ) {
  ------------------
  |  Branch (1065:15): [True: 1.64k, False: 0]
  |  Branch (1065:23): [True: 1.64k, False: 0]
  |  Branch (1065:28): [True: 1.64k, False: 0]
  ------------------
 1066|  1.64k|            *type = rec->type;
 1067|  1.64k|            *func = rec->func;
 1068|  1.64k|            return IGRAPH_SUCCESS;
 1069|  1.64k|        }
 1070|      0|        if (!n) {
  ------------------
  |  Branch (1070:13): [True: 0, False: 0]
  ------------------
 1071|      0|            def = i;
 1072|      0|        }
 1073|      0|    }
 1074|       |
 1075|      0|    if (def == -1) {
  ------------------
  |  Branch (1075:9): [True: 0, False: 0]
  ------------------
 1076|       |        /* Did not find anything */
 1077|      0|        *type = IGRAPH_ATTRIBUTE_COMBINE_DEFAULT;
 1078|      0|        *func = 0;
 1079|      0|    } else {
 1080|      0|        igraph_attribute_combination_record_t *rec = VECTOR(comb->list)[def];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1081|      0|        *type = rec->type;
 1082|      0|        *func = rec->func;
 1083|      0|    }
 1084|       |
 1085|      0|    return IGRAPH_SUCCESS;
 1086|  1.64k|}
igraph_attribute_combination:
 1111|    822|        igraph_attribute_combination_t *comb, ...) {
 1112|       |
 1113|    822|    va_list ap;
 1114|       |
 1115|    822|    IGRAPH_CHECK(igraph_attribute_combination_init(comb));
  ------------------
  |  |  656|    822|    do { \
  |  |  657|    822|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    822|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
 1116|       |
 1117|    822|    va_start(ap, comb);
 1118|  1.64k|    while (true) {
  ------------------
  |  Branch (1118:12): [True: 1.64k, Folded]
  ------------------
 1119|  1.64k|        igraph_function_pointer_t func = NULL;
 1120|  1.64k|        igraph_attribute_combination_type_t type;
 1121|  1.64k|        const char *name;
 1122|       |
 1123|  1.64k|        name = va_arg(ap, const char *);
 1124|       |
 1125|  1.64k|        if (name == IGRAPH_NO_MORE_ATTRIBUTES) {
  ------------------
  |  |  214|  1.64k|#define IGRAPH_NO_MORE_ATTRIBUTES ((const char*)0)
  ------------------
  |  Branch (1125:13): [True: 822, False: 822]
  ------------------
 1126|    822|            break;
 1127|    822|        }
 1128|       |
 1129|    822|        type = (igraph_attribute_combination_type_t) va_arg(ap, int);
 1130|    822|        if (type == IGRAPH_ATTRIBUTE_COMBINE_FUNCTION) {
  ------------------
  |  Branch (1130:13): [True: 0, False: 822]
  ------------------
 1131|      0|            func = va_arg(ap, igraph_function_pointer_t);
 1132|      0|        }
 1133|       |
 1134|    822|        if (strlen(name) == 0) {
  ------------------
  |  Branch (1134:13): [True: 0, False: 822]
  ------------------
 1135|      0|            name = 0;
 1136|      0|        }
 1137|       |
 1138|    822|        igraph_error_t ret = igraph_attribute_combination_add(comb, name, type, func);
 1139|    822|        if (ret != IGRAPH_SUCCESS) {
  ------------------
  |  Branch (1139:13): [True: 0, False: 822]
  ------------------
 1140|      0|            va_end(ap);
 1141|      0|            return ret;
 1142|      0|        }
 1143|    822|    }
 1144|       |
 1145|    822|    va_end(ap);
 1146|       |
 1147|    822|    return IGRAPH_SUCCESS;
 1148|    822|}
attributes.c:igraph_i_attribute_record_destroy_values:
  185|  4.93k|static void igraph_i_attribute_record_destroy_values(igraph_attribute_record_t *attr) {
  186|  4.93k|    IGRAPH_ASSERT(attr != NULL);
  ------------------
  |  |  924|  4.93k|    do { \
  |  |  925|  4.93k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.93k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.93k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.93k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.93k]
  |  |  ------------------
  ------------------
  187|       |
  188|  4.93k|    if (attr->value.as_raw) {
  ------------------
  |  Branch (188:9): [True: 2.46k, False: 2.46k]
  ------------------
  189|  2.46k|        switch (attr->type) {
  190|  2.46k|            case IGRAPH_ATTRIBUTE_NUMERIC:
  ------------------
  |  Branch (190:13): [True: 2.46k, False: 0]
  ------------------
  191|  2.46k|                igraph_vector_destroy(attr->value.as_vector);
  192|  2.46k|                break;
  193|       |
  194|      0|            case IGRAPH_ATTRIBUTE_STRING:
  ------------------
  |  Branch (194:13): [True: 0, False: 2.46k]
  ------------------
  195|      0|                igraph_strvector_destroy(attr->value.as_strvector);
  196|      0|                break;
  197|       |
  198|      0|            case IGRAPH_ATTRIBUTE_BOOLEAN:
  ------------------
  |  Branch (198:13): [True: 0, False: 2.46k]
  ------------------
  199|      0|                igraph_vector_bool_destroy(attr->value.as_vector_bool);
  200|      0|                break;
  201|       |
  202|      0|            default:
  ------------------
  |  Branch (202:13): [True: 0, False: 2.46k]
  ------------------
  203|      0|                break;
  204|  2.46k|        }
  205|       |
  206|  2.46k|        igraph_free(attr->value.as_raw);
  207|  2.46k|        attr->value.as_raw = NULL;
  208|  2.46k|    }
  209|       |
  210|  4.93k|    switch (attr->type) {
  211|  2.46k|        case IGRAPH_ATTRIBUTE_NUMERIC:
  ------------------
  |  Branch (211:9): [True: 2.46k, False: 2.46k]
  ------------------
  212|  2.46k|            attr->default_value.numeric = 0;
  213|  2.46k|            break;
  214|       |
  215|      0|        case IGRAPH_ATTRIBUTE_STRING:
  ------------------
  |  Branch (215:9): [True: 0, False: 4.93k]
  ------------------
  216|      0|            if (attr->default_value.string) {
  ------------------
  |  Branch (216:17): [True: 0, False: 0]
  ------------------
  217|      0|                igraph_free(attr->default_value.string);
  218|      0|                attr->default_value.string = NULL;
  219|      0|            }
  220|      0|            break;
  221|       |
  222|      0|        case IGRAPH_ATTRIBUTE_BOOLEAN:
  ------------------
  |  Branch (222:9): [True: 0, False: 4.93k]
  ------------------
  223|      0|            attr->default_value.boolean = 0;
  224|      0|            break;
  225|       |
  226|  2.46k|        default:
  ------------------
  |  Branch (226:9): [True: 2.46k, False: 2.46k]
  ------------------
  227|  2.46k|            break;
  228|  4.93k|    }
  229|       |
  230|  4.93k|    attr->type = IGRAPH_ATTRIBUTE_UNSPECIFIED;
  231|  4.93k|}
attributes.c:igraph_i_attribute_record_set_type:
  506|  2.46k|) {
  507|  2.46k|    bool type_changed = attr->type != type;
  508|       |
  509|  2.46k|    if (type_changed || attr->value.as_raw != ptr) {
  ------------------
  |  Branch (509:9): [True: 2.46k, False: 0]
  |  Branch (509:25): [True: 0, False: 0]
  ------------------
  510|  2.46k|        igraph_i_attribute_record_destroy_values(attr);
  511|  2.46k|        attr->type = type;
  512|  2.46k|        attr->value.as_raw = ptr;
  513|  2.46k|    }
  514|       |
  515|  2.46k|    if (type_changed && type == IGRAPH_ATTRIBUTE_NUMERIC) {
  ------------------
  |  Branch (515:9): [True: 2.46k, False: 0]
  |  Branch (515:25): [True: 2.46k, False: 0]
  ------------------
  516|  2.46k|        IGRAPH_ASSERT(
  ------------------
  |  |  924|  2.46k|    do { \
  |  |  925|  2.46k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.46k]
  |  |  ------------------
  ------------------
  517|  2.46k|            igraph_attribute_record_set_default_numeric(attr, IGRAPH_NAN) == IGRAPH_SUCCESS
  518|  2.46k|        );
  519|  2.46k|    }
  520|  2.46k|}
attributes.c:igraph_i_attribute_record_list_init_item:
  596|    822|) {
  597|    822|    IGRAPH_UNUSED(list);
  ------------------
  |  |   30|    822|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
  598|       |    return igraph_attribute_record_init(item, NULL, IGRAPH_ATTRIBUTE_UNSPECIFIED);
  599|    822|}
attributes.c:igraph_i_attribute_record_list_destroy_item:
  607|  2.46k|static void igraph_i_attribute_record_list_destroy_item(igraph_attribute_record_t* item) {
  608|  2.46k|    igraph_attribute_record_destroy(item);
  609|  2.46k|}

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

igraph_cattribute_EANV:
 2223|    822|                           igraph_es_t eids, igraph_vector_t *result) {
 2224|    822|    igraph_vector_clear(result);
 2225|    822|    return igraph_i_cattribute_get_numeric_edge_attr(graph, name, eids, result);
 2226|    822|}
igraph_cattribute_EAN_setv:
 2731|    822|                               const igraph_vector_t *v) {
 2732|    822|    igraph_i_cattributes_t *attr = graph->attr;
 2733|    822|    igraph_attribute_record_t *rec;
 2734|    822|    igraph_int_t ne = igraph_ecount(graph);
 2735|       |
 2736|       |    /* Check length first */
 2737|    822|    if (igraph_vector_size(v) != ne) {
  ------------------
  |  Branch (2737:9): [True: 0, False: 822]
  ------------------
 2738|      0|        IGRAPH_ERROR("Invalid edge attribute 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]
  |  |  ------------------
  ------------------
 2739|      0|    }
 2740|       |
 2741|    822|    IGRAPH_CHECK(igraph_i_cattribute_find_or_create(&attr->eal, name, IGRAPH_ATTRIBUTE_NUMERIC, ne, &rec));
  ------------------
  |  |  656|    822|    do { \
  |  |  657|    822|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    822|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
 2742|    822|    IGRAPH_CHECK(igraph_vector_update(rec->value.as_vector, v));
  ------------------
  |  |  656|    822|    do { \
  |  |  657|    822|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    822|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
 2743|       |
 2744|    822|    return IGRAPH_SUCCESS;
 2745|    822|}
igraph_cattribute_remove_e:
 2867|    822|void igraph_cattribute_remove_e(igraph_t *graph, const char *name) {
 2868|       |
 2869|    822|    igraph_i_cattributes_t *attr = graph->attr;
 2870|    822|    igraph_attribute_record_list_t *eal = &attr->eal;
 2871|    822|    igraph_int_t j = igraph_i_cattribute_find_index(eal, name);
 2872|       |
 2873|    822|    if (j >= 0) {
  ------------------
  |  Branch (2873:9): [True: 822, False: 0]
  ------------------
 2874|    822|        igraph_attribute_record_list_discard(eal, j);
 2875|    822|    } else {
 2876|      0|        IGRAPH_WARNING("Cannot remove non-existent edge attribute.");
  ------------------
  |  |  797|      0|    do { \
  |  |  798|      0|        igraph_warning(reason, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  799|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (799:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2877|      0|    }
 2878|    822|}
cattributes.c:igraph_i_cattribute_init:
  195|  2.49k|) {
  196|  2.49k|    igraph_i_cattributes_t *nattr;
  197|       |
  198|  2.49k|    nattr = IGRAPH_CALLOC(1, igraph_i_cattributes_t);
  ------------------
  |  |   33|  2.49k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  4.99k|    (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.49k, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  199|  2.49k|    IGRAPH_CHECK_OOM(nattr, "Insufficient memory to allocate attribute storage.");
  ------------------
  |  |  709|  2.49k|    do { \
  |  |  710|  2.49k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  2.49k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.49k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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.49k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 2.49k]
  |  |  ------------------
  ------------------
  200|  2.49k|    IGRAPH_FINALLY(igraph_free, nattr);
  ------------------
  |  |  603|  2.49k|    do { \
  |  |  604|  2.49k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.49k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.49k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.49k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.49k]
  |  |  ------------------
  |  |  608|  2.49k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.49k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.49k]
  |  |  ------------------
  ------------------
  201|       |
  202|  2.49k|    if (attr) {
  ------------------
  |  Branch (202:9): [True: 0, False: 2.49k]
  ------------------
  203|      0|        IGRAPH_CHECK(igraph_attribute_record_list_init_copy(&nattr->gal, 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]
  |  |  ------------------
  ------------------
  204|  2.49k|    } else {
  205|  2.49k|        IGRAPH_CHECK(igraph_attribute_record_list_init(&nattr->gal, 0));
  ------------------
  |  |  656|  2.49k|    do { \
  |  |  657|  2.49k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.49k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.49k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.49k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.49k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.49k]
  |  |  ------------------
  ------------------
  206|  2.49k|    }
  207|  2.49k|    IGRAPH_FINALLY(igraph_attribute_record_list_destroy, &nattr->gal);
  ------------------
  |  |  603|  2.49k|    do { \
  |  |  604|  2.49k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.49k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.49k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.49k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.49k]
  |  |  ------------------
  |  |  608|  2.49k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.49k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.49k]
  |  |  ------------------
  ------------------
  208|       |
  209|  2.49k|    IGRAPH_CHECK(igraph_attribute_record_list_init(&nattr->val, 0));
  ------------------
  |  |  656|  2.49k|    do { \
  |  |  657|  2.49k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.49k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.49k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.49k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.49k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.49k]
  |  |  ------------------
  ------------------
  210|  2.49k|    IGRAPH_FINALLY(igraph_attribute_record_list_destroy, &nattr->val);
  ------------------
  |  |  603|  2.49k|    do { \
  |  |  604|  2.49k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.49k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.49k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.49k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.49k]
  |  |  ------------------
  |  |  608|  2.49k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.49k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.49k]
  |  |  ------------------
  ------------------
  211|       |
  212|  2.49k|    IGRAPH_CHECK(igraph_attribute_record_list_init(&nattr->eal, 0));
  ------------------
  |  |  656|  2.49k|    do { \
  |  |  657|  2.49k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.49k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.49k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.49k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.49k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.49k]
  |  |  ------------------
  ------------------
  213|  2.49k|    IGRAPH_FINALLY(igraph_attribute_record_list_destroy, &nattr->eal);
  ------------------
  |  |  603|  2.49k|    do { \
  |  |  604|  2.49k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.49k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.49k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.49k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.49k]
  |  |  ------------------
  |  |  608|  2.49k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.49k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.49k]
  |  |  ------------------
  ------------------
  214|       |
  215|  2.49k|    graph->attr = nattr;
  216|  2.49k|    IGRAPH_FINALLY_CLEAN(4);
  217|       |
  218|  2.49k|    return IGRAPH_SUCCESS;
  219|  2.49k|}
cattributes.c:igraph_i_cattribute_destroy:
  221|  4.14k|static void igraph_i_cattribute_destroy(igraph_t *graph) {
  222|  4.14k|    igraph_i_cattributes_t *attr = graph->attr;
  223|  4.14k|    igraph_attribute_record_list_destroy(&attr->eal);
  224|  4.14k|    igraph_attribute_record_list_destroy(&attr->val);
  225|  4.14k|    igraph_attribute_record_list_destroy(&attr->gal);
  226|       |    IGRAPH_FREE(graph->attr); /* sets to NULL */
  ------------------
  |  |   36|  4.14k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  227|  4.14k|}
cattributes.c:igraph_i_cattribute_copy:
  235|  1.64k|) {
  236|  1.64k|    igraph_i_cattributes_t *attrto, *attrfrom = from->attr;
  237|  1.64k|    igraph_attribute_record_list_t *alto[3], *alfrom[3] = {
  238|  1.64k|        &attrfrom->gal, &attrfrom->val, &attrfrom->eal
  239|  1.64k|    };
  240|  1.64k|    igraph_bool_t copy[3] = { ga, va, ea };
  241|       |
  242|  1.64k|    attrto = IGRAPH_CALLOC(1, igraph_i_cattributes_t);
  ------------------
  |  |   33|  1.64k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  3.28k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 0, Folded]
  |  |  |  |  |  Branch (31:24): [True: 0, Folded]
  |  |  |  |  |  Branch (31:66): [True: 1.64k, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  243|  1.64k|    IGRAPH_CHECK_OOM(attrto, "Insufficient memory to copy attributes.");
  ------------------
  |  |  709|  1.64k|    do { \
  |  |  710|  1.64k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  244|  1.64k|    IGRAPH_FINALLY(igraph_free, attrto);
  ------------------
  |  |  603|  1.64k|    do { \
  |  |  604|  1.64k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  1.64k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  1.64k|         * incorrect destructor function with the pointer */ \
  |  |  607|  1.64k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 1.64k]
  |  |  ------------------
  |  |  608|  1.64k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  245|       |
  246|  1.64k|    alto[0] = &attrto->gal;
  247|  1.64k|    alto[1] = &attrto->val;
  248|  1.64k|    alto[2] = &attrto->eal;
  249|       |
  250|  6.57k|    for (igraph_int_t i = 0; i < 3; i++) {
  ------------------
  |  Branch (250:30): [True: 4.93k, False: 1.64k]
  ------------------
  251|  4.93k|        if (copy[i]) {
  ------------------
  |  Branch (251:13): [True: 3.28k, False: 1.64k]
  ------------------
  252|  3.28k|            IGRAPH_CHECK(igraph_attribute_record_list_init_copy(alto[i], alfrom[i]));
  ------------------
  |  |  656|  3.28k|    do { \
  |  |  657|  3.28k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  3.28k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  3.28k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.28k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  3.28k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 3.28k]
  |  |  ------------------
  ------------------
  253|  3.28k|        } else {
  254|  1.64k|            IGRAPH_CHECK(igraph_attribute_record_list_init(alto[i], 0));
  ------------------
  |  |  656|  1.64k|    do { \
  |  |  657|  1.64k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.64k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  255|  1.64k|        }
  256|  4.93k|        IGRAPH_FINALLY(igraph_attribute_record_list_destroy, alto[i]);
  ------------------
  |  |  603|  4.93k|    do { \
  |  |  604|  4.93k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  4.93k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  4.93k|         * incorrect destructor function with the pointer */ \
  |  |  607|  4.93k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 4.93k]
  |  |  ------------------
  |  |  608|  4.93k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  4.93k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 4.93k]
  |  |  ------------------
  ------------------
  257|  4.93k|    }
  258|       |
  259|  1.64k|    to->attr = attrto;
  260|  1.64k|    IGRAPH_FINALLY_CLEAN(4);
  261|       |
  262|  1.64k|    return IGRAPH_SUCCESS;
  263|  1.64k|}
cattributes.c:igraph_i_cattribute_add_vertices:
  373|  3.12k|) {
  374|  3.12k|    igraph_i_cattributes_t *attr = graph->attr;
  375|  3.12k|    return igraph_i_cattribute_add_vertices_or_edges(&attr->val, igraph_vcount(graph), nv, nattr);
  376|  3.12k|}
cattributes.c:igraph_i_cattribute_add_vertices_or_edges:
  344|  5.45k|) {
  345|  5.45k|    igraph_int_t origlen = newlen - nv;
  346|  5.45k|    igraph_error_t err = igraph_i_cattribute_add_vertices_or_edges_inner(
  347|  5.45k|        val, newlen, nv, nattr
  348|  5.45k|    );
  349|       |
  350|  5.45k|    if (err != IGRAPH_SUCCESS) {
  ------------------
  |  Branch (350:9): [True: 0, False: 5.45k]
  ------------------
  351|       |        /* If unsuccessful, revert attribute vector sizes.
  352|       |         * The following function assumes that all attributes vectors that
  353|       |         * are present have a length at least as great as origlen.
  354|       |         * This is true at the moment because any new attributes that are
  355|       |         * added to the graph are created directly at 'origlen' instead of
  356|       |         * being created at smaller sizes and resized later.
  357|       |         *
  358|       |         * NOTE: While this ensures that all attribute vector lengths are
  359|       |         * correct, it does not ensure that no extra attributes have
  360|       |         * been added to the graph. However, the presence of extra
  361|       |         * attributes does not make the attribute table inconsistent
  362|       |         * like the incorrect attribute vector lengths would.
  363|       |         */
  364|      0|        igraph_i_cattribute_revert_attribute_vector_sizes(val, origlen);
  365|      0|    }
  366|       |
  367|  5.45k|    return err;
  368|  5.45k|}
cattributes.c:igraph_i_cattribute_add_vertices_or_edges_inner:
  269|  5.45k|) {
  270|  5.45k|    igraph_int_t length;
  271|  5.45k|    igraph_int_t nattrno = nattr == NULL ? 0 : igraph_attribute_record_list_size(nattr);
  ------------------
  |  Branch (271:28): [True: 5.45k, False: 0]
  ------------------
  272|  5.45k|    igraph_int_t origlen = newlen - nv;
  273|       |
  274|  5.45k|    IGRAPH_ASSERT(origlen >= 0);
  ------------------
  |  |  924|  5.45k|    do { \
  |  |  925|  5.45k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  5.45k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.45k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  5.45k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 5.45k]
  |  |  ------------------
  ------------------
  275|       |
  276|       |    /* Find all the attributes that are newly added, and create new value vectors
  277|       |     * for them in the original graph */
  278|  5.45k|    for (igraph_int_t i = 0; i < nattrno; i++) {
  ------------------
  |  Branch (278:30): [True: 0, False: 5.45k]
  ------------------
  279|      0|        const igraph_attribute_record_t *nattr_entry = igraph_attribute_record_list_get_ptr(nattr, i);
  280|      0|        const char *nname = nattr_entry->name;
  281|      0|        IGRAPH_CHECK(igraph_i_cattribute_find_or_create(val, nname, nattr_entry->type, origlen, NULL));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  282|      0|    }
  283|       |
  284|       |    /* Now append the new values */
  285|  5.45k|    length = igraph_attribute_record_list_size(val);
  286|  5.45k|    for (igraph_int_t i = 0; i < length; i++) {
  ------------------
  |  Branch (286:30): [True: 0, False: 5.45k]
  ------------------
  287|      0|        igraph_attribute_record_t *oldrec = igraph_attribute_record_list_get_ptr(val, i);
  288|      0|        const igraph_attribute_record_t *newrec = nattr
  ------------------
  |  Branch (288:51): [True: 0, False: 0]
  ------------------
  289|      0|            ? igraph_i_cattribute_find_const(nattr, oldrec->name, oldrec->type)
  290|      0|            : NULL;
  291|       |
  292|      0|        IGRAPH_ASSERT(igraph_attribute_record_size(oldrec) == origlen);
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  293|       |
  294|      0|        if (newrec) {
  ------------------
  |  Branch (294:13): [True: 0, False: 0]
  ------------------
  295|       |            /* This attribute is present in nattr */
  296|      0|            switch (oldrec->type) {
  297|      0|            case IGRAPH_ATTRIBUTE_NUMERIC:
  ------------------
  |  Branch (297:13): [True: 0, False: 0]
  ------------------
  298|      0|                if (nv != igraph_vector_size(newrec->value.as_vector)) {
  ------------------
  |  Branch (298:21): [True: 0, False: 0]
  ------------------
  299|      0|                    IGRAPH_ERROR("Invalid numeric attribute 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]
  |  |  ------------------
  ------------------
  300|      0|                }
  301|      0|                IGRAPH_CHECK(igraph_vector_append(
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  302|      0|                    oldrec->value.as_vector, newrec->value.as_vector
  303|      0|                ));
  304|      0|                break;
  305|      0|            case IGRAPH_ATTRIBUTE_STRING:
  ------------------
  |  Branch (305:13): [True: 0, False: 0]
  ------------------
  306|      0|                if (nv != igraph_strvector_size(newrec->value.as_strvector)) {
  ------------------
  |  Branch (306:21): [True: 0, False: 0]
  ------------------
  307|      0|                    IGRAPH_ERROR("Invalid string attribute 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]
  |  |  ------------------
  ------------------
  308|      0|                }
  309|      0|                IGRAPH_CHECK(igraph_strvector_append(
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  310|      0|                    oldrec->value.as_strvector, newrec->value.as_strvector
  311|      0|                ));
  312|      0|                break;
  313|      0|            case IGRAPH_ATTRIBUTE_BOOLEAN:
  ------------------
  |  Branch (313:13): [True: 0, False: 0]
  ------------------
  314|      0|                if (nv != igraph_vector_bool_size(newrec->value.as_vector_bool)) {
  ------------------
  |  Branch (314:21): [True: 0, False: 0]
  ------------------
  315|      0|                    IGRAPH_ERROR("Invalid boolean attribute 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]
  |  |  ------------------
  ------------------
  316|      0|                }
  317|      0|                IGRAPH_CHECK(igraph_vector_bool_append(
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  318|      0|                    oldrec->value.as_vector_bool, newrec->value.as_vector_bool
  319|      0|                ));
  320|      0|                break;
  321|      0|            default:
  ------------------
  |  Branch (321:13): [True: 0, False: 0]
  ------------------
  322|      0|                IGRAPH_WARNINGF(
  ------------------
  |  |  777|      0|    do { \
  |  |  778|      0|        igraph_warningf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  779|      0|                        __VA_ARGS__); \
  |  |  780|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (780:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  323|      0|                    "Attribute '%s' with unknown type %d ignored.",
  324|      0|                    oldrec->name, (int) oldrec->type
  325|      0|                );
  326|      0|                break;
  327|      0|            }
  328|      0|        } else {
  329|       |            /* No such attribute among the new ones so just extend the length
  330|       |             * of the current record */
  331|      0|            IGRAPH_CHECK(igraph_attribute_record_resize(oldrec, newlen));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  332|      0|        }
  333|       |
  334|      0|        IGRAPH_ASSERT(igraph_attribute_record_size(oldrec) == newlen);
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  335|      0|    }
  336|       |
  337|  5.45k|    return IGRAPH_SUCCESS;
  338|  5.45k|}
cattributes.c:igraph_i_cattribute_combine_attribute_record_lists:
 1270|  1.64k|) {
 1271|  1.64k|    igraph_int_t no_attrs = igraph_attribute_record_list_size(attrs);
 1272|  1.64k|    igraph_attribute_combination_todo_item_t *todo_items;
 1273|       |
 1274|  1.64k|    IGRAPH_ASSERT(attrs != new_attrs);
  ------------------
  |  |  924|  1.64k|    do { \
  |  |  925|  1.64k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
 1275|  1.64k|    IGRAPH_ASSERT(igraph_attribute_record_list_empty(new_attrs));
  ------------------
  |  |  924|  1.64k|    do { \
  |  |  925|  1.64k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
 1276|       |
 1277|  1.64k|    todo_items = IGRAPH_CALLOC(no_attrs, igraph_attribute_combination_todo_item_t);
  ------------------
  |  |   33|  1.64k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  3.28k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 1.64k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 1.64k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 1.64k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1278|  1.64k|    IGRAPH_CHECK_OOM(todo_items, "Cannot combine attributes.");
  ------------------
  |  |  709|  1.64k|    do { \
  |  |  710|  1.64k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
 1279|  1.64k|    IGRAPH_FINALLY(igraph_free, todo_items);
  ------------------
  |  |  603|  1.64k|    do { \
  |  |  604|  1.64k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  1.64k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  1.64k|         * incorrect destructor function with the pointer */ \
  |  |  607|  1.64k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 1.64k]
  |  |  ------------------
  |  |  608|  1.64k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
 1280|       |
 1281|  3.28k|    for (igraph_int_t i = 0; i < no_attrs; i++) {
  ------------------
  |  Branch (1281:30): [True: 1.64k, False: 1.64k]
  ------------------
 1282|  1.64k|        const igraph_attribute_record_t *oldrec = igraph_attribute_record_list_get_ptr(attrs, i);
 1283|  1.64k|        const char *name = oldrec->name;
 1284|  1.64k|        igraph_attribute_combination_type_t type;
 1285|  1.64k|        igraph_function_pointer_t voidfunc;
 1286|  1.64k|        IGRAPH_CHECK(igraph_attribute_combination_query(comb, name, &type, &voidfunc));
  ------------------
  |  |  656|  1.64k|    do { \
  |  |  657|  1.64k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.64k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
 1287|  1.64k|        todo_items[i].type = type;
 1288|  1.64k|        todo_items[i].func.as_void = voidfunc;
 1289|  1.64k|    }
 1290|       |
 1291|  1.64k|    IGRAPH_FINALLY(igraph_attribute_record_list_clear, new_attrs);
  ------------------
  |  |  603|  1.64k|    do { \
  |  |  604|  1.64k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  1.64k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  1.64k|         * incorrect destructor function with the pointer */ \
  |  |  607|  1.64k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 1.64k]
  |  |  ------------------
  |  |  608|  1.64k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
 1292|       |
 1293|  3.28k|    for (igraph_int_t i = 0; i < no_attrs; i++) {
  ------------------
  |  Branch (1293:30): [True: 1.64k, False: 1.64k]
  ------------------
 1294|  1.64k|        const igraph_attribute_record_t *oldrec = igraph_attribute_record_list_get_ptr(attrs, i);
 1295|  1.64k|        igraph_attribute_record_t newrec;
 1296|  1.64k|        const char *name = oldrec->name;
 1297|  1.64k|        igraph_attribute_combination_todo_item_t todo_item = todo_items[i];
 1298|  1.64k|        igraph_attribute_type_t attr_type = oldrec->type;
 1299|       |
 1300|  1.64k|        if (todo_item.type == IGRAPH_ATTRIBUTE_COMBINE_DEFAULT ||
  ------------------
  |  Branch (1300:13): [True: 0, False: 1.64k]
  ------------------
 1301|  1.64k|            todo_item.type == IGRAPH_ATTRIBUTE_COMBINE_IGNORE) {
  ------------------
  |  Branch (1301:13): [True: 0, False: 1.64k]
  ------------------
 1302|      0|            continue;
 1303|      0|        }
 1304|       |
 1305|  1.64k|        IGRAPH_CHECK(igraph_attribute_record_init(&newrec, name, attr_type));
  ------------------
  |  |  656|  1.64k|    do { \
  |  |  657|  1.64k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.64k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
 1306|  1.64k|        IGRAPH_FINALLY(igraph_attribute_record_destroy, &newrec);
  ------------------
  |  |  603|  1.64k|    do { \
  |  |  604|  1.64k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  1.64k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  1.64k|         * incorrect destructor function with the pointer */ \
  |  |  607|  1.64k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 1.64k]
  |  |  ------------------
  |  |  608|  1.64k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
 1307|       |
 1308|  1.64k|        IGRAPH_CHECK(igraph_attribute_record_resize(&newrec, igraph_vector_int_list_size(merges)));
  ------------------
  |  |  656|  1.64k|    do { \
  |  |  657|  1.64k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.64k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
 1309|       |
 1310|  1.64k|        if (attr_type == IGRAPH_ATTRIBUTE_NUMERIC) {
  ------------------
  |  Branch (1310:13): [True: 1.64k, False: 0]
  ------------------
 1311|  1.64k|            switch (todo_item.type) {
 1312|      0|            case IGRAPH_ATTRIBUTE_COMBINE_FUNCTION:
  ------------------
  |  Branch (1312:13): [True: 0, False: 1.64k]
  ------------------
 1313|      0|                IGRAPH_CHECK(igraph_i_cattributes_cn_func(oldrec, &newrec, merges,
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1314|      0|                             todo_item.func.as_num));
 1315|      0|                break;
 1316|  1.64k|            case IGRAPH_ATTRIBUTE_COMBINE_SUM:
  ------------------
  |  Branch (1316:13): [True: 1.64k, False: 0]
  ------------------
 1317|  1.64k|                IGRAPH_CHECK(igraph_i_cattributes_cn_sum(oldrec, &newrec, merges));
  ------------------
  |  |  656|  1.64k|    do { \
  |  |  657|  1.64k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.64k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
 1318|  1.64k|                break;
 1319|  1.64k|            case IGRAPH_ATTRIBUTE_COMBINE_PROD:
  ------------------
  |  Branch (1319:13): [True: 0, False: 1.64k]
  ------------------
 1320|      0|                IGRAPH_CHECK(igraph_i_cattributes_cn_prod(oldrec, &newrec, merges));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1321|      0|                break;
 1322|      0|            case IGRAPH_ATTRIBUTE_COMBINE_MIN:
  ------------------
  |  Branch (1322:13): [True: 0, False: 1.64k]
  ------------------
 1323|      0|                IGRAPH_CHECK(igraph_i_cattributes_cn_min(oldrec, &newrec, merges));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1324|      0|                break;
 1325|      0|            case IGRAPH_ATTRIBUTE_COMBINE_MAX:
  ------------------
  |  Branch (1325:13): [True: 0, False: 1.64k]
  ------------------
 1326|      0|                IGRAPH_CHECK(igraph_i_cattributes_cn_max(oldrec, &newrec, merges));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1327|      0|                break;
 1328|      0|            case IGRAPH_ATTRIBUTE_COMBINE_RANDOM:
  ------------------
  |  Branch (1328:13): [True: 0, False: 1.64k]
  ------------------
 1329|      0|                IGRAPH_CHECK(igraph_i_cattributes_cn_random(oldrec, &newrec, merges));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1330|      0|                break;
 1331|      0|            case IGRAPH_ATTRIBUTE_COMBINE_FIRST:
  ------------------
  |  Branch (1331:13): [True: 0, False: 1.64k]
  ------------------
 1332|      0|                IGRAPH_CHECK(igraph_i_cattributes_cn_first(oldrec, &newrec, merges));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1333|      0|                break;
 1334|      0|            case IGRAPH_ATTRIBUTE_COMBINE_LAST:
  ------------------
  |  Branch (1334:13): [True: 0, False: 1.64k]
  ------------------
 1335|      0|                IGRAPH_CHECK(igraph_i_cattributes_cn_last(oldrec, &newrec, merges));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1336|      0|                break;
 1337|      0|            case IGRAPH_ATTRIBUTE_COMBINE_MEAN:
  ------------------
  |  Branch (1337:13): [True: 0, False: 1.64k]
  ------------------
 1338|      0|                IGRAPH_CHECK(igraph_i_cattributes_cn_mean(oldrec, &newrec, merges));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1339|      0|                break;
 1340|      0|            case IGRAPH_ATTRIBUTE_COMBINE_MEDIAN:
  ------------------
  |  Branch (1340:13): [True: 0, False: 1.64k]
  ------------------
 1341|      0|                IGRAPH_ERROR("Median calculation not implemented.",
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1342|      0|                             IGRAPH_UNIMPLEMENTED);
 1343|      0|                break;
 1344|      0|            case IGRAPH_ATTRIBUTE_COMBINE_CONCAT:
  ------------------
  |  Branch (1344:13): [True: 0, False: 1.64k]
  ------------------
 1345|      0|                IGRAPH_ERROR("Cannot concatenate numeric attributes.",
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1346|      0|                             IGRAPH_EATTRCOMBINE);
 1347|      0|                break;
 1348|      0|            default:
  ------------------
  |  Branch (1348:13): [True: 0, False: 1.64k]
  ------------------
 1349|      0|                IGRAPH_ERROR("Unknown attribute combination.",
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1350|      0|                             IGRAPH_UNIMPLEMENTED);
 1351|      0|                break;
 1352|  1.64k|            }
 1353|  1.64k|        } else if (attr_type == IGRAPH_ATTRIBUTE_BOOLEAN) {
  ------------------
  |  Branch (1353:20): [True: 0, False: 0]
  ------------------
 1354|      0|            switch (todo_item.type) {
 1355|      0|            case IGRAPH_ATTRIBUTE_COMBINE_FUNCTION:
  ------------------
  |  Branch (1355:13): [True: 0, False: 0]
  ------------------
 1356|      0|                IGRAPH_CHECK(igraph_i_cattributes_cb_func(oldrec, &newrec, merges,
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1357|      0|                             todo_item.func.as_bool));
 1358|      0|                break;
 1359|      0|            case IGRAPH_ATTRIBUTE_COMBINE_SUM:
  ------------------
  |  Branch (1359:13): [True: 0, False: 0]
  ------------------
 1360|      0|            case IGRAPH_ATTRIBUTE_COMBINE_MAX:
  ------------------
  |  Branch (1360:13): [True: 0, False: 0]
  ------------------
 1361|      0|                IGRAPH_CHECK(igraph_i_cattributes_cb_any_is_true(oldrec, &newrec, merges));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1362|      0|                break;
 1363|      0|            case IGRAPH_ATTRIBUTE_COMBINE_PROD:
  ------------------
  |  Branch (1363:13): [True: 0, False: 0]
  ------------------
 1364|      0|            case IGRAPH_ATTRIBUTE_COMBINE_MIN:
  ------------------
  |  Branch (1364:13): [True: 0, False: 0]
  ------------------
 1365|      0|                IGRAPH_CHECK(igraph_i_cattributes_cb_all_is_true(oldrec, &newrec, merges));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1366|      0|                break;
 1367|      0|            case IGRAPH_ATTRIBUTE_COMBINE_MEAN:
  ------------------
  |  Branch (1367:13): [True: 0, False: 0]
  ------------------
 1368|      0|            case IGRAPH_ATTRIBUTE_COMBINE_MEDIAN:
  ------------------
  |  Branch (1368:13): [True: 0, False: 0]
  ------------------
 1369|      0|                IGRAPH_CHECK(igraph_i_cattributes_cb_majority(oldrec, &newrec, merges));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1370|      0|                break;
 1371|      0|            case IGRAPH_ATTRIBUTE_COMBINE_RANDOM:
  ------------------
  |  Branch (1371:13): [True: 0, False: 0]
  ------------------
 1372|      0|                IGRAPH_CHECK(igraph_i_cattributes_cb_random(oldrec, &newrec, merges));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1373|      0|                break;
 1374|      0|            case IGRAPH_ATTRIBUTE_COMBINE_FIRST:
  ------------------
  |  Branch (1374:13): [True: 0, False: 0]
  ------------------
 1375|      0|                IGRAPH_CHECK(igraph_i_cattributes_cb_first(oldrec, &newrec, merges));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1376|      0|                break;
 1377|      0|            case IGRAPH_ATTRIBUTE_COMBINE_LAST:
  ------------------
  |  Branch (1377:13): [True: 0, False: 0]
  ------------------
 1378|      0|                IGRAPH_CHECK(igraph_i_cattributes_cb_last(oldrec, &newrec, merges));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1379|      0|                break;
 1380|      0|            case IGRAPH_ATTRIBUTE_COMBINE_CONCAT:
  ------------------
  |  Branch (1380:13): [True: 0, False: 0]
  ------------------
 1381|      0|                IGRAPH_ERROR("Cannot calculate concatenation of Booleans.",
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1382|      0|                             IGRAPH_EATTRCOMBINE);
 1383|      0|                break;
 1384|      0|            default:
  ------------------
  |  Branch (1384:13): [True: 0, False: 0]
  ------------------
 1385|      0|                IGRAPH_ERROR("Unknown attribute combination.",
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1386|      0|                             IGRAPH_UNIMPLEMENTED);
 1387|      0|                break;
 1388|      0|            }
 1389|      0|        } else if (attr_type == IGRAPH_ATTRIBUTE_STRING) {
  ------------------
  |  Branch (1389:20): [True: 0, False: 0]
  ------------------
 1390|      0|            switch (todo_item.type) {
 1391|      0|            case IGRAPH_ATTRIBUTE_COMBINE_FUNCTION:
  ------------------
  |  Branch (1391:13): [True: 0, False: 0]
  ------------------
 1392|      0|                IGRAPH_CHECK(igraph_i_cattributes_cs_func(oldrec, &newrec, merges,
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1393|      0|                             todo_item.func.as_str));
 1394|      0|                break;
 1395|      0|            case IGRAPH_ATTRIBUTE_COMBINE_SUM:
  ------------------
  |  Branch (1395:13): [True: 0, False: 0]
  ------------------
 1396|      0|                IGRAPH_ERROR("Cannot sum strings.", IGRAPH_EATTRCOMBINE);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1397|      0|                break;
 1398|      0|            case IGRAPH_ATTRIBUTE_COMBINE_PROD:
  ------------------
  |  Branch (1398:13): [True: 0, False: 0]
  ------------------
 1399|      0|                IGRAPH_ERROR("Cannot multiply strings.", IGRAPH_EATTRCOMBINE);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1400|      0|                break;
 1401|      0|            case IGRAPH_ATTRIBUTE_COMBINE_MIN:
  ------------------
  |  Branch (1401:13): [True: 0, False: 0]
  ------------------
 1402|      0|                IGRAPH_ERROR("Cannot find minimum of strings.",
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1403|      0|                             IGRAPH_EATTRCOMBINE);
 1404|      0|                break;
 1405|      0|            case IGRAPH_ATTRIBUTE_COMBINE_MAX:
  ------------------
  |  Branch (1405:13): [True: 0, False: 0]
  ------------------
 1406|      0|                IGRAPH_ERROR("Cannot find maximum of strings.",
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1407|      0|                             IGRAPH_EATTRCOMBINE);
 1408|      0|                break;
 1409|      0|            case IGRAPH_ATTRIBUTE_COMBINE_MEAN:
  ------------------
  |  Branch (1409:13): [True: 0, False: 0]
  ------------------
 1410|      0|                IGRAPH_ERROR("Cannot calculate mean of strings.",
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1411|      0|                             IGRAPH_EATTRCOMBINE);
 1412|      0|                break;
 1413|      0|            case IGRAPH_ATTRIBUTE_COMBINE_MEDIAN:
  ------------------
  |  Branch (1413:13): [True: 0, False: 0]
  ------------------
 1414|      0|                IGRAPH_ERROR("Cannot calculate median of strings.",
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1415|      0|                             IGRAPH_EATTRCOMBINE);
 1416|      0|                break;
 1417|      0|            case IGRAPH_ATTRIBUTE_COMBINE_RANDOM:
  ------------------
  |  Branch (1417:13): [True: 0, False: 0]
  ------------------
 1418|      0|                IGRAPH_CHECK(igraph_i_cattributes_sn_random(oldrec, &newrec, merges));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1419|      0|                break;
 1420|      0|            case IGRAPH_ATTRIBUTE_COMBINE_FIRST:
  ------------------
  |  Branch (1420:13): [True: 0, False: 0]
  ------------------
 1421|      0|                IGRAPH_CHECK(igraph_i_cattributes_cs_first(oldrec, &newrec, merges));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1422|      0|                break;
 1423|      0|            case IGRAPH_ATTRIBUTE_COMBINE_LAST:
  ------------------
  |  Branch (1423:13): [True: 0, False: 0]
  ------------------
 1424|      0|                IGRAPH_CHECK(igraph_i_cattributes_cs_last(oldrec, &newrec, merges));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1425|      0|                break;
 1426|      0|            case IGRAPH_ATTRIBUTE_COMBINE_CONCAT:
  ------------------
  |  Branch (1426:13): [True: 0, False: 0]
  ------------------
 1427|      0|                IGRAPH_CHECK(igraph_i_cattributes_cs_concat(oldrec, &newrec, merges));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1428|      0|                break;
 1429|      0|            default:
  ------------------
  |  Branch (1429:13): [True: 0, False: 0]
  ------------------
 1430|      0|                IGRAPH_ERROR("Unknown attribute combination.",
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1431|      0|                             IGRAPH_UNIMPLEMENTED);
 1432|      0|                break;
 1433|      0|            }
 1434|      0|        } else {
 1435|      0|            IGRAPH_ERROR("Unknown attribute type, this should not happen.",
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1436|      0|                         IGRAPH_UNIMPLEMENTED);
 1437|      0|        }
 1438|       |
 1439|  1.64k|        IGRAPH_CHECK(igraph_attribute_record_list_push_back(new_attrs, &newrec));
  ------------------
  |  |  656|  1.64k|    do { \
  |  |  657|  1.64k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.64k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
 1440|  1.64k|        IGRAPH_FINALLY_CLEAN(1);  /* ownership of newrec transferred */
 1441|  1.64k|    }
 1442|       |
 1443|  1.64k|    IGRAPH_FREE(todo_items);
  ------------------
  |  |   36|  1.64k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1444|  1.64k|    IGRAPH_FINALLY_CLEAN(2);
 1445|       |
 1446|  1.64k|    return IGRAPH_SUCCESS;
 1447|  1.64k|}
cattributes.c:igraph_i_cattributes_cn_sum:
  689|  1.64k|                                       const igraph_vector_int_list_t *merges) {
  690|  1.64k|    const igraph_vector_t *oldv = oldrec->value.as_vector;
  691|  1.64k|    igraph_vector_t *newv = newrec->value.as_vector;
  692|  1.64k|    igraph_int_t newlen = igraph_vector_int_list_size(merges);
  693|       |
  694|  20.1k|    for (igraph_int_t i = 0; i < newlen; i++) {
  ------------------
  |  Branch (694:30): [True: 18.5k, False: 1.64k]
  ------------------
  695|  18.5k|        igraph_real_t s = 0.0;
  696|  18.5k|        const igraph_vector_int_t *idx = igraph_vector_int_list_get_ptr(merges, i);
  697|  18.5k|        igraph_int_t n = igraph_vector_int_size(idx);
  698|  45.9k|        for (igraph_int_t j = 0; j < n; j++) {
  ------------------
  |  Branch (698:34): [True: 27.3k, False: 18.5k]
  ------------------
  699|  27.3k|            igraph_int_t x = VECTOR(*idx)[j];
  ------------------
  |  |   60|  27.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  700|  27.3k|            s += VECTOR(*oldv)[x];
  ------------------
  |  |   60|  27.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  701|  27.3k|        }
  702|  18.5k|        VECTOR(*newv)[i] = s;
  ------------------
  |  |   60|  18.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  703|  18.5k|    }
  704|       |
  705|  1.64k|    return IGRAPH_SUCCESS;
  706|  1.64k|}
cattributes.c:igraph_i_cattribute_add_edges:
 1463|  2.33k|) {
 1464|  2.33k|    igraph_int_t ne = igraph_vector_int_size(edges) / 2;
 1465|  2.33k|    igraph_i_cattributes_t *attr = graph->attr;
 1466|  2.33k|    return igraph_i_cattribute_add_vertices_or_edges(&attr->eal, igraph_ecount(graph), ne, nattr);
 1467|  2.33k|}
cattributes.c:igraph_i_cattribute_combine_edges:
 1484|  1.64k|) {
 1485|  1.64k|    igraph_i_cattributes_t *attr = graph->attr;
 1486|  1.64k|    igraph_i_cattributes_t *toattr = newgraph->attr;
 1487|  1.64k|    return igraph_i_cattribute_combine_attribute_record_lists(
 1488|  1.64k|        &attr->eal, &toattr->eal, merges, comb
 1489|  1.64k|    );
 1490|  1.64k|}
cattributes.c:igraph_i_cattribute_find_or_return:
  113|    822|) {
  114|    822|    igraph_attribute_record_t *rec;
  115|       |
  116|    822|    rec = igraph_i_cattribute_find(attrs, name, IGRAPH_ATTRIBUTE_UNSPECIFIED);
  117|    822|    if (!rec) {
  ------------------
  |  Branch (117:9): [True: 0, False: 822]
  ------------------
  118|      0|        IGRAPH_ERRORF("Attribute '%s' does not exist.", IGRAPH_EINVAL, name);
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  119|      0|    }
  120|       |
  121|    822|    if (type != IGRAPH_ATTRIBUTE_UNSPECIFIED) {
  ------------------
  |  Branch (121:9): [True: 822, False: 0]
  ------------------
  122|    822|        IGRAPH_CHECK(igraph_attribute_record_check_type(rec, type));
  ------------------
  |  |  656|    822|    do { \
  |  |  657|    822|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    822|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
  123|    822|    }
  124|       |
  125|    822|    if (ptr) {
  ------------------
  |  Branch (125:9): [True: 822, False: 0]
  ------------------
  126|    822|        *ptr = rec;
  127|    822|    }
  128|       |
  129|    822|    return IGRAPH_SUCCESS;
  130|    822|}
cattributes.c:igraph_i_cattribute_get_numeric_edge_attr:
 1714|    822|) {
 1715|    822|    igraph_i_cattributes_t *attr = graph->attr;
 1716|    822|    igraph_attribute_record_list_t *eal = &attr->eal;
 1717|    822|    igraph_attribute_record_t *rec;
 1718|    822|    const igraph_vector_t *num;
 1719|       |
 1720|    822|    IGRAPH_CHECK(igraph_i_cattribute_find_or_return(eal, name, IGRAPH_ATTRIBUTE_NUMERIC, &rec));
  ------------------
  |  |  656|    822|    do { \
  |  |  657|    822|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    822|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
 1721|       |
 1722|    822|    num = rec->value.as_vector;
 1723|    822|    if (igraph_es_is_all(&es)) {
  ------------------
  |  Branch (1723:9): [True: 822, False: 0]
  ------------------
 1724|    822|        IGRAPH_CHECK(igraph_vector_append(value, num));
  ------------------
  |  |  656|    822|    do { \
  |  |  657|    822|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    822|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
 1725|    822|    } else {
 1726|      0|        igraph_eit_t it;
 1727|      0|        igraph_int_t i = igraph_vector_size(value);
 1728|      0|        IGRAPH_CHECK(igraph_eit_create(graph, es, &it));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1729|      0|        IGRAPH_FINALLY(igraph_eit_destroy, &it);
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
 1730|      0|        IGRAPH_CHECK(igraph_vector_resize(value, i + IGRAPH_EIT_SIZE(it)));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1731|      0|        for (; !IGRAPH_EIT_END(it); IGRAPH_EIT_NEXT(it), i++) {
  ------------------
  |  |  371|      0|#define IGRAPH_EIT_END(eit)   ((eit).pos >= (eit).end)
  ------------------
                      for (; !IGRAPH_EIT_END(it); IGRAPH_EIT_NEXT(it), i++) {
  ------------------
  |  |  359|      0|#define IGRAPH_EIT_NEXT(eit) (++((eit).pos))
  ------------------
  |  Branch (1731:16): [True: 0, False: 0]
  ------------------
 1732|      0|            igraph_int_t e = IGRAPH_EIT_GET(it);
  ------------------
  |  |  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)
  |  |  ------------------
  ------------------
 1733|      0|            VECTOR(*value)[i] = VECTOR(*num)[e];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*value)[i] = VECTOR(*num)[e];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1734|      0|        }
 1735|      0|        igraph_eit_destroy(&it);
 1736|      0|        IGRAPH_FINALLY_CLEAN(1);
 1737|      0|    }
 1738|       |
 1739|    822|    return IGRAPH_SUCCESS;
 1740|    822|}
cattributes.c:igraph_i_cattribute_find:
   69|  1.64k|) {
   70|  1.64k|    igraph_int_t index = igraph_i_cattribute_find_index(attrs, name);
   71|  1.64k|    igraph_attribute_record_t *rec;
   72|       |
   73|  1.64k|    if (index >= 0) {
  ------------------
  |  Branch (73:9): [True: 822, False: 822]
  ------------------
   74|    822|        rec = igraph_attribute_record_list_get_ptr(attrs, index);
   75|    822|        if (type == IGRAPH_ATTRIBUTE_UNSPECIFIED || type == rec->type) {
  ------------------
  |  Branch (75:13): [True: 822, False: 0]
  |  Branch (75:53): [True: 0, False: 0]
  ------------------
   76|    822|            return rec;
   77|    822|        }
   78|    822|    }
   79|       |
   80|    822|    return NULL;
   81|  1.64k|}
cattributes.c:igraph_i_cattribute_find_or_create:
  147|    822|) {
  148|    822|    igraph_attribute_record_t *rec;
  149|       |
  150|    822|    rec = igraph_i_cattribute_find(attrs, name, IGRAPH_ATTRIBUTE_UNSPECIFIED);
  151|    822|    if (rec) {
  ------------------
  |  Branch (151:9): [True: 0, False: 822]
  ------------------
  152|      0|        if (type != IGRAPH_ATTRIBUTE_UNSPECIFIED) {
  ------------------
  |  Branch (152:13): [True: 0, False: 0]
  ------------------
  153|      0|            IGRAPH_CHECK(igraph_attribute_record_check_type(rec, type));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  154|      0|        }
  155|    822|    } else {
  156|    822|        IGRAPH_CHECK(igraph_attribute_record_list_push_back_new(attrs, &rec));
  ------------------
  |  |  656|    822|    do { \
  |  |  657|    822|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    822|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
  157|    822|        IGRAPH_CHECK(igraph_attribute_record_set_name(rec, name));
  ------------------
  |  |  656|    822|    do { \
  |  |  657|    822|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    822|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
  158|    822|        IGRAPH_CHECK(igraph_attribute_record_set_type(rec, type));
  ------------------
  |  |  656|    822|    do { \
  |  |  657|    822|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    822|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
  159|    822|    }
  160|       |
  161|    822|    if (length > 0 && igraph_attribute_record_size(rec) < length) {
  ------------------
  |  Branch (161:9): [True: 777, False: 45]
  |  Branch (161:23): [True: 777, False: 0]
  ------------------
  162|    777|        IGRAPH_CHECK(igraph_attribute_record_resize(rec, length));
  ------------------
  |  |  656|    777|    do { \
  |  |  657|    777|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    777|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    777|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 777]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    777|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 777]
  |  |  ------------------
  ------------------
  163|    777|    }
  164|       |
  165|    822|    if (ptr) {
  ------------------
  |  Branch (165:9): [True: 822, False: 0]
  ------------------
  166|    822|        *ptr = rec;
  167|    822|    }
  168|       |
  169|    822|    return IGRAPH_SUCCESS;
  170|    822|}
cattributes.c:igraph_i_cattribute_find_index:
   49|  2.46k|) {
   50|  2.46k|    igraph_int_t n = igraph_attribute_record_list_size(attrs);
   51|  2.46k|    for (igraph_int_t i = 0; i < n; i++) {
  ------------------
  |  Branch (51:30): [True: 1.64k, False: 822]
  ------------------
   52|  1.64k|        const igraph_attribute_record_t *rec = igraph_attribute_record_list_get_ptr(attrs, i);
   53|  1.64k|        if (!strcmp(rec->name, name)) {
  ------------------
  |  Branch (53:13): [True: 1.64k, False: 0]
  ------------------
   54|  1.64k|            return i;
   55|  1.64k|        }
   56|  1.64k|    }
   57|    822|    return -1;
   58|  2.46k|}

igraph_vss_all:
  115|  17.8k|igraph_vs_t igraph_vss_all(void) {
  116|  17.8k|    igraph_vs_t allvs;
  117|  17.8k|    allvs.type = IGRAPH_VS_ALL;
  118|  17.8k|    return allvs;
  119|  17.8k|}
igraph_vss_range:
  485|  2.99k|igraph_vs_t igraph_vss_range(igraph_int_t start, igraph_int_t end) {
  486|  2.99k|    igraph_vs_t vs;
  487|  2.99k|    vs.type = IGRAPH_VS_RANGE;
  488|  2.99k|    vs.data.range.start = start;
  489|  2.99k|    vs.data.range.end = end;
  490|  2.99k|    return vs;
  491|  2.99k|}
igraph_vs_is_all:
  544|  7.24k|igraph_bool_t igraph_vs_is_all(const igraph_vs_t *vs) {
  545|  7.24k|    return vs->type == IGRAPH_VS_ALL;
  546|  7.24k|}
igraph_vs_size:
  614|  1.49k|                   igraph_int_t *result) {
  615|  1.49k|    igraph_vector_int_t vec;
  616|  1.49k|    igraph_bool_t *seen;
  617|  1.49k|    igraph_int_t i;
  618|  1.49k|    igraph_int_t vec_len;
  619|       |
  620|  1.49k|    switch (vs->type) {
  ------------------
  |  Branch (620:13): [True: 1.49k, False: 0]
  ------------------
  621|      0|    case IGRAPH_VS_NONE:
  ------------------
  |  Branch (621:5): [True: 0, False: 1.49k]
  ------------------
  622|      0|        *result = 0; return IGRAPH_SUCCESS;
  623|       |
  624|      0|    case IGRAPH_VS_1:
  ------------------
  |  Branch (624:5): [True: 0, False: 1.49k]
  ------------------
  625|      0|        *result = 0;
  626|      0|        if (vs->data.vid < igraph_vcount(graph) && vs->data.vid >= 0) {
  ------------------
  |  Branch (626:13): [True: 0, False: 0]
  |  Branch (626:52): [True: 0, False: 0]
  ------------------
  627|      0|            *result = 1;
  628|      0|        }
  629|      0|        return IGRAPH_SUCCESS;
  630|       |
  631|  1.49k|    case IGRAPH_VS_RANGE:
  ------------------
  |  Branch (631:5): [True: 1.49k, False: 0]
  ------------------
  632|  1.49k|        *result = vs->data.range.end - vs->data.range.start;
  633|  1.49k|        return IGRAPH_SUCCESS;
  634|       |
  635|      0|    case IGRAPH_VS_ALL:
  ------------------
  |  Branch (635:5): [True: 0, False: 1.49k]
  ------------------
  636|      0|        *result = igraph_vcount(graph); return IGRAPH_SUCCESS;
  637|       |
  638|      0|    case IGRAPH_VS_ADJ:
  ------------------
  |  Branch (638:5): [True: 0, False: 1.49k]
  ------------------
  639|      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]
  |  |  ------------------
  ------------------
  640|      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]
  |  |  ------------------
  ------------------
  641|      0|            graph, &vec, vs->data.adj.vid, vs->data.adj.mode,
  642|      0|            vs->data.adj.loops, vs->data.adj.multiple
  643|      0|        ));
  644|      0|        *result = igraph_vector_int_size(&vec);
  645|      0|        igraph_vector_int_destroy(&vec);
  646|      0|        IGRAPH_FINALLY_CLEAN(1);
  647|      0|        return IGRAPH_SUCCESS;
  648|       |
  649|      0|    case IGRAPH_VS_NONADJ:
  ------------------
  |  Branch (649:5): [True: 0, False: 1.49k]
  ------------------
  650|      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]
  |  |  ------------------
  ------------------
  651|      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]
  |  |  ------------------
  ------------------
  652|      0|            graph, &vec, vs->data.adj.vid, vs->data.adj.mode,
  653|      0|            vs->data.adj.loops, vs->data.adj.multiple
  654|      0|        ));
  655|      0|        vec_len = igraph_vector_int_size(&vec);
  656|      0|        *result = igraph_vcount(graph);
  657|      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]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  658|      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]
  |  |  ------------------
  ------------------
  659|      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]
  |  |  ------------------
  ------------------
  660|      0|        for (i = 0; i < vec_len; i++) {
  ------------------
  |  Branch (660:21): [True: 0, False: 0]
  ------------------
  661|      0|            if (!seen[ VECTOR(vec)[i] ]) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (661:17): [True: 0, False: 0]
  ------------------
  662|      0|                (*result)--;
  663|      0|                seen[ VECTOR(vec)[i] ] = true;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  664|      0|            }
  665|      0|        }
  666|      0|        igraph_free(seen);
  667|      0|        igraph_vector_int_destroy(&vec);
  668|      0|        IGRAPH_FINALLY_CLEAN(2);
  669|      0|        return IGRAPH_SUCCESS;
  670|       |
  671|      0|    case IGRAPH_VS_VECTOR:
  ------------------
  |  Branch (671:5): [True: 0, False: 1.49k]
  ------------------
  672|      0|    case IGRAPH_VS_VECTORPTR:
  ------------------
  |  Branch (672:5): [True: 0, False: 1.49k]
  ------------------
  673|      0|        *result = igraph_vector_int_size(vs->data.vecptr);
  674|      0|        return IGRAPH_SUCCESS;
  675|  1.49k|    }
  676|       |
  677|      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]
  |  |  ------------------
  ------------------
  678|      0|                 IGRAPH_EINVAL);
  679|      0|}
igraph_vit_create:
  715|  15.9k|igraph_error_t igraph_vit_create(const igraph_t *graph, igraph_vs_t vs, igraph_vit_t *vit) {
  716|  15.9k|    igraph_vector_int_t vec;
  717|  15.9k|    igraph_vector_int_t *vec_int;
  718|  15.9k|    igraph_bool_t *seen;
  719|  15.9k|    igraph_int_t i, j, n;
  720|  15.9k|    igraph_int_t vec_len;
  721|       |
  722|  15.9k|    switch (vs.type) {
  723|  13.0k|    case IGRAPH_VS_ALL:
  ------------------
  |  Branch (723:5): [True: 13.0k, False: 2.99k]
  ------------------
  724|  13.0k|        vit->type = IGRAPH_VIT_RANGE;
  725|  13.0k|        vit->pos = 0;
  726|  13.0k|        vit->start = 0;
  727|  13.0k|        vit->end = igraph_vcount(graph);
  728|  13.0k|        break;
  729|      0|    case IGRAPH_VS_ADJ:
  ------------------
  |  Branch (729:5): [True: 0, False: 15.9k]
  ------------------
  730|      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]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  731|      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]
  |  |  ------------------
  ------------------
  732|      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]
  |  |  ------------------
  ------------------
  733|      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]
  |  |  ------------------
  ------------------
  734|      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]
  |  |  ------------------
  ------------------
  735|      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]
  |  |  ------------------
  ------------------
  736|      0|            graph, &vec, vs.data.adj.vid, vs.data.adj.mode,
  737|      0|            vs.data.adj.loops, vs.data.adj.multiple
  738|      0|        ));
  739|      0|        n = igraph_vector_int_size(&vec);
  740|      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]
  |  |  ------------------
  ------------------
  741|      0|        for (i = 0; i < n; i++) {
  ------------------
  |  Branch (741:21): [True: 0, False: 0]
  ------------------
  742|      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)
  ------------------
  743|      0|        }
  744|       |
  745|      0|        igraph_vector_int_destroy(&vec);
  746|      0|        IGRAPH_FINALLY_CLEAN(3);
  747|       |
  748|      0|        vit->type = IGRAPH_VIT_VECTOR;
  749|      0|        vit->pos = 0;
  750|      0|        vit->start = 0;
  751|      0|        vit->vec = vec_int;
  752|      0|        vit->end = n;
  753|       |
  754|      0|        break;
  755|      0|    case IGRAPH_VS_NONADJ:
  ------------------
  |  Branch (755:5): [True: 0, False: 15.9k]
  ------------------
  756|      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]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  757|      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]
  |  |  ------------------
  ------------------
  758|      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]
  |  |  ------------------
  ------------------
  759|      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]
  |  |  ------------------
  ------------------
  760|      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]
  |  |  ------------------
  ------------------
  761|      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]
  |  |  ------------------
  ------------------
  762|      0|            graph, &vec, vs.data.adj.vid, vs.data.adj.mode,
  763|      0|            vs.data.adj.loops, vs.data.adj.multiple
  764|      0|        ));
  765|      0|        vec_len = igraph_vector_int_size(&vec);
  766|      0|        n = igraph_vcount(graph);
  767|      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]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  768|      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]
  |  |  ------------------
  ------------------
  769|      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]
  |  |  ------------------
  ------------------
  770|      0|        for (i = 0; i < vec_len; i++) {
  ------------------
  |  Branch (770:21): [True: 0, False: 0]
  ------------------
  771|      0|            if (! seen [ VECTOR(vec)[i] ] ) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (771:17): [True: 0, False: 0]
  ------------------
  772|      0|                n--;
  773|      0|                seen[ VECTOR(vec)[i] ] = true;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  774|      0|            }
  775|      0|        }
  776|      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]
  |  |  ------------------
  ------------------
  777|      0|        for (i = 0, j = 0; j < n; i++) {
  ------------------
  |  Branch (777:28): [True: 0, False: 0]
  ------------------
  778|      0|            if (!seen[i]) {
  ------------------
  |  Branch (778:17): [True: 0, False: 0]
  ------------------
  779|      0|                VECTOR(*vec_int)[j++] = i;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  780|      0|            }
  781|      0|        }
  782|       |
  783|      0|        IGRAPH_FREE(seen);
  ------------------
  |  |   36|      0|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  784|      0|        igraph_vector_int_destroy(&vec);
  785|      0|        IGRAPH_FINALLY_CLEAN(4);
  786|       |
  787|      0|        vit->type = IGRAPH_VIT_VECTOR;
  788|      0|        vit->pos = 0;
  789|      0|        vit->start = 0;
  790|      0|        vit->vec = vec_int;
  791|      0|        vit->end = n;
  792|      0|        break;
  793|      0|    case IGRAPH_VS_NONE:
  ------------------
  |  Branch (793:5): [True: 0, False: 15.9k]
  ------------------
  794|      0|        vit->type = IGRAPH_VIT_RANGE;
  795|      0|        vit->pos = 0;
  796|      0|        vit->start = 0;
  797|      0|        vit->end = 0;
  798|      0|        break;
  799|      0|    case IGRAPH_VS_1:
  ------------------
  |  Branch (799:5): [True: 0, False: 15.9k]
  ------------------
  800|      0|        if (vs.data.vid < 0 || vs.data.vid >= igraph_vcount(graph)) {
  ------------------
  |  Branch (800:13): [True: 0, False: 0]
  |  Branch (800:32): [True: 0, False: 0]
  ------------------
  801|      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]
  |  |  ------------------
  ------------------
  802|      0|        }
  803|      0|        vit->type = IGRAPH_VIT_RANGE;
  804|      0|        vit->pos = vs.data.vid;
  805|      0|        vit->start = vs.data.vid;
  806|      0|        vit->end = vs.data.vid + 1;
  807|      0|        break;
  808|      0|    case IGRAPH_VS_VECTORPTR:
  ------------------
  |  Branch (808:5): [True: 0, False: 15.9k]
  ------------------
  809|      0|    case IGRAPH_VS_VECTOR:
  ------------------
  |  Branch (809:5): [True: 0, False: 15.9k]
  ------------------
  810|      0|        vit->type = IGRAPH_VIT_VECTORPTR;
  811|      0|        vit->pos = 0;
  812|      0|        vit->start = 0;
  813|      0|        vit->vec = vs.data.vecptr;
  814|      0|        vit->end = igraph_vector_int_size(vit->vec);
  815|      0|        if (!igraph_vector_int_isininterval(vit->vec, 0, igraph_vcount(graph) - 1)) {
  ------------------
  |  Branch (815:13): [True: 0, False: 0]
  ------------------
  816|      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]
  |  |  ------------------
  ------------------
  817|      0|        }
  818|      0|        break;
  819|  2.99k|    case IGRAPH_VS_RANGE:
  ------------------
  |  Branch (819:5): [True: 2.99k, False: 13.0k]
  ------------------
  820|  2.99k|        {
  821|  2.99k|            igraph_int_t no_of_nodes = igraph_vcount(graph);
  822|  2.99k|            if (vs.data.range.start < 0 ||
  ------------------
  |  Branch (822:17): [True: 0, False: 2.99k]
  ------------------
  823|  2.99k|                vs.data.range.start > no_of_nodes ||
  ------------------
  |  Branch (823:17): [True: 0, False: 2.99k]
  ------------------
  824|  2.99k|                (no_of_nodes > 0 && vs.data.range.start == no_of_nodes)) {
  ------------------
  |  Branch (824:18): [True: 2.99k, False: 0]
  |  Branch (824:37): [True: 0, False: 2.99k]
  ------------------
  825|      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]
  |  |  ------------------
  ------------------
  826|      0|            }
  827|  2.99k|            if (vs.data.range.end < 0 || vs.data.range.end > no_of_nodes) {
  ------------------
  |  Branch (827:17): [True: 0, False: 2.99k]
  |  Branch (827:42): [True: 0, False: 2.99k]
  ------------------
  828|      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]
  |  |  ------------------
  ------------------
  829|      0|            }
  830|  2.99k|        }
  831|  2.99k|        vit->type = IGRAPH_VIT_RANGE;
  832|  2.99k|        vit->pos = vs.data.range.start;
  833|  2.99k|        vit->start = vs.data.range.start;
  834|  2.99k|        vit->end = vs.data.range.end;
  835|  2.99k|        break;
  836|      0|    default:
  ------------------
  |  Branch (836:5): [True: 0, False: 15.9k]
  ------------------
  837|      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]
  |  |  ------------------
  ------------------
  838|      0|        break;
  839|  15.9k|    }
  840|  15.9k|    return IGRAPH_SUCCESS;
  841|  15.9k|}
igraph_vit_destroy:
  856|  15.9k|void igraph_vit_destroy(const igraph_vit_t *vit) {
  857|  15.9k|    switch (vit->type) {
  858|  15.9k|    case IGRAPH_VIT_RANGE:
  ------------------
  |  Branch (858:5): [True: 15.9k, False: 0]
  ------------------
  859|  15.9k|    case IGRAPH_VIT_VECTORPTR:
  ------------------
  |  Branch (859:5): [True: 0, False: 15.9k]
  ------------------
  860|  15.9k|        break;
  861|      0|    case IGRAPH_VIT_VECTOR:
  ------------------
  |  Branch (861:5): [True: 0, False: 15.9k]
  ------------------
  862|      0|        igraph_vector_int_destroy((igraph_vector_int_t*) vit->vec);
  863|      0|        igraph_free((igraph_vector_int_t*) vit->vec);
  864|      0|        break;
  865|      0|    default:
  ------------------
  |  Branch (865:5): [True: 0, False: 15.9k]
  ------------------
  866|       |        /*     IGRAPH_ERROR("Cannot destroy iterator, unknown type", IGRAPH_EINVAL); */
  867|      0|        break;
  868|  15.9k|    }
  869|  15.9k|}
igraph_es_all:
  924|  4.85k|                  igraph_edgeorder_type_t order) {
  925|  4.85k|    switch (order) {
  926|  3.21k|    case IGRAPH_EDGEORDER_ID:
  ------------------
  |  Branch (926:5): [True: 3.21k, False: 1.64k]
  ------------------
  927|  3.21k|        es->type = IGRAPH_ES_ALL;
  928|  3.21k|        break;
  929|    822|    case IGRAPH_EDGEORDER_FROM:
  ------------------
  |  Branch (929:5): [True: 822, False: 4.03k]
  ------------------
  930|    822|        es->type = IGRAPH_ES_ALLFROM;
  931|    822|        break;
  932|    822|    case IGRAPH_EDGEORDER_TO:
  ------------------
  |  Branch (932:5): [True: 822, False: 4.03k]
  ------------------
  933|    822|        es->type = IGRAPH_ES_ALLTO;
  934|    822|        break;
  935|      0|    default:
  ------------------
  |  Branch (935:5): [True: 0, False: 4.85k]
  ------------------
  936|      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]
  |  |  ------------------
  ------------------
  937|      0|        break;
  938|  4.85k|    }
  939|  4.85k|    return IGRAPH_SUCCESS;
  940|  4.85k|}
igraph_ess_all:
  956|  4.03k|igraph_es_t igraph_ess_all(igraph_edgeorder_type_t order) {
  957|  4.03k|    igraph_es_t es;
  958|  4.03k|    igraph_es_all(&es, order); /* cannot fail */
  959|  4.03k|    return es;
  960|  4.03k|}
igraph_es_destroy:
 1411|    822|void igraph_es_destroy(igraph_es_t *es) {
 1412|    822|    switch (es->type) {
 1413|      0|    case IGRAPH_ES_ALL:
  ------------------
  |  Branch (1413:5): [True: 0, False: 822]
  ------------------
 1414|    822|    case IGRAPH_ES_ALLFROM:
  ------------------
  |  Branch (1414:5): [True: 822, False: 0]
  ------------------
 1415|    822|    case IGRAPH_ES_ALLTO:
  ------------------
  |  Branch (1415:5): [True: 0, False: 822]
  ------------------
 1416|    822|    case IGRAPH_ES_INCIDENT:
  ------------------
  |  Branch (1416:5): [True: 0, False: 822]
  ------------------
 1417|    822|    case IGRAPH_ES_NONE:
  ------------------
  |  Branch (1417:5): [True: 0, False: 822]
  ------------------
 1418|    822|    case IGRAPH_ES_1:
  ------------------
  |  Branch (1418:5): [True: 0, False: 822]
  ------------------
 1419|    822|    case IGRAPH_ES_VECTORPTR:
  ------------------
  |  Branch (1419:5): [True: 0, False: 822]
  ------------------
 1420|    822|    case IGRAPH_ES_RANGE:
  ------------------
  |  Branch (1420:5): [True: 0, False: 822]
  ------------------
 1421|    822|    case IGRAPH_ES_ALL_BETWEEN:
  ------------------
  |  Branch (1421:5): [True: 0, False: 822]
  ------------------
 1422|    822|        break;
 1423|      0|    case IGRAPH_ES_VECTOR:
  ------------------
  |  Branch (1423:5): [True: 0, False: 822]
  ------------------
 1424|      0|        igraph_vector_int_destroy((igraph_vector_int_t*)es->data.vecptr);
 1425|      0|        IGRAPH_FREE(es->data.vecptr);
  ------------------
  |  |   36|      0|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1426|      0|        break;
 1427|      0|    case IGRAPH_ES_PAIRS:
  ------------------
  |  Branch (1427:5): [True: 0, False: 822]
  ------------------
 1428|      0|    case IGRAPH_ES_PATH:
  ------------------
  |  Branch (1428:5): [True: 0, False: 822]
  ------------------
 1429|      0|        igraph_vector_int_destroy((igraph_vector_int_t*)es->data.path.ptr);
 1430|      0|        IGRAPH_FREE(es->data.path.ptr);
  ------------------
  |  |   36|      0|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1431|      0|        break;
 1432|      0|    default:
  ------------------
  |  Branch (1432:5): [True: 0, False: 822]
  ------------------
 1433|      0|        break;
 1434|    822|    }
 1435|    822|}
igraph_es_is_all:
 1448|  5.60k|igraph_bool_t igraph_es_is_all(const igraph_es_t *es) {
 1449|  5.60k|    return es->type == IGRAPH_ES_ALL;
 1450|  5.60k|}
igraph_eit_create:
 1928|  1.64k|igraph_error_t igraph_eit_create(const igraph_t *graph, igraph_es_t es, igraph_eit_t *eit) {
 1929|  1.64k|    switch (es.type) {
 1930|      0|    case IGRAPH_ES_ALL:
  ------------------
  |  Branch (1930:5): [True: 0, False: 1.64k]
  ------------------
 1931|      0|        eit->type = IGRAPH_EIT_RANGE;
 1932|      0|        eit->pos = 0;
 1933|      0|        eit->start = 0;
 1934|      0|        eit->end = igraph_ecount(graph);
 1935|      0|        break;
 1936|    822|    case IGRAPH_ES_ALLFROM:
  ------------------
  |  Branch (1936:5): [True: 822, False: 822]
  ------------------
 1937|    822|        IGRAPH_CHECK(igraph_i_eit_create_allfromto(graph, eit, IGRAPH_OUT));
  ------------------
  |  |  656|    822|    do { \
  |  |  657|    822|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    822|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
 1938|    822|        break;
 1939|    822|    case IGRAPH_ES_ALLTO:
  ------------------
  |  Branch (1939:5): [True: 822, False: 822]
  ------------------
 1940|    822|        IGRAPH_CHECK(igraph_i_eit_create_allfromto(graph, eit, IGRAPH_IN));
  ------------------
  |  |  656|    822|    do { \
  |  |  657|    822|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    822|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
 1941|    822|        break;
 1942|    822|    case IGRAPH_ES_INCIDENT:
  ------------------
  |  Branch (1942:5): [True: 0, False: 1.64k]
  ------------------
 1943|      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]
  |  |  ------------------
  ------------------
 1944|      0|        break;
 1945|      0|    case IGRAPH_ES_NONE:
  ------------------
  |  Branch (1945:5): [True: 0, False: 1.64k]
  ------------------
 1946|      0|        eit->type = IGRAPH_EIT_RANGE;
 1947|      0|        eit->pos = 0;
 1948|      0|        eit->start = 0;
 1949|      0|        eit->end = 0;
 1950|      0|        break;
 1951|      0|    case IGRAPH_ES_1:
  ------------------
  |  Branch (1951:5): [True: 0, False: 1.64k]
  ------------------
 1952|      0|        if (es.data.eid < 0 || es.data.eid >= igraph_ecount(graph)) {
  ------------------
  |  Branch (1952:13): [True: 0, False: 0]
  |  Branch (1952:32): [True: 0, False: 0]
  ------------------
 1953|      0|            IGRAPH_ERROR("Cannot create iterator, invalid edge ID.", 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]
  |  |  ------------------
  ------------------
 1954|      0|        }
 1955|      0|        eit->type = IGRAPH_EIT_RANGE;
 1956|      0|        eit->pos = es.data.eid;
 1957|      0|        eit->start = es.data.eid;
 1958|      0|        eit->end = es.data.eid + 1;
 1959|      0|        break;
 1960|      0|    case IGRAPH_ES_VECTOR:
  ------------------
  |  Branch (1960:5): [True: 0, False: 1.64k]
  ------------------
 1961|      0|    case IGRAPH_ES_VECTORPTR:
  ------------------
  |  Branch (1961:5): [True: 0, False: 1.64k]
  ------------------
 1962|      0|        eit->type = IGRAPH_EIT_VECTORPTR;
 1963|      0|        eit->pos = 0;
 1964|      0|        eit->start = 0;
 1965|      0|        eit->vec = es.data.vecptr;
 1966|      0|        eit->end = igraph_vector_int_size(eit->vec);
 1967|      0|        if (!igraph_vector_int_isininterval(eit->vec, 0, igraph_ecount(graph) - 1)) {
  ------------------
  |  Branch (1967:13): [True: 0, False: 0]
  ------------------
 1968|      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]
  |  |  ------------------
  ------------------
 1969|      0|        }
 1970|      0|        break;
 1971|      0|    case IGRAPH_ES_RANGE:
  ------------------
  |  Branch (1971:5): [True: 0, False: 1.64k]
  ------------------
 1972|      0|        {
 1973|      0|            igraph_int_t no_of_edges = igraph_ecount(graph);
 1974|      0|            if (es.data.range.start < 0 ||
  ------------------
  |  Branch (1974:17): [True: 0, False: 0]
  ------------------
 1975|      0|                es.data.range.start > no_of_edges ||
  ------------------
  |  Branch (1975:17): [True: 0, False: 0]
  ------------------
 1976|      0|                (no_of_edges > 0 && es.data.range.start == no_of_edges)) {
  ------------------
  |  Branch (1976:18): [True: 0, False: 0]
  |  Branch (1976:37): [True: 0, False: 0]
  ------------------
 1977|      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]
  |  |  ------------------
  ------------------
 1978|      0|            }
 1979|      0|            if (es.data.range.end < 0 || es.data.range.end > no_of_edges) {
  ------------------
  |  Branch (1979:17): [True: 0, False: 0]
  |  Branch (1979:42): [True: 0, False: 0]
  ------------------
 1980|      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]
  |  |  ------------------
  ------------------
 1981|      0|            }
 1982|      0|        }
 1983|      0|        eit->type = IGRAPH_EIT_RANGE;
 1984|      0|        eit->pos = es.data.range.start;
 1985|      0|        eit->start = es.data.range.start;
 1986|      0|        eit->end = es.data.range.end;
 1987|      0|        break;
 1988|      0|    case IGRAPH_ES_PAIRS:
  ------------------
  |  Branch (1988:5): [True: 0, False: 1.64k]
  ------------------
 1989|      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]
  |  |  ------------------
  ------------------
 1990|      0|        break;
 1991|      0|    case IGRAPH_ES_PATH:
  ------------------
  |  Branch (1991:5): [True: 0, False: 1.64k]
  ------------------
 1992|      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]
  |  |  ------------------
  ------------------
 1993|      0|        break;
 1994|      0|    case IGRAPH_ES_ALL_BETWEEN:
  ------------------
  |  Branch (1994:5): [True: 0, False: 1.64k]
  ------------------
 1995|      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]
  |  |  ------------------
  ------------------
 1996|      0|        break;
 1997|      0|    default:
  ------------------
  |  Branch (1997:5): [True: 0, False: 1.64k]
  ------------------
 1998|      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]
  |  |  ------------------
  ------------------
 1999|      0|        break;
 2000|  1.64k|    }
 2001|  1.64k|    return IGRAPH_SUCCESS;
 2002|  1.64k|}
igraph_eit_destroy:
 2014|  1.64k|void igraph_eit_destroy(const igraph_eit_t *eit) {
 2015|  1.64k|    switch (eit->type) {
 2016|      0|    case IGRAPH_EIT_RANGE:
  ------------------
  |  Branch (2016:5): [True: 0, False: 1.64k]
  ------------------
 2017|      0|    case IGRAPH_EIT_VECTORPTR:
  ------------------
  |  Branch (2017:5): [True: 0, False: 1.64k]
  ------------------
 2018|      0|        break;
 2019|  1.64k|    case IGRAPH_EIT_VECTOR:
  ------------------
  |  Branch (2019:5): [True: 1.64k, False: 0]
  ------------------
 2020|  1.64k|        igraph_vector_int_destroy((igraph_vector_int_t*)eit->vec);
 2021|  1.64k|        igraph_free((igraph_vector_int_t*)eit->vec);
 2022|  1.64k|        break;
 2023|      0|    default:
  ------------------
  |  Branch (2023:5): [True: 0, False: 1.64k]
  ------------------
 2024|       |        /*     IGRAPH_ERROR("Cannot destroy iterator, unknown type", IGRAPH_EINVAL); */
 2025|      0|        break;
 2026|  1.64k|    }
 2027|  1.64k|}
iterators.c:igraph_i_eit_create_allfromto:
 1702|  1.64k|                                         igraph_neimode_t mode) {
 1703|  1.64k|    igraph_vector_int_t *vec;
 1704|  1.64k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
 1705|  1.64k|    igraph_int_t no_of_edges = igraph_ecount(graph);
 1706|       |
 1707|  1.64k|    vec = IGRAPH_CALLOC(1, igraph_vector_int_t);
  ------------------
  |  |   33|  1.64k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  3.28k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 0, Folded]
  |  |  |  |  |  Branch (31:24): [True: 0, Folded]
  |  |  |  |  |  Branch (31:66): [True: 1.64k, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1708|  1.64k|    IGRAPH_CHECK_OOM(vec, "Cannot create edge iterator.");
  ------------------
  |  |  709|  1.64k|    do { \
  |  |  710|  1.64k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
 1709|  1.64k|    IGRAPH_FINALLY(igraph_free, vec);
  ------------------
  |  |  603|  1.64k|    do { \
  |  |  604|  1.64k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  1.64k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  1.64k|         * incorrect destructor function with the pointer */ \
  |  |  607|  1.64k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 1.64k]
  |  |  ------------------
  |  |  608|  1.64k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
 1710|       |
 1711|  1.64k|    IGRAPH_VECTOR_INT_INIT_FINALLY(vec, 0);
  ------------------
  |  |  119|  1.64k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  1.64k|    do { \
  |  |  |  |  657|  1.64k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.64k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.64k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  1.64k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  1.64k|    do { \
  |  |  |  |  604|  1.64k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.64k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.64k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.64k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.64k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.64k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.64k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
 1712|  1.64k|    IGRAPH_CHECK(igraph_vector_int_reserve(vec, no_of_edges));
  ------------------
  |  |  656|  1.64k|    do { \
  |  |  657|  1.64k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.64k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
 1713|       |
 1714|  1.64k|    if (igraph_is_directed(graph)) {
  ------------------
  |  Branch (1714:9): [True: 822, False: 822]
  ------------------
 1715|    822|        igraph_vector_int_t adj;
 1716|    822|        IGRAPH_VECTOR_INT_INIT_FINALLY(&adj, 0);
  ------------------
  |  |  119|    822|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    822|    do { \
  |  |  |  |  657|    822|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    822|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    822|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|    822|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    822|    do { \
  |  |  |  |  604|    822|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    822|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    822|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    822|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 822]
  |  |  |  |  ------------------
  |  |  |  |  608|    822|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    822|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 822]
  |  |  ------------------
  ------------------
 1717|  37.7k|        for (igraph_int_t i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (1717:34): [True: 36.9k, False: 822]
  ------------------
 1718|  36.9k|            IGRAPH_CHECK(igraph_incident(graph, &adj, i, mode, IGRAPH_LOOPS));
  ------------------
  |  |  656|  36.9k|    do { \
  |  |  657|  36.9k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  36.9k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  36.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 36.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|  36.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 36.9k]
  |  |  ------------------
  ------------------
 1719|  36.9k|            igraph_vector_int_append(vec, &adj);  /* reserved */
 1720|  36.9k|        }
 1721|    822|        igraph_vector_int_destroy(&adj);
 1722|    822|        IGRAPH_FINALLY_CLEAN(1);
 1723|    822|    } else {
 1724|    822|        igraph_vector_int_t adj;
 1725|    822|        igraph_bool_t *added;
 1726|    822|        IGRAPH_VECTOR_INT_INIT_FINALLY(&adj, 0);
  ------------------
  |  |  119|    822|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    822|    do { \
  |  |  |  |  657|    822|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    822|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    822|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|    822|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    822|    do { \
  |  |  |  |  604|    822|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    822|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    822|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    822|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 822]
  |  |  |  |  ------------------
  |  |  |  |  608|    822|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    822|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 822]
  |  |  ------------------
  ------------------
 1727|    822|        added = IGRAPH_CALLOC(no_of_edges, igraph_bool_t);
  ------------------
  |  |   33|    822|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  1.64k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 822, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 822, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 777, False: 45]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1728|    822|        IGRAPH_CHECK_OOM(added, "Cannot create edge iterator.");
  ------------------
  |  |  709|    822|    do { \
  |  |  710|    822|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
 1729|    822|        IGRAPH_FINALLY(igraph_free, added);
  ------------------
  |  |  603|    822|    do { \
  |  |  604|    822|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    822|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    822|         * incorrect destructor function with the pointer */ \
  |  |  607|    822|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 822]
  |  |  ------------------
  |  |  608|    822|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
 1730|  37.7k|        for (igraph_int_t i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (1730:34): [True: 36.9k, False: 822]
  ------------------
 1731|  36.9k|            IGRAPH_CHECK(igraph_incident(graph, &adj, i, IGRAPH_ALL, IGRAPH_LOOPS));
  ------------------
  |  |  656|  36.9k|    do { \
  |  |  657|  36.9k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  36.9k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  36.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 36.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|  36.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 36.9k]
  |  |  ------------------
  ------------------
 1732|  36.9k|            const igraph_int_t length = igraph_vector_int_size(&adj);
 1733|  55.7k|            for (igraph_int_t j = 0; j < length; j++) {
  ------------------
  |  Branch (1733:38): [True: 18.8k, False: 36.9k]
  ------------------
 1734|  18.8k|                if (!added[ VECTOR(adj)[j] ]) {
  ------------------
  |  |   60|  18.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1734:21): [True: 9.41k, False: 9.41k]
  ------------------
 1735|  9.41k|                    igraph_vector_int_push_back(vec, VECTOR(adj)[j]);  /* reserved */
  ------------------
  |  |   60|  9.41k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1736|  9.41k|                    added[ VECTOR(adj)[j] ] = true;
  ------------------
  |  |   60|  9.41k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1737|  9.41k|                }
 1738|  18.8k|            }
 1739|  36.9k|        }
 1740|    822|        igraph_vector_int_destroy(&adj);
 1741|    822|        IGRAPH_FREE(added);
  ------------------
  |  |   36|    822|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1742|    822|        IGRAPH_FINALLY_CLEAN(2);
 1743|    822|    }
 1744|       |
 1745|  1.64k|    eit->type = IGRAPH_EIT_VECTOR;
 1746|  1.64k|    eit->pos = 0;
 1747|  1.64k|    eit->start = 0;
 1748|  1.64k|    eit->vec = vec;
 1749|  1.64k|    eit->end = igraph_vector_int_size(eit->vec);
 1750|       |
 1751|  1.64k|    IGRAPH_FINALLY_CLEAN(2);
 1752|  1.64k|    return IGRAPH_SUCCESS;
 1753|  1.64k|}

igraph_empty:
   64|  2.49k|igraph_error_t igraph_empty(igraph_t *graph, igraph_int_t n, igraph_bool_t directed) {
   65|  2.49k|    return igraph_empty_attrs(graph, n, directed, 0);
   66|  2.49k|}

igraph_empty_attrs:
  102|  2.49k|) {
  103|       |
  104|  2.49k|    if (n < 0) {
  ------------------
  |  Branch (104:9): [True: 0, False: 2.49k]
  ------------------
  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|  2.49k|    memset(graph, 0, sizeof(igraph_t));
  109|       |
  110|  2.49k|    graph->n = 0;
  111|  2.49k|    graph->directed = directed;
  112|  2.49k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&graph->from, 0);
  ------------------
  |  |  119|  2.49k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.49k|    do { \
  |  |  |  |  657|  2.49k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.49k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.49k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.49k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.49k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.49k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.49k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.49k|    do { \
  |  |  |  |  604|  2.49k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.49k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.49k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.49k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.49k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.49k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.49k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.49k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.49k]
  |  |  ------------------
  ------------------
  113|  2.49k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&graph->to, 0);
  ------------------
  |  |  119|  2.49k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.49k|    do { \
  |  |  |  |  657|  2.49k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.49k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.49k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.49k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.49k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.49k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.49k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.49k|    do { \
  |  |  |  |  604|  2.49k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.49k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.49k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.49k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.49k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.49k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.49k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.49k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.49k]
  |  |  ------------------
  ------------------
  114|  2.49k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&graph->oi, 0);
  ------------------
  |  |  119|  2.49k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.49k|    do { \
  |  |  |  |  657|  2.49k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.49k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.49k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.49k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.49k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.49k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.49k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.49k|    do { \
  |  |  |  |  604|  2.49k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.49k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.49k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.49k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.49k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.49k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.49k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.49k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.49k]
  |  |  ------------------
  ------------------
  115|  2.49k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&graph->ii, 0);
  ------------------
  |  |  119|  2.49k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.49k|    do { \
  |  |  |  |  657|  2.49k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.49k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.49k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.49k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.49k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.49k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.49k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.49k|    do { \
  |  |  |  |  604|  2.49k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.49k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.49k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.49k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.49k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.49k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.49k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.49k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.49k]
  |  |  ------------------
  ------------------
  116|  2.49k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&graph->os, 1);
  ------------------
  |  |  119|  2.49k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.49k|    do { \
  |  |  |  |  657|  2.49k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.49k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.49k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.49k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.49k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.49k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.49k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.49k|    do { \
  |  |  |  |  604|  2.49k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.49k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.49k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.49k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.49k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.49k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.49k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.49k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.49k]
  |  |  ------------------
  ------------------
  117|  2.49k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&graph->is, 1);
  ------------------
  |  |  119|  2.49k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.49k|    do { \
  |  |  |  |  657|  2.49k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.49k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.49k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.49k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.49k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.49k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.49k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.49k|    do { \
  |  |  |  |  604|  2.49k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.49k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.49k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.49k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.49k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.49k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.49k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.49k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.49k]
  |  |  ------------------
  ------------------
  118|       |
  119|       |    /* init cache */
  120|  2.49k|    graph->cache = IGRAPH_CALLOC(1, igraph_i_property_cache_t);
  ------------------
  |  |   33|  2.49k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  4.99k|    (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.49k, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  121|  2.49k|    IGRAPH_CHECK_OOM(graph->cache, "Cannot create graph.");
  ------------------
  |  |  709|  2.49k|    do { \
  |  |  710|  2.49k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  2.49k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.49k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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.49k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 2.49k]
  |  |  ------------------
  ------------------
  122|  2.49k|    IGRAPH_FINALLY(igraph_free, graph->cache);
  ------------------
  |  |  603|  2.49k|    do { \
  |  |  604|  2.49k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.49k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.49k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.49k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.49k]
  |  |  ------------------
  |  |  608|  2.49k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.49k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.49k]
  |  |  ------------------
  ------------------
  123|  2.49k|    IGRAPH_CHECK(igraph_i_property_cache_init(graph->cache));
  ------------------
  |  |  656|  2.49k|    do { \
  |  |  657|  2.49k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.49k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.49k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.49k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.49k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.49k]
  |  |  ------------------
  ------------------
  124|  2.49k|    IGRAPH_FINALLY(igraph_i_property_cache_destroy, graph->cache);
  ------------------
  |  |  603|  2.49k|    do { \
  |  |  604|  2.49k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.49k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.49k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.49k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.49k]
  |  |  ------------------
  |  |  608|  2.49k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.49k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.49k]
  |  |  ------------------
  ------------------
  125|       |
  126|  2.49k|    VECTOR(graph->os)[0] = 0;
  ------------------
  |  |   60|  2.49k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  127|  2.49k|    VECTOR(graph->is)[0] = 0;
  ------------------
  |  |   60|  2.49k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  128|       |
  129|       |    /* init attributes */
  130|  2.49k|    IGRAPH_CHECK(igraph_i_attribute_init(graph, attr));
  ------------------
  |  |  656|  2.49k|    do { \
  |  |  657|  2.49k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.49k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.49k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.49k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.49k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.49k]
  |  |  ------------------
  ------------------
  131|       |
  132|       |    /* add the vertices */
  133|  2.49k|    IGRAPH_CHECK(igraph_add_vertices(graph, n, 0));
  ------------------
  |  |  656|  2.49k|    do { \
  |  |  657|  2.49k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.49k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.49k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.49k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.49k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.49k]
  |  |  ------------------
  ------------------
  134|       |
  135|  2.49k|    IGRAPH_FINALLY_CLEAN(8);
  136|  2.49k|    return IGRAPH_SUCCESS;
  137|  2.49k|}
igraph_destroy:
  155|  2.49k|void igraph_destroy(igraph_t *graph) {
  156|  2.49k|    igraph_i_attribute_destroy(graph);
  157|       |
  158|  2.49k|    igraph_i_property_cache_destroy(graph->cache);
  159|  2.49k|    IGRAPH_FREE(graph->cache);
  ------------------
  |  |   36|  2.49k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  160|       |
  161|  2.49k|    igraph_vector_int_destroy(&graph->from);
  162|  2.49k|    igraph_vector_int_destroy(&graph->to);
  163|  2.49k|    igraph_vector_int_destroy(&graph->oi);
  164|  2.49k|    igraph_vector_int_destroy(&graph->ii);
  165|  2.49k|    igraph_vector_int_destroy(&graph->os);
  166|  2.49k|    igraph_vector_int_destroy(&graph->is);
  167|  2.49k|}
igraph_add_edges:
  258|  2.33k|) {
  259|  2.33k|    igraph_int_t no_of_edges = igraph_vector_int_size(&graph->from);
  260|  2.33k|    igraph_int_t edges_to_add = igraph_vector_int_size(edges) / 2;
  261|  2.33k|    igraph_int_t new_no_of_edges;
  262|  2.33k|    igraph_int_t i = 0;
  263|  2.33k|    igraph_vector_int_t newoi, newii;
  264|  2.33k|    igraph_bool_t directed = igraph_is_directed(graph);
  265|       |
  266|  2.33k|    if (igraph_vector_int_size(edges) % 2 != 0) {
  ------------------
  |  Branch (266:9): [True: 0, False: 2.33k]
  ------------------
  267|      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]
  |  |  ------------------
  ------------------
  268|      0|    }
  269|  2.33k|    if (!igraph_vector_int_isininterval(edges, 0, igraph_vcount(graph) - 1)) {
  ------------------
  |  Branch (269:9): [True: 0, False: 2.33k]
  ------------------
  270|      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]
  |  |  ------------------
  ------------------
  271|      0|    }
  272|       |
  273|       |    /* from & to */
  274|  2.33k|    IGRAPH_SAFE_ADD(no_of_edges, edges_to_add, &new_no_of_edges);
  ------------------
  |  |   47|  2.33k|    do { \
  |  |   48|  2.33k|        igraph_int_t _safe_a = (a), _safe_b = (b); \
  |  |   49|  2.33k|        igraph_int_t _safe_sum; \
  |  |   50|  2.33k|        if (__builtin_add_overflow(_safe_a, _safe_b, &_safe_sum)) { \
  |  |  ------------------
  |  |  |  Branch (50:13): [True: 0, False: 2.33k]
  |  |  ------------------
  |  |   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|  2.33k|        *(res) = _safe_sum; \
  |  |   54|  2.33k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (54:14): [Folded, False: 2.33k]
  |  |  ------------------
  ------------------
  275|  2.33k|    if (new_no_of_edges > IGRAPH_ECOUNT_MAX) {
  ------------------
  |  |  120|  2.33k|#define IGRAPH_ECOUNT_MAX (IGRAPH_INTEGER_MAX/2)
  |  |  ------------------
  |  |  |  |   74|  2.33k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  |  |  ------------------
  ------------------
  |  Branch (275:9): [True: 0, False: 2.33k]
  ------------------
  276|      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]
  |  |  ------------------
  ------------------
  277|      0|                      IGRAPH_ECOUNT_MAX);
  278|      0|    }
  279|  2.33k|    IGRAPH_CHECK(igraph_vector_int_reserve(&graph->from, no_of_edges + edges_to_add));
  ------------------
  |  |  656|  2.33k|    do { \
  |  |  657|  2.33k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.33k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.33k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.33k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.33k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.33k]
  |  |  ------------------
  ------------------
  280|  2.33k|    IGRAPH_CHECK(igraph_vector_int_reserve(&graph->to, no_of_edges + edges_to_add));
  ------------------
  |  |  656|  2.33k|    do { \
  |  |  657|  2.33k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.33k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.33k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.33k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.33k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.33k]
  |  |  ------------------
  ------------------
  281|       |
  282|  39.5k|    while (i < edges_to_add * 2) {
  ------------------
  |  Branch (282:12): [True: 37.2k, False: 2.33k]
  ------------------
  283|  37.2k|        if (directed || VECTOR(*edges)[i] > VECTOR(*edges)[i + 1]) {
  ------------------
  |  |   60|  18.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      if (directed || VECTOR(*edges)[i] > VECTOR(*edges)[i + 1]) {
  ------------------
  |  |   60|  18.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (283:13): [True: 18.7k, False: 18.5k]
  |  Branch (283:25): [True: 18.2k, False: 303]
  ------------------
  284|  36.9k|            igraph_vector_int_push_back(&graph->from, VECTOR(*edges)[i++]); /* reserved */
  ------------------
  |  |   60|  36.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  285|  36.9k|            igraph_vector_int_push_back(&graph->to,   VECTOR(*edges)[i++]); /* reserved */
  ------------------
  |  |   60|  36.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  286|  36.9k|        } else {
  287|    303|            igraph_vector_int_push_back(&graph->to,   VECTOR(*edges)[i++]); /* reserved */
  ------------------
  |  |   60|    303|#define VECTOR(v) ((v).stor_begin)
  ------------------
  288|    303|            igraph_vector_int_push_back(&graph->from, VECTOR(*edges)[i++]); /* reserved */
  ------------------
  |  |   60|    303|#define VECTOR(v) ((v).stor_begin)
  ------------------
  289|    303|        }
  290|  37.2k|    }
  291|       |
  292|       |    /* If an error occurs while the edges are being added, we make the necessary fixup
  293|       |     * to ensure that the graph is still in a consistent state when this function returns.
  294|       |     * The graph may already be on the finally stack when calling this function. We use
  295|       |     * a separate finally stack level to avoid its destructor from being called on error,
  296|       |     * so that the fixup can succeed.
  297|       |     */
  298|       |
  299|  2.33k|#define CHECK_ERR(expr) \
  300|  2.33k|    do { \
  301|  2.33k|        igraph_error_t err = (expr); \
  302|  2.33k|        if (err != IGRAPH_SUCCESS) { \
  303|  2.33k|            igraph_vector_int_resize(&graph->from, no_of_edges); /* gets smaller, error safe */ \
  304|  2.33k|            igraph_vector_int_resize(&graph->to, no_of_edges);   /* gets smaller, error safe */ \
  305|  2.33k|            IGRAPH_FINALLY_EXIT(); \
  306|  2.33k|            IGRAPH_ERROR("Cannot add edges.", err); \
  307|  2.33k|        } \
  308|  2.33k|    } while (0)
  309|       |
  310|       |    /* oi & ii */
  311|  2.33k|    IGRAPH_FINALLY_ENTER();
  312|  2.33k|    {
  313|  2.33k|        CHECK_ERR(igraph_vector_int_init(&newoi, no_of_edges));
  ------------------
  |  |  300|  2.33k|    do { \
  |  |  301|  2.33k|        igraph_error_t err = (expr); \
  |  |  302|  2.33k|        if (err != IGRAPH_SUCCESS) { \
  |  |  ------------------
  |  |  |  Branch (302:13): [True: 0, False: 2.33k]
  |  |  ------------------
  |  |  303|      0|            igraph_vector_int_resize(&graph->from, no_of_edges); /* gets smaller, error safe */ \
  |  |  304|      0|            igraph_vector_int_resize(&graph->to, no_of_edges);   /* gets smaller, error safe */ \
  |  |  305|      0|            IGRAPH_FINALLY_EXIT(); \
  |  |  306|      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]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  307|      0|        } \
  |  |  308|  2.33k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (308:14): [Folded, False: 2.33k]
  |  |  ------------------
  ------------------
  314|  2.33k|        IGRAPH_FINALLY(igraph_vector_int_destroy, &newoi);
  ------------------
  |  |  603|  2.33k|    do { \
  |  |  604|  2.33k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.33k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.33k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.33k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.33k]
  |  |  ------------------
  |  |  608|  2.33k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.33k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.33k]
  |  |  ------------------
  ------------------
  315|  2.33k|        CHECK_ERR(igraph_vector_int_init(&newii, no_of_edges));
  ------------------
  |  |  300|  2.33k|    do { \
  |  |  301|  2.33k|        igraph_error_t err = (expr); \
  |  |  302|  2.33k|        if (err != IGRAPH_SUCCESS) { \
  |  |  ------------------
  |  |  |  Branch (302:13): [True: 0, False: 2.33k]
  |  |  ------------------
  |  |  303|      0|            igraph_vector_int_resize(&graph->from, no_of_edges); /* gets smaller, error safe */ \
  |  |  304|      0|            igraph_vector_int_resize(&graph->to, no_of_edges);   /* gets smaller, error safe */ \
  |  |  305|      0|            IGRAPH_FINALLY_EXIT(); \
  |  |  306|      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]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  307|      0|        } \
  |  |  308|  2.33k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (308:14): [Folded, False: 2.33k]
  |  |  ------------------
  ------------------
  316|  2.33k|        IGRAPH_FINALLY(igraph_vector_int_destroy, &newii);
  ------------------
  |  |  603|  2.33k|    do { \
  |  |  604|  2.33k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.33k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.33k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.33k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.33k]
  |  |  ------------------
  |  |  608|  2.33k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.33k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.33k]
  |  |  ------------------
  ------------------
  317|  2.33k|        CHECK_ERR(igraph_vector_int_pair_order(&graph->from, &graph->to, &newoi, graph->n));
  ------------------
  |  |  300|  2.33k|    do { \
  |  |  301|  2.33k|        igraph_error_t err = (expr); \
  |  |  302|  2.33k|        if (err != IGRAPH_SUCCESS) { \
  |  |  ------------------
  |  |  |  Branch (302:13): [True: 0, False: 2.33k]
  |  |  ------------------
  |  |  303|      0|            igraph_vector_int_resize(&graph->from, no_of_edges); /* gets smaller, error safe */ \
  |  |  304|      0|            igraph_vector_int_resize(&graph->to, no_of_edges);   /* gets smaller, error safe */ \
  |  |  305|      0|            IGRAPH_FINALLY_EXIT(); \
  |  |  306|      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]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  307|      0|        } \
  |  |  308|  2.33k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (308:14): [Folded, False: 2.33k]
  |  |  ------------------
  ------------------
  318|  2.33k|        CHECK_ERR(igraph_vector_int_pair_order(&graph->to, &graph->from, &newii, graph->n));
  ------------------
  |  |  300|  2.33k|    do { \
  |  |  301|  2.33k|        igraph_error_t err = (expr); \
  |  |  302|  2.33k|        if (err != IGRAPH_SUCCESS) { \
  |  |  ------------------
  |  |  |  Branch (302:13): [True: 0, False: 2.33k]
  |  |  ------------------
  |  |  303|      0|            igraph_vector_int_resize(&graph->from, no_of_edges); /* gets smaller, error safe */ \
  |  |  304|      0|            igraph_vector_int_resize(&graph->to, no_of_edges);   /* gets smaller, error safe */ \
  |  |  305|      0|            IGRAPH_FINALLY_EXIT(); \
  |  |  306|      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]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  307|      0|        } \
  |  |  308|  2.33k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (308:14): [Folded, False: 2.33k]
  |  |  ------------------
  ------------------
  319|       |
  320|       |        /* Attributes */
  321|  2.33k|        if (graph->attr) {
  ------------------
  |  Branch (321:13): [True: 2.33k, False: 0]
  ------------------
  322|       |            /* TODO: Does this keep the attribute table in a consistent state upon failure? */
  323|  2.33k|            CHECK_ERR(igraph_i_attribute_add_edges(graph, edges, attr));
  ------------------
  |  |  300|  2.33k|    do { \
  |  |  301|  2.33k|        igraph_error_t err = (expr); \
  |  |  302|  2.33k|        if (err != IGRAPH_SUCCESS) { \
  |  |  ------------------
  |  |  |  Branch (302:13): [True: 0, False: 2.33k]
  |  |  ------------------
  |  |  303|      0|            igraph_vector_int_resize(&graph->from, no_of_edges); /* gets smaller, error safe */ \
  |  |  304|      0|            igraph_vector_int_resize(&graph->to, no_of_edges);   /* gets smaller, error safe */ \
  |  |  305|      0|            IGRAPH_FINALLY_EXIT(); \
  |  |  306|      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]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  307|      0|        } \
  |  |  308|  2.33k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (308:14): [Folded, False: 2.33k]
  |  |  ------------------
  ------------------
  324|  2.33k|        }
  325|       |
  326|       |        /* os & is, its length does not change, error safe */
  327|  2.33k|        igraph_i_create_start_vectors(&graph->os, &graph->from, &newoi, graph->n);
  328|  2.33k|        igraph_i_create_start_vectors(&graph->is, &graph->to, &newii, graph->n);
  329|       |
  330|       |        /* everything went fine */
  331|  2.33k|        igraph_vector_int_destroy(&graph->oi);
  332|  2.33k|        igraph_vector_int_destroy(&graph->ii);
  333|  2.33k|        IGRAPH_FINALLY_CLEAN(2);
  334|       |
  335|  2.33k|        graph->oi = newoi;
  336|  2.33k|        graph->ii = newii;
  337|  2.33k|    }
  338|      0|    IGRAPH_FINALLY_EXIT();
  339|       |
  340|  2.33k|#undef CHECK_ERR
  341|       |
  342|       |    /* modification successful, clear the cached properties of the graph.
  343|       |     *
  344|       |     * Adding one or more edges cannot make a strongly or weakly connected
  345|       |     * graph disconnected, so we keep those flags if they are cached as true.
  346|       |     *
  347|       |     * Adding one or more edges may turn a DAG into a non-DAG or a forest into
  348|       |     * a non-forest, so we can keep those flags only if they are cached as
  349|       |     * false.
  350|       |     *
  351|       |     * Also, adding one or more edges does not change HAS_LOOP, HAS_MULTI and
  352|       |     * HAS_MUTUAL if they were already true.
  353|       |     */
  354|  2.33k|    igraph_i_property_cache_invalidate_conditionally(
  355|  2.33k|        graph,
  356|  2.33k|        /* keep_always = */ 0,
  357|       |        /* keep_when_false = */
  358|  2.33k|        (1 << IGRAPH_PROP_IS_DAG) | (1 << IGRAPH_PROP_IS_FOREST),
  359|       |        /* keep_when_true = */
  360|  2.33k|        (1 << IGRAPH_PROP_IS_WEAKLY_CONNECTED) |
  361|  2.33k|        (1 << IGRAPH_PROP_IS_STRONGLY_CONNECTED) |
  362|  2.33k|        (1 << IGRAPH_PROP_HAS_LOOP) |
  363|  2.33k|        (1 << IGRAPH_PROP_HAS_MULTI) |
  364|  2.33k|        (1 << IGRAPH_PROP_HAS_MUTUAL)
  365|  2.33k|    );
  366|       |
  367|  2.33k|    return IGRAPH_SUCCESS;
  368|  2.33k|}
igraph_add_vertices:
  392|  3.12k|) {
  393|  3.12k|    igraph_int_t ec = igraph_ecount(graph);
  394|  3.12k|    igraph_int_t vc = igraph_vcount(graph);
  395|  3.12k|    igraph_int_t new_vc;
  396|  3.12k|    igraph_int_t i;
  397|       |
  398|  3.12k|    if (nv < 0) {
  ------------------
  |  Branch (398:9): [True: 0, False: 3.12k]
  ------------------
  399|      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]
  |  |  ------------------
  ------------------
  400|      0|    }
  401|       |
  402|  3.12k|    IGRAPH_SAFE_ADD(graph->n, nv, &new_vc);
  ------------------
  |  |   47|  3.12k|    do { \
  |  |   48|  3.12k|        igraph_int_t _safe_a = (a), _safe_b = (b); \
  |  |   49|  3.12k|        igraph_int_t _safe_sum; \
  |  |   50|  3.12k|        if (__builtin_add_overflow(_safe_a, _safe_b, &_safe_sum)) { \
  |  |  ------------------
  |  |  |  Branch (50:13): [True: 0, False: 3.12k]
  |  |  ------------------
  |  |   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|  3.12k|        *(res) = _safe_sum; \
  |  |   54|  3.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (54:14): [Folded, False: 3.12k]
  |  |  ------------------
  ------------------
  403|  3.12k|    if (new_vc > IGRAPH_VCOUNT_MAX) {
  ------------------
  |  |  102|  3.12k|#define IGRAPH_VCOUNT_MAX (IGRAPH_INTEGER_MAX-1)
  |  |  ------------------
  |  |  |  |   74|  3.12k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  |  |  ------------------
  ------------------
  |  Branch (403:9): [True: 0, False: 3.12k]
  ------------------
  404|      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]
  |  |  ------------------
  ------------------
  405|      0|                      IGRAPH_VCOUNT_MAX);
  406|      0|    }
  407|  3.12k|    IGRAPH_CHECK(igraph_vector_int_reserve(&graph->os, new_vc + 1));
  ------------------
  |  |  656|  3.12k|    do { \
  |  |  657|  3.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  3.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  3.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.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|  3.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 3.12k]
  |  |  ------------------
  ------------------
  408|  3.12k|    IGRAPH_CHECK(igraph_vector_int_reserve(&graph->is, new_vc + 1));
  ------------------
  |  |  656|  3.12k|    do { \
  |  |  657|  3.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  3.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  3.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.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|  3.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 3.12k]
  |  |  ------------------
  ------------------
  409|       |
  410|  3.12k|    igraph_vector_int_resize(&graph->os, new_vc + 1); /* reserved */
  411|  3.12k|    igraph_vector_int_resize(&graph->is, new_vc + 1); /* reserved */
  412|   119k|    for (i = graph->n + 1; i < new_vc + 1; i++) {
  ------------------
  |  Branch (412:28): [True: 116k, False: 3.12k]
  ------------------
  413|   116k|        VECTOR(graph->os)[i] = ec;
  ------------------
  |  |   60|   116k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  414|   116k|        VECTOR(graph->is)[i] = ec;
  ------------------
  |  |   60|   116k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  415|   116k|    }
  416|       |
  417|  3.12k|    graph->n += nv;
  418|       |
  419|       |    /* Add attributes if necessary. This section is protected with
  420|       |     * FINALLY_ENTER/EXIT so that the graph would not be accidentally
  421|       |     * free upon error until it could be restored to a consistent state. */
  422|       |
  423|  3.12k|    if (graph->attr) {
  ------------------
  |  Branch (423:9): [True: 3.12k, False: 0]
  ------------------
  424|  3.12k|        igraph_error_t err;
  425|  3.12k|        IGRAPH_FINALLY_ENTER();
  426|  3.12k|        err = igraph_i_attribute_add_vertices(graph, nv, attr);
  427|  3.12k|        if (err != IGRAPH_SUCCESS) {
  ------------------
  |  Branch (427:13): [True: 0, False: 3.12k]
  ------------------
  428|       |            /* Restore original vertex count on failure */
  429|      0|            graph->n = vc;
  430|      0|            igraph_vector_int_resize(&graph->os, vc + 1); /* shrinks */
  431|      0|            igraph_vector_int_resize(&graph->is, vc + 1); /* shrinks */
  432|      0|        }
  433|  3.12k|        IGRAPH_FINALLY_EXIT();
  434|  3.12k|        if (err != IGRAPH_SUCCESS) {
  ------------------
  |  Branch (434:13): [True: 0, False: 3.12k]
  ------------------
  435|      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]
  |  |  ------------------
  ------------------
  436|      0|        }
  437|  3.12k|    }
  438|       |
  439|       |    /* modification successful, clear the cached properties of the graph.
  440|       |     *
  441|       |     * Adding one or more nodes does not change the following cached properties:
  442|       |     *
  443|       |     * - IGRAPH_PROP_HAS_LOOP
  444|       |     * - IGRAPH_PROP_HAS_MULTI
  445|       |     * - IGRAPH_PROP_HAS_MUTUAL
  446|       |     * - IGRAPH_PROP_IS_DAG (adding a node does not create/destroy cycles)
  447|       |     * - IGRAPH_PROP_IS_FOREST (same)
  448|       |     *
  449|       |     * Adding one or more nodes without any edges incident on them is sure to
  450|       |     * make the graph disconnected (weakly or strongly), so we can keep the
  451|       |     * connectivity-related properties if they are currently cached as false.
  452|       |     * (Actually, even if they weren't cached as false, we could still set them
  453|       |     * to false, but we don't have that functionality yet). The only exception
  454|       |     * is when the graph had zero vertices and gained only one vertex, because
  455|       |     * it then becomes connected. That's why we have the condition below in the
  456|       |     * keep_when_false section.
  457|       |     */
  458|  3.12k|    igraph_i_property_cache_invalidate_conditionally(
  459|  3.12k|        graph,
  460|       |        /* keep_always = */
  461|  3.12k|        (1 << IGRAPH_PROP_HAS_LOOP) |
  462|  3.12k|        (1 << IGRAPH_PROP_HAS_MULTI) |
  463|  3.12k|        (1 << IGRAPH_PROP_HAS_MUTUAL) |
  464|  3.12k|        (1 << IGRAPH_PROP_IS_DAG) |
  465|  3.12k|        (1 << IGRAPH_PROP_IS_FOREST),
  466|       |        /* keep_when_false = */
  467|  3.12k|        igraph_vcount(graph) >= 2 ? (
  ------------------
  |  Branch (467:9): [True: 2.84k, False: 279]
  ------------------
  468|  2.84k|            (1 << IGRAPH_PROP_IS_STRONGLY_CONNECTED) |
  469|  2.84k|            (1 << IGRAPH_PROP_IS_WEAKLY_CONNECTED)
  470|  2.84k|        ) : 0,
  471|       |        /* keep_when_true = */
  472|  3.12k|        0
  473|  3.12k|    );
  474|       |
  475|  3.12k|    return IGRAPH_SUCCESS;
  476|  3.12k|}
igraph_vcount:
  830|  1.02M|igraph_int_t igraph_vcount(const igraph_t *graph) {
  831|  1.02M|    return graph->n;
  832|  1.02M|}
igraph_ecount:
  844|  27.4k|igraph_int_t igraph_ecount(const igraph_t *graph) {
  845|  27.4k|    return igraph_vector_int_size(&graph->from);
  846|  27.4k|}
igraph_neighbors:
  895|  36.9k|) {
  896|       |
  897|  36.9k|#define DEDUPLICATE_IF_NEEDED(vertex, n)                                          \
  898|  36.9k|    if (should_filter_duplicates) {                                               \
  899|  36.9k|        if (vertex == pnode) {                                                    \
  900|       |            /* This is a loop edge */                                             \
  901|  36.9k|            if (loops == IGRAPH_NO_LOOPS) {                                       \
  902|       |                /* Filtering loop edges unconditionally */                        \
  903|  36.9k|                length -= n;                                                      \
  904|  36.9k|                continue;                                                         \
  905|  36.9k|            } else if (loops == IGRAPH_LOOPS_ONCE && vertex == last_added) {      \
  906|       |                /* Filtering every second endpoint of loop edges */               \
  907|  36.9k|                length -= n;                                                      \
  908|  36.9k|                last_added = -1;                                                  \
  909|  36.9k|                seen_loop = true;                                                 \
  910|  36.9k|                continue;                                                         \
  911|  36.9k|            } else if (multiple == IGRAPH_NO_MULTIPLE && seen_loop) {             \
  912|       |                /* Filtering multi-loop edges */                                  \
  913|  36.9k|                length -= n;                                                      \
  914|  36.9k|                continue;                                                         \
  915|  36.9k|            } else {                                                              \
  916|  36.9k|                seen_loop = (loops != IGRAPH_LOOPS_TWICE || last_added == vertex);\
  917|  36.9k|                last_added = vertex;                                              \
  918|  36.9k|            }                                                                     \
  919|  36.9k|        } else {                                                                  \
  920|       |            /* Not a loop edge */                                                 \
  921|  36.9k|            if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {         \
  922|       |                /* Filtering multi-edges */                                       \
  923|  36.9k|                length -= n;                                                      \
  924|  36.9k|                continue;                                                         \
  925|  36.9k|            } else {                                                              \
  926|  36.9k|                last_added = vertex;                                              \
  927|  36.9k|            }                                                                     \
  928|  36.9k|        }                                                                         \
  929|  36.9k|    }
  930|       |
  931|  36.9k|    igraph_int_t length = 0, idx = 0;
  932|  36.9k|    igraph_int_t i, j;
  933|       |
  934|  36.9k|    igraph_int_t node = pnode;
  935|  36.9k|    igraph_int_t last_added = -1;
  936|  36.9k|    igraph_bool_t should_filter_duplicates;
  937|       |
  938|       |    /* seen_loop stores whether we have already seen at least one full loop
  939|       |     * edge while iterating over the neighbor lists. This is needed to handle
  940|       |     * multi-loop edges properly. Since internally we always store loop edges
  941|       |     * twice, this flag should become true only if we processed both endpoints
  942|       |     * for a loop edge */
  943|  36.9k|    igraph_bool_t seen_loop = false;
  944|       |
  945|       |    /* normalize Boolean value to enable == comparisons below and in DEDUPLICATE_IF_NEEDED */
  946|  36.9k|    multiple = !!multiple;
  947|       |
  948|  36.9k|    if (node < 0 || node > igraph_vcount(graph) - 1) {
  ------------------
  |  Branch (948:9): [True: 0, False: 36.9k]
  |  Branch (948:21): [True: 0, False: 36.9k]
  ------------------
  949|      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]
  |  |  ------------------
  ------------------
  950|      0|    }
  951|  36.9k|    if (mode != IGRAPH_OUT && mode != IGRAPH_IN && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (951:9): [True: 0, False: 36.9k]
  |  Branch (951:31): [True: 0, False: 0]
  |  Branch (951:52): [True: 0, False: 0]
  ------------------
  952|      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]
  |  |  ------------------
  ------------------
  953|      0|    }
  954|       |
  955|  36.9k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (955:9): [True: 0, False: 36.9k]
  ------------------
  956|      0|        mode = IGRAPH_ALL;
  957|      0|    }
  958|       |
  959|  36.9k|    if (mode != IGRAPH_ALL && loops == IGRAPH_LOOPS_TWICE) {
  ------------------
  |  Branch (959:9): [True: 36.9k, False: 0]
  |  Branch (959:31): [True: 36.9k, False: 0]
  ------------------
  960|       |        /*
  961|       |        IGRAPH_ERROR("For a directed graph (with directions not ignored), "
  962|       |                     "IGRAPH_LOOPS_TWICE does not make sense.", IGRAPH_EINVAL);
  963|       |        */
  964|  36.9k|        loops = IGRAPH_LOOPS_ONCE;
  965|  36.9k|    }
  966|       |
  967|       |    /* Calculate needed space first & allocate it */
  968|       |    /* Note that 'mode' is treated as a bit field here; it's okay because
  969|       |     * IGRAPH_ALL = IGRAPH_IN | IGRAPH_OUT, bit-wise */
  970|  36.9k|    if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (970:9): [True: 36.9k, False: 0]
  ------------------
  971|  36.9k|        length += (VECTOR(graph->os)[node + 1] - VECTOR(graph->os)[node]);
  ------------------
  |  |   60|  36.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      length += (VECTOR(graph->os)[node + 1] - VECTOR(graph->os)[node]);
  ------------------
  |  |   60|  36.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  972|  36.9k|    }
  973|  36.9k|    if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (973:9): [True: 0, False: 36.9k]
  ------------------
  974|      0|        length += (VECTOR(graph->is)[node + 1] - VECTOR(graph->is)[node]);
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      length += (VECTOR(graph->is)[node + 1] - VECTOR(graph->is)[node]);
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  975|      0|    }
  976|       |
  977|  36.9k|    IGRAPH_CHECK(igraph_vector_int_resize(neis, length));
  ------------------
  |  |  656|  36.9k|    do { \
  |  |  657|  36.9k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  36.9k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  36.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 36.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|  36.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 36.9k]
  |  |  ------------------
  ------------------
  978|       |
  979|       |    /* We are dealing with two sorted lists; one for the successors and one
  980|       |     * for the predecessors. If we have requested only one of them, we have
  981|       |     * an easy job. If we have requested both, we need to merge the two lists
  982|       |     * to ensure that the output is sorted by the vertex IDs of the "other"
  983|       |     * endpoint of the affected edges. We don't need to merge if the graph
  984|       |     * is undirected, because in that case the data structure guarantees that
  985|       |     * the "out-edges" contain only (u, v) pairs where u <= v and the
  986|       |     * "in-edges" contains the rest, so the result is sorted even without
  987|       |     * merging. */
  988|  36.9k|    if (!igraph_is_directed(graph) || mode != IGRAPH_ALL) {
  ------------------
  |  Branch (988:9): [True: 0, False: 36.9k]
  |  Branch (988:39): [True: 36.9k, False: 0]
  ------------------
  989|       |        /* graph is undirected or we did not ask for both directions in a
  990|       |         * directed graph; this is the easy case */
  991|       |
  992|  36.9k|        should_filter_duplicates = !(multiple == IGRAPH_MULTIPLE &&
  ------------------
  |  Branch (992:38): [True: 36.9k, False: 0]
  ------------------
  993|  36.9k|                ((!igraph_is_directed(graph) && loops == IGRAPH_LOOPS_TWICE) ||
  ------------------
  |  Branch (993:19): [True: 0, False: 36.9k]
  |  Branch (993:49): [True: 0, False: 0]
  ------------------
  994|  36.9k|                 (igraph_is_directed(graph) && loops != IGRAPH_NO_LOOPS)));
  ------------------
  |  Branch (994:19): [True: 36.9k, False: 0]
  |  Branch (994:48): [True: 36.9k, False: 0]
  ------------------
  995|       |
  996|  36.9k|        if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (996:13): [True: 36.9k, False: 0]
  ------------------
  997|  36.9k|            j = VECTOR(graph->os)[node + 1];
  ------------------
  |  |   60|  36.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  998|  55.1k|            for (i = VECTOR(graph->os)[node]; i < j; i++) {
  ------------------
  |  |   60|  36.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (998:47): [True: 18.2k, False: 36.9k]
  ------------------
  999|  18.2k|                igraph_int_t to = VECTOR(graph->to)[ VECTOR(graph->oi)[i] ];
  ------------------
  |  |   60|  18.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              igraph_int_t to = VECTOR(graph->to)[ VECTOR(graph->oi)[i] ];
  ------------------
  |  |   60|  18.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1000|  18.2k|                DEDUPLICATE_IF_NEEDED(to, 1);
  ------------------
  |  |  898|  18.2k|    if (should_filter_duplicates) {                                               \
  |  |  ------------------
  |  |  |  Branch (898:9): [True: 0, False: 18.2k]
  |  |  ------------------
  |  |  899|      0|        if (vertex == pnode) {                                                    \
  |  |  ------------------
  |  |  |  Branch (899:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  900|      0|            /* This is a loop edge */                                             \
  |  |  901|      0|            if (loops == IGRAPH_NO_LOOPS) {                                       \
  |  |  ------------------
  |  |  |  Branch (901:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  902|      0|                /* Filtering loop edges unconditionally */                        \
  |  |  903|      0|                length -= n;                                                      \
  |  |  904|      0|                continue;                                                         \
  |  |  905|      0|            } else if (loops == IGRAPH_LOOPS_ONCE && vertex == last_added) {      \
  |  |  ------------------
  |  |  |  Branch (905:24): [True: 0, False: 0]
  |  |  |  Branch (905:54): [True: 0, False: 0]
  |  |  ------------------
  |  |  906|      0|                /* Filtering every second endpoint of loop edges */               \
  |  |  907|      0|                length -= n;                                                      \
  |  |  908|      0|                last_added = -1;                                                  \
  |  |  909|      0|                seen_loop = true;                                                 \
  |  |  910|      0|                continue;                                                         \
  |  |  911|      0|            } else if (multiple == IGRAPH_NO_MULTIPLE && seen_loop) {             \
  |  |  ------------------
  |  |  |  Branch (911:24): [True: 0, False: 0]
  |  |  |  Branch (911:58): [True: 0, False: 0]
  |  |  ------------------
  |  |  912|      0|                /* Filtering multi-loop edges */                                  \
  |  |  913|      0|                length -= n;                                                      \
  |  |  914|      0|                continue;                                                         \
  |  |  915|      0|            } else {                                                              \
  |  |  916|      0|                seen_loop = (loops != IGRAPH_LOOPS_TWICE || last_added == vertex);\
  |  |  ------------------
  |  |  |  Branch (916:30): [True: 0, False: 0]
  |  |  |  Branch (916:61): [True: 0, False: 0]
  |  |  ------------------
  |  |  917|      0|                last_added = vertex;                                              \
  |  |  918|      0|            }                                                                     \
  |  |  919|      0|        } else {                                                                  \
  |  |  920|      0|            /* Not a loop edge */                                                 \
  |  |  921|      0|            if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {         \
  |  |  ------------------
  |  |  |  Branch (921:17): [True: 0, False: 0]
  |  |  |  Branch (921:51): [True: 0, False: 0]
  |  |  ------------------
  |  |  922|      0|                /* Filtering multi-edges */                                       \
  |  |  923|      0|                length -= n;                                                      \
  |  |  924|      0|                continue;                                                         \
  |  |  925|      0|            } else {                                                              \
  |  |  926|      0|                last_added = vertex;                                              \
  |  |  927|      0|            }                                                                     \
  |  |  928|      0|        }                                                                         \
  |  |  929|      0|    }
  ------------------
 1001|  18.2k|                VECTOR(*neis)[idx++] = to;
  ------------------
  |  |   60|  18.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1002|  18.2k|            }
 1003|  36.9k|        }
 1004|       |
 1005|  36.9k|        if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (1005:13): [True: 0, False: 36.9k]
  ------------------
 1006|      0|            j = VECTOR(graph->is)[node + 1];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1007|      0|            for (i = VECTOR(graph->is)[node]; i < j; i++) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1007:47): [True: 0, False: 0]
  ------------------
 1008|      0|                igraph_int_t from = VECTOR(graph->from)[ VECTOR(graph->ii)[i] ];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              igraph_int_t from = VECTOR(graph->from)[ VECTOR(graph->ii)[i] ];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1009|      0|                DEDUPLICATE_IF_NEEDED(from, 1);
  ------------------
  |  |  898|      0|    if (should_filter_duplicates) {                                               \
  |  |  ------------------
  |  |  |  Branch (898:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  899|      0|        if (vertex == pnode) {                                                    \
  |  |  ------------------
  |  |  |  Branch (899:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  900|      0|            /* This is a loop edge */                                             \
  |  |  901|      0|            if (loops == IGRAPH_NO_LOOPS) {                                       \
  |  |  ------------------
  |  |  |  Branch (901:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  902|      0|                /* Filtering loop edges unconditionally */                        \
  |  |  903|      0|                length -= n;                                                      \
  |  |  904|      0|                continue;                                                         \
  |  |  905|      0|            } else if (loops == IGRAPH_LOOPS_ONCE && vertex == last_added) {      \
  |  |  ------------------
  |  |  |  Branch (905:24): [True: 0, False: 0]
  |  |  |  Branch (905:54): [True: 0, False: 0]
  |  |  ------------------
  |  |  906|      0|                /* Filtering every second endpoint of loop edges */               \
  |  |  907|      0|                length -= n;                                                      \
  |  |  908|      0|                last_added = -1;                                                  \
  |  |  909|      0|                seen_loop = true;                                                 \
  |  |  910|      0|                continue;                                                         \
  |  |  911|      0|            } else if (multiple == IGRAPH_NO_MULTIPLE && seen_loop) {             \
  |  |  ------------------
  |  |  |  Branch (911:24): [True: 0, False: 0]
  |  |  |  Branch (911:58): [True: 0, False: 0]
  |  |  ------------------
  |  |  912|      0|                /* Filtering multi-loop edges */                                  \
  |  |  913|      0|                length -= n;                                                      \
  |  |  914|      0|                continue;                                                         \
  |  |  915|      0|            } else {                                                              \
  |  |  916|      0|                seen_loop = (loops != IGRAPH_LOOPS_TWICE || last_added == vertex);\
  |  |  ------------------
  |  |  |  Branch (916:30): [True: 0, False: 0]
  |  |  |  Branch (916:61): [True: 0, False: 0]
  |  |  ------------------
  |  |  917|      0|                last_added = vertex;                                              \
  |  |  918|      0|            }                                                                     \
  |  |  919|      0|        } else {                                                                  \
  |  |  920|      0|            /* Not a loop edge */                                                 \
  |  |  921|      0|            if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {         \
  |  |  ------------------
  |  |  |  Branch (921:17): [True: 0, False: 0]
  |  |  |  Branch (921:51): [True: 0, False: 0]
  |  |  ------------------
  |  |  922|      0|                /* Filtering multi-edges */                                       \
  |  |  923|      0|                length -= n;                                                      \
  |  |  924|      0|                continue;                                                         \
  |  |  925|      0|            } else {                                                              \
  |  |  926|      0|                last_added = vertex;                                              \
  |  |  927|      0|            }                                                                     \
  |  |  928|      0|        }                                                                         \
  |  |  929|      0|    }
  ------------------
 1010|      0|                VECTOR(*neis)[idx++] = from;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1011|      0|            }
 1012|      0|        }
 1013|  36.9k|    } else {
 1014|       |        /* Both in- and out- neighbors in a directed graph,
 1015|       |           we need to merge the two 'vectors' so the result is
 1016|       |           correctly ordered. */
 1017|      0|        igraph_int_t j1 = VECTOR(graph->os)[node + 1];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1018|      0|        igraph_int_t j2 = VECTOR(graph->is)[node + 1];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1019|      0|        igraph_int_t i1 = VECTOR(graph->os)[node];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1020|      0|        igraph_int_t i2 = VECTOR(graph->is)[node];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1021|      0|        igraph_int_t eid1, eid2;
 1022|      0|        igraph_int_t n1, n2;
 1023|       |
 1024|      0|        should_filter_duplicates = !(multiple == IGRAPH_MULTIPLE &&
  ------------------
  |  Branch (1024:38): [True: 0, False: 0]
  ------------------
 1025|      0|                loops == IGRAPH_LOOPS_TWICE);
  ------------------
  |  Branch (1025:17): [True: 0, False: 0]
  ------------------
 1026|       |
 1027|      0|        while (i1 < j1 && i2 < j2) {
  ------------------
  |  Branch (1027:16): [True: 0, False: 0]
  |  Branch (1027:27): [True: 0, False: 0]
  ------------------
 1028|      0|            eid1 = VECTOR(graph->oi)[i1];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1029|      0|            eid2 = VECTOR(graph->ii)[i2];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1030|      0|            n1 = VECTOR(graph->to)[eid1];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1031|      0|            n2 = VECTOR(graph->from)[eid2];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1032|      0|            if (n1 < n2) {
  ------------------
  |  Branch (1032:17): [True: 0, False: 0]
  ------------------
 1033|      0|                i1++;
 1034|      0|                DEDUPLICATE_IF_NEEDED(n1, 1);
  ------------------
  |  |  898|      0|    if (should_filter_duplicates) {                                               \
  |  |  ------------------
  |  |  |  Branch (898:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  899|      0|        if (vertex == pnode) {                                                    \
  |  |  ------------------
  |  |  |  Branch (899:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  900|      0|            /* This is a loop edge */                                             \
  |  |  901|      0|            if (loops == IGRAPH_NO_LOOPS) {                                       \
  |  |  ------------------
  |  |  |  Branch (901:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  902|      0|                /* Filtering loop edges unconditionally */                        \
  |  |  903|      0|                length -= n;                                                      \
  |  |  904|      0|                continue;                                                         \
  |  |  905|      0|            } else if (loops == IGRAPH_LOOPS_ONCE && vertex == last_added) {      \
  |  |  ------------------
  |  |  |  Branch (905:24): [True: 0, False: 0]
  |  |  |  Branch (905:54): [True: 0, False: 0]
  |  |  ------------------
  |  |  906|      0|                /* Filtering every second endpoint of loop edges */               \
  |  |  907|      0|                length -= n;                                                      \
  |  |  908|      0|                last_added = -1;                                                  \
  |  |  909|      0|                seen_loop = true;                                                 \
  |  |  910|      0|                continue;                                                         \
  |  |  911|      0|            } else if (multiple == IGRAPH_NO_MULTIPLE && seen_loop) {             \
  |  |  ------------------
  |  |  |  Branch (911:24): [True: 0, False: 0]
  |  |  |  Branch (911:58): [True: 0, False: 0]
  |  |  ------------------
  |  |  912|      0|                /* Filtering multi-loop edges */                                  \
  |  |  913|      0|                length -= n;                                                      \
  |  |  914|      0|                continue;                                                         \
  |  |  915|      0|            } else {                                                              \
  |  |  916|      0|                seen_loop = (loops != IGRAPH_LOOPS_TWICE || last_added == vertex);\
  |  |  ------------------
  |  |  |  Branch (916:30): [True: 0, False: 0]
  |  |  |  Branch (916:61): [True: 0, False: 0]
  |  |  ------------------
  |  |  917|      0|                last_added = vertex;                                              \
  |  |  918|      0|            }                                                                     \
  |  |  919|      0|        } else {                                                                  \
  |  |  920|      0|            /* Not a loop edge */                                                 \
  |  |  921|      0|            if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {         \
  |  |  ------------------
  |  |  |  Branch (921:17): [True: 0, False: 0]
  |  |  |  Branch (921:51): [True: 0, False: 0]
  |  |  ------------------
  |  |  922|      0|                /* Filtering multi-edges */                                       \
  |  |  923|      0|                length -= n;                                                      \
  |  |  924|      0|                continue;                                                         \
  |  |  925|      0|            } else {                                                              \
  |  |  926|      0|                last_added = vertex;                                              \
  |  |  927|      0|            }                                                                     \
  |  |  928|      0|        }                                                                         \
  |  |  929|      0|    }
  ------------------
 1035|      0|                VECTOR(*neis)[idx++] = n1;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1036|      0|            } else if (n1 > n2) {
  ------------------
  |  Branch (1036:24): [True: 0, False: 0]
  ------------------
 1037|      0|                i2++;
 1038|      0|                DEDUPLICATE_IF_NEEDED(n2, 1);
  ------------------
  |  |  898|      0|    if (should_filter_duplicates) {                                               \
  |  |  ------------------
  |  |  |  Branch (898:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  899|      0|        if (vertex == pnode) {                                                    \
  |  |  ------------------
  |  |  |  Branch (899:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  900|      0|            /* This is a loop edge */                                             \
  |  |  901|      0|            if (loops == IGRAPH_NO_LOOPS) {                                       \
  |  |  ------------------
  |  |  |  Branch (901:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  902|      0|                /* Filtering loop edges unconditionally */                        \
  |  |  903|      0|                length -= n;                                                      \
  |  |  904|      0|                continue;                                                         \
  |  |  905|      0|            } else if (loops == IGRAPH_LOOPS_ONCE && vertex == last_added) {      \
  |  |  ------------------
  |  |  |  Branch (905:24): [True: 0, False: 0]
  |  |  |  Branch (905:54): [True: 0, False: 0]
  |  |  ------------------
  |  |  906|      0|                /* Filtering every second endpoint of loop edges */               \
  |  |  907|      0|                length -= n;                                                      \
  |  |  908|      0|                last_added = -1;                                                  \
  |  |  909|      0|                seen_loop = true;                                                 \
  |  |  910|      0|                continue;                                                         \
  |  |  911|      0|            } else if (multiple == IGRAPH_NO_MULTIPLE && seen_loop) {             \
  |  |  ------------------
  |  |  |  Branch (911:24): [True: 0, False: 0]
  |  |  |  Branch (911:58): [True: 0, False: 0]
  |  |  ------------------
  |  |  912|      0|                /* Filtering multi-loop edges */                                  \
  |  |  913|      0|                length -= n;                                                      \
  |  |  914|      0|                continue;                                                         \
  |  |  915|      0|            } else {                                                              \
  |  |  916|      0|                seen_loop = (loops != IGRAPH_LOOPS_TWICE || last_added == vertex);\
  |  |  ------------------
  |  |  |  Branch (916:30): [True: 0, False: 0]
  |  |  |  Branch (916:61): [True: 0, False: 0]
  |  |  ------------------
  |  |  917|      0|                last_added = vertex;                                              \
  |  |  918|      0|            }                                                                     \
  |  |  919|      0|        } else {                                                                  \
  |  |  920|      0|            /* Not a loop edge */                                                 \
  |  |  921|      0|            if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {         \
  |  |  ------------------
  |  |  |  Branch (921:17): [True: 0, False: 0]
  |  |  |  Branch (921:51): [True: 0, False: 0]
  |  |  ------------------
  |  |  922|      0|                /* Filtering multi-edges */                                       \
  |  |  923|      0|                length -= n;                                                      \
  |  |  924|      0|                continue;                                                         \
  |  |  925|      0|            } else {                                                              \
  |  |  926|      0|                last_added = vertex;                                              \
  |  |  927|      0|            }                                                                     \
  |  |  928|      0|        }                                                                         \
  |  |  929|      0|    }
  ------------------
 1039|      0|                VECTOR(*neis)[idx++] = n2;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1040|      0|            } else {
 1041|      0|                i1++;
 1042|      0|                i2++;
 1043|      0|                DEDUPLICATE_IF_NEEDED(n1, 2);
  ------------------
  |  |  898|      0|    if (should_filter_duplicates) {                                               \
  |  |  ------------------
  |  |  |  Branch (898:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  899|      0|        if (vertex == pnode) {                                                    \
  |  |  ------------------
  |  |  |  Branch (899:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  900|      0|            /* This is a loop edge */                                             \
  |  |  901|      0|            if (loops == IGRAPH_NO_LOOPS) {                                       \
  |  |  ------------------
  |  |  |  Branch (901:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  902|      0|                /* Filtering loop edges unconditionally */                        \
  |  |  903|      0|                length -= n;                                                      \
  |  |  904|      0|                continue;                                                         \
  |  |  905|      0|            } else if (loops == IGRAPH_LOOPS_ONCE && vertex == last_added) {      \
  |  |  ------------------
  |  |  |  Branch (905:24): [True: 0, False: 0]
  |  |  |  Branch (905:54): [True: 0, False: 0]
  |  |  ------------------
  |  |  906|      0|                /* Filtering every second endpoint of loop edges */               \
  |  |  907|      0|                length -= n;                                                      \
  |  |  908|      0|                last_added = -1;                                                  \
  |  |  909|      0|                seen_loop = true;                                                 \
  |  |  910|      0|                continue;                                                         \
  |  |  911|      0|            } else if (multiple == IGRAPH_NO_MULTIPLE && seen_loop) {             \
  |  |  ------------------
  |  |  |  Branch (911:24): [True: 0, False: 0]
  |  |  |  Branch (911:58): [True: 0, False: 0]
  |  |  ------------------
  |  |  912|      0|                /* Filtering multi-loop edges */                                  \
  |  |  913|      0|                length -= n;                                                      \
  |  |  914|      0|                continue;                                                         \
  |  |  915|      0|            } else {                                                              \
  |  |  916|      0|                seen_loop = (loops != IGRAPH_LOOPS_TWICE || last_added == vertex);\
  |  |  ------------------
  |  |  |  Branch (916:30): [True: 0, False: 0]
  |  |  |  Branch (916:61): [True: 0, False: 0]
  |  |  ------------------
  |  |  917|      0|                last_added = vertex;                                              \
  |  |  918|      0|            }                                                                     \
  |  |  919|      0|        } else {                                                                  \
  |  |  920|      0|            /* Not a loop edge */                                                 \
  |  |  921|      0|            if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {         \
  |  |  ------------------
  |  |  |  Branch (921:17): [True: 0, False: 0]
  |  |  |  Branch (921:51): [True: 0, False: 0]
  |  |  ------------------
  |  |  922|      0|                /* Filtering multi-edges */                                       \
  |  |  923|      0|                length -= n;                                                      \
  |  |  924|      0|                continue;                                                         \
  |  |  925|      0|            } else {                                                              \
  |  |  926|      0|                last_added = vertex;                                              \
  |  |  927|      0|            }                                                                     \
  |  |  928|      0|        }                                                                         \
  |  |  929|      0|    }
  ------------------
 1044|      0|                VECTOR(*neis)[idx++] = n1;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1045|      0|                DEDUPLICATE_IF_NEEDED(n2, 1);
  ------------------
  |  |  898|      0|    if (should_filter_duplicates) {                                               \
  |  |  ------------------
  |  |  |  Branch (898:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  899|      0|        if (vertex == pnode) {                                                    \
  |  |  ------------------
  |  |  |  Branch (899:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  900|      0|            /* This is a loop edge */                                             \
  |  |  901|      0|            if (loops == IGRAPH_NO_LOOPS) {                                       \
  |  |  ------------------
  |  |  |  Branch (901:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  902|      0|                /* Filtering loop edges unconditionally */                        \
  |  |  903|      0|                length -= n;                                                      \
  |  |  904|      0|                continue;                                                         \
  |  |  905|      0|            } else if (loops == IGRAPH_LOOPS_ONCE && vertex == last_added) {      \
  |  |  ------------------
  |  |  |  Branch (905:24): [True: 0, False: 0]
  |  |  |  Branch (905:54): [True: 0, False: 0]
  |  |  ------------------
  |  |  906|      0|                /* Filtering every second endpoint of loop edges */               \
  |  |  907|      0|                length -= n;                                                      \
  |  |  908|      0|                last_added = -1;                                                  \
  |  |  909|      0|                seen_loop = true;                                                 \
  |  |  910|      0|                continue;                                                         \
  |  |  911|      0|            } else if (multiple == IGRAPH_NO_MULTIPLE && seen_loop) {             \
  |  |  ------------------
  |  |  |  Branch (911:24): [True: 0, False: 0]
  |  |  |  Branch (911:58): [True: 0, False: 0]
  |  |  ------------------
  |  |  912|      0|                /* Filtering multi-loop edges */                                  \
  |  |  913|      0|                length -= n;                                                      \
  |  |  914|      0|                continue;                                                         \
  |  |  915|      0|            } else {                                                              \
  |  |  916|      0|                seen_loop = (loops != IGRAPH_LOOPS_TWICE || last_added == vertex);\
  |  |  ------------------
  |  |  |  Branch (916:30): [True: 0, False: 0]
  |  |  |  Branch (916:61): [True: 0, False: 0]
  |  |  ------------------
  |  |  917|      0|                last_added = vertex;                                              \
  |  |  918|      0|            }                                                                     \
  |  |  919|      0|        } else {                                                                  \
  |  |  920|      0|            /* Not a loop edge */                                                 \
  |  |  921|      0|            if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {         \
  |  |  ------------------
  |  |  |  Branch (921:17): [True: 0, False: 0]
  |  |  |  Branch (921:51): [True: 0, False: 0]
  |  |  ------------------
  |  |  922|      0|                /* Filtering multi-edges */                                       \
  |  |  923|      0|                length -= n;                                                      \
  |  |  924|      0|                continue;                                                         \
  |  |  925|      0|            } else {                                                              \
  |  |  926|      0|                last_added = vertex;                                              \
  |  |  927|      0|            }                                                                     \
  |  |  928|      0|        }                                                                         \
  |  |  929|      0|    }
  ------------------
 1046|      0|                VECTOR(*neis)[idx++] = n2;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1047|      0|            }
 1048|      0|        }
 1049|       |
 1050|      0|        while (i1 < j1) {
  ------------------
  |  Branch (1050:16): [True: 0, False: 0]
  ------------------
 1051|      0|            eid1 = VECTOR(graph->oi)[i1++];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1052|      0|            igraph_int_t to = VECTOR(graph->to)[eid1];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1053|      0|            DEDUPLICATE_IF_NEEDED(to, 1);
  ------------------
  |  |  898|      0|    if (should_filter_duplicates) {                                               \
  |  |  ------------------
  |  |  |  Branch (898:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  899|      0|        if (vertex == pnode) {                                                    \
  |  |  ------------------
  |  |  |  Branch (899:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  900|      0|            /* This is a loop edge */                                             \
  |  |  901|      0|            if (loops == IGRAPH_NO_LOOPS) {                                       \
  |  |  ------------------
  |  |  |  Branch (901:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  902|      0|                /* Filtering loop edges unconditionally */                        \
  |  |  903|      0|                length -= n;                                                      \
  |  |  904|      0|                continue;                                                         \
  |  |  905|      0|            } else if (loops == IGRAPH_LOOPS_ONCE && vertex == last_added) {      \
  |  |  ------------------
  |  |  |  Branch (905:24): [True: 0, False: 0]
  |  |  |  Branch (905:54): [True: 0, False: 0]
  |  |  ------------------
  |  |  906|      0|                /* Filtering every second endpoint of loop edges */               \
  |  |  907|      0|                length -= n;                                                      \
  |  |  908|      0|                last_added = -1;                                                  \
  |  |  909|      0|                seen_loop = true;                                                 \
  |  |  910|      0|                continue;                                                         \
  |  |  911|      0|            } else if (multiple == IGRAPH_NO_MULTIPLE && seen_loop) {             \
  |  |  ------------------
  |  |  |  Branch (911:24): [True: 0, False: 0]
  |  |  |  Branch (911:58): [True: 0, False: 0]
  |  |  ------------------
  |  |  912|      0|                /* Filtering multi-loop edges */                                  \
  |  |  913|      0|                length -= n;                                                      \
  |  |  914|      0|                continue;                                                         \
  |  |  915|      0|            } else {                                                              \
  |  |  916|      0|                seen_loop = (loops != IGRAPH_LOOPS_TWICE || last_added == vertex);\
  |  |  ------------------
  |  |  |  Branch (916:30): [True: 0, False: 0]
  |  |  |  Branch (916:61): [True: 0, False: 0]
  |  |  ------------------
  |  |  917|      0|                last_added = vertex;                                              \
  |  |  918|      0|            }                                                                     \
  |  |  919|      0|        } else {                                                                  \
  |  |  920|      0|            /* Not a loop edge */                                                 \
  |  |  921|      0|            if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {         \
  |  |  ------------------
  |  |  |  Branch (921:17): [True: 0, False: 0]
  |  |  |  Branch (921:51): [True: 0, False: 0]
  |  |  ------------------
  |  |  922|      0|                /* Filtering multi-edges */                                       \
  |  |  923|      0|                length -= n;                                                      \
  |  |  924|      0|                continue;                                                         \
  |  |  925|      0|            } else {                                                              \
  |  |  926|      0|                last_added = vertex;                                              \
  |  |  927|      0|            }                                                                     \
  |  |  928|      0|        }                                                                         \
  |  |  929|      0|    }
  ------------------
 1054|      0|            VECTOR(*neis)[idx++] = to;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1055|      0|        }
 1056|       |
 1057|      0|        while (i2 < j2) {
  ------------------
  |  Branch (1057:16): [True: 0, False: 0]
  ------------------
 1058|      0|            eid2 = VECTOR(graph->ii)[i2++];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1059|      0|            igraph_int_t from = VECTOR(graph->from)[eid2];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1060|      0|            DEDUPLICATE_IF_NEEDED(from, 1);
  ------------------
  |  |  898|      0|    if (should_filter_duplicates) {                                               \
  |  |  ------------------
  |  |  |  Branch (898:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  899|      0|        if (vertex == pnode) {                                                    \
  |  |  ------------------
  |  |  |  Branch (899:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  900|      0|            /* This is a loop edge */                                             \
  |  |  901|      0|            if (loops == IGRAPH_NO_LOOPS) {                                       \
  |  |  ------------------
  |  |  |  Branch (901:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  902|      0|                /* Filtering loop edges unconditionally */                        \
  |  |  903|      0|                length -= n;                                                      \
  |  |  904|      0|                continue;                                                         \
  |  |  905|      0|            } else if (loops == IGRAPH_LOOPS_ONCE && vertex == last_added) {      \
  |  |  ------------------
  |  |  |  Branch (905:24): [True: 0, False: 0]
  |  |  |  Branch (905:54): [True: 0, False: 0]
  |  |  ------------------
  |  |  906|      0|                /* Filtering every second endpoint of loop edges */               \
  |  |  907|      0|                length -= n;                                                      \
  |  |  908|      0|                last_added = -1;                                                  \
  |  |  909|      0|                seen_loop = true;                                                 \
  |  |  910|      0|                continue;                                                         \
  |  |  911|      0|            } else if (multiple == IGRAPH_NO_MULTIPLE && seen_loop) {             \
  |  |  ------------------
  |  |  |  Branch (911:24): [True: 0, False: 0]
  |  |  |  Branch (911:58): [True: 0, False: 0]
  |  |  ------------------
  |  |  912|      0|                /* Filtering multi-loop edges */                                  \
  |  |  913|      0|                length -= n;                                                      \
  |  |  914|      0|                continue;                                                         \
  |  |  915|      0|            } else {                                                              \
  |  |  916|      0|                seen_loop = (loops != IGRAPH_LOOPS_TWICE || last_added == vertex);\
  |  |  ------------------
  |  |  |  Branch (916:30): [True: 0, False: 0]
  |  |  |  Branch (916:61): [True: 0, False: 0]
  |  |  ------------------
  |  |  917|      0|                last_added = vertex;                                              \
  |  |  918|      0|            }                                                                     \
  |  |  919|      0|        } else {                                                                  \
  |  |  920|      0|            /* Not a loop edge */                                                 \
  |  |  921|      0|            if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {         \
  |  |  ------------------
  |  |  |  Branch (921:17): [True: 0, False: 0]
  |  |  |  Branch (921:51): [True: 0, False: 0]
  |  |  ------------------
  |  |  922|      0|                /* Filtering multi-edges */                                       \
  |  |  923|      0|                length -= n;                                                      \
  |  |  924|      0|                continue;                                                         \
  |  |  925|      0|            } else {                                                              \
  |  |  926|      0|                last_added = vertex;                                              \
  |  |  927|      0|            }                                                                     \
  |  |  928|      0|        }                                                                         \
  |  |  929|      0|    }
  ------------------
 1061|      0|            VECTOR(*neis)[idx++] = from;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1062|      0|        }
 1063|       |
 1064|      0|    }
 1065|  36.9k|    IGRAPH_CHECK(igraph_vector_int_resize(neis, length));
  ------------------
  |  |  656|  36.9k|    do { \
  |  |  657|  36.9k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  36.9k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  36.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 36.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|  36.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 36.9k]
  |  |  ------------------
  ------------------
 1066|       |
 1067|  36.9k|    return IGRAPH_SUCCESS;
 1068|  36.9k|#undef DEDUPLICATE_IF_NEEDED
 1069|  36.9k|}
igraph_is_directed:
 1134|  1.07M|igraph_bool_t igraph_is_directed(const igraph_t *graph) {
 1135|  1.07M|    return graph->directed;
 1136|  1.07M|}
igraph_degree:
 1279|  6.42k|) {
 1280|       |
 1281|  6.42k|    igraph_int_t nodes_to_calc;
 1282|  6.42k|    igraph_int_t i, j;
 1283|  6.42k|    igraph_vit_t vit;
 1284|       |
 1285|  6.42k|    IGRAPH_CHECK(igraph_vit_create(graph, vids, &vit));
  ------------------
  |  |  656|  6.42k|    do { \
  |  |  657|  6.42k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  6.42k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  6.42k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 6.42k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  6.42k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 6.42k]
  |  |  ------------------
  ------------------
 1286|  6.42k|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  603|  6.42k|    do { \
  |  |  604|  6.42k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  6.42k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  6.42k|         * incorrect destructor function with the pointer */ \
  |  |  607|  6.42k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 6.42k]
  |  |  ------------------
  |  |  608|  6.42k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  6.42k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 6.42k]
  |  |  ------------------
  ------------------
 1287|       |
 1288|  6.42k|    if (mode != IGRAPH_OUT && mode != IGRAPH_IN && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (1288:9): [True: 3.28k, False: 3.14k]
  |  Branch (1288:31): [True: 3.28k, False: 0]
  |  Branch (1288:52): [True: 0, False: 3.28k]
  ------------------
 1289|      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]
  |  |  ------------------
  ------------------
 1290|      0|    }
 1291|       |
 1292|  6.42k|    if (loops == IGRAPH_NO_LOOPS || loops == IGRAPH_LOOPS_ONCE) {
  ------------------
  |  Branch (1292:9): [True: 0, False: 6.42k]
  |  Branch (1292:37): [True: 0, False: 6.42k]
  ------------------
 1293|       |        /* If the graph is known not to have loops, we can use the faster
 1294|       |         * loops == IGRAPH_LOOPS_TWICE code path, which has O(1) complexity
 1295|       |         * instead of of O(d). */
 1296|      0|        if (igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_LOOP) &&
  ------------------
  |  Branch (1296:13): [True: 0, False: 0]
  ------------------
 1297|      0|            !igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_HAS_LOOP)) {
  ------------------
  |  Branch (1297:13): [True: 0, False: 0]
  ------------------
 1298|      0|            loops = IGRAPH_LOOPS_TWICE;
 1299|      0|        }
 1300|      0|    }
 1301|       |
 1302|       |    /* Must come before the mode != IGRAPH_ALL check below. */
 1303|  6.42k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (1303:9): [True: 1.64k, False: 4.78k]
  ------------------
 1304|  1.64k|        mode = IGRAPH_ALL;
 1305|  1.64k|    }
 1306|       |
 1307|  6.42k|    if (loops == IGRAPH_LOOPS_ONCE && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (1307:9): [True: 0, False: 6.42k]
  |  Branch (1307:39): [True: 0, False: 0]
  ------------------
 1308|       |        /* We can use the faster loops == IGRAPH_LOOPS_TWICE path again */
 1309|      0|        loops = IGRAPH_LOOPS_TWICE;
 1310|      0|    }
 1311|       |
 1312|  6.42k|    nodes_to_calc = IGRAPH_VIT_SIZE(vit);
  ------------------
  |  |  190|  6.42k|#define IGRAPH_VIT_SIZE(vit)  ((vit).end - (vit).start)
  ------------------
 1313|       |
 1314|  6.42k|    IGRAPH_CHECK(igraph_vector_int_resize(res, nodes_to_calc));
  ------------------
  |  |  656|  6.42k|    do { \
  |  |  657|  6.42k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  6.42k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  6.42k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 6.42k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  6.42k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 6.42k]
  |  |  ------------------
  ------------------
 1315|  6.42k|    igraph_vector_int_null(res);
 1316|       |
 1317|  6.42k|    if (loops == IGRAPH_LOOPS_TWICE) {
  ------------------
  |  Branch (1317:9): [True: 6.42k, False: 0]
  ------------------
 1318|  6.42k|        if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (1318:13): [True: 6.42k, False: 0]
  ------------------
 1319|  6.42k|            for (IGRAPH_VIT_RESET(vit), i = 0;
  ------------------
  |  |  201|  6.42k|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
 1320|   301k|                 !IGRAPH_VIT_END(vit);
  ------------------
  |  |  179|   301k|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (1320:18): [True: 294k, False: 6.42k]
  ------------------
 1321|   294k|                 IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  167|   294k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
 1322|   294k|                igraph_int_t vid = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  214|   294k|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 294k, False: 0]
  |  |  ------------------
  |  |  215|   294k|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1323|   294k|                VECTOR(*res)[i] += (VECTOR(graph->os)[vid + 1] - VECTOR(graph->os)[vid]);
  ------------------
  |  |   60|   294k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[i] += (VECTOR(graph->os)[vid + 1] - VECTOR(graph->os)[vid]);
  ------------------
  |  |   60|   294k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[i] += (VECTOR(graph->os)[vid + 1] - VECTOR(graph->os)[vid]);
  ------------------
  |  |   60|   294k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1324|   294k|            }
 1325|  6.42k|        }
 1326|  6.42k|        if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (1326:13): [True: 3.28k, False: 3.14k]
  ------------------
 1327|  3.28k|            for (IGRAPH_VIT_RESET(vit), i = 0;
  ------------------
  |  |  201|  3.28k|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
 1328|   150k|                 !IGRAPH_VIT_END(vit);
  ------------------
  |  |  179|   150k|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (1328:18): [True: 147k, False: 3.28k]
  ------------------
 1329|   147k|                 IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  167|   147k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
 1330|   147k|                igraph_int_t vid = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  214|   147k|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 147k, False: 0]
  |  |  ------------------
  |  |  215|   147k|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1331|   147k|                VECTOR(*res)[i] += (VECTOR(graph->is)[vid + 1] - VECTOR(graph->is)[vid]);
  ------------------
  |  |   60|   147k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[i] += (VECTOR(graph->is)[vid + 1] - VECTOR(graph->is)[vid]);
  ------------------
  |  |   60|   147k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[i] += (VECTOR(graph->is)[vid + 1] - VECTOR(graph->is)[vid]);
  ------------------
  |  |   60|   147k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1332|   147k|            }
 1333|  3.28k|        }
 1334|  6.42k|    } else if (loops == IGRAPH_LOOPS_ONCE) {
  ------------------
  |  Branch (1334:16): [True: 0, False: 0]
  ------------------
 1335|      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]
  |  |  ------------------
  ------------------
 1336|       |
 1337|       |        /* We arbitrarily count loop edges in the (mode & IGRAPH_OUT) branch but
 1338|       |         * not in the (mode & IGRAPH_IN) branch */
 1339|       |
 1340|      0|        if (igraph_vs_is_all(&vids)) {
  ------------------
  |  Branch (1340:13): [True: 0, False: 0]
  ------------------
 1341|       |            // When calculating degree for all vertices, iterating over edges is faster
 1342|      0|            igraph_int_t no_of_edges = igraph_ecount(graph);
 1343|       |
 1344|       |            /* mode & IGRAPH_OUT branch */
 1345|      0|            for (igraph_int_t edge = 0; edge < no_of_edges; ++edge) {
  ------------------
  |  Branch (1345:41): [True: 0, False: 0]
  ------------------
 1346|      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)
  |  |  ------------------
  ------------------
 1347|      0|                VECTOR(*res)[from]++;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1348|      0|            }
 1349|       |
 1350|       |            /* mode & IGRAPH_IN branch */
 1351|      0|            for (igraph_int_t edge = 0; edge < no_of_edges; ++edge) {
  ------------------
  |  Branch (1351:41): [True: 0, False: 0]
  ------------------
 1352|      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)
  |  |  ------------------
  ------------------
 1353|      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 (1353:21): [True: 0, False: 0]
  ------------------
 1354|      0|                    VECTOR(*res)[to]++;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1355|      0|                }
 1356|      0|            }
 1357|      0|        } else {
 1358|       |            /* mode & IGRAPH_OUT branch */
 1359|      0|            for (IGRAPH_VIT_RESET(vit), i = 0;
  ------------------
  |  |  201|      0|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
 1360|      0|                !IGRAPH_VIT_END(vit);
  ------------------
  |  |  179|      0|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (1360:17): [True: 0, False: 0]
  ------------------
 1361|      0|                IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  167|      0|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
 1362|      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)
  |  |  ------------------
  ------------------
 1363|      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)
  ------------------
 1364|      0|            }
 1365|       |
 1366|       |            /* mode & IGRAPH_IN branch */
 1367|      0|            for (IGRAPH_VIT_RESET(vit), i = 0;
  ------------------
  |  |  201|      0|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
 1368|      0|                !IGRAPH_VIT_END(vit);
  ------------------
  |  |  179|      0|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (1368:17): [True: 0, False: 0]
  ------------------
 1369|      0|                IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  167|      0|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
 1370|      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)
  |  |  ------------------
  ------------------
 1371|      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)
  ------------------
 1372|      0|                for (j = VECTOR(graph->is)[vid];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1373|      0|                    j < VECTOR(graph->is)[vid + 1]; j++) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1373:21): [True: 0, False: 0]
  ------------------
 1374|      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 (1374:25): [True: 0, False: 0]
  ------------------
 1375|      0|                        VECTOR(*res)[i] -= 1;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1376|      0|                    }
 1377|      0|                }
 1378|      0|            }
 1379|      0|        }
 1380|      0|    } else {
 1381|       |        /* no loops should be counted */
 1382|      0|        if (igraph_vs_is_all(&vids)) {
  ------------------
  |  Branch (1382:13): [True: 0, False: 0]
  ------------------
 1383|       |            // When calculating degree for all vertices, iterating over edges is faster
 1384|      0|            igraph_int_t no_of_edges = igraph_ecount(graph);
 1385|       |
 1386|      0|            if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (1386:17): [True: 0, False: 0]
  ------------------
 1387|      0|                for (igraph_int_t edge = 0; edge < no_of_edges; ++edge) {
  ------------------
  |  Branch (1387:45): [True: 0, False: 0]
  ------------------
 1388|      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)
  |  |  ------------------
  ------------------
 1389|      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 (1389:25): [True: 0, False: 0]
  ------------------
 1390|      0|                        VECTOR(*res)[from]++;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1391|      0|                    }
 1392|      0|                }
 1393|      0|            }
 1394|      0|            if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (1394:17): [True: 0, False: 0]
  ------------------
 1395|      0|                for (igraph_int_t edge = 0; edge < no_of_edges; ++edge) {
  ------------------
  |  Branch (1395:45): [True: 0, False: 0]
  ------------------
 1396|      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)
  |  |  ------------------
  ------------------
 1397|      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 (1397:25): [True: 0, False: 0]
  ------------------
 1398|      0|                        VECTOR(*res)[to]++;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1399|      0|                    }
 1400|      0|                }
 1401|      0|            }
 1402|      0|        } else {
 1403|      0|            if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (1403:17): [True: 0, False: 0]
  ------------------
 1404|      0|                for (IGRAPH_VIT_RESET(vit), i = 0;
  ------------------
  |  |  201|      0|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
 1405|      0|                    !IGRAPH_VIT_END(vit);
  ------------------
  |  |  179|      0|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (1405:21): [True: 0, False: 0]
  ------------------
 1406|      0|                    IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  167|      0|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
 1407|      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)
  |  |  ------------------
  ------------------
 1408|      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)
  ------------------
 1409|      0|                    for (j = VECTOR(graph->os)[vid];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1410|      0|                        j < VECTOR(graph->os)[vid + 1]; j++) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1410:25): [True: 0, False: 0]
  ------------------
 1411|      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 (1411:29): [True: 0, False: 0]
  ------------------
 1412|      0|                            VECTOR(*res)[i] -= 1;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1413|      0|                        }
 1414|      0|                    }
 1415|      0|                }
 1416|      0|            }
 1417|      0|            if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (1417:17): [True: 0, False: 0]
  ------------------
 1418|      0|                for (IGRAPH_VIT_RESET(vit), i = 0;
  ------------------
  |  |  201|      0|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
 1419|      0|                    !IGRAPH_VIT_END(vit);
  ------------------
  |  |  179|      0|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (1419:21): [True: 0, False: 0]
  ------------------
 1420|      0|                    IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  167|      0|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
 1421|      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)
  |  |  ------------------
  ------------------
 1422|      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)
  ------------------
 1423|      0|                    for (j = VECTOR(graph->is)[vid];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1424|      0|                        j < VECTOR(graph->is)[vid + 1]; j++) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1424:25): [True: 0, False: 0]
  ------------------
 1425|      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 (1425:29): [True: 0, False: 0]
  ------------------
 1426|      0|                            VECTOR(*res)[i] -= 1;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1427|      0|                        }
 1428|      0|                    }
 1429|      0|                }
 1430|      0|            }
 1431|      0|        }
 1432|      0|    }
 1433|       |
 1434|  6.42k|    igraph_vit_destroy(&vit);
 1435|  6.42k|    IGRAPH_FINALLY_CLEAN(1);
 1436|       |
 1437|  6.42k|    return IGRAPH_SUCCESS;
 1438|  6.42k|}
igraph_incident:
 1791|   766k|) {
 1792|   766k|    igraph_int_t length = 0, idx = 0;
 1793|   766k|    igraph_int_t i, j;
 1794|   766k|    igraph_int_t node = pnode;
 1795|   766k|    igraph_bool_t directed = igraph_is_directed(graph);
 1796|       |
 1797|   766k|    if (node < 0 || node > igraph_vcount(graph) - 1) {
  ------------------
  |  Branch (1797:9): [True: 0, False: 766k]
  |  Branch (1797:21): [True: 0, False: 766k]
  ------------------
 1798|      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]
  |  |  ------------------
  ------------------
 1799|      0|    }
 1800|   766k|    if (mode != IGRAPH_OUT && mode != IGRAPH_IN &&
  ------------------
  |  Branch (1800:9): [True: 436k, False: 329k]
  |  Branch (1800:31): [True: 258k, False: 178k]
  ------------------
 1801|   258k|        mode != IGRAPH_ALL) {
  ------------------
  |  Branch (1801:9): [True: 0, False: 258k]
  ------------------
 1802|      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]
  |  |  ------------------
  ------------------
 1803|      0|    }
 1804|       |
 1805|   766k|    if (!directed) {
  ------------------
  |  Branch (1805:9): [True: 110k, False: 655k]
  ------------------
 1806|   110k|        mode = IGRAPH_ALL;
 1807|   110k|    }
 1808|       |
 1809|   766k|    if (mode != IGRAPH_ALL && loops == IGRAPH_LOOPS_TWICE) {
  ------------------
  |  Branch (1809:9): [True: 507k, False: 258k]
  |  Branch (1809:31): [True: 360k, False: 147k]
  ------------------
 1810|       |        /*
 1811|       |        IGRAPH_ERROR("For a directed graph (with directions not ignored), "
 1812|       |                     "IGRAPH_LOOPS_TWICE does not make sense.", IGRAPH_EINVAL);
 1813|       |        */
 1814|   360k|        loops = IGRAPH_LOOPS_ONCE;
 1815|   360k|    }
 1816|       |
 1817|       |    /* Calculate needed space first & allocate it */
 1818|       |    /* Note that 'mode' is treated as a bit field here; it's okay because
 1819|       |     * IGRAPH_ALL = IGRAPH_IN | IGRAPH_OUT, bit-wise */
 1820|   766k|    if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (1820:9): [True: 587k, False: 178k]
  ------------------
 1821|   587k|        length += (VECTOR(graph->os)[node + 1] - VECTOR(graph->os)[node]);
  ------------------
  |  |   60|   587k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      length += (VECTOR(graph->os)[node + 1] - VECTOR(graph->os)[node]);
  ------------------
  |  |   60|   587k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1822|   587k|    }
 1823|   766k|    if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (1823:9): [True: 436k, False: 329k]
  ------------------
 1824|   436k|        length += (VECTOR(graph->is)[node + 1] - VECTOR(graph->is)[node]);
  ------------------
  |  |   60|   436k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      length += (VECTOR(graph->is)[node + 1] - VECTOR(graph->is)[node]);
  ------------------
  |  |   60|   436k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1825|   436k|    }
 1826|       |
 1827|   766k|    IGRAPH_CHECK(igraph_vector_int_resize(eids, length));
  ------------------
  |  |  656|   766k|    do { \
  |  |  657|   766k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   766k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   766k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 766k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   766k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 766k]
  |  |  ------------------
  ------------------
 1828|       |
 1829|       |    /* The loops below produce an ordering what is consistent with the
 1830|       |     * ordering returned by igraph_neighbors(), and this should be preserved.
 1831|       |     * We are dealing with two sorted lists; one for the successors and one
 1832|       |     * for the predecessors. If we have requested only one of them, we have
 1833|       |     * an easy job. If we have requested both, we need to merge the two lists
 1834|       |     * to ensure that the output is sorted by the vertex IDs of the "other"
 1835|       |     * endpoint of the affected edges */
 1836|   766k|    if (!directed || mode != IGRAPH_ALL) {
  ------------------
  |  Branch (1836:9): [True: 110k, False: 655k]
  |  Branch (1836:22): [True: 507k, False: 147k]
  ------------------
 1837|       |        /* We did not ask for both directions; this is the easy case */
 1838|       |
 1839|   618k|        if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (1839:13): [True: 440k, False: 178k]
  ------------------
 1840|   440k|            j = VECTOR(graph->os)[node + 1];
  ------------------
  |  |   60|   440k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1841|  1.62M|            for (i = VECTOR(graph->os)[node]; i < j; i++) {
  ------------------
  |  |   60|   440k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1841:47): [True: 1.18M, False: 440k]
  ------------------
 1842|  1.18M|                igraph_int_t edge = VECTOR(graph->oi)[i];
  ------------------
  |  |   60|  1.18M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1843|  1.18M|                igraph_int_t other = VECTOR(graph->to)[edge];
  ------------------
  |  |   60|  1.18M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1844|  1.18M|                if (loops == IGRAPH_NO_LOOPS && other == pnode) {
  ------------------
  |  Branch (1844:21): [True: 71.0k, False: 1.11M]
  |  Branch (1844:49): [True: 10.5k, False: 60.5k]
  ------------------
 1845|  10.5k|                    length--;
 1846|  1.17M|                } else {
 1847|  1.17M|                    VECTOR(*eids)[idx++] = edge;
  ------------------
  |  |   60|  1.17M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1848|  1.17M|                }
 1849|  1.18M|            }
 1850|   440k|        }
 1851|       |
 1852|   618k|        if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (1852:13): [True: 288k, False: 329k]
  ------------------
 1853|   288k|            j = VECTOR(graph->is)[node + 1];
  ------------------
  |  |   60|   288k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1854|  1.37M|            for (i = VECTOR(graph->is)[node]; i < j; i++) {
  ------------------
  |  |   60|   288k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1854:47): [True: 1.08M, False: 288k]
  ------------------
 1855|  1.08M|                igraph_int_t edge = VECTOR(graph->ii)[i];
  ------------------
  |  |   60|  1.08M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1856|  1.08M|                igraph_int_t other = VECTOR(graph->from)[edge];
  ------------------
  |  |   60|  1.08M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1857|  1.08M|                if ((loops == IGRAPH_NO_LOOPS || (loops == IGRAPH_LOOPS_ONCE && !directed)) && other == pnode) {
  ------------------
  |  Branch (1857:22): [True: 0, False: 1.08M]
  |  Branch (1857:51): [True: 1.06M, False: 27.6k]
  |  Branch (1857:81): [True: 0, False: 1.06M]
  |  Branch (1857:96): [True: 0, False: 0]
  ------------------
 1858|      0|                    length--;
 1859|  1.08M|                } else {
 1860|  1.08M|                    VECTOR(*eids)[idx++] = edge;
  ------------------
  |  |   60|  1.08M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1861|  1.08M|                }
 1862|  1.08M|            }
 1863|   288k|        }
 1864|   618k|    } else {
 1865|       |        /* both in- and out- neighbors in a directed graph,
 1866|       |           we need to merge the two 'vectors' */
 1867|   147k|        igraph_int_t j1 = VECTOR(graph->os)[node + 1];
  ------------------
  |  |   60|   147k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1868|   147k|        igraph_int_t j2 = VECTOR(graph->is)[node + 1];
  ------------------
  |  |   60|   147k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1869|   147k|        igraph_int_t i1 = VECTOR(graph->os)[node];
  ------------------
  |  |   60|   147k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1870|   147k|        igraph_int_t i2 = VECTOR(graph->is)[node];
  ------------------
  |  |   60|   147k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1871|   147k|        igraph_int_t eid1, eid2;
 1872|   147k|        igraph_int_t n1, n2;
 1873|   147k|        igraph_bool_t seen_loop_edge = false;
 1874|       |
 1875|   202k|        while (i1 < j1 && i2 < j2) {
  ------------------
  |  Branch (1875:16): [True: 68.6k, False: 133k]
  |  Branch (1875:27): [True: 54.4k, False: 14.2k]
  ------------------
 1876|  54.4k|            eid1 = VECTOR(graph->oi)[i1];
  ------------------
  |  |   60|  54.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1877|  54.4k|            eid2 = VECTOR(graph->ii)[i2];
  ------------------
  |  |   60|  54.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1878|  54.4k|            n1 = VECTOR(graph->to)[eid1];
  ------------------
  |  |   60|  54.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1879|  54.4k|            n2 = VECTOR(graph->from)[eid2];
  ------------------
  |  |   60|  54.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1880|  54.4k|            if (n1 < n2) {
  ------------------
  |  Branch (1880:17): [True: 18.1k, False: 36.3k]
  ------------------
 1881|  18.1k|                i1++;
 1882|  18.1k|                VECTOR(*eids)[idx++] = eid1;
  ------------------
  |  |   60|  18.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1883|  36.3k|            } else if (n1 > n2) {
  ------------------
  |  Branch (1883:24): [True: 21.4k, False: 14.8k]
  ------------------
 1884|  21.4k|                i2++;
 1885|  21.4k|                VECTOR(*eids)[idx++] = eid2;
  ------------------
  |  |   60|  21.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1886|  21.4k|            } else if (n1 != pnode) {
  ------------------
  |  Branch (1886:24): [True: 2.82k, False: 12.0k]
  ------------------
 1887|       |                /* multiple edge */
 1888|  2.82k|                i1++;
 1889|  2.82k|                i2++;
 1890|  2.82k|                VECTOR(*eids)[idx++] = eid1;
  ------------------
  |  |   60|  2.82k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1891|  2.82k|                VECTOR(*eids)[idx++] = eid2;
  ------------------
  |  |   60|  2.82k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1892|  12.0k|            } else {
 1893|       |                /* loop edge */
 1894|  12.0k|                i1++;
 1895|  12.0k|                i2++;
 1896|  12.0k|                if (loops == IGRAPH_NO_LOOPS) {
  ------------------
  |  Branch (1896:21): [True: 6.02k, False: 6.02k]
  ------------------
 1897|  6.02k|                    length -= 2;
 1898|  6.02k|                } else if (loops == IGRAPH_LOOPS_ONCE) {
  ------------------
  |  Branch (1898:28): [True: 0, False: 6.02k]
  ------------------
 1899|      0|                    length--;
 1900|      0|                    if (!seen_loop_edge) {
  ------------------
  |  Branch (1900:25): [True: 0, False: 0]
  ------------------
 1901|      0|                        VECTOR(*eids)[idx++] = eid1;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1902|      0|                    } else {
 1903|      0|                        VECTOR(*eids)[idx++] = eid2;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1904|      0|                    }
 1905|      0|                    seen_loop_edge = !seen_loop_edge;
 1906|  6.02k|                } else {
 1907|  6.02k|                    VECTOR(*eids)[idx++] = eid1;
  ------------------
  |  |   60|  6.02k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1908|  6.02k|                    VECTOR(*eids)[idx++] = eid2;
  ------------------
  |  |   60|  6.02k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1909|  6.02k|                }
 1910|  12.0k|            }
 1911|  54.4k|        }
 1912|       |
 1913|   187k|        while (i1 < j1) {
  ------------------
  |  Branch (1913:16): [True: 40.0k, False: 147k]
  ------------------
 1914|  40.0k|            eid1 = VECTOR(graph->oi)[i1++];
  ------------------
  |  |   60|  40.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1915|  40.0k|            VECTOR(*eids)[idx++] = eid1;
  ------------------
  |  |   60|  40.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1916|  40.0k|        }
 1917|       |
 1918|   184k|        while (i2 < j2) {
  ------------------
  |  Branch (1918:16): [True: 36.7k, False: 147k]
  ------------------
 1919|  36.7k|            eid2 = VECTOR(graph->ii)[i2++];
  ------------------
  |  |   60|  36.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1920|  36.7k|            VECTOR(*eids)[idx++] = eid2;
  ------------------
  |  |   60|  36.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1921|  36.7k|        }
 1922|   147k|    }
 1923|   766k|    IGRAPH_CHECK(igraph_vector_int_resize(eids, length));
  ------------------
  |  |  656|   766k|    do { \
  |  |  657|   766k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   766k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   766k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 766k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   766k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 766k]
  |  |  ------------------
  ------------------
 1924|   766k|    return IGRAPH_SUCCESS;
 1925|   766k|}
type_indexededgelist.c:igraph_i_create_start_vectors:
 1077|  4.66k|        igraph_vector_int_t *iindex, igraph_int_t nodes) {
 1078|       |
 1079|  4.66k|# define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
 1080|       |
 1081|  4.66k|    igraph_int_t no_of_nodes;
 1082|  4.66k|    igraph_int_t no_of_edges;
 1083|  4.66k|    igraph_int_t i, j, idx;
 1084|       |
 1085|  4.66k|    no_of_nodes = nodes;
 1086|  4.66k|    no_of_edges = igraph_vector_int_size(el);
 1087|       |
 1088|       |    /* result */
 1089|       |
 1090|  4.66k|    IGRAPH_CHECK(igraph_vector_int_resize(res, nodes + 1));
  ------------------
  |  |  656|  4.66k|    do { \
  |  |  657|  4.66k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.66k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.66k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.66k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, 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.66k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.66k]
  |  |  ------------------
  ------------------
 1091|       |
 1092|       |    /* create the index */
 1093|       |
 1094|  4.66k|    if (no_of_edges == 0) {
  ------------------
  |  Branch (1094:9): [True: 0, False: 4.66k]
  ------------------
 1095|       |        /* empty graph */
 1096|      0|        igraph_vector_int_null(res);
 1097|  4.66k|    } else {
 1098|  4.66k|        idx = -1;
 1099|  52.2k|        for (i = 0; i <= EDGE(0); i++) {
  ------------------
  |  | 1079|  52.2k|# define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   60|  52.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               # define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   60|  52.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (1099:21): [True: 47.6k, False: 4.66k]
  ------------------
 1100|  47.6k|            idx++; VECTOR(*res)[idx] = 0;
  ------------------
  |  |   60|  47.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1101|  47.6k|        }
 1102|  74.4k|        for (i = 1; i < no_of_edges; i++) {
  ------------------
  |  Branch (1102:21): [True: 69.8k, False: 4.66k]
  ------------------
 1103|  69.8k|            igraph_int_t n = EDGE(i) - EDGE(VECTOR(*res)[idx]);
  ------------------
  |  | 1079|  69.8k|# define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   60|  69.8k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               # define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   60|  69.8k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
                          igraph_int_t n = EDGE(i) - EDGE(VECTOR(*res)[idx]);
  ------------------
  |  | 1079|  69.8k|# define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   60|  69.8k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               # define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   60|  69.8k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1104|   183k|            for (j = 0; j < n; j++) {
  ------------------
  |  Branch (1104:25): [True: 113k, False: 69.8k]
  ------------------
 1105|   113k|                idx++; VECTOR(*res)[idx] = i;
  ------------------
  |  |   60|   113k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1106|   113k|            }
 1107|  69.8k|        }
 1108|  4.66k|        j = EDGE(VECTOR(*res)[idx]);
  ------------------
  |  | 1079|  4.66k|# define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   60|  4.66k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               # define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   60|  4.66k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1109|  68.7k|        for (i = 0; i < no_of_nodes - j; i++) {
  ------------------
  |  Branch (1109:21): [True: 64.0k, False: 4.66k]
  ------------------
 1110|  64.0k|            idx++; VECTOR(*res)[idx] = no_of_edges;
  ------------------
  |  |   60|  64.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1111|  64.0k|        }
 1112|  4.66k|    }
 1113|       |
 1114|       |    /* clean */
 1115|       |
 1116|  4.66k|# undef EDGE
 1117|  4.66k|    return IGRAPH_SUCCESS;
 1118|  4.66k|}

igraph_almost_equals:
   46|    821|igraph_bool_t igraph_almost_equals(double a, double b, double eps) {
   47|    821|    return igraph_cmp_epsilon(a, b, eps) == 0;
   48|    821|}
igraph_cmp_epsilon:
   97|  1.25M|int igraph_cmp_epsilon(double a, double b, double eps) {
   98|  1.25M|    double diff;
   99|  1.25M|    double abs_diff;
  100|  1.25M|    double sum;
  101|       |
  102|  1.25M|    if (a == b) {
  ------------------
  |  Branch (102:9): [True: 156k, False: 1.09M]
  ------------------
  103|       |        /* shortcut, handles infinities */
  104|   156k|        return 0;
  105|   156k|    }
  106|       |
  107|  1.09M|    diff = a - b;
  108|  1.09M|    abs_diff = fabs(diff);
  109|  1.09M|    sum = fabs(a) + fabs(b);
  110|       |
  111|  1.09M|    if (a == 0 || b == 0 || sum < DBL_MIN) {
  ------------------
  |  Branch (111:9): [True: 109k, False: 990k]
  |  Branch (111:19): [True: 0, False: 990k]
  |  Branch (111:29): [True: 0, False: 990k]
  ------------------
  112|       |        /* a or b is zero or both are extremely close to it; relative
  113|       |         * error is less meaningful here so just compare it with
  114|       |         * epsilon */
  115|   109k|        return abs_diff < (eps * DBL_MIN) ? 0 : (diff < 0 ? -1 : 1);
  ------------------
  |  Branch (115:16): [True: 0, False: 109k]
  |  Branch (115:50): [True: 109k, False: 0]
  ------------------
  116|   990k|    } else if (!isfinite(sum)) {
  ------------------
  |  Branch (116:16): [True: 0, False: 990k]
  ------------------
  117|       |        /* addition overflow, so presumably |a| and |b| are both large; use a
  118|       |         * different formulation */
  119|      0|        return (abs_diff < (eps * fabs(a) + eps * fabs(b))) ? 0 : (diff < 0 ? -1 : 1);
  ------------------
  |  Branch (119:16): [True: 0, False: 0]
  |  Branch (119:68): [True: 0, False: 0]
  ------------------
  120|   990k|    } else {
  121|   990k|        return (abs_diff / sum < eps) ? 0 : (diff < 0 ? -1 : 1);
  ------------------
  |  Branch (121:16): [True: 1.64k, False: 988k]
  |  Branch (121:46): [True: 119k, False: 869k]
  ------------------
  122|   990k|    }
  123|  1.09M|}

igraph_to_undirected:
  498|    822|                         const igraph_attribute_combination_t *edge_comb) {
  499|       |
  500|    822|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  501|    822|    igraph_int_t no_of_edges = igraph_ecount(graph);
  502|    822|    igraph_vector_int_t edges;
  503|    822|    igraph_t newgraph;
  504|    822|    igraph_bool_t attr = edge_comb && igraph_has_attribute_table();
  ------------------
  |  Branch (504:26): [True: 822, False: 0]
  |  Branch (504:39): [True: 822, False: 0]
  ------------------
  505|       |
  506|    822|    if (mode != IGRAPH_TO_UNDIRECTED_EACH &&
  ------------------
  |  Branch (506:9): [True: 822, False: 0]
  ------------------
  507|    822|        mode != IGRAPH_TO_UNDIRECTED_COLLAPSE &&
  ------------------
  |  Branch (507:9): [True: 0, False: 822]
  ------------------
  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|    822|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (512:9): [True: 0, False: 822]
  ------------------
  513|      0|        return IGRAPH_SUCCESS;
  514|      0|    }
  515|       |
  516|    822|    IGRAPH_VECTOR_INT_INIT_FINALLY(&edges, 0);
  ------------------
  |  |  119|    822|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    822|    do { \
  |  |  |  |  657|    822|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    822|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    822|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|    822|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    822|    do { \
  |  |  |  |  604|    822|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    822|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    822|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    822|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 822]
  |  |  |  |  ------------------
  |  |  |  |  608|    822|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    822|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 822]
  |  |  ------------------
  ------------------
  517|       |
  518|    822|    if (mode == IGRAPH_TO_UNDIRECTED_EACH) {
  ------------------
  |  Branch (518:9): [True: 0, False: 822]
  ------------------
  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|    822|    } else if (mode == IGRAPH_TO_UNDIRECTED_COLLAPSE) {
  ------------------
  |  Branch (549:16): [True: 822, False: 0]
  ------------------
  550|    822|        igraph_vector_int_t inadj, outadj;
  551|    822|        igraph_vector_int_t mergeinto;
  552|    822|        igraph_int_t actedge = 0;
  553|       |
  554|    822|        if (attr) {
  ------------------
  |  Branch (554:13): [True: 822, False: 0]
  ------------------
  555|    822|            IGRAPH_VECTOR_INT_INIT_FINALLY(&mergeinto, no_of_edges);
  ------------------
  |  |  119|    822|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    822|    do { \
  |  |  |  |  657|    822|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    822|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    822|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|    822|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    822|    do { \
  |  |  |  |  604|    822|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    822|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    822|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    822|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 822]
  |  |  |  |  ------------------
  |  |  |  |  608|    822|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    822|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 822]
  |  |  ------------------
  ------------------
  556|    822|        }
  557|       |
  558|    822|        IGRAPH_CHECK(igraph_vector_int_reserve(&edges, no_of_edges * 2));
  ------------------
  |  |  656|    822|    do { \
  |  |  657|    822|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    822|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
  559|    822|        IGRAPH_VECTOR_INT_INIT_FINALLY(&inadj, 0);
  ------------------
  |  |  119|    822|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    822|    do { \
  |  |  |  |  657|    822|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    822|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    822|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|    822|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    822|    do { \
  |  |  |  |  604|    822|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    822|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    822|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    822|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 822]
  |  |  |  |  ------------------
  |  |  |  |  608|    822|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    822|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 822]
  |  |  ------------------
  ------------------
  560|    822|        IGRAPH_VECTOR_INT_INIT_FINALLY(&outadj, 0);
  ------------------
  |  |  119|    822|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    822|    do { \
  |  |  |  |  657|    822|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    822|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    822|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|    822|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    822|    do { \
  |  |  |  |  604|    822|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    822|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    822|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    822|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 822]
  |  |  |  |  ------------------
  |  |  |  |  608|    822|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    822|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 822]
  |  |  ------------------
  ------------------
  561|       |
  562|  37.7k|        for (igraph_int_t i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (562:34): [True: 36.9k, False: 822]
  ------------------
  563|  36.9k|            igraph_int_t n_out, n_in;
  564|  36.9k|            igraph_int_t p1 = -1, p2 = -1;
  565|  36.9k|            igraph_int_t e1 = 0, e2 = 0, n1 = 0, n2 = 0, last;
  566|  36.9k|            IGRAPH_CHECK(igraph_incident(graph, &outadj, i, IGRAPH_OUT, IGRAPH_LOOPS));
  ------------------
  |  |  656|  36.9k|    do { \
  |  |  657|  36.9k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  36.9k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  36.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 36.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|  36.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 36.9k]
  |  |  ------------------
  ------------------
  567|  36.9k|            IGRAPH_CHECK(igraph_incident(graph, &inadj, i, IGRAPH_IN, IGRAPH_LOOPS));
  ------------------
  |  |  656|  36.9k|    do { \
  |  |  657|  36.9k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  36.9k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  36.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 36.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|  36.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 36.9k]
  |  |  ------------------
  ------------------
  568|  36.9k|            n_out = igraph_vector_int_size(&outadj);
  569|  36.9k|            n_in = igraph_vector_int_size(&inadj);
  570|       |
  571|  36.9k|#define STEPOUT() if ( (++p1) < n_out) {    \
  572|  36.9k|        e1 = VECTOR(outadj)[p1]; \
  573|  36.9k|        n1 = IGRAPH_TO(graph, e1);      \
  574|  36.9k|    }
  575|  36.9k|#define STEPIN()  if ( (++p2) < n_in) {         \
  576|  36.9k|        e2 = VECTOR(inadj )[p2]; \
  577|  36.9k|        n2 = IGRAPH_FROM(graph, e2);        \
  578|  36.9k|    }
  579|  36.9k|#define ADD_NEW_EDGE() { \
  580|  36.9k|    IGRAPH_CHECK(igraph_vector_int_push_back(&edges, i)); \
  581|  36.9k|    IGRAPH_CHECK(igraph_vector_int_push_back(&edges, last)); \
  582|  36.9k|}
  583|  36.9k|#define MERGE_INTO_CURRENT_EDGE(which) { \
  584|  36.9k|    if (attr) { \
  585|  36.9k|        VECTOR(mergeinto)[which] = actedge; \
  586|  36.9k|    } \
  587|  36.9k|}
  588|       |
  589|  36.9k|            STEPOUT();
  ------------------
  |  |  571|  36.9k|#define STEPOUT() if ( (++p1) < n_out) {    \
  |  |  ------------------
  |  |  |  Branch (571:24): [True: 5.15k, False: 31.7k]
  |  |  ------------------
  |  |  572|  5.15k|        e1 = VECTOR(outadj)[p1]; \
  |  |  ------------------
  |  |  |  |   60|  5.15k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  573|  5.15k|        n1 = IGRAPH_TO(graph, e1);      \
  |  |  ------------------
  |  |  |  |  128|  5.15k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  5.15k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  574|  5.15k|    }
  ------------------
  590|  36.9k|            STEPIN();
  ------------------
  |  |  575|  36.9k|#define STEPIN()  if ( (++p2) < n_in) {         \
  |  |  ------------------
  |  |  |  Branch (575:24): [True: 5.79k, False: 31.1k]
  |  |  ------------------
  |  |  576|  5.79k|        e2 = VECTOR(inadj )[p2]; \
  |  |  ------------------
  |  |  |  |   60|  5.79k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  577|  5.79k|        n2 = IGRAPH_FROM(graph, e2);        \
  |  |  ------------------
  |  |  |  |  115|  5.79k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  5.79k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  578|  5.79k|    }
  ------------------
  591|       |
  592|  40.0k|            while (p1 < n_out && n1 <= i && p2 < n_in && n2 <= i) {
  ------------------
  |  Branch (592:20): [True: 7.63k, False: 32.4k]
  |  Branch (592:34): [True: 5.30k, False: 2.33k]
  |  Branch (592:45): [True: 3.74k, False: 1.56k]
  |  Branch (592:58): [True: 3.15k, False: 581]
  ------------------
  593|  3.15k|                last = (n1 <= n2) ? n1 : n2;
  ------------------
  |  Branch (593:24): [True: 1.94k, False: 1.21k]
  ------------------
  594|  3.15k|                ADD_NEW_EDGE();
  ------------------
  |  |  579|  3.15k|#define ADD_NEW_EDGE() { \
  |  |  580|  3.15k|    IGRAPH_CHECK(igraph_vector_int_push_back(&edges, i)); \
  |  |  ------------------
  |  |  |  |  656|  3.15k|    do { \
  |  |  |  |  657|  3.15k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  3.15k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  3.15k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.15k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  3.15k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 3.15k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  581|  3.15k|    IGRAPH_CHECK(igraph_vector_int_push_back(&edges, last)); \
  |  |  ------------------
  |  |  |  |  656|  3.15k|    do { \
  |  |  |  |  657|  3.15k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  3.15k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  3.15k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.15k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  3.15k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 3.15k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  582|  3.15k|}
  ------------------
  595|  8.38k|                while (p1 < n_out && last == n1) {
  ------------------
  |  Branch (595:24): [True: 7.71k, False: 675]
  |  Branch (595:38): [True: 5.22k, False: 2.48k]
  ------------------
  596|  5.22k|                    MERGE_INTO_CURRENT_EDGE(e1);
  ------------------
  |  |  583|  5.22k|#define MERGE_INTO_CURRENT_EDGE(which) { \
  |  |  584|  5.22k|    if (attr) { \
  |  |  ------------------
  |  |  |  Branch (584:9): [True: 5.22k, False: 0]
  |  |  ------------------
  |  |  585|  5.22k|        VECTOR(mergeinto)[which] = actedge; \
  |  |  ------------------
  |  |  |  |   60|  5.22k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  586|  5.22k|    } \
  |  |  587|  5.22k|}
  ------------------
  597|  5.22k|                    STEPOUT();
  ------------------
  |  |  571|  5.22k|#define STEPOUT() if ( (++p1) < n_out) {    \
  |  |  ------------------
  |  |  |  Branch (571:24): [True: 4.55k, False: 675]
  |  |  ------------------
  |  |  572|  4.55k|        e1 = VECTOR(outadj)[p1]; \
  |  |  ------------------
  |  |  |  |   60|  4.55k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  573|  4.55k|        n1 = IGRAPH_TO(graph, e1);      \
  |  |  ------------------
  |  |  |  |  128|  4.55k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  4.55k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  574|  4.55k|    }
  ------------------
  598|  5.22k|                }
  599|  9.55k|                while (p2 < n_in && last == n2) {
  ------------------
  |  Branch (599:24): [True: 8.92k, False: 636]
  |  Branch (599:37): [True: 6.39k, False: 2.52k]
  ------------------
  600|  6.39k|                    MERGE_INTO_CURRENT_EDGE(e2);
  ------------------
  |  |  583|  6.39k|#define MERGE_INTO_CURRENT_EDGE(which) { \
  |  |  584|  6.39k|    if (attr) { \
  |  |  ------------------
  |  |  |  Branch (584:9): [True: 6.39k, False: 0]
  |  |  ------------------
  |  |  585|  6.39k|        VECTOR(mergeinto)[which] = actedge; \
  |  |  ------------------
  |  |  |  |   60|  6.39k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  586|  6.39k|    } \
  |  |  587|  6.39k|}
  ------------------
  601|  6.39k|                    STEPIN();
  ------------------
  |  |  575|  6.39k|#define STEPIN()  if ( (++p2) < n_in) {         \
  |  |  ------------------
  |  |  |  Branch (575:24): [True: 5.76k, False: 636]
  |  |  ------------------
  |  |  576|  5.76k|        e2 = VECTOR(inadj )[p2]; \
  |  |  ------------------
  |  |  |  |   60|  5.76k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  577|  5.76k|        n2 = IGRAPH_FROM(graph, e2);        \
  |  |  ------------------
  |  |  |  |  115|  5.76k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  5.76k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  578|  5.76k|    }
  ------------------
  602|  6.39k|                }
  603|  3.15k|                actedge++;
  604|  3.15k|            }
  605|       |
  606|  39.4k|            while (p1 < n_out && n1 <= i) {
  ------------------
  |  Branch (606:20): [True: 5.31k, False: 34.1k]
  |  Branch (606:34): [True: 2.54k, False: 2.76k]
  ------------------
  607|  2.54k|                last = n1;
  608|  2.54k|                ADD_NEW_EDGE();
  ------------------
  |  |  579|  2.54k|#define ADD_NEW_EDGE() { \
  |  |  580|  2.54k|    IGRAPH_CHECK(igraph_vector_int_push_back(&edges, i)); \
  |  |  ------------------
  |  |  |  |  656|  2.54k|    do { \
  |  |  |  |  657|  2.54k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.54k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.54k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.54k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.54k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.54k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  581|  2.54k|    IGRAPH_CHECK(igraph_vector_int_push_back(&edges, last)); \
  |  |  ------------------
  |  |  |  |  656|  2.54k|    do { \
  |  |  |  |  657|  2.54k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.54k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.54k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.54k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.54k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.54k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  582|  2.54k|}
  ------------------
  609|  6.76k|                while (p1 < n_out && last == n1) {
  ------------------
  |  Branch (609:24): [True: 5.05k, False: 1.71k]
  |  Branch (609:38): [True: 4.22k, False: 830]
  ------------------
  610|  4.22k|                    MERGE_INTO_CURRENT_EDGE(e1);
  ------------------
  |  |  583|  4.22k|#define MERGE_INTO_CURRENT_EDGE(which) { \
  |  |  584|  4.22k|    if (attr) { \
  |  |  ------------------
  |  |  |  Branch (584:9): [True: 4.22k, False: 0]
  |  |  ------------------
  |  |  585|  4.22k|        VECTOR(mergeinto)[which] = actedge; \
  |  |  ------------------
  |  |  |  |   60|  4.22k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  586|  4.22k|    } \
  |  |  587|  4.22k|}
  ------------------
  611|  4.22k|                    STEPOUT();
  ------------------
  |  |  571|  4.22k|#define STEPOUT() if ( (++p1) < n_out) {    \
  |  |  ------------------
  |  |  |  Branch (571:24): [True: 2.51k, False: 1.71k]
  |  |  ------------------
  |  |  572|  2.51k|        e1 = VECTOR(outadj)[p1]; \
  |  |  ------------------
  |  |  |  |   60|  2.51k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  573|  2.51k|        n1 = IGRAPH_TO(graph, e1);      \
  |  |  ------------------
  |  |  |  |  128|  2.51k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  2.51k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  574|  2.51k|    }
  ------------------
  612|  4.22k|                }
  613|  2.54k|                actedge++;
  614|  2.54k|            }
  615|       |
  616|  40.6k|            while (p2 < n_in && n2 <= i) {
  ------------------
  |  Branch (616:20): [True: 6.19k, False: 34.4k]
  |  Branch (616:33): [True: 3.71k, False: 2.48k]
  ------------------
  617|  3.71k|                last = n2;
  618|  3.71k|                ADD_NEW_EDGE();
  ------------------
  |  |  579|  3.71k|#define ADD_NEW_EDGE() { \
  |  |  580|  3.71k|    IGRAPH_CHECK(igraph_vector_int_push_back(&edges, i)); \
  |  |  ------------------
  |  |  |  |  656|  3.71k|    do { \
  |  |  |  |  657|  3.71k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  3.71k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  3.71k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.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|  3.71k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 3.71k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  581|  3.71k|    IGRAPH_CHECK(igraph_vector_int_push_back(&edges, last)); \
  |  |  ------------------
  |  |  |  |  656|  3.71k|    do { \
  |  |  |  |  657|  3.71k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  3.71k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  3.71k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.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|  3.71k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 3.71k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  582|  3.71k|}
  ------------------
  619|  9.14k|                while (p2 < n_in && last == n2) {
  ------------------
  |  Branch (619:24): [True: 6.46k, False: 2.67k]
  |  Branch (619:37): [True: 5.43k, False: 1.03k]
  ------------------
  620|  5.43k|                    MERGE_INTO_CURRENT_EDGE(e2);
  ------------------
  |  |  583|  5.43k|#define MERGE_INTO_CURRENT_EDGE(which) { \
  |  |  584|  5.43k|    if (attr) { \
  |  |  ------------------
  |  |  |  Branch (584:9): [True: 5.43k, False: 0]
  |  |  ------------------
  |  |  585|  5.43k|        VECTOR(mergeinto)[which] = actedge; \
  |  |  ------------------
  |  |  |  |   60|  5.43k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  586|  5.43k|    } \
  |  |  587|  5.43k|}
  ------------------
  621|  5.43k|                    STEPIN();
  ------------------
  |  |  575|  5.43k|#define STEPIN()  if ( (++p2) < n_in) {         \
  |  |  ------------------
  |  |  |  Branch (575:24): [True: 2.75k, False: 2.67k]
  |  |  ------------------
  |  |  576|  2.75k|        e2 = VECTOR(inadj )[p2]; \
  |  |  ------------------
  |  |  |  |   60|  2.75k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  577|  2.75k|        n2 = IGRAPH_FROM(graph, e2);        \
  |  |  ------------------
  |  |  |  |  115|  2.75k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  2.75k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  578|  2.75k|    }
  ------------------
  622|  5.43k|                }
  623|  3.71k|                actedge++;
  624|  3.71k|            }
  625|  36.9k|        }
  626|       |
  627|    822|#undef MERGE_INTO_CURRENT_EDGE
  628|    822|#undef ADD_NEW_EDGE
  629|    822|#undef STEPOUT
  630|    822|#undef STEPIN
  631|       |
  632|    822|        igraph_vector_int_destroy(&outadj);
  633|    822|        igraph_vector_int_destroy(&inadj);
  634|    822|        IGRAPH_FINALLY_CLEAN(2);
  635|       |
  636|    822|        IGRAPH_CHECK(igraph_create(&newgraph, &edges,
  ------------------
  |  |  656|    822|    do { \
  |  |  657|    822|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    822|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
  637|    822|                                   no_of_nodes,
  638|    822|                                   IGRAPH_UNDIRECTED));
  639|    822|        IGRAPH_FINALLY(igraph_destroy, &newgraph);
  ------------------
  |  |  603|    822|    do { \
  |  |  604|    822|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    822|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    822|         * incorrect destructor function with the pointer */ \
  |  |  607|    822|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 822]
  |  |  ------------------
  |  |  608|    822|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
  640|    822|        igraph_vector_int_destroy(&edges);
  641|    822|        IGRAPH_CHECK(igraph_i_attribute_copy(&newgraph, graph, true, true, /* edges= */ false));
  ------------------
  |  |  656|    822|    do { \
  |  |  657|    822|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    822|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
  642|       |
  643|    822|        if (attr) {
  ------------------
  |  Branch (643:13): [True: 822, False: 0]
  ------------------
  644|    822|            igraph_fixed_vectorlist_t vl;
  645|    822|            IGRAPH_CHECK(igraph_fixed_vectorlist_convert(&vl, &mergeinto, actedge));
  ------------------
  |  |  656|    822|    do { \
  |  |  657|    822|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    822|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
  646|    822|            IGRAPH_FINALLY(igraph_fixed_vectorlist_destroy, &vl);
  ------------------
  |  |  603|    822|    do { \
  |  |  604|    822|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    822|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    822|         * incorrect destructor function with the pointer */ \
  |  |  607|    822|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 822]
  |  |  ------------------
  |  |  608|    822|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
  647|       |
  648|    822|            IGRAPH_CHECK(igraph_i_attribute_combine_edges(graph, &newgraph, &vl.vecs, edge_comb));
  ------------------
  |  |  656|    822|    do { \
  |  |  657|    822|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    822|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
  649|       |
  650|    822|            igraph_fixed_vectorlist_destroy(&vl);
  651|    822|            IGRAPH_FINALLY_CLEAN(1);
  652|    822|        }
  653|       |
  654|    822|        IGRAPH_FINALLY_CLEAN(2);
  655|    822|        igraph_destroy(graph);
  656|    822|        *graph = newgraph;
  657|       |
  658|    822|        if (attr) {
  ------------------
  |  Branch (658:13): [True: 822, False: 0]
  ------------------
  659|    822|            igraph_vector_int_destroy(&mergeinto);
  660|    822|            IGRAPH_FINALLY_CLEAN(1);
  661|    822|        }
  662|    822|    } 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|    822|    return IGRAPH_SUCCESS;
  752|    822|}

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

igraph_global_efficiency:
  395|    822|) {
  396|    822|    if (weights) {
  ------------------
  |  Branch (396:9): [True: 822, False: 0]
  ------------------
  397|    822|        return igraph_i_average_path_length_dijkstra(
  398|    822|            graph, weights, res, NULL, directed, /* invert= */ true, /* unconn= */ false
  399|    822|        );
  400|    822|    } else {
  401|      0|        return igraph_i_average_path_length_unweighted(
  402|      0|            graph, res, NULL, directed, /* invert= */ true, /* unconn= */ false
  403|      0|        );
  404|      0|    }
  405|    822|}
igraph_local_efficiency:
  691|    822|) {
  692|    822|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  693|    822|    igraph_int_t no_of_edges = igraph_ecount(graph);
  694|    822|    igraph_int_t nodes_to_calc; /* no. of vertices includes in computation */
  695|    822|    igraph_vit_t vit;
  696|    822|    igraph_vector_int_t vertex_neis;
  697|    822|    igraph_vector_char_t nei_mask;
  698|    822|    igraph_int_t i;
  699|       |
  700|       |    /* 'nei_mask' is a vector indexed by vertices. The meaning of its values is as follows:
  701|       |     *   0: not a neighbour of 'vertex'
  702|       |     *   1: a not-yet-processed neighbour of 'vertex'
  703|       |     *   2: an already processed neighbour of 'vertex'
  704|       |     *
  705|       |     * Marking neighbours of already processed is necessary to avoid processing them more
  706|       |     * than once in multigraphs.
  707|       |     */
  708|    822|    IGRAPH_CHECK(igraph_vector_char_init(&nei_mask, no_of_nodes));
  ------------------
  |  |  656|    822|    do { \
  |  |  657|    822|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    822|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
  709|    822|    IGRAPH_FINALLY(igraph_vector_char_destroy, &nei_mask);
  ------------------
  |  |  603|    822|    do { \
  |  |  604|    822|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    822|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    822|         * incorrect destructor function with the pointer */ \
  |  |  607|    822|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 822]
  |  |  ------------------
  |  |  608|    822|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
  710|    822|    IGRAPH_VECTOR_INT_INIT_FINALLY(&vertex_neis, 0);
  ------------------
  |  |  119|    822|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    822|    do { \
  |  |  |  |  657|    822|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    822|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    822|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|    822|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    822|    do { \
  |  |  |  |  604|    822|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    822|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    822|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    822|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 822]
  |  |  |  |  ------------------
  |  |  |  |  608|    822|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    822|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 822]
  |  |  ------------------
  ------------------
  711|       |
  712|    822|    IGRAPH_CHECK(igraph_vit_create(graph, vids, &vit));
  ------------------
  |  |  656|    822|    do { \
  |  |  657|    822|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    822|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
  713|    822|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  603|    822|    do { \
  |  |  604|    822|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    822|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    822|         * incorrect destructor function with the pointer */ \
  |  |  607|    822|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 822]
  |  |  ------------------
  |  |  608|    822|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
  714|       |
  715|    822|    nodes_to_calc = IGRAPH_VIT_SIZE(vit);
  ------------------
  |  |  190|    822|#define IGRAPH_VIT_SIZE(vit)  ((vit).end - (vit).start)
  ------------------
  716|       |
  717|    822|    IGRAPH_CHECK(igraph_vector_resize(res, nodes_to_calc));
  ------------------
  |  |  656|    822|    do { \
  |  |  657|    822|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    822|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
  718|       |
  719|    822|    if (! weights) /* unweighted case */
  ------------------
  |  Branch (719:9): [True: 0, False: 822]
  ------------------
  720|      0|    {
  721|      0|        igraph_int_t *already_counted;
  722|      0|        igraph_adjlist_t adjlist;
  723|      0|        igraph_dqueue_int_t q = IGRAPH_DQUEUE_NULL;
  ------------------
  |  |   56|      0|#define IGRAPH_DQUEUE_NULL { 0,0,0,0 }
  ------------------
  724|       |
  725|      0|        already_counted = IGRAPH_CALLOC(no_of_nodes, igraph_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, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 0, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  726|      0|        IGRAPH_CHECK_OOM(already_counted, "Insufficient memory for local efficiency calculation.");
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  727|      0|        IGRAPH_FINALLY(igraph_free, already_counted);
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  728|       |
  729|      0|        IGRAPH_CHECK(igraph_adjlist_init(
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  ------------------
  |  |  |  Branch (657:40): [True: 0, False: 0]
  |  |  ------------------
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  730|      0|            graph, &adjlist,
  731|      0|            directed ? IGRAPH_OUT : IGRAPH_ALL,
  732|      0|            IGRAPH_LOOPS, IGRAPH_MULTIPLE
  733|      0|        ));
  734|      0|        IGRAPH_FINALLY(igraph_adjlist_destroy, &adjlist);
  ------------------
  |  |  603|      0|    do { \
  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  ------------------
  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  735|       |
  736|      0|        IGRAPH_DQUEUE_INT_INIT_FINALLY(&q, 100);
  ------------------
  |  |   61|      0|    do { IGRAPH_CHECK(igraph_dqueue_int_init(q, capacity)); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|      0|        IGRAPH_FINALLY(igraph_dqueue_int_destroy, q); } 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 (62:64): [Folded, False: 0]
  |  |  ------------------
  ------------------
  737|       |
  738|      0|        for (IGRAPH_VIT_RESET(vit), i=0;
  ------------------
  |  |  201|      0|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
  739|      0|             ! IGRAPH_VIT_END(vit);
  ------------------
  |  |  179|      0|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (739:14): [True: 0, False: 0]
  ------------------
  740|      0|             IGRAPH_VIT_NEXT(vit), i++)
  ------------------
  |  |  167|      0|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  741|      0|        {
  742|      0|            IGRAPH_CHECK(igraph_i_local_efficiency_unweighted(
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  ------------------
  |  |  |  Branch (657:40): [True: 0, False: 0]
  |  |  ------------------
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  743|      0|                             graph, &adjlist,
  744|      0|                             &q, already_counted, &vertex_neis, &nei_mask,
  745|      0|                             &(VECTOR(*res)[i]), IGRAPH_VIT_GET(vit), mode));
  746|      0|        }
  747|       |
  748|      0|        igraph_dqueue_int_destroy(&q);
  749|      0|        igraph_adjlist_destroy(&adjlist);
  750|      0|        IGRAPH_FREE(already_counted);
  ------------------
  |  |   36|      0|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  751|      0|        IGRAPH_FINALLY_CLEAN(3);
  752|      0|    }
  753|    822|    else /* weighted case */
  754|    822|    {
  755|    822|        igraph_lazy_inclist_t inclist;
  756|    822|        igraph_2wheap_t Q;
  757|       |
  758|    822|        if (igraph_vector_size(weights) != no_of_edges) {
  ------------------
  |  Branch (758:13): [True: 0, False: 822]
  ------------------
  759|      0|            IGRAPH_ERROR("Weight vector length does not match the number of edges.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  760|      0|        }
  761|    822|        if (no_of_edges > 0) {
  ------------------
  |  Branch (761:13): [True: 777, False: 45]
  ------------------
  762|    777|            igraph_real_t min = igraph_vector_min(weights);
  763|    777|            if (min < 0) {
  ------------------
  |  Branch (763:17): [True: 0, False: 777]
  ------------------
  764|      0|                IGRAPH_ERRORF("Weights must not be negative, got %g.", IGRAPH_EINVAL, min);
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  765|      0|            }
  766|    777|            else if (isnan(min)) {
  ------------------
  |  Branch (766:22): [True: 0, False: 777]
  ------------------
  767|      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]
  |  |  ------------------
  ------------------
  768|      0|            }
  769|    777|        }
  770|       |
  771|    822|        IGRAPH_CHECK(igraph_lazy_inclist_init(
  ------------------
  |  |  656|    822|    do { \
  |  |  657|  1.64k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  ------------------
  |  |  |  Branch (657:40): [True: 822, False: 0]
  |  |  ------------------
  |  |  658|    822|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
  772|    822|            graph, &inclist, directed ? IGRAPH_OUT : IGRAPH_ALL, IGRAPH_LOOPS
  773|    822|        ));
  774|    822|        IGRAPH_FINALLY(igraph_lazy_inclist_destroy, &inclist);
  ------------------
  |  |  603|    822|    do { \
  |  |  604|    822|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    822|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    822|         * incorrect destructor function with the pointer */ \
  |  |  607|    822|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 822]
  |  |  ------------------
  |  |  608|    822|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
  775|    822|        IGRAPH_CHECK(igraph_2wheap_init(&Q, no_of_nodes));
  ------------------
  |  |  656|    822|    do { \
  |  |  657|    822|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    822|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
  776|    822|        IGRAPH_FINALLY(igraph_2wheap_destroy, &Q);
  ------------------
  |  |  603|    822|    do { \
  |  |  604|    822|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    822|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    822|         * incorrect destructor function with the pointer */ \
  |  |  607|    822|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 822]
  |  |  ------------------
  |  |  608|    822|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
  777|       |
  778|    822|        for (IGRAPH_VIT_RESET(vit), i=0;
  ------------------
  |  |  201|    822|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
  779|  37.7k|             ! IGRAPH_VIT_END(vit);
  ------------------
  |  |  179|  37.7k|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (779:14): [True: 36.9k, False: 822]
  ------------------
  780|  36.9k|             IGRAPH_VIT_NEXT(vit), i++)
  ------------------
  |  |  167|  36.9k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  781|  36.9k|        {
  782|  36.9k|            IGRAPH_CHECK(igraph_i_local_efficiency_dijkstra(
  ------------------
  |  |  656|  36.9k|    do { \
  |  |  657|  73.8k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  ------------------
  |  |  |  Branch (657:40): [True: 36.9k, False: 0]
  |  |  ------------------
  |  |  658|  36.9k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  36.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 36.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|  36.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 36.9k]
  |  |  ------------------
  ------------------
  783|  36.9k|                             graph, &inclist,
  784|  36.9k|                             &Q, &vertex_neis, &nei_mask,
  785|  36.9k|                             &(VECTOR(*res)[i]), IGRAPH_VIT_GET(vit), mode, weights));
  786|  36.9k|        }
  787|       |
  788|    822|        igraph_2wheap_destroy(&Q);
  789|    822|        igraph_lazy_inclist_destroy(&inclist);
  790|    822|        IGRAPH_FINALLY_CLEAN(2);
  791|    822|    }
  792|       |
  793|    822|    igraph_vit_destroy(&vit);
  794|    822|    igraph_vector_int_destroy(&vertex_neis);
  795|    822|    igraph_vector_char_destroy(&nei_mask);
  796|    822|    IGRAPH_FINALLY_CLEAN(3);
  797|       |
  798|    822|    return IGRAPH_SUCCESS;
  799|    822|}
shortest_paths.c:igraph_i_average_path_length_dijkstra:
  155|    822|{
  156|       |
  157|       |    /* Implementation details. This is the basic Dijkstra algorithm,
  158|       |       with a binary heap. The heap is indexed, i.e. it stores not only
  159|       |       the distances, but also which vertex they belong to.
  160|       |
  161|       |       From now on we use a 2-way heap, so the distances can be queried
  162|       |       directly from the heap.
  163|       |
  164|       |       Dirty tricks:
  165|       |       - the opposite of the distance is stored in the heap, as it is a
  166|       |         maximum heap and we need a minimum heap.
  167|       |       - we don't use IGRAPH_INFINITY in the res matrix during the
  168|       |         computation, as isfinite() might involve a function call
  169|       |         and we want to spare that. -1 will denote infinity instead.
  170|       |    */
  171|       |
  172|    822|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  173|    822|    igraph_int_t no_of_edges = igraph_ecount(graph);
  174|    822|    igraph_2wheap_t Q;
  175|    822|    igraph_lazy_inclist_t inclist;
  176|    822|    igraph_real_t no_of_pairs;
  177|    822|    igraph_real_t no_of_conn_pairs = 0.0; /* no. of ordered pairs between which there is a path */
  178|       |
  179|    822|    IGRAPH_ASSERT(weights != 0);
  ------------------
  |  |  924|    822|    do { \
  |  |  925|    822|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
  180|       |
  181|    822|    if (igraph_vector_size(weights) != no_of_edges) {
  ------------------
  |  Branch (181:9): [True: 0, False: 822]
  ------------------
  182|      0|        IGRAPH_ERRORF("Weight vector length (%" IGRAPH_PRId ") does not match the number of edges (%" IGRAPH_PRId ").",
  ------------------
  |  |  464|      0|    do { \
  |  |  465|      0|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  466|      0|                      igraph_errno, __VA_ARGS__) ; \
  |  |  467|      0|        return igraph_errno; \
  |  |  468|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (468:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  183|      0|                      IGRAPH_EINVAL, igraph_vector_size(weights), no_of_edges);
  184|      0|    }
  185|    822|    if (no_of_edges > 0) {
  ------------------
  |  Branch (185:9): [True: 777, False: 45]
  ------------------
  186|    777|        igraph_real_t min = igraph_vector_min(weights);
  187|    777|        if (min < 0) {
  ------------------
  |  Branch (187:13): [True: 0, False: 777]
  ------------------
  188|      0|            IGRAPH_ERRORF("Weight vector must be non-negative, got %g.", IGRAPH_EINVAL, min);
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  189|      0|        }
  190|    777|        else if (isnan(min)) {
  ------------------
  |  Branch (190:18): [True: 0, False: 777]
  ------------------
  191|      0|            IGRAPH_ERROR("Weight vector 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]
  |  |  ------------------
  ------------------
  192|      0|        }
  193|    777|    }
  194|       |
  195|       |    /* Avoid returning a negative zero, which would be printed as -0 in tests. */
  196|    822|    if (no_of_nodes > 0) {
  ------------------
  |  Branch (196:9): [True: 821, False: 1]
  ------------------
  197|    821|        no_of_pairs = no_of_nodes * (no_of_nodes - 1.0);
  198|    821|    } else {
  199|      1|        no_of_pairs = 0;
  200|      1|    }
  201|       |
  202|    822|    IGRAPH_CHECK(igraph_2wheap_init(&Q, no_of_nodes));
  ------------------
  |  |  656|    822|    do { \
  |  |  657|    822|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    822|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
  203|    822|    IGRAPH_FINALLY(igraph_2wheap_destroy, &Q);
  ------------------
  |  |  603|    822|    do { \
  |  |  604|    822|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    822|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    822|         * incorrect destructor function with the pointer */ \
  |  |  607|    822|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 822]
  |  |  ------------------
  |  |  608|    822|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
  204|    822|    IGRAPH_CHECK(igraph_lazy_inclist_init(
  ------------------
  |  |  656|    822|    do { \
  |  |  657|  1.64k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  ------------------
  |  |  |  Branch (657:40): [True: 822, False: 0]
  |  |  ------------------
  |  |  658|    822|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
  205|    822|        graph, &inclist, directed ? IGRAPH_OUT : IGRAPH_ALL, IGRAPH_LOOPS
  206|    822|    ));
  207|    822|    IGRAPH_FINALLY(igraph_lazy_inclist_destroy, &inclist);
  ------------------
  |  |  603|    822|    do { \
  |  |  604|    822|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    822|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    822|         * incorrect destructor function with the pointer */ \
  |  |  607|    822|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 822]
  |  |  ------------------
  |  |  608|    822|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
  208|       |
  209|    822|    *res = 0.0;
  210|       |
  211|  37.7k|    for (igraph_int_t source = 0; source < no_of_nodes; ++source) {
  ------------------
  |  Branch (211:35): [True: 36.9k, False: 822]
  ------------------
  212|       |
  213|  36.9k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|  36.9k|    do { \
  |  |   47|  36.9k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 36.9k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|  36.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 36.9k]
  |  |  ------------------
  ------------------
  214|       |
  215|  36.9k|        igraph_2wheap_clear(&Q);
  216|  36.9k|        igraph_2wheap_push_with_index(&Q, source, -1.0);
  217|       |
  218|   135k|        while (!igraph_2wheap_empty(&Q)) {
  ------------------
  |  Branch (218:16): [True: 98.0k, False: 36.9k]
  ------------------
  219|  98.0k|            igraph_int_t minnei = igraph_2wheap_max_index(&Q);
  220|  98.0k|            igraph_real_t mindist = -igraph_2wheap_deactivate_max(&Q);
  221|  98.0k|            igraph_vector_int_t *neis;
  222|  98.0k|            igraph_int_t nlen;
  223|       |
  224|  98.0k|            if (minnei != source) {
  ------------------
  |  Branch (224:17): [True: 61.1k, False: 36.9k]
  ------------------
  225|  61.1k|                if (invert) {
  ------------------
  |  Branch (225:21): [True: 61.1k, False: 0]
  ------------------
  226|  61.1k|                    *res += 1.0/(mindist - 1.0);
  227|  61.1k|                } else {
  228|      0|                    *res += mindist - 1.0;
  229|      0|                }
  230|  61.1k|                no_of_conn_pairs += 1;
  231|  61.1k|            }
  232|       |
  233|       |            /* Now check all neighbors of 'minnei' for a shorter path */
  234|  98.0k|            neis = igraph_lazy_inclist_get(&inclist, minnei);
  ------------------
  |  |  214|  98.0k|    (igraph_lazy_inclist_has(il,no) ? ((il)->incs[(igraph_int_t)(no)]) \
  |  |  ------------------
  |  |  |  |  189|  98.0k|#define igraph_lazy_inclist_has(il,no) ((il)->incs[(igraph_int_t)(no)] != NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (189:40): [True: 61.1k, False: 36.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  215|  98.0k|                                    : (igraph_i_lazy_inclist_get_real(il,no)))
  ------------------
  235|  98.0k|            IGRAPH_CHECK_OOM(neis, "Failed to query incident edges.");
  ------------------
  |  |  709|  98.0k|    do { \
  |  |  710|  98.0k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  98.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 98.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  98.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 98.0k]
  |  |  ------------------
  ------------------
  236|  98.0k|            nlen = igraph_vector_int_size(neis);
  237|   253k|            for (igraph_int_t j = 0; j < nlen; j++) {
  ------------------
  |  Branch (237:38): [True: 155k, False: 98.0k]
  ------------------
  238|   155k|                igraph_int_t edge = VECTOR(*neis)[j];
  ------------------
  |  |   60|   155k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  239|   155k|                igraph_int_t tto = IGRAPH_OTHER(graph, edge, minnei);
  ------------------
  |  |  146|   155k|    ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|   155k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   155k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  115|  14.6k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  14.6k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|   140k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   140k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (146:21): [True: 14.6k, False: 140k]
  |  |  ------------------
  ------------------
  240|   155k|                igraph_real_t altdist = mindist + VECTOR(*weights)[edge];
  ------------------
  |  |   60|   155k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  241|   155k|                igraph_bool_t active = igraph_2wheap_has_active(&Q, tto);
  242|   155k|                igraph_bool_t has = igraph_2wheap_has_elem(&Q, tto);
  243|   155k|                igraph_real_t curdist = active ? -igraph_2wheap_get(&Q, tto) : 0.0;
  ------------------
  |  Branch (243:41): [True: 32.9k, False: 122k]
  ------------------
  244|   155k|                if (altdist == IGRAPH_INFINITY) {
  ------------------
  |  |  139|   155k|#define IGRAPH_INFINITY ((double)INFINITY)
  ------------------
  |  Branch (244:21): [True: 0, False: 155k]
  ------------------
  245|       |                    /* Ignore edges with positive infinite weight */
  246|   155k|                } else if (!has) {
  ------------------
  |  Branch (246:28): [True: 61.1k, False: 94.3k]
  ------------------
  247|       |                    /* This is the first non-infinite distance */
  248|  61.1k|                    IGRAPH_CHECK(igraph_2wheap_push_with_index(&Q, tto, -altdist));
  ------------------
  |  |  656|  61.1k|    do { \
  |  |  657|  61.1k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  61.1k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  61.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 61.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|  61.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 61.1k]
  |  |  ------------------
  ------------------
  249|  94.3k|                } else if (altdist < curdist) {
  ------------------
  |  Branch (249:28): [True: 7.82k, False: 86.5k]
  ------------------
  250|       |                    /* This is a shorter path */
  251|  7.82k|                    igraph_2wheap_modify(&Q, tto, -altdist);
  252|  7.82k|                }
  253|   155k|            }
  254|  98.0k|        } /* !igraph_2wheap_empty(&Q) */
  255|  36.9k|    } /* for source < no_of_nodes */
  256|       |
  257|    822|    if (no_of_pairs == 0) {
  ------------------
  |  Branch (257:9): [True: 9, False: 813]
  ------------------
  258|      9|        *res = IGRAPH_NAN; /* can't average zero items */
  ------------------
  |  |  140|      9|#define IGRAPH_NAN ((double)NAN)
  ------------------
  259|    813|    } else {
  260|    813|        if (unconn) { /* average over connected pairs */
  ------------------
  |  Branch (260:13): [True: 0, False: 813]
  ------------------
  261|      0|            if (no_of_conn_pairs == 0) {
  ------------------
  |  Branch (261:17): [True: 0, False: 0]
  ------------------
  262|      0|                *res = IGRAPH_NAN; /* can't average zero items */
  ------------------
  |  |  140|      0|#define IGRAPH_NAN ((double)NAN)
  ------------------
  263|      0|            } else {
  264|      0|                *res /= no_of_conn_pairs;
  265|      0|            }
  266|    813|        } else { /* average over all pairs */
  267|       |            /* no_of_conn_pairs < no_of_pairs implies that the graph is disconnected */
  268|    813|            if (no_of_conn_pairs < no_of_pairs && ! invert) {
  ------------------
  |  Branch (268:17): [True: 802, False: 11]
  |  Branch (268:51): [True: 0, False: 802]
  ------------------
  269|      0|                *res = IGRAPH_INFINITY;
  ------------------
  |  |  139|      0|#define IGRAPH_INFINITY ((double)INFINITY)
  ------------------
  270|    813|            } else {
  271|    813|                *res /= no_of_pairs;
  272|    813|            }
  273|    813|        }
  274|    813|    }
  275|       |
  276|    822|    if (unconnected_pairs) {
  ------------------
  |  Branch (276:9): [True: 0, False: 822]
  ------------------
  277|      0|        *unconnected_pairs = no_of_pairs - no_of_conn_pairs;
  278|      0|    }
  279|       |
  280|    822|    igraph_lazy_inclist_destroy(&inclist);
  281|    822|    igraph_2wheap_destroy(&Q);
  282|    822|    IGRAPH_FINALLY_CLEAN(2);
  283|       |
  284|    822|    return IGRAPH_SUCCESS;
  285|    822|}
shortest_paths.c:igraph_i_local_efficiency_dijkstra:
  518|  36.9k|{
  519|       |
  520|       |    /* Implementation details. This is the basic Dijkstra algorithm,
  521|       |       with a binary heap. The heap is indexed, i.e. it stores not only
  522|       |       the distances, but also which vertex they belong to.
  523|       |
  524|       |       From now on we use a 2-way heap, so the distances can be queried
  525|       |       directly from the heap.
  526|       |
  527|       |       Dirty tricks:
  528|       |       - the opposite of the distance is stored in the heap, as it is a
  529|       |         maximum heap and we need a minimum heap.
  530|       |       - we don't use IGRAPH_INFINITY in the res matrix during the
  531|       |         computation, as isfinite() might involve a function call
  532|       |         and we want to spare that. -1 will denote infinity instead.
  533|       |    */
  534|       |
  535|  36.9k|    igraph_int_t vertex_neis_size;
  536|  36.9k|    igraph_int_t neighbor_count; /* unlike 'inc_edges_size', 'neighbor_count' does not count self-loops or multi-edges */
  537|       |
  538|  36.9k|    IGRAPH_CHECK(igraph_neighbors(graph, vertex_neis, vertex, mode, IGRAPH_LOOPS, IGRAPH_MULTIPLE));
  ------------------
  |  |  656|  36.9k|    do { \
  |  |  657|  36.9k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  36.9k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  36.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 36.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|  36.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 36.9k]
  |  |  ------------------
  ------------------
  539|  36.9k|    vertex_neis_size = igraph_vector_int_size(vertex_neis);
  540|       |
  541|  36.9k|    igraph_vector_char_null(nei_mask);
  542|  36.9k|    neighbor_count = 0;
  543|  55.1k|    for (igraph_int_t i=0; i < vertex_neis_size; ++i) {
  ------------------
  |  Branch (543:28): [True: 18.2k, False: 36.9k]
  ------------------
  544|  18.2k|        igraph_int_t v = VECTOR(*vertex_neis)[i];
  ------------------
  |  |   60|  18.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  545|  18.2k|        if (v != vertex && ! VECTOR(*nei_mask)[v]) {
  ------------------
  |  |   60|  15.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (545:13): [True: 15.2k, False: 3.01k]
  |  Branch (545:28): [True: 9.37k, False: 5.88k]
  ------------------
  546|  9.37k|            VECTOR(*nei_mask)[v] = 1; /* mark as unprocessed neighbour */
  ------------------
  |  |   60|  9.37k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  547|  9.37k|            neighbor_count++;
  548|  9.37k|        }
  549|  18.2k|    }
  550|       |
  551|  36.9k|    *res = 0.0;
  552|       |
  553|       |    /* when the neighbor count is smaller than 2, we return 0.0 */
  554|  36.9k|    if (neighbor_count < 2) {
  ------------------
  |  Branch (554:9): [True: 35.2k, False: 1.65k]
  ------------------
  555|  35.2k|        return IGRAPH_SUCCESS;
  556|  35.2k|    }
  557|       |
  558|  11.3k|    for (igraph_int_t i=0; i < vertex_neis_size; ++i) {
  ------------------
  |  Branch (558:28): [True: 9.72k, False: 1.65k]
  ------------------
  559|  9.72k|        igraph_int_t source = VECTOR(*vertex_neis)[i];
  ------------------
  |  |   60|  9.72k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  560|  9.72k|        igraph_int_t reached = 0;
  561|       |
  562|  9.72k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|  9.72k|    do { \
  |  |   47|  9.72k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 9.72k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|  9.72k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 9.72k]
  |  |  ------------------
  ------------------
  563|       |
  564|  9.72k|        if (source == vertex)
  ------------------
  |  Branch (564:13): [True: 1.08k, False: 8.64k]
  ------------------
  565|  1.08k|            continue;
  566|       |
  567|       |        /* avoid processing a neighbour twice in multigraphs */
  568|  8.64k|        if (VECTOR(*nei_mask)[source] == 2)
  ------------------
  |  |   60|  8.64k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (568:13): [True: 2.66k, False: 5.97k]
  ------------------
  569|  2.66k|            continue;
  570|  5.97k|        VECTOR(*nei_mask)[source] = 2; /* mark as already processed */
  ------------------
  |  |   60|  5.97k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  571|       |
  572|  5.97k|        igraph_2wheap_clear(Q);
  573|  5.97k|        igraph_2wheap_push_with_index(Q, source, -1.0);
  574|       |
  575|  85.4k|        while (!igraph_2wheap_empty(Q)) {
  ------------------
  |  Branch (575:16): [True: 79.5k, False: 5.97k]
  ------------------
  576|  79.5k|            igraph_int_t minnei = igraph_2wheap_max_index(Q);
  577|  79.5k|            igraph_real_t mindist = -igraph_2wheap_deactivate_max(Q);
  578|  79.5k|            igraph_vector_int_t *neis;
  579|  79.5k|            igraph_int_t nlen;
  580|       |
  581|  79.5k|            if (minnei != source && VECTOR(*nei_mask)[minnei]) {
  ------------------
  |  |   60|  73.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (581:17): [True: 73.5k, False: 5.97k]
  |  Branch (581:37): [True: 9.57k, False: 63.9k]
  ------------------
  582|  9.57k|                *res += 1.0/(mindist - 1.0);
  583|  9.57k|                reached++;
  584|  9.57k|                if (reached == neighbor_count) {
  ------------------
  |  Branch (584:21): [True: 0, False: 9.57k]
  ------------------
  585|      0|                    igraph_2wheap_clear(Q);
  586|      0|                    break;
  587|      0|                }
  588|  9.57k|            }
  589|       |
  590|       |            /* Now check all neighbors of 'minnei' for a shorter path */
  591|  79.5k|            neis = igraph_lazy_inclist_get(inclist, minnei);
  ------------------
  |  |  214|  79.5k|    (igraph_lazy_inclist_has(il,no) ? ((il)->incs[(igraph_int_t)(no)]) \
  |  |  ------------------
  |  |  |  |  189|  79.5k|#define igraph_lazy_inclist_has(il,no) ((il)->incs[(igraph_int_t)(no)] != NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (189:40): [True: 75.3k, False: 4.20k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  215|  79.5k|                                    : (igraph_i_lazy_inclist_get_real(il,no)))
  ------------------
  592|  79.5k|            IGRAPH_CHECK_OOM(neis, "Failed to query incident edges.");
  ------------------
  |  |  709|  79.5k|    do { \
  |  |  710|  79.5k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  79.5k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 79.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  79.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 79.5k]
  |  |  ------------------
  ------------------
  593|  79.5k|            nlen = igraph_vector_int_size(neis);
  594|   295k|            for (igraph_int_t j = 0; j < nlen; j++) {
  ------------------
  |  Branch (594:38): [True: 216k, False: 79.5k]
  ------------------
  595|   216k|                igraph_real_t altdist, curdist;
  596|   216k|                igraph_bool_t active, has;
  597|   216k|                igraph_int_t edge = VECTOR(*neis)[j];
  ------------------
  |  |   60|   216k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  598|   216k|                igraph_int_t tto = IGRAPH_OTHER(graph, edge, minnei);
  ------------------
  |  |  146|   216k|    ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|   216k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   216k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  115|  12.4k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  12.4k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|   203k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   203k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (146:21): [True: 12.4k, False: 203k]
  |  |  ------------------
  ------------------
  599|       |
  600|   216k|                if (tto == vertex) {
  ------------------
  |  Branch (600:21): [True: 9.11k, False: 206k]
  ------------------
  601|  9.11k|                    continue;
  602|  9.11k|                }
  603|       |
  604|   206k|                altdist = mindist + VECTOR(*weights)[edge];
  ------------------
  |  |   60|   206k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  605|   206k|                active = igraph_2wheap_has_active(Q, tto);
  606|   206k|                has = igraph_2wheap_has_elem(Q, tto);
  607|   206k|                curdist = active ? -igraph_2wheap_get(Q, tto) : 0.0;
  ------------------
  |  Branch (607:27): [True: 44.8k, False: 162k]
  ------------------
  608|   206k|                if (!has) {
  ------------------
  |  Branch (608:21): [True: 73.5k, False: 133k]
  ------------------
  609|       |                    /* This is the first non-infinite distance */
  610|  73.5k|                    IGRAPH_CHECK(igraph_2wheap_push_with_index(Q, tto, -altdist));
  ------------------
  |  |  656|  73.5k|    do { \
  |  |  657|  73.5k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  73.5k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  73.5k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 73.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  73.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 73.5k]
  |  |  ------------------
  ------------------
  611|   133k|                } else if (altdist < curdist) {
  ------------------
  |  Branch (611:28): [True: 14.3k, False: 119k]
  ------------------
  612|       |                    /* This is a shorter path */
  613|  14.3k|                    igraph_2wheap_modify(Q, tto, -altdist);
  614|  14.3k|                }
  615|   206k|            }
  616|       |
  617|  79.5k|        } /* !igraph_2wheap_empty(&Q) */
  618|       |
  619|  5.97k|    }
  620|       |
  621|  1.65k|    *res /= neighbor_count * (neighbor_count - 1.0);
  622|       |
  623|  1.65k|    return IGRAPH_SUCCESS;
  624|  1.65k|}

igraph_diversity:
  195|    822|                     igraph_vector_t *res, const igraph_vs_t vids) {
  196|       |
  197|    822|    igraph_int_t no_of_edges = igraph_ecount(graph);
  198|    822|    igraph_int_t k, i;
  199|    822|    igraph_vector_int_t incident;
  200|    822|    igraph_bool_t has_multiple;
  201|    822|    igraph_vit_t vit;
  202|       |
  203|    822|    if (igraph_is_directed(graph)) {
  ------------------
  |  Branch (203:9): [True: 0, False: 822]
  ------------------
  204|      0|        IGRAPH_ERROR("Diversity measure works with undirected graphs only.", 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]
  |  |  ------------------
  ------------------
  205|      0|    }
  206|       |
  207|    822|    if (!weights) {
  ------------------
  |  Branch (207:9): [True: 0, False: 822]
  ------------------
  208|      0|        IGRAPH_ERROR("Edge weights must be given.", 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]
  |  |  ------------------
  ------------------
  209|      0|    }
  210|       |
  211|    822|    if (igraph_vector_size(weights) != no_of_edges) {
  ------------------
  |  Branch (211:9): [True: 0, False: 822]
  ------------------
  212|      0|        IGRAPH_ERROR("Invalid edge 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]
  |  |  ------------------
  ------------------
  213|      0|    }
  214|       |
  215|    822|    IGRAPH_CHECK(igraph_has_multiple(graph, &has_multiple));
  ------------------
  |  |  656|    822|    do { \
  |  |  657|    822|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    822|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
  216|    822|    if (has_multiple) {
  ------------------
  |  Branch (216:9): [True: 0, False: 822]
  ------------------
  217|      0|        IGRAPH_ERROR("Diversity measure works only if the graph has no multiple edges.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  218|      0|    }
  219|       |
  220|    822|    if (no_of_edges > 0) {
  ------------------
  |  Branch (220:9): [True: 753, False: 69]
  ------------------
  221|    753|        igraph_real_t minweight = igraph_vector_min(weights);
  222|    753|        if (minweight < 0) {
  ------------------
  |  Branch (222:13): [True: 0, False: 753]
  ------------------
  223|      0|            IGRAPH_ERROR("Weight vector 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]
  |  |  ------------------
  ------------------
  224|    753|        } else if (isnan(minweight)) {
  ------------------
  |  Branch (224:20): [True: 0, False: 753]
  ------------------
  225|      0|            IGRAPH_ERROR("Weight vector 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]
  |  |  ------------------
  ------------------
  226|      0|        }
  227|    753|    }
  228|       |
  229|    822|    IGRAPH_VECTOR_INT_INIT_FINALLY(&incident, 10);
  ------------------
  |  |  119|    822|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    822|    do { \
  |  |  |  |  657|    822|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    822|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    822|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|    822|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    822|    do { \
  |  |  |  |  604|    822|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    822|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    822|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    822|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 822]
  |  |  |  |  ------------------
  |  |  |  |  608|    822|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    822|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 822]
  |  |  ------------------
  ------------------
  230|       |
  231|    822|    IGRAPH_CHECK(igraph_vit_create(graph, vids, &vit));
  ------------------
  |  |  656|    822|    do { \
  |  |  657|    822|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    822|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
  232|    822|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  603|    822|    do { \
  |  |  604|    822|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    822|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    822|         * incorrect destructor function with the pointer */ \
  |  |  607|    822|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 822]
  |  |  ------------------
  |  |  608|    822|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
  233|       |
  234|    822|    igraph_vector_clear(res);
  235|    822|    IGRAPH_CHECK(igraph_vector_reserve(res, IGRAPH_VIT_SIZE(vit)));
  ------------------
  |  |  656|    822|    do { \
  |  |  657|    822|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    822|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
  236|       |
  237|  37.7k|    for (IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  201|    822|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
                  for (IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  179|  37.7k|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
                  for (IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  167|  36.9k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  |  Branch (237:33): [True: 36.9k, False: 822]
  ------------------
  238|  36.9k|        igraph_real_t d;
  239|  36.9k|        igraph_int_t v = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  214|  36.9k|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 36.9k, False: 0]
  |  |  ------------------
  |  |  215|  36.9k|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  240|       |
  241|  36.9k|        IGRAPH_CHECK(igraph_incident(graph, &incident, v, IGRAPH_ALL, IGRAPH_LOOPS));
  ------------------
  |  |  656|  36.9k|    do { \
  |  |  657|  36.9k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  36.9k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  36.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 36.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|  36.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 36.9k]
  |  |  ------------------
  ------------------
  242|  36.9k|        k = igraph_vector_int_size(&incident); /* degree */
  243|       |
  244|       |        /*
  245|       |         * Non-normalized diversity is defined as
  246|       |         * d = -sum_i w_i/s log (w_i/s)
  247|       |         * where s = sum_i w_i. In order to avoid two passes through the w vector,
  248|       |         * we use the equivalent formulation of
  249|       |         * d = log s - (sum_i w_i log w_i) / s
  250|       |         * However, this formulation may not give an exact 0.0 for some w when k=1,
  251|       |         * due to roundoff errors (examples: w=3 or w=7). For this reason, we
  252|       |         * special-case the computation for k=1 even for the unnormalized diversity
  253|       |         * insted of just setting the normalization factor to 1 for this case.
  254|       |         */
  255|  36.9k|        if (k == 0) {
  ------------------
  |  Branch (255:13): [True: 29.1k, False: 7.78k]
  ------------------
  256|  29.1k|            d = IGRAPH_NAN;
  ------------------
  |  |  140|  29.1k|#define IGRAPH_NAN ((double)NAN)
  ------------------
  257|  29.1k|        } else if (k == 1) {
  ------------------
  |  Branch (257:20): [True: 4.23k, False: 3.54k]
  ------------------
  258|  4.23k|            if (VECTOR(*weights)[0] > 0) d = 0.0; /* s > 0 */
  ------------------
  |  |   60|  4.23k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (258:17): [True: 4.23k, False: 0]
  ------------------
  259|      0|            else d = IGRAPH_NAN; /* s == 0 */
  ------------------
  |  |  140|      0|#define IGRAPH_NAN ((double)NAN)
  ------------------
  260|  4.23k|        } else {
  261|  3.54k|            igraph_real_t s = 0.0, ent = 0.0;
  262|  17.5k|            for (i = 0; i < k; i++) {
  ------------------
  |  Branch (262:25): [True: 13.9k, False: 3.54k]
  ------------------
  263|  13.9k|                igraph_real_t w = VECTOR(*weights)[VECTOR(incident)[i]];
  ------------------
  |  |   60|  13.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              igraph_real_t w = VECTOR(*weights)[VECTOR(incident)[i]];
  ------------------
  |  |   60|  13.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  264|  13.9k|                if (w == 0) continue;
  ------------------
  |  Branch (264:21): [True: 0, False: 13.9k]
  ------------------
  265|  13.9k|                s += w;
  266|  13.9k|                ent += (w * log(w));
  267|  13.9k|            }
  268|  3.54k|            d = (log(s) - ent / s) / log(k);
  269|  3.54k|        }
  270|       |
  271|  36.9k|        igraph_vector_push_back(res, d); /* reserved */
  272|  36.9k|    }
  273|       |
  274|    822|    igraph_vit_destroy(&vit);
  275|    822|    igraph_vector_int_destroy(&incident);
  276|    822|    IGRAPH_FINALLY_CLEAN(2);
  277|       |
  278|    822|    return IGRAPH_SUCCESS;
  279|    822|}

igraph_constraint:
   78|    822|                      igraph_vs_t vids, const igraph_vector_t *weights) {
   79|       |
   80|    822|    igraph_int_t no_of_nodes = igraph_vcount(graph);
   81|    822|    igraph_int_t no_of_edges = igraph_ecount(graph);
   82|    822|    igraph_vit_t vit;
   83|    822|    igraph_int_t nodes_to_calc;
   84|    822|    igraph_int_t a, b, c, i, j, q, vsize, vsize2;
   85|    822|    igraph_int_t edge, edge2;
   86|       |
   87|    822|    igraph_vector_t contrib;
   88|    822|    igraph_vector_t degree;
   89|    822|    igraph_vector_int_t ineis_in, ineis_out, jneis_in, jneis_out;
   90|       |
   91|    822|    if (weights != 0 && igraph_vector_size(weights) != no_of_edges) {
  ------------------
  |  Branch (91:9): [True: 822, False: 0]
  |  Branch (91:25): [True: 0, False: 822]
  ------------------
   92|      0|        IGRAPH_ERROR("Invalid length of weight 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]
  |  |  ------------------
  ------------------
   93|      0|    }
   94|       |
   95|    822|    IGRAPH_VECTOR_INIT_FINALLY(&contrib, no_of_nodes);
  ------------------
  |  |  104|    822|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    822|    do { \
  |  |  |  |  657|    822|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    822|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    822|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|    822|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    822|    do { \
  |  |  |  |  604|    822|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    822|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    822|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    822|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 822]
  |  |  |  |  ------------------
  |  |  |  |  608|    822|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    822|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (105:60): [Folded, False: 822]
  |  |  ------------------
  ------------------
   96|    822|    IGRAPH_VECTOR_INIT_FINALLY(&degree, no_of_nodes);
  ------------------
  |  |  104|    822|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    822|    do { \
  |  |  |  |  657|    822|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    822|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    822|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|    822|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    822|    do { \
  |  |  |  |  604|    822|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    822|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    822|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    822|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 822]
  |  |  |  |  ------------------
  |  |  |  |  608|    822|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    822|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (105:60): [Folded, False: 822]
  |  |  ------------------
  ------------------
   97|    822|    IGRAPH_VECTOR_INT_INIT_FINALLY(&ineis_in, 0);
  ------------------
  |  |  119|    822|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    822|    do { \
  |  |  |  |  657|    822|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    822|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    822|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|    822|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    822|    do { \
  |  |  |  |  604|    822|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    822|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    822|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    822|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 822]
  |  |  |  |  ------------------
  |  |  |  |  608|    822|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    822|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 822]
  |  |  ------------------
  ------------------
   98|    822|    IGRAPH_VECTOR_INT_INIT_FINALLY(&ineis_out, 0);
  ------------------
  |  |  119|    822|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    822|    do { \
  |  |  |  |  657|    822|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    822|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    822|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|    822|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    822|    do { \
  |  |  |  |  604|    822|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    822|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    822|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    822|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 822]
  |  |  |  |  ------------------
  |  |  |  |  608|    822|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    822|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 822]
  |  |  ------------------
  ------------------
   99|    822|    IGRAPH_VECTOR_INT_INIT_FINALLY(&jneis_in, 0);
  ------------------
  |  |  119|    822|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    822|    do { \
  |  |  |  |  657|    822|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    822|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    822|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|    822|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    822|    do { \
  |  |  |  |  604|    822|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    822|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    822|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    822|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 822]
  |  |  |  |  ------------------
  |  |  |  |  608|    822|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    822|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 822]
  |  |  ------------------
  ------------------
  100|    822|    IGRAPH_VECTOR_INT_INIT_FINALLY(&jneis_out, 0);
  ------------------
  |  |  119|    822|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    822|    do { \
  |  |  |  |  657|    822|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    822|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    822|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|    822|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    822|    do { \
  |  |  |  |  604|    822|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    822|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    822|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    822|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 822]
  |  |  |  |  ------------------
  |  |  |  |  608|    822|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    822|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 822]
  |  |  ------------------
  ------------------
  101|       |
  102|    822|    IGRAPH_CHECK(igraph_vit_create(graph, vids, &vit));
  ------------------
  |  |  656|    822|    do { \
  |  |  657|    822|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    822|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
  103|    822|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  603|    822|    do { \
  |  |  604|    822|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    822|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    822|         * incorrect destructor function with the pointer */ \
  |  |  607|    822|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 822]
  |  |  ------------------
  |  |  608|    822|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
  104|    822|    nodes_to_calc = IGRAPH_VIT_SIZE(vit);
  ------------------
  |  |  190|    822|#define IGRAPH_VIT_SIZE(vit)  ((vit).end - (vit).start)
  ------------------
  105|       |
  106|    822|    IGRAPH_CHECK(igraph_strength(graph, &degree, igraph_vss_all(), IGRAPH_ALL, IGRAPH_NO_LOOPS, weights));
  ------------------
  |  |  656|    822|    do { \
  |  |  657|    822|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    822|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
  107|       |
  108|    822|    IGRAPH_CHECK(igraph_vector_resize(res, nodes_to_calc));
  ------------------
  |  |  656|    822|    do { \
  |  |  657|    822|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    822|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    822|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 822]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    822|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 822]
  |  |  ------------------
  ------------------
  109|    822|    igraph_vector_null(res);
  110|       |
  111|  37.7k|    for (a = 0; a < nodes_to_calc; a++, IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  167|  36.9k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  |  Branch (111:17): [True: 36.9k, False: 822]
  ------------------
  112|  36.9k|        i = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  214|  36.9k|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 36.9k, False: 0]
  |  |  ------------------
  |  |  215|  36.9k|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  113|       |
  114|       |        /* get neighbors of i */
  115|  36.9k|        IGRAPH_CHECK(igraph_incident(graph, &ineis_in, i, IGRAPH_IN, IGRAPH_LOOPS));
  ------------------
  |  |  656|  36.9k|    do { \
  |  |  657|  36.9k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  36.9k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  36.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 36.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|  36.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 36.9k]
  |  |  ------------------
  ------------------
  116|  36.9k|        IGRAPH_CHECK(igraph_incident(graph, &ineis_out, i, IGRAPH_OUT, IGRAPH_LOOPS));
  ------------------
  |  |  656|  36.9k|    do { \
  |  |  657|  36.9k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  36.9k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  36.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 36.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|  36.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 36.9k]
  |  |  ------------------
  ------------------
  117|       |
  118|       |        /* NaN for isolates */
  119|  36.9k|        if (igraph_vector_int_size(&ineis_in) == 0 &&
  ------------------
  |  Branch (119:13): [True: 31.1k, False: 5.79k]
  ------------------
  120|  31.1k|            igraph_vector_int_size(&ineis_out) == 0) {
  ------------------
  |  Branch (120:13): [True: 29.0k, False: 2.04k]
  ------------------
  121|  29.0k|            VECTOR(*res)[a] = IGRAPH_NAN;
  ------------------
  |  |   60|  29.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*res)[a] = IGRAPH_NAN;
  ------------------
  |  |  140|  29.0k|#define IGRAPH_NAN ((double)NAN)
  ------------------
  122|  29.0k|        }
  123|       |
  124|       |        /* zero their contribution */
  125|  36.9k|        vsize = igraph_vector_int_size(&ineis_in);
  126|  55.1k|        for (b = 0; b < vsize; b++) {
  ------------------
  |  Branch (126:21): [True: 18.2k, False: 36.9k]
  ------------------
  127|  18.2k|            edge = VECTOR(ineis_in)[b];
  ------------------
  |  |   60|  18.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  128|  18.2k|            j = IGRAPH_OTHER(graph, edge, i);
  ------------------
  |  |  146|  18.2k|    ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|  18.2k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  18.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  115|  18.2k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  18.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|      0|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (146:21): [True: 18.2k, False: 0]
  |  |  ------------------
  ------------------
  129|  18.2k|            VECTOR(contrib)[j] = 0.0;
  ------------------
  |  |   60|  18.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  130|  18.2k|        }
  131|  36.9k|        vsize = igraph_vector_int_size(&ineis_out);
  132|  55.1k|        for (b = 0; b < vsize; b++) {
  ------------------
  |  Branch (132:21): [True: 18.2k, False: 36.9k]
  ------------------
  133|  18.2k|            edge = VECTOR(ineis_out)[b];
  ------------------
  |  |   60|  18.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  134|  18.2k|            j = IGRAPH_OTHER(graph, edge, i);
  ------------------
  |  |  146|  18.2k|    ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|  18.2k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  18.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  115|  3.01k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  3.01k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|  15.2k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  15.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (146:21): [True: 3.01k, False: 15.2k]
  |  |  ------------------
  ------------------
  135|  18.2k|            VECTOR(contrib)[j] = 0.0;
  ------------------
  |  |   60|  18.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  136|  18.2k|        }
  137|       |
  138|       |        /* add the direct contributions, in-neighbors and out-neighbors */
  139|  36.9k|        vsize = igraph_vector_int_size(&ineis_in);
  140|  55.1k|        for (b = 0; b < vsize; b++) {
  ------------------
  |  Branch (140:21): [True: 18.2k, False: 36.9k]
  ------------------
  141|  18.2k|            edge = VECTOR(ineis_in)[b];
  ------------------
  |  |   60|  18.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  142|  18.2k|            j = IGRAPH_OTHER(graph, edge, i);
  ------------------
  |  |  146|  18.2k|    ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|  18.2k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  18.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  115|  18.2k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  18.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|      0|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (146:21): [True: 18.2k, False: 0]
  |  |  ------------------
  ------------------
  143|  18.2k|            if (i != j) {     /* excluding loops */
  ------------------
  |  Branch (143:17): [True: 15.2k, False: 3.01k]
  ------------------
  144|  15.2k|                if (weights) {
  ------------------
  |  Branch (144:21): [True: 15.2k, False: 0]
  ------------------
  145|  15.2k|                    VECTOR(contrib)[j] +=
  ------------------
  |  |   60|  15.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  146|  15.2k|                        VECTOR(*weights)[edge] / VECTOR(degree)[i];
  ------------------
  |  |   60|  15.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                      VECTOR(*weights)[edge] / VECTOR(degree)[i];
  ------------------
  |  |   60|  15.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  147|  15.2k|                } else {
  148|      0|                    VECTOR(contrib)[j] += 1.0 / VECTOR(degree)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  VECTOR(contrib)[j] += 1.0 / VECTOR(degree)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  149|      0|                }
  150|  15.2k|            }
  151|  18.2k|        }
  152|  36.9k|        if (igraph_is_directed(graph)) {
  ------------------
  |  Branch (152:13): [True: 36.9k, False: 0]
  ------------------
  153|  36.9k|            vsize = igraph_vector_int_size(&ineis_out);
  154|  55.1k|            for (b = 0; b < vsize; b++) {
  ------------------
  |  Branch (154:25): [True: 18.2k, False: 36.9k]
  ------------------
  155|  18.2k|                edge = VECTOR(ineis_out)[b];
  ------------------
  |  |   60|  18.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  156|  18.2k|                j = IGRAPH_OTHER(graph, edge, i);
  ------------------
  |  |  146|  18.2k|    ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|  18.2k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  18.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  115|  3.01k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  3.01k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|  15.2k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  15.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (146:21): [True: 3.01k, False: 15.2k]
  |  |  ------------------
  ------------------
  157|  18.2k|                if (i != j) {
  ------------------
  |  Branch (157:21): [True: 15.2k, False: 3.01k]
  ------------------
  158|  15.2k|                    if (weights) {
  ------------------
  |  Branch (158:25): [True: 15.2k, False: 0]
  ------------------
  159|  15.2k|                        VECTOR(contrib)[j] +=
  ------------------
  |  |   60|  15.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  160|  15.2k|                            VECTOR(*weights)[edge] / VECTOR(degree)[i];
  ------------------
  |  |   60|  15.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                          VECTOR(*weights)[edge] / VECTOR(degree)[i];
  ------------------
  |  |   60|  15.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  161|  15.2k|                    } else {
  162|      0|                        VECTOR(contrib)[j] += 1.0 / VECTOR(degree)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                      VECTOR(contrib)[j] += 1.0 / VECTOR(degree)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  163|      0|                    }
  164|  15.2k|                }
  165|  18.2k|            }
  166|  36.9k|        }
  167|       |
  168|       |        /* add the indirect contributions, in-in, in-out, out-in, out-out */
  169|  36.9k|        vsize = igraph_vector_int_size(&ineis_in);
  170|  55.1k|        for (b = 0; b < vsize; b++) {
  ------------------
  |  Branch (170:21): [True: 18.2k, False: 36.9k]
  ------------------
  171|  18.2k|            edge = VECTOR(ineis_in)[b];
  ------------------
  |  |   60|  18.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  172|  18.2k|            j = IGRAPH_OTHER(graph, edge, i);
  ------------------
  |  |  146|  18.2k|    ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|  18.2k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  18.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  115|  18.2k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  18.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|      0|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (146:21): [True: 18.2k, False: 0]
  |  |  ------------------
  ------------------
  173|  18.2k|            if (i == j) {
  ------------------
  |  Branch (173:17): [True: 3.01k, False: 15.2k]
  ------------------
  174|  3.01k|                continue;
  175|  3.01k|            }
  176|  15.2k|            IGRAPH_CHECK(igraph_incident(graph, &jneis_in, j, IGRAPH_IN, IGRAPH_LOOPS));
  ------------------
  |  |  656|  15.2k|    do { \
  |  |  657|  15.2k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  15.2k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  15.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 15.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|  15.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 15.2k]
  |  |  ------------------
  ------------------
  177|  15.2k|            IGRAPH_CHECK(igraph_incident(graph, &jneis_out, j, IGRAPH_OUT, IGRAPH_LOOPS));
  ------------------
  |  |  656|  15.2k|    do { \
  |  |  657|  15.2k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  15.2k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  15.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 15.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|  15.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 15.2k]
  |  |  ------------------
  ------------------
  178|  15.2k|            vsize2 = igraph_vector_int_size(&jneis_in);
  179|   108k|            for (c = 0; c < vsize2; c++) {
  ------------------
  |  Branch (179:25): [True: 93.6k, False: 15.2k]
  ------------------
  180|  93.6k|                edge2 = VECTOR(jneis_in)[c];
  ------------------
  |  |   60|  93.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  181|  93.6k|                q = IGRAPH_OTHER(graph, edge2, j);
  ------------------
  |  |  146|  93.6k|    ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|  93.6k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  93.6k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  115|  93.6k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  93.6k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|      0|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (146:21): [True: 93.6k, False: 0]
  |  |  ------------------
  ------------------
  182|  93.6k|                if (j != q) {
  ------------------
  |  Branch (182:21): [True: 71.8k, False: 21.8k]
  ------------------
  183|  71.8k|                    if (weights) {
  ------------------
  |  Branch (183:25): [True: 71.8k, False: 0]
  ------------------
  184|  71.8k|                        VECTOR(contrib)[q] +=
  ------------------
  |  |   60|  71.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  185|  71.8k|                            VECTOR(*weights)[edge] *
  ------------------
  |  |   60|  71.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  186|  71.8k|                            VECTOR(*weights)[edge2] /
  ------------------
  |  |   60|  71.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  187|  71.8k|                            VECTOR(degree)[i] / VECTOR(degree)[j];
  ------------------
  |  |   60|  71.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                          VECTOR(degree)[i] / VECTOR(degree)[j];
  ------------------
  |  |   60|  71.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  188|  71.8k|                    } else {
  189|      0|                        VECTOR(contrib)[q] += 1 / VECTOR(degree)[i] / VECTOR(degree)[j];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                      VECTOR(contrib)[q] += 1 / VECTOR(degree)[i] / VECTOR(degree)[j];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                      VECTOR(contrib)[q] += 1 / VECTOR(degree)[i] / VECTOR(degree)[j];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  190|      0|                    }
  191|  71.8k|                }
  192|  93.6k|            }
  193|  15.2k|            if (igraph_is_directed(graph)) {
  ------------------
  |  Branch (193:17): [True: 15.2k, False: 0]
  ------------------
  194|  15.2k|                vsize2 = igraph_vector_int_size(&jneis_out);
  195|   945k|                for (c = 0; c < vsize2; c++) {
  ------------------
  |  Branch (195:29): [True: 930k, False: 15.2k]
  ------------------
  196|   930k|                    edge2 = VECTOR(jneis_out)[c];
  ------------------
  |  |   60|   930k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  197|   930k|                    q = IGRAPH_OTHER(graph, edge2, j);
  ------------------
  |  |  146|   930k|    ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|   930k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   930k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  115|  21.8k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  21.8k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|   908k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   908k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (146:21): [True: 21.8k, False: 908k]
  |  |  ------------------
  ------------------
  198|   930k|                    if (j != q) {
  ------------------
  |  Branch (198:25): [True: 908k, False: 21.8k]
  ------------------
  199|   908k|                        if (weights) {
  ------------------
  |  Branch (199:29): [True: 908k, False: 0]
  ------------------
  200|   908k|                            VECTOR(contrib)[q] +=
  ------------------
  |  |   60|   908k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  201|   908k|                                VECTOR(*weights)[edge] *
  ------------------
  |  |   60|   908k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  202|   908k|                                VECTOR(*weights)[edge2] /
  ------------------
  |  |   60|   908k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  203|   908k|                                VECTOR(degree)[i] / VECTOR(degree)[j];
  ------------------
  |  |   60|   908k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                              VECTOR(degree)[i] / VECTOR(degree)[j];
  ------------------
  |  |   60|   908k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  204|   908k|                        } else {
  205|      0|                            VECTOR(contrib)[q] += 1 / VECTOR(degree)[i] / VECTOR(degree)[j];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                          VECTOR(contrib)[q] += 1 / VECTOR(degree)[i] / VECTOR(degree)[j];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                          VECTOR(contrib)[q] += 1 / VECTOR(degree)[i] / VECTOR(degree)[j];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  206|      0|                        }
  207|   908k|                    }
  208|   930k|                }
  209|  15.2k|            }
  210|  15.2k|        }
  211|  36.9k|        if (igraph_is_directed(graph)) {
  ------------------
  |  Branch (211:13): [True: 36.9k, False: 0]
  ------------------
  212|  36.9k|            vsize = igraph_vector_int_size(&ineis_out);
  213|  55.1k|            for (b = 0; b < vsize; b++) {
  ------------------
  |  Branch (213:25): [True: 18.2k, False: 36.9k]
  ------------------
  214|  18.2k|                edge = VECTOR(ineis_out)[b];
  ------------------
  |  |   60|  18.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  215|  18.2k|                j = IGRAPH_OTHER(graph, edge, i);
  ------------------
  |  |  146|  18.2k|    ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|  18.2k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  18.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  115|  3.01k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  3.01k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|  15.2k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  15.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (146:21): [True: 3.01k, False: 15.2k]
  |  |  ------------------
  ------------------
  216|  18.2k|                if (i == j) {
  ------------------
  |  Branch (216:21): [True: 3.01k, False: 15.2k]
  ------------------
  217|  3.01k|                    continue;
  218|  3.01k|                }
  219|  15.2k|                IGRAPH_CHECK(igraph_incident(graph, &jneis_in, j, IGRAPH_IN, IGRAPH_LOOPS));
  ------------------
  |  |  656|  15.2k|    do { \
  |  |  657|  15.2k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  15.2k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  15.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 15.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|  15.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 15.2k]
  |  |  ------------------
  ------------------
  220|  15.2k|                IGRAPH_CHECK(igraph_incident(graph, &jneis_out, j, IGRAPH_OUT, IGRAPH_LOOPS));
  ------------------
  |  |  656|  15.2k|    do { \
  |  |  657|  15.2k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  15.2k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  15.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 15.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|  15.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 15.2k]
  |  |  ------------------
  ------------------
  221|  15.2k|                vsize2 = igraph_vector_int_size(&jneis_in);
  222|   908k|                for (c = 0; c < vsize2; c++) {
  ------------------
  |  Branch (222:29): [True: 893k, False: 15.2k]
  ------------------
  223|   893k|                    edge2 = VECTOR(jneis_in)[c];
  ------------------
  |  |   60|   893k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  224|   893k|                    q = IGRAPH_OTHER(graph, edge2, j);
  ------------------
  |  |  146|   893k|    ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|   893k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   893k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  115|   893k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   893k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|      0|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (146:21): [True: 893k, False: 0]
  |  |  ------------------
  ------------------
  225|   893k|                    if (j != q) {
  ------------------
  |  Branch (225:25): [True: 886k, False: 7.46k]
  ------------------
  226|   886k|                        if (weights) {
  ------------------
  |  Branch (226:29): [True: 886k, False: 0]
  ------------------
  227|   886k|                            VECTOR(contrib)[q] +=
  ------------------
  |  |   60|   886k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  228|   886k|                                VECTOR(*weights)[edge] *
  ------------------
  |  |   60|   886k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  229|   886k|                                VECTOR(*weights)[edge2] /
  ------------------
  |  |   60|   886k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  230|   886k|                                VECTOR(degree)[i] / VECTOR(degree)[j];
  ------------------
  |  |   60|   886k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                              VECTOR(degree)[i] / VECTOR(degree)[j];
  ------------------
  |  |   60|   886k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  231|   886k|                        } else {
  232|      0|                            VECTOR(contrib)[q] += 1 / VECTOR(degree)[i] / VECTOR(degree)[j];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                          VECTOR(contrib)[q] += 1 / VECTOR(degree)[i] / VECTOR(degree)[j];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                          VECTOR(contrib)[q] += 1 / VECTOR(degree)[i] / VECTOR(degree)[j];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  233|      0|                        }
  234|   886k|                    }
  235|   893k|                }
  236|  15.2k|                vsize2 = igraph_vector_int_size(&jneis_out);
  237|  94.5k|                for (c = 0; c < vsize2; c++) {
  ------------------
  |  Branch (237:29): [True: 79.2k, False: 15.2k]
  ------------------
  238|  79.2k|                    edge2 = VECTOR(jneis_out)[c];
  ------------------
  |  |   60|  79.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  239|  79.2k|                    q = IGRAPH_OTHER(graph, edge2, j);
  ------------------
  |  |  146|  79.2k|    ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|  79.2k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  79.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  115|  7.46k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  7.46k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|  71.8k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  71.8k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (146:21): [True: 7.46k, False: 71.8k]
  |  |  ------------------
  ------------------
  240|  79.2k|                    if (j != q) {
  ------------------
  |  Branch (240:25): [True: 71.8k, False: 7.46k]
  ------------------
  241|  71.8k|                        if (weights) {
  ------------------
  |  Branch (241:29): [True: 71.8k, False: 0]
  ------------------
  242|  71.8k|                            VECTOR(contrib)[q] +=
  ------------------
  |  |   60|  71.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  243|  71.8k|                                VECTOR(*weights)[edge] *
  ------------------
  |  |   60|  71.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  244|  71.8k|                                VECTOR(*weights)[edge2] /
  ------------------
  |  |   60|  71.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  245|  71.8k|                                VECTOR(degree)[i] / VECTOR(degree)[j];
  ------------------
  |  |   60|  71.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                              VECTOR(degree)[i] / VECTOR(degree)[j];
  ------------------
  |  |   60|  71.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  246|  71.8k|                        } else {
  247|      0|                            VECTOR(contrib)[q] += 1 / VECTOR(degree)[i] / VECTOR(degree)[j];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                          VECTOR(contrib)[q] += 1 / VECTOR(degree)[i] / VECTOR(degree)[j];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                          VECTOR(contrib)[q] += 1 / VECTOR(degree)[i] / VECTOR(degree)[j];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  248|      0|                        }
  249|  71.8k|                    }
  250|  79.2k|                }
  251|  15.2k|            }
  252|  36.9k|        }
  253|       |
  254|       |        /* squared sum of the contributions */
  255|  36.9k|        vsize = igraph_vector_int_size(&ineis_in);
  256|  55.1k|        for (b = 0; b < vsize; b++) {
  ------------------
  |  Branch (256:21): [True: 18.2k, False: 36.9k]
  ------------------
  257|  18.2k|            edge = VECTOR(ineis_in)[b];
  ------------------
  |  |   60|  18.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  258|  18.2k|            j = IGRAPH_OTHER(graph, edge, i);
  ------------------
  |  |  146|  18.2k|    ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|  18.2k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  18.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  115|  18.2k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  18.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|      0|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (146:21): [True: 18.2k, False: 0]
  |  |  ------------------
  ------------------
  259|  18.2k|            if (i == j) {
  ------------------
  |  Branch (259:17): [True: 3.01k, False: 15.2k]
  ------------------
  260|  3.01k|                continue;
  261|  3.01k|            }
  262|  15.2k|            VECTOR(*res)[a] += VECTOR(contrib)[j] * VECTOR(contrib)[j];
  ------------------
  |  |   60|  15.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*res)[a] += VECTOR(contrib)[j] * VECTOR(contrib)[j];
  ------------------
  |  |   60|  15.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*res)[a] += VECTOR(contrib)[j] * VECTOR(contrib)[j];
  ------------------
  |  |   60|  15.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  263|  15.2k|            VECTOR(contrib)[j] = 0.0;
  ------------------
  |  |   60|  15.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  264|  15.2k|        }
  265|  36.9k|        if (igraph_is_directed(graph)) {
  ------------------
  |  Branch (265:13): [True: 36.9k, False: 0]
  ------------------
  266|  36.9k|            vsize =  igraph_vector_int_size(&ineis_out);
  267|  55.1k|            for (b = 0; b < vsize; b++) {
  ------------------
  |  Branch (267:25): [True: 18.2k, False: 36.9k]
  ------------------
  268|  18.2k|                edge = VECTOR(ineis_out)[b];
  ------------------
  |  |   60|  18.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  269|  18.2k|                j = IGRAPH_OTHER(graph, edge, i);
  ------------------
  |  |  146|  18.2k|    ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|  18.2k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  18.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  115|  3.01k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  3.01k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|  15.2k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  15.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (146:21): [True: 3.01k, False: 15.2k]
  |  |  ------------------
  ------------------
  270|  18.2k|                if (i == j) {
  ------------------
  |  Branch (270:21): [True: 3.01k, False: 15.2k]
  ------------------
  271|  3.01k|                    continue;
  272|  3.01k|                }
  273|  15.2k|                VECTOR(*res)[a] += VECTOR(contrib)[j] * VECTOR(contrib)[j];
  ------------------
  |  |   60|  15.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[a] += VECTOR(contrib)[j] * VECTOR(contrib)[j];
  ------------------
  |  |   60|  15.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[a] += VECTOR(contrib)[j] * VECTOR(contrib)[j];
  ------------------
  |  |   60|  15.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  274|  15.2k|                VECTOR(contrib)[j] = 0.0;
  ------------------
  |  |   60|  15.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  275|  15.2k|            }
  276|  36.9k|        }
  277|  36.9k|    }
  278|       |
  279|    822|    igraph_vit_destroy(&vit);
  280|    822|    igraph_vector_int_destroy(&jneis_out);
  281|    822|    igraph_vector_int_destroy(&jneis_in);
  282|    822|    igraph_vector_int_destroy(&ineis_out);
  283|    822|    igraph_vector_int_destroy(&ineis_in);
  284|    822|    igraph_vector_destroy(&degree);
  285|    822|    igraph_vector_destroy(&contrib);
  286|    822|    IGRAPH_FINALLY_CLEAN(7);
  287|       |
  288|    822|    return IGRAPH_SUCCESS;
  289|    822|}

igraph_strength:
  637|  1.64k|) {
  638|       |
  639|  1.64k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  640|  1.64k|    igraph_vit_t vit;
  641|  1.64k|    igraph_int_t no_vids;
  642|  1.64k|    igraph_vector_int_t degrees;
  643|  1.64k|    igraph_vector_int_t neis;
  644|       |
  645|  1.64k|    if (! weights) {
  ------------------
  |  Branch (645:9): [True: 0, False: 1.64k]
  ------------------
  646|      0|        IGRAPH_VECTOR_INT_INIT_FINALLY(&degrees, 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]
  |  |  ------------------
  ------------------
  647|      0|        IGRAPH_CHECK(igraph_degree(graph, &degrees, vids, mode, 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]
  |  |  ------------------
  ------------------
  648|      0|        no_vids = igraph_vector_int_size(&degrees);
  649|      0|        IGRAPH_CHECK(igraph_vector_resize(res, no_vids));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  650|      0|        for (igraph_int_t i = 0; i < no_vids; i++) {
  ------------------
  |  Branch (650:34): [True: 0, False: 0]
  ------------------
  651|      0|            VECTOR(*res)[i] = VECTOR(degrees)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*res)[i] = VECTOR(degrees)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  652|      0|        }
  653|      0|        igraph_vector_int_destroy(&degrees);
  654|      0|        IGRAPH_FINALLY_CLEAN(1);
  655|      0|        return IGRAPH_SUCCESS;
  656|      0|    }
  657|       |
  658|  1.64k|    if (igraph_vector_size(weights) != igraph_ecount(graph)) {
  ------------------
  |  Branch (658:9): [True: 0, False: 1.64k]
  ------------------
  659|      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]
  |  |  ------------------
  ------------------
  660|      0|    }
  661|       |
  662|  1.64k|    if (mode != IGRAPH_OUT && mode != IGRAPH_IN && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (662:9): [True: 1.64k, False: 0]
  |  Branch (662:31): [True: 1.64k, False: 0]
  |  Branch (662:52): [True: 0, False: 1.64k]
  ------------------
  663|      0|        IGRAPH_ERROR("Invalid mode for vertex strength calculation.", IGRAPH_EINVMODE);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  664|      0|    }
  665|       |
  666|  1.64k|    if (igraph_vs_is_all(&vids)) {
  ------------------
  |  Branch (666:9): [True: 1.64k, False: 0]
  ------------------
  667|  1.64k|        return strength_all(graph, res, mode, loops, weights);
  668|  1.64k|    }
  669|       |
  670|      0|    IGRAPH_CHECK(igraph_vit_create(graph, vids, &vit));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  671|      0|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  603|      0|    do { \
  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  ------------------
  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  672|      0|    no_vids = IGRAPH_VIT_SIZE(vit);
  ------------------
  |  |  190|      0|#define IGRAPH_VIT_SIZE(vit)  ((vit).end - (vit).start)
  ------------------
  673|       |
  674|      0|    IGRAPH_VECTOR_INT_INIT_FINALLY(&neis, 0);
  ------------------
  |  |  119|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|      0|    do { \
  |  |  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 0]
  |  |  ------------------
  ------------------
  675|      0|    IGRAPH_CHECK(igraph_vector_int_reserve(&neis, no_of_nodes));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  676|      0|    IGRAPH_CHECK(igraph_vector_resize(res, no_vids));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  677|      0|    igraph_vector_null(res);
  678|       |
  679|      0|    for (igraph_int_t i = 0; !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  179|      0|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
                  for (igraph_int_t i = 0; !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  167|      0|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  |  Branch (679:30): [True: 0, False: 0]
  ------------------
  680|      0|        IGRAPH_CHECK(igraph_incident(graph, &neis, IGRAPH_VIT_GET(vit), mode, loops));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  ------------------
  |  |  |  Branch (657:40): [True: 0, False: 0]
  |  |  ------------------
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  681|      0|        const igraph_int_t n = igraph_vector_int_size(&neis);
  682|      0|        for (igraph_int_t j = 0; j < n; j++) {
  ------------------
  |  Branch (682:34): [True: 0, False: 0]
  ------------------
  683|      0|            igraph_int_t edge = VECTOR(neis)[j];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  684|      0|            VECTOR(*res)[i] += VECTOR(*weights)[edge];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*res)[i] += VECTOR(*weights)[edge];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  685|      0|        }
  686|      0|    }
  687|       |
  688|      0|    igraph_vit_destroy(&vit);
  689|      0|    igraph_vector_int_destroy(&neis);
  690|      0|    IGRAPH_FINALLY_CLEAN(2);
  691|       |
  692|      0|    return IGRAPH_SUCCESS;
  693|      0|}
degrees.c:strength_all:
  540|  1.64k|        const igraph_vector_t *weights) {
  541|       |
  542|       |    // When calculating strength for all vertices, iterating over edges is faster
  543|  1.64k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  544|  1.64k|    igraph_int_t no_of_edges = igraph_ecount(graph);
  545|       |
  546|  1.64k|    IGRAPH_CHECK(igraph_vector_resize(res, no_of_nodes));
  ------------------
  |  |  656|  1.64k|    do { \
  |  |  657|  1.64k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.64k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.64k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
  547|  1.64k|    igraph_vector_null(res);
  548|       |
  549|  1.64k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (549:9): [True: 821, False: 822]
  ------------------
  550|    821|        mode = IGRAPH_ALL;
  551|    821|    }
  552|       |
  553|       |    /* With only out- or in-edges, each self-loop is seen once anyway. */
  554|  1.64k|    if (loops == IGRAPH_LOOPS_ONCE && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (554:9): [True: 0, False: 1.64k]
  |  Branch (554:39): [True: 0, False: 0]
  ------------------
  555|      0|        loops = IGRAPH_LOOPS_TWICE;
  556|      0|    }
  557|       |
  558|  1.64k|    if (loops == IGRAPH_LOOPS_TWICE) {
  ------------------
  |  Branch (558:9): [True: 821, False: 822]
  ------------------
  559|    821|        if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (559:13): [True: 821, False: 0]
  ------------------
  560|  9.93k|            for (igraph_int_t edge = 0; edge < no_of_edges; ++edge) {
  ------------------
  |  Branch (560:41): [True: 9.11k, False: 821]
  ------------------
  561|  9.11k|                VECTOR(*res)[IGRAPH_FROM(graph, edge)] += VECTOR(*weights)[edge];
  ------------------
  |  |   60|  9.11k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[IGRAPH_FROM(graph, edge)] += VECTOR(*weights)[edge];
  ------------------
  |  |  115|  9.11k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  9.11k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
                              VECTOR(*res)[IGRAPH_FROM(graph, edge)] += VECTOR(*weights)[edge];
  ------------------
  |  |   60|  9.11k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  562|  9.11k|            }
  563|    821|        }
  564|    821|        if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (564:13): [True: 821, False: 0]
  ------------------
  565|  9.93k|            for (igraph_int_t edge = 0; edge < no_of_edges; ++edge) {
  ------------------
  |  Branch (565:41): [True: 9.11k, False: 821]
  ------------------
  566|  9.11k|                VECTOR(*res)[IGRAPH_TO(graph, edge)] += VECTOR(*weights)[edge];
  ------------------
  |  |   60|  9.11k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[IGRAPH_TO(graph, edge)] += VECTOR(*weights)[edge];
  ------------------
  |  |  128|  9.11k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  9.11k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
                              VECTOR(*res)[IGRAPH_TO(graph, edge)] += VECTOR(*weights)[edge];
  ------------------
  |  |   60|  9.11k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  567|  9.11k|            }
  568|    821|        }
  569|    822|    } else if (loops == IGRAPH_LOOPS_ONCE) {
  ------------------
  |  Branch (569:16): [True: 0, False: 822]
  ------------------
  570|       |        /* mode == IGRAPH_ALL: count self-loops in the out-pass only. Two separate
  571|       |         * passes keep the summation order, thus the result for graphs without
  572|       |         * self-loops, identical to IGRAPH_LOOPS_TWICE. */
  573|      0|        for (igraph_int_t edge = 0; edge < no_of_edges; ++edge) {
  ------------------
  |  Branch (573:37): [True: 0, False: 0]
  ------------------
  574|      0|            VECTOR(*res)[IGRAPH_FROM(graph, edge)] += VECTOR(*weights)[edge];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*res)[IGRAPH_FROM(graph, edge)] += VECTOR(*weights)[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)
  |  |  ------------------
  ------------------
                          VECTOR(*res)[IGRAPH_FROM(graph, edge)] += VECTOR(*weights)[edge];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  575|      0|        }
  576|      0|        for (igraph_int_t edge = 0; edge < no_of_edges; ++edge) {
  ------------------
  |  Branch (576:37): [True: 0, False: 0]
  ------------------
  577|      0|            const 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)
  |  |  ------------------
  ------------------
  578|      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 (578:17): [True: 0, False: 0]
  ------------------
  579|      0|                VECTOR(*res)[to] += VECTOR(*weights)[edge];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[to] += VECTOR(*weights)[edge];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  580|      0|            }
  581|      0|        }
  582|    822|    } else {
  583|    822|        if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (583:13): [True: 822, False: 0]
  ------------------
  584|  19.0k|            for (igraph_int_t edge = 0; edge < no_of_edges; ++edge) {
  ------------------
  |  Branch (584:41): [True: 18.2k, False: 822]
  ------------------
  585|  18.2k|                igraph_int_t from = IGRAPH_FROM(graph, edge);
  ------------------
  |  |  115|  18.2k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  18.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  586|  18.2k|                if (from != IGRAPH_TO(graph, edge)) {
  ------------------
  |  |  128|  18.2k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  18.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (586:21): [True: 15.2k, False: 3.01k]
  ------------------
  587|  15.2k|                   VECTOR(*res)[from] += VECTOR(*weights)[edge];
  ------------------
  |  |   60|  15.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                 VECTOR(*res)[from] += VECTOR(*weights)[edge];
  ------------------
  |  |   60|  15.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  588|  15.2k|                }
  589|  18.2k|            }
  590|    822|        }
  591|    822|        if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (591:13): [True: 822, False: 0]
  ------------------
  592|  19.0k|            for (igraph_int_t edge = 0; edge < no_of_edges; ++edge) {
  ------------------
  |  Branch (592:41): [True: 18.2k, False: 822]
  ------------------
  593|  18.2k|                igraph_int_t to = IGRAPH_TO(graph, edge);
  ------------------
  |  |  128|  18.2k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  18.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  594|  18.2k|                if (IGRAPH_FROM(graph, edge) != to) {
  ------------------
  |  |  115|  18.2k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  18.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (594:21): [True: 15.2k, False: 3.01k]
  ------------------
  595|  15.2k|                    VECTOR(*res)[to] += VECTOR(*weights)[edge];
  ------------------
  |  |   60|  15.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  VECTOR(*res)[to] += VECTOR(*weights)[edge];
  ------------------
  |  |   60|  15.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  596|  15.2k|                }
  597|  18.2k|            }
  598|    822|        }
  599|    822|    }
  600|       |
  601|  1.64k|    return IGRAPH_SUCCESS;
  602|  1.64k|}

igraph_has_multiple:
  176|  1.64k|igraph_error_t igraph_has_multiple(const igraph_t *graph, igraph_bool_t *res) {
  177|  1.64k|    igraph_int_t vc = igraph_vcount(graph);
  178|  1.64k|    igraph_int_t ec = igraph_ecount(graph);
  179|  1.64k|    igraph_bool_t directed = igraph_is_directed(graph);
  180|       |
  181|  1.64k|    IGRAPH_RETURN_IF_CACHED_BOOL(graph, IGRAPH_PROP_HAS_MULTI, res);
  ------------------
  |  |   97|  1.64k|    do { \
  |  |   98|  1.64k|        if (igraph_i_property_cache_has((graphptr), (prop))) { \
  |  |  ------------------
  |  |  |  Branch (98:13): [True: 1.64k, False: 0]
  |  |  ------------------
  |  |   99|  1.64k|            *(resptr) = igraph_i_property_cache_get_bool((graphptr), (prop)); \
  |  |  100|  1.64k|            return IGRAPH_SUCCESS; \
  |  |  101|  1.64k|        } \
  |  |  102|  1.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (102:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  182|       |
  183|      0|    if (vc == 0 || ec == 0) {
  ------------------
  |  Branch (183:9): [True: 0, False: 0]
  |  Branch (183:20): [True: 0, False: 0]
  ------------------
  184|      0|        *res = false;
  185|      0|    } else {
  186|      0|        igraph_vector_int_t neis;
  187|      0|        igraph_int_t i, j, n;
  188|      0|        igraph_bool_t found = false;
  189|      0|        IGRAPH_VECTOR_INT_INIT_FINALLY(&neis, 0);
  ------------------
  |  |  119|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|      0|    do { \
  |  |  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 0]
  |  |  ------------------
  ------------------
  190|      0|        for (i = 0; i < vc && !found; i++) {
  ------------------
  |  Branch (190:21): [True: 0, False: 0]
  |  Branch (190:31): [True: 0, False: 0]
  ------------------
  191|      0|            IGRAPH_CHECK(igraph_neighbors(
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  192|      0|                graph, &neis, i, IGRAPH_OUT, IGRAPH_LOOPS, IGRAPH_MULTIPLE
  193|      0|            ));
  194|      0|            n = igraph_vector_int_size(&neis);
  195|      0|            for (j = 1; j < n; j++) {
  ------------------
  |  Branch (195:25): [True: 0, False: 0]
  ------------------
  196|      0|                if (VECTOR(neis)[j - 1] == VECTOR(neis)[j]) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              if (VECTOR(neis)[j - 1] == VECTOR(neis)[j]) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (196:21): [True: 0, False: 0]
  ------------------
  197|       |                    /* If the graph is undirected, loop edges appear twice in the neighbor
  198|       |                     * list, so check the next item as well */
  199|      0|                    if (directed) {
  ------------------
  |  Branch (199:25): [True: 0, False: 0]
  ------------------
  200|       |                        /* Directed, so this is a real multiple edge */
  201|      0|                        found = true; break;
  202|      0|                    } else if (VECTOR(neis)[j - 1] != i) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (202:32): [True: 0, False: 0]
  ------------------
  203|       |                        /* Undirected, but not a loop edge */
  204|      0|                        found = true; break;
  205|      0|                    } else if (j < n - 1 && VECTOR(neis)[j] == VECTOR(neis)[j + 1]) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  } else if (j < n - 1 && VECTOR(neis)[j] == VECTOR(neis)[j + 1]) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (205:32): [True: 0, False: 0]
  |  Branch (205:45): [True: 0, False: 0]
  ------------------
  206|       |                        /* Undirected, loop edge, multiple times */
  207|      0|                        found = true; break;
  208|      0|                    }
  209|      0|                }
  210|      0|            }
  211|      0|        }
  212|      0|        *res = found;
  213|      0|        igraph_vector_int_destroy(&neis);
  214|      0|        IGRAPH_FINALLY_CLEAN(1);
  215|      0|    }
  216|       |
  217|      0|    igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_HAS_MULTI, *res);
  218|       |
  219|      0|    return IGRAPH_SUCCESS;
  220|      0|}

igraph_transitivity_barrat:
  880|    822|                               igraph_transitivity_mode_t mode) {
  881|    822|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  882|    822|    igraph_int_t no_of_edges = igraph_ecount(graph);
  883|    822|    igraph_bool_t has_multiple;
  884|       |
  885|       |    /* Handle fallback to unweighted version and common cases */
  886|    822|    if (!weights) {
  ------------------
  |  Branch (886:9): [True: 0, False: 822]
  ------------------
  887|      0|        if (no_of_edges != 0) {
  ------------------
  |  Branch (887:13): [True: 0, False: 0]
  ------------------
  888|      0|            IGRAPH_WARNING("No weights given for Barrat's transitivity, unweighted version is used.");
  ------------------
  |  |  797|      0|    do { \
  |  |  798|      0|        igraph_warning(reason, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  799|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (799:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  889|      0|        }
  890|      0|        return igraph_transitivity_local_undirected(graph, res, vids, mode);
  891|      0|    }
  892|       |
  893|    822|    if (igraph_vector_size(weights) != no_of_edges) {
  ------------------
  |  Branch (893:9): [True: 0, False: 822]
  ------------------
  894|      0|        IGRAPH_ERRORF("Edge weight vector length (%" IGRAPH_PRId ") not equal to "
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  895|      0|                      "number of edges (%" IGRAPH_PRId ").", IGRAPH_EINVAL,
  896|      0|                      igraph_vector_size(weights), no_of_edges);
  897|      0|    }
  898|       |
  899|    822|    if (no_of_nodes == 0) {
  ------------------
  |  Branch (899:9): [True: 1, False: 821]
  ------------------
  900|      1|        igraph_vector_clear(res);
  901|      1|        return IGRAPH_SUCCESS;
  902|      1|    }
  903|       |
  904|    821|    IGRAPH_CHECK(igraph_has_multiple(graph, &has_multiple));
  ------------------
  |  |  656|    821|    do { \
  |  |  657|    821|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    821|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    821|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 821]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    821|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 821]
  |  |  ------------------
  ------------------
  905|    821|    if (! has_multiple && igraph_is_directed(graph)) {
  ------------------
  |  Branch (905:9): [True: 821, False: 0]
  |  Branch (905:27): [True: 0, False: 821]
  ------------------
  906|       |        /* When the graph is directed, mutual edges are effectively multi-edges as we
  907|       |         * are ignoring edge directions. */
  908|      0|        IGRAPH_CHECK(igraph_has_mutual(graph, &has_multiple, 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]
  |  |  ------------------
  ------------------
  909|      0|    }
  910|    821|    if (has_multiple) {
  ------------------
  |  Branch (910:9): [True: 0, False: 821]
  ------------------
  911|      0|        IGRAPH_ERROR("Barrat's weighted transitivity measure works only if the graph has no multi-edges.",
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  912|      0|                     IGRAPH_EINVAL);
  913|      0|    }
  914|       |
  915|       |    /* Preconditions validated, now we can call the real implementation */
  916|       |
  917|    821|    if (igraph_vs_is_all(&vids)) {
  ------------------
  |  Branch (917:9): [True: 821, False: 0]
  ------------------
  918|    821|        return transitivity_barrat4(graph, res, weights, mode);
  919|    821|    } else {
  920|      0|        return transitivity_barrat1(graph, res, vids, weights, mode);
  921|      0|    }
  922|    821|}
triangles.c:transitivity_barrat4:
  730|    821|        igraph_transitivity_mode_t mode) {
  731|       |
  732|    821|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  733|    821|    igraph_vector_int_t order;
  734|    821|    igraph_vector_int_t degree;
  735|    821|    igraph_vector_t strength;
  736|    821|    igraph_vector_t rank;
  737|    821|    igraph_int_t maxdegree;
  738|    821|    igraph_inclist_t incident;
  739|    821|    igraph_vector_int_t neis;
  740|    821|    igraph_vector_int_t *adj1, *adj2;
  741|    821|    igraph_vector_t actw;
  742|    821|    igraph_int_t i, nn;
  743|       |
  744|       |    /* Precondition: weight vector is not null, its length equals the number of
  745|       |     * edges, and the graph has at least one vertex. The graph must not have
  746|       |     * multi-edges. These must be ensured by the caller.
  747|       |     */
  748|       |
  749|    821|    IGRAPH_VECTOR_INT_INIT_FINALLY(&order, no_of_nodes);
  ------------------
  |  |  119|    821|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    821|    do { \
  |  |  |  |  657|    821|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    821|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    821|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 821]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    821|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 821]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|    821|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    821|    do { \
  |  |  |  |  604|    821|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    821|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    821|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    821|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 821]
  |  |  |  |  ------------------
  |  |  |  |  608|    821|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    821|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 821]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 821]
  |  |  ------------------
  ------------------
  750|    821|    IGRAPH_VECTOR_INT_INIT_FINALLY(&degree, no_of_nodes);
  ------------------
  |  |  119|    821|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    821|    do { \
  |  |  |  |  657|    821|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    821|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    821|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 821]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    821|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 821]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|    821|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    821|    do { \
  |  |  |  |  604|    821|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    821|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    821|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    821|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 821]
  |  |  |  |  ------------------
  |  |  |  |  608|    821|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    821|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 821]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 821]
  |  |  ------------------
  ------------------
  751|    821|    IGRAPH_VECTOR_INIT_FINALLY(&strength, no_of_nodes);
  ------------------
  |  |  104|    821|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    821|    do { \
  |  |  |  |  657|    821|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    821|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    821|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 821]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    821|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 821]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|    821|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    821|    do { \
  |  |  |  |  604|    821|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    821|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    821|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    821|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 821]
  |  |  |  |  ------------------
  |  |  |  |  608|    821|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    821|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 821]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (105:60): [Folded, False: 821]
  |  |  ------------------
  ------------------
  752|       |
  753|    821|    IGRAPH_CHECK(igraph_degree(graph, &degree, igraph_vss_all(), IGRAPH_ALL,
  ------------------
  |  |  656|    821|    do { \
  |  |  657|    821|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    821|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    821|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 821]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    821|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 821]
  |  |  ------------------
  ------------------
  754|    821|                               IGRAPH_LOOPS));
  755|    821|    maxdegree = igraph_vector_int_max(&degree) + 1;
  756|    821|    IGRAPH_CHECK(igraph_i_vector_int_order(&degree, &order, maxdegree));
  ------------------
  |  |  656|    821|    do { \
  |  |  657|    821|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    821|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    821|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 821]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    821|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 821]
  |  |  ------------------
  ------------------
  757|       |
  758|    821|    IGRAPH_CHECK(igraph_strength(graph, &strength, igraph_vss_all(), IGRAPH_ALL,
  ------------------
  |  |  656|    821|    do { \
  |  |  657|    821|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    821|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    821|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 821]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    821|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 821]
  |  |  ------------------
  ------------------
  759|    821|                                 IGRAPH_LOOPS, weights));
  760|       |
  761|    821|    IGRAPH_VECTOR_INIT_FINALLY(&rank, no_of_nodes);
  ------------------
  |  |  104|    821|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    821|    do { \
  |  |  |  |  657|    821|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    821|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    821|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 821]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    821|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 821]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|    821|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    821|    do { \
  |  |  |  |  604|    821|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    821|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    821|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    821|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 821]
  |  |  |  |  ------------------
  |  |  |  |  608|    821|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    821|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 821]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (105:60): [Folded, False: 821]
  |  |  ------------------
  ------------------
  762|  37.7k|    for (i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (762:17): [True: 36.9k, False: 821]
  ------------------
  763|  36.9k|        VECTOR(rank)[ VECTOR(order)[i] ] = no_of_nodes - i - 1;
  ------------------
  |  |   60|  36.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      VECTOR(rank)[ VECTOR(order)[i] ] = no_of_nodes - i - 1;
  ------------------
  |  |   60|  36.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  764|  36.9k|    }
  765|       |
  766|    821|    IGRAPH_CHECK(igraph_inclist_init(graph, &incident, IGRAPH_ALL, IGRAPH_LOOPS_TWICE));
  ------------------
  |  |  656|    821|    do { \
  |  |  657|    821|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    821|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    821|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 821]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    821|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 821]
  |  |  ------------------
  ------------------
  767|    821|    IGRAPH_FINALLY(igraph_inclist_destroy, &incident);
  ------------------
  |  |  603|    821|    do { \
  |  |  604|    821|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    821|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    821|         * incorrect destructor function with the pointer */ \
  |  |  607|    821|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 821]
  |  |  ------------------
  |  |  608|    821|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    821|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 821]
  |  |  ------------------
  ------------------
  768|       |
  769|    821|    IGRAPH_CHECK(igraph_vector_int_init(&neis, no_of_nodes));
  ------------------
  |  |  656|    821|    do { \
  |  |  657|    821|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    821|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    821|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 821]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    821|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 821]
  |  |  ------------------
  ------------------
  770|    821|    IGRAPH_FINALLY(igraph_vector_int_destroy, &neis);
  ------------------
  |  |  603|    821|    do { \
  |  |  604|    821|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    821|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    821|         * incorrect destructor function with the pointer */ \
  |  |  607|    821|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 821]
  |  |  ------------------
  |  |  608|    821|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    821|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 821]
  |  |  ------------------
  ------------------
  771|       |
  772|    821|    IGRAPH_VECTOR_INIT_FINALLY(&actw, no_of_nodes);
  ------------------
  |  |  104|    821|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    821|    do { \
  |  |  |  |  657|    821|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    821|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    821|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 821]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    821|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 821]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|    821|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    821|    do { \
  |  |  |  |  604|    821|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    821|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    821|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    821|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 821]
  |  |  |  |  ------------------
  |  |  |  |  608|    821|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    821|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 821]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (105:60): [Folded, False: 821]
  |  |  ------------------
  ------------------
  773|       |
  774|    821|    IGRAPH_CHECK(igraph_vector_resize(res, no_of_nodes));
  ------------------
  |  |  656|    821|    do { \
  |  |  657|    821|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    821|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    821|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 821]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    821|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 821]
  |  |  ------------------
  ------------------
  775|    821|    igraph_vector_null(res);
  776|       |
  777|  37.7k|    for (nn = no_of_nodes - 1; nn >= 0; nn--) {
  ------------------
  |  Branch (777:32): [True: 36.9k, False: 821]
  ------------------
  778|  36.9k|        igraph_int_t adjlen1, adjlen2;
  779|  36.9k|        igraph_real_t triples;
  780|  36.9k|        igraph_int_t node = VECTOR(order)[nn];
  ------------------
  |  |   60|  36.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  781|       |
  782|  36.9k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|  36.9k|    do { \
  |  |   47|  36.9k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 36.9k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|  36.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 36.9k]
  |  |  ------------------
  ------------------
  783|       |
  784|  36.9k|        adj1 = igraph_inclist_get(&incident, node);
  ------------------
  |  |  102|  36.9k|#define igraph_inclist_get(il,no) (&(il)->incs[(igraph_int_t)(no)])
  ------------------
  785|  36.9k|        adjlen1 = igraph_vector_int_size(adj1);
  786|  36.9k|        triples = VECTOR(strength)[node] * (adjlen1 - 1) / 2.0;
  ------------------
  |  |   60|  36.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  787|       |        /* Mark the neighbors of the node */
  788|  55.1k|        for (i = 0; i < adjlen1; i++) {
  ------------------
  |  Branch (788:21): [True: 18.2k, False: 36.9k]
  ------------------
  789|  18.2k|            igraph_int_t edge = VECTOR(*adj1)[i];
  ------------------
  |  |   60|  18.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  790|  18.2k|            igraph_int_t nei = IGRAPH_OTHER(graph, edge, node);
  ------------------
  |  |  146|  18.2k|    ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|  18.2k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  18.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  115|  9.11k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  9.11k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|  9.11k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  9.11k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (146:21): [True: 9.11k, False: 9.11k]
  |  |  ------------------
  ------------------
  791|  18.2k|            VECTOR(neis)[nei] = node + 1;
  ------------------
  |  |   60|  18.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  792|  18.2k|            VECTOR(actw)[nei] = VECTOR(*weights)[edge];
  ------------------
  |  |   60|  18.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(actw)[nei] = VECTOR(*weights)[edge];
  ------------------
  |  |   60|  18.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  793|  18.2k|        }
  794|       |
  795|  55.1k|        for (i = 0; i < adjlen1; i++) {
  ------------------
  |  Branch (795:21): [True: 18.2k, False: 36.9k]
  ------------------
  796|  18.2k|            igraph_int_t edge1 = VECTOR(*adj1)[i];
  ------------------
  |  |   60|  18.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  797|  18.2k|            igraph_real_t weight1 = VECTOR(*weights)[edge1];
  ------------------
  |  |   60|  18.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  798|  18.2k|            igraph_int_t nei = IGRAPH_OTHER(graph, edge1, node);
  ------------------
  |  |  146|  18.2k|    ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|  18.2k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  18.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  115|  9.11k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  9.11k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|  9.11k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  9.11k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (146:21): [True: 9.11k, False: 9.11k]
  |  |  ------------------
  ------------------
  799|  18.2k|            igraph_int_t j;
  800|  18.2k|            if (VECTOR(rank)[nei] > VECTOR(rank)[node]) {
  ------------------
  |  |   60|  18.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          if (VECTOR(rank)[nei] > VECTOR(rank)[node]) {
  ------------------
  |  |   60|  18.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (800:17): [True: 9.11k, False: 9.11k]
  ------------------
  801|  9.11k|                adj2 = igraph_inclist_get(&incident, nei);
  ------------------
  |  |  102|  9.11k|#define igraph_inclist_get(il,no) (&(il)->incs[(igraph_int_t)(no)])
  ------------------
  802|  9.11k|                adjlen2 = igraph_vector_int_size(adj2);
  803|  34.6k|                for (j = 0; j < adjlen2; j++) {
  ------------------
  |  Branch (803:29): [True: 25.5k, False: 9.11k]
  ------------------
  804|  25.5k|                    igraph_int_t edge2 = VECTOR(*adj2)[j];
  ------------------
  |  |   60|  25.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  805|  25.5k|                    igraph_real_t weight2 = VECTOR(*weights)[edge2];
  ------------------
  |  |   60|  25.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  806|  25.5k|                    igraph_int_t nei2 = IGRAPH_OTHER(graph, edge2, nei);
  ------------------
  |  |  146|  25.5k|    ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|  25.5k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  25.5k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  115|  10.0k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  10.0k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|  15.5k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  15.5k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (146:21): [True: 10.0k, False: 15.5k]
  |  |  ------------------
  ------------------
  807|  25.5k|                    if (VECTOR(rank)[nei2] < VECTOR(rank)[nei]) {
  ------------------
  |  |   60|  25.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  if (VECTOR(rank)[nei2] < VECTOR(rank)[nei]) {
  ------------------
  |  |   60|  25.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (807:25): [True: 17.8k, False: 7.73k]
  ------------------
  808|  17.8k|                        continue;
  809|  17.8k|                    }
  810|  7.73k|                    if (VECTOR(neis)[nei2] == node + 1) {
  ------------------
  |  |   60|  7.73k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (810:25): [True: 2.55k, False: 5.17k]
  ------------------
  811|  2.55k|                        VECTOR(*res)[nei2] += (VECTOR(actw)[nei2] + weight2) / 2.0;
  ------------------
  |  |   60|  2.55k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                      VECTOR(*res)[nei2] += (VECTOR(actw)[nei2] + weight2) / 2.0;
  ------------------
  |  |   60|  2.55k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  812|  2.55k|                        VECTOR(*res)[nei] += (weight1 + weight2) / 2.0;
  ------------------
  |  |   60|  2.55k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  813|  2.55k|                        VECTOR(*res)[node] += (VECTOR(actw)[nei2] + weight1) / 2.0;
  ------------------
  |  |   60|  2.55k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                      VECTOR(*res)[node] += (VECTOR(actw)[nei2] + weight1) / 2.0;
  ------------------
  |  |   60|  2.55k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  814|  2.55k|                    }
  815|  7.73k|                }
  816|  9.11k|            }
  817|  18.2k|        }
  818|       |
  819|  36.9k|        if (mode == IGRAPH_TRANSITIVITY_ZERO && triples == 0) {
  ------------------
  |  Branch (819:13): [True: 0, False: 36.9k]
  |  Branch (819:49): [True: 0, False: 0]
  ------------------
  820|      0|            VECTOR(*res)[node] = 0.0;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  821|  36.9k|        } else {
  822|  36.9k|            VECTOR(*res)[node] /= triples;
  ------------------
  |  |   60|  36.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  823|  36.9k|        }
  824|  36.9k|    }
  825|       |
  826|    821|    igraph_vector_destroy(&actw);
  827|    821|    igraph_vector_int_destroy(&neis);
  828|    821|    igraph_inclist_destroy(&incident);
  829|    821|    igraph_vector_destroy(&rank);
  830|    821|    igraph_vector_int_destroy(&degree);
  831|    821|    igraph_vector_destroy(&strength);
  832|    821|    igraph_vector_int_destroy(&order);
  833|    821|    IGRAPH_FINALLY_CLEAN(7);
  834|       |
  835|    821|    return IGRAPH_SUCCESS;
  836|    821|}

igraph_rng_default:
  188|    852|igraph_rng_t *igraph_rng_default(void) {
  189|    852|    return igraph_i_rng_default_ptr;
  190|    852|}
igraph_rng_seed:
  260|    852|igraph_error_t igraph_rng_seed(igraph_rng_t *rng, igraph_uint_t seed) {
  261|    852|    const igraph_rng_type_t *type = rng->type;
  262|    852|    IGRAPH_CHECK(type->seed(rng->state, seed));
  ------------------
  |  |  656|    852|    do { \
  |  |  657|    852|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    852|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    852|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 852]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    852|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 852]
  |  |  ------------------
  ------------------
  263|    852|    rng->is_seeded = true;
  264|    852|    return IGRAPH_SUCCESS;
  265|    852|}

rng_pcg32.c:igraph_rng_pcg32_seed:
   41|    852|static igraph_error_t igraph_rng_pcg32_seed(void *vstate, igraph_uint_t seed) {
   42|    852|    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|    852|    if (seed == 0) {
  ------------------
  |  Branch (49:9): [True: 0, False: 852]
  ------------------
   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|    852|    } else {
   57|    852|        pcg32_srandom_r(state, pcg32_initializer.state, seed);
  ------------------
  |  | 2398|    852|#define pcg32_srandom_r                 pcg_setseq_64_srandom_r
  ------------------
   58|    852|    }
   59|       |
   60|    852|    return IGRAPH_SUCCESS;
   61|    852|}

