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

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

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

igraph_pagerank:
  283|    829|        igraph_arpack_options_t *options) {
  284|    829|    return igraph_personalized_pagerank(
  285|    829|            graph, weights,
  286|    829|            vector, value,
  287|       |            NULL,
  288|    829|            damping, directed,
  289|    829|            vids,
  290|    829|            algo,
  291|    829|            options);
  292|    829|}
igraph_personalized_pagerank:
  465|    829|        igraph_arpack_options_t *options) {
  466|       |
  467|    829|    if (damping < 0.0 || damping > 1.0) {
  ------------------
  |  Branch (467:9): [True: 0, False: 829]
  |  Branch (467:26): [True: 0, False: 829]
  ------------------
  468|      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]
  |  |  ------------------
  ------------------
  469|      0|    }
  470|       |
  471|    829|    if (algo == IGRAPH_PAGERANK_ALGO_ARPACK) {
  ------------------
  |  Branch (471:9): [True: 0, False: 829]
  ------------------
  472|      0|        return igraph_i_personalized_pagerank_arpack(graph, vector, value, vids,
  473|      0|                directed, damping, reset,
  474|      0|                weights, options ? options : igraph_arpack_options_get_default()
  ------------------
  |  Branch (474:26): [True: 0, False: 0]
  ------------------
  475|      0|        );
  476|    829|    } else if (algo == IGRAPH_PAGERANK_ALGO_PRPACK) {
  ------------------
  |  Branch (476:16): [True: 829, False: 0]
  ------------------
  477|    829|        return igraph_i_personalized_pagerank_prpack(graph, vector, value, vids,
  478|    829|                directed, damping, reset,
  479|    829|                weights);
  480|    829|    }
  481|       |
  482|      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]
  |  |  ------------------
  ------------------
  483|      0|}

igraph_i_personalized_pagerank_prpack:
   40|    829|                                          const igraph_vector_t *weights) {
   41|    829|    IGRAPH_HANDLE_EXCEPTIONS_BEGIN;
  ------------------
  |  |   21|    829|    try {
  ------------------
   42|       |
   43|    829|    igraph_int_t i, no_of_nodes = igraph_vcount(graph);
   44|       |
   45|    829|    double *u = nullptr;
   46|    829|    std::unique_ptr<double[]> v;
   47|       |
   48|    829|    if (reset) {
  ------------------
  |  Branch (48:9): [True: 0, False: 829]
  ------------------
   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 apperance of non-finite values, or the iteration
   82|       |    // never terminating.
   83|    829|    if (damping > 0.999) {
  ------------------
  |  Branch (83:9): [True: 0, False: 829]
  ------------------
   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|    829|    prpack_igraph_graph prpack_graph;
   92|    829|    IGRAPH_CHECK(prpack_graph.convert_from_igraph(graph, weights, directed));
  ------------------
  |  |  656|    829|    do { \
  |  |  657|    829|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    829|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    829|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 829]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    829|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 829]
  |  |  ------------------
  ------------------
   93|    829|    prpack_solver solver(&prpack_graph, false);
   94|    829|    std::unique_ptr<const prpack_result> res( solver.solve(damping, 1e-10, u, v.get(), "") );
   95|       |
   96|       |    // Delete the personalization vector
   97|    829|    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|    829|    {
  109|       |        // Use of igraph "finally" stack is safe in this block
  110|       |        // since no exceptions can be thrown from here.
  111|       |
  112|    829|        igraph_vit_t vit;
  113|    829|        IGRAPH_CHECK(igraph_vit_create(graph, vids, &vit));
  ------------------
  |  |  656|    829|    do { \
  |  |  657|    829|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    829|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    829|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 829]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    829|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 829]
  |  |  ------------------
  ------------------
  114|    829|        IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  603|    829|    do { \
  |  |  604|    829|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    829|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    829|         * incorrect destructor function with the pointer */ \
  |  |  607|    829|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 829]
  |  |  ------------------
  |  |  608|    829|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    829|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 829]
  |  |  ------------------
  ------------------
  115|    829|        igraph_int_t nodes_to_calc = IGRAPH_VIT_SIZE(vit);
  ------------------
  |  |  190|    829|#define IGRAPH_VIT_SIZE(vit)  ((vit).end - (vit).start)
  ------------------
  116|    829|        IGRAPH_CHECK(igraph_vector_resize(vector, nodes_to_calc));
  ------------------
  |  |  656|    829|    do { \
  |  |  657|    829|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    829|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    829|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 829]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    829|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 829]
  |  |  ------------------
  ------------------
  117|  36.9k|        for (IGRAPH_VIT_RESET(vit), i = 0; !IGRAPH_VIT_END(vit);
  ------------------
  |  |  201|    829|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
                      for (IGRAPH_VIT_RESET(vit), i = 0; !IGRAPH_VIT_END(vit);
  ------------------
  |  |  179|  36.9k|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (117:44): [True: 36.1k, False: 829]
  ------------------
  118|  36.1k|             IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  167|  36.1k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  119|  36.1k|            VECTOR(*vector)[i] = res->x[IGRAPH_VIT_GET(vit)];
  ------------------
  |  |   60|  36.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*vector)[i] = res->x[IGRAPH_VIT_GET(vit)];
  ------------------
  |  |  214|  36.1k|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 36.1k, False: 0]
  |  |  ------------------
  |  |  215|  36.1k|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  120|  36.1k|        }
  121|    829|        igraph_vit_destroy(&vit);
  122|    829|        IGRAPH_FINALLY_CLEAN(1);
  123|    829|    }
  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|    829|    if (value) {
  ------------------
  |  Branch (127:9): [True: 829, False: 0]
  ------------------
  128|    829|        *value = 1.0;
  129|    829|    }
  130|       |
  131|    829|    return IGRAPH_SUCCESS;
  132|       |
  133|    829|    IGRAPH_HANDLE_EXCEPTIONS_END;
  ------------------
  |  |   23|    829|    } \
  |  |   24|    829|    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|    829|    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|    829|    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|    829|    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|    829|void prpack_base_graph::initialize() {
   14|    829|    heads = NULL;
   15|    829|    tails = NULL;
   16|       |    vals = NULL;
   17|    829|}
_ZN6prpack17prpack_base_graphC2Ev:
   19|    829|prpack_base_graph::prpack_base_graph() {
   20|    829|    initialize();
   21|    829|    num_vs = num_es = 0;
   22|    829|}
_ZN6prpack17prpack_base_graphD2Ev:
  165|    829|prpack_base_graph::~prpack_base_graph() {
  166|    829|    delete[] heads;
  167|    829|    delete[] tails;
  168|    829|    delete[] vals;
  169|    829|}
_ZN6prpack17prpack_base_graph17normalize_weightsEv:
  322|    829|void prpack_base_graph::normalize_weights() {
  323|    829|    if (!vals) {
  ------------------
  |  Branch (323:9): [True: 0, False: 829]
  ------------------
  324|       |        // skip normalizing weights if not using values
  325|      0|        return;
  326|      0|    }
  327|    829|    std::vector<double> rowsums(num_vs,0.);
  328|       |    // the graph is in a compressed in-edge list.
  329|  36.9k|    for (int i=0; i<num_vs; ++i) {
  ------------------
  |  Branch (329:19): [True: 36.1k, False: 829]
  ------------------
  330|  36.1k|        int end_ei = (i + 1 != num_vs) ? tails[i + 1] : num_es;
  ------------------
  |  Branch (330:22): [True: 35.2k, False: 828]
  ------------------
  331|  54.6k|        for (int ei=tails[i]; ei < end_ei; ++ei) {
  ------------------
  |  Branch (331:31): [True: 18.5k, False: 36.1k]
  ------------------
  332|  18.5k|            int head = heads[ei];
  333|  18.5k|            rowsums[head] += vals[ei];
  334|  18.5k|        }
  335|  36.1k|    }
  336|  36.9k|    for (int i=0; i<num_vs; ++i) {
  ------------------
  |  Branch (336:19): [True: 36.1k, False: 829]
  ------------------
  337|  36.1k|        rowsums[i] = 1./rowsums[i];
  338|  36.1k|    }
  339|  36.9k|    for (int i=0; i<num_vs; ++i) {
  ------------------
  |  Branch (339:19): [True: 36.1k, False: 829]
  ------------------
  340|  36.1k|        int end_ei = (i + 1 != num_vs) ? tails[i + 1] : num_es;
  ------------------
  |  Branch (340:22): [True: 35.2k, False: 828]
  ------------------
  341|  54.6k|        for (int ei=tails[i]; ei < end_ei; ++ei) {
  ------------------
  |  Branch (341:31): [True: 18.5k, False: 36.1k]
  ------------------
  342|  18.5k|            vals[ei] *= rowsums[heads[ei]];
  343|  18.5k|        }
  344|  36.1k|    }
  345|    829|}

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

_ZN6prpack19prpack_igraph_graphC2Ev:
   16|    829|        prpack_igraph_graph() { }

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

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

_ZN6prpack13prpack_solver10initializeEv:
   11|    829|void prpack_solver::initialize() {
   12|    829|    geg = NULL;
   13|    829|    gsg = NULL;
   14|    829|    sg = NULL;
   15|       |    sccg = NULL;
   16|    829|    owns_bg = true;
   17|    829|}
_ZN6prpack13prpack_solverC2EPNS_17prpack_base_graphEb:
   39|    829|prpack_solver::prpack_solver(prpack_base_graph* g, bool owns_bg) {
   40|    829|    initialize();
   41|    829|    this->owns_bg = owns_bg;
   42|    829|    TIME(read_time, bg = g);
  ------------------
  |  |   10|    829|    (T) = prpack_utils::get_time(); \
  |  |   11|    829|    (X);                            \
  |  |   12|    829|    (T) = prpack_utils::get_time() - (T)
  ------------------
   43|    829|}
_ZN6prpack13prpack_solverD2Ev:
   52|    829|prpack_solver::~prpack_solver() {
   53|    829|    if (owns_bg) {
  ------------------
  |  Branch (53:9): [True: 0, False: 829]
  ------------------
   54|      0|        delete bg;
   55|      0|    }
   56|    829|    delete geg;
   57|    829|    delete gsg;
   58|    829|    delete sg;
   59|    829|    delete sccg;
   60|    829|}
_ZN6prpack13prpack_solver5solveEddPKdS2_PKc:
   75|    829|        const char* method) {
   76|    829|    double preprocess_time = 0;
   77|    829|    double compute_time = 0;
   78|    829|    prpack_result* ret = NULL;
   79|       |    // decide which method to run
   80|    829|    string m;
   81|    829|    if (strcmp(method, "") != 0)
  ------------------
  |  Branch (81:9): [True: 0, False: 829]
  ------------------
   82|      0|        m = string(method);
   83|    829|    else {
   84|    829|        if (bg->num_vs < 128)
  ------------------
  |  Branch (84:13): [True: 829, False: 0]
  ------------------
   85|    829|            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|    829|        if (u != v)
  ------------------
  |  Branch (92:13): [True: 0, False: 829]
  ------------------
   93|      0|            m += "_uv";
   94|    829|    }
   95|       |    // run the appropriate method
   96|    829|    if (m == "ge") {
  ------------------
  |  Branch (96:9): [True: 829, False: 0]
  ------------------
   97|    829|        if (geg == NULL) {
  ------------------
  |  Branch (97:13): [True: 829, False: 0]
  ------------------
   98|    829|            TIME(preprocess_time, geg = new prpack_preprocessed_ge_graph(bg));
  ------------------
  |  |   10|    829|    (T) = prpack_utils::get_time(); \
  |  |   11|    829|    (X);                            \
  |  |   12|    829|    (T) = prpack_utils::get_time() - (T)
  ------------------
   99|    829|        }
  100|    829|        TIME(compute_time, ret = solve_via_ge(
  ------------------
  |  |   10|    829|    (T) = prpack_utils::get_time(); \
  |  |   11|    829|    (X);                            \
  |  |   12|    829|    (T) = prpack_utils::get_time() - (T)
  ------------------
  101|    829|                alpha,
  102|    829|                tol,
  103|    829|                geg->num_vs,
  104|    829|                geg->matrix,
  105|    829|                u));
  106|    829|    } 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|    829|    ret->method = m;
  244|    829|    ret->read_time = read_time;
  245|    829|    ret->preprocess_time = preprocess_time;
  246|    829|    ret->compute_time = compute_time;
  247|    829|    ret->num_vs = bg->num_vs;
  248|    829|    ret->num_es = bg->num_es;
  249|    829|    return ret;
  250|    829|}
_ZN6prpack13prpack_solver12solve_via_geEddiPKdS2_:
  259|    829|        const double* uv) {
  260|    829|    prpack_result* ret = new prpack_result();
  261|       |    // initialize uv values
  262|    829|    const double uv_const = 1.0/num_vs;
  263|    829|    const int uv_exists = (uv) ? 1 : 0;
  ------------------
  |  Branch (263:27): [True: 0, False: 829]
  ------------------
  264|    829|    uv = (uv) ? uv : &uv_const;
  ------------------
  |  Branch (264:10): [True: 0, False: 829]
  ------------------
  265|       |    // create matrix A
  266|    829|    double* A = new double[num_vs*num_vs];
  267|  1.91M|    for (int i = 0; i < num_vs*num_vs; ++i)
  ------------------
  |  Branch (267:21): [True: 1.91M, False: 829]
  ------------------
  268|  1.91M|        A[i] = -alpha*matrix[i];
  269|  36.9k|    for (int i = 0; i < num_vs*num_vs; i += num_vs + 1)
  ------------------
  |  Branch (269:21): [True: 36.1k, False: 829]
  ------------------
  270|  36.1k|        ++A[i];
  271|       |    // create vector b
  272|    829|    double* b = new double[num_vs];
  273|  36.9k|    for (int i = 0; i < num_vs; ++i)
  ------------------
  |  Branch (273:21): [True: 36.1k, False: 829]
  ------------------
  274|  36.1k|        b[i] = uv[uv_exists*i];
  275|       |    // solve and normalize
  276|    829|    ge(num_vs, A, b);
  277|    829|    normalize(num_vs, b);
  278|       |    // clean up and return
  279|    829|    delete[] A;
  280|    829|    ret->num_es_touched = -1;
  281|    829|    ret->x = b;
  282|    829|    return ret;
  283|    829|}
_ZN6prpack13prpack_solver2geEiPdS1_:
  827|    829|void prpack_solver::ge(const int sz, double* A, double* b) {
  828|       |    // put into triangular form
  829|  36.9k|    for (int i = 0, isz = 0; i < sz; ++i, isz += sz)
  ------------------
  |  Branch (829:30): [True: 36.1k, False: 829]
  ------------------
  830|   973k|        for (int k = 0, ksz = 0; k < i; ++k, ksz += sz)
  ------------------
  |  Branch (830:34): [True: 937k, False: 36.1k]
  ------------------
  831|   937k|            if (A[isz + k] != 0) {
  ------------------
  |  Branch (831:17): [True: 15.7k, False: 921k]
  ------------------
  832|  15.7k|                const double coeff = A[isz + k]/A[ksz + k];
  833|  15.7k|                A[isz + k] = 0;
  834|   601k|                for (int j = k + 1; j < sz; ++j)
  ------------------
  |  Branch (834:37): [True: 585k, False: 15.7k]
  ------------------
  835|   585k|                    A[isz + j] -= coeff*A[ksz + j];
  836|  15.7k|                b[i] -= coeff*b[k];
  837|  15.7k|            }
  838|       |    // backwards substitution
  839|  36.9k|    for (int i = sz - 1, isz = (sz - 1)*sz; i >= 0; --i, isz -= sz) {
  ------------------
  |  Branch (839:45): [True: 36.1k, False: 829]
  ------------------
  840|   973k|        for (int j = i + 1; j < sz; ++j)
  ------------------
  |  Branch (840:29): [True: 937k, False: 36.1k]
  ------------------
  841|   937k|            b[i] -= A[isz + j]*b[j];
  842|  36.1k|        b[i] /= A[isz + i];
  843|  36.1k|    }
  844|    829|}
_ZN6prpack13prpack_solver9normalizeEiPd:
  847|    829|void prpack_solver::normalize(const int length, double* x) {
  848|    829|    double norm = 0, c = 0;
  849|  36.9k|    for (int i = 0; i < length; ++i) {
  ------------------
  |  Branch (849:21): [True: 36.1k, False: 829]
  ------------------
  850|  36.1k|        COMPENSATED_SUM(norm, x[i], c);
  ------------------
  |  |   17|  36.1k|    double compensated_sum_y = (A) - (C);               \
  |  |   18|  36.1k|    double compensated_sum_t = (S) + compensated_sum_y; \
  |  |   19|  36.1k|    (C) = compensated_sum_t - (S) - compensated_sum_y;  \
  |  |   20|  36.1k|    (S) = compensated_sum_t
  ------------------
  851|  36.1k|    }
  852|    829|    norm = 1/norm;
  853|  36.9k|    for (int i = 0; i < length; ++i)
  ------------------
  |  Branch (853:21): [True: 36.1k, False: 829]
  ------------------
  854|  36.1k|        x[i] *= norm;
  855|    829|}

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

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

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

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

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

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

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

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

igraph_attribute_record_list_init:
  109|  12.5k|igraph_error_t FUNCTION(init)(TYPE *v, igraph_int_t size) {
  110|  12.5k|    igraph_int_t alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (110:31): [True: 0, False: 12.5k]
  ------------------
  111|  12.5k|    IGRAPH_ASSERT(size >= 0);
  ------------------
  |  |  924|  12.5k|    do { \
  |  |  925|  12.5k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  12.5k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 12.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  12.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 12.5k]
  |  |  ------------------
  ------------------
  112|  12.5k|    v->stor_begin = IGRAPH_CALLOC(alloc_size, ITEM_TYPE);
  ------------------
  |  |   33|  12.5k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  25.1k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 12.5k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 12.5k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 12.5k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  113|  12.5k|    if (v->stor_begin == 0) {
  ------------------
  |  Branch (113:9): [True: 0, False: 12.5k]
  ------------------
  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.5k|    v->stor_end = v->stor_begin + alloc_size;
  117|  12.5k|    v->end = v->stor_begin + size;
  118|       |
  119|  12.5k|    IGRAPH_CHECK(INTERNAL_FUNCTION(init_slice)(v, v->stor_begin, v->end));
  ------------------
  |  |  656|  12.5k|    do { \
  |  |  657|  12.5k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  12.5k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  12.5k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 12.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  12.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 12.5k]
  |  |  ------------------
  ------------------
  120|       |
  121|  12.5k|    return IGRAPH_SUCCESS;
  122|  12.5k|}
igraph_attribute_record_list_init_copy:
  141|  3.31k|igraph_error_t FUNCTION(init_copy)(TYPE* to, const TYPE* from) {
  142|  3.31k|    igraph_int_t i, size = FUNCTION(size)(from);
  ------------------
  |  |  161|  3.31k|    #define FUNCTION(c) CONCAT2x(igraph_attribute_record_list,c)
  |  |  ------------------
  |  |  |  |   19|  3.31k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
  143|       |
  144|  3.31k|    IGRAPH_CHECK(FUNCTION(init)(to, 0));
  ------------------
  |  |  656|  3.31k|    do { \
  |  |  657|  3.31k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  3.31k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  3.31k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.31k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  3.31k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 3.31k]
  |  |  ------------------
  ------------------
  145|  3.31k|    IGRAPH_FINALLY(FUNCTION(destroy), to);
  ------------------
  |  |  603|  3.31k|    do { \
  |  |  604|  3.31k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  3.31k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  3.31k|         * incorrect destructor function with the pointer */ \
  |  |  607|  3.31k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 3.31k]
  |  |  ------------------
  |  |  608|  3.31k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  3.31k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 3.31k]
  |  |  ------------------
  ------------------
  146|       |
  147|  3.31k|    for (i = 0; i < size; i++) {
  ------------------
  |  Branch (147:17): [True: 0, False: 3.31k]
  ------------------
  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.31k|    IGRAPH_FINALLY_CLEAN(1);
  152|       |
  153|  3.31k|    return IGRAPH_SUCCESS;
  154|  3.31k|}
igraph_attribute_record_list_destroy:
  176|  12.5k|void FUNCTION(destroy)(TYPE *v) {
  177|  12.5k|    IGRAPH_ASSERT(v != 0);
  ------------------
  |  |  924|  12.5k|    do { \
  |  |  925|  12.5k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  12.5k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 12.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  12.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 12.5k]
  |  |  ------------------
  ------------------
  178|       |
  179|  12.5k|    if (v->stor_begin != 0) {
  ------------------
  |  Branch (179:9): [True: 12.5k, False: 0]
  ------------------
  180|  12.5k|        FUNCTION(clear)(v);
  ------------------
  |  |  161|  12.5k|    #define FUNCTION(c) CONCAT2x(igraph_attribute_record_list,c)
  |  |  ------------------
  |  |  |  |   19|  12.5k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
  181|  12.5k|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   36|  12.5k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  182|       |        v->stor_begin = NULL;
  183|  12.5k|    }
  184|  12.5k|}
igraph_attribute_record_list_empty:
  268|  1.65k|igraph_bool_t FUNCTION(empty)(const TYPE *v) {
  269|  1.65k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  1.65k|    do { \
  |  |  925|  1.65k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.65k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.65k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.65k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.65k]
  |  |  ------------------
  ------------------
  270|  1.65k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  1.65k|    do { \
  |  |  925|  1.65k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.65k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.65k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.65k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.65k]
  |  |  ------------------
  ------------------
  271|  1.65k|    return v->stor_begin == v->end;
  272|  1.65k|}
igraph_attribute_record_list_size:
  287|  13.8k|igraph_int_t FUNCTION(size)(const TYPE *v) {
  288|  13.8k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  13.8k|    do { \
  |  |  925|  13.8k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  13.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 13.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  13.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 13.8k]
  |  |  ------------------
  ------------------
  289|  13.8k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  13.8k|    do { \
  |  |  925|  13.8k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  13.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 13.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  13.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 13.8k]
  |  |  ------------------
  ------------------
  290|  13.8k|    return v->end - v->stor_begin;
  291|  13.8k|}
igraph_attribute_record_list_clear:
  357|  12.5k|void FUNCTION(clear)(TYPE *v) {
  358|  12.5k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  12.5k|    do { \
  |  |  925|  12.5k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  12.5k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 12.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  12.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 12.5k]
  |  |  ------------------
  ------------------
  359|  12.5k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  12.5k|    do { \
  |  |  925|  12.5k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  12.5k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 12.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  12.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 12.5k]
  |  |  ------------------
  ------------------
  360|  12.5k|    INTERNAL_FUNCTION(destroy_slice)(v, v->stor_begin, v->end);
  ------------------
  |  |  162|  12.5k|    #define INTERNAL_FUNCTION(c) CONCAT2x(igraph_i_attribute_record_list,c)
  |  |  ------------------
  |  |  |  |   19|  12.5k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
  361|  12.5k|    v->end = v->stor_begin;
  362|  12.5k|}
igraph_attribute_record_list_get_ptr:
  377|  5.80k|ITEM_TYPE *FUNCTION(get_ptr)(const TYPE *v, igraph_int_t pos) {
  378|  5.80k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  5.80k|    do { \
  |  |  925|  5.80k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  5.80k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.80k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  5.80k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 5.80k]
  |  |  ------------------
  ------------------
  379|  5.80k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  5.80k|    do { \
  |  |  925|  5.80k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  5.80k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.80k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  5.80k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 5.80k]
  |  |  ------------------
  ------------------
  380|  5.80k|    return v->stor_begin + pos;
  381|  5.80k|}
igraph_attribute_record_list_discard:
  506|    829|void FUNCTION(discard)(TYPE *v, igraph_int_t index) {
  507|    829|    igraph_int_t size = FUNCTION(size)(v);
  ------------------
  |  |  161|    829|    #define FUNCTION(c) CONCAT2x(igraph_attribute_record_list,c)
  |  |  ------------------
  |  |  |  |   19|    829|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
  508|       |
  509|    829|    if (size > 0) {
  ------------------
  |  Branch (509:9): [True: 829, False: 0]
  ------------------
  510|    829|        INTERNAL_FUNCTION(destroy_item)(v->stor_begin + index);
  ------------------
  |  |  162|    829|    #define INTERNAL_FUNCTION(c) CONCAT2x(igraph_i_attribute_record_list,c)
  |  |  ------------------
  |  |  |  |   19|    829|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
  511|    829|        memmove(v->stor_begin + index, v->stor_begin + index + 1, sizeof(ITEM_TYPE) * (size - index - 1));
  512|    829|        v->end -= 1;
  513|    829|    }
  514|    829|}
igraph_attribute_record_list_push_back:
  587|  1.65k|igraph_error_t FUNCTION(push_back)(TYPE *v, ITEM_TYPE *e) {
  588|  1.65k|    IGRAPH_CHECK(INTERNAL_FUNCTION(expand_if_full)(v));
  ------------------
  |  |  656|  1.65k|    do { \
  |  |  657|  1.65k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.65k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.65k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.65k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.65k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.65k]
  |  |  ------------------
  ------------------
  589|  1.65k|    *(v->end) = *e;
  590|  1.65k|    v->end += 1;
  591|  1.65k|    return IGRAPH_SUCCESS;
  592|  1.65k|}
igraph_attribute_record_list_push_back_new:
  640|    829|igraph_error_t FUNCTION(push_back_new)(TYPE *v, ITEM_TYPE** e) {
  641|    829|    IGRAPH_CHECK(INTERNAL_FUNCTION(expand_if_full)(v));
  ------------------
  |  |  656|    829|    do { \
  |  |  657|    829|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    829|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    829|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 829]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    829|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 829]
  |  |  ------------------
  ------------------
  642|    829|    IGRAPH_CHECK(INTERNAL_FUNCTION(init_item)(v, v->end));
  ------------------
  |  |  656|    829|    do { \
  |  |  657|    829|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    829|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    829|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 829]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    829|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 829]
  |  |  ------------------
  ------------------
  643|    829|    if (e) {
  ------------------
  |  Branch (643:9): [True: 829, False: 0]
  ------------------
  644|    829|        *e = v->end;
  645|    829|    }
  646|    829|    v->end += 1;
  647|    829|    return IGRAPH_SUCCESS;
  648|    829|}
attributes.c:igraph_i_attribute_record_list_init_slice:
 1068|  12.5k|static igraph_error_t INTERNAL_FUNCTION(init_slice)(const TYPE *list, ITEM_TYPE *start, ITEM_TYPE *end) {
 1069|  12.5k|    ITEM_TYPE *current;
  ------------------
  |  |   61|  12.5k|    #define ITEM_TYPE BASE
  |  |  ------------------
  |  |  |  |  115|  12.5k|    #define BASE igraph_attribute_record_t
  |  |  ------------------
  ------------------
 1070|  12.5k|    igraph_error_t retval;
 1071|       |
 1072|  12.5k|    for (current = start; current < end; current++) {
  ------------------
  |  Branch (1072:27): [True: 0, False: 12.5k]
  ------------------
 1073|      0|        retval = INTERNAL_FUNCTION(init_item)(list, current);
  ------------------
  |  |  162|      0|    #define INTERNAL_FUNCTION(c) CONCAT2x(igraph_i_attribute_record_list,c)
  |  |  ------------------
  |  |  |  |   19|      0|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
 1074|      0|        if (retval) {
  ------------------
  |  Branch (1074:13): [True: 0, False: 0]
  ------------------
 1075|      0|            INTERNAL_FUNCTION(destroy_slice)(list, start, current);
  ------------------
  |  |  162|      0|    #define INTERNAL_FUNCTION(c) CONCAT2x(igraph_i_attribute_record_list,c)
  |  |  ------------------
  |  |  |  |   19|      0|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
 1076|      0|            IGRAPH_CHECK(retval);
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1077|      0|        }
 1078|      0|    }
 1079|       |
 1080|  12.5k|    return IGRAPH_SUCCESS;
 1081|  12.5k|}
attributes.c:igraph_i_attribute_record_list_destroy_slice:
 1083|  12.5k|static void INTERNAL_FUNCTION(destroy_slice)(const TYPE *list, ITEM_TYPE *start, ITEM_TYPE *end) {
 1084|  12.5k|    IGRAPH_UNUSED(list);
  ------------------
  |  |   30|  12.5k|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
 1085|  14.2k|    for (; start < end; start++) {
  ------------------
  |  Branch (1085:12): [True: 1.65k, False: 12.5k]
  ------------------
 1086|  1.65k|        INTERNAL_FUNCTION(destroy_item)(start);
  ------------------
  |  |  162|  1.65k|    #define INTERNAL_FUNCTION(c) CONCAT2x(igraph_i_attribute_record_list,c)
  |  |  ------------------
  |  |  |  |   19|  1.65k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
 1087|  1.65k|    }
 1088|  12.5k|}
attributes.c:igraph_i_attribute_record_list_expand_if_full:
 1094|  2.48k|static igraph_error_t INTERNAL_FUNCTION(expand_if_full)(TYPE *v) {
 1095|  2.48k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  2.48k|    do { \
  |  |  925|  2.48k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.48k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.48k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.48k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.48k]
  |  |  ------------------
  ------------------
 1096|  2.48k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  2.48k|    do { \
  |  |  925|  2.48k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.48k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.48k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.48k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.48k]
  |  |  ------------------
  ------------------
 1097|       |
 1098|  2.48k|    if (v->stor_end == v->end) {
  ------------------
  |  Branch (1098:9): [True: 0, False: 2.48k]
  ------------------
 1099|      0|        igraph_int_t old_size = FUNCTION(size)(v);
  ------------------
  |  |  161|      0|    #define FUNCTION(c) CONCAT2x(igraph_attribute_record_list,c)
  |  |  ------------------
  |  |  |  |   19|      0|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
 1100|      0|        igraph_int_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   72|      0|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
                      igraph_int_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   72|      0|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (1100:33): [True: 0, False: 0]
  ------------------
 1101|      0|        if (old_size == IGRAPH_INTEGER_MAX) {
  ------------------
  |  |   72|      0|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (1101:13): [True: 0, False: 0]
  ------------------
 1102|      0|            IGRAPH_ERROR("Cannot add new item to list, already at maximum size.", IGRAPH_EOVERFLOW);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1103|      0|        }
 1104|      0|        if (new_size == 0) {
  ------------------
  |  Branch (1104:13): [True: 0, False: 0]
  ------------------
 1105|      0|            new_size = 1;
 1106|      0|        }
 1107|      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]
  |  |  ------------------
  ------------------
 1108|      0|    }
 1109|       |
 1110|  2.48k|    return IGRAPH_SUCCESS;
 1111|  2.48k|}
igraph_vector_int_list_init:
  109|  1.65k|igraph_error_t FUNCTION(init)(TYPE *v, igraph_int_t size) {
  110|  1.65k|    igraph_int_t alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (110:31): [True: 1.54k, False: 114]
  ------------------
  111|  1.65k|    IGRAPH_ASSERT(size >= 0);
  ------------------
  |  |  924|  1.65k|    do { \
  |  |  925|  1.65k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.65k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.65k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.65k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.65k]
  |  |  ------------------
  ------------------
  112|  1.65k|    v->stor_begin = IGRAPH_CALLOC(alloc_size, ITEM_TYPE);
  ------------------
  |  |   33|  1.65k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  3.31k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 1.65k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 1.65k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 1.65k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  113|  1.65k|    if (v->stor_begin == 0) {
  ------------------
  |  Branch (113:9): [True: 0, False: 1.65k]
  ------------------
  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.65k|    v->stor_end = v->stor_begin + alloc_size;
  117|  1.65k|    v->end = v->stor_begin + size;
  118|       |
  119|  1.65k|    IGRAPH_CHECK(INTERNAL_FUNCTION(init_slice)(v, v->stor_begin, v->end));
  ------------------
  |  |  656|  1.65k|    do { \
  |  |  657|  1.65k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.65k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.65k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.65k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.65k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.65k]
  |  |  ------------------
  ------------------
  120|       |
  121|  1.65k|    return IGRAPH_SUCCESS;
  122|  1.65k|}
igraph_vector_int_list_destroy:
  176|  1.65k|void FUNCTION(destroy)(TYPE *v) {
  177|  1.65k|    IGRAPH_ASSERT(v != 0);
  ------------------
  |  |  924|  1.65k|    do { \
  |  |  925|  1.65k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.65k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.65k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.65k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.65k]
  |  |  ------------------
  ------------------
  178|       |
  179|  1.65k|    if (v->stor_begin != 0) {
  ------------------
  |  Branch (179:9): [True: 1.65k, False: 0]
  ------------------
  180|  1.65k|        FUNCTION(clear)(v);
  ------------------
  |  |  136|  1.65k|        #define FUNCTION(c) CONCAT4(igraph_vector,SHORT,list,c)
  |  |  ------------------
  |  |  |  |   24|  1.65k|#define CONCAT4(a,b,c,d) CONCAT4x(a,b,c,d)
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|  1.65k|#define CONCAT4x(a,b,c,d) a ## _ ## b ## _ ## c ## _ ## d
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  181|  1.65k|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   36|  1.65k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  182|       |        v->stor_begin = NULL;
  183|  1.65k|    }
  184|  1.65k|}
igraph_vector_int_list_size:
  287|  3.31k|igraph_int_t FUNCTION(size)(const TYPE *v) {
  288|  3.31k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  3.31k|    do { \
  |  |  925|  3.31k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  3.31k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.31k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  3.31k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 3.31k]
  |  |  ------------------
  ------------------
  289|  3.31k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  3.31k|    do { \
  |  |  925|  3.31k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  3.31k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.31k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  3.31k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 3.31k]
  |  |  ------------------
  ------------------
  290|  3.31k|    return v->end - v->stor_begin;
  291|  3.31k|}
igraph_vector_int_list_clear:
  357|  1.65k|void FUNCTION(clear)(TYPE *v) {
  358|  1.65k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  1.65k|    do { \
  |  |  925|  1.65k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.65k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.65k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.65k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.65k]
  |  |  ------------------
  ------------------
  359|  1.65k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  1.65k|    do { \
  |  |  925|  1.65k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.65k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.65k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.65k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.65k]
  |  |  ------------------
  ------------------
  360|  1.65k|    INTERNAL_FUNCTION(destroy_slice)(v, v->stor_begin, v->end);
  ------------------
  |  |  137|  1.65k|        #define INTERNAL_FUNCTION(c) CONCAT4(igraph_i_vector,SHORT,list,c)
  |  |  ------------------
  |  |  |  |   24|  1.65k|#define CONCAT4(a,b,c,d) CONCAT4x(a,b,c,d)
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|  1.65k|#define CONCAT4x(a,b,c,d) a ## _ ## b ## _ ## c ## _ ## d
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  361|  1.65k|    v->end = v->stor_begin;
  362|  1.65k|}
igraph_vector_int_list_get_ptr:
  377|  48.4k|ITEM_TYPE *FUNCTION(get_ptr)(const TYPE *v, igraph_int_t pos) {
  378|  48.4k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  48.4k|    do { \
  |  |  925|  48.4k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  48.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 48.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  48.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 48.4k]
  |  |  ------------------
  ------------------
  379|  48.4k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  48.4k|    do { \
  |  |  925|  48.4k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  48.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 48.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  48.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 48.4k]
  |  |  ------------------
  ------------------
  380|  48.4k|    return v->stor_begin + pos;
  381|  48.4k|}
vector_list.c:igraph_i_vector_int_list_init_item:
 1051|  20.0k|static igraph_error_t INTERNAL_FUNCTION(init_item)(const TYPE *list, ITEM_TYPE *item) {
 1052|  20.0k|    IGRAPH_UNUSED(list);
  ------------------
  |  |   30|  20.0k|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
 1053|  20.0k|    return ITEM_FUNCTION(init)(item, 0);
  ------------------
  |  |   42|  20.0k|        #define ITEM_FUNCTION(f) CONCAT3(igraph_vector,SHORT,f)
  |  |  ------------------
  |  |  |  |   22|  20.0k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  20.0k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1054|  20.0k|}
vector_list.c:igraph_i_vector_int_list_destroy_item:
 1060|  20.0k|static void INTERNAL_FUNCTION(destroy_item)(ITEM_TYPE *item) {
 1061|  20.0k|    ITEM_FUNCTION(destroy)(item);
  ------------------
  |  |   42|  20.0k|        #define ITEM_FUNCTION(f) CONCAT3(igraph_vector,SHORT,f)
  |  |  ------------------
  |  |  |  |   22|  20.0k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  20.0k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1062|  20.0k|}
vector_list.c:igraph_i_vector_int_list_init_slice:
 1068|  1.65k|static igraph_error_t INTERNAL_FUNCTION(init_slice)(const TYPE *list, ITEM_TYPE *start, ITEM_TYPE *end) {
 1069|  1.65k|    ITEM_TYPE *current;
  ------------------
  |  |   31|  1.65k|    #define ITEM_TYPE BASE_VECTOR
  |  |  ------------------
  |  |  |  |   67|  1.65k|    #define BASE_VECTOR igraph_vector_int_t
  |  |  ------------------
  ------------------
 1070|  1.65k|    igraph_error_t retval;
 1071|       |
 1072|  21.6k|    for (current = start; current < end; current++) {
  ------------------
  |  Branch (1072:27): [True: 20.0k, False: 1.65k]
  ------------------
 1073|  20.0k|        retval = INTERNAL_FUNCTION(init_item)(list, current);
  ------------------
  |  |  137|  20.0k|        #define INTERNAL_FUNCTION(c) CONCAT4(igraph_i_vector,SHORT,list,c)
  |  |  ------------------
  |  |  |  |   24|  20.0k|#define CONCAT4(a,b,c,d) CONCAT4x(a,b,c,d)
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|  20.0k|#define CONCAT4x(a,b,c,d) a ## _ ## b ## _ ## c ## _ ## d
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1074|  20.0k|        if (retval) {
  ------------------
  |  Branch (1074:13): [True: 0, False: 20.0k]
  ------------------
 1075|      0|            INTERNAL_FUNCTION(destroy_slice)(list, start, current);
  ------------------
  |  |  137|      0|        #define INTERNAL_FUNCTION(c) CONCAT4(igraph_i_vector,SHORT,list,c)
  |  |  ------------------
  |  |  |  |   24|      0|#define CONCAT4(a,b,c,d) CONCAT4x(a,b,c,d)
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|      0|#define CONCAT4x(a,b,c,d) a ## _ ## b ## _ ## c ## _ ## d
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1076|      0|            IGRAPH_CHECK(retval);
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1077|      0|        }
 1078|  20.0k|    }
 1079|       |
 1080|  1.65k|    return IGRAPH_SUCCESS;
 1081|  1.65k|}
vector_list.c:igraph_i_vector_int_list_destroy_slice:
 1083|  1.65k|static void INTERNAL_FUNCTION(destroy_slice)(const TYPE *list, ITEM_TYPE *start, ITEM_TYPE *end) {
 1084|  1.65k|    IGRAPH_UNUSED(list);
  ------------------
  |  |   30|  1.65k|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
 1085|  21.6k|    for (; start < end; start++) {
  ------------------
  |  Branch (1085:12): [True: 20.0k, False: 1.65k]
  ------------------
 1086|  20.0k|        INTERNAL_FUNCTION(destroy_item)(start);
  ------------------
  |  |  137|  20.0k|        #define INTERNAL_FUNCTION(c) CONCAT4(igraph_i_vector,SHORT,list,c)
  |  |  ------------------
  |  |  |  |   24|  20.0k|#define CONCAT4(a,b,c,d) CONCAT4x(a,b,c,d)
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|  20.0k|#define CONCAT4x(a,b,c,d) a ## _ ## b ## _ ## c ## _ ## d
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1087|  20.0k|    }
 1088|  1.65k|}

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

igraph_vector_init:
  134|   177k|igraph_error_t FUNCTION(igraph_vector, init)(TYPE(igraph_vector) *v, igraph_int_t size) {
  135|   177k|    igraph_int_t alloc_size;
  136|   177k|    IGRAPH_ASSERT(size >= 0);
  ------------------
  |  |  924|   177k|    do { \
  |  |  925|   177k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   177k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 177k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   177k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 177k]
  |  |  ------------------
  ------------------
  137|   177k|    alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (137:18): [True: 13.0k, False: 163k]
  ------------------
  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|   177k|    v->stor_begin = IGRAPH_CALLOC(alloc_size, BASE);
  ------------------
  |  |   33|   177k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|   354k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 177k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 177k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 177k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  144|   177k|    IGRAPH_CHECK_OOM(v->stor_begin, "Insufficient memory to initialize vector.");
  ------------------
  |  |  709|   177k|    do { \
  |  |  710|   177k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|   177k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 177k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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|   177k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 177k]
  |  |  ------------------
  ------------------
  145|   177k|    v->stor_end = v->stor_begin + alloc_size;
  146|   177k|    v->end = v->stor_begin + size;
  147|       |
  148|   177k|    return IGRAPH_SUCCESS;
  149|   177k|}
igraph_vector_destroy:
  408|   177k|void FUNCTION(igraph_vector, destroy)(TYPE(igraph_vector) *v) {
  409|   177k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|   177k|    do { \
  |  |  925|   177k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   177k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 177k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   177k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 177k]
  |  |  ------------------
  ------------------
  410|       |    /* vector_init() will leave stor_begin set to NULL when it fails.
  411|       |     * We handle these cases gracefully. */
  412|   177k|    if (v->stor_begin != NULL) {
  ------------------
  |  Branch (412:9): [True: 177k, False: 0]
  ------------------
  413|   177k|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   36|   177k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  414|       |        v->stor_begin = NULL;
  415|   177k|    }
  416|   177k|}
igraph_vector_capacity:
  436|  97.0k|igraph_int_t FUNCTION(igraph_vector, capacity)(const TYPE(igraph_vector) *v) {
  437|  97.0k|    return v->stor_end - v->stor_begin;
  438|  97.0k|}
igraph_vector_reserve:
  468|  96.2k|igraph_error_t FUNCTION(igraph_vector, reserve)(TYPE(igraph_vector) *v, igraph_int_t capacity) {
  469|  96.2k|    igraph_int_t current_capacity;
  470|  96.2k|    BASE *tmp;
  ------------------
  |  |   29|  96.2k|    #define BASE igraph_real_t
  ------------------
  471|       |
  472|  96.2k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  96.2k|    do { \
  |  |  925|  96.2k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  96.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 96.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  96.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 96.2k]
  |  |  ------------------
  ------------------
  473|  96.2k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  96.2k|    do { \
  |  |  925|  96.2k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  96.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 96.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  96.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 96.2k]
  |  |  ------------------
  ------------------
  474|  96.2k|    IGRAPH_ASSERT(capacity >= 0);
  ------------------
  |  |  924|  96.2k|    do { \
  |  |  925|  96.2k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  96.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 96.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  96.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 96.2k]
  |  |  ------------------
  ------------------
  475|       |
  476|  96.2k|    current_capacity = FUNCTION(igraph_vector, capacity)(v);
  ------------------
  |  |  170|  96.2k|        #define FUNCTION(a,c) CONCAT2(a,c)
  |  |  ------------------
  |  |  |  |   20|  96.2k|#define CONCAT2(a,b) CONCAT2x(a,b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|  96.2k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  477|       |
  478|  96.2k|    if (capacity <= current_capacity) {
  ------------------
  |  Branch (478:9): [True: 14.2k, False: 82.0k]
  ------------------
  479|  14.2k|        return IGRAPH_SUCCESS;
  480|  14.2k|    }
  481|       |
  482|  82.0k|    tmp = IGRAPH_REALLOC(v->stor_begin, capacity, BASE);
  ------------------
  |  |   35|  82.0k|#define IGRAPH_REALLOC(p,n,t) IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, realloc((void*)(p), sizeof(t) * ((n) > 0 ? (n) : 1)))
  |  |  ------------------
  |  |  |  |   31|   164k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 82.0k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 82.0k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 82.0k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  483|  82.0k|    IGRAPH_CHECK_OOM(tmp, "Cannot reserve space for vector.");
  ------------------
  |  |  709|  82.0k|    do { \
  |  |  710|  82.0k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  82.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 82.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|  82.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 82.0k]
  |  |  ------------------
  ------------------
  484|       |
  485|  82.0k|    v->end = tmp + (v->end - v->stor_begin);
  486|  82.0k|    v->stor_begin = tmp;
  487|  82.0k|    v->stor_end = v->stor_begin + capacity;
  488|       |
  489|  82.0k|    return IGRAPH_SUCCESS;
  490|  82.0k|}
igraph_vector_empty:
  503|  1.83M|igraph_bool_t FUNCTION(igraph_vector, empty)(const TYPE(igraph_vector) *v) {
  504|  1.83M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  1.83M|    do { \
  |  |  925|  1.83M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.83M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.83M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.83M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.83M]
  |  |  ------------------
  ------------------
  505|  1.83M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  1.83M|    do { \
  |  |  925|  1.83M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.83M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.83M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.83M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.83M]
  |  |  ------------------
  ------------------
  506|  1.83M|    return v->stor_begin == v->end;
  507|  1.83M|}
igraph_vector_size:
  522|  6.93M|igraph_int_t FUNCTION(igraph_vector, size)(const TYPE(igraph_vector) *v) {
  523|  6.93M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  6.93M|    do { \
  |  |  925|  6.93M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  6.93M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 6.93M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  6.93M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 6.93M]
  |  |  ------------------
  ------------------
  524|  6.93M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  6.93M|    do { \
  |  |  925|  6.93M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  6.93M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 6.93M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  6.93M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 6.93M]
  |  |  ------------------
  ------------------
  525|  6.93M|    return v->end - v->stor_begin;
  526|  6.93M|}
igraph_vector_clear:
  542|   188k|void FUNCTION(igraph_vector, clear)(TYPE(igraph_vector)* v) {
  543|   188k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|   188k|    do { \
  |  |  925|   188k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   188k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 188k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   188k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 188k]
  |  |  ------------------
  ------------------
  544|   188k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|   188k|    do { \
  |  |  925|   188k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   188k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 188k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   188k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 188k]
  |  |  ------------------
  ------------------
  545|   188k|    v->end = v->stor_begin;
  546|   188k|}
igraph_vector_push_back:
  573|  1.51M|igraph_error_t FUNCTION(igraph_vector, push_back)(TYPE(igraph_vector) *v, BASE e) {
  574|  1.51M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  1.51M|    do { \
  |  |  925|  1.51M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.51M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.51M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.51M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.51M]
  |  |  ------------------
  ------------------
  575|  1.51M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  1.51M|    do { \
  |  |  925|  1.51M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.51M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.51M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.51M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.51M]
  |  |  ------------------
  ------------------
  576|       |
  577|  1.51M|    if (v->stor_end == v->end) {
  ------------------
  |  Branch (577:9): [True: 79.0k, False: 1.43M]
  ------------------
  578|       |        /* full, allocate more storage */
  579|  79.0k|        igraph_int_t old_size = FUNCTION(igraph_vector, size)(v);
  ------------------
  |  |  170|  79.0k|        #define FUNCTION(a,c) CONCAT2(a,c)
  |  |  ------------------
  |  |  |  |   20|  79.0k|#define CONCAT2(a,b) CONCAT2x(a,b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|  79.0k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  580|  79.0k|        igraph_int_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   72|  79.0k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
                      igraph_int_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   72|  79.0k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (580:33): [True: 79.0k, False: 0]
  ------------------
  581|  79.0k|        if (old_size == IGRAPH_INTEGER_MAX) {
  ------------------
  |  |   72|  79.0k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (581:13): [True: 0, False: 79.0k]
  ------------------
  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|  79.0k|        if (new_size == 0) {
  ------------------
  |  Branch (584:13): [True: 0, False: 79.0k]
  ------------------
  585|      0|            new_size = 1;
  586|      0|        }
  587|  79.0k|        IGRAPH_CHECK(FUNCTION(igraph_vector, reserve)(v, new_size));
  ------------------
  |  |  656|  79.0k|    do { \
  |  |  657|  79.0k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  79.0k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  79.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 79.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  79.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 79.0k]
  |  |  ------------------
  ------------------
  588|  79.0k|    }
  589|       |
  590|  1.51M|    *(v->end) = e;
  591|  1.51M|    v->end += 1;
  592|       |
  593|  1.51M|    return IGRAPH_SUCCESS;
  594|  1.51M|}
igraph_vector_null:
  725|  11.4k|void FUNCTION(igraph_vector, null)(TYPE(igraph_vector) *v) {
  726|  11.4k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  11.4k|    do { \
  |  |  925|  11.4k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  11.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 11.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  11.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 11.4k]
  |  |  ------------------
  ------------------
  727|  11.4k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  11.4k|    do { \
  |  |  925|  11.4k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  11.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 11.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  11.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 11.4k]
  |  |  ------------------
  ------------------
  728|  11.4k|    if (FUNCTION(igraph_vector, size)(v) > 0) {
  ------------------
  |  |  170|  11.4k|        #define FUNCTION(a,c) CONCAT2(a,c)
  |  |  ------------------
  |  |  |  |   20|  11.4k|#define CONCAT2(a,b) CONCAT2x(a,b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|  11.4k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (728:9): [True: 11.3k, False: 128]
  ------------------
  729|  11.3k|        memset(v->stor_begin, 0, sizeof(BASE) * FUNCTION(igraph_vector, size)(v));
  ------------------
  |  |  170|  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
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  730|  11.3k|    }
  731|  11.4k|}
igraph_vector_pop_back:
  838|  1.48M|BASE FUNCTION(igraph_vector, pop_back)(TYPE(igraph_vector) *v) {
  839|  1.48M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  1.48M|    do { \
  |  |  925|  1.48M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.48M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.48M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.48M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.48M]
  |  |  ------------------
  ------------------
  840|  1.48M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  1.48M|    do { \
  |  |  925|  1.48M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.48M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.48M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.48M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.48M]
  |  |  ------------------
  ------------------
  841|  1.48M|    IGRAPH_ASSERT(v->end != NULL);
  ------------------
  |  |  924|  1.48M|    do { \
  |  |  925|  1.48M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.48M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.48M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.48M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.48M]
  |  |  ------------------
  ------------------
  842|  1.48M|    IGRAPH_ASSERT(v->end != v->stor_begin);
  ------------------
  |  |  924|  1.48M|    do { \
  |  |  925|  1.48M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.48M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.48M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.48M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.48M]
  |  |  ------------------
  ------------------
  843|       |
  844|  1.48M|    (v->end)--;
  845|       |
  846|  1.48M|    return *(v->end);
  847|  1.48M|}
igraph_vector_resize:
 1264|  16.3k|igraph_error_t FUNCTION(igraph_vector, resize)(TYPE(igraph_vector)* v, igraph_int_t new_size) {
 1265|  16.3k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  16.3k|    do { \
  |  |  925|  16.3k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  16.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 16.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  16.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 16.3k]
  |  |  ------------------
  ------------------
 1266|  16.3k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  16.3k|    do { \
  |  |  925|  16.3k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  16.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 16.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  16.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 16.3k]
  |  |  ------------------
  ------------------
 1267|  16.3k|    IGRAPH_CHECK(FUNCTION(igraph_vector, reserve)(v, new_size));
  ------------------
  |  |  656|  16.3k|    do { \
  |  |  657|  16.3k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  16.3k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  16.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 16.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|  16.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 16.3k]
  |  |  ------------------
  ------------------
 1268|  16.3k|    v->end = v->stor_begin + new_size;
 1269|  16.3k|    return IGRAPH_SUCCESS;
 1270|  16.3k|}
igraph_vector_min:
 1401|  10.0k|BASE FUNCTION(igraph_vector, min)(const TYPE(igraph_vector) *v) {
 1402|  10.0k|    BASE min;
  ------------------
  |  |   29|  10.0k|    #define BASE igraph_real_t
  ------------------
 1403|  10.0k|    BASE *ptr;
  ------------------
  |  |   29|  10.0k|    #define BASE igraph_real_t
  ------------------
 1404|  10.0k|    IGRAPH_ASSERT(!FUNCTION(igraph_vector, empty)(v));
  ------------------
  |  |  924|  10.0k|    do { \
  |  |  925|  10.0k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  10.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 10.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  10.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 10.0k]
  |  |  ------------------
  ------------------
 1405|  10.0k|    min = *(v->stor_begin);
 1406|  10.0k|#if defined(BASE_IGRAPH_REAL)
 1407|  10.0k|    if (isnan(min)) { return min; }; /* Result is NaN */
  ------------------
  |  Branch (1407:9): [True: 0, False: 10.0k]
  ------------------
 1408|  10.0k|#endif
 1409|  10.0k|    ptr = v->stor_begin + 1;
 1410|   230k|    while (ptr < v->end) {
  ------------------
  |  Branch (1410:12): [True: 220k, False: 10.0k]
  ------------------
 1411|   220k|        if ((*ptr) < min) {
  ------------------
  |  Branch (1411:13): [True: 9.27k, False: 210k]
  ------------------
 1412|  9.27k|            min = *ptr;
 1413|  9.27k|        }
 1414|   210k|#if defined(BASE_IGRAPH_REAL)
 1415|   210k|        else if (isnan(*ptr)) {
  ------------------
  |  Branch (1415:18): [True: 0, False: 210k]
  ------------------
 1416|      0|            return *ptr; /* Result is NaN */
 1417|      0|        }
 1418|   220k|#endif
 1419|   220k|        ptr++;
 1420|   220k|    }
 1421|  10.0k|    return min;
 1422|  10.0k|}
igraph_vector_sum:
 1566|    828|BASE FUNCTION(igraph_vector, sum)(const TYPE(igraph_vector) *v) {
 1567|    828|    BASE res = ZERO;
  ------------------
  |  |   29|    828|    #define BASE igraph_real_t
  ------------------
                  BASE res = ZERO;
  ------------------
  |  |   38|    828|    #define ZERO 0.0
  ------------------
 1568|    828|    const BASE *p;
 1569|    828|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|    828|    do { \
  |  |  925|    828|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|    828|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 828]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|    828|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 828]
  |  |  ------------------
  ------------------
 1570|    828|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|    828|    do { \
  |  |  925|    828|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|    828|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 828]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|    828|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 828]
  |  |  ------------------
  ------------------
 1571|  36.9k|    for (p = v->stor_begin; p < v->end; p++) {
  ------------------
  |  Branch (1571:29): [True: 36.1k, False: 828]
  ------------------
 1572|       |#ifdef SUM
 1573|       |        SUM(res, res, *p);
 1574|       |#else
 1575|  36.1k|        res += *p;
 1576|  36.1k|#endif
 1577|  36.1k|    }
 1578|    828|    return res;
 1579|    828|}
igraph_vector_scale:
 2258|  4.95k|void FUNCTION(igraph_vector, scale)(TYPE(igraph_vector) *v, BASE by) {
 2259|  4.95k|    const igraph_int_t n = FUNCTION(igraph_vector, size)(v);
  ------------------
  |  |  170|  4.95k|        #define FUNCTION(a,c) CONCAT2(a,c)
  |  |  ------------------
  |  |  |  |   20|  4.95k|#define CONCAT2(a,b) CONCAT2x(a,b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|  4.95k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2260|       |#ifdef EQ
 2261|       |    const BASE one = ONE;
 2262|       |    if (EQ(by, one)) {
 2263|       |        return;
 2264|       |    }
 2265|       |#else
 2266|  4.95k|    if (by == ONE) {
  ------------------
  |  |   39|  4.95k|    #define ONE 1.0
  ------------------
  |  Branch (2266:9): [True: 1.68k, False: 3.27k]
  ------------------
 2267|  1.68k|        return;
 2268|  1.68k|    }
 2269|  3.27k|#endif
 2270|   130k|    for (igraph_int_t i = 0; i < n; i++) {
  ------------------
  |  Branch (2270:30): [True: 126k, False: 3.27k]
  ------------------
 2271|       |#ifdef PROD
 2272|       |        PROD(VECTOR(*v)[i], VECTOR(*v)[i], by);
 2273|       |#else
 2274|   126k|        VECTOR(*v)[i] *= by;
  ------------------
  |  |   60|   126k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 2275|   126k|#endif
 2276|   126k|    }
 2277|  3.27k|}
igraph_vector_append:
 2427|    829|                                               const TYPE(igraph_vector) *from) {
 2428|    829|    IGRAPH_ASSERT(to != NULL);
  ------------------
  |  |  924|    829|    do { \
  |  |  925|    829|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|    829|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 829]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|    829|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 829]
  |  |  ------------------
  ------------------
 2429|    829|    IGRAPH_ASSERT(to->stor_begin != NULL);
  ------------------
  |  |  924|    829|    do { \
  |  |  925|    829|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|    829|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 829]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|    829|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 829]
  |  |  ------------------
  ------------------
 2430|       |
 2431|    829|    const igraph_int_t to_size = FUNCTION(igraph_vector, size)(to);
  ------------------
  |  |  170|    829|        #define FUNCTION(a,c) CONCAT2(a,c)
  |  |  ------------------
  |  |  |  |   20|    829|#define CONCAT2(a,b) CONCAT2x(a,b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|    829|#define CONCAT2x(a,b) a ## _ ## b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2432|    829|    const igraph_int_t from_size = FUNCTION(igraph_vector, size)(from);
  ------------------
  |  |  170|    829|        #define FUNCTION(a,c) CONCAT2(a,c)
  |  |  ------------------
  |  |  |  |   20|    829|#define CONCAT2(a,b) CONCAT2x(a,b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|    829|#define CONCAT2x(a,b) a ## _ ## b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2433|    829|    const igraph_int_t to_capacity = FUNCTION(igraph_vector, capacity)(to);
  ------------------
  |  |  170|    829|        #define FUNCTION(a,c) CONCAT2(a,c)
  |  |  ------------------
  |  |  |  |   20|    829|#define CONCAT2(a,b) CONCAT2x(a,b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|    829|#define CONCAT2x(a,b) a ## _ ## b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2434|    829|    igraph_int_t new_to_size;
 2435|       |
 2436|    829|    IGRAPH_SAFE_ADD(to_size, from_size, &new_to_size);
  ------------------
  |  |   47|    829|    do { \
  |  |   48|    829|        igraph_int_t _safe_a = (a), _safe_b = (b); \
  |  |   49|    829|        igraph_int_t _safe_sum; \
  |  |   50|    829|        if (__builtin_add_overflow(_safe_a, _safe_b, &_safe_sum)) { \
  |  |  ------------------
  |  |  |  Branch (50:13): [True: 0, False: 829]
  |  |  ------------------
  |  |   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|    829|        *(res) = _safe_sum; \
  |  |   54|    829|    } while (0)
  |  |  ------------------
  |  |  |  Branch (54:14): [Folded, False: 829]
  |  |  ------------------
  ------------------
 2437|       |
 2438|    829|    if (to_capacity < new_to_size) {
  ------------------
  |  Branch (2438:9): [True: 0, False: 829]
  ------------------
 2439|      0|        igraph_int_t new_to_capacity = to_capacity < IGRAPH_INTEGER_MAX/2 ? to_capacity * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   72|      0|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
                      igraph_int_t new_to_capacity = to_capacity < IGRAPH_INTEGER_MAX/2 ? to_capacity * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   72|      0|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (2439:40): [True: 0, False: 0]
  ------------------
 2440|      0|        if (new_to_capacity < new_to_size) {
  ------------------
  |  Branch (2440:13): [True: 0, False: 0]
  ------------------
 2441|      0|            new_to_capacity = new_to_size;
 2442|      0|        }
 2443|      0|        IGRAPH_CHECK(FUNCTION(igraph_vector, reserve)(to, new_to_capacity));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2444|      0|    }
 2445|       |
 2446|    829|    memcpy(to->stor_begin + to_size, from->stor_begin,
 2447|    829|           sizeof(BASE) * from_size);
 2448|    829|    to->end = to->stor_begin + new_to_size;
 2449|       |
 2450|    829|    return IGRAPH_SUCCESS;
 2451|    829|}
igraph_vector_update:
 2524|    829|                                    const TYPE(igraph_vector) *from) {
 2525|    829|    igraph_int_t n = FUNCTION(igraph_vector, size)(from);
  ------------------
  |  |  170|    829|        #define FUNCTION(a,c) CONCAT2(a,c)
  |  |  ------------------
  |  |  |  |   20|    829|#define CONCAT2(a,b) CONCAT2x(a,b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|    829|#define CONCAT2x(a,b) a ## _ ## b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2526|    829|    IGRAPH_CHECK(FUNCTION(igraph_vector, resize)(to, n));
  ------------------
  |  |  656|    829|    do { \
  |  |  657|    829|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    829|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    829|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 829]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    829|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 829]
  |  |  ------------------
  ------------------
 2527|    829|    memcpy(to->stor_begin, from->stor_begin, sizeof(BASE)*n);
 2528|    829|    return IGRAPH_SUCCESS;
 2529|    829|}
igraph_vector_char_init:
  134|    829|igraph_error_t FUNCTION(igraph_vector, init)(TYPE(igraph_vector) *v, igraph_int_t size) {
  135|    829|    igraph_int_t alloc_size;
  136|    829|    IGRAPH_ASSERT(size >= 0);
  ------------------
  |  |  924|    829|    do { \
  |  |  925|    829|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|    829|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 829]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|    829|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 829]
  |  |  ------------------
  ------------------
  137|    829|    alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (137:18): [True: 828, 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|    829|    v->stor_begin = IGRAPH_CALLOC(alloc_size, BASE);
  ------------------
  |  |   33|    829|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  1.65k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 829, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 829, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 829, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  144|    829|    IGRAPH_CHECK_OOM(v->stor_begin, "Insufficient memory to initialize vector.");
  ------------------
  |  |  709|    829|    do { \
  |  |  710|    829|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|    829|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 829]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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|    829|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 829]
  |  |  ------------------
  ------------------
  145|    829|    v->stor_end = v->stor_begin + alloc_size;
  146|    829|    v->end = v->stor_begin + size;
  147|       |
  148|    829|    return IGRAPH_SUCCESS;
  149|    829|}
igraph_vector_char_destroy:
  408|    829|void FUNCTION(igraph_vector, destroy)(TYPE(igraph_vector) *v) {
  409|    829|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|    829|    do { \
  |  |  925|    829|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|    829|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 829]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|    829|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 829]
  |  |  ------------------
  ------------------
  410|       |    /* vector_init() will leave stor_begin set to NULL when it fails.
  411|       |     * We handle these cases gracefully. */
  412|    829|    if (v->stor_begin != NULL) {
  ------------------
  |  Branch (412:9): [True: 829, False: 0]
  ------------------
  413|    829|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   36|    829|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  414|       |        v->stor_begin = NULL;
  415|    829|    }
  416|    829|}
igraph_vector_char_size:
  522|  72.2k|igraph_int_t FUNCTION(igraph_vector, size)(const TYPE(igraph_vector) *v) {
  523|  72.2k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  72.2k|    do { \
  |  |  925|  72.2k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  72.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 72.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  72.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 72.2k]
  |  |  ------------------
  ------------------
  524|  72.2k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  72.2k|    do { \
  |  |  925|  72.2k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  72.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 72.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  72.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 72.2k]
  |  |  ------------------
  ------------------
  525|  72.2k|    return v->end - v->stor_begin;
  526|  72.2k|}
igraph_vector_char_null:
  725|  36.1k|void FUNCTION(igraph_vector, null)(TYPE(igraph_vector) *v) {
  726|  36.1k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  36.1k|    do { \
  |  |  925|  36.1k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  36.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 36.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  36.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 36.1k]
  |  |  ------------------
  ------------------
  727|  36.1k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  36.1k|    do { \
  |  |  925|  36.1k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  36.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 36.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  36.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 36.1k]
  |  |  ------------------
  ------------------
  728|  36.1k|    if (FUNCTION(igraph_vector, size)(v) > 0) {
  ------------------
  |  |  178|  36.1k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  36.1k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  36.1k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (728:9): [True: 36.1k, False: 0]
  ------------------
  729|  36.1k|        memset(v->stor_begin, 0, sizeof(BASE) * FUNCTION(igraph_vector, size)(v));
  ------------------
  |  |  178|  36.1k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  36.1k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  36.1k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  730|  36.1k|    }
  731|  36.1k|}
igraph_vector_int_init:
  134|  1.05M|igraph_error_t FUNCTION(igraph_vector, init)(TYPE(igraph_vector) *v, igraph_int_t size) {
  135|  1.05M|    igraph_int_t alloc_size;
  136|  1.05M|    IGRAPH_ASSERT(size >= 0);
  ------------------
  |  |  924|  1.05M|    do { \
  |  |  925|  1.05M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.05M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.05M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.05M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.05M]
  |  |  ------------------
  ------------------
  137|  1.05M|    alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (137:18): [True: 239k, False: 814k]
  ------------------
  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.05M|    v->stor_begin = IGRAPH_CALLOC(alloc_size, BASE);
  ------------------
  |  |   33|  1.05M|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  2.10M|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 1.05M, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 1.05M, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 1.05M, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  144|  1.05M|    IGRAPH_CHECK_OOM(v->stor_begin, "Insufficient memory to initialize vector.");
  ------------------
  |  |  709|  1.05M|    do { \
  |  |  710|  1.05M|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  1.05M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.05M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  1.05M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 1.05M]
  |  |  ------------------
  ------------------
  145|  1.05M|    v->stor_end = v->stor_begin + alloc_size;
  146|  1.05M|    v->end = v->stor_begin + size;
  147|       |
  148|  1.05M|    return IGRAPH_SUCCESS;
  149|  1.05M|}
igraph_vector_int_destroy:
  408|  1.05M|void FUNCTION(igraph_vector, destroy)(TYPE(igraph_vector) *v) {
  409|  1.05M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  1.05M|    do { \
  |  |  925|  1.05M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.05M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.05M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.05M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.05M]
  |  |  ------------------
  ------------------
  410|       |    /* vector_init() will leave stor_begin set to NULL when it fails.
  411|       |     * We handle these cases gracefully. */
  412|  1.05M|    if (v->stor_begin != NULL) {
  ------------------
  |  Branch (412:9): [True: 1.05M, False: 0]
  ------------------
  413|  1.05M|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   36|  1.05M|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  414|       |        v->stor_begin = NULL;
  415|  1.05M|    }
  416|  1.05M|}
igraph_vector_int_capacity:
  436|  2.35M|igraph_int_t FUNCTION(igraph_vector, capacity)(const TYPE(igraph_vector) *v) {
  437|  2.35M|    return v->stor_end - v->stor_begin;
  438|  2.35M|}
igraph_vector_int_reserve:
  468|  2.31M|igraph_error_t FUNCTION(igraph_vector, reserve)(TYPE(igraph_vector) *v, igraph_int_t capacity) {
  469|  2.31M|    igraph_int_t current_capacity;
  470|  2.31M|    BASE *tmp;
  ------------------
  |  |   66|  2.31M|    #define BASE igraph_int_t
  ------------------
  471|       |
  472|  2.31M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  2.31M|    do { \
  |  |  925|  2.31M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.31M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.31M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.31M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.31M]
  |  |  ------------------
  ------------------
  473|  2.31M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  2.31M|    do { \
  |  |  925|  2.31M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.31M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.31M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.31M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.31M]
  |  |  ------------------
  ------------------
  474|  2.31M|    IGRAPH_ASSERT(capacity >= 0);
  ------------------
  |  |  924|  2.31M|    do { \
  |  |  925|  2.31M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.31M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.31M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.31M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.31M]
  |  |  ------------------
  ------------------
  475|       |
  476|  2.31M|    current_capacity = FUNCTION(igraph_vector, capacity)(v);
  ------------------
  |  |  178|  2.31M|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  2.31M|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  2.31M|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  477|       |
  478|  2.31M|    if (capacity <= current_capacity) {
  ------------------
  |  Branch (478:9): [True: 2.19M, False: 127k]
  ------------------
  479|  2.19M|        return IGRAPH_SUCCESS;
  480|  2.19M|    }
  481|       |
  482|   127k|    tmp = IGRAPH_REALLOC(v->stor_begin, capacity, BASE);
  ------------------
  |  |   35|   127k|#define IGRAPH_REALLOC(p,n,t) IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, realloc((void*)(p), sizeof(t) * ((n) > 0 ? (n) : 1)))
  |  |  ------------------
  |  |  |  |   31|   254k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 127k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 127k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 127k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  483|   127k|    IGRAPH_CHECK_OOM(tmp, "Cannot reserve space for vector.");
  ------------------
  |  |  709|   127k|    do { \
  |  |  710|   127k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|   127k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 127k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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|   127k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 127k]
  |  |  ------------------
  ------------------
  484|       |
  485|   127k|    v->end = tmp + (v->end - v->stor_begin);
  486|   127k|    v->stor_begin = tmp;
  487|   127k|    v->stor_end = v->stor_begin + capacity;
  488|       |
  489|   127k|    return IGRAPH_SUCCESS;
  490|   127k|}
igraph_vector_int_empty:
  503|  3.19k|igraph_bool_t FUNCTION(igraph_vector, empty)(const TYPE(igraph_vector) *v) {
  504|  3.19k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  3.19k|    do { \
  |  |  925|  3.19k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  3.19k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.19k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  3.19k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 3.19k]
  |  |  ------------------
  ------------------
  505|  3.19k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  3.19k|    do { \
  |  |  925|  3.19k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  3.19k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.19k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  3.19k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 3.19k]
  |  |  ------------------
  ------------------
  506|  3.19k|    return v->stor_begin == v->end;
  507|  3.19k|}
igraph_vector_int_size:
  522|  3.40M|igraph_int_t FUNCTION(igraph_vector, size)(const TYPE(igraph_vector) *v) {
  523|  3.40M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  3.40M|    do { \
  |  |  925|  3.40M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  3.40M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.40M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  3.40M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 3.40M]
  |  |  ------------------
  ------------------
  524|  3.40M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  3.40M|    do { \
  |  |  925|  3.40M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  3.40M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.40M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  3.40M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 3.40M]
  |  |  ------------------
  ------------------
  525|  3.40M|    return v->end - v->stor_begin;
  526|  3.40M|}
igraph_vector_int_clear:
  542|   852k|void FUNCTION(igraph_vector, clear)(TYPE(igraph_vector)* v) {
  543|   852k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|   852k|    do { \
  |  |  925|   852k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   852k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 852k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   852k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 852k]
  |  |  ------------------
  ------------------
  544|   852k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|   852k|    do { \
  |  |  925|   852k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   852k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 852k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   852k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 852k]
  |  |  ------------------
  ------------------
  545|   852k|    v->end = v->stor_begin;
  546|   852k|}
igraph_vector_int_push_back:
  573|  1.73M|igraph_error_t FUNCTION(igraph_vector, push_back)(TYPE(igraph_vector) *v, BASE e) {
  574|  1.73M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  1.73M|    do { \
  |  |  925|  1.73M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.73M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.73M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.73M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.73M]
  |  |  ------------------
  ------------------
  575|  1.73M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  1.73M|    do { \
  |  |  925|  1.73M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.73M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.73M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.73M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.73M]
  |  |  ------------------
  ------------------
  576|       |
  577|  1.73M|    if (v->stor_end == v->end) {
  ------------------
  |  Branch (577:9): [True: 86.6k, False: 1.64M]
  ------------------
  578|       |        /* full, allocate more storage */
  579|  86.6k|        igraph_int_t old_size = FUNCTION(igraph_vector, size)(v);
  ------------------
  |  |  178|  86.6k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  86.6k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  86.6k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  580|  86.6k|        igraph_int_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   72|  86.6k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
                      igraph_int_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   72|  86.6k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (580:33): [True: 86.6k, False: 0]
  ------------------
  581|  86.6k|        if (old_size == IGRAPH_INTEGER_MAX) {
  ------------------
  |  |   72|  86.6k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (581:13): [True: 0, False: 86.6k]
  ------------------
  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|  86.6k|        if (new_size == 0) {
  ------------------
  |  Branch (584:13): [True: 0, False: 86.6k]
  ------------------
  585|      0|            new_size = 1;
  586|      0|        }
  587|  86.6k|        IGRAPH_CHECK(FUNCTION(igraph_vector, reserve)(v, new_size));
  ------------------
  |  |  656|  86.6k|    do { \
  |  |  657|  86.6k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  86.6k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  86.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 86.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  86.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 86.6k]
  |  |  ------------------
  ------------------
  588|  86.6k|    }
  589|       |
  590|  1.73M|    *(v->end) = e;
  591|  1.73M|    v->end += 1;
  592|       |
  593|  1.73M|    return IGRAPH_SUCCESS;
  594|  1.73M|}
igraph_vector_int_null:
  725|   202k|void FUNCTION(igraph_vector, null)(TYPE(igraph_vector) *v) {
  726|   202k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|   202k|    do { \
  |  |  925|   202k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   202k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 202k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   202k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 202k]
  |  |  ------------------
  ------------------
  727|   202k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|   202k|    do { \
  |  |  925|   202k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   202k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 202k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   202k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 202k]
  |  |  ------------------
  ------------------
  728|   202k|    if (FUNCTION(igraph_vector, size)(v) > 0) {
  ------------------
  |  |  178|   202k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|   202k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|   202k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (728:9): [True: 202k, False: 4]
  ------------------
  729|   202k|        memset(v->stor_begin, 0, sizeof(BASE) * FUNCTION(igraph_vector, size)(v));
  ------------------
  |  |  178|   202k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|   202k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|   202k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  730|   202k|    }
  731|   202k|}
igraph_vector_int_pop_back:
  838|  1.48M|BASE FUNCTION(igraph_vector, pop_back)(TYPE(igraph_vector) *v) {
  839|  1.48M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  1.48M|    do { \
  |  |  925|  1.48M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.48M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.48M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.48M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.48M]
  |  |  ------------------
  ------------------
  840|  1.48M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  1.48M|    do { \
  |  |  925|  1.48M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.48M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.48M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.48M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.48M]
  |  |  ------------------
  ------------------
  841|  1.48M|    IGRAPH_ASSERT(v->end != NULL);
  ------------------
  |  |  924|  1.48M|    do { \
  |  |  925|  1.48M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.48M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.48M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.48M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.48M]
  |  |  ------------------
  ------------------
  842|  1.48M|    IGRAPH_ASSERT(v->end != v->stor_begin);
  ------------------
  |  |  924|  1.48M|    do { \
  |  |  925|  1.48M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.48M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.48M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.48M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.48M]
  |  |  ------------------
  ------------------
  843|       |
  844|  1.48M|    (v->end)--;
  845|       |
  846|  1.48M|    return *(v->end);
  847|  1.48M|}
igraph_vector_int_resize:
 1264|  2.21M|igraph_error_t FUNCTION(igraph_vector, resize)(TYPE(igraph_vector)* v, igraph_int_t new_size) {
 1265|  2.21M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  2.21M|    do { \
  |  |  925|  2.21M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.21M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.21M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.21M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.21M]
  |  |  ------------------
  ------------------
 1266|  2.21M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  2.21M|    do { \
  |  |  925|  2.21M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.21M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.21M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.21M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.21M]
  |  |  ------------------
  ------------------
 1267|  2.21M|    IGRAPH_CHECK(FUNCTION(igraph_vector, reserve)(v, new_size));
  ------------------
  |  |  656|  2.21M|    do { \
  |  |  657|  2.21M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.21M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.21M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.21M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.21M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.21M]
  |  |  ------------------
  ------------------
 1268|  2.21M|    v->end = v->stor_begin + new_size;
 1269|  2.21M|    return IGRAPH_SUCCESS;
 1270|  2.21M|}
igraph_vector_int_max:
 1327|  3.19k|BASE FUNCTION(igraph_vector, max)(const TYPE(igraph_vector) *v) {
 1328|  3.19k|    BASE max;
  ------------------
  |  |   66|  3.19k|    #define BASE igraph_int_t
  ------------------
 1329|  3.19k|    BASE *ptr;
  ------------------
  |  |   66|  3.19k|    #define BASE igraph_int_t
  ------------------
 1330|  3.19k|    IGRAPH_ASSERT(!FUNCTION(igraph_vector, empty)(v));
  ------------------
  |  |  924|  3.19k|    do { \
  |  |  925|  3.19k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  3.19k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.19k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  3.19k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 3.19k]
  |  |  ------------------
  ------------------
 1331|  3.19k|    max = *(v->stor_begin);
 1332|       |#if defined(BASE_IGRAPH_REAL)
 1333|       |    if (isnan(max)) { return max; }; /* Result is NaN */
 1334|       |#endif
 1335|  3.19k|    ptr = v->stor_begin + 1;
 1336|   114k|    while (ptr < v->end) {
  ------------------
  |  Branch (1336:12): [True: 111k, False: 3.19k]
  ------------------
 1337|   111k|        if ((*ptr) > max) {
  ------------------
  |  Branch (1337:13): [True: 10.1k, False: 101k]
  ------------------
 1338|  10.1k|            max = *ptr;
 1339|  10.1k|        }
 1340|       |#if defined(BASE_IGRAPH_REAL)
 1341|       |        else if (isnan(*ptr))
 1342|       |            return *ptr; /* Result is NaN */
 1343|       |#endif
 1344|   111k|        ptr++;
 1345|   111k|    }
 1346|  3.19k|    return max;
 1347|  3.19k|}
igraph_vector_int_isininterval:
 1832|  4.89k|        BASE high) {
 1833|  4.89k|    BASE *ptr;
  ------------------
  |  |   66|  4.89k|    #define BASE igraph_int_t
  ------------------
 1834|  4.89k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  4.89k|    do { \
  |  |  925|  4.89k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.89k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.89k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.89k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.89k]
  |  |  ------------------
  ------------------
 1835|  4.89k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  4.89k|    do { \
  |  |  925|  4.89k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.89k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.89k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.89k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.89k]
  |  |  ------------------
  ------------------
 1836|   161k|    for (ptr = v->stor_begin; ptr < v->end; ptr++) {
  ------------------
  |  Branch (1836:31): [True: 156k, False: 4.89k]
  ------------------
 1837|       |        /* Note that the following is not equivalent to *ptr < low || *ptr > high
 1838|       |         * when *ptr is NaN! */
 1839|   156k|        if (!(*ptr >= low && *ptr <= high)) {
  ------------------
  |  Branch (1839:15): [True: 156k, False: 0]
  |  Branch (1839:30): [True: 156k, False: 0]
  ------------------
 1840|      0|            return 0;
 1841|      0|        }
 1842|   156k|    }
 1843|  4.89k|    return 1;
 1844|  4.89k|}
igraph_vector_int_append:
 2427|  36.1k|                                               const TYPE(igraph_vector) *from) {
 2428|  36.1k|    IGRAPH_ASSERT(to != NULL);
  ------------------
  |  |  924|  36.1k|    do { \
  |  |  925|  36.1k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  36.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 36.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  36.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 36.1k]
  |  |  ------------------
  ------------------
 2429|  36.1k|    IGRAPH_ASSERT(to->stor_begin != NULL);
  ------------------
  |  |  924|  36.1k|    do { \
  |  |  925|  36.1k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  36.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 36.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  36.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 36.1k]
  |  |  ------------------
  ------------------
 2430|       |
 2431|  36.1k|    const igraph_int_t to_size = FUNCTION(igraph_vector, size)(to);
  ------------------
  |  |  178|  36.1k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  36.1k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  36.1k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2432|  36.1k|    const igraph_int_t from_size = FUNCTION(igraph_vector, size)(from);
  ------------------
  |  |  178|  36.1k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  36.1k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  36.1k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2433|  36.1k|    const igraph_int_t to_capacity = FUNCTION(igraph_vector, capacity)(to);
  ------------------
  |  |  178|  36.1k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  36.1k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  36.1k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2434|  36.1k|    igraph_int_t new_to_size;
 2435|       |
 2436|  36.1k|    IGRAPH_SAFE_ADD(to_size, from_size, &new_to_size);
  ------------------
  |  |   47|  36.1k|    do { \
  |  |   48|  36.1k|        igraph_int_t _safe_a = (a), _safe_b = (b); \
  |  |   49|  36.1k|        igraph_int_t _safe_sum; \
  |  |   50|  36.1k|        if (__builtin_add_overflow(_safe_a, _safe_b, &_safe_sum)) { \
  |  |  ------------------
  |  |  |  Branch (50:13): [True: 0, False: 36.1k]
  |  |  ------------------
  |  |   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.1k|        *(res) = _safe_sum; \
  |  |   54|  36.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (54:14): [Folded, False: 36.1k]
  |  |  ------------------
  ------------------
 2437|       |
 2438|  36.1k|    if (to_capacity < new_to_size) {
  ------------------
  |  Branch (2438:9): [True: 0, False: 36.1k]
  ------------------
 2439|      0|        igraph_int_t new_to_capacity = to_capacity < IGRAPH_INTEGER_MAX/2 ? to_capacity * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   72|      0|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
                      igraph_int_t new_to_capacity = to_capacity < IGRAPH_INTEGER_MAX/2 ? to_capacity * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   72|      0|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (2439:40): [True: 0, False: 0]
  ------------------
 2440|      0|        if (new_to_capacity < new_to_size) {
  ------------------
  |  Branch (2440:13): [True: 0, False: 0]
  ------------------
 2441|      0|            new_to_capacity = new_to_size;
 2442|      0|        }
 2443|      0|        IGRAPH_CHECK(FUNCTION(igraph_vector, reserve)(to, new_to_capacity));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2444|      0|    }
 2445|       |
 2446|  36.1k|    memcpy(to->stor_begin + to_size, from->stor_begin,
 2447|  36.1k|           sizeof(BASE) * from_size);
 2448|  36.1k|    to->end = to->stor_begin + new_to_size;
 2449|       |
 2450|  36.1k|    return IGRAPH_SUCCESS;
 2451|  36.1k|}

igraph_vector_ptr_init:
   86|    829|igraph_error_t igraph_vector_ptr_init(igraph_vector_ptr_t* v, igraph_int_t size) {
   87|    829|    igraph_int_t alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (87:31): [True: 0, False: 829]
  ------------------
   88|    829|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|    829|    do { \
  |  |  925|    829|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|    829|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 829]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|    829|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 829]
  |  |  ------------------
  ------------------
   89|    829|    if (size < 0) {
  ------------------
  |  Branch (89:9): [True: 0, False: 829]
  ------------------
   90|      0|        size = 0;
   91|      0|    }
   92|    829|    v->stor_begin = IGRAPH_CALLOC(alloc_size, void*);
  ------------------
  |  |   33|    829|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  1.65k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 829, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 829, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 829, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   93|    829|    if (v->stor_begin == 0) {
  ------------------
  |  Branch (93:9): [True: 0, False: 829]
  ------------------
   94|      0|        IGRAPH_ERROR("vector ptr init failed", IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
   95|      0|    }
   96|    829|    v->stor_end = v->stor_begin + alloc_size;
   97|    829|    v->end = v->stor_begin + size;
   98|    829|    v->item_destructor = 0;
   99|       |
  100|    829|    return IGRAPH_SUCCESS;
  101|    829|}
igraph_vector_ptr_destroy:
  132|    829|void igraph_vector_ptr_destroy(igraph_vector_ptr_t* v) {
  133|    829|    IGRAPH_ASSERT(v != 0);
  ------------------
  |  |  924|    829|    do { \
  |  |  925|    829|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|    829|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 829]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|    829|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 829]
  |  |  ------------------
  ------------------
  134|    829|    if (v->stor_begin != 0) {
  ------------------
  |  Branch (134:9): [True: 829, False: 0]
  ------------------
  135|    829|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   36|    829|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  136|       |        v->stor_begin = NULL;
  137|    829|    }
  138|    829|}
igraph_vector_ptr_size:
  291|  3.31k|igraph_int_t igraph_vector_ptr_size(const igraph_vector_ptr_t* v) {
  292|  3.31k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  3.31k|    do { \
  |  |  925|  3.31k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  3.31k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.31k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  3.31k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 3.31k]
  |  |  ------------------
  ------------------
  293|  3.31k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  3.31k|    do { \
  |  |  925|  3.31k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  3.31k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.31k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  3.31k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 3.31k]
  |  |  ------------------
  ------------------
  294|  3.31k|    return v->end - v->stor_begin;
  295|  3.31k|}
igraph_vector_ptr_push_back:
  360|    829|igraph_error_t igraph_vector_ptr_push_back(igraph_vector_ptr_t* v, void* e) {
  361|    829|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|    829|    do { \
  |  |  925|    829|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|    829|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 829]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|    829|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 829]
  |  |  ------------------
  ------------------
  362|    829|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|    829|    do { \
  |  |  925|    829|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|    829|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 829]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|    829|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 829]
  |  |  ------------------
  ------------------
  363|       |
  364|       |    /* full, allocate more storage */
  365|    829|    if (v->stor_end == v->end) {
  ------------------
  |  Branch (365:9): [True: 0, False: 829]
  ------------------
  366|      0|        igraph_int_t new_size = igraph_vector_ptr_size(v) * 2;
  367|      0|        if (new_size == 0) {
  ------------------
  |  Branch (367:13): [True: 0, False: 0]
  ------------------
  368|      0|            new_size = 1;
  369|      0|        }
  370|      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]
  |  |  ------------------
  ------------------
  371|      0|    }
  372|       |
  373|    829|    *(v->end) = e;
  374|    829|    v->end += 1;
  375|       |
  376|    829|    return IGRAPH_SUCCESS;
  377|    829|}

igraph_adjlist_init_empty:
  272|  2.40k|igraph_error_t igraph_adjlist_init_empty(igraph_adjlist_t *al, igraph_int_t no_of_nodes) {
  273|       |
  274|  2.40k|    al->length = no_of_nodes;
  275|  2.40k|    al->adjs = IGRAPH_CALLOC(al->length, igraph_vector_int_t);
  ------------------
  |  |   33|  2.40k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  4.81k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 2.40k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 2.40k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 2.40k, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  276|  2.40k|    IGRAPH_CHECK_OOM(al->adjs, "Insufficient memory for creating adjlist.");
  ------------------
  |  |  709|  2.40k|    do { \
  |  |  710|  2.40k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  2.40k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.40k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  2.40k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 2.40k]
  |  |  ------------------
  ------------------
  277|  2.40k|    IGRAPH_FINALLY(igraph_adjlist_destroy, al);
  ------------------
  |  |  603|  2.40k|    do { \
  |  |  604|  2.40k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.40k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.40k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.40k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.40k]
  |  |  ------------------
  |  |  608|  2.40k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.40k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.40k]
  |  |  ------------------
  ------------------
  278|       |
  279|   110k|    for (igraph_int_t i = 0; i < al->length; i++) {
  ------------------
  |  Branch (279:30): [True: 108k, False: 2.40k]
  ------------------
  280|   108k|        IGRAPH_CHECK(igraph_vector_int_init(&al->adjs[i], 0));
  ------------------
  |  |  656|   108k|    do { \
  |  |  657|   108k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   108k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   108k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 108k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   108k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 108k]
  |  |  ------------------
  ------------------
  281|   108k|    }
  282|       |
  283|  2.40k|    IGRAPH_FINALLY_CLEAN(1);
  284|       |
  285|  2.40k|    return IGRAPH_SUCCESS;
  286|  2.40k|}
igraph_adjlist_destroy:
  475|  2.40k|void igraph_adjlist_destroy(igraph_adjlist_t *al) {
  476|   110k|    for (igraph_int_t i = 0; i < al->length; i++) {
  ------------------
  |  Branch (476:30): [True: 108k, False: 2.40k]
  ------------------
  477|       |        /* This works if some igraph_vector_int_t's contain NULL,
  478|       |           because igraph_vector_int_destroy can handle this. */
  479|   108k|        igraph_vector_int_destroy(&al->adjs[i]);
  480|   108k|    }
  481|       |    IGRAPH_FREE(al->adjs);
  ------------------
  |  |   36|  2.40k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  482|  2.40k|}
igraph_inclist_init:
  746|  5.63k|                        igraph_loops_t loops) {
  747|  5.63k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  748|  5.63k|    igraph_vector_int_t degrees;
  749|  5.63k|    int iter = 0;
  750|       |
  751|  5.63k|    if (mode != IGRAPH_IN && mode != IGRAPH_OUT && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (751:9): [True: 5.63k, False: 0]
  |  Branch (751:30): [True: 2.48k, False: 3.15k]
  |  Branch (751:52): [True: 0, False: 2.48k]
  ------------------
  752|      0|        IGRAPH_ERROR("Cannot create incidence list view.", IGRAPH_EINVMODE);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  753|      0|    }
  754|       |
  755|  5.63k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (755:9): [True: 828, False: 4.81k]
  ------------------
  756|    828|        mode = IGRAPH_ALL;
  757|    828|    }
  758|       |
  759|  5.63k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&degrees, no_of_nodes);
  ------------------
  |  |  119|  5.63k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  5.63k|    do { \
  |  |  |  |  657|  5.63k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  5.63k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  5.63k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.63k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  5.63k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 5.63k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  5.63k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  5.63k|    do { \
  |  |  |  |  604|  5.63k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  5.63k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  5.63k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  5.63k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 5.63k]
  |  |  |  |  ------------------
  |  |  |  |  608|  5.63k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  5.63k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 5.63k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 5.63k]
  |  |  ------------------
  ------------------
  760|       |    /* igraph_degrees() is fast when loops=true */
  761|  5.63k|    IGRAPH_CHECK(igraph_degree(graph, &degrees, igraph_vss_all(), mode, IGRAPH_LOOPS));
  ------------------
  |  |  656|  5.63k|    do { \
  |  |  657|  5.63k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  5.63k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  5.63k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.63k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  5.63k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 5.63k]
  |  |  ------------------
  ------------------
  762|       |
  763|  5.63k|    il->length = no_of_nodes;
  764|  5.63k|    il->incs = IGRAPH_CALLOC(il->length, igraph_vector_int_t);
  ------------------
  |  |   33|  5.63k|#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.63k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 5.63k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 5.63k, False: 4]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  765|  5.63k|    if (il->incs == 0) {
  ------------------
  |  Branch (765:9): [True: 0, False: 5.63k]
  ------------------
  766|      0|        IGRAPH_ERROR("Cannot create incidence list view.", IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  767|      0|    }
  768|       |
  769|  5.63k|    IGRAPH_FINALLY(igraph_inclist_destroy, il);
  ------------------
  |  |  603|  5.63k|    do { \
  |  |  604|  5.63k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  5.63k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  5.63k|         * incorrect destructor function with the pointer */ \
  |  |  607|  5.63k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 5.63k]
  |  |  ------------------
  |  |  608|  5.63k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  5.63k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 5.63k]
  |  |  ------------------
  ------------------
  770|   257k|    for (igraph_int_t i = 0; i < il->length; i++) {
  ------------------
  |  Branch (770:30): [True: 252k, False: 5.63k]
  ------------------
  771|   252k|        IGRAPH_ALLOW_INTERRUPTION_LIMITED(iter, 1000);
  ------------------
  |  |   71|   252k|    do { \
  |  |   72|   252k|        if (++iter >= skips) { \
  |  |  ------------------
  |  |  |  Branch (72:13): [True: 0, False: 252k]
  |  |  ------------------
  |  |   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|   252k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (76:14): [Folded, False: 252k]
  |  |  ------------------
  ------------------
  772|       |
  773|   252k|        IGRAPH_CHECK(igraph_vector_int_init(&il->incs[i], VECTOR(degrees)[i]));
  ------------------
  |  |  656|   252k|    do { \
  |  |  657|   252k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   252k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   252k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 252k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   252k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 252k]
  |  |  ------------------
  ------------------
  774|   252k|        IGRAPH_CHECK(igraph_incident(graph, &il->incs[i], i, mode, loops));
  ------------------
  |  |  656|   252k|    do { \
  |  |  657|   252k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   252k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   252k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 252k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   252k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 252k]
  |  |  ------------------
  ------------------
  775|   252k|    }
  776|       |
  777|  5.63k|    igraph_vector_int_destroy(&degrees);
  778|  5.63k|    IGRAPH_FINALLY_CLEAN(2); /* + igraph_inclist_destroy */
  779|       |
  780|  5.63k|    return IGRAPH_SUCCESS;
  781|  5.63k|}
igraph_inclist_init_empty:
  798|  2.40k|igraph_error_t igraph_inclist_init_empty(igraph_inclist_t *il, igraph_int_t n) {
  799|  2.40k|    igraph_int_t i;
  800|       |
  801|  2.40k|    il->length = n;
  802|  2.40k|    il->incs = IGRAPH_CALLOC(il->length, igraph_vector_int_t);
  ------------------
  |  |   33|  2.40k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  4.81k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 2.40k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 2.40k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 2.40k, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  803|  2.40k|    if (il->incs == 0) {
  ------------------
  |  Branch (803:9): [True: 0, False: 2.40k]
  ------------------
  804|      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]
  |  |  ------------------
  ------------------
  805|      0|    }
  806|       |
  807|  2.40k|    IGRAPH_FINALLY(igraph_inclist_destroy, il);
  ------------------
  |  |  603|  2.40k|    do { \
  |  |  604|  2.40k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.40k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.40k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.40k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.40k]
  |  |  ------------------
  |  |  608|  2.40k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.40k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.40k]
  |  |  ------------------
  ------------------
  808|   110k|    for (i = 0; i < n; i++) {
  ------------------
  |  Branch (808:17): [True: 108k, False: 2.40k]
  ------------------
  809|   108k|        IGRAPH_CHECK(igraph_vector_int_init(&il->incs[i], 0));
  ------------------
  |  |  656|   108k|    do { \
  |  |  657|   108k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   108k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   108k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 108k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   108k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 108k]
  |  |  ------------------
  ------------------
  810|   108k|    }
  811|       |
  812|  2.40k|    IGRAPH_FINALLY_CLEAN(1);
  813|  2.40k|    return IGRAPH_SUCCESS;
  814|  2.40k|}
igraph_inclist_destroy:
  825|  8.04k|void igraph_inclist_destroy(igraph_inclist_t *il) {
  826|   368k|    for (igraph_int_t i = 0; i < il->length; i++) {
  ------------------
  |  Branch (826:30): [True: 360k, False: 8.04k]
  ------------------
  827|       |        /* This works if some igraph_vector_int_t's contain NULL,
  828|       |           because igraph_vector_int_destroy can handle this. */
  829|   360k|        igraph_vector_int_destroy(&il->incs[i]);
  830|   360k|    }
  831|       |    IGRAPH_FREE(il->incs);
  ------------------
  |  |   36|  8.04k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  832|  8.04k|}
igraph_lazy_inclist_init:
 1232|  4.97k|                             igraph_loops_t loops) {
 1233|       |
 1234|  4.97k|    if (mode != IGRAPH_IN && mode != IGRAPH_OUT && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (1234:9): [True: 4.14k, False: 829]
  |  Branch (1234:30): [True: 1.65k, False: 2.48k]
  |  Branch (1234:52): [True: 0, False: 1.65k]
  ------------------
 1235|      0|        IGRAPH_ERROR("Cannot create lazy incidence list view", IGRAPH_EINVMODE);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1236|      0|    }
 1237|       |
 1238|  4.97k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (1238:9): [True: 0, False: 4.97k]
  ------------------
 1239|      0|        mode = IGRAPH_ALL;
 1240|      0|    }
 1241|       |
 1242|  4.97k|    il->graph = graph;
 1243|  4.97k|    il->loops = loops;
 1244|  4.97k|    il->mode = mode;
 1245|       |
 1246|  4.97k|    il->length = igraph_vcount(graph);
 1247|  4.97k|    il->incs = IGRAPH_CALLOC(il->length, igraph_vector_int_t*);
  ------------------
  |  |   33|  4.97k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  9.94k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 4.97k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 4.97k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 4.96k, False: 6]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1248|  4.97k|    if (il->incs == 0) {
  ------------------
  |  Branch (1248:9): [True: 0, False: 4.97k]
  ------------------
 1249|      0|        IGRAPH_ERROR("Cannot create lazy incidence list view", IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1250|      0|    }
 1251|       |
 1252|  4.97k|    return IGRAPH_SUCCESS;
 1253|       |
 1254|  4.97k|}
igraph_lazy_inclist_destroy:
 1267|  4.97k|void igraph_lazy_inclist_destroy(igraph_lazy_inclist_t *il) {
 1268|  4.97k|    igraph_lazy_inclist_clear(il);
 1269|       |    IGRAPH_FREE(il->incs);
  ------------------
  |  |   36|  4.97k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1270|  4.97k|}
igraph_lazy_inclist_clear:
 1281|  4.97k|void igraph_lazy_inclist_clear(igraph_lazy_inclist_t *il) {
 1282|  4.97k|    igraph_int_t i, n = il->length;
 1283|   221k|    for (i = 0; i < n; i++) {
  ------------------
  |  Branch (1283:17): [True: 216k, False: 4.97k]
  ------------------
 1284|   216k|        if (il->incs[i] != 0) {
  ------------------
  |  Branch (1284:13): [True: 184k, False: 31.6k]
  ------------------
 1285|   184k|            igraph_vector_int_destroy(il->incs[i]);
 1286|       |            IGRAPH_FREE(il->incs[i]);
  ------------------
  |  |   36|   184k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1287|   184k|        }
 1288|   216k|    }
 1289|  4.97k|}
igraph_i_lazy_inclist_get_real:
 1304|   184k|igraph_vector_int_t *igraph_i_lazy_inclist_get_real(igraph_lazy_inclist_t *il, igraph_int_t no) {
 1305|   184k|    igraph_error_t ret;
 1306|       |
 1307|   184k|    if (il->incs[no] == NULL) {
  ------------------
  |  Branch (1307:9): [True: 184k, False: 0]
  ------------------
 1308|   184k|        il->incs[no] = IGRAPH_CALLOC(1, igraph_vector_int_t);
  ------------------
  |  |   33|   184k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|   369k|    (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: 184k, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1309|   184k|        if (il->incs[no] == NULL) {
  ------------------
  |  Branch (1309:13): [True: 0, False: 184k]
  ------------------
 1310|      0|            return NULL;
 1311|      0|        }
 1312|       |
 1313|   184k|        ret = igraph_vector_int_init(il->incs[no], 0);
 1314|   184k|        if (ret != IGRAPH_SUCCESS) {
  ------------------
  |  Branch (1314:13): [True: 0, False: 184k]
  ------------------
 1315|      0|            IGRAPH_FREE(il->incs[no]);
  ------------------
  |  |   36|      0|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1316|      0|            return NULL;
 1317|      0|        }
 1318|       |
 1319|   184k|        ret = igraph_incident(il->graph, il->incs[no], no, il->mode, il->loops);
 1320|   184k|        if (ret != IGRAPH_SUCCESS) {
  ------------------
  |  Branch (1320:13): [True: 0, False: 184k]
  ------------------
 1321|      0|            igraph_vector_int_destroy(il->incs[no]);
 1322|      0|            IGRAPH_FREE(il->incs[no]);
  ------------------
  |  |   36|      0|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1323|      0|            return NULL;
 1324|      0|        }
 1325|   184k|    }
 1326|       |
 1327|   184k|    return il->incs[no];
 1328|   184k|}

igraph_attribute_record_init:
  126|  2.48k|) {
  127|  2.48k|    attr->name = NULL;
  128|  2.48k|    attr->type = IGRAPH_ATTRIBUTE_UNSPECIFIED;
  129|  2.48k|    attr->value.as_raw = NULL;
  130|  2.48k|    attr->default_value.string = NULL;
  131|       |
  132|  2.48k|    IGRAPH_CHECK(igraph_attribute_record_set_name(attr, name));
  ------------------
  |  |  656|  2.48k|    do { \
  |  |  657|  2.48k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.48k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.48k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.48k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.48k]
  |  |  ------------------
  ------------------
  133|  2.48k|    IGRAPH_FINALLY(igraph_free, attr->name);
  ------------------
  |  |  603|  2.48k|    do { \
  |  |  604|  2.48k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.48k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.48k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.48k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.48k]
  |  |  ------------------
  |  |  608|  2.48k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.48k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.48k]
  |  |  ------------------
  ------------------
  134|  2.48k|    IGRAPH_CHECK(igraph_attribute_record_set_type(attr, type));
  ------------------
  |  |  656|  2.48k|    do { \
  |  |  657|  2.48k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.48k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.48k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.48k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.48k]
  |  |  ------------------
  ------------------
  135|  2.48k|    IGRAPH_FINALLY_CLEAN(1);
  136|       |
  137|  2.48k|    return IGRAPH_SUCCESS;
  138|  2.48k|}
igraph_attribute_record_destroy:
  241|  2.48k|void igraph_attribute_record_destroy(igraph_attribute_record_t *attr) {
  242|  2.48k|    igraph_i_attribute_record_destroy_values(attr);
  243|       |
  244|  2.48k|    if (attr->name) {
  ------------------
  |  Branch (244:9): [True: 2.48k, False: 0]
  ------------------
  245|  2.48k|        igraph_free(attr->name);
  246|       |        attr->name = NULL;
  247|  2.48k|    }
  248|  2.48k|}
igraph_attribute_record_check_type:
  264|    829|) {
  265|    829|    if (type != attr->type) {
  ------------------
  |  Branch (265:9): [True: 0, False: 829]
  ------------------
  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|    829|    return IGRAPH_SUCCESS;
  286|    829|}
igraph_attribute_record_size:
  295|    786|igraph_int_t igraph_attribute_record_size(const igraph_attribute_record_t *attr) {
  296|    786|    IGRAPH_ASSERT(attr != NULL);
  ------------------
  |  |  924|    786|    do { \
  |  |  925|    786|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|    786|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 786]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|    786|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 786]
  |  |  ------------------
  ------------------
  297|       |
  298|    786|    switch (attr->type) {
  299|    786|        case IGRAPH_ATTRIBUTE_NUMERIC:
  ------------------
  |  Branch (299:9): [True: 786, False: 0]
  ------------------
  300|    786|            return igraph_vector_size(attr->value.as_vector);
  301|       |
  302|      0|        case IGRAPH_ATTRIBUTE_STRING:
  ------------------
  |  Branch (302:9): [True: 0, False: 786]
  ------------------
  303|      0|            return igraph_strvector_size(attr->value.as_strvector);
  304|       |
  305|      0|        case IGRAPH_ATTRIBUTE_BOOLEAN:
  ------------------
  |  Branch (305:9): [True: 0, False: 786]
  ------------------
  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: 786]
  ------------------
  309|      0|            return 0;
  310|       |
  311|      0|        default:
  ------------------
  |  Branch (311:9): [True: 0, False: 786]
  ------------------
  312|      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]
  |  |  ------------------
  ------------------
  313|    786|    }
  314|    786|}
igraph_attribute_record_resize:
  332|  2.44k|) {
  333|  2.44k|    igraph_int_t i;
  334|  2.44k|    igraph_vector_t *vec;
  335|  2.44k|    igraph_vector_bool_t *log;
  336|  2.44k|    igraph_strvector_t *str;
  337|       |
  338|  2.44k|    IGRAPH_ASSERT(attr != NULL);
  ------------------
  |  |  924|  2.44k|    do { \
  |  |  925|  2.44k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.44k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.44k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.44k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.44k]
  |  |  ------------------
  ------------------
  339|       |
  340|  2.44k|    switch (attr->type) {
  341|       |
  342|  2.44k|        case IGRAPH_ATTRIBUTE_NUMERIC:
  ------------------
  |  Branch (342:9): [True: 2.44k, False: 0]
  ------------------
  343|  2.44k|            vec = attr->value.as_vector;
  344|  2.44k|            i = igraph_vector_size(vec);
  345|  2.44k|            IGRAPH_CHECK(igraph_vector_resize(vec, new_size));
  ------------------
  |  |  656|  2.44k|    do { \
  |  |  657|  2.44k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.44k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.44k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.44k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.44k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.44k]
  |  |  ------------------
  ------------------
  346|  41.0k|            while (i < new_size) {
  ------------------
  |  Branch (346:20): [True: 38.5k, False: 2.44k]
  ------------------
  347|  38.5k|                VECTOR(*vec)[i++] = attr->default_value.numeric;
  ------------------
  |  |   60|  38.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  348|  38.5k|            }
  349|  2.44k|            break;
  350|       |
  351|      0|        case IGRAPH_ATTRIBUTE_BOOLEAN:
  ------------------
  |  Branch (351:9): [True: 0, False: 2.44k]
  ------------------
  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.44k]
  ------------------
  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.44k]
  ------------------
  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.44k]
  ------------------
  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.44k|    }
  380|       |
  381|  2.44k|    return IGRAPH_SUCCESS;
  382|  2.44k|}
igraph_attribute_record_set_default_numeric:
  399|  2.48k|) {
  400|  2.48k|    if (attr->type != IGRAPH_ATTRIBUTE_NUMERIC) {
  ------------------
  |  Branch (400:9): [True: 0, False: 2.48k]
  ------------------
  401|      0|        return IGRAPH_EINVAL;
  402|      0|    }
  403|       |
  404|  2.48k|    attr->default_value.numeric = value;
  405|  2.48k|    return IGRAPH_SUCCESS;
  406|  2.48k|}
igraph_attribute_record_set_name:
  483|  3.31k|) {
  484|  3.31k|    char *new_name;
  485|       |
  486|  3.31k|    IGRAPH_ASSERT(attr != NULL);
  ------------------
  |  |  924|  3.31k|    do { \
  |  |  925|  3.31k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  3.31k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.31k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  3.31k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 3.31k]
  |  |  ------------------
  ------------------
  487|       |
  488|  3.31k|    if (name != NULL) {
  ------------------
  |  Branch (488:9): [True: 2.48k, False: 829]
  ------------------
  489|  2.48k|        new_name = strdup(name);
  490|  2.48k|        IGRAPH_CHECK_OOM(new_name, "Insufficient memory for allocating attribute name.");
  ------------------
  |  |  709|  2.48k|    do { \
  |  |  710|  2.48k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  2.48k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.48k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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.48k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 2.48k]
  |  |  ------------------
  ------------------
  491|  2.48k|    } else {
  492|    829|        new_name = NULL;
  493|    829|    }
  494|       |
  495|  3.31k|    if (attr->name) {
  ------------------
  |  Branch (495:9): [True: 0, False: 3.31k]
  ------------------
  496|      0|        igraph_free(attr->name);
  497|      0|    }
  498|       |
  499|  3.31k|    attr->name = new_name;
  500|       |
  501|  3.31k|    return IGRAPH_SUCCESS;
  502|  3.31k|}
igraph_attribute_record_set_type:
  539|  3.31k|) {
  540|  3.31k|    void *ptr;
  541|       |
  542|  3.31k|    IGRAPH_ASSERT(attr != NULL);
  ------------------
  |  |  924|  3.31k|    do { \
  |  |  925|  3.31k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  3.31k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.31k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  3.31k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 3.31k]
  |  |  ------------------
  ------------------
  543|       |
  544|  3.31k|    if (attr->type != type) {
  ------------------
  |  Branch (544:9): [True: 2.48k, False: 829]
  ------------------
  545|  2.48k|        switch (type) {
  546|  2.48k|            case IGRAPH_ATTRIBUTE_NUMERIC: {
  ------------------
  |  Branch (546:13): [True: 2.48k, False: 0]
  ------------------
  547|  2.48k|                igraph_vector_t *vec = IGRAPH_CALLOC(1, igraph_vector_t);
  ------------------
  |  |   33|  2.48k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  4.97k|    (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.48k, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  548|  2.48k|                IGRAPH_CHECK_OOM(vec, "Insufficient memory for attribute record.");
  ------------------
  |  |  709|  2.48k|    do { \
  |  |  710|  2.48k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  2.48k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.48k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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.48k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 2.48k]
  |  |  ------------------
  ------------------
  549|  2.48k|                IGRAPH_FINALLY(igraph_free, vec);
  ------------------
  |  |  603|  2.48k|    do { \
  |  |  604|  2.48k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.48k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.48k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.48k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.48k]
  |  |  ------------------
  |  |  608|  2.48k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.48k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.48k]
  |  |  ------------------
  ------------------
  550|  2.48k|                IGRAPH_VECTOR_INIT_FINALLY(vec, 0);
  ------------------
  |  |  104|  2.48k|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.48k|    do { \
  |  |  |  |  657|  2.48k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.48k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.48k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.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|  2.48k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.48k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  2.48k|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.48k|    do { \
  |  |  |  |  604|  2.48k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.48k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.48k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.48k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.48k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.48k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.48k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.48k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (105:60): [Folded, False: 2.48k]
  |  |  ------------------
  ------------------
  551|  2.48k|                ptr = vec;
  552|  2.48k|            }
  553|      0|            break;
  554|       |
  555|      0|            case IGRAPH_ATTRIBUTE_STRING: {
  ------------------
  |  Branch (555:13): [True: 0, False: 2.48k]
  ------------------
  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.48k]
  ------------------
  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.48k]
  ------------------
  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.48k|        }
  576|       |
  577|  2.48k|        igraph_i_attribute_record_set_type(attr, type, ptr);
  578|  2.48k|        IGRAPH_FINALLY_CLEAN(2);
  579|  2.48k|    }
  580|       |
  581|  3.31k|    return IGRAPH_SUCCESS;
  582|  3.31k|}
igraph_i_attribute_init:
  617|  2.53k|) {
  618|  2.53k|    graph->attr = NULL;
  619|  2.53k|    if (igraph_i_attribute_table) {
  ------------------
  |  Branch (619:9): [True: 2.53k, False: 0]
  ------------------
  620|  2.53k|        IGRAPH_CHECK(igraph_i_attribute_table->init(graph, attr));
  ------------------
  |  |  656|  2.53k|    do { \
  |  |  657|  2.53k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.53k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.53k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.53k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.53k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.53k]
  |  |  ------------------
  ------------------
  621|  2.53k|        if (graph->attr == NULL) {
  ------------------
  |  Branch (621:13): [True: 0, False: 2.53k]
  ------------------
  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.53k|    }
  625|  2.53k|    return IGRAPH_SUCCESS;
  626|  2.53k|}
igraph_i_attribute_destroy:
  628|  4.18k|void igraph_i_attribute_destroy(igraph_t *graph) {
  629|  4.18k|    if (graph->attr && igraph_i_attribute_table) {
  ------------------
  |  Branch (629:9): [True: 4.18k, False: 0]
  |  Branch (629:24): [True: 4.18k, False: 0]
  ------------------
  630|  4.18k|        igraph_i_attribute_table->destroy(graph);
  631|  4.18k|    }
  632|       |    graph->attr = NULL;
  633|  4.18k|}
igraph_i_attribute_copy:
  636|  1.65k|                            igraph_bool_t va, igraph_bool_t ea) {
  637|  1.65k|    igraph_i_attribute_destroy(to);
  638|  1.65k|    if (from->attr && igraph_i_attribute_table) {
  ------------------
  |  Branch (638:9): [True: 1.65k, False: 0]
  |  Branch (638:23): [True: 1.65k, False: 0]
  ------------------
  639|  1.65k|        IGRAPH_CHECK(igraph_i_attribute_table->copy(to, from, ga, va, ea));
  ------------------
  |  |  656|  1.65k|    do { \
  |  |  657|  1.65k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.65k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.65k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.65k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.65k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.65k]
  |  |  ------------------
  ------------------
  640|  1.65k|        if (to->attr == NULL) {
  ------------------
  |  Branch (640:13): [True: 0, False: 1.65k]
  ------------------
  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.65k|    }
  644|  1.65k|    return IGRAPH_SUCCESS;
  645|  1.65k|}
igraph_i_attribute_add_vertices:
  649|  3.18k|) {
  650|  3.18k|    if (igraph_i_attribute_table) {
  ------------------
  |  Branch (650:9): [True: 3.18k, False: 0]
  ------------------
  651|  3.18k|        return igraph_i_attribute_table->add_vertices(graph, nv, attr);
  652|  3.18k|    } else {
  653|      0|        return IGRAPH_SUCCESS;
  654|      0|    }
  655|  3.18k|}
igraph_i_attribute_add_edges:
  690|  2.36k|) {
  691|  2.36k|    if (igraph_i_attribute_table) {
  ------------------
  |  Branch (691:9): [True: 2.36k, False: 0]
  ------------------
  692|  2.36k|        return igraph_i_attribute_table->add_edges(graph, edges, attr);
  693|  2.36k|    } else {
  694|      0|        return IGRAPH_SUCCESS;
  695|      0|    }
  696|  2.36k|}
igraph_i_attribute_combine_edges:
  714|  1.65k|                                     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.65k|    IGRAPH_ASSERT(graph != newgraph);
  ------------------
  |  |  924|  1.65k|    do { \
  |  |  925|  1.65k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.65k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.65k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.65k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.65k]
  |  |  ------------------
  ------------------
  719|  1.65k|    if (igraph_i_attribute_table) {
  ------------------
  |  Branch (719:9): [True: 1.65k, False: 0]
  ------------------
  720|  1.65k|        return igraph_i_attribute_table->combine_edges(graph, newgraph,
  721|  1.65k|                merges,
  722|  1.65k|                comb);
  723|  1.65k|    } else {
  724|      0|        return IGRAPH_SUCCESS;
  725|      0|    }
  726|  1.65k|}
igraph_set_attribute_table:
  895|    872|igraph_set_attribute_table(const igraph_attribute_table_t * table) {
  896|    872|    igraph_attribute_table_t *old = igraph_i_attribute_table;
  897|    872|    igraph_i_attribute_table = (igraph_attribute_table_t*) table;
  898|    872|    return old;
  899|    872|}
igraph_has_attribute_table:
  901|  1.65k|igraph_bool_t igraph_has_attribute_table(void) {
  902|       |    return igraph_i_attribute_table != NULL;
  903|  1.65k|}
igraph_attribute_combination_init:
  915|    829|igraph_error_t igraph_attribute_combination_init(igraph_attribute_combination_t *comb) {
  916|    829|    IGRAPH_CHECK(igraph_vector_ptr_init(&comb->list, 0));
  ------------------
  |  |  656|    829|    do { \
  |  |  657|    829|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    829|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    829|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 829]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    829|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 829]
  |  |  ------------------
  ------------------
  917|    829|    return IGRAPH_SUCCESS;
  918|    829|}
igraph_attribute_combination_destroy:
  929|    829|void igraph_attribute_combination_destroy(igraph_attribute_combination_t *comb) {
  930|    829|    igraph_int_t i, n = igraph_vector_ptr_size(&comb->list);
  931|  1.65k|    for (i = 0; i < n; i++) {
  ------------------
  |  Branch (931:17): [True: 829, False: 829]
  ------------------
  932|    829|        igraph_attribute_combination_record_t *rec = VECTOR(comb->list)[i];
  ------------------
  |  |   60|    829|#define VECTOR(v) ((v).stor_begin)
  ------------------
  933|    829|        if (rec->name) {
  ------------------
  |  Branch (933:13): [True: 829, False: 0]
  ------------------
  934|    829|            IGRAPH_FREE(rec->name);
  ------------------
  |  |   36|    829|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  935|    829|        }
  936|       |        IGRAPH_FREE(rec);
  ------------------
  |  |   36|    829|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  937|    829|    }
  938|    829|    igraph_vector_ptr_destroy(&comb->list);
  939|    829|}
igraph_attribute_combination_add:
  968|    829|                                     igraph_function_pointer_t func) {
  969|    829|    igraph_int_t i, n = igraph_vector_ptr_size(&comb->list);
  970|       |
  971|       |    /* Search, in case it is already there */
  972|    829|    for (i = 0; i < n; i++) {
  ------------------
  |  Branch (972:17): [True: 0, False: 829]
  ------------------
  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|    829|    if (i == n) {
  ------------------
  |  Branch (983:9): [True: 829, False: 0]
  ------------------
  984|       |        /* This is a new attribute name */
  985|    829|        igraph_attribute_combination_record_t *rec =
  986|    829|            IGRAPH_CALLOC(1, igraph_attribute_combination_record_t);
  ------------------
  |  |   33|    829|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  1.65k|    (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: 829, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  987|    829|        if (! rec) {
  ------------------
  |  Branch (987:13): [True: 0, False: 829]
  ------------------
  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|    829|        IGRAPH_FINALLY(igraph_free, rec);
  ------------------
  |  |  603|    829|    do { \
  |  |  604|    829|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    829|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    829|         * incorrect destructor function with the pointer */ \
  |  |  607|    829|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 829]
  |  |  ------------------
  |  |  608|    829|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    829|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 829]
  |  |  ------------------
  ------------------
  992|    829|        if (! name) {
  ------------------
  |  Branch (992:13): [True: 0, False: 829]
  ------------------
  993|      0|            rec->name = NULL;
  994|    829|        } else {
  995|    829|            rec->name = strdup(name);
  996|    829|            if (! rec->name) {
  ------------------
  |  Branch (996:17): [True: 0, False: 829]
  ------------------
  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|    829|        }
 1001|    829|        IGRAPH_FINALLY(igraph_free, (char *) rec->name); /* free() is safe on NULL */
  ------------------
  |  |  603|    829|    do { \
  |  |  604|    829|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    829|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    829|         * incorrect destructor function with the pointer */ \
  |  |  607|    829|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 829]
  |  |  ------------------
  |  |  608|    829|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    829|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 829]
  |  |  ------------------
  ------------------
 1002|    829|        rec->type = type;
 1003|    829|        rec->func = func;
 1004|       |
 1005|    829|        IGRAPH_CHECK(igraph_vector_ptr_push_back(&comb->list, rec));
  ------------------
  |  |  656|    829|    do { \
  |  |  657|    829|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    829|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    829|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 829]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    829|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 829]
  |  |  ------------------
  ------------------
 1006|    829|        IGRAPH_FINALLY_CLEAN(2); /* ownership of 'rec' transferred to 'comb->list' */
 1007|       |
 1008|    829|    }
 1009|       |
 1010|    829|    return IGRAPH_SUCCESS;
 1011|    829|}
igraph_attribute_combination_query:
 1058|  1.65k|                                       igraph_function_pointer_t *func) {
 1059|  1.65k|    igraph_int_t i, def = -1, len = igraph_vector_ptr_size(&comb->list);
 1060|       |
 1061|  1.65k|    for (i = 0; i < len; i++) {
  ------------------
  |  Branch (1061:17): [True: 1.65k, False: 0]
  ------------------
 1062|  1.65k|        igraph_attribute_combination_record_t *rec = VECTOR(comb->list)[i];
  ------------------
  |  |   60|  1.65k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1063|  1.65k|        const char *n = rec->name;
 1064|  1.65k|        if ( (!name && !n) ||
  ------------------
  |  Branch (1064:15): [True: 0, False: 1.65k]
  |  Branch (1064:24): [True: 0, False: 0]
  ------------------
 1065|  1.65k|             (name && n && !strcmp(n, name)) ) {
  ------------------
  |  Branch (1065:15): [True: 1.65k, False: 0]
  |  Branch (1065:23): [True: 1.65k, False: 0]
  |  Branch (1065:28): [True: 1.65k, False: 0]
  ------------------
 1066|  1.65k|            *type = rec->type;
 1067|  1.65k|            *func = rec->func;
 1068|  1.65k|            return IGRAPH_SUCCESS;
 1069|  1.65k|        }
 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.65k|}
igraph_attribute_combination:
 1111|    829|        igraph_attribute_combination_t *comb, ...) {
 1112|       |
 1113|    829|    va_list ap;
 1114|       |
 1115|    829|    IGRAPH_CHECK(igraph_attribute_combination_init(comb));
  ------------------
  |  |  656|    829|    do { \
  |  |  657|    829|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    829|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    829|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 829]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    829|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 829]
  |  |  ------------------
  ------------------
 1116|       |
 1117|    829|    va_start(ap, comb);
 1118|  1.65k|    while (true) {
  ------------------
  |  Branch (1118:12): [True: 1.65k, Folded]
  ------------------
 1119|  1.65k|        igraph_function_pointer_t func = NULL;
 1120|  1.65k|        igraph_attribute_combination_type_t type;
 1121|  1.65k|        const char *name;
 1122|       |
 1123|  1.65k|        name = va_arg(ap, const char *);
 1124|       |
 1125|  1.65k|        if (name == IGRAPH_NO_MORE_ATTRIBUTES) {
  ------------------
  |  |  214|  1.65k|#define IGRAPH_NO_MORE_ATTRIBUTES ((const char*)0)
  ------------------
  |  Branch (1125:13): [True: 829, False: 829]
  ------------------
 1126|    829|            break;
 1127|    829|        }
 1128|       |
 1129|    829|        type = (igraph_attribute_combination_type_t) va_arg(ap, int);
 1130|    829|        if (type == IGRAPH_ATTRIBUTE_COMBINE_FUNCTION) {
  ------------------
  |  Branch (1130:13): [True: 0, False: 829]
  ------------------
 1131|      0|            func = va_arg(ap, igraph_function_pointer_t);
 1132|      0|        }
 1133|       |
 1134|    829|        if (strlen(name) == 0) {
  ------------------
  |  Branch (1134:13): [True: 0, False: 829]
  ------------------
 1135|      0|            name = 0;
 1136|      0|        }
 1137|       |
 1138|    829|        igraph_error_t ret = igraph_attribute_combination_add(comb, name, type, func);
 1139|    829|        if (ret != IGRAPH_SUCCESS) {
  ------------------
  |  Branch (1139:13): [True: 0, False: 829]
  ------------------
 1140|      0|            va_end(ap);
 1141|      0|            return ret;
 1142|      0|        }
 1143|    829|    }
 1144|       |
 1145|    829|    va_end(ap);
 1146|       |
 1147|    829|    return IGRAPH_SUCCESS;
 1148|    829|}
attributes.c:igraph_i_attribute_record_destroy_values:
  185|  4.97k|static void igraph_i_attribute_record_destroy_values(igraph_attribute_record_t *attr) {
  186|  4.97k|    IGRAPH_ASSERT(attr != NULL);
  ------------------
  |  |  924|  4.97k|    do { \
  |  |  925|  4.97k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.97k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.97k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.97k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.97k]
  |  |  ------------------
  ------------------
  187|       |
  188|  4.97k|    if (attr->value.as_raw) {
  ------------------
  |  Branch (188:9): [True: 2.48k, False: 2.48k]
  ------------------
  189|  2.48k|        switch (attr->type) {
  190|  2.48k|            case IGRAPH_ATTRIBUTE_NUMERIC:
  ------------------
  |  Branch (190:13): [True: 2.48k, False: 0]
  ------------------
  191|  2.48k|                igraph_vector_destroy(attr->value.as_vector);
  192|  2.48k|                break;
  193|       |
  194|      0|            case IGRAPH_ATTRIBUTE_STRING:
  ------------------
  |  Branch (194:13): [True: 0, False: 2.48k]
  ------------------
  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.48k]
  ------------------
  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.48k]
  ------------------
  203|      0|                break;
  204|  2.48k|        }
  205|       |
  206|  2.48k|        igraph_free(attr->value.as_raw);
  207|  2.48k|        attr->value.as_raw = NULL;
  208|  2.48k|    }
  209|       |
  210|  4.97k|    switch (attr->type) {
  211|  2.48k|        case IGRAPH_ATTRIBUTE_NUMERIC:
  ------------------
  |  Branch (211:9): [True: 2.48k, False: 2.48k]
  ------------------
  212|  2.48k|            attr->default_value.numeric = 0;
  213|  2.48k|            break;
  214|       |
  215|      0|        case IGRAPH_ATTRIBUTE_STRING:
  ------------------
  |  Branch (215:9): [True: 0, False: 4.97k]
  ------------------
  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.97k]
  ------------------
  223|      0|            attr->default_value.boolean = 0;
  224|      0|            break;
  225|       |
  226|  2.48k|        default:
  ------------------
  |  Branch (226:9): [True: 2.48k, False: 2.48k]
  ------------------
  227|  2.48k|            break;
  228|  4.97k|    }
  229|       |
  230|  4.97k|    attr->type = IGRAPH_ATTRIBUTE_UNSPECIFIED;
  231|  4.97k|}
attributes.c:igraph_i_attribute_record_set_type:
  506|  2.48k|) {
  507|  2.48k|    bool type_changed = attr->type != type;
  508|       |
  509|  2.48k|    if (type_changed || attr->value.as_raw != ptr) {
  ------------------
  |  Branch (509:9): [True: 2.48k, False: 0]
  |  Branch (509:25): [True: 0, False: 0]
  ------------------
  510|  2.48k|        igraph_i_attribute_record_destroy_values(attr);
  511|  2.48k|        attr->type = type;
  512|  2.48k|        attr->value.as_raw = ptr;
  513|  2.48k|    }
  514|       |
  515|  2.48k|    if (type_changed && type == IGRAPH_ATTRIBUTE_NUMERIC) {
  ------------------
  |  Branch (515:9): [True: 2.48k, False: 0]
  |  Branch (515:25): [True: 2.48k, False: 0]
  ------------------
  516|  2.48k|        IGRAPH_ASSERT(
  ------------------
  |  |  924|  2.48k|    do { \
  |  |  925|  2.48k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.48k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.48k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.48k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.48k]
  |  |  ------------------
  ------------------
  517|  2.48k|            igraph_attribute_record_set_default_numeric(attr, IGRAPH_NAN) == IGRAPH_SUCCESS
  518|  2.48k|        );
  519|  2.48k|    }
  520|  2.48k|}
attributes.c:igraph_i_attribute_record_list_init_item:
  596|    829|) {
  597|    829|    IGRAPH_UNUSED(list);
  ------------------
  |  |   30|    829|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
  598|       |    return igraph_attribute_record_init(item, NULL, IGRAPH_ATTRIBUTE_UNSPECIFIED);
  599|    829|}
attributes.c:igraph_i_attribute_record_list_destroy_item:
  607|  2.48k|static void igraph_i_attribute_record_list_destroy_item(igraph_attribute_record_t* item) {
  608|  2.48k|    igraph_attribute_record_destroy(item);
  609|  2.48k|}

igraph_i_property_cache_init:
   32|  2.53k|igraph_error_t igraph_i_property_cache_init(igraph_i_property_cache_t *cache) {
   33|  2.53k|    IGRAPH_STATIC_ASSERT(IGRAPH_PROP_I_SIZE <= 32);
  ------------------
  |  |   68|  2.53k|#define IGRAPH_STATIC_ASSERT(condition) ((void)sizeof(char[1 - 2*!(condition)]))
  ------------------
   34|       |
   35|  2.53k|    memset(cache->value, 0, sizeof(cache->value));
   36|  2.53k|    cache->known = 0;
   37|  2.53k|    return IGRAPH_SUCCESS;
   38|  2.53k|}
igraph_i_property_cache_destroy:
   53|  2.53k|void igraph_i_property_cache_destroy(igraph_i_property_cache_t *cache) {
   54|  2.53k|    IGRAPH_UNUSED(cache);
  ------------------
  |  |   30|  2.53k|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
   55|       |    /* Nothing to do */
   56|  2.53k|}
igraph_i_property_cache_get_bool:
   72|  1.65k|igraph_bool_t igraph_i_property_cache_get_bool(const igraph_t *graph, igraph_cached_property_t prop) {
   73|  1.65k|    IGRAPH_ASSERT(prop >= 0 && prop < IGRAPH_PROP_I_SIZE);
  ------------------
  |  |  924|  1.65k|    do { \
  |  |  925|  1.65k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  3.31k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.65k]
  |  |  |  |  |  Branch (612:52): [True: 1.65k, False: 0]
  |  |  |  |  |  Branch (612:52): [True: 1.65k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.65k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.65k]
  |  |  ------------------
  ------------------
   74|  1.65k|    assert(graph->cache != NULL);
  ------------------
  |  Branch (74:5): [True: 0, False: 1.65k]
  |  Branch (74:5): [True: 1.65k, False: 0]
  ------------------
   75|  1.65k|    return graph->cache->value[prop];
   76|  1.65k|}
igraph_i_property_cache_has:
   84|  3.31k|igraph_bool_t igraph_i_property_cache_has(const igraph_t *graph, igraph_cached_property_t prop) {
   85|  3.31k|    IGRAPH_ASSERT(prop >= 0 && prop < IGRAPH_PROP_I_SIZE);
  ------------------
  |  |  924|  3.31k|    do { \
  |  |  925|  3.31k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  6.63k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.31k]
  |  |  |  |  |  Branch (612:52): [True: 3.31k, False: 0]
  |  |  |  |  |  Branch (612:52): [True: 3.31k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  3.31k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 3.31k]
  |  |  ------------------
  ------------------
   86|  3.31k|    assert(graph->cache != NULL);
  ------------------
  |  Branch (86:5): [True: 0, False: 3.31k]
  |  Branch (86:5): [True: 3.31k, False: 0]
  ------------------
   87|  3.31k|    return graph->cache->known & (1 << prop);
   88|  3.31k|}
igraph_i_property_cache_set_bool:
   97|  1.65k|void igraph_i_property_cache_set_bool(const igraph_t *graph, igraph_cached_property_t prop, igraph_bool_t value) {
   98|  1.65k|    IGRAPH_ASSERT(prop >= 0 && prop < IGRAPH_PROP_I_SIZE);
  ------------------
  |  |  924|  1.65k|    do { \
  |  |  925|  1.65k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  3.31k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.65k]
  |  |  |  |  |  Branch (612:52): [True: 1.65k, False: 0]
  |  |  |  |  |  Branch (612:52): [True: 1.65k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.65k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.65k]
  |  |  ------------------
  ------------------
   99|  1.65k|    assert(graph->cache != NULL);
  ------------------
  |  Branch (99:5): [True: 0, False: 1.65k]
  |  Branch (99:5): [True: 1.65k, 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.65k|    graph->cache->value[prop] = value;
  104|  1.65k|    graph->cache->known |= (1 << prop);
  105|  1.65k|}
igraph_i_property_cache_set_bool_checked:
  123|  1.65k|void igraph_i_property_cache_set_bool_checked(const igraph_t *graph, igraph_cached_property_t prop, igraph_bool_t value) {
  124|  1.65k|    IGRAPH_ASSERT(prop >= 0 && prop < IGRAPH_PROP_I_SIZE);
  ------------------
  |  |  924|  1.65k|    do { \
  |  |  925|  1.65k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  3.31k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.65k]
  |  |  |  |  |  Branch (612:52): [True: 1.65k, False: 0]
  |  |  |  |  |  Branch (612:52): [True: 1.65k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.65k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.65k]
  |  |  ------------------
  ------------------
  125|  1.65k|    assert(graph->cache != NULL);
  ------------------
  |  Branch (125:5): [True: 0, False: 1.65k]
  |  Branch (125:5): [True: 1.65k, 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.65k|    if (graph->cache->known & (1 << prop)) {
  ------------------
  |  Branch (129:9): [True: 0, False: 1.65k]
  ------------------
  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.65k|    } else {
  132|  1.65k|        igraph_i_property_cache_set_bool(graph, prop, value);
  133|  1.65k|    }
  134|  1.65k|}
igraph_i_property_cache_invalidate_conditionally:
  182|  5.54k|) {
  183|  5.54k|    uint32_t invalidate = ~keep_always;
  184|  5.54k|    uint32_t mask;
  185|  5.54k|    uint32_t maybe_keep;
  186|  5.54k|    igraph_bool_t cached_value;
  187|       |
  188|  5.54k|    assert(graph->cache != NULL);
  ------------------
  |  Branch (188:5): [True: 0, False: 5.54k]
  |  Branch (188:5): [True: 5.54k, 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.54k|    maybe_keep = graph->cache->known & invalidate & (keep_when_false | keep_when_true);
  197|       |
  198|  5.54k|    if (maybe_keep) {
  ------------------
  |  Branch (198:9): [True: 0, False: 5.54k]
  ------------------
  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.54k|    graph->cache->known &= ~invalidate;
  216|  5.54k|}

igraph_cattribute_EANV:
 2226|    829|                           igraph_es_t eids, igraph_vector_t *result) {
 2227|    829|    igraph_vector_clear(result);
 2228|    829|    return igraph_i_cattribute_get_numeric_edge_attr(graph, name, eids, result);
 2229|    829|}
igraph_cattribute_EAN_setv:
 2734|    829|                               const igraph_vector_t *v) {
 2735|    829|    igraph_i_cattributes_t *attr = graph->attr;
 2736|    829|    igraph_attribute_record_t *rec;
 2737|    829|    igraph_int_t ne = igraph_ecount(graph);
 2738|       |
 2739|       |    /* Check length first */
 2740|    829|    if (igraph_vector_size(v) != ne) {
  ------------------
  |  Branch (2740:9): [True: 0, False: 829]
  ------------------
 2741|      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]
  |  |  ------------------
  ------------------
 2742|      0|    }
 2743|       |
 2744|    829|    IGRAPH_CHECK(igraph_i_cattribute_find_or_create(&attr->eal, name, IGRAPH_ATTRIBUTE_NUMERIC, ne, &rec));
  ------------------
  |  |  656|    829|    do { \
  |  |  657|    829|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    829|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    829|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 829]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    829|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 829]
  |  |  ------------------
  ------------------
 2745|    829|    IGRAPH_CHECK(igraph_vector_update(rec->value.as_vector, v));
  ------------------
  |  |  656|    829|    do { \
  |  |  657|    829|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    829|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    829|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 829]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    829|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 829]
  |  |  ------------------
  ------------------
 2746|       |
 2747|    829|    return IGRAPH_SUCCESS;
 2748|    829|}
igraph_cattribute_remove_e:
 2870|    829|void igraph_cattribute_remove_e(igraph_t *graph, const char *name) {
 2871|       |
 2872|    829|    igraph_i_cattributes_t *attr = graph->attr;
 2873|    829|    igraph_attribute_record_list_t *eal = &attr->eal;
 2874|    829|    igraph_int_t j = igraph_i_cattribute_find_index(eal, name);
 2875|       |
 2876|    829|    if (j >= 0) {
  ------------------
  |  Branch (2876:9): [True: 829, False: 0]
  ------------------
 2877|    829|        igraph_attribute_record_list_discard(eal, j);
 2878|    829|    } else {
 2879|      0|        IGRAPH_WARNING("Cannot remove non-existent graph attribute");
  ------------------
  |  |  797|      0|    do { \
  |  |  798|      0|        igraph_warning(reason, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  799|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (799:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2880|      0|    }
 2881|    829|}
cattributes.c:igraph_i_cattribute_init:
  195|  2.53k|) {
  196|  2.53k|    igraph_i_cattributes_t *nattr;
  197|       |
  198|  2.53k|    nattr = IGRAPH_CALLOC(1, igraph_i_cattributes_t);
  ------------------
  |  |   33|  2.53k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  5.06k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 0, Folded]
  |  |  |  |  |  Branch (31:24): [True: 0, Folded]
  |  |  |  |  |  Branch (31:66): [True: 2.53k, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  199|  2.53k|    IGRAPH_CHECK_OOM(nattr, "Insufficient memory to allocate attribute storage.");
  ------------------
  |  |  709|  2.53k|    do { \
  |  |  710|  2.53k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  2.53k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.53k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  2.53k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 2.53k]
  |  |  ------------------
  ------------------
  200|  2.53k|    IGRAPH_FINALLY(igraph_free, nattr);
  ------------------
  |  |  603|  2.53k|    do { \
  |  |  604|  2.53k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.53k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.53k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.53k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.53k]
  |  |  ------------------
  |  |  608|  2.53k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.53k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.53k]
  |  |  ------------------
  ------------------
  201|       |
  202|  2.53k|    if (attr) {
  ------------------
  |  Branch (202:9): [True: 0, False: 2.53k]
  ------------------
  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.53k|    } else {
  205|  2.53k|        IGRAPH_CHECK(igraph_attribute_record_list_init(&nattr->gal, 0));
  ------------------
  |  |  656|  2.53k|    do { \
  |  |  657|  2.53k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.53k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.53k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.53k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.53k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.53k]
  |  |  ------------------
  ------------------
  206|  2.53k|    }
  207|  2.53k|    IGRAPH_FINALLY(igraph_attribute_record_list_destroy, &nattr->gal);
  ------------------
  |  |  603|  2.53k|    do { \
  |  |  604|  2.53k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.53k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.53k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.53k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.53k]
  |  |  ------------------
  |  |  608|  2.53k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.53k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.53k]
  |  |  ------------------
  ------------------
  208|       |
  209|  2.53k|    IGRAPH_CHECK(igraph_attribute_record_list_init(&nattr->val, 0));
  ------------------
  |  |  656|  2.53k|    do { \
  |  |  657|  2.53k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.53k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.53k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.53k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.53k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.53k]
  |  |  ------------------
  ------------------
  210|  2.53k|    IGRAPH_FINALLY(igraph_attribute_record_list_destroy, &nattr->val);
  ------------------
  |  |  603|  2.53k|    do { \
  |  |  604|  2.53k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.53k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.53k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.53k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.53k]
  |  |  ------------------
  |  |  608|  2.53k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.53k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.53k]
  |  |  ------------------
  ------------------
  211|       |
  212|  2.53k|    IGRAPH_CHECK(igraph_attribute_record_list_init(&nattr->eal, 0));
  ------------------
  |  |  656|  2.53k|    do { \
  |  |  657|  2.53k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.53k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.53k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.53k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.53k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.53k]
  |  |  ------------------
  ------------------
  213|  2.53k|    IGRAPH_FINALLY(igraph_attribute_record_list_destroy, &nattr->eal);
  ------------------
  |  |  603|  2.53k|    do { \
  |  |  604|  2.53k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.53k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.53k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.53k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.53k]
  |  |  ------------------
  |  |  608|  2.53k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.53k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.53k]
  |  |  ------------------
  ------------------
  214|       |
  215|  2.53k|    graph->attr = nattr;
  216|  2.53k|    IGRAPH_FINALLY_CLEAN(4);
  217|       |
  218|  2.53k|    return IGRAPH_SUCCESS;
  219|  2.53k|}
cattributes.c:igraph_i_cattribute_destroy:
  221|  4.18k|static void igraph_i_cattribute_destroy(igraph_t *graph) {
  222|  4.18k|    igraph_i_cattributes_t *attr = graph->attr;
  223|  4.18k|    igraph_attribute_record_list_destroy(&attr->eal);
  224|  4.18k|    igraph_attribute_record_list_destroy(&attr->val);
  225|  4.18k|    igraph_attribute_record_list_destroy(&attr->gal);
  226|       |    IGRAPH_FREE(graph->attr); /* sets to NULL */
  ------------------
  |  |   36|  4.18k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  227|  4.18k|}
cattributes.c:igraph_i_cattribute_copy:
  235|  1.65k|) {
  236|  1.65k|    igraph_i_cattributes_t *attrto, *attrfrom = from->attr;
  237|  1.65k|    igraph_attribute_record_list_t *alto[3], *alfrom[3] = {
  238|  1.65k|        &attrfrom->gal, &attrfrom->val, &attrfrom->eal
  239|  1.65k|    };
  240|  1.65k|    igraph_bool_t copy[3] = { ga, va, ea };
  241|       |
  242|  1.65k|    attrto = IGRAPH_CALLOC(1, igraph_i_cattributes_t);
  ------------------
  |  |   33|  1.65k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  3.31k|    (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.65k, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  243|  1.65k|    IGRAPH_CHECK_OOM(attrto, "Insufficient memory to copy attributes.");
  ------------------
  |  |  709|  1.65k|    do { \
  |  |  710|  1.65k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  1.65k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.65k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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.65k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 1.65k]
  |  |  ------------------
  ------------------
  244|  1.65k|    IGRAPH_FINALLY(igraph_free, attrto);
  ------------------
  |  |  603|  1.65k|    do { \
  |  |  604|  1.65k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  1.65k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  1.65k|         * incorrect destructor function with the pointer */ \
  |  |  607|  1.65k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 1.65k]
  |  |  ------------------
  |  |  608|  1.65k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  1.65k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 1.65k]
  |  |  ------------------
  ------------------
  245|       |
  246|  1.65k|    alto[0] = &attrto->gal;
  247|  1.65k|    alto[1] = &attrto->val;
  248|  1.65k|    alto[2] = &attrto->eal;
  249|       |
  250|  6.63k|    for (igraph_int_t i = 0; i < 3; i++) {
  ------------------
  |  Branch (250:30): [True: 4.97k, False: 1.65k]
  ------------------
  251|  4.97k|        if (copy[i]) {
  ------------------
  |  Branch (251:13): [True: 3.31k, False: 1.65k]
  ------------------
  252|  3.31k|            IGRAPH_CHECK(igraph_attribute_record_list_init_copy(alto[i], alfrom[i]));
  ------------------
  |  |  656|  3.31k|    do { \
  |  |  657|  3.31k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  3.31k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  3.31k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.31k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  3.31k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 3.31k]
  |  |  ------------------
  ------------------
  253|  3.31k|        } else {
  254|  1.65k|            IGRAPH_CHECK(igraph_attribute_record_list_init(alto[i], 0));
  ------------------
  |  |  656|  1.65k|    do { \
  |  |  657|  1.65k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.65k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.65k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.65k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.65k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.65k]
  |  |  ------------------
  ------------------
  255|  1.65k|        }
  256|  4.97k|        IGRAPH_FINALLY(igraph_attribute_record_list_destroy, alto[i]);
  ------------------
  |  |  603|  4.97k|    do { \
  |  |  604|  4.97k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  4.97k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  4.97k|         * incorrect destructor function with the pointer */ \
  |  |  607|  4.97k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 4.97k]
  |  |  ------------------
  |  |  608|  4.97k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  4.97k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 4.97k]
  |  |  ------------------
  ------------------
  257|  4.97k|    }
  258|       |
  259|  1.65k|    to->attr = attrto;
  260|  1.65k|    IGRAPH_FINALLY_CLEAN(4);
  261|       |
  262|  1.65k|    return IGRAPH_SUCCESS;
  263|  1.65k|}
cattributes.c:igraph_i_cattribute_add_vertices:
  373|  3.18k|) {
  374|  3.18k|    igraph_i_cattributes_t *attr = graph->attr;
  375|  3.18k|    return igraph_i_cattribute_add_vertices_or_edges(&attr->val, igraph_vcount(graph), nv, nattr);
  376|  3.18k|}
cattributes.c:igraph_i_cattribute_add_vertices_or_edges:
  344|  5.54k|) {
  345|  5.54k|    igraph_int_t origlen = newlen - nv;
  346|  5.54k|    igraph_error_t err = igraph_i_cattribute_add_vertices_or_edges_inner(
  347|  5.54k|        val, newlen, nv, nattr
  348|  5.54k|    );
  349|       |
  350|  5.54k|    if (err != IGRAPH_SUCCESS) {
  ------------------
  |  Branch (350:9): [True: 0, False: 5.54k]
  ------------------
  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.54k|    return err;
  368|  5.54k|}
cattributes.c:igraph_i_cattribute_add_vertices_or_edges_inner:
  269|  5.54k|) {
  270|  5.54k|    igraph_int_t length;
  271|  5.54k|    igraph_int_t nattrno = nattr == NULL ? 0 : igraph_attribute_record_list_size(nattr);
  ------------------
  |  Branch (271:28): [True: 5.54k, False: 0]
  ------------------
  272|  5.54k|    igraph_int_t origlen = newlen - nv;
  273|       |
  274|  5.54k|    IGRAPH_ASSERT(origlen >= 0);
  ------------------
  |  |  924|  5.54k|    do { \
  |  |  925|  5.54k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  5.54k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.54k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  5.54k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 5.54k]
  |  |  ------------------
  ------------------
  275|       |
  276|       |    /* Find all the attributes that are newly added, and create new value vectors
  277|       |     * for them in the original graph */
  278|  5.54k|    for (igraph_int_t i = 0; i < nattrno; i++) {
  ------------------
  |  Branch (278:30): [True: 0, False: 5.54k]
  ------------------
  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.54k|    length = igraph_attribute_record_list_size(val);
  286|  5.54k|    for (igraph_int_t i = 0; i < length; i++) {
  ------------------
  |  Branch (286:30): [True: 0, False: 5.54k]
  ------------------
  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.54k|    return IGRAPH_SUCCESS;
  338|  5.54k|}
cattributes.c:igraph_i_cattribute_combine_attribute_record_lists:
 1270|  1.65k|) {
 1271|  1.65k|    igraph_int_t no_attrs = igraph_attribute_record_list_size(attrs);
 1272|  1.65k|    igraph_attribute_combination_todo_item_t *todo_items;
 1273|       |
 1274|  1.65k|    IGRAPH_ASSERT(attrs != new_attrs);
  ------------------
  |  |  924|  1.65k|    do { \
  |  |  925|  1.65k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.65k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.65k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.65k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.65k]
  |  |  ------------------
  ------------------
 1275|  1.65k|    IGRAPH_ASSERT(igraph_attribute_record_list_empty(new_attrs));
  ------------------
  |  |  924|  1.65k|    do { \
  |  |  925|  1.65k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.65k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.65k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.65k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.65k]
  |  |  ------------------
  ------------------
 1276|       |
 1277|  1.65k|    todo_items = IGRAPH_CALLOC(no_attrs, igraph_attribute_combination_todo_item_t);
  ------------------
  |  |   33|  1.65k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  3.31k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 1.65k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 1.65k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 1.65k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1278|  1.65k|    IGRAPH_CHECK_OOM(todo_items, "Cannot combine attributes.");
  ------------------
  |  |  709|  1.65k|    do { \
  |  |  710|  1.65k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  1.65k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.65k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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.65k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 1.65k]
  |  |  ------------------
  ------------------
 1279|  1.65k|    IGRAPH_FINALLY(igraph_free, todo_items);
  ------------------
  |  |  603|  1.65k|    do { \
  |  |  604|  1.65k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  1.65k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  1.65k|         * incorrect destructor function with the pointer */ \
  |  |  607|  1.65k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 1.65k]
  |  |  ------------------
  |  |  608|  1.65k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  1.65k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 1.65k]
  |  |  ------------------
  ------------------
 1280|       |
 1281|  3.31k|    for (igraph_int_t i = 0; i < no_attrs; i++) {
  ------------------
  |  Branch (1281:30): [True: 1.65k, False: 1.65k]
  ------------------
 1282|  1.65k|        const igraph_attribute_record_t *oldrec = igraph_attribute_record_list_get_ptr(attrs, i);
 1283|  1.65k|        const char *name = oldrec->name;
 1284|  1.65k|        igraph_attribute_combination_type_t type;
 1285|  1.65k|        igraph_function_pointer_t voidfunc;
 1286|  1.65k|        IGRAPH_CHECK(igraph_attribute_combination_query(comb, name, &type, &voidfunc));
  ------------------
  |  |  656|  1.65k|    do { \
  |  |  657|  1.65k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.65k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.65k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.65k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.65k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.65k]
  |  |  ------------------
  ------------------
 1287|  1.65k|        todo_items[i].type = type;
 1288|  1.65k|        todo_items[i].func.as_void = voidfunc;
 1289|  1.65k|    }
 1290|       |
 1291|  1.65k|    IGRAPH_FINALLY(igraph_attribute_record_list_clear, new_attrs);
  ------------------
  |  |  603|  1.65k|    do { \
  |  |  604|  1.65k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  1.65k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  1.65k|         * incorrect destructor function with the pointer */ \
  |  |  607|  1.65k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 1.65k]
  |  |  ------------------
  |  |  608|  1.65k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  1.65k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 1.65k]
  |  |  ------------------
  ------------------
 1292|       |
 1293|  3.31k|    for (igraph_int_t i = 0; i < no_attrs; i++) {
  ------------------
  |  Branch (1293:30): [True: 1.65k, False: 1.65k]
  ------------------
 1294|  1.65k|        const igraph_attribute_record_t *oldrec = igraph_attribute_record_list_get_ptr(attrs, i);
 1295|  1.65k|        igraph_attribute_record_t newrec;
 1296|  1.65k|        const char *name = oldrec->name;
 1297|  1.65k|        igraph_attribute_combination_todo_item_t todo_item = todo_items[i];
 1298|  1.65k|        igraph_attribute_type_t attr_type = oldrec->type;
 1299|       |
 1300|  1.65k|        if (todo_item.type == IGRAPH_ATTRIBUTE_COMBINE_DEFAULT ||
  ------------------
  |  Branch (1300:13): [True: 0, False: 1.65k]
  ------------------
 1301|  1.65k|            todo_item.type == IGRAPH_ATTRIBUTE_COMBINE_IGNORE) {
  ------------------
  |  Branch (1301:13): [True: 0, False: 1.65k]
  ------------------
 1302|      0|            continue;
 1303|      0|        }
 1304|       |
 1305|  1.65k|        IGRAPH_CHECK(igraph_attribute_record_init(&newrec, name, attr_type));
  ------------------
  |  |  656|  1.65k|    do { \
  |  |  657|  1.65k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.65k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.65k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.65k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.65k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.65k]
  |  |  ------------------
  ------------------
 1306|  1.65k|        IGRAPH_FINALLY(igraph_attribute_record_destroy, &newrec);
  ------------------
  |  |  603|  1.65k|    do { \
  |  |  604|  1.65k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  1.65k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  1.65k|         * incorrect destructor function with the pointer */ \
  |  |  607|  1.65k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 1.65k]
  |  |  ------------------
  |  |  608|  1.65k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  1.65k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 1.65k]
  |  |  ------------------
  ------------------
 1307|       |
 1308|  1.65k|        IGRAPH_CHECK(igraph_attribute_record_resize(&newrec, igraph_vector_int_list_size(merges)));
  ------------------
  |  |  656|  1.65k|    do { \
  |  |  657|  1.65k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.65k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.65k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.65k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.65k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.65k]
  |  |  ------------------
  ------------------
 1309|       |
 1310|  1.65k|        if (attr_type == IGRAPH_ATTRIBUTE_NUMERIC) {
  ------------------
  |  Branch (1310:13): [True: 1.65k, False: 0]
  ------------------
 1311|  1.65k|            switch (todo_item.type) {
 1312|      0|            case IGRAPH_ATTRIBUTE_COMBINE_FUNCTION:
  ------------------
  |  Branch (1312:13): [True: 0, False: 1.65k]
  ------------------
 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.65k|            case IGRAPH_ATTRIBUTE_COMBINE_SUM:
  ------------------
  |  Branch (1316:13): [True: 1.65k, False: 0]
  ------------------
 1317|  1.65k|                IGRAPH_CHECK(igraph_i_cattributes_cn_sum(oldrec, &newrec, merges));
  ------------------
  |  |  656|  1.65k|    do { \
  |  |  657|  1.65k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.65k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.65k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.65k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.65k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.65k]
  |  |  ------------------
  ------------------
 1318|  1.65k|                break;
 1319|  1.65k|            case IGRAPH_ATTRIBUTE_COMBINE_PROD:
  ------------------
  |  Branch (1319:13): [True: 0, False: 1.65k]
  ------------------
 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.65k]
  ------------------
 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.65k]
  ------------------
 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.65k]
  ------------------
 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.65k]
  ------------------
 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.65k]
  ------------------
 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.65k]
  ------------------
 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.65k]
  ------------------
 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.65k]
  ------------------
 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.65k]
  ------------------
 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.65k|            }
 1353|  1.65k|        } 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.65k|        IGRAPH_CHECK(igraph_attribute_record_list_push_back(new_attrs, &newrec));
  ------------------
  |  |  656|  1.65k|    do { \
  |  |  657|  1.65k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.65k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.65k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.65k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.65k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.65k]
  |  |  ------------------
  ------------------
 1440|  1.65k|        IGRAPH_FINALLY_CLEAN(1);  /* ownership of newrec transferred */
 1441|  1.65k|    }
 1442|       |
 1443|  1.65k|    IGRAPH_FREE(todo_items);
  ------------------
  |  |   36|  1.65k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1444|  1.65k|    IGRAPH_FINALLY_CLEAN(2);
 1445|       |
 1446|  1.65k|    return IGRAPH_SUCCESS;
 1447|  1.65k|}
cattributes.c:igraph_i_cattributes_cn_sum:
  689|  1.65k|                                       const igraph_vector_int_list_t *merges) {
  690|  1.65k|    const igraph_vector_t *oldv = oldrec->value.as_vector;
  691|  1.65k|    igraph_vector_t *newv = newrec->value.as_vector;
  692|  1.65k|    igraph_int_t newlen = igraph_vector_int_list_size(merges);
  693|       |
  694|  21.6k|    for (igraph_int_t i = 0; i < newlen; i++) {
  ------------------
  |  Branch (694:30): [True: 20.0k, False: 1.65k]
  ------------------
  695|  20.0k|        igraph_real_t s = 0.0;
  696|  20.0k|        const igraph_vector_int_t *idx = igraph_vector_int_list_get_ptr(merges, i);
  697|  20.0k|        igraph_int_t n = igraph_vector_int_size(idx);
  698|  48.4k|        for (igraph_int_t j = 0; j < n; j++) {
  ------------------
  |  Branch (698:34): [True: 28.3k, False: 20.0k]
  ------------------
  699|  28.3k|            igraph_int_t x = VECTOR(*idx)[j];
  ------------------
  |  |   60|  28.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  700|  28.3k|            s += VECTOR(*oldv)[x];
  ------------------
  |  |   60|  28.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  701|  28.3k|        }
  702|  20.0k|        VECTOR(*newv)[i] = s;
  ------------------
  |  |   60|  20.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  703|  20.0k|    }
  704|       |
  705|  1.65k|    return IGRAPH_SUCCESS;
  706|  1.65k|}
cattributes.c:igraph_i_cattribute_add_edges:
 1463|  2.36k|) {
 1464|  2.36k|    igraph_int_t ne = igraph_vector_int_size(edges) / 2;
 1465|  2.36k|    igraph_i_cattributes_t *attr = graph->attr;
 1466|  2.36k|    return igraph_i_cattribute_add_vertices_or_edges(&attr->eal, igraph_ecount(graph), ne, nattr);
 1467|  2.36k|}
cattributes.c:igraph_i_cattribute_combine_edges:
 1484|  1.65k|) {
 1485|  1.65k|    igraph_i_cattributes_t *attr = graph->attr;
 1486|  1.65k|    igraph_i_cattributes_t *toattr = newgraph->attr;
 1487|  1.65k|    return igraph_i_cattribute_combine_attribute_record_lists(
 1488|  1.65k|        &attr->eal, &toattr->eal, merges, comb
 1489|  1.65k|    );
 1490|  1.65k|}
cattributes.c:igraph_i_cattribute_find_or_return:
  113|    829|) {
  114|    829|    igraph_attribute_record_t *rec;
  115|       |
  116|    829|    rec = igraph_i_cattribute_find(attrs, name, IGRAPH_ATTRIBUTE_UNSPECIFIED);
  117|    829|    if (!rec) {
  ------------------
  |  Branch (117:9): [True: 0, False: 829]
  ------------------
  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|    829|    if (type != IGRAPH_ATTRIBUTE_UNSPECIFIED) {
  ------------------
  |  Branch (121:9): [True: 829, False: 0]
  ------------------
  122|    829|        IGRAPH_CHECK(igraph_attribute_record_check_type(rec, type));
  ------------------
  |  |  656|    829|    do { \
  |  |  657|    829|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    829|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    829|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 829]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    829|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 829]
  |  |  ------------------
  ------------------
  123|    829|    }
  124|       |
  125|    829|    if (ptr) {
  ------------------
  |  Branch (125:9): [True: 829, False: 0]
  ------------------
  126|    829|        *ptr = rec;
  127|    829|    }
  128|       |
  129|    829|    return IGRAPH_SUCCESS;
  130|    829|}
cattributes.c:igraph_i_cattribute_get_numeric_edge_attr:
 1717|    829|) {
 1718|    829|    igraph_i_cattributes_t *attr = graph->attr;
 1719|    829|    igraph_attribute_record_list_t *eal = &attr->eal;
 1720|    829|    igraph_attribute_record_t *rec;
 1721|    829|    const igraph_vector_t *num;
 1722|       |
 1723|    829|    IGRAPH_CHECK(igraph_i_cattribute_find_or_return(eal, name, IGRAPH_ATTRIBUTE_NUMERIC, &rec));
  ------------------
  |  |  656|    829|    do { \
  |  |  657|    829|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    829|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    829|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 829]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    829|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 829]
  |  |  ------------------
  ------------------
 1724|       |
 1725|    829|    num = rec->value.as_vector;
 1726|    829|    if (igraph_es_is_all(&es)) {
  ------------------
  |  Branch (1726:9): [True: 829, False: 0]
  ------------------
 1727|    829|        IGRAPH_CHECK(igraph_vector_append(value, num));
  ------------------
  |  |  656|    829|    do { \
  |  |  657|    829|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    829|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    829|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 829]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    829|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 829]
  |  |  ------------------
  ------------------
 1728|    829|    } else {
 1729|      0|        igraph_eit_t it;
 1730|      0|        igraph_int_t i = igraph_vector_size(value);
 1731|      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]
  |  |  ------------------
  ------------------
 1732|      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]
  |  |  ------------------
  ------------------
 1733|      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]
  |  |  ------------------
  ------------------
 1734|      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 (1734:16): [True: 0, False: 0]
  ------------------
 1735|      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)
  |  |  ------------------
  ------------------
 1736|      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)
  ------------------
 1737|      0|        }
 1738|      0|        igraph_eit_destroy(&it);
 1739|      0|        IGRAPH_FINALLY_CLEAN(1);
 1740|      0|    }
 1741|       |
 1742|    829|    return IGRAPH_SUCCESS;
 1743|    829|}
cattributes.c:igraph_i_cattribute_find:
   69|  1.65k|) {
   70|  1.65k|    igraph_int_t index = igraph_i_cattribute_find_index(attrs, name);
   71|  1.65k|    igraph_attribute_record_t *rec;
   72|       |
   73|  1.65k|    if (index >= 0) {
  ------------------
  |  Branch (73:9): [True: 829, False: 829]
  ------------------
   74|    829|        rec = igraph_attribute_record_list_get_ptr(attrs, index);
   75|    829|        if (type == IGRAPH_ATTRIBUTE_UNSPECIFIED || type == rec->type) {
  ------------------
  |  Branch (75:13): [True: 829, False: 0]
  |  Branch (75:53): [True: 0, False: 0]
  ------------------
   76|    829|            return rec;
   77|    829|        }
   78|    829|    }
   79|       |
   80|    829|    return NULL;
   81|  1.65k|}
cattributes.c:igraph_i_cattribute_find_or_create:
  147|    829|) {
  148|    829|    igraph_attribute_record_t *rec;
  149|       |
  150|    829|    rec = igraph_i_cattribute_find(attrs, name, IGRAPH_ATTRIBUTE_UNSPECIFIED);
  151|    829|    if (rec) {
  ------------------
  |  Branch (151:9): [True: 0, False: 829]
  ------------------
  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|    829|    } else {
  156|    829|        IGRAPH_CHECK(igraph_attribute_record_list_push_back_new(attrs, &rec));
  ------------------
  |  |  656|    829|    do { \
  |  |  657|    829|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    829|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    829|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 829]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    829|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 829]
  |  |  ------------------
  ------------------
  157|    829|        IGRAPH_CHECK(igraph_attribute_record_set_name(rec, name));
  ------------------
  |  |  656|    829|    do { \
  |  |  657|    829|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    829|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    829|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 829]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    829|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 829]
  |  |  ------------------
  ------------------
  158|    829|        IGRAPH_CHECK(igraph_attribute_record_set_type(rec, type));
  ------------------
  |  |  656|    829|    do { \
  |  |  657|    829|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    829|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    829|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 829]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    829|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 829]
  |  |  ------------------
  ------------------
  159|    829|    }
  160|       |
  161|    829|    if (length > 0 && igraph_attribute_record_size(rec) < length) {
  ------------------
  |  Branch (161:9): [True: 786, False: 43]
  |  Branch (161:23): [True: 786, False: 0]
  ------------------
  162|    786|        IGRAPH_CHECK(igraph_attribute_record_resize(rec, length));
  ------------------
  |  |  656|    786|    do { \
  |  |  657|    786|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    786|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    786|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 786]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    786|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 786]
  |  |  ------------------
  ------------------
  163|    786|    }
  164|       |
  165|    829|    if (ptr) {
  ------------------
  |  Branch (165:9): [True: 829, False: 0]
  ------------------
  166|    829|        *ptr = rec;
  167|    829|    }
  168|       |
  169|    829|    return IGRAPH_SUCCESS;
  170|    829|}
cattributes.c:igraph_i_cattribute_find_index:
   49|  2.48k|) {
   50|  2.48k|    igraph_int_t n = igraph_attribute_record_list_size(attrs);
   51|  2.48k|    for (igraph_int_t i = 0; i < n; i++) {
  ------------------
  |  Branch (51:30): [True: 1.65k, False: 829]
  ------------------
   52|  1.65k|        const igraph_attribute_record_t *rec = igraph_attribute_record_list_get_ptr(attrs, i);
   53|  1.65k|        if (!strcmp(rec->name, name)) {
  ------------------
  |  Branch (53:13): [True: 1.65k, False: 0]
  ------------------
   54|  1.65k|            return i;
   55|  1.65k|        }
   56|  1.65k|    }
   57|    829|    return -1;
   58|  2.48k|}

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

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

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

igraph_almost_equals:
   46|    828|igraph_bool_t igraph_almost_equals(double a, double b, double eps) {
   47|    828|    return igraph_cmp_epsilon(a, b, eps) == 0;
   48|    828|}
igraph_cmp_epsilon:
   97|  1.43M|int igraph_cmp_epsilon(double a, double b, double eps) {
   98|  1.43M|    double diff;
   99|  1.43M|    double abs_diff;
  100|  1.43M|    double sum;
  101|       |
  102|  1.43M|    if (a == b) {
  ------------------
  |  Branch (102:9): [True: 170k, False: 1.26M]
  ------------------
  103|       |        /* shortcut, handles infinities */
  104|   170k|        return 0;
  105|   170k|    }
  106|       |
  107|  1.26M|    diff = a - b;
  108|  1.26M|    abs_diff = fabs(diff);
  109|  1.26M|    sum = fabs(a) + fabs(b);
  110|       |
  111|  1.26M|    if (a == 0 || b == 0 || sum < DBL_MIN) {
  ------------------
  |  Branch (111:9): [True: 108k, False: 1.15M]
  |  Branch (111:19): [True: 0, False: 1.15M]
  |  Branch (111:29): [True: 0, False: 1.15M]
  ------------------
  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|   108k|        return abs_diff < (eps * DBL_MIN) ? 0 : (diff < 0 ? -1 : 1);
  ------------------
  |  Branch (115:16): [True: 0, False: 108k]
  |  Branch (115:50): [True: 108k, False: 0]
  ------------------
  116|  1.15M|    } else if (!isfinite(sum)) {
  ------------------
  |  Branch (116:16): [True: 0, False: 1.15M]
  ------------------
  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|  1.15M|    } else {
  121|  1.15M|        return (abs_diff / sum < eps) ? 0 : (diff < 0 ? -1 : 1);
  ------------------
  |  Branch (121:16): [True: 1.89k, False: 1.15M]
  |  Branch (121:46): [True: 136k, False: 1.01M]
  ------------------
  122|  1.15M|    }
  123|  1.26M|}

igraph_to_undirected:
  498|    829|                         const igraph_attribute_combination_t *edge_comb) {
  499|       |
  500|    829|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  501|    829|    igraph_int_t no_of_edges = igraph_ecount(graph);
  502|    829|    igraph_vector_int_t edges;
  503|    829|    igraph_t newgraph;
  504|    829|    igraph_bool_t attr = edge_comb && igraph_has_attribute_table();
  ------------------
  |  Branch (504:26): [True: 829, False: 0]
  |  Branch (504:39): [True: 829, False: 0]
  ------------------
  505|       |
  506|    829|    if (mode != IGRAPH_TO_UNDIRECTED_EACH &&
  ------------------
  |  Branch (506:9): [True: 829, False: 0]
  ------------------
  507|    829|        mode != IGRAPH_TO_UNDIRECTED_COLLAPSE &&
  ------------------
  |  Branch (507:9): [True: 0, False: 829]
  ------------------
  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|    829|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (512:9): [True: 0, False: 829]
  ------------------
  513|      0|        return IGRAPH_SUCCESS;
  514|      0|    }
  515|       |
  516|    829|    IGRAPH_VECTOR_INT_INIT_FINALLY(&edges, 0);
  ------------------
  |  |  119|    829|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    829|    do { \
  |  |  |  |  657|    829|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    829|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    829|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 829]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    829|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 829]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|    829|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    829|    do { \
  |  |  |  |  604|    829|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    829|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    829|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    829|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 829]
  |  |  |  |  ------------------
  |  |  |  |  608|    829|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    829|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 829]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 829]
  |  |  ------------------
  ------------------
  517|       |
  518|    829|    if (mode == IGRAPH_TO_UNDIRECTED_EACH) {
  ------------------
  |  Branch (518:9): [True: 0, False: 829]
  ------------------
  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|    829|    } else if (mode == IGRAPH_TO_UNDIRECTED_COLLAPSE) {
  ------------------
  |  Branch (549:16): [True: 829, False: 0]
  ------------------
  550|    829|        igraph_vector_int_t inadj, outadj;
  551|    829|        igraph_vector_int_t mergeinto;
  552|    829|        igraph_int_t actedge = 0;
  553|       |
  554|    829|        if (attr) {
  ------------------
  |  Branch (554:13): [True: 829, False: 0]
  ------------------
  555|    829|            IGRAPH_VECTOR_INT_INIT_FINALLY(&mergeinto, no_of_edges);
  ------------------
  |  |  119|    829|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    829|    do { \
  |  |  |  |  657|    829|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    829|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    829|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 829]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    829|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 829]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|    829|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    829|    do { \
  |  |  |  |  604|    829|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    829|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    829|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    829|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 829]
  |  |  |  |  ------------------
  |  |  |  |  608|    829|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    829|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 829]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 829]
  |  |  ------------------
  ------------------
  556|    829|        }
  557|       |
  558|    829|        IGRAPH_CHECK(igraph_vector_int_reserve(&edges, no_of_edges * 2));
  ------------------
  |  |  656|    829|    do { \
  |  |  657|    829|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    829|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    829|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 829]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    829|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 829]
  |  |  ------------------
  ------------------
  559|    829|        IGRAPH_VECTOR_INT_INIT_FINALLY(&inadj, 0);
  ------------------
  |  |  119|    829|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    829|    do { \
  |  |  |  |  657|    829|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    829|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    829|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 829]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    829|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 829]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|    829|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    829|    do { \
  |  |  |  |  604|    829|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    829|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    829|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    829|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 829]
  |  |  |  |  ------------------
  |  |  |  |  608|    829|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    829|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 829]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 829]
  |  |  ------------------
  ------------------
  560|    829|        IGRAPH_VECTOR_INT_INIT_FINALLY(&outadj, 0);
  ------------------
  |  |  119|    829|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    829|    do { \
  |  |  |  |  657|    829|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    829|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    829|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 829]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    829|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 829]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|    829|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    829|    do { \
  |  |  |  |  604|    829|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    829|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    829|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    829|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 829]
  |  |  |  |  ------------------
  |  |  |  |  608|    829|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    829|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 829]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 829]
  |  |  ------------------
  ------------------
  561|       |
  562|  36.9k|        for (igraph_int_t i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (562:34): [True: 36.1k, False: 829]
  ------------------
  563|  36.1k|            igraph_int_t n_out, n_in;
  564|  36.1k|            igraph_int_t p1 = -1, p2 = -1;
  565|  36.1k|            igraph_int_t e1 = 0, e2 = 0, n1 = 0, n2 = 0, last;
  566|  36.1k|            IGRAPH_CHECK(igraph_incident(graph, &outadj, i, IGRAPH_OUT, IGRAPH_LOOPS));
  ------------------
  |  |  656|  36.1k|    do { \
  |  |  657|  36.1k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  36.1k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  36.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 36.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  36.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 36.1k]
  |  |  ------------------
  ------------------
  567|  36.1k|            IGRAPH_CHECK(igraph_incident(graph, &inadj, i, IGRAPH_IN, IGRAPH_LOOPS));
  ------------------
  |  |  656|  36.1k|    do { \
  |  |  657|  36.1k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  36.1k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  36.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 36.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  36.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 36.1k]
  |  |  ------------------
  ------------------
  568|  36.1k|            n_out = igraph_vector_int_size(&outadj);
  569|  36.1k|            n_in = igraph_vector_int_size(&inadj);
  570|       |
  571|  36.1k|#define STEPOUT() if ( (++p1) < n_out) {    \
  572|  36.1k|        e1 = VECTOR(outadj)[p1]; \
  573|  36.1k|        n1 = IGRAPH_TO(graph, e1);      \
  574|  36.1k|    }
  575|  36.1k|#define STEPIN()  if ( (++p2) < n_in) {         \
  576|  36.1k|        e2 = VECTOR(inadj )[p2]; \
  577|  36.1k|        n2 = IGRAPH_FROM(graph, e2);        \
  578|  36.1k|    }
  579|  36.1k|#define ADD_NEW_EDGE() { \
  580|  36.1k|    IGRAPH_CHECK(igraph_vector_int_push_back(&edges, i)); \
  581|  36.1k|    IGRAPH_CHECK(igraph_vector_int_push_back(&edges, last)); \
  582|  36.1k|}
  583|  36.1k|#define MERGE_INTO_CURRENT_EDGE(which) { \
  584|  36.1k|    if (attr) { \
  585|  36.1k|        VECTOR(mergeinto)[which] = actedge; \
  586|  36.1k|    } \
  587|  36.1k|}
  588|       |
  589|  36.1k|            STEPOUT();
  ------------------
  |  |  571|  36.1k|#define STEPOUT() if ( (++p1) < n_out) {    \
  |  |  ------------------
  |  |  |  Branch (571:24): [True: 5.49k, False: 30.6k]
  |  |  ------------------
  |  |  572|  5.49k|        e1 = VECTOR(outadj)[p1]; \
  |  |  ------------------
  |  |  |  |   60|  5.49k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  573|  5.49k|        n1 = IGRAPH_TO(graph, e1);      \
  |  |  ------------------
  |  |  |  |  128|  5.49k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  5.49k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  574|  5.49k|    }
  ------------------
  590|  36.1k|            STEPIN();
  ------------------
  |  |  575|  36.1k|#define STEPIN()  if ( (++p2) < n_in) {         \
  |  |  ------------------
  |  |  |  Branch (575:24): [True: 6.05k, False: 30.0k]
  |  |  ------------------
  |  |  576|  6.05k|        e2 = VECTOR(inadj )[p2]; \
  |  |  ------------------
  |  |  |  |   60|  6.05k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  577|  6.05k|        n2 = IGRAPH_FROM(graph, e2);        \
  |  |  ------------------
  |  |  |  |  115|  6.05k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  6.05k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  578|  6.05k|    }
  ------------------
  591|       |
  592|  39.6k|            while (p1 < n_out && n1 <= i && p2 < n_in && n2 <= i) {
  ------------------
  |  Branch (592:20): [True: 8.33k, False: 31.3k]
  |  Branch (592:34): [True: 5.75k, False: 2.58k]
  |  Branch (592:45): [True: 4.19k, False: 1.56k]
  |  Branch (592:58): [True: 3.52k, False: 668]
  ------------------
  593|  3.52k|                last = (n1 <= n2) ? n1 : n2;
  ------------------
  |  Branch (593:24): [True: 2.15k, False: 1.37k]
  ------------------
  594|  3.52k|                ADD_NEW_EDGE();
  ------------------
  |  |  579|  3.52k|#define ADD_NEW_EDGE() { \
  |  |  580|  3.52k|    IGRAPH_CHECK(igraph_vector_int_push_back(&edges, i)); \
  |  |  ------------------
  |  |  |  |  656|  3.52k|    do { \
  |  |  |  |  657|  3.52k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  3.52k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  3.52k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.52k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  3.52k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 3.52k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  581|  3.52k|    IGRAPH_CHECK(igraph_vector_int_push_back(&edges, last)); \
  |  |  ------------------
  |  |  |  |  656|  3.52k|    do { \
  |  |  |  |  657|  3.52k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  3.52k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  3.52k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.52k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  3.52k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 3.52k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  582|  3.52k|}
  ------------------
  595|  8.53k|                while (p1 < n_out && last == n1) {
  ------------------
  |  Branch (595:24): [True: 7.84k, False: 689]
  |  Branch (595:38): [True: 5.00k, False: 2.83k]
  ------------------
  596|  5.00k|                    MERGE_INTO_CURRENT_EDGE(e1);
  ------------------
  |  |  583|  5.00k|#define MERGE_INTO_CURRENT_EDGE(which) { \
  |  |  584|  5.00k|    if (attr) { \
  |  |  ------------------
  |  |  |  Branch (584:9): [True: 5.00k, False: 0]
  |  |  ------------------
  |  |  585|  5.00k|        VECTOR(mergeinto)[which] = actedge; \
  |  |  ------------------
  |  |  |  |   60|  5.00k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  586|  5.00k|    } \
  |  |  587|  5.00k|}
  ------------------
  597|  5.00k|                    STEPOUT();
  ------------------
  |  |  571|  5.00k|#define STEPOUT() if ( (++p1) < n_out) {    \
  |  |  ------------------
  |  |  |  Branch (571:24): [True: 4.32k, False: 689]
  |  |  ------------------
  |  |  572|  4.32k|        e1 = VECTOR(outadj)[p1]; \
  |  |  ------------------
  |  |  |  |   60|  4.32k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  573|  4.32k|        n1 = IGRAPH_TO(graph, e1);      \
  |  |  ------------------
  |  |  |  |  128|  4.32k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  4.32k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  574|  4.32k|    }
  ------------------
  598|  5.00k|                }
  599|  9.46k|                while (p2 < n_in && last == n2) {
  ------------------
  |  Branch (599:24): [True: 8.79k, False: 672]
  |  Branch (599:37): [True: 5.94k, False: 2.85k]
  ------------------
  600|  5.94k|                    MERGE_INTO_CURRENT_EDGE(e2);
  ------------------
  |  |  583|  5.94k|#define MERGE_INTO_CURRENT_EDGE(which) { \
  |  |  584|  5.94k|    if (attr) { \
  |  |  ------------------
  |  |  |  Branch (584:9): [True: 5.94k, False: 0]
  |  |  ------------------
  |  |  585|  5.94k|        VECTOR(mergeinto)[which] = actedge; \
  |  |  ------------------
  |  |  |  |   60|  5.94k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  586|  5.94k|    } \
  |  |  587|  5.94k|}
  ------------------
  601|  5.94k|                    STEPIN();
  ------------------
  |  |  575|  5.94k|#define STEPIN()  if ( (++p2) < n_in) {         \
  |  |  ------------------
  |  |  |  Branch (575:24): [True: 5.27k, False: 672]
  |  |  ------------------
  |  |  576|  5.27k|        e2 = VECTOR(inadj )[p2]; \
  |  |  ------------------
  |  |  |  |   60|  5.27k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  577|  5.27k|        n2 = IGRAPH_FROM(graph, e2);        \
  |  |  ------------------
  |  |  |  |  115|  5.27k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  5.27k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  578|  5.27k|    }
  ------------------
  602|  5.94k|                }
  603|  3.52k|                actedge++;
  604|  3.52k|            }
  605|       |
  606|  38.7k|            while (p1 < n_out && n1 <= i) {
  ------------------
  |  Branch (606:20): [True: 5.74k, False: 33.0k]
  |  Branch (606:34): [True: 2.68k, False: 3.05k]
  ------------------
  607|  2.68k|                last = n1;
  608|  2.68k|                ADD_NEW_EDGE();
  ------------------
  |  |  579|  2.68k|#define ADD_NEW_EDGE() { \
  |  |  580|  2.68k|    IGRAPH_CHECK(igraph_vector_int_push_back(&edges, i)); \
  |  |  ------------------
  |  |  |  |  656|  2.68k|    do { \
  |  |  |  |  657|  2.68k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.68k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.68k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.68k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.68k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.68k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  581|  2.68k|    IGRAPH_CHECK(igraph_vector_int_push_back(&edges, last)); \
  |  |  ------------------
  |  |  |  |  656|  2.68k|    do { \
  |  |  |  |  657|  2.68k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.68k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.68k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.68k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.68k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.68k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  582|  2.68k|}
  ------------------
  609|  7.05k|                while (p1 < n_out && last == n1) {
  ------------------
  |  Branch (609:24): [True: 5.29k, False: 1.75k]
  |  Branch (609:38): [True: 4.36k, False: 932]
  ------------------
  610|  4.36k|                    MERGE_INTO_CURRENT_EDGE(e1);
  ------------------
  |  |  583|  4.36k|#define MERGE_INTO_CURRENT_EDGE(which) { \
  |  |  584|  4.36k|    if (attr) { \
  |  |  ------------------
  |  |  |  Branch (584:9): [True: 4.36k, False: 0]
  |  |  ------------------
  |  |  585|  4.36k|        VECTOR(mergeinto)[which] = actedge; \
  |  |  ------------------
  |  |  |  |   60|  4.36k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  586|  4.36k|    } \
  |  |  587|  4.36k|}
  ------------------
  611|  4.36k|                    STEPOUT();
  ------------------
  |  |  571|  4.36k|#define STEPOUT() if ( (++p1) < n_out) {    \
  |  |  ------------------
  |  |  |  Branch (571:24): [True: 2.61k, False: 1.75k]
  |  |  ------------------
  |  |  572|  2.61k|        e1 = VECTOR(outadj)[p1]; \
  |  |  ------------------
  |  |  |  |   60|  2.61k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  573|  2.61k|        n1 = IGRAPH_TO(graph, e1);      \
  |  |  ------------------
  |  |  |  |  128|  2.61k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  2.61k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  574|  2.61k|    }
  ------------------
  612|  4.36k|                }
  613|  2.68k|                actedge++;
  614|  2.68k|            }
  615|       |
  616|  40.0k|            while (p2 < n_in && n2 <= i) {
  ------------------
  |  Branch (616:20): [True: 6.58k, False: 33.5k]
  |  Branch (616:33): [True: 3.97k, False: 2.60k]
  ------------------
  617|  3.97k|                last = n2;
  618|  3.97k|                ADD_NEW_EDGE();
  ------------------
  |  |  579|  3.97k|#define ADD_NEW_EDGE() { \
  |  |  580|  3.97k|    IGRAPH_CHECK(igraph_vector_int_push_back(&edges, i)); \
  |  |  ------------------
  |  |  |  |  656|  3.97k|    do { \
  |  |  |  |  657|  3.97k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  3.97k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  3.97k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.97k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, 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.97k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 3.97k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  581|  3.97k|    IGRAPH_CHECK(igraph_vector_int_push_back(&edges, last)); \
  |  |  ------------------
  |  |  |  |  656|  3.97k|    do { \
  |  |  |  |  657|  3.97k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  3.97k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  3.97k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.97k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, 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.97k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 3.97k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  582|  3.97k|}
  ------------------
  619|  10.0k|                while (p2 < n_in && last == n2) {
  ------------------
  |  Branch (619:24): [True: 7.27k, False: 2.77k]
  |  Branch (619:37): [True: 6.07k, False: 1.20k]
  ------------------
  620|  6.07k|                    MERGE_INTO_CURRENT_EDGE(e2);
  ------------------
  |  |  583|  6.07k|#define MERGE_INTO_CURRENT_EDGE(which) { \
  |  |  584|  6.07k|    if (attr) { \
  |  |  ------------------
  |  |  |  Branch (584:9): [True: 6.07k, False: 0]
  |  |  ------------------
  |  |  585|  6.07k|        VECTOR(mergeinto)[which] = actedge; \
  |  |  ------------------
  |  |  |  |   60|  6.07k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  586|  6.07k|    } \
  |  |  587|  6.07k|}
  ------------------
  621|  6.07k|                    STEPIN();
  ------------------
  |  |  575|  6.07k|#define STEPIN()  if ( (++p2) < n_in) {         \
  |  |  ------------------
  |  |  |  Branch (575:24): [True: 3.30k, False: 2.77k]
  |  |  ------------------
  |  |  576|  3.30k|        e2 = VECTOR(inadj )[p2]; \
  |  |  ------------------
  |  |  |  |   60|  3.30k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  577|  3.30k|        n2 = IGRAPH_FROM(graph, e2);        \
  |  |  ------------------
  |  |  |  |  115|  3.30k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  3.30k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  578|  3.30k|    }
  ------------------
  622|  6.07k|                }
  623|  3.97k|                actedge++;
  624|  3.97k|            }
  625|  36.1k|        }
  626|       |
  627|    829|#undef MERGE_INTO_CURRENT_EDGE
  628|    829|#undef ADD_NEW_EDGE
  629|    829|#undef STEPOUT
  630|    829|#undef STEPIN
  631|       |
  632|    829|        igraph_vector_int_destroy(&outadj);
  633|    829|        igraph_vector_int_destroy(&inadj);
  634|    829|        IGRAPH_FINALLY_CLEAN(2);
  635|       |
  636|    829|        IGRAPH_CHECK(igraph_create(&newgraph, &edges,
  ------------------
  |  |  656|    829|    do { \
  |  |  657|    829|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    829|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    829|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 829]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    829|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 829]
  |  |  ------------------
  ------------------
  637|    829|                                   no_of_nodes,
  638|    829|                                   IGRAPH_UNDIRECTED));
  639|    829|        IGRAPH_FINALLY(igraph_destroy, &newgraph);
  ------------------
  |  |  603|    829|    do { \
  |  |  604|    829|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    829|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    829|         * incorrect destructor function with the pointer */ \
  |  |  607|    829|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 829]
  |  |  ------------------
  |  |  608|    829|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    829|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 829]
  |  |  ------------------
  ------------------
  640|    829|        igraph_vector_int_destroy(&edges);
  641|    829|        IGRAPH_CHECK(igraph_i_attribute_copy(&newgraph, graph, true, true, /* edges= */ false));
  ------------------
  |  |  656|    829|    do { \
  |  |  657|    829|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    829|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    829|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 829]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    829|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 829]
  |  |  ------------------
  ------------------
  642|       |
  643|    829|        if (attr) {
  ------------------
  |  Branch (643:13): [True: 829, False: 0]
  ------------------
  644|    829|            igraph_fixed_vectorlist_t vl;
  645|    829|            IGRAPH_CHECK(igraph_fixed_vectorlist_convert(&vl, &mergeinto, actedge));
  ------------------
  |  |  656|    829|    do { \
  |  |  657|    829|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    829|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    829|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 829]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    829|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 829]
  |  |  ------------------
  ------------------
  646|    829|            IGRAPH_FINALLY(igraph_fixed_vectorlist_destroy, &vl);
  ------------------
  |  |  603|    829|    do { \
  |  |  604|    829|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    829|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    829|         * incorrect destructor function with the pointer */ \
  |  |  607|    829|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 829]
  |  |  ------------------
  |  |  608|    829|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    829|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 829]
  |  |  ------------------
  ------------------
  647|       |
  648|    829|            IGRAPH_CHECK(igraph_i_attribute_combine_edges(graph, &newgraph, &vl.vecs, edge_comb));
  ------------------
  |  |  656|    829|    do { \
  |  |  657|    829|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    829|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    829|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 829]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    829|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 829]
  |  |  ------------------
  ------------------
  649|       |
  650|    829|            igraph_fixed_vectorlist_destroy(&vl);
  651|    829|            IGRAPH_FINALLY_CLEAN(1);
  652|    829|        }
  653|       |
  654|    829|        IGRAPH_FINALLY_CLEAN(2);
  655|    829|        igraph_destroy(graph);
  656|    829|        *graph = newgraph;
  657|       |
  658|    829|        if (attr) {
  ------------------
  |  Branch (658:13): [True: 829, False: 0]
  ------------------
  659|    829|            igraph_vector_int_destroy(&mergeinto);
  660|    829|            IGRAPH_FINALLY_CLEAN(1);
  661|    829|        }
  662|    829|    } 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|    829|    return IGRAPH_SUCCESS;
  752|    829|}

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

igraph_global_efficiency:
  395|    829|) {
  396|    829|    if (weights) {
  ------------------
  |  Branch (396:9): [True: 829, False: 0]
  ------------------
  397|    829|        return igraph_i_average_path_length_dijkstra(
  398|    829|            graph, weights, res, NULL, directed, /* invert= */ true, /* unconn= */ false
  399|    829|        );
  400|    829|    } 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|    829|}
igraph_local_efficiency:
  691|    829|) {
  692|    829|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  693|    829|    igraph_int_t no_of_edges = igraph_ecount(graph);
  694|    829|    igraph_int_t nodes_to_calc; /* no. of vertices includes in computation */
  695|    829|    igraph_vit_t vit;
  696|    829|    igraph_vector_int_t vertex_neis;
  697|    829|    igraph_vector_char_t nei_mask;
  698|    829|    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|    829|    IGRAPH_CHECK(igraph_vector_char_init(&nei_mask, no_of_nodes));
  ------------------
  |  |  656|    829|    do { \
  |  |  657|    829|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    829|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    829|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 829]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    829|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 829]
  |  |  ------------------
  ------------------
  709|    829|    IGRAPH_FINALLY(igraph_vector_char_destroy, &nei_mask);
  ------------------
  |  |  603|    829|    do { \
  |  |  604|    829|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    829|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    829|         * incorrect destructor function with the pointer */ \
  |  |  607|    829|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 829]
  |  |  ------------------
  |  |  608|    829|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    829|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 829]
  |  |  ------------------
  ------------------
  710|    829|    IGRAPH_VECTOR_INT_INIT_FINALLY(&vertex_neis, 0);
  ------------------
  |  |  119|    829|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|    829|    do { \
  |  |  |  |  657|    829|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|    829|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|    829|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 829]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|    829|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 829]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|    829|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|    829|    do { \
  |  |  |  |  604|    829|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|    829|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|    829|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|    829|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 829]
  |  |  |  |  ------------------
  |  |  |  |  608|    829|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|    829|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 829]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 829]
  |  |  ------------------
  ------------------
  711|       |
  712|    829|    IGRAPH_CHECK(igraph_vit_create(graph, vids, &vit));
  ------------------
  |  |  656|    829|    do { \
  |  |  657|    829|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    829|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    829|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 829]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    829|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 829]
  |  |  ------------------
  ------------------
  713|    829|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  603|    829|    do { \
  |  |  604|    829|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    829|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    829|         * incorrect destructor function with the pointer */ \
  |  |  607|    829|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 829]
  |  |  ------------------
  |  |  608|    829|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    829|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 829]
  |  |  ------------------
  ------------------
  714|       |
  715|    829|    nodes_to_calc = IGRAPH_VIT_SIZE(vit);
  ------------------
  |  |  190|    829|#define IGRAPH_VIT_SIZE(vit)  ((vit).end - (vit).start)
  ------------------
  716|       |
  717|    829|    IGRAPH_CHECK(igraph_vector_resize(res, nodes_to_calc));
  ------------------
  |  |  656|    829|    do { \
  |  |  657|    829|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    829|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    829|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 829]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    829|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 829]
  |  |  ------------------
  ------------------
  718|       |
  719|    829|    if (! weights) /* unweighted case */
  ------------------
  |  Branch (719:9): [True: 0, False: 829]
  ------------------
  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|    829|    else /* weighted case */
  754|    829|    {
  755|    829|        igraph_lazy_inclist_t inclist;
  756|    829|        igraph_2wheap_t Q;
  757|       |
  758|    829|        if (igraph_vector_size(weights) != no_of_edges) {
  ------------------
  |  Branch (758:13): [True: 0, False: 829]
  ------------------
  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|    829|        if (no_of_edges > 0) {
  ------------------
  |  Branch (761:13): [True: 786, False: 43]
  ------------------
  762|    786|            igraph_real_t min = igraph_vector_min(weights);
  763|    786|            if (min < 0) {
  ------------------
  |  Branch (763:17): [True: 0, False: 786]
  ------------------
  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|    786|            else if (isnan(min)) {
  ------------------
  |  Branch (766:22): [True: 0, False: 786]
  ------------------
  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|    786|        }
  770|       |
  771|    829|        IGRAPH_CHECK(igraph_lazy_inclist_init(
  ------------------
  |  |  656|    829|    do { \
  |  |  657|  1.65k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  ------------------
  |  |  |  Branch (657:40): [True: 829, False: 0]
  |  |  ------------------
  |  |  658|    829|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    829|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 829]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    829|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 829]
  |  |  ------------------
  ------------------
  772|    829|            graph, &inclist, directed ? IGRAPH_OUT : IGRAPH_ALL, IGRAPH_LOOPS
  773|    829|        ));
  774|    829|        IGRAPH_FINALLY(igraph_lazy_inclist_destroy, &inclist);
  ------------------
  |  |  603|    829|    do { \
  |  |  604|    829|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    829|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    829|         * incorrect destructor function with the pointer */ \
  |  |  607|    829|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 829]
  |  |  ------------------
  |  |  608|    829|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    829|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 829]
  |  |  ------------------
  ------------------
  775|    829|        IGRAPH_CHECK(igraph_2wheap_init(&Q, no_of_nodes));
  ------------------
  |  |  656|    829|    do { \
  |  |  657|    829|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    829|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    829|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 829]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    829|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 829]
  |  |  ------------------
  ------------------
  776|    829|        IGRAPH_FINALLY(igraph_2wheap_destroy, &Q);
  ------------------
  |  |  603|    829|    do { \
  |  |  604|    829|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    829|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    829|         * incorrect destructor function with the pointer */ \
  |  |  607|    829|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 829]
  |  |  ------------------
  |  |  608|    829|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    829|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 829]
  |  |  ------------------
  ------------------
  777|       |
  778|    829|        for (IGRAPH_VIT_RESET(vit), i=0;
  ------------------
  |  |  201|    829|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
  779|  36.9k|             ! IGRAPH_VIT_END(vit);
  ------------------
  |  |  179|  36.9k|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (779:14): [True: 36.1k, False: 829]
  ------------------
  780|  36.1k|             IGRAPH_VIT_NEXT(vit), i++)
  ------------------
  |  |  167|  36.1k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  781|  36.1k|        {
  782|  36.1k|            IGRAPH_CHECK(igraph_i_local_efficiency_dijkstra(
  ------------------
  |  |  656|  36.1k|    do { \
  |  |  657|  72.2k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  ------------------
  |  |  |  Branch (657:40): [True: 36.1k, False: 0]
  |  |  ------------------
  |  |  658|  36.1k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  36.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 36.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  36.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 36.1k]
  |  |  ------------------
  ------------------
  783|  36.1k|                             graph, &inclist,
  784|  36.1k|                             &Q, &vertex_neis, &nei_mask,
  785|  36.1k|                             &(VECTOR(*res)[i]), IGRAPH_VIT_GET(vit), mode, weights));
  786|  36.1k|        }
  787|       |
  788|    829|        igraph_2wheap_destroy(&Q);
  789|    829|        igraph_lazy_inclist_destroy(&inclist);
  790|    829|        IGRAPH_FINALLY_CLEAN(2);
  791|    829|    }
  792|       |
  793|    829|    igraph_vit_destroy(&vit);
  794|    829|    igraph_vector_int_destroy(&vertex_neis);
  795|    829|    igraph_vector_char_destroy(&nei_mask);
  796|    829|    IGRAPH_FINALLY_CLEAN(3);
  797|       |
  798|    829|    return IGRAPH_SUCCESS;
  799|    829|}
shortest_paths.c:igraph_i_average_path_length_dijkstra:
  155|    829|{
  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|    829|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  173|    829|    igraph_int_t no_of_edges = igraph_ecount(graph);
  174|    829|    igraph_2wheap_t Q;
  175|    829|    igraph_lazy_inclist_t inclist;
  176|    829|    igraph_real_t no_of_pairs;
  177|    829|    igraph_real_t no_of_conn_pairs = 0.0; /* no. of ordered pairs between which there is a path */
  178|       |
  179|    829|    IGRAPH_ASSERT(weights != 0);
  ------------------
  |  |  924|    829|    do { \
  |  |  925|    829|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|    829|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 829]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|    829|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 829]
  |  |  ------------------
  ------------------
  180|       |
  181|    829|    if (igraph_vector_size(weights) != no_of_edges) {
  ------------------
  |  Branch (181:9): [True: 0, False: 829]
  ------------------
  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|    829|    if (no_of_edges > 0) {
  ------------------
  |  Branch (185:9): [True: 786, False: 43]
  ------------------
  186|    786|        igraph_real_t min = igraph_vector_min(weights);
  187|    786|        if (min < 0) {
  ------------------
  |  Branch (187:13): [True: 0, False: 786]
  ------------------
  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|    786|        else if (isnan(min)) {
  ------------------
  |  Branch (190:18): [True: 0, False: 786]
  ------------------
  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|    786|    }
  194|       |
  195|       |    /* Avoid returning a negative zero, which would be printed as -0 in tests. */
  196|    829|    if (no_of_nodes > 0) {
  ------------------
  |  Branch (196:9): [True: 828, False: 1]
  ------------------
  197|    828|        no_of_pairs = no_of_nodes * (no_of_nodes - 1.0);
  198|    828|    } else {
  199|      1|        no_of_pairs = 0;
  200|      1|    }
  201|       |
  202|    829|    IGRAPH_CHECK(igraph_2wheap_init(&Q, no_of_nodes));
  ------------------
  |  |  656|    829|    do { \
  |  |  657|    829|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    829|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    829|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 829]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    829|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 829]
  |  |  ------------------
  ------------------
  203|    829|    IGRAPH_FINALLY(igraph_2wheap_destroy, &Q);
  ------------------
  |  |  603|    829|    do { \
  |  |  604|    829|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    829|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    829|         * incorrect destructor function with the pointer */ \
  |  |  607|    829|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 829]
  |  |  ------------------
  |  |  608|    829|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    829|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 829]
  |  |  ------------------
  ------------------
  204|    829|    IGRAPH_CHECK(igraph_lazy_inclist_init(
  ------------------
  |  |  656|    829|    do { \
  |  |  657|  1.65k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  ------------------
  |  |  |  Branch (657:40): [True: 829, False: 0]
  |  |  ------------------
  |  |  658|    829|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    829|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 829]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    829|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 829]
  |  |  ------------------
  ------------------
  205|    829|        graph, &inclist, directed ? IGRAPH_OUT : IGRAPH_ALL, IGRAPH_LOOPS
  206|    829|    ));
  207|    829|    IGRAPH_FINALLY(igraph_lazy_inclist_destroy, &inclist);
  ------------------
  |  |  603|    829|    do { \
  |  |  604|    829|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|    829|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|    829|         * incorrect destructor function with the pointer */ \
  |  |  607|    829|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 829]
  |  |  ------------------
  |  |  608|    829|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|    829|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 829]
  |  |  ------------------
  ------------------
  208|       |
  209|    829|    *res = 0.0;
  210|       |
  211|  36.9k|    for (igraph_int_t source = 0; source < no_of_nodes; ++source) {
  ------------------
  |  Branch (211:35): [True: 36.1k, False: 829]
  ------------------
  212|       |
  213|  36.1k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|  36.1k|    do { \
  |  |   47|  36.1k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 36.1k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|  36.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 36.1k]
  |  |  ------------------
  ------------------
  214|       |
  215|  36.1k|        igraph_2wheap_clear(&Q);
  216|  36.1k|        igraph_2wheap_push_with_index(&Q, source, -1.0);
  217|       |
  218|   137k|        while (!igraph_2wheap_empty(&Q)) {
  ------------------
  |  Branch (218:16): [True: 101k, False: 36.1k]
  ------------------
  219|   101k|            igraph_int_t minnei = igraph_2wheap_max_index(&Q);
  220|   101k|            igraph_real_t mindist = -igraph_2wheap_deactivate_max(&Q);
  221|   101k|            igraph_vector_int_t *neis;
  222|   101k|            igraph_int_t nlen;
  223|       |
  224|   101k|            if (minnei != source) {
  ------------------
  |  Branch (224:17): [True: 65.5k, False: 36.1k]
  ------------------
  225|  65.5k|                if (invert) {
  ------------------
  |  Branch (225:21): [True: 65.5k, False: 0]
  ------------------
  226|  65.5k|                    *res += 1.0/(mindist - 1.0);
  227|  65.5k|                } else {
  228|      0|                    *res += mindist - 1.0;
  229|      0|                }
  230|  65.5k|                no_of_conn_pairs += 1;
  231|  65.5k|            }
  232|       |
  233|       |            /* Now check all neighbors of 'minnei' for a shorter path */
  234|   101k|            neis = igraph_lazy_inclist_get(&inclist, minnei);
  ------------------
  |  |  214|   101k|    (igraph_lazy_inclist_has(il,no) ? ((il)->incs[(igraph_int_t)(no)]) \
  |  |  ------------------
  |  |  |  |  189|   101k|#define igraph_lazy_inclist_has(il,no) ((il)->incs[(igraph_int_t)(no)] != NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (189:40): [True: 65.5k, False: 36.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  215|   101k|                                    : (igraph_i_lazy_inclist_get_real(il,no)))
  ------------------
  235|   101k|            IGRAPH_CHECK_OOM(neis, "Failed to query incident edges.");
  ------------------
  |  |  709|   101k|    do { \
  |  |  710|   101k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|   101k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 101k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  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|   101k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 101k]
  |  |  ------------------
  ------------------
  236|   101k|            nlen = igraph_vector_int_size(neis);
  237|   278k|            for (igraph_int_t j = 0; j < nlen; j++) {
  ------------------
  |  Branch (237:38): [True: 176k, False: 101k]
  ------------------
  238|   176k|                igraph_int_t edge = VECTOR(*neis)[j];
  ------------------
  |  |   60|   176k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  239|   176k|                igraph_int_t tto = IGRAPH_OTHER(graph, edge, minnei);
  ------------------
  |  |  146|   176k|    ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|   176k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   176k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  115|  15.5k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  15.5k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|   160k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   160k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (146:21): [True: 15.5k, False: 160k]
  |  |  ------------------
  ------------------
  240|   176k|                igraph_real_t altdist = mindist + VECTOR(*weights)[edge];
  ------------------
  |  |   60|   176k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  241|   176k|                igraph_bool_t active = igraph_2wheap_has_active(&Q, tto);
  242|   176k|                igraph_bool_t has = igraph_2wheap_has_elem(&Q, tto);
  243|   176k|                igraph_real_t curdist = active ? -igraph_2wheap_get(&Q, tto) : 0.0;
  ------------------
  |  Branch (243:41): [True: 37.1k, False: 139k]
  ------------------
  244|   176k|                if (altdist == IGRAPH_INFINITY) {
  ------------------
  |  |  137|   176k|#define IGRAPH_INFINITY ((double)INFINITY)
  ------------------
  |  Branch (244:21): [True: 0, False: 176k]
  ------------------
  245|       |                    /* Ignore edges with positive infinite weight */
  246|   176k|                } else if (!has) {
  ------------------
  |  Branch (246:28): [True: 65.5k, False: 110k]
  ------------------
  247|       |                    /* This is the first non-infinite distance */
  248|  65.5k|                    IGRAPH_CHECK(igraph_2wheap_push_with_index(&Q, tto, -altdist));
  ------------------
  |  |  656|  65.5k|    do { \
  |  |  657|  65.5k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  65.5k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  65.5k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 65.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|  65.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 65.5k]
  |  |  ------------------
  ------------------
  249|   110k|                } else if (altdist < curdist) {
  ------------------
  |  Branch (249:28): [True: 9.79k, False: 100k]
  ------------------
  250|       |                    /* This is a shorter path */
  251|  9.79k|                    igraph_2wheap_modify(&Q, tto, -altdist);
  252|  9.79k|                }
  253|   176k|            }
  254|   101k|        } /* !igraph_2wheap_empty(&Q) */
  255|  36.1k|    } /* for source < no_of_nodes */
  256|       |
  257|    829|    if (no_of_pairs == 0) {
  ------------------
  |  Branch (257:9): [True: 10, False: 819]
  ------------------
  258|     10|        *res = IGRAPH_NAN; /* can't average zero items */
  ------------------
  |  |  138|     10|#define IGRAPH_NAN ((double)NAN)
  ------------------
  259|    819|    } else {
  260|    819|        if (unconn) { /* average over connected pairs */
  ------------------
  |  Branch (260:13): [True: 0, False: 819]
  ------------------
  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 */
  ------------------
  |  |  138|      0|#define IGRAPH_NAN ((double)NAN)
  ------------------
  263|      0|            } else {
  264|      0|                *res /= no_of_conn_pairs;
  265|      0|            }
  266|    819|        } else { /* average over all pairs */
  267|       |            /* no_of_conn_pairs < no_of_pairs implies that the graph is disconnected */
  268|    819|            if (no_of_conn_pairs < no_of_pairs && ! invert) {
  ------------------
  |  Branch (268:17): [True: 810, False: 9]
  |  Branch (268:51): [True: 0, False: 810]
  ------------------
  269|      0|                *res = IGRAPH_INFINITY;
  ------------------
  |  |  137|      0|#define IGRAPH_INFINITY ((double)INFINITY)
  ------------------
  270|    819|            } else {
  271|    819|                *res /= no_of_pairs;
  272|    819|            }
  273|    819|        }
  274|    819|    }
  275|       |
  276|    829|    if (unconnected_pairs) {
  ------------------
  |  Branch (276:9): [True: 0, False: 829]
  ------------------
  277|      0|        *unconnected_pairs = no_of_pairs - no_of_conn_pairs;
  278|      0|    }
  279|       |
  280|    829|    igraph_lazy_inclist_destroy(&inclist);
  281|    829|    igraph_2wheap_destroy(&Q);
  282|    829|    IGRAPH_FINALLY_CLEAN(2);
  283|       |
  284|    829|    return IGRAPH_SUCCESS;
  285|    829|}
shortest_paths.c:igraph_i_local_efficiency_dijkstra:
  518|  36.1k|{
  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.1k|    igraph_int_t vertex_neis_size;
  536|  36.1k|    igraph_int_t neighbor_count; /* unlike 'inc_edges_size', 'neighbor_count' does not count self-loops or multi-edges */
  537|       |
  538|  36.1k|    IGRAPH_CHECK(igraph_neighbors(graph, vertex_neis, vertex, mode, IGRAPH_LOOPS, IGRAPH_MULTIPLE));
  ------------------
  |  |  656|  36.1k|    do { \
  |  |  657|  36.1k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  36.1k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  36.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 36.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  36.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 36.1k]
  |  |  ------------------
  ------------------
  539|  36.1k|    vertex_neis_size = igraph_vector_int_size(vertex_neis);
  540|       |
  541|  36.1k|    igraph_vector_char_null(nei_mask);
  542|  36.1k|    neighbor_count = 0;
  543|  54.6k|    for (igraph_int_t i=0; i < vertex_neis_size; ++i) {
  ------------------
  |  Branch (543:28): [True: 18.5k, False: 36.1k]
  ------------------
  544|  18.5k|        igraph_int_t v = VECTOR(*vertex_neis)[i];
  ------------------
  |  |   60|  18.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  545|  18.5k|        if (v != vertex && ! VECTOR(*nei_mask)[v]) {
  ------------------
  |  |   60|  15.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (545:13): [True: 15.6k, False: 2.84k]
  |  Branch (545:28): [True: 10.1k, False: 5.57k]
  ------------------
  546|  10.1k|            VECTOR(*nei_mask)[v] = 1; /* mark as unprocessed neighbour */
  ------------------
  |  |   60|  10.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  547|  10.1k|            neighbor_count++;
  548|  10.1k|        }
  549|  18.5k|    }
  550|       |
  551|  36.1k|    *res = 0.0;
  552|       |
  553|       |    /* when the neighbor count is smaller than 2, we return 0.0 */
  554|  36.1k|    if (neighbor_count < 2) {
  ------------------
  |  Branch (554:9): [True: 34.3k, False: 1.76k]
  ------------------
  555|  34.3k|        return IGRAPH_SUCCESS;
  556|  34.3k|    }
  557|       |
  558|  11.6k|    for (igraph_int_t i=0; i < vertex_neis_size; ++i) {
  ------------------
  |  Branch (558:28): [True: 9.89k, False: 1.76k]
  ------------------
  559|  9.89k|        igraph_int_t source = VECTOR(*vertex_neis)[i];
  ------------------
  |  |   60|  9.89k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  560|  9.89k|        igraph_int_t reached = 0;
  561|       |
  562|  9.89k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|  9.89k|    do { \
  |  |   47|  9.89k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 9.89k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|  9.89k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 9.89k]
  |  |  ------------------
  ------------------
  563|       |
  564|  9.89k|        if (source == vertex)
  ------------------
  |  Branch (564:13): [True: 814, False: 9.08k]
  ------------------
  565|    814|            continue;
  566|       |
  567|       |        /* avoid processing a neighbour twice in multigraphs */
  568|  9.08k|        if (VECTOR(*nei_mask)[source] == 2)
  ------------------
  |  |   60|  9.08k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (568:13): [True: 2.54k, False: 6.53k]
  ------------------
  569|  2.54k|            continue;
  570|  6.53k|        VECTOR(*nei_mask)[source] = 2; /* mark as already processed */
  ------------------
  |  |   60|  6.53k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  571|       |
  572|  6.53k|        igraph_2wheap_clear(Q);
  573|  6.53k|        igraph_2wheap_push_with_index(Q, source, -1.0);
  574|       |
  575|   103k|        while (!igraph_2wheap_empty(Q)) {
  ------------------
  |  Branch (575:16): [True: 96.7k, False: 6.53k]
  ------------------
  576|  96.7k|            igraph_int_t minnei = igraph_2wheap_max_index(Q);
  577|  96.7k|            igraph_real_t mindist = -igraph_2wheap_deactivate_max(Q);
  578|  96.7k|            igraph_vector_int_t *neis;
  579|  96.7k|            igraph_int_t nlen;
  580|       |
  581|  96.7k|            if (minnei != source && VECTOR(*nei_mask)[minnei]) {
  ------------------
  |  |   60|  90.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (581:17): [True: 90.2k, False: 6.53k]
  |  Branch (581:37): [True: 11.8k, False: 78.4k]
  ------------------
  582|  11.8k|                *res += 1.0/(mindist - 1.0);
  583|  11.8k|                reached++;
  584|  11.8k|                if (reached == neighbor_count) {
  ------------------
  |  Branch (584:21): [True: 0, False: 11.8k]
  ------------------
  585|      0|                    igraph_2wheap_clear(Q);
  586|      0|                    break;
  587|      0|                }
  588|  11.8k|            }
  589|       |
  590|       |            /* Now check all neighbors of 'minnei' for a shorter path */
  591|  96.7k|            neis = igraph_lazy_inclist_get(inclist, minnei);
  ------------------
  |  |  214|  96.7k|    (igraph_lazy_inclist_has(il,no) ? ((il)->incs[(igraph_int_t)(no)]) \
  |  |  ------------------
  |  |  |  |  189|  96.7k|#define igraph_lazy_inclist_has(il,no) ((il)->incs[(igraph_int_t)(no)] != NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (189:40): [True: 92.3k, False: 4.43k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  215|  96.7k|                                    : (igraph_i_lazy_inclist_get_real(il,no)))
  ------------------
  592|  96.7k|            IGRAPH_CHECK_OOM(neis, "Failed to query incident edges.");
  ------------------
  |  |  709|  96.7k|    do { \
  |  |  710|  96.7k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  96.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 96.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  96.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 96.7k]
  |  |  ------------------
  ------------------
  593|  96.7k|            nlen = igraph_vector_int_size(neis);
  594|   399k|            for (igraph_int_t j = 0; j < nlen; j++) {
  ------------------
  |  Branch (594:38): [True: 302k, False: 96.7k]
  ------------------
  595|   302k|                igraph_real_t altdist, curdist;
  596|   302k|                igraph_bool_t active, has;
  597|   302k|                igraph_int_t edge = VECTOR(*neis)[j];
  ------------------
  |  |   60|   302k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  598|   302k|                igraph_int_t tto = IGRAPH_OTHER(graph, edge, minnei);
  ------------------
  |  |  146|   302k|    ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|   302k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   302k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  115|  21.7k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  21.7k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|   280k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   280k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (146:21): [True: 21.7k, False: 280k]
  |  |  ------------------
  ------------------
  599|       |
  600|   302k|                if (tto == vertex) {
  ------------------
  |  Branch (600:21): [True: 13.3k, False: 288k]
  ------------------
  601|  13.3k|                    continue;
  602|  13.3k|                }
  603|       |
  604|   288k|                altdist = mindist + VECTOR(*weights)[edge];
  ------------------
  |  |   60|   288k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  605|   288k|                active = igraph_2wheap_has_active(Q, tto);
  606|   288k|                has = igraph_2wheap_has_elem(Q, tto);
  607|   288k|                curdist = active ? -igraph_2wheap_get(Q, tto) : 0.0;
  ------------------
  |  Branch (607:27): [True: 61.1k, False: 227k]
  ------------------
  608|   288k|                if (!has) {
  ------------------
  |  Branch (608:21): [True: 90.2k, False: 198k]
  ------------------
  609|       |                    /* This is the first non-infinite distance */
  610|  90.2k|                    IGRAPH_CHECK(igraph_2wheap_push_with_index(Q, tto, -altdist));
  ------------------
  |  |  656|  90.2k|    do { \
  |  |  657|  90.2k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  90.2k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  90.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 90.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|  90.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 90.2k]
  |  |  ------------------
  ------------------
  611|   198k|                } else if (altdist < curdist) {
  ------------------
  |  Branch (611:28): [True: 19.0k, False: 179k]
  ------------------
  612|       |                    /* This is a shorter path */
  613|  19.0k|                    igraph_2wheap_modify(Q, tto, -altdist);
  614|  19.0k|                }
  615|   288k|            }
  616|       |
  617|  96.7k|        } /* !igraph_2wheap_empty(&Q) */
  618|       |
  619|  6.53k|    }
  620|       |
  621|  1.76k|    *res /= neighbor_count * (neighbor_count - 1.0);
  622|       |
  623|  1.76k|    return IGRAPH_SUCCESS;
  624|  1.76k|}

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

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

igraph_strength:
  619|  1.65k|) {
  620|       |
  621|  1.65k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  622|  1.65k|    igraph_vit_t vit;
  623|  1.65k|    igraph_int_t no_vids;
  624|  1.65k|    igraph_vector_int_t degrees;
  625|  1.65k|    igraph_vector_int_t neis;
  626|       |
  627|  1.65k|    if (! weights) {
  ------------------
  |  Branch (627:9): [True: 0, False: 1.65k]
  ------------------
  628|      0|        IGRAPH_VECTOR_INT_INIT_FINALLY(&degrees, 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]
  |  |  ------------------
  ------------------
  629|      0|        IGRAPH_CHECK(igraph_vector_resize(res, 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]
  |  |  ------------------
  ------------------
  630|      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]
  |  |  ------------------
  ------------------
  631|      0|        for (igraph_int_t i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (631:34): [True: 0, False: 0]
  ------------------
  632|      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)
  ------------------
  633|      0|        }
  634|      0|        igraph_vector_int_destroy(&degrees);
  635|      0|        IGRAPH_FINALLY_CLEAN(1);
  636|      0|        return IGRAPH_SUCCESS;
  637|      0|    }
  638|       |
  639|  1.65k|    if (igraph_vector_size(weights) != igraph_ecount(graph)) {
  ------------------
  |  Branch (639:9): [True: 0, False: 1.65k]
  ------------------
  640|      0|        IGRAPH_ERROR("Invalid weight vector length.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  641|      0|    }
  642|       |
  643|  1.65k|    if (mode != IGRAPH_OUT && mode != IGRAPH_IN && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (643:9): [True: 1.65k, False: 0]
  |  Branch (643:31): [True: 1.65k, False: 0]
  |  Branch (643:52): [True: 0, False: 1.65k]
  ------------------
  644|      0|        IGRAPH_ERROR("Invalid mode for vertex strength calculation.", IGRAPH_EINVMODE);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  645|      0|    }
  646|       |
  647|  1.65k|    if (igraph_vs_is_all(&vids)) {
  ------------------
  |  Branch (647:9): [True: 1.65k, False: 0]
  ------------------
  648|  1.65k|        return strength_all(graph, res, mode, loops, weights);
  649|  1.65k|    }
  650|       |
  651|      0|    IGRAPH_CHECK(igraph_vit_create(graph, vids, &vit));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  652|      0|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  603|      0|    do { \
  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  ------------------
  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  653|      0|    no_vids = IGRAPH_VIT_SIZE(vit);
  ------------------
  |  |  190|      0|#define IGRAPH_VIT_SIZE(vit)  ((vit).end - (vit).start)
  ------------------
  654|       |
  655|      0|    IGRAPH_VECTOR_INT_INIT_FINALLY(&neis, 0);
  ------------------
  |  |  119|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|      0|    do { \
  |  |  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 0]
  |  |  ------------------
  ------------------
  656|      0|    IGRAPH_CHECK(igraph_vector_int_reserve(&neis, no_of_nodes));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  657|      0|    IGRAPH_CHECK(igraph_vector_resize(res, no_vids));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  658|      0|    igraph_vector_null(res);
  659|       |
  660|      0|    for (igraph_int_t i = 0; !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  179|      0|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
                  for (igraph_int_t i = 0; !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  167|      0|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  |  Branch (660:30): [True: 0, False: 0]
  ------------------
  661|      0|        IGRAPH_CHECK(igraph_incident(graph, &neis, IGRAPH_VIT_GET(vit), mode, loops));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  ------------------
  |  |  |  Branch (657:40): [True: 0, False: 0]
  |  |  ------------------
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  662|      0|        const igraph_int_t n = igraph_vector_int_size(&neis);
  663|      0|        for (igraph_int_t j = 0; j < n; j++) {
  ------------------
  |  Branch (663:34): [True: 0, False: 0]
  ------------------
  664|      0|            igraph_int_t edge = VECTOR(neis)[j];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  665|      0|            VECTOR(*res)[i] += VECTOR(*weights)[edge];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*res)[i] += VECTOR(*weights)[edge];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  666|      0|        }
  667|      0|    }
  668|       |
  669|      0|    igraph_vit_destroy(&vit);
  670|      0|    igraph_vector_int_destroy(&neis);
  671|      0|    IGRAPH_FINALLY_CLEAN(2);
  672|       |
  673|      0|    return IGRAPH_SUCCESS;
  674|      0|}
degrees.c:strength_all:
  540|  1.65k|        const igraph_vector_t *weights) {
  541|       |
  542|       |    // When calculating strength for all vertices, iterating over edges is faster
  543|  1.65k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  544|  1.65k|    igraph_int_t no_of_edges = igraph_ecount(graph);
  545|       |
  546|  1.65k|    IGRAPH_CHECK(igraph_vector_resize(res, no_of_nodes));
  ------------------
  |  |  656|  1.65k|    do { \
  |  |  657|  1.65k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.65k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.65k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.65k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.65k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.65k]
  |  |  ------------------
  ------------------
  547|  1.65k|    igraph_vector_null(res);
  548|       |
  549|  1.65k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (549:9): [True: 828, False: 829]
  ------------------
  550|    828|        mode = IGRAPH_ALL;
  551|    828|    }
  552|       |
  553|  1.65k|    if (loops) {
  ------------------
  |  Branch (553:9): [True: 828, False: 829]
  ------------------
  554|    828|        if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (554:13): [True: 828, False: 0]
  ------------------
  555|  10.6k|            for (igraph_int_t edge = 0; edge < no_of_edges; ++edge) {
  ------------------
  |  Branch (555:41): [True: 9.85k, False: 828]
  ------------------
  556|  9.85k|                VECTOR(*res)[IGRAPH_FROM(graph, edge)] += VECTOR(*weights)[edge];
  ------------------
  |  |   60|  9.85k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[IGRAPH_FROM(graph, edge)] += VECTOR(*weights)[edge];
  ------------------
  |  |  115|  9.85k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  9.85k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
                              VECTOR(*res)[IGRAPH_FROM(graph, edge)] += VECTOR(*weights)[edge];
  ------------------
  |  |   60|  9.85k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  557|  9.85k|            }
  558|    828|        }
  559|    828|        if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (559:13): [True: 828, False: 0]
  ------------------
  560|  10.6k|            for (igraph_int_t edge = 0; edge < no_of_edges; ++edge) {
  ------------------
  |  Branch (560:41): [True: 9.85k, False: 828]
  ------------------
  561|  9.85k|                VECTOR(*res)[IGRAPH_TO(graph, edge)] += VECTOR(*weights)[edge];
  ------------------
  |  |   60|  9.85k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[IGRAPH_TO(graph, edge)] += VECTOR(*weights)[edge];
  ------------------
  |  |  128|  9.85k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  9.85k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
                              VECTOR(*res)[IGRAPH_TO(graph, edge)] += VECTOR(*weights)[edge];
  ------------------
  |  |   60|  9.85k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  562|  9.85k|            }
  563|    828|        }
  564|    829|    } else {
  565|    829|        if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (565:13): [True: 829, False: 0]
  ------------------
  566|  19.3k|            for (igraph_int_t edge = 0; edge < no_of_edges; ++edge) {
  ------------------
  |  Branch (566:41): [True: 18.5k, False: 829]
  ------------------
  567|  18.5k|                igraph_int_t from = IGRAPH_FROM(graph, edge);
  ------------------
  |  |  115|  18.5k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  18.5k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  568|  18.5k|                if (from != IGRAPH_TO(graph, edge)) {
  ------------------
  |  |  128|  18.5k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  18.5k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (568:21): [True: 15.6k, False: 2.84k]
  ------------------
  569|  15.6k|                   VECTOR(*res)[from] += VECTOR(*weights)[edge];
  ------------------
  |  |   60|  15.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                 VECTOR(*res)[from] += VECTOR(*weights)[edge];
  ------------------
  |  |   60|  15.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  570|  15.6k|                }
  571|  18.5k|            }
  572|    829|        }
  573|    829|        if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (573:13): [True: 829, False: 0]
  ------------------
  574|  19.3k|            for (igraph_int_t edge = 0; edge < no_of_edges; ++edge) {
  ------------------
  |  Branch (574:41): [True: 18.5k, False: 829]
  ------------------
  575|  18.5k|                igraph_int_t to = IGRAPH_TO(graph, edge);
  ------------------
  |  |  128|  18.5k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  18.5k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  576|  18.5k|                if (IGRAPH_FROM(graph, edge) != to) {
  ------------------
  |  |  115|  18.5k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  18.5k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (576:21): [True: 15.6k, False: 2.84k]
  ------------------
  577|  15.6k|                    VECTOR(*res)[to] += VECTOR(*weights)[edge];
  ------------------
  |  |   60|  15.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  VECTOR(*res)[to] += VECTOR(*weights)[edge];
  ------------------
  |  |   60|  15.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  578|  15.6k|                }
  579|  18.5k|            }
  580|    829|        }
  581|    829|    }
  582|       |
  583|  1.65k|    return IGRAPH_SUCCESS;
  584|  1.65k|}

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

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

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

