LLVMFuzzerTestOneInput:
   24|    771|extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
   25|    771|    igraph_t graph;
   26|    771|    igraph_vector_int_t edges;
   27|    771|    igraph_vector_t weights;
   28|       |
   29|    771|    igraph_set_warning_handler(igraph_warning_handler_ignore);
   30|       |
   31|    771|    if (Size % 3 == 0 || Size % 3 == 2 || Size > (3 * 256) + 1 || Size < 1) {
  ------------------
  |  Branch (31:9): [True: 1, False: 770]
  |  Branch (31:26): [True: 1, False: 769]
  |  Branch (31:43): [True: 13, False: 756]
  |  Branch (31:67): [True: 0, False: 756]
  ------------------
   32|     15|        return 0;
   33|     15|    }
   34|       |
   35|    756|    igraph_vector_int_init(&edges, ((Size-1) / 3) * 2);
   36|    756|    igraph_vector_init(&weights, (Size-1) / 3);
   37|  19.0k|    for (size_t i=0; i < ((Size-1) / 3); ++i) {
  ------------------
  |  Branch (37:22): [True: 18.2k, False: 756]
  ------------------
   38|  18.2k|        VECTOR(edges)[i * 2] = Data[i * 3 + 1];
  ------------------
  |  |   65|  18.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   39|  18.2k|        VECTOR(edges)[i * 2 + 1] = Data[i * 3 + 2];
  ------------------
  |  |   65|  18.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   40|       |        // We keep the weights strictly positive, as this is required by some algorithms.
   41|       |        // Error at src/centrality/betweenness.c:437 : Weight vector must be positive. - Invalid value.
   42|  18.2k|        VECTOR(weights)[i] = ((double) Data[i * 3 + 3] + 1.0) / 105.0;
  ------------------
  |  |   65|  18.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   43|  18.2k|    }
   44|       |
   45|       |    // Turn on attribute handling. Weights will be stored as an edge attribute
   46|       |    // in order to allow graph simplification while retainingweights.
   47|    756|    igraph_set_attribute_table(&igraph_cattribute_table);
   48|       |
   49|    756|    igraph_rng_seed(igraph_rng_default(), 42);
   50|       |
   51|    756|    if (igraph_create(&graph, &edges, Data[0], IGRAPH_DIRECTED) == IGRAPH_SUCCESS) {
  ------------------
  |  Branch (51:9): [True: 756, False: 0]
  ------------------
   52|    756|        igraph_vector_t v;
   53|    756|        igraph_vector_int_t iv;
   54|    756|        igraph_bool_t b;
   55|    756|        igraph_real_t r;
   56|       |
   57|       |        /* Limit graph size for the sake of performance. */
   58|    756|        if (igraph_vcount(&graph) <= 64) {
  ------------------
  |  Branch (58:13): [True: 732, False: 24]
  ------------------
   59|    732|            igraph_vector_init(&v, 0);
   60|    732|            igraph_vector_int_init(&iv, 0);
   61|       |
   62|    732|            igraph_betweenness_cutoff(&graph, &v, igraph_vss_all(), IGRAPH_ALL, &weights, 4);
   63|    732|            igraph_betweenness_cutoff(&graph, &v, igraph_vss_all(), IGRAPH_IN, &weights, 5);
   64|    732|            igraph_edge_betweenness_cutoff(&graph, &v, IGRAPH_DIRECTED, &weights, 4);
   65|    732|            igraph_edge_betweenness_cutoff(&graph, &v, IGRAPH_UNDIRECTED, &weights, 3);
   66|    732|            if (igraph_vcount(&graph) >= 10) {
  ------------------
  |  Branch (66:17): [True: 668, False: 64]
  ------------------
   67|    668|                igraph_betweenness_subset(&graph, &v, igraph_vss_all(), IGRAPH_DIRECTED, igraph_vss_range(0,5), igraph_vss_range(5,10), &weights);
   68|    668|                igraph_edge_betweenness_subset(&graph, &v, igraph_ess_all(IGRAPH_EDGEORDER_ID), IGRAPH_DIRECTED, igraph_vss_range(0,10), igraph_vss_range(0,10), &weights);
   69|    668|            }
   70|    732|            igraph_closeness_cutoff(&graph, &v, &iv, &b, igraph_vss_all(), IGRAPH_ALL, &weights, true, 3);
   71|    732|            igraph_closeness_cutoff(&graph, &v, &iv, &b, igraph_vss_all(), IGRAPH_OUT, &weights, true, 4);
   72|    732|            igraph_harmonic_centrality_cutoff(&graph, &v, igraph_vss_all(), IGRAPH_ALL, &weights, true, 3);
   73|    732|            igraph_harmonic_centrality_cutoff(&graph, &v, igraph_vss_all(), IGRAPH_IN, &weights, true, 4);
   74|    732|            igraph_global_efficiency(&graph, &r, &weights, IGRAPH_DIRECTED);
   75|    732|            igraph_local_efficiency(&graph, &v, igraph_vss_all(), &weights, IGRAPH_DIRECTED, IGRAPH_OUT);
   76|    732|            igraph_pagerank(&graph, IGRAPH_PAGERANK_ALGO_PRPACK, &v, &r, igraph_vss_all(), IGRAPH_DIRECTED, 0.6, &weights, NULL);
   77|    732|            igraph_constraint(&graph, &v, igraph_vss_all(), &weights);
   78|       |
   79|    732|            {
   80|    732|                igraph_attribute_combination_t comb;
   81|    732|                SETEANV(&graph, "weight", &weights);
  ------------------
  |  |  825|    732|#define SETEANV(graph,n,v) (igraph_cattribute_EAN_setv((graph),(n),(v)))
  ------------------
   82|    732|                igraph_attribute_combination(&comb,
   83|    732|                                             "weight", IGRAPH_ATTRIBUTE_COMBINE_SUM,
   84|    732|                                             IGRAPH_NO_MORE_ATTRIBUTES);
  ------------------
  |  |  219|    732|#define IGRAPH_NO_MORE_ATTRIBUTES ((const char*)0)
  ------------------
   85|       |                // This operation would be simpler if we use IGRAPH_TO_UNDIRECTED_EACH,
   86|       |                // as collapsing edges happens in the simplification step anyway.
   87|       |                // We use IGRAPH_TO_UNDIRECTED_COLLAPSE to exercise more code.
   88|    732|                igraph_to_undirected(&graph, IGRAPH_TO_UNDIRECTED_COLLAPSE, &comb);
   89|    732|                igraph_simplify(&graph, true, true, &comb);
   90|    732|                igraph_attribute_combination_destroy(&comb);
   91|    732|                EANV(&graph, "weight", &weights);
  ------------------
  |  |  648|    732|#define EANV(graph,n,vec) (igraph_cattribute_EANV((graph),(n), \
  |  |  649|    732|                           igraph_ess_all(IGRAPH_EDGEORDER_ID), (vec)))
  ------------------
   92|    732|                DELEA(&graph, "weight");
  ------------------
  |  |  873|    732|#define DELEA(graph,n) (igraph_cattribute_remove_e((graph),(n)))
  ------------------
   93|    732|            }
   94|       |
   95|    732|            igraph_diversity(&graph, &weights, &v, igraph_vss_all());
   96|    732|            igraph_transitivity_barrat(&graph, &v, igraph_vss_all(), &weights, IGRAPH_TRANSITIVITY_NAN);
   97|       |
   98|    732|            igraph_vector_int_destroy(&iv);
   99|    732|            igraph_vector_destroy(&v);
  100|    732|        }
  101|       |
  102|    756|        igraph_destroy(&graph);
  103|    756|    }
  104|       |
  105|    756|    igraph_vector_int_destroy(&edges);
  106|    756|    igraph_vector_destroy(&weights);
  107|       |
  108|    756|    IGRAPH_ASSERT(IGRAPH_FINALLY_STACK_EMPTY);
  ------------------
  |  |  916|    756|    do { \
  |  |  917|    756|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|    756|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 756]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  ------------------
  |  |  |  |  406|      0|#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  919|      0|        } \
  |  |  920|    756|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  109|       |
  110|    756|    return 0;  // Non-zero return values are reserved for future use.
  111|    756|}

igraph_betweenness_cutoff:
  543|  1.46k|                              const igraph_vector_t *weights, igraph_real_t cutoff) {
  544|       |
  545|  1.46k|    igraph_integer_t no_of_nodes = igraph_vcount(graph);
  546|  1.46k|    igraph_integer_t no_of_edges = igraph_ecount(graph);
  547|  1.46k|    igraph_adjlist_t adjlist, parents;
  548|  1.46k|    igraph_inclist_t inclist;
  549|  1.46k|    igraph_integer_t source, j, neighbor;
  550|  1.46k|    igraph_stack_int_t S;
  551|  1.46k|    igraph_neimode_t mode = directed ? IGRAPH_OUT : IGRAPH_ALL;
  ------------------
  |  Branch (551:29): [True: 1.46k, False: 0]
  ------------------
  552|  1.46k|    igraph_vector_t dist;
  553|       |    /* Note: nrgeo holds the number of shortest paths, which may be very large in some cases,
  554|       |     * e.g. in a grid graph. If using an integer type, this results in overflow.
  555|       |     * With a 'long long int', overflow already affects the result for a grid as small as 36*36.
  556|       |     * Therefore, we use a 'igraph_real_t' instead. While a 'igraph_real_t' holds fewer digits than a
  557|       |     * 'long long int', i.e. its precision is lower, it is effectively immune to overflow.
  558|       |     * The impact on the precision of the final result is negligible. The max betweenness
  559|       |     * is correct to 14 decimal digits, i.e. the precision limit of 'igraph_real_t', even
  560|       |     * for a 101*101 grid graph. */
  561|  1.46k|    igraph_real_t *nrgeo = 0;
  562|  1.46k|    igraph_real_t *tmpscore;
  563|  1.46k|    igraph_vector_t v_tmpres, *tmpres = &v_tmpres;
  564|  1.46k|    igraph_vit_t vit;
  565|       |
  566|  1.46k|    IGRAPH_CHECK(igraph_i_betweenness_check_weights(weights, no_of_edges));
  ------------------
  |  |  648|  1.46k|    do { \
  |  |  649|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  567|       |
  568|  1.46k|    if (weights) {
  ------------------
  |  Branch (568:9): [True: 1.46k, False: 0]
  ------------------
  569|  1.46k|        IGRAPH_CHECK(igraph_inclist_init(graph, &inclist, mode, IGRAPH_NO_LOOPS));
  ------------------
  |  |  648|  1.46k|    do { \
  |  |  649|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  570|  1.46k|        IGRAPH_FINALLY(igraph_inclist_destroy, &inclist);
  ------------------
  |  |  591|  1.46k|    do { \
  |  |  592|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  595|  1.46k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  571|  1.46k|    } else {
  572|      0|        IGRAPH_CHECK(igraph_adjlist_init(graph, &adjlist, mode, IGRAPH_NO_LOOPS, IGRAPH_MULTIPLE));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  573|      0|        IGRAPH_FINALLY(igraph_adjlist_destroy, &adjlist);
  ------------------
  |  |  591|      0|    do { \
  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  574|      0|    }
  575|       |
  576|  1.46k|    IGRAPH_CHECK(igraph_adjlist_init_empty(&parents, no_of_nodes));
  ------------------
  |  |  648|  1.46k|    do { \
  |  |  649|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  577|  1.46k|    IGRAPH_FINALLY(igraph_adjlist_destroy, &parents);
  ------------------
  |  |  591|  1.46k|    do { \
  |  |  592|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  595|  1.46k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  578|       |
  579|  1.46k|    IGRAPH_CHECK(igraph_stack_int_init(&S, no_of_nodes));
  ------------------
  |  |  648|  1.46k|    do { \
  |  |  649|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  580|  1.46k|    IGRAPH_FINALLY(igraph_stack_int_destroy, &S);
  ------------------
  |  |  591|  1.46k|    do { \
  |  |  592|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  595|  1.46k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  581|       |
  582|  1.46k|    IGRAPH_VECTOR_INIT_FINALLY(&dist, no_of_nodes);
  ------------------
  |  |  109|  1.46k|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  1.46k|    do { \
  |  |  |  |  649|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  110|  1.46k|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  1.46k|    do { \
  |  |  |  |  592|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  1.46k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (110:60): [Folded - Ignored]
  |  |  ------------------
  ------------------
  583|       |
  584|  1.46k|    nrgeo = IGRAPH_CALLOC(no_of_nodes, igraph_real_t);
  ------------------
  |  |   38|  1.46k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  2.92k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 1.46k, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 1.46k, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 1.46k, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  585|  1.46k|    IGRAPH_CHECK_OOM(nrgeo, "Insufficient memory for betweenness calculation.");
  ------------------
  |  |  701|  1.46k|    do { \
  |  |  702|  1.46k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  586|  1.46k|    IGRAPH_FINALLY(igraph_free, nrgeo);
  ------------------
  |  |  591|  1.46k|    do { \
  |  |  592|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  595|  1.46k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  587|       |
  588|  1.46k|    tmpscore = IGRAPH_CALLOC(no_of_nodes, igraph_real_t);
  ------------------
  |  |   38|  1.46k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  2.92k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 1.46k, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 1.46k, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 1.46k, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  589|  1.46k|    IGRAPH_CHECK_OOM(tmpscore, "Insufficient memory for betweenness calculation.");
  ------------------
  |  |  701|  1.46k|    do { \
  |  |  702|  1.46k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  590|  1.46k|    IGRAPH_FINALLY(igraph_free, tmpscore);
  ------------------
  |  |  591|  1.46k|    do { \
  |  |  592|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  595|  1.46k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  591|       |
  592|  1.46k|    if (igraph_vs_is_all(&vids)) {
  ------------------
  |  Branch (592:9): [True: 1.46k, False: 0]
  ------------------
  593|       |        /* result covers all vertices */
  594|  1.46k|        IGRAPH_CHECK(igraph_vector_resize(res, no_of_nodes));
  ------------------
  |  |  648|  1.46k|    do { \
  |  |  649|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  595|  1.46k|        igraph_vector_null(res);
  596|  1.46k|        tmpres = res;
  597|  1.46k|    } else {
  598|       |        /* result needed only for a subset of the vertices */
  599|      0|        IGRAPH_VECTOR_INIT_FINALLY(tmpres, no_of_nodes);
  ------------------
  |  |  109|      0|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|      0|    do { \
  |  |  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  110|      0|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|      0|    do { \
  |  |  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (110:60): [Folded - Ignored]
  |  |  ------------------
  ------------------
  600|      0|    }
  601|       |
  602|  65.1k|    for (source = 0; source < no_of_nodes; source++) {
  ------------------
  |  Branch (602:22): [True: 63.7k, False: 1.46k]
  ------------------
  603|       |
  604|       |        /* Loop invariant that is valid at this point:
  605|       |         *
  606|       |         * - the stack S is empty
  607|       |         * - the 'dist' vector contains zeros only
  608|       |         * - the 'nrgeo' array contains zeros only
  609|       |         * - the 'tmpscore' array contains zeros only
  610|       |         * - the 'parents' adjacency list contains empty vectors only
  611|       |         */
  612|       |
  613|  63.7k|        IGRAPH_PROGRESS("Betweenness centrality: ", 100.0 * source / no_of_nodes, 0);
  ------------------
  |  |  174|  63.7k|    do { \
  |  |  175|  63.7k|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  648|  63.7k|    do { \
  |  |  |  |  649|  63.7k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  63.7k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  63.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 63.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  63.7k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  176|  63.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (176:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  614|  63.7k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   47|  63.7k|    do { \
  |  |   48|  63.7k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (48:13): [True: 0, False: 63.7k]
  |  |  ------------------
  |  |   49|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (49:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   50|      0|                return IGRAPH_INTERRUPTED; \
  |  |   51|      0|            } \
  |  |   52|      0|        } \
  |  |   53|  63.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (53:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  615|       |
  616|       |        /* Conduct a single-source shortest path search from the source node */
  617|  63.7k|        if (weights) {
  ------------------
  |  Branch (617:13): [True: 63.7k, False: 0]
  ------------------
  618|  63.7k|            IGRAPH_CHECK(igraph_i_sspf_weighted(graph, source, &dist, nrgeo, weights, &S, &parents, &inclist, cutoff));
  ------------------
  |  |  648|  63.7k|    do { \
  |  |  649|  63.7k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  63.7k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  63.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 63.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  63.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  619|  63.7k|        } else {
  620|      0|            IGRAPH_CHECK(igraph_i_sspf(source, &dist, nrgeo, &S, &parents, &adjlist, cutoff));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  621|      0|        }
  622|       |
  623|       |        /* Aggregate betweenness scores for the nodes we have reached in this
  624|       |         * traversal */
  625|   233k|        while (!igraph_stack_int_empty(&S)) {
  ------------------
  |  Branch (625:16): [True: 170k, False: 63.7k]
  ------------------
  626|   170k|            igraph_integer_t actnode = igraph_stack_int_pop(&S);
  627|   170k|            igraph_vector_int_t *neis = igraph_adjlist_get(&parents, actnode);
  ------------------
  |  |   78|   170k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_integer_t)(no)])
  ------------------
  628|   170k|            igraph_integer_t nneis = igraph_vector_int_size(neis);
  629|   170k|            igraph_real_t coeff = (1 + tmpscore[actnode]) / nrgeo[actnode];
  630|       |
  631|   291k|            for (j = 0; j < nneis; j++) {
  ------------------
  |  Branch (631:25): [True: 121k, False: 170k]
  ------------------
  632|   121k|                neighbor = VECTOR(*neis)[j];
  ------------------
  |  |   65|   121k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  633|   121k|                tmpscore[neighbor] += nrgeo[neighbor] * coeff;
  634|   121k|            }
  635|       |
  636|   170k|            if (actnode != source) {
  ------------------
  |  Branch (636:17): [True: 106k, False: 63.7k]
  ------------------
  637|   106k|                VECTOR(*tmpres)[actnode] += tmpscore[actnode];
  ------------------
  |  |   65|   106k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  638|   106k|            }
  639|       |
  640|       |            /* Reset variables to ensure that the 'for' loop invariant will
  641|       |             * still be valid in the next iteration */
  642|       |
  643|   170k|            VECTOR(dist)[actnode] = 0;
  ------------------
  |  |   65|   170k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  644|   170k|            nrgeo[actnode] = 0;
  645|   170k|            tmpscore[actnode] = 0;
  646|   170k|            igraph_vector_int_clear(neis);
  647|   170k|        }
  648|       |
  649|  63.7k|    } /* for source < no_of_nodes */
  650|       |
  651|       |    /* Keep only the requested vertices */
  652|  1.46k|    if (!igraph_vs_is_all(&vids)) {
  ------------------
  |  Branch (652:9): [True: 0, False: 1.46k]
  ------------------
  653|      0|        IGRAPH_CHECK(igraph_vit_create(graph, vids, &vit));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  654|      0|        IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  591|      0|    do { \
  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  655|      0|        IGRAPH_CHECK(igraph_vector_resize(res, IGRAPH_VIT_SIZE(vit)));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  656|       |
  657|      0|        for (j = 0, IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit);
  ------------------
  |  |  202|      0|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
                      for (j = 0, IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit);
  ------------------
  |  |  180|      0|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (657:44): [True: 0, False: 0]
  ------------------
  658|      0|             IGRAPH_VIT_NEXT(vit), j++) {
  ------------------
  |  |  168|      0|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  659|      0|            igraph_integer_t node = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  215|      0|    ((igraph_integer_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (215:25): [True: 0, False: 0]
  |  |  ------------------
  |  |  216|      0|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  660|      0|            VECTOR(*res)[j] = VECTOR(*tmpres)[node];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*res)[j] = VECTOR(*tmpres)[node];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  661|      0|        }
  662|       |
  663|      0|        igraph_vit_destroy(&vit);
  664|      0|        igraph_vector_destroy(tmpres);
  665|      0|        IGRAPH_FINALLY_CLEAN(2);
  666|      0|    }
  667|       |
  668|  1.46k|    if (!directed || !igraph_is_directed(graph)) {
  ------------------
  |  Branch (668:9): [True: 0, False: 1.46k]
  |  Branch (668:22): [True: 0, False: 1.46k]
  ------------------
  669|      0|        igraph_vector_scale(res, 0.5);
  670|      0|    }
  671|       |
  672|  1.46k|    IGRAPH_PROGRESS("Betweenness centrality: ", 100.0, 0);
  ------------------
  |  |  174|  1.46k|    do { \
  |  |  175|  1.46k|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  648|  1.46k|    do { \
  |  |  |  |  649|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  176|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (176:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  673|       |
  674|  1.46k|    IGRAPH_FREE(nrgeo);
  ------------------
  |  |   41|  1.46k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  675|  1.46k|    IGRAPH_FREE(tmpscore);
  ------------------
  |  |   41|  1.46k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  676|  1.46k|    igraph_vector_destroy(&dist);
  677|  1.46k|    igraph_stack_int_destroy(&S);
  678|  1.46k|    igraph_adjlist_destroy(&parents);
  679|  1.46k|    if (weights) {
  ------------------
  |  Branch (679:9): [True: 1.46k, False: 0]
  ------------------
  680|  1.46k|        igraph_inclist_destroy(&inclist);
  681|  1.46k|    } else {
  682|      0|        igraph_adjlist_destroy(&adjlist);
  683|      0|    }
  684|  1.46k|    IGRAPH_FINALLY_CLEAN(6);
  685|       |
  686|  1.46k|    return IGRAPH_SUCCESS;
  687|  1.46k|}
igraph_edge_betweenness_cutoff:
  773|  1.46k|                                   const igraph_vector_t *weights, igraph_real_t cutoff) {
  774|  1.46k|    igraph_integer_t no_of_nodes = igraph_vcount(graph);
  775|  1.46k|    igraph_integer_t no_of_edges = igraph_ecount(graph);
  776|  1.46k|    igraph_inclist_t inclist, parents;
  777|  1.46k|    igraph_neimode_t mode = directed ? IGRAPH_OUT : IGRAPH_ALL;
  ------------------
  |  Branch (777:29): [True: 732, False: 732]
  ------------------
  778|  1.46k|    igraph_vector_t dist;
  779|  1.46k|    igraph_real_t *nrgeo;
  780|  1.46k|    igraph_real_t *tmpscore;
  781|  1.46k|    igraph_integer_t source, j;
  782|  1.46k|    igraph_stack_int_t S;
  783|       |
  784|  1.46k|    IGRAPH_CHECK(igraph_i_betweenness_check_weights(weights, no_of_edges));
  ------------------
  |  |  648|  1.46k|    do { \
  |  |  649|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  785|       |
  786|  1.46k|    IGRAPH_CHECK(igraph_inclist_init(graph, &inclist, mode, IGRAPH_NO_LOOPS));
  ------------------
  |  |  648|  1.46k|    do { \
  |  |  649|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  787|  1.46k|    IGRAPH_FINALLY(igraph_inclist_destroy, &inclist);
  ------------------
  |  |  591|  1.46k|    do { \
  |  |  592|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  595|  1.46k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  788|       |
  789|  1.46k|    IGRAPH_CHECK(igraph_inclist_init_empty(&parents, no_of_nodes));
  ------------------
  |  |  648|  1.46k|    do { \
  |  |  649|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  790|  1.46k|    IGRAPH_FINALLY(igraph_inclist_destroy, &parents);
  ------------------
  |  |  591|  1.46k|    do { \
  |  |  592|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  595|  1.46k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  791|       |
  792|  1.46k|    IGRAPH_VECTOR_INIT_FINALLY(&dist, no_of_nodes);
  ------------------
  |  |  109|  1.46k|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  1.46k|    do { \
  |  |  |  |  649|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  110|  1.46k|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  1.46k|    do { \
  |  |  |  |  592|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  1.46k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (110:60): [Folded - Ignored]
  |  |  ------------------
  ------------------
  793|       |
  794|  1.46k|    nrgeo = IGRAPH_CALLOC(no_of_nodes, igraph_real_t);
  ------------------
  |  |   38|  1.46k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  2.92k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 1.46k, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 1.46k, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 1.46k, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  795|  1.46k|    IGRAPH_CHECK_OOM(nrgeo, "Insufficient memory for edge betweenness calculation.");
  ------------------
  |  |  701|  1.46k|    do { \
  |  |  702|  1.46k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  796|  1.46k|    IGRAPH_FINALLY(igraph_free, nrgeo);
  ------------------
  |  |  591|  1.46k|    do { \
  |  |  592|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  595|  1.46k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  797|       |
  798|  1.46k|    tmpscore = IGRAPH_CALLOC(no_of_nodes, igraph_real_t);
  ------------------
  |  |   38|  1.46k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  2.92k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 1.46k, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 1.46k, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 1.46k, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  799|  1.46k|    if (tmpscore == 0) {
  ------------------
  |  Branch (799:9): [True: 0, False: 1.46k]
  ------------------
  800|      0|        IGRAPH_ERROR("Insufficient memory for edge betweenness calculation.", IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  801|      0|    }
  802|  1.46k|    IGRAPH_FINALLY(igraph_free, tmpscore);
  ------------------
  |  |  591|  1.46k|    do { \
  |  |  592|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  595|  1.46k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  803|       |
  804|  1.46k|    IGRAPH_CHECK(igraph_stack_int_init(&S, no_of_nodes));
  ------------------
  |  |  648|  1.46k|    do { \
  |  |  649|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  805|  1.46k|    IGRAPH_FINALLY(igraph_stack_int_destroy, &S);
  ------------------
  |  |  591|  1.46k|    do { \
  |  |  592|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  595|  1.46k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  806|       |
  807|  1.46k|    IGRAPH_CHECK(igraph_vector_resize(result, no_of_edges));
  ------------------
  |  |  648|  1.46k|    do { \
  |  |  649|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  808|  1.46k|    igraph_vector_null(result);
  809|       |
  810|  65.1k|    for (source = 0; source < no_of_nodes; source++) {
  ------------------
  |  Branch (810:22): [True: 63.7k, False: 1.46k]
  ------------------
  811|       |
  812|       |        /* Loop invariant that is valid at this point:
  813|       |         *
  814|       |         * - the stack S is empty
  815|       |         * - the 'dist' vector contains zeros only
  816|       |         * - the 'nrgeo' array contains zeros only
  817|       |         * - the 'tmpscore' array contains zeros only
  818|       |         * - the 'parents' incidence list contains empty vectors only
  819|       |         */
  820|       |
  821|  63.7k|        IGRAPH_PROGRESS("Edge betweenness centrality: ", 100.0 * source / no_of_nodes, 0);
  ------------------
  |  |  174|  63.7k|    do { \
  |  |  175|  63.7k|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  648|  63.7k|    do { \
  |  |  |  |  649|  63.7k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  63.7k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  63.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 63.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  63.7k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  176|  63.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (176:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  822|  63.7k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   47|  63.7k|    do { \
  |  |   48|  63.7k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (48:13): [True: 0, False: 63.7k]
  |  |  ------------------
  |  |   49|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (49:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   50|      0|                return IGRAPH_INTERRUPTED; \
  |  |   51|      0|            } \
  |  |   52|      0|        } \
  |  |   53|  63.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (53:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  823|       |
  824|       |        /* Conduct a single-source shortest path search from the source node */
  825|  63.7k|        if (weights) {
  ------------------
  |  Branch (825:13): [True: 63.7k, False: 0]
  ------------------
  826|  63.7k|            IGRAPH_CHECK(igraph_i_sspf_weighted_edge(graph, source, &dist, nrgeo, weights, &S, &parents, &inclist, cutoff));
  ------------------
  |  |  648|  63.7k|    do { \
  |  |  649|  63.7k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  63.7k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  63.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 63.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  63.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  827|  63.7k|        } else {
  828|      0|            IGRAPH_CHECK(igraph_i_sspf_edge(graph, source, &dist, nrgeo, &S, &parents, &inclist, cutoff));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  829|      0|        }
  830|       |
  831|       |        /* Aggregate betweenness scores for the edges we have reached in this
  832|       |         * traversal */
  833|   308k|        while (!igraph_stack_int_empty(&S)) {
  ------------------
  |  Branch (833:16): [True: 244k, False: 63.7k]
  ------------------
  834|   244k|            igraph_integer_t actnode = igraph_stack_int_pop(&S);
  835|   244k|            igraph_vector_int_t *fatv = igraph_inclist_get(&parents, actnode);
  ------------------
  |  |  107|   244k|#define igraph_inclist_get(il,no) (&(il)->incs[(igraph_integer_t)(no)])
  ------------------
  836|   244k|            igraph_integer_t fatv_len = igraph_vector_int_size(fatv);
  837|   244k|            igraph_real_t coeff = (1 + tmpscore[actnode]) / nrgeo[actnode];
  838|       |
  839|   454k|            for (j = 0; j < fatv_len; j++) {
  ------------------
  |  Branch (839:25): [True: 209k, False: 244k]
  ------------------
  840|   209k|                igraph_integer_t fedge = VECTOR(*fatv)[j];
  ------------------
  |  |   65|   209k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  841|   209k|                igraph_integer_t neighbor = IGRAPH_OTHER(graph, fedge, actnode);
  ------------------
  |  |  144|   209k|    ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  126|   209k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|   209k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  113|   147k|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|   147k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  126|  62.7k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  62.7k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (144:25): [True: 147k, False: 62.7k]
  |  |  ------------------
  ------------------
  842|   209k|                tmpscore[neighbor] += nrgeo[neighbor] * coeff;
  843|   209k|                VECTOR(*result)[fedge] += nrgeo[neighbor] * coeff;
  ------------------
  |  |   65|   209k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  844|   209k|            }
  845|       |
  846|       |            /* Reset variables to ensure that the 'for' loop invariant will
  847|       |             * still be valid in the next iteration */
  848|       |
  849|   244k|            VECTOR(dist)[actnode] = 0;
  ------------------
  |  |   65|   244k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  850|   244k|            nrgeo[actnode] = 0;
  851|   244k|            tmpscore[actnode] = 0;
  852|   244k|            igraph_vector_int_clear(fatv);
  853|   244k|        }
  854|  63.7k|    } /* source < no_of_nodes */
  855|       |
  856|  1.46k|    if (!directed || !igraph_is_directed(graph)) {
  ------------------
  |  Branch (856:9): [True: 732, False: 732]
  |  Branch (856:22): [True: 0, False: 732]
  ------------------
  857|    732|        igraph_vector_scale(result, 0.5);
  858|    732|    }
  859|       |
  860|  1.46k|    IGRAPH_PROGRESS("Edge betweenness centrality: ", 100.0, 0);
  ------------------
  |  |  174|  1.46k|    do { \
  |  |  175|  1.46k|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  648|  1.46k|    do { \
  |  |  |  |  649|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  176|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (176:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  861|       |
  862|  1.46k|    igraph_stack_int_destroy(&S);
  863|  1.46k|    igraph_inclist_destroy(&inclist);
  864|  1.46k|    igraph_inclist_destroy(&parents);
  865|  1.46k|    igraph_vector_destroy(&dist);
  866|  1.46k|    IGRAPH_FREE(tmpscore);
  ------------------
  |  |   41|  1.46k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  867|  1.46k|    IGRAPH_FREE(nrgeo);
  ------------------
  |  |   41|  1.46k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  868|  1.46k|    IGRAPH_FINALLY_CLEAN(6);
  869|       |
  870|  1.46k|    return IGRAPH_SUCCESS;
  871|  1.46k|}
igraph_betweenness_subset:
  912|    668|                              const igraph_vector_t *weights) {
  913|       |
  914|    668|    igraph_integer_t no_of_nodes = igraph_vcount(graph);
  915|    668|    igraph_integer_t no_of_edges = igraph_ecount(graph);
  916|    668|    igraph_integer_t no_of_sources;
  917|    668|    igraph_integer_t no_of_processed_sources;
  918|    668|    igraph_adjlist_t adjlist, parents;
  919|    668|    igraph_inclist_t inclist;
  920|    668|    igraph_integer_t source, j;
  921|    668|    igraph_stack_int_t S;
  922|    668|    igraph_vector_t v_tmpres, *tmpres = &v_tmpres;
  923|    668|    igraph_neimode_t mode = directed ? IGRAPH_OUT : IGRAPH_ALL;
  ------------------
  |  Branch (923:29): [True: 668, False: 0]
  ------------------
  924|    668|    igraph_integer_t father;
  925|    668|    igraph_vector_t dist;
  926|    668|    igraph_real_t *nrgeo;
  927|    668|    igraph_real_t *tmpscore;
  928|    668|    igraph_vit_t vit;
  929|    668|    bool *is_target;
  930|       |
  931|    668|    IGRAPH_CHECK(igraph_i_betweenness_check_weights(weights, no_of_edges));
  ------------------
  |  |  648|    668|    do { \
  |  |  649|    668|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    668|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    668|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 668]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    668|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  932|       |
  933|    668|    IGRAPH_CHECK(igraph_vs_size(graph, &sources, &no_of_sources));
  ------------------
  |  |  648|    668|    do { \
  |  |  649|    668|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    668|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    668|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 668]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    668|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  934|       |
  935|    668|    if (weights) {
  ------------------
  |  Branch (935:9): [True: 668, False: 0]
  ------------------
  936|    668|        IGRAPH_CHECK(igraph_inclist_init(graph, &inclist, mode, IGRAPH_NO_LOOPS));
  ------------------
  |  |  648|    668|    do { \
  |  |  649|    668|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    668|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    668|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 668]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    668|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  937|    668|        IGRAPH_FINALLY(igraph_inclist_destroy, &inclist);
  ------------------
  |  |  591|    668|    do { \
  |  |  592|    668|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|    668|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|    668|         * incorrect destructor function with the pointer */ \
  |  |  595|    668|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|    668|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|    668|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  938|    668|    } else {
  939|      0|        IGRAPH_CHECK(igraph_adjlist_init(graph, &adjlist, mode, IGRAPH_NO_LOOPS, IGRAPH_MULTIPLE));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  940|      0|        IGRAPH_FINALLY(igraph_adjlist_destroy, &adjlist);
  ------------------
  |  |  591|      0|    do { \
  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  941|      0|    }
  942|       |
  943|    668|    IGRAPH_CHECK(igraph_adjlist_init_empty(&parents, no_of_nodes));
  ------------------
  |  |  648|    668|    do { \
  |  |  649|    668|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    668|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    668|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 668]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    668|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  944|    668|    IGRAPH_FINALLY(igraph_adjlist_destroy, &parents);
  ------------------
  |  |  591|    668|    do { \
  |  |  592|    668|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|    668|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|    668|         * incorrect destructor function with the pointer */ \
  |  |  595|    668|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|    668|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|    668|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  945|       |
  946|    668|    IGRAPH_CHECK(igraph_stack_int_init(&S, no_of_nodes));
  ------------------
  |  |  648|    668|    do { \
  |  |  649|    668|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    668|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    668|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 668]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    668|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  947|    668|    IGRAPH_FINALLY(igraph_stack_int_destroy, &S);
  ------------------
  |  |  591|    668|    do { \
  |  |  592|    668|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|    668|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|    668|         * incorrect destructor function with the pointer */ \
  |  |  595|    668|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|    668|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|    668|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  948|       |
  949|    668|    IGRAPH_VECTOR_INIT_FINALLY(&dist, no_of_nodes);
  ------------------
  |  |  109|    668|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|    668|    do { \
  |  |  |  |  649|    668|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|    668|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|    668|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 668]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|    668|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  110|    668|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|    668|    do { \
  |  |  |  |  592|    668|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|    668|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|    668|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|    668|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|    668|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|    668|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (110:60): [Folded - Ignored]
  |  |  ------------------
  ------------------
  950|       |
  951|    668|    nrgeo = IGRAPH_CALLOC(no_of_nodes, igraph_real_t);
  ------------------
  |  |   38|    668|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  1.33k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 668, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 668, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 668, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  952|    668|    IGRAPH_CHECK_OOM(nrgeo, "Insufficient memory for subset betweenness calculation.");
  ------------------
  |  |  701|    668|    do { \
  |  |  702|    668|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|    668|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 668]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|    668|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  953|    668|    IGRAPH_FINALLY(igraph_free, nrgeo);
  ------------------
  |  |  591|    668|    do { \
  |  |  592|    668|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|    668|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|    668|         * incorrect destructor function with the pointer */ \
  |  |  595|    668|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|    668|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|    668|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  954|       |
  955|    668|    tmpscore = IGRAPH_CALLOC(no_of_nodes, igraph_real_t);
  ------------------
  |  |   38|    668|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  1.33k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 668, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 668, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 668, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  956|    668|    IGRAPH_CHECK_OOM(tmpscore, "Insufficient memory for subset betweenness calculation.");
  ------------------
  |  |  701|    668|    do { \
  |  |  702|    668|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|    668|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 668]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|    668|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  957|    668|    IGRAPH_FINALLY(igraph_free, tmpscore);
  ------------------
  |  |  591|    668|    do { \
  |  |  592|    668|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|    668|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|    668|         * incorrect destructor function with the pointer */ \
  |  |  595|    668|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|    668|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|    668|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  958|       |
  959|    668|    is_target = IGRAPH_CALLOC(no_of_nodes, bool);
  ------------------
  |  |   38|    668|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  1.33k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 668, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 668, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 668, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  960|    668|    IGRAPH_CHECK_OOM(is_target, "Insufficient memory for subset betweenness calculation.");
  ------------------
  |  |  701|    668|    do { \
  |  |  702|    668|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|    668|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 668]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|    668|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  961|    668|    IGRAPH_FINALLY(igraph_free, is_target);
  ------------------
  |  |  591|    668|    do { \
  |  |  592|    668|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|    668|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|    668|         * incorrect destructor function with the pointer */ \
  |  |  595|    668|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|    668|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|    668|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  962|       |
  963|    668|    IGRAPH_CHECK(igraph_vit_create(graph, targets, &vit));
  ------------------
  |  |  648|    668|    do { \
  |  |  649|    668|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    668|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    668|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 668]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    668|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  964|    668|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  591|    668|    do { \
  |  |  592|    668|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|    668|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|    668|         * incorrect destructor function with the pointer */ \
  |  |  595|    668|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|    668|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|    668|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  965|  4.00k|    for (IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  202|    668|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
                  for (IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  180|  4.00k|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
                  for (IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  168|  3.34k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  |  Branch (965:33): [True: 3.34k, False: 668]
  ------------------
  966|  3.34k|        is_target[IGRAPH_VIT_GET(vit)] = true;
  ------------------
  |  |  215|  3.34k|    ((igraph_integer_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (215:25): [True: 3.34k, False: 0]
  |  |  ------------------
  |  |  216|  3.34k|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  967|  3.34k|    }
  968|    668|    igraph_vit_destroy(&vit);
  969|    668|    IGRAPH_FINALLY_CLEAN(1);
  970|       |
  971|    668|    if (!igraph_vs_is_all(&vids)) {
  ------------------
  |  Branch (971:9): [True: 0, False: 668]
  ------------------
  972|       |        /* result needed only for a subset of the vertices */
  973|      0|        IGRAPH_VECTOR_INIT_FINALLY(tmpres, no_of_nodes);
  ------------------
  |  |  109|      0|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|      0|    do { \
  |  |  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  110|      0|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|      0|    do { \
  |  |  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (110:60): [Folded - Ignored]
  |  |  ------------------
  ------------------
  974|    668|    } else {
  975|       |        /* result covers all vertices */
  976|    668|        IGRAPH_CHECK(igraph_vector_resize(res, no_of_nodes));
  ------------------
  |  |  648|    668|    do { \
  |  |  649|    668|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    668|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    668|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 668]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    668|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  977|    668|        igraph_vector_null(res);
  978|    668|        tmpres = res;
  979|    668|    }
  980|       |
  981|    668|    IGRAPH_CHECK(igraph_vit_create(graph, sources, &vit));
  ------------------
  |  |  648|    668|    do { \
  |  |  649|    668|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    668|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    668|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 668]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    668|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  982|    668|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  591|    668|    do { \
  |  |  592|    668|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|    668|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|    668|         * incorrect destructor function with the pointer */ \
  |  |  595|    668|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|    668|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|    668|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  983|       |
  984|    668|    for (
  985|    668|        no_of_processed_sources = 0, IGRAPH_VIT_RESET(vit);
  ------------------
  |  |  202|    668|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
  986|  4.00k|        !IGRAPH_VIT_END(vit);
  ------------------
  |  |  180|  4.00k|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (986:9): [True: 3.34k, False: 668]
  ------------------
  987|  3.34k|        IGRAPH_VIT_NEXT(vit), no_of_processed_sources++
  ------------------
  |  |  168|  3.34k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  988|  3.34k|    ) {
  989|  3.34k|        source = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  215|  3.34k|    ((igraph_integer_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (215:25): [True: 3.34k, False: 0]
  |  |  ------------------
  |  |  216|  3.34k|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  990|       |
  991|  3.34k|        IGRAPH_PROGRESS(
  ------------------
  |  |  174|  3.34k|    do { \
  |  |  175|  3.34k|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  648|  3.34k|    do { \
  |  |  |  |  649|  3.34k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  3.34k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  3.34k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 3.34k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  3.34k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  176|  3.34k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (176:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  992|  3.34k|            "Betweenness centrality (subset): ",
  993|  3.34k|            100.0 * no_of_processed_sources / no_of_sources, 0
  994|  3.34k|        );
  995|  3.34k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   47|  3.34k|    do { \
  |  |   48|  3.34k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (48:13): [True: 0, False: 3.34k]
  |  |  ------------------
  |  |   49|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (49:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   50|      0|                return IGRAPH_INTERRUPTED; \
  |  |   51|      0|            } \
  |  |   52|      0|        } \
  |  |   53|  3.34k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (53:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  996|       |
  997|       |        /* Loop invariant that is valid at this point:
  998|       |         *
  999|       |         * - the stack S is empty
 1000|       |         * - the 'dist' vector contains zeros only
 1001|       |         * - the 'nrgeo' array contains zeros only
 1002|       |         * - the 'tmpscore' array contains zeros only
 1003|       |         * - the 'parents' adjacency list contains empty vectors only
 1004|       |         */
 1005|       |
 1006|       |        /* TODO: there is more room for optimization here; the single-source
 1007|       |         * shortest path search runs until it reaches all the nodes in the
 1008|       |         * component of the source node even if we are only interested in a
 1009|       |         * smaller target subset. We could stop the search when all target
 1010|       |         * nodes were reached.
 1011|       |         */
 1012|       |
 1013|       |        /* Conduct a single-source shortest path search from the source node */
 1014|  3.34k|        if (weights) {
  ------------------
  |  Branch (1014:13): [True: 3.34k, False: 0]
  ------------------
 1015|  3.34k|            IGRAPH_CHECK(igraph_i_sspf_weighted(graph, source, &dist, nrgeo, weights, &S, &parents, &inclist, -1));
  ------------------
  |  |  648|  3.34k|    do { \
  |  |  649|  3.34k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  3.34k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  3.34k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 3.34k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  3.34k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1016|  3.34k|        } else {
 1017|      0|            IGRAPH_CHECK(igraph_i_sspf(source, &dist, nrgeo, &S, &parents, &adjlist, -1));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1018|      0|        }
 1019|       |
 1020|       |        /* Aggregate betweenness scores for the nodes we have reached in this
 1021|       |         * traversal */
 1022|  17.4k|        while (!igraph_stack_int_empty(&S)) {
  ------------------
  |  Branch (1022:16): [True: 14.1k, False: 3.34k]
  ------------------
 1023|  14.1k|            igraph_integer_t actnode = igraph_stack_int_pop(&S);
 1024|  14.1k|            igraph_vector_int_t *fatv = igraph_adjlist_get(&parents, actnode);
  ------------------
  |  |   78|  14.1k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_integer_t)(no)])
  ------------------
 1025|  14.1k|            igraph_integer_t fatv_len = igraph_vector_int_size(fatv);
 1026|  14.1k|            igraph_real_t coeff;
 1027|       |
 1028|  14.1k|            if (is_target[actnode]) {
  ------------------
  |  Branch (1028:17): [True: 1.16k, False: 12.9k]
  ------------------
 1029|  1.16k|                coeff = (1 + tmpscore[actnode]) / nrgeo[actnode];
 1030|  12.9k|            } else {
 1031|  12.9k|                coeff = tmpscore[actnode] / nrgeo[actnode];
 1032|  12.9k|            }
 1033|       |
 1034|  29.1k|            for (j = 0; j < fatv_len; j++) {
  ------------------
  |  Branch (1034:25): [True: 15.0k, False: 14.1k]
  ------------------
 1035|  15.0k|                father = VECTOR(*fatv)[j];
  ------------------
  |  |   65|  15.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1036|  15.0k|                tmpscore[father] += nrgeo[father] * coeff;
 1037|  15.0k|            }
 1038|       |
 1039|  14.1k|            if (actnode != source) {
  ------------------
  |  Branch (1039:17): [True: 10.7k, False: 3.34k]
  ------------------
 1040|  10.7k|                VECTOR(*tmpres)[actnode] += tmpscore[actnode];
  ------------------
  |  |   65|  10.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1041|  10.7k|            }
 1042|       |
 1043|       |            /* Reset variables to ensure that the 'for' loop invariant will
 1044|       |             * still be valid in the next iteration */
 1045|       |
 1046|  14.1k|            VECTOR(dist)[actnode] = 0;
  ------------------
  |  |   65|  14.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1047|  14.1k|            nrgeo[actnode] = 0;
 1048|  14.1k|            tmpscore[actnode] = 0;
 1049|  14.1k|            igraph_vector_int_clear(fatv);
 1050|  14.1k|        }
 1051|  3.34k|    }
 1052|       |
 1053|    668|    igraph_vit_destroy(&vit);
 1054|    668|    IGRAPH_FINALLY_CLEAN(1);
 1055|       |
 1056|       |    /* Keep only the requested vertices */
 1057|    668|    if (!igraph_vs_is_all(&vids)) {
  ------------------
  |  Branch (1057:9): [True: 0, False: 668]
  ------------------
 1058|      0|        IGRAPH_CHECK(igraph_vit_create(graph, vids, &vit));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1059|      0|        IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  591|      0|    do { \
  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1060|       |
 1061|      0|        IGRAPH_CHECK(igraph_vector_resize(res, IGRAPH_VIT_SIZE(vit)));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1062|      0|        for (j = 0, IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit);
  ------------------
  |  |  202|      0|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
                      for (j = 0, IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit);
  ------------------
  |  |  180|      0|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (1062:44): [True: 0, False: 0]
  ------------------
 1063|      0|             IGRAPH_VIT_NEXT(vit), j++) {
  ------------------
  |  |  168|      0|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
 1064|      0|            igraph_integer_t node = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  215|      0|    ((igraph_integer_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (215:25): [True: 0, False: 0]
  |  |  ------------------
  |  |  216|      0|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1065|      0|            VECTOR(*res)[j] = VECTOR(*tmpres)[node];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*res)[j] = VECTOR(*tmpres)[node];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1066|      0|        }
 1067|       |
 1068|      0|        igraph_vit_destroy(&vit);
 1069|      0|        igraph_vector_destroy(tmpres);
 1070|      0|        IGRAPH_FINALLY_CLEAN(2);
 1071|      0|    }
 1072|       |
 1073|    668|   if (!directed || !igraph_is_directed(graph)) {
  ------------------
  |  Branch (1073:8): [True: 0, False: 668]
  |  Branch (1073:21): [True: 0, False: 668]
  ------------------
 1074|      0|        igraph_vector_scale(res, 0.5);
 1075|      0|    }
 1076|       |
 1077|    668|    IGRAPH_FREE(is_target);
  ------------------
  |  |   41|    668|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1078|    668|    IGRAPH_FREE(tmpscore);
  ------------------
  |  |   41|    668|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1079|    668|    IGRAPH_FREE(nrgeo);
  ------------------
  |  |   41|    668|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1080|    668|    igraph_vector_destroy(&dist);
 1081|    668|    igraph_stack_int_destroy(&S);
 1082|    668|    igraph_adjlist_destroy(&parents);
 1083|    668|    if (weights) {
  ------------------
  |  Branch (1083:9): [True: 668, False: 0]
  ------------------
 1084|    668|        igraph_inclist_destroy(&inclist);
 1085|    668|    } else {
 1086|      0|        igraph_adjlist_destroy(&adjlist);
 1087|      0|    }
 1088|    668|    IGRAPH_FINALLY_CLEAN(7);
 1089|       |
 1090|    668|    return IGRAPH_SUCCESS;
 1091|    668|}
igraph_edge_betweenness_subset:
 1130|    668|                                   const igraph_vector_t *weights) {
 1131|    668|    igraph_integer_t no_of_nodes = igraph_vcount(graph);
 1132|    668|    igraph_integer_t no_of_edges = igraph_ecount(graph);
 1133|    668|    igraph_integer_t no_of_sources;
 1134|    668|    igraph_integer_t no_of_processed_sources;
 1135|    668|    igraph_inclist_t inclist, parents;
 1136|    668|    igraph_vit_t vit;
 1137|    668|    igraph_eit_t eit;
 1138|    668|    igraph_neimode_t mode = directed ? IGRAPH_OUT : IGRAPH_ALL;
  ------------------
  |  Branch (1138:29): [True: 668, False: 0]
  ------------------
 1139|    668|    igraph_vector_t dist;
 1140|    668|    igraph_vector_t v_tmpres, *tmpres = &v_tmpres;
 1141|    668|    igraph_real_t *nrgeo;
 1142|    668|    igraph_real_t *tmpscore;
 1143|    668|    igraph_integer_t source, j;
 1144|    668|    bool *is_target;
 1145|    668|    igraph_stack_int_t S;
 1146|       |
 1147|    668|    IGRAPH_CHECK(igraph_i_betweenness_check_weights(weights, no_of_edges));
  ------------------
  |  |  648|    668|    do { \
  |  |  649|    668|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    668|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    668|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 668]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    668|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1148|       |
 1149|    668|    IGRAPH_CHECK(igraph_vs_size(graph, &sources, &no_of_sources));
  ------------------
  |  |  648|    668|    do { \
  |  |  649|    668|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    668|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    668|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 668]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    668|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1150|       |
 1151|    668|    is_target = IGRAPH_CALLOC(no_of_nodes, bool);
  ------------------
  |  |   38|    668|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  1.33k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 668, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 668, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 668, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1152|    668|    IGRAPH_CHECK_OOM(is_target, "Insufficient memory for subset edge betweenness calculation.");
  ------------------
  |  |  701|    668|    do { \
  |  |  702|    668|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|    668|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 668]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|    668|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1153|    668|    IGRAPH_FINALLY(igraph_free, is_target);
  ------------------
  |  |  591|    668|    do { \
  |  |  592|    668|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|    668|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|    668|         * incorrect destructor function with the pointer */ \
  |  |  595|    668|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|    668|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|    668|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1154|       |
 1155|    668|    IGRAPH_CHECK(igraph_vit_create(graph, targets, &vit));
  ------------------
  |  |  648|    668|    do { \
  |  |  649|    668|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    668|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    668|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 668]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    668|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1156|    668|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  591|    668|    do { \
  |  |  592|    668|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|    668|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|    668|         * incorrect destructor function with the pointer */ \
  |  |  595|    668|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|    668|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|    668|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1157|  7.34k|    for (IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  202|    668|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
                  for (IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  180|  7.34k|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
                  for (IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  168|  6.68k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  |  Branch (1157:33): [True: 6.68k, False: 668]
  ------------------
 1158|  6.68k|        is_target[IGRAPH_VIT_GET(vit)] = true;
  ------------------
  |  |  215|  6.68k|    ((igraph_integer_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (215:25): [True: 6.68k, False: 0]
  |  |  ------------------
  |  |  216|  6.68k|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1159|  6.68k|    }
 1160|    668|    igraph_vit_destroy(&vit);
 1161|    668|    IGRAPH_FINALLY_CLEAN(1);
 1162|       |
 1163|    668|    IGRAPH_CHECK(igraph_inclist_init(graph, &inclist, mode, IGRAPH_NO_LOOPS));
  ------------------
  |  |  648|    668|    do { \
  |  |  649|    668|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    668|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    668|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 668]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    668|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1164|    668|    IGRAPH_FINALLY(igraph_inclist_destroy, &inclist);
  ------------------
  |  |  591|    668|    do { \
  |  |  592|    668|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|    668|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|    668|         * incorrect destructor function with the pointer */ \
  |  |  595|    668|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|    668|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|    668|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1165|    668|    IGRAPH_CHECK(igraph_inclist_init_empty(&parents, no_of_nodes));
  ------------------
  |  |  648|    668|    do { \
  |  |  649|    668|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    668|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    668|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 668]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    668|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1166|    668|    IGRAPH_FINALLY(igraph_inclist_destroy, &parents);
  ------------------
  |  |  591|    668|    do { \
  |  |  592|    668|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|    668|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|    668|         * incorrect destructor function with the pointer */ \
  |  |  595|    668|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|    668|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|    668|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1167|       |
 1168|    668|    IGRAPH_VECTOR_INIT_FINALLY(&dist, no_of_nodes);
  ------------------
  |  |  109|    668|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|    668|    do { \
  |  |  |  |  649|    668|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|    668|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|    668|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 668]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|    668|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  110|    668|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|    668|    do { \
  |  |  |  |  592|    668|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|    668|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|    668|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|    668|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|    668|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|    668|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (110:60): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1169|       |
 1170|    668|    nrgeo = IGRAPH_CALLOC(no_of_nodes, igraph_real_t);
  ------------------
  |  |   38|    668|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  1.33k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 668, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 668, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 668, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1171|    668|    IGRAPH_CHECK_OOM(nrgeo, "Insufficient memory for subset edge betweenness calculation.");
  ------------------
  |  |  701|    668|    do { \
  |  |  702|    668|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|    668|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 668]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|    668|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1172|    668|    IGRAPH_FINALLY(igraph_free, nrgeo);
  ------------------
  |  |  591|    668|    do { \
  |  |  592|    668|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|    668|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|    668|         * incorrect destructor function with the pointer */ \
  |  |  595|    668|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|    668|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|    668|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1173|       |
 1174|    668|    tmpscore = IGRAPH_CALLOC(no_of_nodes, igraph_real_t);
  ------------------
  |  |   38|    668|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  1.33k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 668, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 668, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 668, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1175|    668|    IGRAPH_CHECK_OOM(tmpscore, "Insufficient memory for subset edge betweenness calculation.");
  ------------------
  |  |  701|    668|    do { \
  |  |  702|    668|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|    668|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 668]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|    668|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1176|    668|    IGRAPH_FINALLY(igraph_free, tmpscore);
  ------------------
  |  |  591|    668|    do { \
  |  |  592|    668|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|    668|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|    668|         * incorrect destructor function with the pointer */ \
  |  |  595|    668|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|    668|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|    668|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1177|       |
 1178|    668|    IGRAPH_CHECK(igraph_stack_int_init(&S, no_of_nodes));
  ------------------
  |  |  648|    668|    do { \
  |  |  649|    668|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    668|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    668|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 668]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    668|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1179|    668|    IGRAPH_FINALLY(igraph_stack_int_destroy, &S);
  ------------------
  |  |  591|    668|    do { \
  |  |  592|    668|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|    668|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|    668|         * incorrect destructor function with the pointer */ \
  |  |  595|    668|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|    668|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|    668|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1180|       |
 1181|    668|    if (!igraph_es_is_all(&eids)) {
  ------------------
  |  Branch (1181:9): [True: 0, False: 668]
  ------------------
 1182|       |        /* result needed only for a subset of the vertices */
 1183|      0|        IGRAPH_VECTOR_INIT_FINALLY(tmpres, no_of_edges);
  ------------------
  |  |  109|      0|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|      0|    do { \
  |  |  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  110|      0|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|      0|    do { \
  |  |  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (110:60): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1184|    668|    } else {
 1185|       |        /* result covers all vertices */
 1186|    668|        IGRAPH_CHECK(igraph_vector_resize(res, no_of_edges));
  ------------------
  |  |  648|    668|    do { \
  |  |  649|    668|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    668|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    668|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 668]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    668|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1187|    668|        igraph_vector_null(res);
 1188|    668|        tmpres = res;
 1189|    668|    }
 1190|       |
 1191|    668|    IGRAPH_CHECK(igraph_vit_create(graph, sources, &vit));
  ------------------
  |  |  648|    668|    do { \
  |  |  649|    668|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    668|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    668|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 668]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    668|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1192|    668|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  591|    668|    do { \
  |  |  592|    668|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|    668|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|    668|         * incorrect destructor function with the pointer */ \
  |  |  595|    668|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|    668|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|    668|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1193|       |
 1194|    668|    for (
 1195|    668|        no_of_processed_sources = 0, IGRAPH_VIT_RESET(vit);
  ------------------
  |  |  202|    668|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
 1196|  7.34k|        !IGRAPH_VIT_END(vit);
  ------------------
  |  |  180|  7.34k|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (1196:9): [True: 6.68k, False: 668]
  ------------------
 1197|  6.68k|        IGRAPH_VIT_NEXT(vit), no_of_processed_sources++
  ------------------
  |  |  168|  6.68k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
 1198|  6.68k|    ) {
 1199|  6.68k|        source = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  215|  6.68k|    ((igraph_integer_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (215:25): [True: 6.68k, False: 0]
  |  |  ------------------
  |  |  216|  6.68k|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1200|       |
 1201|  6.68k|        IGRAPH_PROGRESS(
  ------------------
  |  |  174|  6.68k|    do { \
  |  |  175|  6.68k|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  648|  6.68k|    do { \
  |  |  |  |  649|  6.68k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  6.68k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  6.68k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 6.68k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  6.68k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  176|  6.68k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (176:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1202|  6.68k|            "Edge betweenness centrality (subset): ",
 1203|  6.68k|            100.0 * no_of_processed_sources / no_of_sources, 0
 1204|  6.68k|        );
 1205|  6.68k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   47|  6.68k|    do { \
  |  |   48|  6.68k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (48:13): [True: 0, False: 6.68k]
  |  |  ------------------
  |  |   49|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (49:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   50|      0|                return IGRAPH_INTERRUPTED; \
  |  |   51|      0|            } \
  |  |   52|      0|        } \
  |  |   53|  6.68k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (53:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1206|       |
 1207|       |        /* Loop invariant that is valid at this point:
 1208|       |         *
 1209|       |         * - the stack S is empty
 1210|       |         * - the 'dist' vector contains zeros only
 1211|       |         * - the 'nrgeo' array contains zeros only
 1212|       |         * - the 'tmpscore' array contains zeros only
 1213|       |         * - the 'parents' incidence list contains empty vectors only
 1214|       |         */
 1215|       |
 1216|       |        /* TODO: there is more room for optimization here; the single-source
 1217|       |         * shortest path search runs until it reaches all the nodes in the
 1218|       |         * component of the source node even if we are only interested in a
 1219|       |         * smaller target subset. We could stop the search when all target
 1220|       |         * nodes were reached.
 1221|       |         */
 1222|       |
 1223|       |        /* Conduct a single-source shortest path search from the source node */
 1224|  6.68k|        if (weights) {
  ------------------
  |  Branch (1224:13): [True: 6.68k, False: 0]
  ------------------
 1225|  6.68k|            IGRAPH_CHECK(igraph_i_sspf_weighted_edge(graph, source, &dist, nrgeo, weights, &S, &parents, &inclist, -1));
  ------------------
  |  |  648|  6.68k|    do { \
  |  |  649|  6.68k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  6.68k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  6.68k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 6.68k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  6.68k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1226|  6.68k|        } else {
 1227|      0|            IGRAPH_CHECK(igraph_i_sspf_edge(graph, source, &dist, nrgeo, &S, &parents, &inclist, -1));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1228|      0|        }
 1229|       |
 1230|       |        /* Aggregate betweenness scores for the nodes we have reached in this
 1231|       |         * traversal */
 1232|  28.9k|        while (!igraph_stack_int_empty(&S)) {
  ------------------
  |  Branch (1232:16): [True: 22.2k, False: 6.68k]
  ------------------
 1233|  22.2k|            igraph_integer_t actnode = igraph_stack_int_pop(&S);
 1234|  22.2k|            igraph_vector_int_t *fatv = igraph_inclist_get(&parents, actnode);
  ------------------
  |  |  107|  22.2k|#define igraph_inclist_get(il,no) (&(il)->incs[(igraph_integer_t)(no)])
  ------------------
 1235|  22.2k|            igraph_integer_t fatv_len = igraph_vector_int_size(fatv);
 1236|  22.2k|            igraph_real_t coeff;
 1237|       |
 1238|  22.2k|            if (is_target[actnode]) {
  ------------------
  |  Branch (1238:17): [True: 10.7k, False: 11.5k]
  ------------------
 1239|  10.7k|                coeff = (1 + tmpscore[actnode]) / nrgeo[actnode];
 1240|  11.5k|            } else {
 1241|  11.5k|                coeff = tmpscore[actnode] / nrgeo[actnode];
 1242|  11.5k|            }
 1243|       |
 1244|  43.5k|            for (j = 0; j < fatv_len; j++) {
  ------------------
  |  Branch (1244:25): [True: 21.3k, False: 22.2k]
  ------------------
 1245|  21.3k|                igraph_integer_t father_edge = VECTOR(*fatv)[j];
  ------------------
  |  |   65|  21.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1246|  21.3k|                igraph_integer_t neighbor = IGRAPH_OTHER(graph, father_edge, actnode);
  ------------------
  |  |  144|  21.3k|    ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  126|  21.3k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  21.3k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  113|  21.3k|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  21.3k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  126|      0|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (144:25): [True: 21.3k, False: 0]
  |  |  ------------------
  ------------------
 1247|  21.3k|                tmpscore[neighbor] += nrgeo[neighbor] * coeff;
 1248|  21.3k|                VECTOR(*tmpres)[father_edge] += nrgeo[neighbor] * coeff;
  ------------------
  |  |   65|  21.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1249|  21.3k|            }
 1250|       |
 1251|       |            /* Reset variables to ensure that the 'for' loop invariant will
 1252|       |             * still be valid in the next iteration */
 1253|       |
 1254|  22.2k|            VECTOR(dist)[actnode] = 0;
  ------------------
  |  |   65|  22.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1255|  22.2k|            nrgeo[actnode] = 0;
 1256|  22.2k|            tmpscore[actnode] = 0;
 1257|  22.2k|            igraph_vector_int_clear(fatv);
 1258|  22.2k|        }
 1259|  6.68k|    }
 1260|       |
 1261|    668|    igraph_vit_destroy(&vit);
 1262|    668|    IGRAPH_FINALLY_CLEAN(1);
 1263|       |
 1264|       |    /* Keep only the requested edges */
 1265|    668|    if (!igraph_es_is_all(&eids)) {
  ------------------
  |  Branch (1265:9): [True: 0, False: 668]
  ------------------
 1266|      0|        IGRAPH_CHECK(igraph_eit_create(graph, eids, &eit));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1267|      0|        IGRAPH_FINALLY(igraph_eit_destroy, &eit);
  ------------------
  |  |  591|      0|    do { \
  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1268|       |
 1269|      0|        IGRAPH_CHECK(igraph_vector_resize(res, IGRAPH_EIT_SIZE(eit)));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1270|       |
 1271|      0|        for (j = 0, IGRAPH_EIT_RESET(eit); !IGRAPH_EIT_END(eit);
  ------------------
  |  |  392|      0|#define IGRAPH_EIT_RESET(eit) ((eit).pos = (eit).start)
  ------------------
                      for (j = 0, IGRAPH_EIT_RESET(eit); !IGRAPH_EIT_END(eit);
  ------------------
  |  |  370|      0|#define IGRAPH_EIT_END(eit)   ((eit).pos >= (eit).end)
  ------------------
  |  Branch (1271:44): [True: 0, False: 0]
  ------------------
 1272|      0|             IGRAPH_EIT_NEXT(eit), j++) {
  ------------------
  |  |  358|      0|#define IGRAPH_EIT_NEXT(eit) (++((eit).pos))
  ------------------
 1273|      0|            igraph_integer_t edge = IGRAPH_EIT_GET(eit);
  ------------------
  |  |  404|      0|    (igraph_integer_t)((((eit).type == IGRAPH_EIT_RANGE) ? (eit).pos : \
  |  |  ------------------
  |  |  |  Branch (404:25): [True: 0, False: 0]
  |  |  ------------------
  |  |  405|      0|                        VECTOR(*(eit).vec)[(eit).pos]))
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1274|      0|            VECTOR(*res)[j] = VECTOR(*tmpres)[edge];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*res)[j] = VECTOR(*tmpres)[edge];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1275|      0|        }
 1276|       |
 1277|      0|        igraph_eit_destroy(&eit);
 1278|      0|        igraph_vector_destroy(tmpres);
 1279|      0|        IGRAPH_FINALLY_CLEAN(2);
 1280|      0|    }
 1281|       |
 1282|       |
 1283|    668|    if (!directed || !igraph_is_directed(graph)) {
  ------------------
  |  Branch (1283:9): [True: 0, False: 668]
  |  Branch (1283:22): [True: 0, False: 668]
  ------------------
 1284|      0|        igraph_vector_scale(res, 0.5);
 1285|      0|    }
 1286|       |
 1287|    668|    igraph_stack_int_destroy(&S);
 1288|    668|    IGRAPH_FREE(tmpscore);
  ------------------
  |  |   41|    668|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1289|    668|    IGRAPH_FREE(nrgeo);
  ------------------
  |  |   41|    668|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1290|    668|    igraph_vector_destroy(&dist);
 1291|    668|    igraph_inclist_destroy(&parents);
 1292|    668|    igraph_inclist_destroy(&inclist);
 1293|    668|    IGRAPH_FREE(is_target);
  ------------------
  |  |   41|    668|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1294|    668|    IGRAPH_FINALLY_CLEAN(7);
 1295|       |
 1296|    668|    return IGRAPH_SUCCESS;
 1297|    668|}
betweenness.c:igraph_i_betweenness_check_weights:
  427|  4.26k|) {
  428|  4.26k|    igraph_real_t minweight;
  429|       |
  430|  4.26k|    if (weights) {
  ------------------
  |  Branch (430:9): [True: 4.26k, False: 0]
  ------------------
  431|  4.26k|        if (igraph_vector_size(weights) != no_of_edges) {
  ------------------
  |  Branch (431:13): [True: 0, False: 4.26k]
  ------------------
  432|      0|            IGRAPH_ERROR("Weight vector length must match the number of edges.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  433|      0|        }
  434|  4.26k|        if (no_of_edges > 0) {
  ------------------
  |  Branch (434:13): [True: 4.04k, False: 222]
  ------------------
  435|  4.04k|            minweight = igraph_vector_min(weights);
  436|  4.04k|            if (minweight <= 0) {
  ------------------
  |  Branch (436:17): [True: 0, False: 4.04k]
  ------------------
  437|      0|                IGRAPH_ERROR("Weight vector must be positive.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  438|  4.04k|            } else if (isnan(minweight)) {
  439|      0|                IGRAPH_ERROR("Weight vector must not contain NaN values.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  440|  4.04k|            } else if (minweight <= IGRAPH_SHORTEST_PATH_EPSILON) {
  ------------------
  |  |   41|  4.04k|#define IGRAPH_SHORTEST_PATH_EPSILON 1e-10
  ------------------
  |  Branch (440:24): [True: 0, False: 4.04k]
  ------------------
  441|      0|                IGRAPH_WARNING(
  ------------------
  |  |  789|      0|    do { \
  |  |  790|      0|        igraph_warning(reason, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  791|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (791:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  442|      0|                    "Some weights are smaller than epsilon, calculations may "
  443|      0|                    "suffer from numerical precision issues."
  444|      0|                );
  445|      0|            }
  446|  4.04k|        }
  447|  4.26k|    }
  448|       |
  449|  4.26k|    return IGRAPH_SUCCESS;
  450|  4.26k|}
betweenness.c:igraph_i_sspf_weighted:
  234|  67.0k|        igraph_real_t cutoff) {
  235|       |
  236|  67.0k|    const igraph_real_t eps = IGRAPH_SHORTEST_PATH_EPSILON;
  ------------------
  |  |   41|  67.0k|#define IGRAPH_SHORTEST_PATH_EPSILON 1e-10
  ------------------
  237|       |
  238|  67.0k|    int cmp_result;
  239|  67.0k|    igraph_2wheap_t queue;
  240|  67.0k|    const igraph_vector_int_t *neis;
  241|  67.0k|    igraph_vector_int_t *v;
  242|  67.0k|    igraph_integer_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|  67.0k|    IGRAPH_CHECK(igraph_2wheap_init(&queue, igraph_vcount(graph)));
  ------------------
  |  |  648|  67.0k|    do { \
  |  |  649|  67.0k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  67.0k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  67.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 67.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  67.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  247|  67.0k|    IGRAPH_FINALLY(igraph_2wheap_destroy, &queue);
  ------------------
  |  |  591|  67.0k|    do { \
  |  |  592|  67.0k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  67.0k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  67.0k|         * incorrect destructor function with the pointer */ \
  |  |  595|  67.0k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  67.0k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  67.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  248|       |
  249|  67.0k|    igraph_2wheap_push_with_index(&queue, source, -1.0);
  250|  67.0k|    VECTOR(*dist)[source] = 1.0;
  ------------------
  |  |   65|  67.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  251|  67.0k|    nrgeo[source] = 1;
  252|       |
  253|   252k|    while (!igraph_2wheap_empty(&queue)) {
  ------------------
  |  Branch (253:12): [True: 185k, False: 67.0k]
  ------------------
  254|   185k|        igraph_integer_t minnei = igraph_2wheap_max_index(&queue);
  255|   185k|        igraph_real_t mindist = -igraph_2wheap_delete_max(&queue);
  256|       |
  257|       |        /* Ignore vertices that are more distant than the cutoff */
  258|   185k|        if (cutoff >= 0 && mindist > cutoff + 1.0) {
  ------------------
  |  Branch (258:13): [True: 171k, False: 14.1k]
  |  Branch (258:28): [True: 1.16k, False: 170k]
  ------------------
  259|       |            /* Reset variables if node is too distant */
  260|  1.16k|            VECTOR(*dist)[minnei] = 0;
  ------------------
  |  |   65|  1.16k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  261|  1.16k|            nrgeo[minnei] = 0;
  262|  1.16k|            igraph_vector_int_clear(igraph_adjlist_get(parents, minnei));
  ------------------
  |  |   78|  1.16k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_integer_t)(no)])
  ------------------
  263|  1.16k|            continue;
  264|  1.16k|        }
  265|       |
  266|       |        /* Record that we have visited this node */
  267|   184k|        IGRAPH_CHECK(igraph_stack_int_push(stack, minnei));
  ------------------
  |  |  648|   184k|    do { \
  |  |  649|   184k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|   184k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|   184k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 184k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|   184k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  268|       |
  269|       |        /* Now check all neighbors of 'minnei' for a shorter path */
  270|   184k|        neis = igraph_inclist_get(inclist, minnei);
  ------------------
  |  |  107|   184k|#define igraph_inclist_get(il,no) (&(il)->incs[(igraph_integer_t)(no)])
  ------------------
  271|   184k|        nlen = igraph_vector_int_size(neis);
  272|   472k|        for (igraph_integer_t j = 0; j < nlen; j++) {
  ------------------
  |  Branch (272:38): [True: 288k, False: 184k]
  ------------------
  273|   288k|            igraph_integer_t edge = VECTOR(*neis)[j];
  ------------------
  |  |   65|   288k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  274|   288k|            igraph_integer_t to = IGRAPH_OTHER(graph, edge, minnei);
  ------------------
  |  |  144|   288k|    ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  126|   288k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|   288k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  113|      0|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  126|   288k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|   288k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (144:25): [True: 0, False: 288k]
  |  |  ------------------
  ------------------
  275|   288k|            igraph_real_t altdist = mindist + VECTOR(*weights)[edge];
  ------------------
  |  |   65|   288k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  276|   288k|            igraph_real_t curdist = VECTOR(*dist)[to];
  ------------------
  |  |   65|   288k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  277|       |
  278|   288k|            if (curdist == 0) {
  ------------------
  |  Branch (278:17): [True: 118k, False: 170k]
  ------------------
  279|       |                /* this means curdist is infinity */
  280|   118k|                cmp_result = -1;
  281|   170k|            } else {
  282|   170k|                cmp_result = igraph_cmp_epsilon(altdist, curdist, eps);
  283|   170k|            }
  284|       |
  285|   288k|            if (curdist == 0) {
  ------------------
  |  Branch (285:17): [True: 118k, False: 170k]
  ------------------
  286|       |                /* This is the first non-infinite distance */
  287|   118k|                v = igraph_adjlist_get(parents, to);
  ------------------
  |  |   78|   118k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_integer_t)(no)])
  ------------------
  288|   118k|                IGRAPH_CHECK(igraph_vector_int_resize(v, 1));
  ------------------
  |  |  648|   118k|    do { \
  |  |  649|   118k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|   118k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|   118k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 118k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|   118k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  289|   118k|                VECTOR(*v)[0] = minnei;
  ------------------
  |  |   65|   118k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  290|   118k|                nrgeo[to] = nrgeo[minnei];
  291|   118k|                VECTOR(*dist)[to] = altdist;
  ------------------
  |  |   65|   118k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  292|   118k|                IGRAPH_CHECK(igraph_2wheap_push_with_index(&queue, to, -altdist));
  ------------------
  |  |  648|   118k|    do { \
  |  |  649|   118k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|   118k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|   118k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 118k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|   118k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  293|   170k|            } else if (cmp_result < 0) {
  ------------------
  |  Branch (293:24): [True: 17.5k, False: 152k]
  ------------------
  294|       |                /* This is a shorter path */
  295|  17.5k|                v = igraph_adjlist_get(parents, to);
  ------------------
  |  |   78|  17.5k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_integer_t)(no)])
  ------------------
  296|  17.5k|                IGRAPH_CHECK(igraph_vector_int_resize(v, 1));
  ------------------
  |  |  648|  17.5k|    do { \
  |  |  649|  17.5k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  17.5k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  17.5k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 17.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  17.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  297|  17.5k|                VECTOR(*v)[0] = minnei;
  ------------------
  |  |   65|  17.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  298|  17.5k|                nrgeo[to] = nrgeo[minnei];
  299|  17.5k|                VECTOR(*dist)[to] = altdist;
  ------------------
  |  |   65|  17.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  300|  17.5k|                igraph_2wheap_modify(&queue, to, -altdist);
  301|   152k|            } else if (cmp_result == 0 && (altdist <= cutoff + 1.0 || cutoff < 0)) {
  ------------------
  |  Branch (301:24): [True: 20.2k, False: 132k]
  |  Branch (301:44): [True: 15.6k, False: 4.65k]
  |  Branch (301:71): [True: 4.28k, False: 372]
  ------------------
  302|       |                /* Only add if the node is not more distant than the cutoff */
  303|  19.9k|                v = igraph_adjlist_get(parents, to);
  ------------------
  |  |   78|  19.9k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_integer_t)(no)])
  ------------------
  304|  19.9k|                IGRAPH_CHECK(igraph_vector_int_push_back(v, minnei));
  ------------------
  |  |  648|  19.9k|    do { \
  |  |  649|  19.9k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  19.9k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  19.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 19.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  19.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  305|  19.9k|                nrgeo[to] += nrgeo[minnei];
  306|  19.9k|            }
  307|   288k|        }
  308|   184k|    }
  309|       |
  310|  67.0k|    igraph_2wheap_destroy(&queue);
  311|  67.0k|    IGRAPH_FINALLY_CLEAN(1);
  312|       |
  313|  67.0k|    return IGRAPH_SUCCESS;
  314|  67.0k|}
betweenness.c:igraph_i_sspf_weighted_edge:
  343|  70.3k|        igraph_real_t cutoff) {
  344|       |
  345|  70.3k|    const igraph_real_t eps = IGRAPH_SHORTEST_PATH_EPSILON;
  ------------------
  |  |   41|  70.3k|#define IGRAPH_SHORTEST_PATH_EPSILON 1e-10
  ------------------
  346|       |
  347|  70.3k|    int cmp_result;
  348|  70.3k|    igraph_2wheap_t queue;
  349|  70.3k|    const igraph_vector_int_t *neis;
  350|  70.3k|    igraph_vector_int_t *v;
  351|  70.3k|    igraph_integer_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|  70.3k|    IGRAPH_CHECK(igraph_2wheap_init(&queue, igraph_vcount(graph)));
  ------------------
  |  |  648|  70.3k|    do { \
  |  |  649|  70.3k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  70.3k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  70.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 70.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  70.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  356|  70.3k|    IGRAPH_FINALLY(igraph_2wheap_destroy, &queue);
  ------------------
  |  |  591|  70.3k|    do { \
  |  |  592|  70.3k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  70.3k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  70.3k|         * incorrect destructor function with the pointer */ \
  |  |  595|  70.3k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  70.3k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  70.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  357|       |
  358|  70.3k|    igraph_2wheap_push_with_index(&queue, source, -1.0);
  359|  70.3k|    VECTOR(*dist)[source] = 1.0;
  ------------------
  |  |   65|  70.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  360|  70.3k|    nrgeo[source] = 1;
  361|       |
  362|   341k|    while (!igraph_2wheap_empty(&queue)) {
  ------------------
  |  Branch (362:12): [True: 271k, False: 70.3k]
  ------------------
  363|   271k|        igraph_integer_t minnei = igraph_2wheap_max_index(&queue);
  364|   271k|        igraph_real_t mindist = -igraph_2wheap_delete_max(&queue);
  365|       |
  366|       |        /* Ignore vertices that are more distant than the cutoff */
  367|   271k|        if (cutoff >= 0 && mindist > cutoff + 1.0) {
  ------------------
  |  Branch (367:13): [True: 249k, False: 22.2k]
  |  Branch (367:28): [True: 4.42k, False: 244k]
  ------------------
  368|       |            /* Reset variables if node is too distant */
  369|  4.42k|            VECTOR(*dist)[minnei] = 0;
  ------------------
  |  |   65|  4.42k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  370|  4.42k|            nrgeo[minnei] = 0;
  371|  4.42k|            igraph_vector_int_clear(igraph_inclist_get(parents, minnei));
  ------------------
  |  |  107|  4.42k|#define igraph_inclist_get(il,no) (&(il)->incs[(igraph_integer_t)(no)])
  ------------------
  372|  4.42k|            continue;
  373|  4.42k|        }
  374|       |
  375|       |        /* Record that we have visited this node */
  376|   267k|        IGRAPH_CHECK(igraph_stack_int_push(stack, minnei));
  ------------------
  |  |  648|   267k|    do { \
  |  |  649|   267k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|   267k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|   267k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 267k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|   267k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  377|       |
  378|       |        /* Now check all neighbors of 'minnei' for a shorter path */
  379|   267k|        neis = igraph_inclist_get(inclist, minnei);
  ------------------
  |  |  107|   267k|#define igraph_inclist_get(il,no) (&(il)->incs[(igraph_integer_t)(no)])
  ------------------
  380|   267k|        nlen = igraph_vector_int_size(neis);
  381|   932k|        for (igraph_integer_t j = 0; j < nlen; j++) {
  ------------------
  |  Branch (381:38): [True: 665k, False: 267k]
  ------------------
  382|   665k|            igraph_integer_t edge = VECTOR(*neis)[j];
  ------------------
  |  |   65|   665k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  383|   665k|            igraph_integer_t to = IGRAPH_OTHER(graph, edge, minnei);
  ------------------
  |  |  144|   665k|    ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  126|   665k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|   665k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  113|   248k|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|   248k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  126|   416k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|   416k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (144:25): [True: 248k, False: 416k]
  |  |  ------------------
  ------------------
  384|   665k|            igraph_real_t altdist = mindist + VECTOR(*weights)[edge];
  ------------------
  |  |   65|   665k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  385|   665k|            igraph_real_t curdist = VECTOR(*dist)[to];
  ------------------
  |  |   65|   665k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  386|       |
  387|   665k|            if (curdist == 0) {
  ------------------
  |  Branch (387:17): [True: 201k, False: 464k]
  ------------------
  388|       |                /* this means curdist is infinity */
  389|   201k|                cmp_result = -1;
  390|   464k|            } else {
  391|   464k|                cmp_result = igraph_cmp_epsilon(altdist, curdist, eps);
  392|   464k|            }
  393|       |
  394|   665k|            if (curdist == 0) {
  ------------------
  |  Branch (394:17): [True: 201k, False: 464k]
  ------------------
  395|       |                /* This is the first non-infinite distance */
  396|   201k|                v = igraph_inclist_get(parents, to);
  ------------------
  |  |  107|   201k|#define igraph_inclist_get(il,no) (&(il)->incs[(igraph_integer_t)(no)])
  ------------------
  397|   201k|                IGRAPH_CHECK(igraph_vector_int_resize(v, 1));
  ------------------
  |  |  648|   201k|    do { \
  |  |  649|   201k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|   201k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|   201k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 201k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|   201k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  398|   201k|                VECTOR(*v)[0] = edge;
  ------------------
  |  |   65|   201k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  399|   201k|                nrgeo[to] = nrgeo[minnei];
  400|   201k|                VECTOR(*dist)[to] = altdist;
  ------------------
  |  |   65|   201k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  401|   201k|                IGRAPH_CHECK(igraph_2wheap_push_with_index(&queue, to, -altdist));
  ------------------
  |  |  648|   201k|    do { \
  |  |  649|   201k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|   201k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|   201k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 201k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|   201k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  402|   464k|            } else if (cmp_result < 0) {
  ------------------
  |  Branch (402:24): [True: 44.0k, False: 420k]
  ------------------
  403|       |                /* This is a shorter path */
  404|  44.0k|                v = igraph_inclist_get(parents, to);
  ------------------
  |  |  107|  44.0k|#define igraph_inclist_get(il,no) (&(il)->incs[(igraph_integer_t)(no)])
  ------------------
  405|  44.0k|                IGRAPH_CHECK(igraph_vector_int_resize(v, 1));
  ------------------
  |  |  648|  44.0k|    do { \
  |  |  649|  44.0k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  44.0k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  44.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 44.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  44.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  406|  44.0k|                VECTOR(*v)[0] = edge;
  ------------------
  |  |   65|  44.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  407|  44.0k|                nrgeo[to] = nrgeo[minnei];
  408|  44.0k|                VECTOR(*dist)[to] = altdist;
  ------------------
  |  |   65|  44.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  409|  44.0k|                igraph_2wheap_modify(&queue, to, -altdist);
  410|   420k|            } else if (cmp_result == 0 && (altdist <= cutoff + 1.0 || cutoff < 0)) {
  ------------------
  |  Branch (410:24): [True: 36.0k, False: 384k]
  |  Branch (410:44): [True: 29.8k, False: 6.15k]
  |  Branch (410:71): [True: 5.72k, False: 430]
  ------------------
  411|       |                /* Only add if the node is not more distant than the cutoff */
  412|  35.5k|                v = igraph_inclist_get(parents, to);
  ------------------
  |  |  107|  35.5k|#define igraph_inclist_get(il,no) (&(il)->incs[(igraph_integer_t)(no)])
  ------------------
  413|  35.5k|                IGRAPH_CHECK(igraph_vector_int_push_back(v, edge));
  ------------------
  |  |  648|  35.5k|    do { \
  |  |  649|  35.5k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  35.5k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  35.5k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 35.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  35.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  414|  35.5k|                nrgeo[to] += nrgeo[minnei];
  415|  35.5k|            }
  416|   665k|        }
  417|   267k|    }
  418|       |
  419|  70.3k|    igraph_2wheap_destroy(&queue);
  420|  70.3k|    IGRAPH_FINALLY_CLEAN(1);
  421|       |
  422|  70.3k|    return IGRAPH_SUCCESS;
  423|  70.3k|}

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

igraph_pagerank:
  284|    732|                    const igraph_vector_t *weights, igraph_arpack_options_t *options) {
  285|    732|    return igraph_personalized_pagerank(graph, algo, vector, value, vids,
  286|    732|                                        directed, damping, NULL, weights,
  287|    732|                                        options);
  288|    732|}
igraph_personalized_pagerank:
  455|    732|                                 igraph_arpack_options_t *options) {
  456|       |
  457|    732|    if (damping < 0.0 || damping > 1.0) {
  ------------------
  |  Branch (457:9): [True: 0, False: 732]
  |  Branch (457:26): [True: 0, False: 732]
  ------------------
  458|      0|        IGRAPH_ERROR("The PageRank damping factor must be in the range [0,1].", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  459|      0|    }
  460|       |
  461|    732|    if (algo == IGRAPH_PAGERANK_ALGO_ARPACK) {
  ------------------
  |  Branch (461:9): [True: 0, False: 732]
  ------------------
  462|      0|        return igraph_i_personalized_pagerank_arpack(graph, vector, value, vids,
  463|      0|                directed, damping, reset,
  464|      0|                weights, options ? options : igraph_arpack_options_get_default()
  ------------------
  |  Branch (464:26): [True: 0, False: 0]
  ------------------
  465|      0|        );
  466|    732|    } else if (algo == IGRAPH_PAGERANK_ALGO_PRPACK) {
  ------------------
  |  Branch (466:16): [True: 732, False: 0]
  ------------------
  467|    732|        return igraph_i_personalized_pagerank_prpack(graph, vector, value, vids,
  468|    732|                directed, damping, reset,
  469|    732|                weights);
  470|    732|    }
  471|       |
  472|      0|    IGRAPH_ERROR("Unknown PageRank algorithm", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  473|      0|}

igraph_i_personalized_pagerank_prpack:
   41|    732|                                          const igraph_vector_t *weights) {
   42|    732|    IGRAPH_HANDLE_EXCEPTIONS_BEGIN;
  ------------------
  |  |   21|    732|    try {
  ------------------
   43|       |
   44|    732|    igraph_integer_t i, no_of_nodes = igraph_vcount(graph);
   45|       |
   46|    732|    double *u = nullptr;
   47|    732|    std::unique_ptr<double[]> v;
   48|       |
   49|    732|    if (reset) {
  ------------------
  |  Branch (49:9): [True: 0, False: 732]
  ------------------
   50|      0|        if (igraph_vector_size(reset) != no_of_nodes) {
  ------------------
  |  Branch (50:13): [True: 0, False: 0]
  ------------------
   51|      0|            IGRAPH_ERROR("Invalid length of reset vector when calculating personalized PageRank scores.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   52|      0|        }
   53|       |
   54|       |        /* Normalize reset vector so the sum is 1 */
   55|      0|        double reset_min = igraph_vector_min(reset);
   56|      0|        if (reset_min < 0) {
  ------------------
  |  Branch (56:13): [True: 0, False: 0]
  ------------------
   57|      0|            IGRAPH_ERROR("The reset vector must not contain negative elements.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   58|      0|        }
   59|      0|        if (isnan(reset_min)) {
  ------------------
  |  Branch (59:13): [True: 0, False: 0]
  ------------------
   60|      0|            IGRAPH_ERROR("The reset vector must not contain NaN values.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   61|      0|        }
   62|       |
   63|      0|        double reset_sum = igraph_vector_sum(reset);
   64|      0|        if (reset_sum == 0) {
  ------------------
  |  Branch (64:13): [True: 0, False: 0]
  ------------------
   65|      0|            IGRAPH_ERROR("The sum of the elements in the reset vector must not be zero.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   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;
  ------------------
  |  |   65|      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|    732|    if (damping > 0.999) {
  ------------------
  |  Branch (83:9): [True: 0, False: 732]
  ------------------
   84|      0|        IGRAPH_WARNINGF(
  ------------------
  |  |  769|      0|    do { \
  |  |  770|      0|        igraph_warningf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  771|      0|                        __VA_ARGS__); \
  |  |  772|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (772:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   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|    732|    prpack_igraph_graph prpack_graph;
   92|    732|    IGRAPH_CHECK(prpack_graph.convert_from_igraph(graph, weights, directed));
  ------------------
  |  |  648|    732|    do { \
  |  |  649|    732|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    732|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    732|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 732]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   93|    732|    prpack_solver solver(&prpack_graph, false);
   94|    732|    std::unique_ptr<const prpack_result> res( solver.solve(damping, 1e-10, u, v.get(), "") );
   95|       |
   96|       |    // Delete the personalization vector
   97|    732|    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|    732|    {
  109|       |        // Use of igraph "finally" stack is safe in this block
  110|       |        // since no exceptions can be thrown from here.
  111|       |
  112|    732|        igraph_vit_t vit;
  113|    732|        IGRAPH_CHECK(igraph_vit_create(graph, vids, &vit));
  ------------------
  |  |  648|    732|    do { \
  |  |  649|    732|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    732|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    732|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 732]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  114|    732|        IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  591|    732|    do { \
  |  |  592|    732|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|    732|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|    732|         * incorrect destructor function with the pointer */ \
  |  |  595|    732|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|    732|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  115|    732|        igraph_integer_t nodes_to_calc = IGRAPH_VIT_SIZE(vit);
  ------------------
  |  |  191|    732|#define IGRAPH_VIT_SIZE(vit)  ((vit).end - (vit).start)
  ------------------
  116|    732|        IGRAPH_CHECK(igraph_vector_resize(vector, nodes_to_calc));
  ------------------
  |  |  648|    732|    do { \
  |  |  649|    732|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    732|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    732|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 732]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  117|  32.5k|        for (IGRAPH_VIT_RESET(vit), i = 0; !IGRAPH_VIT_END(vit);
  ------------------
  |  |  202|    732|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
                      for (IGRAPH_VIT_RESET(vit), i = 0; !IGRAPH_VIT_END(vit);
  ------------------
  |  |  180|  32.5k|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (117:44): [True: 31.8k, False: 732]
  ------------------
  118|  31.8k|             IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  168|  31.8k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  119|  31.8k|            VECTOR(*vector)[i] = res->x[IGRAPH_VIT_GET(vit)];
  ------------------
  |  |   65|  31.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*vector)[i] = res->x[IGRAPH_VIT_GET(vit)];
  ------------------
  |  |  215|  31.8k|    ((igraph_integer_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (215:25): [True: 31.8k, False: 0]
  |  |  ------------------
  |  |  216|  31.8k|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  120|  31.8k|        }
  121|    732|        igraph_vit_destroy(&vit);
  122|    732|        IGRAPH_FINALLY_CLEAN(1);
  123|    732|    }
  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|    732|    if (value) {
  ------------------
  |  Branch (127:9): [True: 732, False: 0]
  ------------------
  128|    732|        *value = 1.0;
  129|    732|    }
  130|       |
  131|    732|    return IGRAPH_SUCCESS;
  132|       |
  133|    732|    IGRAPH_HANDLE_EXCEPTIONS_END;
  ------------------
  |  |   23|    732|    } \
  |  |   24|    732|    catch (const std::bad_alloc &e) { IGRAPH_ERROR(e.what(), IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ } \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   25|    732|    catch (const std::range_error &e) { IGRAPH_ERROR(e.what(), IGRAPH_EOVERFLOW); /* LCOV_EXCL_LINE */ } \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   26|    732|    catch (const std::exception &e) { IGRAPH_ERROR(e.what(), IGRAPH_FAILURE); /* LCOV_EXCL_LINE */ } \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   27|    732|    catch (...) { IGRAPH_ERROR("Unknown exception caught.", IGRAPH_FAILURE); /* LCOV_EXCL_LINE */ }
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  134|      0|}

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

_ZN6prpack19prpack_igraph_graph19convert_from_igraphEPK8igraph_tPK15igraph_vector_tb:
   14|    732|        const igraph_t *g, const igraph_vector_t *weights, bool directed) {
   15|       |
   16|    732|    const bool treat_as_directed = igraph_is_directed(g) && directed;
  ------------------
  |  Branch (16:36): [True: 732, False: 0]
  |  Branch (16:61): [True: 732, False: 0]
  ------------------
   17|    732|    const igraph_integer_t vcount = igraph_vcount(g);
   18|    732|    const igraph_integer_t ecount = igraph_ecount(g);
   19|    732|    double *p_weight;
   20|    732|    int *p_head;
   21|       |
   22|    732|    if (vcount > INT_MAX) {
  ------------------
  |  Branch (22:9): [True: 0, False: 732]
  ------------------
   23|      0|        IGRAPH_ERROR("Too many vertices for PRPACK.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  ------------------
  |  |  |  |  406|      0|#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   24|      0|    }
   25|    732|    if (ecount > (treat_as_directed ? INT_MAX : INT_MAX/2)) {
  ------------------
  |  Branch (25:9): [True: 0, False: 732]
  |  Branch (25:19): [True: 732, False: 0]
  ------------------
   26|      0|        IGRAPH_ERROR("Too many edges for PRPACK.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  ------------------
  |  |  |  |  406|      0|#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   27|      0|    }
   28|       |
   29|    732|    if (weights && igraph_vector_size(weights) != ecount) {
  ------------------
  |  Branch (29:9): [True: 732, False: 0]
  |  Branch (29:20): [True: 0, False: 732]
  ------------------
   30|      0|        IGRAPH_ERROR("Weight vector length must agree with number of edges.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  ------------------
  |  |  |  |  406|      0|#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   31|      0|    }
   32|       |
   33|       |    // Get the number of vertices and edges. For undirected graphs, we add
   34|       |    // an edge in both directions.
   35|    732|    num_vs = (int) vcount;
   36|    732|    num_es = (int) ecount;
   37|    732|    num_self_es = 0;
   38|    732|    if (!treat_as_directed) {
  ------------------
  |  Branch (38:9): [True: 0, False: 732]
  ------------------
   39|      0|        num_es *= 2;
   40|      0|    }
   41|       |
   42|       |    // Allocate memory for heads and tails
   43|    732|    p_head = heads = new int[num_es];
   44|    732|    tails = new int[num_vs];
   45|    732|    memset(tails, 0, num_vs * sizeof(tails[0]));
   46|       |
   47|       |    // Allocate memory for weights if needed
   48|    732|    if (weights) {
  ------------------
  |  Branch (48:9): [True: 732, False: 0]
  ------------------
   49|    732|        p_weight = vals = new double[num_es];
   50|    732|    }
   51|       |
   52|       |    // Count the number of ignored edges (those with negative or zero weight)
   53|    732|    int num_ignored_es = 0;
   54|       |
   55|    732|    if (treat_as_directed) {
  ------------------
  |  Branch (55:9): [True: 732, 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|    732|        igraph_eit_t eit;
   62|    732|        IGRAPH_CHECK(igraph_eit_create(g, igraph_ess_all(IGRAPH_EDGEORDER_TO), &eit));
  ------------------
  |  |  648|    732|    do { \
  |  |  649|    732|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    732|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    732|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 732]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  |  |  ------------------
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   63|    732|        IGRAPH_FINALLY(igraph_eit_destroy, &eit);
  ------------------
  |  |  591|    732|    do { \
  |  |  592|    732|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|    732|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|    732|         * incorrect destructor function with the pointer */ \
  |  |  595|    732|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|    732|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   64|  18.9k|        while (!IGRAPH_EIT_END(eit)) {
  ------------------
  |  |  370|  18.9k|#define IGRAPH_EIT_END(eit)   ((eit).pos >= (eit).end)
  ------------------
  |  Branch (64:16): [True: 18.2k, False: 732]
  ------------------
   65|  18.2k|            igraph_integer_t eid = IGRAPH_EIT_GET(eit);
  ------------------
  |  |  404|  18.2k|    (igraph_integer_t)((((eit).type == IGRAPH_EIT_RANGE) ? (eit).pos : \
  |  |  ------------------
  |  |  |  Branch (404:25): [True: 0, False: 18.2k]
  |  |  ------------------
  |  |  405|  18.2k|                        VECTOR(*(eit).vec)[(eit).pos]))
  |  |  ------------------
  |  |  |  |   65|  18.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
   66|  18.2k|            IGRAPH_EIT_NEXT(eit);
  ------------------
  |  |  358|  18.2k|#define IGRAPH_EIT_NEXT(eit) (++((eit).pos))
  ------------------
   67|       |
   68|       |            // Handle the weight
   69|  18.2k|            if (weights != NULL) {
  ------------------
  |  Branch (69:17): [True: 18.2k, False: 0]
  ------------------
   70|       |                // Does this edge have zero or negative weight?
   71|  18.2k|                if (VECTOR(*weights)[eid] < 0) {
  ------------------
  |  |   65|  18.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (71:21): [True: 0, False: 18.2k]
  ------------------
   72|       |                    // Negative weights are disallowed.
   73|      0|                    IGRAPH_ERROR("Edge weights must not be negative.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  ------------------
  |  |  |  |  406|      0|#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   74|  18.2k|                } else if (isnan(VECTOR(*weights)[eid])) {
  ------------------
  |  |   65|  18.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (74:28): [True: 0, False: 18.2k]
  ------------------
   75|      0|                    IGRAPH_ERROR("Edge weights must not be NaN.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  ------------------
  |  |  |  |  406|      0|#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   76|  18.2k|                } else if (VECTOR(*weights)[eid] == 0) {
  ------------------
  |  |   65|  18.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (76:28): [True: 0, False: 18.2k]
  ------------------
   77|       |                    // Edges with zero weight are ignored.
   78|      0|                    num_ignored_es++;
   79|      0|                    continue;
   80|      0|                }
   81|       |
   82|  18.2k|                *p_weight = VECTOR(*weights)[eid];
  ------------------
  |  |   65|  18.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   83|  18.2k|                ++p_weight;
   84|  18.2k|            }
   85|       |
   86|  18.2k|            *p_head = IGRAPH_FROM(g, eid);
  ------------------
  |  |  113|  18.2k|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|  18.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
   87|  18.2k|            ++p_head;
   88|  18.2k|            ++tails[IGRAPH_TO(g, eid)];
  ------------------
  |  |  126|  18.2k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|  18.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
   89|       |
   90|  18.2k|            if (IGRAPH_FROM(g, eid) == IGRAPH_TO(g, eid)) {
  ------------------
  |  |  113|  18.2k|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|  18.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
                          if (IGRAPH_FROM(g, eid) == IGRAPH_TO(g, eid)) {
  ------------------
  |  |  126|  18.2k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|  18.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (90:17): [True: 3.94k, False: 14.2k]
  ------------------
   91|  3.94k|                ++num_self_es;
   92|  3.94k|            }
   93|  18.2k|        }
   94|    732|        igraph_eit_destroy(&eit);
   95|    732|        IGRAPH_FINALLY_CLEAN(1);
   96|    732|    } 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));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  |  |  ------------------
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  103|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, &neis);
  ------------------
  |  |  591|      0|    do { \
  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  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));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  |  |  ------------------
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  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) {
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  if (VECTOR(*weights)[VECTOR(neis)[j]] <= 0) {
  ------------------
  |  |   65|      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]];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  *p_weight = VECTOR(*weights)[VECTOR(neis)[j]];
  ------------------
  |  |   65|      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);
  ------------------
  |  |  144|      0|    ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  126|      0|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  113|      0|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  126|      0|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (144:25): [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|    732|    num_es -= num_ignored_es;
  139|       |
  140|       |    // Finalize the tails vector
  141|  32.5k|    for (int i = 0, sum = 0; i < num_vs; ++i) {
  ------------------
  |  Branch (141:30): [True: 31.8k, False: 732]
  ------------------
  142|  31.8k|        int temp = sum;
  143|  31.8k|        sum += tails[i];
  144|  31.8k|        tails[i] = temp;
  145|  31.8k|    }
  146|       |
  147|       |    // Normalize the weights
  148|    732|    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|    732|    return IGRAPH_SUCCESS;
  173|    732|}

_ZN6prpack19prpack_igraph_graphC2Ev:
   16|    732|        prpack_igraph_graph() { }

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

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

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

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

igraph_create:
   65|  2.22k|                  igraph_integer_t n, igraph_bool_t directed) {
   66|  2.22k|    igraph_bool_t has_edges = igraph_vector_int_size(edges) > 0;
   67|  2.22k|    igraph_integer_t max;
   68|       |
   69|  2.22k|    if (igraph_vector_int_size(edges) % 2 != 0) {
  ------------------
  |  Branch (69:9): [True: 0, False: 2.22k]
  ------------------
   70|      0|        IGRAPH_ERROR("Invalid (odd) edges vector.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   71|      0|    }
   72|  2.22k|    if (!igraph_vector_int_isininterval(edges, 0, IGRAPH_VCOUNT_MAX-1)) {
  ------------------
  |  |  105|  2.22k|#define IGRAPH_VCOUNT_MAX (IGRAPH_INTEGER_MAX-1)
  |  |  ------------------
  |  |  |  |   77|  2.22k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  |  |  ------------------
  ------------------
  |  Branch (72:9): [True: 0, False: 2.22k]
  ------------------
   73|      0|        IGRAPH_ERROR("Invalid (negative or too large) vertex ID.", IGRAPH_EINVVID);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   74|      0|    }
   75|       |
   76|       |    /* The + 1 here cannot overflow as above we have already
   77|       |     * checked that vertex IDs are within range. */
   78|  2.22k|    max = has_edges ? igraph_vector_int_max(edges) + 1 : 0;
  ------------------
  |  Branch (78:11): [True: 2.06k, False: 157]
  ------------------
   79|       |
   80|  2.22k|    IGRAPH_CHECK(igraph_empty(graph, n, directed));
  ------------------
  |  |  648|  2.22k|    do { \
  |  |  649|  2.22k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.22k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.22k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.22k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.22k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   81|  2.22k|    IGRAPH_FINALLY(igraph_destroy, graph);
  ------------------
  |  |  591|  2.22k|    do { \
  |  |  592|  2.22k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  2.22k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  2.22k|         * incorrect destructor function with the pointer */ \
  |  |  595|  2.22k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  2.22k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  2.22k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   82|  2.22k|    if (has_edges) {
  ------------------
  |  Branch (82:9): [True: 2.06k, False: 157]
  ------------------
   83|  2.06k|        n = igraph_vcount(graph);
   84|  2.06k|        if (n < max) {
  ------------------
  |  Branch (84:13): [True: 557, False: 1.50k]
  ------------------
   85|    557|            IGRAPH_CHECK(igraph_add_vertices(graph, (max - n), 0));
  ------------------
  |  |  648|    557|    do { \
  |  |  649|    557|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    557|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    557|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 557]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    557|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   86|    557|        }
   87|  2.06k|        IGRAPH_CHECK(igraph_add_edges(graph, edges, 0));
  ------------------
  |  |  648|  2.06k|    do { \
  |  |  649|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   88|  2.06k|    }
   89|       |
   90|  2.22k|    IGRAPH_FINALLY_CLEAN(1);
   91|  2.22k|    return IGRAPH_SUCCESS;
   92|  2.22k|}

IGRAPH_FINALLY_REAL:
  320|   582k|void IGRAPH_FINALLY_REAL(void (*func)(void*), void* ptr) {
  321|   582k|    int no = igraph_i_finally_stack_size;
  322|   582k|    if (no < 0) {
  ------------------
  |  Branch (322:9): [True: 0, False: 582k]
  ------------------
  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);
  ------------------
  |  |  867|      0|    do { \
  |  |  868|      0|        igraph_fatalf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  869|      0|                      __VA_ARGS__); \
  |  |  870|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (870:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  326|      0|    }
  327|   582k|    if (no >= (int) (sizeof(igraph_i_finally_stack) / sizeof(igraph_i_finally_stack[0]))) {
  ------------------
  |  Branch (327:9): [True: 0, False: 582k]
  ------------------
  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);
  ------------------
  |  |  867|      0|    do { \
  |  |  868|      0|        igraph_fatalf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  869|      0|                      __VA_ARGS__); \
  |  |  870|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (870:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  331|      0|    }
  332|   582k|    igraph_i_finally_stack[no].ptr = ptr;
  333|   582k|    igraph_i_finally_stack[no].func = func;
  334|   582k|    igraph_i_finally_stack[no].level = igraph_i_finally_stack_level;
  335|   582k|    igraph_i_finally_stack_size++;
  336|   582k|}
IGRAPH_FINALLY_CLEAN:
  338|   344k|void IGRAPH_FINALLY_CLEAN(int minus) {
  339|   344k|    igraph_i_finally_stack_size -= minus;
  340|   344k|    if (igraph_i_finally_stack_size < 0) {
  ------------------
  |  Branch (340:9): [True: 0, False: 344k]
  ------------------
  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);
  ------------------
  |  |  867|      0|    do { \
  |  |  868|      0|        igraph_fatalf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  869|      0|                      __VA_ARGS__); \
  |  |  870|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (870:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  345|      0|    }
  346|   344k|}
IGRAPH_FINALLY_STACK_SIZE:
  359|    756|int IGRAPH_FINALLY_STACK_SIZE(void) {
  360|    756|    return igraph_i_finally_stack_size;
  361|    756|}
IGRAPH_FINALLY_ENTER:
  377|  4.84k|void IGRAPH_FINALLY_ENTER(void) {
  378|  4.84k|    int no = igraph_i_finally_stack_size;
  379|       |    /* Level indices must always be in increasing order in the finally stack */
  380|  4.84k|    if (no > 0 && igraph_i_finally_stack[no-1].level > igraph_i_finally_stack_level) {
  ------------------
  |  Branch (380:9): [True: 4.84k, False: 0]
  |  Branch (380:19): [True: 0, False: 4.84k]
  ------------------
  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.");
  ------------------
  |  |  887|      0|    do { \
  |  |  888|      0|        igraph_fatal(reason, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  889|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (889:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  384|      0|    }
  385|  4.84k|    igraph_i_finally_stack_level++;
  386|  4.84k|}
IGRAPH_FINALLY_EXIT:
  399|  4.84k|void IGRAPH_FINALLY_EXIT(void) {
  400|  4.84k|    igraph_i_finally_stack_level--;
  401|  4.84k|    if (igraph_i_finally_stack_level < 0) {
  ------------------
  |  Branch (401:9): [True: 0, False: 4.84k]
  ------------------
  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.");
  ------------------
  |  |  887|      0|    do { \
  |  |  888|      0|        igraph_fatal(reason, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  889|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (889:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  405|      0|    }
  406|  4.84k|}
igraph_set_warning_handler:
  523|    771|igraph_warning_handler_t *igraph_set_warning_handler(igraph_warning_handler_t *new_handler) {
  524|    771|    igraph_warning_handler_t *previous_handler = igraph_i_warning_handler;
  525|    771|    igraph_i_warning_handler = new_handler;
  526|    771|    return previous_handler;
  527|    771|}

igraph_fixed_vectorlist_destroy:
   26|  1.46k|void igraph_fixed_vectorlist_destroy(igraph_fixed_vectorlist_t *l) {
   27|  1.46k|    igraph_vector_int_list_destroy(&l->vecs);
   28|  1.46k|}
igraph_fixed_vectorlist_convert:
   33|  1.46k|) {
   34|  1.46k|    igraph_vector_int_t sizes;
   35|  1.46k|    igraph_integer_t i, no = igraph_vector_int_size(from), to;
   36|       |
   37|  1.46k|    IGRAPH_VECTOR_INT_LIST_INIT_FINALLY(&l->vecs, size);
  ------------------
  |  |   62|  1.46k|    do { IGRAPH_CHECK(igraph_vector_int_list_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  1.46k|    do { \
  |  |  |  |  649|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   63|  1.46k|        IGRAPH_FINALLY(igraph_vector_int_list_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  1.46k|    do { \
  |  |  |  |  592|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  1.46k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (63:69): [Folded - Ignored]
  |  |  ------------------
  ------------------
   38|  1.46k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&sizes, size);
  ------------------
  |  |  124|  1.46k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  1.46k|    do { \
  |  |  |  |  649|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  1.46k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  1.46k|    do { \
  |  |  |  |  592|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  1.46k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
   39|       |
   40|  28.5k|    for (i = 0; i < no; i++) {
  ------------------
  |  Branch (40:17): [True: 27.0k, False: 1.46k]
  ------------------
   41|  27.0k|        to = VECTOR(*from)[i];
  ------------------
  |  |   65|  27.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   42|  27.0k|        if (to >= 0) {
  ------------------
  |  Branch (42:13): [True: 26.7k, False: 281]
  ------------------
   43|  26.7k|            VECTOR(sizes)[to] += 1;
  ------------------
  |  |   65|  26.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   44|  26.7k|        }
   45|  27.0k|    }
   46|       |
   47|  28.5k|    for (i = 0; i < no; i++) {
  ------------------
  |  Branch (47:17): [True: 27.0k, False: 1.46k]
  ------------------
   48|  27.0k|        to = VECTOR(*from)[i];
  ------------------
  |  |   65|  27.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   49|  27.0k|        if (to >= 0) {
  ------------------
  |  Branch (49:13): [True: 26.7k, False: 281]
  ------------------
   50|  26.7k|            igraph_vector_int_t *v = igraph_vector_int_list_get_ptr(&l->vecs, to);
   51|  26.7k|            IGRAPH_CHECK(igraph_vector_int_push_back(v, i));
  ------------------
  |  |  648|  26.7k|    do { \
  |  |  649|  26.7k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  26.7k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  26.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 26.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  26.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   52|  26.7k|        }
   53|  27.0k|    }
   54|       |
   55|  1.46k|    igraph_vector_int_destroy(&sizes);
   56|  1.46k|    IGRAPH_FINALLY_CLEAN(2);  /* + l->vecs */
   57|       |
   58|  1.46k|    return IGRAPH_SUCCESS;
   59|  1.46k|}

igraph_2wheap_init:
  806|   141k|igraph_error_t igraph_2wheap_init(igraph_2wheap_t *h, igraph_integer_t max_size) {
  807|   141k|    h->max_size = max_size;
  808|       |    /* We start with the biggest */
  809|   141k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&h->index2, max_size);
  ------------------
  |  |  124|   141k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|   141k|    do { \
  |  |  |  |  649|   141k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|   141k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|   141k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 141k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|   141k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|   141k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|   141k|    do { \
  |  |  |  |  592|   141k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|   141k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|   141k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|   141k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|   141k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|   141k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  810|   141k|    IGRAPH_VECTOR_INIT_FINALLY(&h->data, 0);
  ------------------
  |  |  109|   141k|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|   141k|    do { \
  |  |  |  |  649|   141k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|   141k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|   141k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 141k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|   141k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  110|   141k|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|   141k|    do { \
  |  |  |  |  592|   141k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|   141k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|   141k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|   141k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|   141k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|   141k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (110:60): [Folded - Ignored]
  |  |  ------------------
  ------------------
  811|   141k|    IGRAPH_CHECK(igraph_vector_int_init(&h->index, 0));
  ------------------
  |  |  648|   141k|    do { \
  |  |  649|   141k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|   141k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|   141k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 141k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|   141k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  812|       |    /* IGRAPH_FINALLY(igraph_vector_int_destroy, &h->index); */
  813|       |
  814|   141k|    IGRAPH_FINALLY_CLEAN(2);
  815|   141k|    return IGRAPH_SUCCESS;
  816|   141k|}
igraph_2wheap_destroy:
  821|   141k|void igraph_2wheap_destroy(igraph_2wheap_t *h) {
  822|   141k|    igraph_vector_destroy(&h->data);
  823|   141k|    igraph_vector_int_destroy(&h->index);
  824|   141k|    igraph_vector_int_destroy(&h->index2);
  825|   141k|}
igraph_2wheap_clear:
  830|   165k|void igraph_2wheap_clear(igraph_2wheap_t *h) {
  831|   165k|    igraph_vector_clear(&h->data);
  832|   165k|    igraph_vector_int_clear(&h->index);
  833|   165k|    igraph_vector_int_null(&h->index2);
  834|   165k|}
igraph_2wheap_empty:
  839|  1.43M|igraph_bool_t igraph_2wheap_empty(const igraph_2wheap_t *h) {
  840|  1.43M|    return igraph_vector_empty(&h->data);
  841|  1.43M|}
igraph_2wheap_push_with_index:
  850|  1.13M|                                  igraph_integer_t idx, igraph_real_t elem) {
  851|       |
  852|       |    /*   printf("-> %.2g [%li]\n", elem, idx); */
  853|       |
  854|  1.13M|    igraph_integer_t size = igraph_vector_size(&h->data);
  855|       |
  856|  1.13M|    if (size > IGRAPH_INTEGER_MAX - 2) {
  ------------------
  |  |   77|  1.13M|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (856:9): [True: 0, False: 1.13M]
  ------------------
  857|       |        /* to allow size+2 below */
  858|      0|        IGRAPH_ERROR("Cannot push to 2wheap, already at maximum size.", IGRAPH_EOVERFLOW);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  859|      0|    }
  860|       |
  861|  1.13M|    IGRAPH_CHECK(igraph_vector_push_back(&h->data, elem));
  ------------------
  |  |  648|  1.13M|    do { \
  |  |  649|  1.13M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.13M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.13M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.13M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.13M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  862|  1.13M|    IGRAPH_CHECK(igraph_vector_int_push_back(&h->index, idx));
  ------------------
  |  |  648|  1.13M|    do { \
  |  |  649|  1.13M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.13M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.13M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.13M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.13M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  863|  1.13M|    VECTOR(h->index2)[idx] = size + 2;
  ------------------
  |  |   65|  1.13M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  864|       |
  865|       |    /* maintain heap */
  866|  1.13M|    igraph_i_2wheap_shift_up(h, size);
  867|  1.13M|    return IGRAPH_SUCCESS;
  868|  1.13M|}
igraph_2wheap_size:
  873|  3.86M|igraph_integer_t igraph_2wheap_size(const igraph_2wheap_t *h) {
  874|  3.86M|    return igraph_vector_size(&h->data);
  875|  3.86M|}
igraph_2wheap_max_index:
  897|  1.13M|igraph_integer_t igraph_2wheap_max_index(const igraph_2wheap_t *h) {
  898|  1.13M|    return VECTOR(h->index)[0];
  ------------------
  |  |   65|  1.13M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  899|  1.13M|}
igraph_2wheap_has_elem:
  905|   397k|igraph_bool_t igraph_2wheap_has_elem(const igraph_2wheap_t *h, igraph_integer_t idx) {
  906|   397k|    return VECTOR(h->index2)[idx] != 0;
  ------------------
  |  |   65|   397k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  907|   397k|}
igraph_2wheap_has_active:
  913|   397k|igraph_bool_t igraph_2wheap_has_active(const igraph_2wheap_t *h, igraph_integer_t idx) {
  914|   397k|    return VECTOR(h->index2)[idx] > 1;
  ------------------
  |  |   65|   397k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  915|   397k|}
igraph_2wheap_get:
  920|  84.6k|igraph_real_t igraph_2wheap_get(const igraph_2wheap_t *h, igraph_integer_t idx) {
  921|  84.6k|    igraph_integer_t i = VECTOR(h->index2)[idx] - 2;
  ------------------
  |  |   65|  84.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  922|  84.6k|    return VECTOR(h->data)[i];
  ------------------
  |  |   65|  84.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  923|  84.6k|}
igraph_2wheap_delete_max:
  931|   955k|igraph_real_t igraph_2wheap_delete_max(igraph_2wheap_t *h) {
  932|       |
  933|   955k|    igraph_real_t tmp = VECTOR(h->data)[0];
  ------------------
  |  |   65|   955k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  934|   955k|    igraph_integer_t tmpidx = VECTOR(h->index)[0];
  ------------------
  |  |   65|   955k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  935|   955k|    igraph_i_2wheap_switch(h, 0, igraph_2wheap_size(h) - 1);
  936|   955k|    igraph_vector_pop_back(&h->data);
  937|   955k|    igraph_vector_int_pop_back(&h->index);
  938|   955k|    VECTOR(h->index2)[tmpidx] = 0;
  ------------------
  |  |   65|   955k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  939|   955k|    igraph_i_2wheap_sink(h, 0);
  940|       |
  941|       |    /*   printf("<-max %.2g\n", tmp); */
  942|       |
  943|   955k|    return tmp;
  944|   955k|}
igraph_2wheap_deactivate_max:
  952|   176k|igraph_real_t igraph_2wheap_deactivate_max(igraph_2wheap_t *h) {
  953|       |
  954|   176k|    igraph_real_t tmp = VECTOR(h->data)[0];
  ------------------
  |  |   65|   176k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  955|   176k|    igraph_integer_t tmpidx = VECTOR(h->index)[0];
  ------------------
  |  |   65|   176k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  956|   176k|    igraph_i_2wheap_switch(h, 0, igraph_2wheap_size(h) - 1);
  957|   176k|    igraph_vector_pop_back(&h->data);
  958|   176k|    igraph_vector_int_pop_back(&h->index);
  959|   176k|    VECTOR(h->index2)[tmpidx] = 1;
  ------------------
  |  |   65|   176k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  960|   176k|    igraph_i_2wheap_sink(h, 0);
  961|       |
  962|   176k|    return tmp;
  963|   176k|}
igraph_2wheap_modify:
  991|   172k|void igraph_2wheap_modify(igraph_2wheap_t *h, igraph_integer_t idx, igraph_real_t elem) {
  992|       |
  993|   172k|    igraph_integer_t pos = VECTOR(h->index2)[idx] - 2;
  ------------------
  |  |   65|   172k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  994|       |
  995|       |    /*   printf("-- %.2g -> %.2g\n", VECTOR(h->data)[pos], elem); */
  996|       |
  997|   172k|    VECTOR(h->data)[pos] = elem;
  ------------------
  |  |   65|   172k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  998|   172k|    igraph_i_2wheap_sink(h, pos);
  999|   172k|    igraph_i_2wheap_shift_up(h, pos);
 1000|   172k|}
indheap.c:igraph_i_2wheap_shift_up:
  768|  2.13M|                                     igraph_integer_t elem) {
  769|  2.13M|    if (elem == 0 || VECTOR(h->data)[elem] < VECTOR(h->data)[PARENT(elem)]) {
  ------------------
  |  |   65|  1.49M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                  if (elem == 0 || VECTOR(h->data)[elem] < VECTOR(h->data)[PARENT(elem)]) {
  ------------------
  |  |   65|  1.49M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                  if (elem == 0 || VECTOR(h->data)[elem] < VECTOR(h->data)[PARENT(elem)]) {
  ------------------
  |  |  739|  1.49M|#define PARENT(x)     (((x)+1)/2-1)
  ------------------
  |  Branch (769:9): [True: 641k, False: 1.49M]
  |  Branch (769:22): [True: 662k, False: 831k]
  ------------------
  770|       |        /* at the top */
  771|  1.30M|    } else {
  772|   831k|        igraph_i_2wheap_switch(h, elem, PARENT(elem));
  ------------------
  |  |  739|   831k|#define PARENT(x)     (((x)+1)/2-1)
  ------------------
  773|   831k|        igraph_i_2wheap_shift_up(h, PARENT(elem));
  ------------------
  |  |  739|   831k|#define PARENT(x)     (((x)+1)/2-1)
  ------------------
  774|   831k|    }
  775|  2.13M|}
indheap.c:igraph_i_2wheap_switch:
  749|  3.38M|                                   igraph_integer_t e1, igraph_integer_t e2) {
  750|  3.38M|    if (e1 != e2) {
  ------------------
  |  Branch (750:9): [True: 2.97M, False: 416k]
  ------------------
  751|  2.97M|        igraph_integer_t tmp1, tmp2;
  752|  2.97M|        igraph_real_t tmp3 = VECTOR(h->data)[e1];
  ------------------
  |  |   65|  2.97M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  753|  2.97M|        VECTOR(h->data)[e1] = VECTOR(h->data)[e2];
  ------------------
  |  |   65|  2.97M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      VECTOR(h->data)[e1] = VECTOR(h->data)[e2];
  ------------------
  |  |   65|  2.97M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  754|  2.97M|        VECTOR(h->data)[e2] = tmp3;
  ------------------
  |  |   65|  2.97M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  755|       |
  756|  2.97M|        tmp1 = VECTOR(h->index)[e1];
  ------------------
  |  |   65|  2.97M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  757|  2.97M|        tmp2 = VECTOR(h->index)[e2];
  ------------------
  |  |   65|  2.97M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  758|       |
  759|  2.97M|        VECTOR(h->index2)[tmp1] = e2 + 2;
  ------------------
  |  |   65|  2.97M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  760|  2.97M|        VECTOR(h->index2)[tmp2] = e1 + 2;
  ------------------
  |  |   65|  2.97M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  761|       |
  762|  2.97M|        VECTOR(h->index)[e1] = tmp2;
  ------------------
  |  |   65|  2.97M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  763|  2.97M|        VECTOR(h->index)[e2] = tmp1;
  ------------------
  |  |   65|  2.97M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  764|  2.97M|    }
  765|  3.38M|}
indheap.c:igraph_i_2wheap_sink:
  778|  2.73M|                                 igraph_integer_t head) {
  779|  2.73M|    igraph_integer_t size = igraph_2wheap_size(h);
  780|  2.73M|    if (LEFTCHILD(head) >= size) {
  ------------------
  |  |  740|  2.73M|#define LEFTCHILD(x)  (((x)+1)*2-1)
  ------------------
  |  Branch (780:9): [True: 1.10M, False: 1.62M]
  ------------------
  781|       |        /* no subtrees */
  782|  1.62M|    } else if (RIGHTCHILD(head) == size ||
  ------------------
  |  |  741|  1.62M|#define RIGHTCHILD(x) (((x)+1)*2)
  ------------------
  |  Branch (782:16): [True: 160k, False: 1.46M]
  ------------------
  783|  1.62M|               VECTOR(h->data)[LEFTCHILD(head)] >= VECTOR(h->data)[RIGHTCHILD(head)]) {
  ------------------
  |  |   65|  1.46M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                             VECTOR(h->data)[LEFTCHILD(head)] >= VECTOR(h->data)[RIGHTCHILD(head)]) {
  ------------------
  |  |  740|  1.46M|#define LEFTCHILD(x)  (((x)+1)*2-1)
  ------------------
                             VECTOR(h->data)[LEFTCHILD(head)] >= VECTOR(h->data)[RIGHTCHILD(head)]) {
  ------------------
  |  |   65|  1.46M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                             VECTOR(h->data)[LEFTCHILD(head)] >= VECTOR(h->data)[RIGHTCHILD(head)]) {
  ------------------
  |  |  741|  1.46M|#define RIGHTCHILD(x) (((x)+1)*2)
  ------------------
  |  Branch (783:16): [True: 828k, False: 637k]
  ------------------
  784|       |        /* sink to the left if needed */
  785|   989k|        if (VECTOR(h->data)[head] < VECTOR(h->data)[LEFTCHILD(head)]) {
  ------------------
  |  |   65|   989k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      if (VECTOR(h->data)[head] < VECTOR(h->data)[LEFTCHILD(head)]) {
  ------------------
  |  |   65|   989k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      if (VECTOR(h->data)[head] < VECTOR(h->data)[LEFTCHILD(head)]) {
  ------------------
  |  |  740|   989k|#define LEFTCHILD(x)  (((x)+1)*2-1)
  ------------------
  |  Branch (785:13): [True: 840k, False: 149k]
  ------------------
  786|   840k|            igraph_i_2wheap_switch(h, head, LEFTCHILD(head));
  ------------------
  |  |  740|   840k|#define LEFTCHILD(x)  (((x)+1)*2-1)
  ------------------
  787|   840k|            igraph_i_2wheap_sink(h, LEFTCHILD(head));
  ------------------
  |  |  740|   840k|#define LEFTCHILD(x)  (((x)+1)*2-1)
  ------------------
  788|   840k|        }
  789|   989k|    } else {
  790|       |        /* sink to the right */
  791|   637k|        if (VECTOR(h->data)[head] < VECTOR(h->data)[RIGHTCHILD(head)]) {
  ------------------
  |  |   65|   637k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      if (VECTOR(h->data)[head] < VECTOR(h->data)[RIGHTCHILD(head)]) {
  ------------------
  |  |   65|   637k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      if (VECTOR(h->data)[head] < VECTOR(h->data)[RIGHTCHILD(head)]) {
  ------------------
  |  |  741|   637k|#define RIGHTCHILD(x) (((x)+1)*2)
  ------------------
  |  Branch (791:13): [True: 585k, False: 51.5k]
  ------------------
  792|   585k|            igraph_i_2wheap_switch(h, head, RIGHTCHILD(head));
  ------------------
  |  |  741|   585k|#define RIGHTCHILD(x) (((x)+1)*2)
  ------------------
  793|   585k|            igraph_i_2wheap_sink(h, RIGHTCHILD(head));
  ------------------
  |  |  741|   585k|#define RIGHTCHILD(x) (((x)+1)*2)
  ------------------
  794|   585k|        }
  795|   637k|    }
  796|  2.73M|}

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

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

igraph_stack_int_init:
   45|  4.26k|igraph_error_t FUNCTION(igraph_stack, init)(TYPE(igraph_stack)* s, igraph_integer_t capacity) {
   46|  4.26k|    igraph_integer_t alloc_size;
   47|  4.26k|    IGRAPH_ASSERT(capacity >= 0);
  ------------------
  |  |  916|  4.26k|    do { \
  |  |  917|  4.26k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  4.26k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 4.26k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  4.26k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   48|  4.26k|    alloc_size = capacity > 0 ? capacity : 1;
  ------------------
  |  Branch (48:18): [True: 4.26k, False: 4]
  ------------------
   49|  4.26k|    IGRAPH_ASSERT(s != NULL);
  ------------------
  |  |  916|  4.26k|    do { \
  |  |  917|  4.26k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  4.26k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 4.26k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  4.26k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   50|  4.26k|    s->stor_begin = IGRAPH_CALLOC(alloc_size, BASE);
  ------------------
  |  |   38|  4.26k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  8.52k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 4.26k, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 4.26k, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 4.26k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   51|  4.26k|    if (s->stor_begin == NULL) {
  ------------------
  |  Branch (51:9): [True: 0, False: 4.26k]
  ------------------
   52|      0|        IGRAPH_ERROR("Cannot initialize stack.", IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   53|      0|    }
   54|  4.26k|    s->stor_end = s->stor_begin + alloc_size;
   55|  4.26k|    s->end = s->stor_begin;
   56|       |
   57|  4.26k|    return IGRAPH_SUCCESS;
   58|  4.26k|}
igraph_stack_int_destroy:
   73|  4.26k|void FUNCTION(igraph_stack, destroy)    (TYPE(igraph_stack)* s) {
   74|  4.26k|    IGRAPH_ASSERT(s != NULL);
  ------------------
  |  |  916|  4.26k|    do { \
  |  |  917|  4.26k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  4.26k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 4.26k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  4.26k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   75|  4.26k|    if (s->stor_begin != NULL) {
  ------------------
  |  Branch (75:9): [True: 4.26k, False: 0]
  ------------------
   76|  4.26k|        IGRAPH_FREE(s->stor_begin);
  ------------------
  |  |   41|  4.26k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
   77|  4.26k|        s->stor_begin = NULL;
   78|  4.26k|    }
   79|  4.26k|}
igraph_stack_int_empty:
  155|   588k|igraph_bool_t FUNCTION(igraph_stack, empty)(TYPE(igraph_stack)* s) {
  156|   588k|    IGRAPH_ASSERT(s != NULL);
  ------------------
  |  |  916|   588k|    do { \
  |  |  917|   588k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|   588k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 588k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|   588k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  157|   588k|    IGRAPH_ASSERT(s->stor_begin != NULL);
  ------------------
  |  |  916|   588k|    do { \
  |  |  917|   588k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|   588k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 588k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|   588k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  158|   588k|    return s->stor_begin == s->end;
  159|   588k|}
igraph_stack_int_push:
  209|   451k|igraph_error_t FUNCTION(igraph_stack, push)(TYPE(igraph_stack)* s, BASE elem) {
  210|   451k|    IGRAPH_ASSERT(s != NULL);
  ------------------
  |  |  916|   451k|    do { \
  |  |  917|   451k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|   451k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 451k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|   451k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  211|   451k|    IGRAPH_ASSERT(s->stor_begin != NULL);
  ------------------
  |  |  916|   451k|    do { \
  |  |  917|   451k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|   451k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 451k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|   451k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  212|       |
  213|   451k|    if (s->stor_end == s->end) {
  ------------------
  |  Branch (213:9): [True: 0, False: 451k]
  ------------------
  214|       |        /* full, allocate more storage */
  215|      0|        igraph_integer_t old_size = FUNCTION(igraph_stack, size)(s);
  ------------------
  |  |  183|      0|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   27|      0|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|      0|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  216|      0|        igraph_integer_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   77|      0|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
                      igraph_integer_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   77|      0|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (216:37): [True: 0, False: 0]
  ------------------
  217|      0|        if (old_size == IGRAPH_INTEGER_MAX) {
  ------------------
  |  |   77|      0|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (217:13): [True: 0, False: 0]
  ------------------
  218|      0|            IGRAPH_ERROR("Cannot push to stack, already at maximum size.", IGRAPH_EOVERFLOW);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  219|      0|        }
  220|      0|        if (new_size == 0) {
  ------------------
  |  Branch (220:13): [True: 0, False: 0]
  ------------------
  221|      0|            new_size = 1;
  222|      0|        }
  223|      0|        IGRAPH_CHECK(FUNCTION(igraph_stack, reserve)(s, new_size));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  224|      0|    }
  225|       |
  226|   451k|    *(s->end) = elem;
  227|   451k|    s->end += 1;
  228|       |
  229|   451k|    return IGRAPH_SUCCESS;
  230|   451k|}
igraph_stack_int_pop:
  245|   451k|BASE FUNCTION(igraph_stack, pop)(TYPE(igraph_stack)* s) {
  246|   451k|    IGRAPH_ASSERT(s != NULL);
  ------------------
  |  |  916|   451k|    do { \
  |  |  917|   451k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|   451k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 451k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|   451k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  247|   451k|    IGRAPH_ASSERT(s->stor_begin != NULL);
  ------------------
  |  |  916|   451k|    do { \
  |  |  917|   451k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|   451k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 451k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|   451k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  248|   451k|    IGRAPH_ASSERT(s->end != NULL);
  ------------------
  |  |  916|   451k|    do { \
  |  |  917|   451k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|   451k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 451k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|   451k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  249|   451k|    IGRAPH_ASSERT(s->end != s->stor_begin);
  ------------------
  |  |  916|   451k|    do { \
  |  |  917|   451k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|   451k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 451k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|   451k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  250|       |
  251|   451k|    (s->end)--;
  252|       |
  253|   451k|    return *(s->end);
  254|   451k|}

igraph_attribute_record_list_init:
  110|  11.0k|igraph_error_t FUNCTION(init)(TYPE *v, igraph_integer_t size) {
  111|  11.0k|    igraph_integer_t alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (111:35): [True: 0, False: 11.0k]
  ------------------
  112|  11.0k|    IGRAPH_ASSERT(size >= 0);
  ------------------
  |  |  916|  11.0k|    do { \
  |  |  917|  11.0k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  11.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 11.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  11.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  113|  11.0k|    v->stor_begin = IGRAPH_CALLOC(alloc_size, ITEM_TYPE);
  ------------------
  |  |   38|  11.0k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  22.1k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 11.0k, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 11.0k, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 11.0k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  114|  11.0k|    if (v->stor_begin == 0) {
  ------------------
  |  Branch (114:9): [True: 0, False: 11.0k]
  ------------------
  115|      0|        IGRAPH_ERROR("Cannot initialize list.", IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  116|      0|    }
  117|  11.0k|    v->stor_end = v->stor_begin + alloc_size;
  118|  11.0k|    v->end = v->stor_begin + size;
  119|       |
  120|  11.0k|    IGRAPH_CHECK(INTERNAL_FUNCTION(init_slice)(v, v->stor_begin, v->end));
  ------------------
  |  |  648|  11.0k|    do { \
  |  |  649|  11.0k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  11.0k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  11.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 11.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  11.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  121|       |
  122|  11.0k|    return IGRAPH_SUCCESS;
  123|  11.0k|}
igraph_attribute_record_list_init_copy:
  142|  2.92k|igraph_error_t FUNCTION(init_copy)(TYPE* to, const TYPE* from) {
  143|  2.92k|    igraph_integer_t i, size = FUNCTION(size)(from);
  ------------------
  |  |  166|  2.92k|    #define FUNCTION(c) CONCAT2x(igraph_attribute_record_list,c)
  |  |  ------------------
  |  |  |  |   24|  2.92k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
  144|       |
  145|  2.92k|    IGRAPH_CHECK(FUNCTION(init)(to, 0));
  ------------------
  |  |  648|  2.92k|    do { \
  |  |  649|  2.92k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.92k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.92k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.92k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  146|  2.92k|    IGRAPH_FINALLY(FUNCTION(destroy), to);
  ------------------
  |  |  591|  2.92k|    do { \
  |  |  592|  2.92k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  2.92k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  2.92k|         * incorrect destructor function with the pointer */ \
  |  |  595|  2.92k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  2.92k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  2.92k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  147|       |
  148|  2.92k|    for (i = 0; i < size; i++) {
  ------------------
  |  Branch (148:17): [True: 0, False: 2.92k]
  ------------------
  149|      0|        IGRAPH_CHECK(FUNCTION(push_back_copy)(to, FUNCTION(get_ptr)(from, i)));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  150|      0|    }
  151|       |
  152|  2.92k|    IGRAPH_FINALLY_CLEAN(1);
  153|       |
  154|  2.92k|    return IGRAPH_SUCCESS;
  155|  2.92k|}
igraph_attribute_record_list_destroy:
  177|  11.0k|void FUNCTION(destroy)(TYPE *v) {
  178|  11.0k|    IGRAPH_ASSERT(v != 0);
  ------------------
  |  |  916|  11.0k|    do { \
  |  |  917|  11.0k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  11.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 11.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  11.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  179|       |
  180|  11.0k|    if (v->stor_begin != 0) {
  ------------------
  |  Branch (180:9): [True: 11.0k, False: 0]
  ------------------
  181|  11.0k|        FUNCTION(clear)(v);
  ------------------
  |  |  166|  11.0k|    #define FUNCTION(c) CONCAT2x(igraph_attribute_record_list,c)
  |  |  ------------------
  |  |  |  |   24|  11.0k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
  182|  11.0k|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   41|  11.0k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  183|  11.0k|        v->stor_begin = NULL;
  184|  11.0k|    }
  185|  11.0k|}
igraph_attribute_record_list_empty:
  269|  1.46k|igraph_bool_t FUNCTION(empty)(const TYPE *v) {
  270|  1.46k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  1.46k|    do { \
  |  |  917|  1.46k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  271|  1.46k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  1.46k|    do { \
  |  |  917|  1.46k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  272|  1.46k|    return v->stor_begin == v->end;
  273|  1.46k|}
igraph_attribute_record_list_size:
  288|  12.1k|igraph_integer_t FUNCTION(size)(const TYPE *v) {
  289|  12.1k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  12.1k|    do { \
  |  |  917|  12.1k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  12.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 12.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  12.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  290|  12.1k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  12.1k|    do { \
  |  |  917|  12.1k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  12.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 12.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  12.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  291|  12.1k|    return v->end - v->stor_begin;
  292|  12.1k|}
igraph_attribute_record_list_clear:
  358|  11.0k|void FUNCTION(clear)(TYPE *v) {
  359|  11.0k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  11.0k|    do { \
  |  |  917|  11.0k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  11.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 11.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  11.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  360|  11.0k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  11.0k|    do { \
  |  |  917|  11.0k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  11.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 11.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  11.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  361|  11.0k|    INTERNAL_FUNCTION(destroy_slice)(v, v->stor_begin, v->end);
  ------------------
  |  |  167|  11.0k|    #define INTERNAL_FUNCTION(c) CONCAT2x(igraph_i_attribute_record_list,c)
  |  |  ------------------
  |  |  |  |   24|  11.0k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
  362|  11.0k|    v->end = v->stor_begin;
  363|  11.0k|}
igraph_attribute_record_list_get_ptr:
  378|  5.12k|ITEM_TYPE *FUNCTION(get_ptr)(const TYPE *v, igraph_integer_t pos) {
  379|  5.12k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  5.12k|    do { \
  |  |  917|  5.12k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  5.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 5.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  5.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  380|  5.12k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  5.12k|    do { \
  |  |  917|  5.12k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  5.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 5.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  5.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  381|  5.12k|    return v->stor_begin + pos;
  382|  5.12k|}
igraph_attribute_record_list_discard:
  507|    732|void FUNCTION(discard)(TYPE *v, igraph_integer_t index) {
  508|    732|    igraph_integer_t size = FUNCTION(size)(v);
  ------------------
  |  |  166|    732|    #define FUNCTION(c) CONCAT2x(igraph_attribute_record_list,c)
  |  |  ------------------
  |  |  |  |   24|    732|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
  509|       |
  510|    732|    if (size > 0) {
  ------------------
  |  Branch (510:9): [True: 732, False: 0]
  ------------------
  511|    732|        INTERNAL_FUNCTION(destroy_item)(v->stor_begin + index);
  ------------------
  |  |  167|    732|    #define INTERNAL_FUNCTION(c) CONCAT2x(igraph_i_attribute_record_list,c)
  |  |  ------------------
  |  |  |  |   24|    732|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
  512|    732|        memmove(v->stor_begin + index, v->stor_begin + index + 1, sizeof(ITEM_TYPE) * (size - index - 1));
  513|    732|        v->end -= 1;
  514|    732|    }
  515|    732|}
igraph_attribute_record_list_push_back:
  588|  1.46k|igraph_error_t FUNCTION(push_back)(TYPE *v, ITEM_TYPE *e) {
  589|  1.46k|    IGRAPH_CHECK(INTERNAL_FUNCTION(expand_if_full)(v));
  ------------------
  |  |  648|  1.46k|    do { \
  |  |  649|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  590|  1.46k|    *(v->end) = *e;
  591|  1.46k|    v->end += 1;
  592|  1.46k|    return IGRAPH_SUCCESS;
  593|  1.46k|}
igraph_attribute_record_list_push_back_new:
  641|    732|igraph_error_t FUNCTION(push_back_new)(TYPE *v, ITEM_TYPE** e) {
  642|    732|    IGRAPH_CHECK(INTERNAL_FUNCTION(expand_if_full)(v));
  ------------------
  |  |  648|    732|    do { \
  |  |  649|    732|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    732|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    732|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 732]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  643|    732|    IGRAPH_CHECK(INTERNAL_FUNCTION(init_item)(v, v->end));
  ------------------
  |  |  648|    732|    do { \
  |  |  649|    732|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    732|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    732|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 732]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  644|    732|    if (e) {
  ------------------
  |  Branch (644:9): [True: 732, False: 0]
  ------------------
  645|    732|        *e = v->end;
  646|    732|    }
  647|    732|    v->end += 1;
  648|    732|    return IGRAPH_SUCCESS;
  649|    732|}
attributes.c:igraph_i_attribute_record_list_init_slice:
 1069|  11.0k|static igraph_error_t INTERNAL_FUNCTION(init_slice)(const TYPE *list, ITEM_TYPE *start, ITEM_TYPE *end) {
 1070|  11.0k|    ITEM_TYPE *current;
  ------------------
  |  |   62|  11.0k|    #define ITEM_TYPE BASE
  |  |  ------------------
  |  |  |  |  120|  11.0k|    #define BASE igraph_attribute_record_t
  |  |  ------------------
  ------------------
 1071|  11.0k|    igraph_error_t retval;
 1072|       |
 1073|  11.0k|    for (current = start; current < end; current++) {
  ------------------
  |  Branch (1073:27): [True: 0, False: 11.0k]
  ------------------
 1074|      0|        retval = INTERNAL_FUNCTION(init_item)(list, current);
  ------------------
  |  |  167|      0|    #define INTERNAL_FUNCTION(c) CONCAT2x(igraph_i_attribute_record_list,c)
  |  |  ------------------
  |  |  |  |   24|      0|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
 1075|      0|        if (retval) {
  ------------------
  |  Branch (1075:13): [True: 0, False: 0]
  ------------------
 1076|      0|            INTERNAL_FUNCTION(destroy_slice)(list, start, current);
  ------------------
  |  |  167|      0|    #define INTERNAL_FUNCTION(c) CONCAT2x(igraph_i_attribute_record_list,c)
  |  |  ------------------
  |  |  |  |   24|      0|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
 1077|      0|            IGRAPH_CHECK(retval);
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1078|      0|        }
 1079|      0|    }
 1080|       |
 1081|  11.0k|    return IGRAPH_SUCCESS;
 1082|  11.0k|}
attributes.c:igraph_i_attribute_record_list_destroy_slice:
 1084|  11.0k|static void INTERNAL_FUNCTION(destroy_slice)(const TYPE *list, ITEM_TYPE *start, ITEM_TYPE *end) {
 1085|  11.0k|    IGRAPH_UNUSED(list);
  ------------------
  |  |   32|  11.0k|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
 1086|  12.5k|    for (; start < end; start++) {
  ------------------
  |  Branch (1086:12): [True: 1.46k, False: 11.0k]
  ------------------
 1087|  1.46k|        INTERNAL_FUNCTION(destroy_item)(start);
  ------------------
  |  |  167|  1.46k|    #define INTERNAL_FUNCTION(c) CONCAT2x(igraph_i_attribute_record_list,c)
  |  |  ------------------
  |  |  |  |   24|  1.46k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
 1088|  1.46k|    }
 1089|  11.0k|}
attributes.c:igraph_i_attribute_record_list_expand_if_full:
 1095|  2.19k|static igraph_error_t INTERNAL_FUNCTION(expand_if_full)(TYPE *v) {
 1096|  2.19k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  2.19k|    do { \
  |  |  917|  2.19k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  2.19k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.19k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  2.19k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1097|  2.19k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  2.19k|    do { \
  |  |  917|  2.19k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  2.19k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.19k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  2.19k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1098|       |
 1099|  2.19k|    if (v->stor_end == v->end) {
  ------------------
  |  Branch (1099:9): [True: 0, False: 2.19k]
  ------------------
 1100|      0|        igraph_integer_t old_size = FUNCTION(size)(v);
  ------------------
  |  |  166|      0|    #define FUNCTION(c) CONCAT2x(igraph_attribute_record_list,c)
  |  |  ------------------
  |  |  |  |   24|      0|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
 1101|      0|        igraph_integer_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   77|      0|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
                      igraph_integer_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   77|      0|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (1101:37): [True: 0, False: 0]
  ------------------
 1102|      0|        if (old_size == IGRAPH_INTEGER_MAX) {
  ------------------
  |  |   77|      0|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (1102:13): [True: 0, False: 0]
  ------------------
 1103|      0|            IGRAPH_ERROR("Cannot add new item to list, already at maximum size.", IGRAPH_EOVERFLOW);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1104|      0|        }
 1105|      0|        if (new_size == 0) {
  ------------------
  |  Branch (1105:13): [True: 0, False: 0]
  ------------------
 1106|      0|            new_size = 1;
 1107|      0|        }
 1108|      0|        IGRAPH_CHECK(FUNCTION(reserve)(v, new_size));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1109|      0|    }
 1110|       |
 1111|  2.19k|    return IGRAPH_SUCCESS;
 1112|  2.19k|}
igraph_vector_int_list_init:
  110|  1.46k|igraph_error_t FUNCTION(init)(TYPE *v, igraph_integer_t size) {
  111|  1.46k|    igraph_integer_t alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (111:35): [True: 1.35k, False: 113]
  ------------------
  112|  1.46k|    IGRAPH_ASSERT(size >= 0);
  ------------------
  |  |  916|  1.46k|    do { \
  |  |  917|  1.46k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  113|  1.46k|    v->stor_begin = IGRAPH_CALLOC(alloc_size, ITEM_TYPE);
  ------------------
  |  |   38|  1.46k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  2.92k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 1.46k, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 1.46k, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 1.46k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  114|  1.46k|    if (v->stor_begin == 0) {
  ------------------
  |  Branch (114:9): [True: 0, False: 1.46k]
  ------------------
  115|      0|        IGRAPH_ERROR("Cannot initialize list.", IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  116|      0|    }
  117|  1.46k|    v->stor_end = v->stor_begin + alloc_size;
  118|  1.46k|    v->end = v->stor_begin + size;
  119|       |
  120|  1.46k|    IGRAPH_CHECK(INTERNAL_FUNCTION(init_slice)(v, v->stor_begin, v->end));
  ------------------
  |  |  648|  1.46k|    do { \
  |  |  649|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  121|       |
  122|  1.46k|    return IGRAPH_SUCCESS;
  123|  1.46k|}
igraph_vector_int_list_destroy:
  177|  1.46k|void FUNCTION(destroy)(TYPE *v) {
  178|  1.46k|    IGRAPH_ASSERT(v != 0);
  ------------------
  |  |  916|  1.46k|    do { \
  |  |  917|  1.46k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  179|       |
  180|  1.46k|    if (v->stor_begin != 0) {
  ------------------
  |  Branch (180:9): [True: 1.46k, False: 0]
  ------------------
  181|  1.46k|        FUNCTION(clear)(v);
  ------------------
  |  |  141|  1.46k|        #define FUNCTION(c) CONCAT4(igraph_vector,SHORT,list,c)
  |  |  ------------------
  |  |  |  |   29|  1.46k|#define CONCAT4(a,b,c,d) CONCAT4x(a,b,c,d)
  |  |  |  |  ------------------
  |  |  |  |  |  |   28|  1.46k|#define CONCAT4x(a,b,c,d) a ## _ ## b ## _ ## c ## _ ## d
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  182|  1.46k|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   41|  1.46k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  183|  1.46k|        v->stor_begin = NULL;
  184|  1.46k|    }
  185|  1.46k|}
igraph_vector_int_list_size:
  288|  2.92k|igraph_integer_t FUNCTION(size)(const TYPE *v) {
  289|  2.92k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  2.92k|    do { \
  |  |  917|  2.92k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  2.92k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  2.92k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  290|  2.92k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  2.92k|    do { \
  |  |  917|  2.92k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  2.92k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  2.92k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  291|  2.92k|    return v->end - v->stor_begin;
  292|  2.92k|}
igraph_vector_int_list_clear:
  358|  1.46k|void FUNCTION(clear)(TYPE *v) {
  359|  1.46k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  1.46k|    do { \
  |  |  917|  1.46k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  360|  1.46k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  1.46k|    do { \
  |  |  917|  1.46k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  361|  1.46k|    INTERNAL_FUNCTION(destroy_slice)(v, v->stor_begin, v->end);
  ------------------
  |  |  142|  1.46k|        #define INTERNAL_FUNCTION(c) CONCAT4(igraph_i_vector,SHORT,list,c)
  |  |  ------------------
  |  |  |  |   29|  1.46k|#define CONCAT4(a,b,c,d) CONCAT4x(a,b,c,d)
  |  |  |  |  ------------------
  |  |  |  |  |  |   28|  1.46k|#define CONCAT4x(a,b,c,d) a ## _ ## b ## _ ## c ## _ ## d
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  362|  1.46k|    v->end = v->stor_begin;
  363|  1.46k|}
igraph_vector_int_list_get_ptr:
  378|  44.1k|ITEM_TYPE *FUNCTION(get_ptr)(const TYPE *v, igraph_integer_t pos) {
  379|  44.1k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  44.1k|    do { \
  |  |  917|  44.1k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  44.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 44.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  44.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  380|  44.1k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  44.1k|    do { \
  |  |  917|  44.1k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  44.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 44.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  44.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  381|  44.1k|    return v->stor_begin + pos;
  382|  44.1k|}
vector_list.c:igraph_i_vector_int_list_init_item:
 1052|  17.3k|static igraph_error_t INTERNAL_FUNCTION(init_item)(const TYPE *list, ITEM_TYPE *item) {
 1053|  17.3k|    IGRAPH_UNUSED(list);
  ------------------
  |  |   32|  17.3k|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
 1054|  17.3k|    return ITEM_FUNCTION(init)(item, 0);
  ------------------
  |  |   43|  17.3k|        #define ITEM_FUNCTION(f) CONCAT3(igraph_vector,SHORT,f)
  |  |  ------------------
  |  |  |  |   27|  17.3k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  17.3k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1055|  17.3k|}
vector_list.c:igraph_i_vector_int_list_destroy_item:
 1061|  17.3k|static void INTERNAL_FUNCTION(destroy_item)(ITEM_TYPE *item) {
 1062|  17.3k|    ITEM_FUNCTION(destroy)(item);
  ------------------
  |  |   43|  17.3k|        #define ITEM_FUNCTION(f) CONCAT3(igraph_vector,SHORT,f)
  |  |  ------------------
  |  |  |  |   27|  17.3k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  17.3k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1063|  17.3k|}
vector_list.c:igraph_i_vector_int_list_init_slice:
 1069|  1.46k|static igraph_error_t INTERNAL_FUNCTION(init_slice)(const TYPE *list, ITEM_TYPE *start, ITEM_TYPE *end) {
 1070|  1.46k|    ITEM_TYPE *current;
  ------------------
  |  |   32|  1.46k|    #define ITEM_TYPE BASE_VECTOR
  |  |  ------------------
  |  |  |  |   72|  1.46k|    #define BASE_VECTOR igraph_vector_int_t
  |  |  ------------------
  ------------------
 1071|  1.46k|    igraph_error_t retval;
 1072|       |
 1073|  18.8k|    for (current = start; current < end; current++) {
  ------------------
  |  Branch (1073:27): [True: 17.3k, False: 1.46k]
  ------------------
 1074|  17.3k|        retval = INTERNAL_FUNCTION(init_item)(list, current);
  ------------------
  |  |  142|  17.3k|        #define INTERNAL_FUNCTION(c) CONCAT4(igraph_i_vector,SHORT,list,c)
  |  |  ------------------
  |  |  |  |   29|  17.3k|#define CONCAT4(a,b,c,d) CONCAT4x(a,b,c,d)
  |  |  |  |  ------------------
  |  |  |  |  |  |   28|  17.3k|#define CONCAT4x(a,b,c,d) a ## _ ## b ## _ ## c ## _ ## d
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1075|  17.3k|        if (retval) {
  ------------------
  |  Branch (1075:13): [True: 0, False: 17.3k]
  ------------------
 1076|      0|            INTERNAL_FUNCTION(destroy_slice)(list, start, current);
  ------------------
  |  |  142|      0|        #define INTERNAL_FUNCTION(c) CONCAT4(igraph_i_vector,SHORT,list,c)
  |  |  ------------------
  |  |  |  |   29|      0|#define CONCAT4(a,b,c,d) CONCAT4x(a,b,c,d)
  |  |  |  |  ------------------
  |  |  |  |  |  |   28|      0|#define CONCAT4x(a,b,c,d) a ## _ ## b ## _ ## c ## _ ## d
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1077|      0|            IGRAPH_CHECK(retval);
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1078|      0|        }
 1079|  17.3k|    }
 1080|       |
 1081|  1.46k|    return IGRAPH_SUCCESS;
 1082|  1.46k|}
vector_list.c:igraph_i_vector_int_list_destroy_slice:
 1084|  1.46k|static void INTERNAL_FUNCTION(destroy_slice)(const TYPE *list, ITEM_TYPE *start, ITEM_TYPE *end) {
 1085|  1.46k|    IGRAPH_UNUSED(list);
  ------------------
  |  |   32|  1.46k|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
 1086|  18.8k|    for (; start < end; start++) {
  ------------------
  |  Branch (1086:12): [True: 17.3k, False: 1.46k]
  ------------------
 1087|  17.3k|        INTERNAL_FUNCTION(destroy_item)(start);
  ------------------
  |  |  142|  17.3k|        #define INTERNAL_FUNCTION(c) CONCAT4(igraph_i_vector,SHORT,list,c)
  |  |  ------------------
  |  |  |  |   29|  17.3k|#define CONCAT4(a,b,c,d) CONCAT4x(a,b,c,d)
  |  |  |  |  ------------------
  |  |  |  |  |  |   28|  17.3k|#define CONCAT4x(a,b,c,d) a ## _ ## b ## _ ## c ## _ ## d
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1088|  17.3k|    }
 1089|  1.46k|}

igraph_vector_int_pair_order:
  120|  4.12k|                                       igraph_vector_int_t* res, igraph_integer_t nodes) {
  121|  4.12k|    igraph_integer_t edges = igraph_vector_int_size(v);
  122|  4.12k|    igraph_vector_int_t ptr;
  123|  4.12k|    igraph_vector_int_t rad;
  124|  4.12k|    igraph_integer_t i, j;
  125|       |
  126|  4.12k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  4.12k|    do { \
  |  |  917|  4.12k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  4.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 4.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  4.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  127|  4.12k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  4.12k|    do { \
  |  |  917|  4.12k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  4.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 4.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  4.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  128|       |
  129|  4.12k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&ptr, nodes + 1);
  ------------------
  |  |  124|  4.12k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  4.12k|    do { \
  |  |  |  |  649|  4.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  4.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  4.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 4.12k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  4.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  4.12k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  4.12k|    do { \
  |  |  |  |  592|  4.12k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  4.12k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  4.12k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  4.12k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  4.12k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  4.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  130|  4.12k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&rad, edges);
  ------------------
  |  |  124|  4.12k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  4.12k|    do { \
  |  |  |  |  649|  4.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  4.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  4.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 4.12k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  4.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  4.12k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  4.12k|    do { \
  |  |  |  |  592|  4.12k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  4.12k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  4.12k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  4.12k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  4.12k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  4.12k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  131|  4.12k|    IGRAPH_CHECK(igraph_vector_int_resize(res, edges));
  ------------------
  |  |  648|  4.12k|    do { \
  |  |  649|  4.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  4.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  4.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 4.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  4.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  132|       |
  133|  75.4k|    for (i = 0; i < edges; i++) {
  ------------------
  |  Branch (133:17): [True: 71.3k, False: 4.12k]
  ------------------
  134|  71.3k|        igraph_integer_t radix = VECTOR(*v2)[i];
  ------------------
  |  |   65|  71.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  135|  71.3k|        if (VECTOR(ptr)[radix] != 0) {
  ------------------
  |  |   65|  71.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (135:13): [True: 43.6k, False: 27.6k]
  ------------------
  136|  43.6k|            VECTOR(rad)[i] = VECTOR(ptr)[radix];
  ------------------
  |  |   65|  43.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(rad)[i] = VECTOR(ptr)[radix];
  ------------------
  |  |   65|  43.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  137|  43.6k|        }
  138|  71.3k|        VECTOR(ptr)[radix] = i + 1;
  ------------------
  |  |   65|  71.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  139|  71.3k|    }
  140|       |
  141|  4.12k|    j = 0;
  142|   197k|    for (i = 0; i < nodes + 1; i++) {
  ------------------
  |  Branch (142:17): [True: 193k, False: 4.12k]
  ------------------
  143|   193k|        if (VECTOR(ptr)[i] != 0) {
  ------------------
  |  |   65|   193k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (143:13): [True: 27.6k, False: 165k]
  ------------------
  144|  27.6k|            igraph_integer_t next = VECTOR(ptr)[i] - 1;
  ------------------
  |  |   65|  27.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  145|  27.6k|            VECTOR(*res)[j++] = next;
  ------------------
  |  |   65|  27.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  146|  71.3k|            while (VECTOR(rad)[next] != 0) {
  ------------------
  |  |   65|  71.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (146:20): [True: 43.6k, False: 27.6k]
  ------------------
  147|  43.6k|                next = VECTOR(rad)[next] - 1;
  ------------------
  |  |   65|  43.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  148|  43.6k|                VECTOR(*res)[j++] = next;
  ------------------
  |  |   65|  43.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  149|  43.6k|            }
  150|  27.6k|        }
  151|   193k|    }
  152|       |
  153|  4.12k|    igraph_vector_int_null(&ptr);
  154|  4.12k|    igraph_vector_int_null(&rad);
  155|       |
  156|  75.4k|    for (i = 0; i < edges; i++) {
  ------------------
  |  Branch (156:17): [True: 71.3k, False: 4.12k]
  ------------------
  157|  71.3k|        igraph_integer_t edge = VECTOR(*res)[edges - i - 1];
  ------------------
  |  |   65|  71.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  158|  71.3k|        igraph_integer_t radix = VECTOR(*v)[edge];
  ------------------
  |  |   65|  71.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  159|  71.3k|        if (VECTOR(ptr)[radix] != 0) {
  ------------------
  |  |   65|  71.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (159:13): [True: 43.6k, False: 27.6k]
  ------------------
  160|  43.6k|            VECTOR(rad)[edge] = VECTOR(ptr)[radix];
  ------------------
  |  |   65|  43.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(rad)[edge] = VECTOR(ptr)[radix];
  ------------------
  |  |   65|  43.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  161|  43.6k|        }
  162|  71.3k|        VECTOR(ptr)[radix] = edge + 1;
  ------------------
  |  |   65|  71.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  163|  71.3k|    }
  164|       |
  165|  4.12k|    j = 0;
  166|   197k|    for (i = 0; i < nodes + 1; i++) {
  ------------------
  |  Branch (166:17): [True: 193k, False: 4.12k]
  ------------------
  167|   193k|        if (VECTOR(ptr)[i] != 0) {
  ------------------
  |  |   65|   193k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (167:13): [True: 27.6k, False: 165k]
  ------------------
  168|  27.6k|            igraph_integer_t next = VECTOR(ptr)[i] - 1;
  ------------------
  |  |   65|  27.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  169|  27.6k|            VECTOR(*res)[j++] = next;
  ------------------
  |  |   65|  27.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  170|  71.3k|            while (VECTOR(rad)[next] != 0) {
  ------------------
  |  |   65|  71.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (170:20): [True: 43.6k, False: 27.6k]
  ------------------
  171|  43.6k|                next = VECTOR(rad)[next] - 1;
  ------------------
  |  |   65|  43.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  172|  43.6k|                VECTOR(*res)[j++] = next;
  ------------------
  |  |   65|  43.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  173|  43.6k|            }
  174|  27.6k|        }
  175|   193k|    }
  176|       |
  177|  4.12k|    igraph_vector_int_destroy(&ptr);
  178|  4.12k|    igraph_vector_int_destroy(&rad);
  179|  4.12k|    IGRAPH_FINALLY_CLEAN(2);
  180|       |
  181|  4.12k|    return IGRAPH_SUCCESS;
  182|  4.12k|}
igraph_i_vector_int_order:
  198|    731|        igraph_integer_t maxval) {
  199|       |
  200|    731|    const igraph_integer_t size = igraph_vector_int_size(v);
  201|    731|    igraph_vector_int_t ptr;
  202|    731|    igraph_vector_int_t rad;
  203|    731|    igraph_integer_t j;
  204|       |
  205|    731|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|    731|    do { \
  |  |  917|    731|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|    731|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 731]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|    731|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  206|    731|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|    731|    do { \
  |  |  917|    731|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|    731|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 731]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|    731|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  207|       |
  208|    731|    IGRAPH_VECTOR_INT_INIT_FINALLY(&ptr, maxval + 1);
  ------------------
  |  |  124|    731|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|    731|    do { \
  |  |  |  |  649|    731|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|    731|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|    731|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 731]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|    731|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|    731|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|    731|    do { \
  |  |  |  |  592|    731|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|    731|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|    731|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|    731|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|    731|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|    731|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  209|    731|    IGRAPH_VECTOR_INT_INIT_FINALLY(&rad, size);
  ------------------
  |  |  124|    731|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|    731|    do { \
  |  |  |  |  649|    731|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|    731|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|    731|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 731]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|    731|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|    731|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|    731|    do { \
  |  |  |  |  592|    731|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|    731|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|    731|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|    731|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|    731|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|    731|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  210|    731|    IGRAPH_CHECK(igraph_vector_int_resize(res, size));
  ------------------
  |  |  648|    731|    do { \
  |  |  649|    731|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    731|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    731|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 731]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    731|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  211|       |
  212|  32.5k|    for (igraph_integer_t i = 0; i < size; i++) {
  ------------------
  |  Branch (212:34): [True: 31.8k, False: 731]
  ------------------
  213|  31.8k|        igraph_integer_t radix = VECTOR(*v)[i];
  ------------------
  |  |   65|  31.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  214|  31.8k|        if (VECTOR(ptr)[radix] != 0) {
  ------------------
  |  |   65|  31.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (214:13): [True: 29.3k, False: 2.53k]
  ------------------
  215|  29.3k|            VECTOR(rad)[i] = VECTOR(ptr)[radix];
  ------------------
  |  |   65|  29.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(rad)[i] = VECTOR(ptr)[radix];
  ------------------
  |  |   65|  29.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  216|  29.3k|        }
  217|  31.8k|        VECTOR(ptr)[radix] = i + 1;
  ------------------
  |  |   65|  31.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  218|  31.8k|    }
  219|       |
  220|    731|    j = 0;
  221|  5.86k|    for (igraph_integer_t i = 0; i < maxval + 1; i++) {
  ------------------
  |  Branch (221:34): [True: 5.13k, False: 731]
  ------------------
  222|  5.13k|        if (VECTOR(ptr)[i] != 0) {
  ------------------
  |  |   65|  5.13k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (222:13): [True: 2.53k, False: 2.59k]
  ------------------
  223|  2.53k|            igraph_integer_t next = VECTOR(ptr)[i] - 1;
  ------------------
  |  |   65|  2.53k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  224|  2.53k|            VECTOR(*res)[j++] = next;
  ------------------
  |  |   65|  2.53k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  225|  31.8k|            while (VECTOR(rad)[next] != 0) {
  ------------------
  |  |   65|  31.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (225:20): [True: 29.3k, False: 2.53k]
  ------------------
  226|  29.3k|                next = VECTOR(rad)[next] - 1;
  ------------------
  |  |   65|  29.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  227|  29.3k|                VECTOR(*res)[j++] = next;
  ------------------
  |  |   65|  29.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  228|  29.3k|            }
  229|  2.53k|        }
  230|  5.13k|    }
  231|       |
  232|    731|    igraph_vector_int_destroy(&ptr);
  233|    731|    igraph_vector_int_destroy(&rad);
  234|    731|    IGRAPH_FINALLY_CLEAN(2);
  235|       |
  236|    731|    return IGRAPH_SUCCESS;
  237|    731|}

igraph_vector_init:
  135|   156k|igraph_error_t FUNCTION(igraph_vector, init)(TYPE(igraph_vector) *v, igraph_integer_t size) {
  136|   156k|    igraph_integer_t alloc_size;
  137|   156k|    IGRAPH_ASSERT(size >= 0);
  ------------------
  |  |  916|   156k|    do { \
  |  |  917|   156k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|   156k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 156k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|   156k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  138|   156k|    alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (138:18): [True: 11.5k, False: 144k]
  ------------------
  139|       |
  140|       |    /* When this function fails, it should leave stor_begin set to NULL,
  141|       |     * so that vector_destroy() is still safe to call on the vector.
  142|       |     * This simplifies freeing partially initialized data structures,
  143|       |     * such as adjacency lists, when an error occurs mid-initialization. */
  144|   156k|    v->stor_begin = IGRAPH_CALLOC(alloc_size, BASE);
  ------------------
  |  |   38|   156k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|   312k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 156k, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 156k, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 156k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  145|   156k|    if (v->stor_begin == NULL) {
  ------------------
  |  Branch (145:9): [True: 0, False: 156k]
  ------------------
  146|      0|        IGRAPH_ERROR("Cannot initialize vector.", IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  147|      0|    }
  148|   156k|    v->stor_end = v->stor_begin + alloc_size;
  149|   156k|    v->end = v->stor_begin + size;
  150|       |
  151|   156k|    return IGRAPH_SUCCESS;
  152|   156k|}
igraph_vector_destroy:
  400|   156k|void FUNCTION(igraph_vector, destroy)(TYPE(igraph_vector) *v) {
  401|   156k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|   156k|    do { \
  |  |  917|   156k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|   156k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 156k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|   156k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  402|       |    /* vector_init() will leave stor_begin set to NULL when it fails.
  403|       |     * We handle these cases gracefully. */
  404|   156k|    if (v->stor_begin != NULL) {
  ------------------
  |  Branch (404:9): [True: 156k, False: 0]
  ------------------
  405|   156k|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   41|   156k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  406|   156k|        v->stor_begin = NULL;
  407|   156k|    }
  408|   156k|}
igraph_vector_capacity:
  428|  70.1k|igraph_integer_t FUNCTION(igraph_vector, capacity)(const TYPE(igraph_vector) *v) {
  429|  70.1k|    return v->stor_end - v->stor_begin;
  430|  70.1k|}
igraph_vector_reserve:
  460|  69.4k|igraph_error_t FUNCTION(igraph_vector, reserve)(TYPE(igraph_vector) *v, igraph_integer_t capacity) {
  461|  69.4k|    igraph_integer_t current_capacity;
  462|  69.4k|    BASE *tmp;
  ------------------
  |  |   34|  69.4k|    #define BASE igraph_real_t
  ------------------
  463|       |
  464|  69.4k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  69.4k|    do { \
  |  |  917|  69.4k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  69.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 69.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  69.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  465|  69.4k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  69.4k|    do { \
  |  |  917|  69.4k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  69.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 69.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  69.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  466|  69.4k|    IGRAPH_ASSERT(capacity >= 0);
  ------------------
  |  |  916|  69.4k|    do { \
  |  |  917|  69.4k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  69.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 69.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  69.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  467|       |
  468|  69.4k|    current_capacity = FUNCTION(igraph_vector, capacity)(v);
  ------------------
  |  |  175|  69.4k|        #define FUNCTION(a,c) CONCAT2(a,c)
  |  |  ------------------
  |  |  |  |   25|  69.4k|#define CONCAT2(a,b) CONCAT2x(a,b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   24|  69.4k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  469|       |
  470|  69.4k|    if (capacity <= current_capacity) {
  ------------------
  |  Branch (470:9): [True: 12.5k, False: 56.8k]
  ------------------
  471|  12.5k|        return IGRAPH_SUCCESS;
  472|  12.5k|    }
  473|       |
  474|  56.8k|    tmp = IGRAPH_REALLOC(v->stor_begin, capacity, BASE);
  ------------------
  |  |   40|  56.8k|#define IGRAPH_REALLOC(p,n,t) IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, realloc((void*)(p), sizeof(t) * ((n) > 0 ? (n) : 1)))
  |  |  ------------------
  |  |  |  |   36|   113k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 56.8k, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 56.8k, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 56.8k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  475|  56.8k|    IGRAPH_CHECK_OOM(tmp, "Cannot reserve space for vector.");
  ------------------
  |  |  701|  56.8k|    do { \
  |  |  702|  56.8k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|  56.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 56.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|  56.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  476|       |
  477|  56.8k|    v->end = tmp + (v->end - v->stor_begin);
  478|  56.8k|    v->stor_begin = tmp;
  479|  56.8k|    v->stor_end = v->stor_begin + capacity;
  480|       |
  481|  56.8k|    return IGRAPH_SUCCESS;
  482|  56.8k|}
igraph_vector_empty:
  495|  1.44M|igraph_bool_t FUNCTION(igraph_vector, empty)(const TYPE(igraph_vector) *v) {
  496|  1.44M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  1.44M|    do { \
  |  |  917|  1.44M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.44M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.44M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.44M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  497|  1.44M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  1.44M|    do { \
  |  |  917|  1.44M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.44M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.44M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.44M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  498|  1.44M|    return v->stor_begin == v->end;
  499|  1.44M|}
igraph_vector_size:
  514|  5.17M|igraph_integer_t FUNCTION(igraph_vector, size)(const TYPE(igraph_vector) *v) {
  515|  5.17M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  5.17M|    do { \
  |  |  917|  5.17M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  5.17M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 5.17M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  5.17M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  516|  5.17M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  5.17M|    do { \
  |  |  917|  5.17M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  5.17M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 5.17M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  5.17M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  517|  5.17M|    return v->end - v->stor_begin;
  518|  5.17M|}
igraph_vector_clear:
  534|   166k|void FUNCTION(igraph_vector, clear)(TYPE(igraph_vector)* v) {
  535|   166k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|   166k|    do { \
  |  |  917|   166k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|   166k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 166k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|   166k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  536|   166k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|   166k|    do { \
  |  |  917|   166k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|   166k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 166k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|   166k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  537|   166k|    v->end = v->stor_begin;
  538|   166k|}
igraph_vector_push_back:
  565|  1.16M|igraph_error_t FUNCTION(igraph_vector, push_back)(TYPE(igraph_vector) *v, BASE e) {
  566|  1.16M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  1.16M|    do { \
  |  |  917|  1.16M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.16M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.16M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.16M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  567|  1.16M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  1.16M|    do { \
  |  |  917|  1.16M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.16M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.16M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.16M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  568|       |
  569|  1.16M|    if (v->stor_end == v->end) {
  ------------------
  |  Branch (569:9): [True: 54.2k, False: 1.10M]
  ------------------
  570|       |        /* full, allocate more storage */
  571|  54.2k|        igraph_integer_t old_size = FUNCTION(igraph_vector, size)(v);
  ------------------
  |  |  175|  54.2k|        #define FUNCTION(a,c) CONCAT2(a,c)
  |  |  ------------------
  |  |  |  |   25|  54.2k|#define CONCAT2(a,b) CONCAT2x(a,b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   24|  54.2k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  572|  54.2k|        igraph_integer_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   77|  54.2k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
                      igraph_integer_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   77|  54.2k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (572:37): [True: 54.2k, False: 0]
  ------------------
  573|  54.2k|        if (old_size == IGRAPH_INTEGER_MAX) {
  ------------------
  |  |   77|  54.2k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (573:13): [True: 0, False: 54.2k]
  ------------------
  574|      0|            IGRAPH_ERROR("Cannot push to vector, already at maximum size.", IGRAPH_EOVERFLOW);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  575|      0|        }
  576|  54.2k|        if (new_size == 0) {
  ------------------
  |  Branch (576:13): [True: 0, False: 54.2k]
  ------------------
  577|      0|            new_size = 1;
  578|      0|        }
  579|  54.2k|        IGRAPH_CHECK(FUNCTION(igraph_vector, reserve)(v, new_size));
  ------------------
  |  |  648|  54.2k|    do { \
  |  |  649|  54.2k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  54.2k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  54.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 54.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  54.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  580|  54.2k|    }
  581|       |
  582|  1.16M|    *(v->end) = e;
  583|  1.16M|    v->end += 1;
  584|       |
  585|  1.16M|    return IGRAPH_SUCCESS;
  586|  1.16M|}
igraph_vector_null:
  717|  10.1k|void FUNCTION(igraph_vector, null)(TYPE(igraph_vector) *v) {
  718|  10.1k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  10.1k|    do { \
  |  |  917|  10.1k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  10.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 10.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  10.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  719|  10.1k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  10.1k|    do { \
  |  |  917|  10.1k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  10.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 10.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  10.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  720|  10.1k|    if (FUNCTION(igraph_vector, size)(v) > 0) {
  ------------------
  |  |  175|  10.1k|        #define FUNCTION(a,c) CONCAT2(a,c)
  |  |  ------------------
  |  |  |  |   25|  10.1k|#define CONCAT2(a,b) CONCAT2x(a,b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   24|  10.1k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (720:9): [True: 9.99k, False: 119]
  ------------------
  721|  9.99k|        memset(v->stor_begin, 0, sizeof(BASE) * FUNCTION(igraph_vector, size)(v));
  ------------------
  |  |  175|  9.99k|        #define FUNCTION(a,c) CONCAT2(a,c)
  |  |  ------------------
  |  |  |  |   25|  9.99k|#define CONCAT2(a,b) CONCAT2x(a,b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   24|  9.99k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  722|  9.99k|    }
  723|  10.1k|}
igraph_vector_pop_back:
  813|  1.13M|BASE FUNCTION(igraph_vector, pop_back)(TYPE(igraph_vector) *v) {
  814|  1.13M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  1.13M|    do { \
  |  |  917|  1.13M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.13M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.13M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.13M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  815|  1.13M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  1.13M|    do { \
  |  |  917|  1.13M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.13M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.13M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.13M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  816|  1.13M|    IGRAPH_ASSERT(v->end != NULL);
  ------------------
  |  |  916|  1.13M|    do { \
  |  |  917|  1.13M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.13M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.13M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.13M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  817|  1.13M|    IGRAPH_ASSERT(v->end != v->stor_begin);
  ------------------
  |  |  916|  1.13M|    do { \
  |  |  917|  1.13M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.13M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.13M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.13M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  818|       |
  819|  1.13M|    (v->end)--;
  820|       |
  821|  1.13M|    return *(v->end);
  822|  1.13M|}
igraph_vector_resize:
 1241|  14.4k|igraph_error_t FUNCTION(igraph_vector, resize)(TYPE(igraph_vector)* v, igraph_integer_t new_size) {
 1242|  14.4k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  14.4k|    do { \
  |  |  917|  14.4k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  14.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 14.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  14.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1243|  14.4k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  14.4k|    do { \
  |  |  917|  14.4k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  14.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 14.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  14.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1244|  14.4k|    IGRAPH_CHECK(FUNCTION(igraph_vector, reserve)(v, new_size));
  ------------------
  |  |  648|  14.4k|    do { \
  |  |  649|  14.4k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  14.4k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  14.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 14.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  14.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1245|  14.4k|    v->end = v->stor_begin + new_size;
 1246|  14.4k|    return IGRAPH_SUCCESS;
 1247|  14.4k|}
igraph_vector_min:
 1378|  8.85k|BASE FUNCTION(igraph_vector, min)(const TYPE(igraph_vector) *v) {
 1379|  8.85k|    BASE min;
  ------------------
  |  |   34|  8.85k|    #define BASE igraph_real_t
  ------------------
 1380|  8.85k|    BASE *ptr;
  ------------------
  |  |   34|  8.85k|    #define BASE igraph_real_t
  ------------------
 1381|  8.85k|    IGRAPH_ASSERT(!FUNCTION(igraph_vector, empty)(v));
  ------------------
  |  |  916|  8.85k|    do { \
  |  |  917|  8.85k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  8.85k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 8.85k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  8.85k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1382|  8.85k|    min = *(v->stor_begin);
 1383|  8.85k|#if defined(BASE_IGRAPH_REAL)
 1384|  8.85k|    if (isnan(min)) { return min; }; /* Result is NaN */
 1385|  8.85k|#endif
 1386|  8.85k|    ptr = v->stor_begin + 1;
 1387|   225k|    while (ptr < v->end) {
  ------------------
  |  Branch (1387:12): [True: 216k, False: 8.85k]
  ------------------
 1388|   216k|        if ((*ptr) < min) {
  ------------------
  |  Branch (1388:13): [True: 7.48k, False: 208k]
  ------------------
 1389|  7.48k|            min = *ptr;
 1390|  7.48k|        }
 1391|   208k|#if defined(BASE_IGRAPH_REAL)
 1392|   208k|        else if (isnan(*ptr)) {
 1393|      0|            return *ptr; /* Result is NaN */
 1394|      0|        }
 1395|   216k|#endif
 1396|   216k|        ptr++;
 1397|   216k|    }
 1398|  8.85k|    return min;
 1399|  8.85k|}
igraph_vector_scale:
 2235|  2.18k|void FUNCTION(igraph_vector, scale)(TYPE(igraph_vector) *v, BASE by) {
 2236|  2.18k|    igraph_integer_t i;
 2237|  84.0k|    for (i = 0; i < FUNCTION(igraph_vector, size)(v); i++) {
  ------------------
  |  |  175|  84.0k|        #define FUNCTION(a,c) CONCAT2(a,c)
  |  |  ------------------
  |  |  |  |   25|  84.0k|#define CONCAT2(a,b) CONCAT2x(a,b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   24|  84.0k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (2237:17): [True: 81.9k, False: 2.18k]
  ------------------
 2238|       |#ifdef PROD
 2239|       |        PROD(VECTOR(*v)[i], VECTOR(*v)[i], by);
 2240|       |#else
 2241|  81.9k|        VECTOR(*v)[i] *= by;
  ------------------
  |  |   65|  81.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 2242|  81.9k|#endif
 2243|  81.9k|    }
 2244|  2.18k|}
igraph_vector_append:
 2384|    732|                                               const TYPE(igraph_vector) *from) {
 2385|    732|    IGRAPH_ASSERT(to != NULL);
  ------------------
  |  |  916|    732|    do { \
  |  |  917|    732|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|    732|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 732]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2386|    732|    IGRAPH_ASSERT(to->stor_begin != NULL);
  ------------------
  |  |  916|    732|    do { \
  |  |  917|    732|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|    732|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 732]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2387|       |
 2388|    732|    const igraph_integer_t to_size = FUNCTION(igraph_vector, size)(to);
  ------------------
  |  |  175|    732|        #define FUNCTION(a,c) CONCAT2(a,c)
  |  |  ------------------
  |  |  |  |   25|    732|#define CONCAT2(a,b) CONCAT2x(a,b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   24|    732|#define CONCAT2x(a,b) a ## _ ## b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2389|    732|    const igraph_integer_t from_size = FUNCTION(igraph_vector, size)(from);
  ------------------
  |  |  175|    732|        #define FUNCTION(a,c) CONCAT2(a,c)
  |  |  ------------------
  |  |  |  |   25|    732|#define CONCAT2(a,b) CONCAT2x(a,b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   24|    732|#define CONCAT2x(a,b) a ## _ ## b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2390|    732|    const igraph_integer_t to_capacity = FUNCTION(igraph_vector, capacity)(to);
  ------------------
  |  |  175|    732|        #define FUNCTION(a,c) CONCAT2(a,c)
  |  |  ------------------
  |  |  |  |   25|    732|#define CONCAT2(a,b) CONCAT2x(a,b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   24|    732|#define CONCAT2x(a,b) a ## _ ## b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2391|    732|    igraph_integer_t new_to_size;
 2392|       |
 2393|    732|    IGRAPH_SAFE_ADD(to_size, from_size, &new_to_size);
  ------------------
  |  |   47|    732|    do { \
  |  |   48|    732|        igraph_integer_t _safe_a = (a), _safe_b = (b); \
  |  |   49|    732|        igraph_integer_t _safe_sum; \
  |  |   50|    732|        if (__builtin_add_overflow(_safe_a, _safe_b, &_safe_sum)) { \
  |  |  ------------------
  |  |  |  Branch (50:13): [True: 0, False: 732]
  |  |  ------------------
  |  |   51|      0|            IGRAPH_ERRORF("Overflow when adding %" IGRAPH_PRId " and %" IGRAPH_PRId ".", IGRAPH_EOVERFLOW, _safe_a, _safe_b); \
  |  |  ------------------
  |  |  |  |  469|      0|    do { \
  |  |  |  |  470|      0|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  |  |  471|      0|                      igraph_errno, __VA_ARGS__) ; \
  |  |  |  |  472|      0|        return igraph_errno; \
  |  |  |  |  473|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (473:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|        } \
  |  |   53|    732|        *(res) = _safe_sum; \
  |  |   54|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (54:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2394|       |
 2395|    732|    if (to_capacity < new_to_size) {
  ------------------
  |  Branch (2395:9): [True: 0, False: 732]
  ------------------
 2396|      0|        igraph_integer_t new_to_capacity = to_capacity < IGRAPH_INTEGER_MAX/2 ? to_capacity * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   77|      0|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
                      igraph_integer_t new_to_capacity = to_capacity < IGRAPH_INTEGER_MAX/2 ? to_capacity * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   77|      0|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (2396:44): [True: 0, False: 0]
  ------------------
 2397|      0|        if (new_to_capacity < new_to_size) {
  ------------------
  |  Branch (2397:13): [True: 0, False: 0]
  ------------------
 2398|      0|            new_to_capacity = new_to_size;
 2399|      0|        }
 2400|      0|        IGRAPH_CHECK(FUNCTION(igraph_vector, reserve)(to, new_to_capacity));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2401|      0|    }
 2402|       |
 2403|    732|    memcpy(to->stor_begin + to_size, from->stor_begin,
 2404|    732|           sizeof(BASE) * from_size);
 2405|    732|    to->end = to->stor_begin + new_to_size;
 2406|       |
 2407|    732|    return IGRAPH_SUCCESS;
 2408|    732|}
igraph_vector_update:
 2481|    732|                                    const TYPE(igraph_vector) *from) {
 2482|    732|    igraph_integer_t n = FUNCTION(igraph_vector, size)(from);
  ------------------
  |  |  175|    732|        #define FUNCTION(a,c) CONCAT2(a,c)
  |  |  ------------------
  |  |  |  |   25|    732|#define CONCAT2(a,b) CONCAT2x(a,b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   24|    732|#define CONCAT2x(a,b) a ## _ ## b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2483|    732|    IGRAPH_CHECK(FUNCTION(igraph_vector, resize)(to, n));
  ------------------
  |  |  648|    732|    do { \
  |  |  649|    732|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    732|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    732|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 732]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2484|    732|    memcpy(to->stor_begin, from->stor_begin, sizeof(BASE)*n);
 2485|    732|    return IGRAPH_SUCCESS;
 2486|    732|}
igraph_vector_char_init:
  135|    732|igraph_error_t FUNCTION(igraph_vector, init)(TYPE(igraph_vector) *v, igraph_integer_t size) {
  136|    732|    igraph_integer_t alloc_size;
  137|    732|    IGRAPH_ASSERT(size >= 0);
  ------------------
  |  |  916|    732|    do { \
  |  |  917|    732|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|    732|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 732]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  138|    732|    alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (138:18): [True: 731, False: 1]
  ------------------
  139|       |
  140|       |    /* When this function fails, it should leave stor_begin set to NULL,
  141|       |     * so that vector_destroy() is still safe to call on the vector.
  142|       |     * This simplifies freeing partially initialized data structures,
  143|       |     * such as adjacency lists, when an error occurs mid-initialization. */
  144|    732|    v->stor_begin = IGRAPH_CALLOC(alloc_size, BASE);
  ------------------
  |  |   38|    732|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  1.46k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 732, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 732, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 732, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  145|    732|    if (v->stor_begin == NULL) {
  ------------------
  |  Branch (145:9): [True: 0, False: 732]
  ------------------
  146|      0|        IGRAPH_ERROR("Cannot initialize vector.", IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  147|      0|    }
  148|    732|    v->stor_end = v->stor_begin + alloc_size;
  149|    732|    v->end = v->stor_begin + size;
  150|       |
  151|    732|    return IGRAPH_SUCCESS;
  152|    732|}
igraph_vector_char_destroy:
  400|    732|void FUNCTION(igraph_vector, destroy)(TYPE(igraph_vector) *v) {
  401|    732|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|    732|    do { \
  |  |  917|    732|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|    732|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 732]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  402|       |    /* vector_init() will leave stor_begin set to NULL when it fails.
  403|       |     * We handle these cases gracefully. */
  404|    732|    if (v->stor_begin != NULL) {
  ------------------
  |  Branch (404:9): [True: 732, False: 0]
  ------------------
  405|    732|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   41|    732|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  406|    732|        v->stor_begin = NULL;
  407|    732|    }
  408|    732|}
igraph_vector_char_size:
  514|  63.7k|igraph_integer_t FUNCTION(igraph_vector, size)(const TYPE(igraph_vector) *v) {
  515|  63.7k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  63.7k|    do { \
  |  |  917|  63.7k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  63.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 63.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  63.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  516|  63.7k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  63.7k|    do { \
  |  |  917|  63.7k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  63.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 63.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  63.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  517|  63.7k|    return v->end - v->stor_begin;
  518|  63.7k|}
igraph_vector_char_null:
  717|  31.8k|void FUNCTION(igraph_vector, null)(TYPE(igraph_vector) *v) {
  718|  31.8k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  31.8k|    do { \
  |  |  917|  31.8k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  31.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 31.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  31.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  719|  31.8k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  31.8k|    do { \
  |  |  917|  31.8k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  31.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 31.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  31.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  720|  31.8k|    if (FUNCTION(igraph_vector, size)(v) > 0) {
  ------------------
  |  |  183|  31.8k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   27|  31.8k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  31.8k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (720:9): [True: 31.8k, False: 0]
  ------------------
  721|  31.8k|        memset(v->stor_begin, 0, sizeof(BASE) * FUNCTION(igraph_vector, size)(v));
  ------------------
  |  |  183|  31.8k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   27|  31.8k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  31.8k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  722|  31.8k|    }
  723|  31.8k|}
igraph_vector_int_init:
  135|   928k|igraph_error_t FUNCTION(igraph_vector, init)(TYPE(igraph_vector) *v, igraph_integer_t size) {
  136|   928k|    igraph_integer_t alloc_size;
  137|   928k|    IGRAPH_ASSERT(size >= 0);
  ------------------
  |  |  916|   928k|    do { \
  |  |  917|   928k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|   928k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 928k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|   928k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  138|   928k|    alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (138:18): [True: 207k, False: 721k]
  ------------------
  139|       |
  140|       |    /* When this function fails, it should leave stor_begin set to NULL,
  141|       |     * so that vector_destroy() is still safe to call on the vector.
  142|       |     * This simplifies freeing partially initialized data structures,
  143|       |     * such as adjacency lists, when an error occurs mid-initialization. */
  144|   928k|    v->stor_begin = IGRAPH_CALLOC(alloc_size, BASE);
  ------------------
  |  |   38|   928k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  1.85M|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 928k, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 928k, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 928k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  145|   928k|    if (v->stor_begin == NULL) {
  ------------------
  |  Branch (145:9): [True: 0, False: 928k]
  ------------------
  146|      0|        IGRAPH_ERROR("Cannot initialize vector.", IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  147|      0|    }
  148|   928k|    v->stor_end = v->stor_begin + alloc_size;
  149|   928k|    v->end = v->stor_begin + size;
  150|       |
  151|   928k|    return IGRAPH_SUCCESS;
  152|   928k|}
igraph_vector_int_destroy:
  400|   928k|void FUNCTION(igraph_vector, destroy)(TYPE(igraph_vector) *v) {
  401|   928k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|   928k|    do { \
  |  |  917|   928k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|   928k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 928k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|   928k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  402|       |    /* vector_init() will leave stor_begin set to NULL when it fails.
  403|       |     * We handle these cases gracefully. */
  404|   928k|    if (v->stor_begin != NULL) {
  ------------------
  |  Branch (404:9): [True: 928k, False: 0]
  ------------------
  405|   928k|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   41|   928k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  406|   928k|        v->stor_begin = NULL;
  407|   928k|    }
  408|   928k|}
igraph_vector_int_capacity:
  428|  1.93M|igraph_integer_t FUNCTION(igraph_vector, capacity)(const TYPE(igraph_vector) *v) {
  429|  1.93M|    return v->stor_end - v->stor_begin;
  430|  1.93M|}
igraph_vector_int_reserve:
  460|  1.90M|igraph_error_t FUNCTION(igraph_vector, reserve)(TYPE(igraph_vector) *v, igraph_integer_t capacity) {
  461|  1.90M|    igraph_integer_t current_capacity;
  462|  1.90M|    BASE *tmp;
  ------------------
  |  |   71|  1.90M|    #define BASE igraph_integer_t
  ------------------
  463|       |
  464|  1.90M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  1.90M|    do { \
  |  |  917|  1.90M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.90M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.90M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.90M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  465|  1.90M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  1.90M|    do { \
  |  |  917|  1.90M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.90M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.90M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.90M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  466|  1.90M|    IGRAPH_ASSERT(capacity >= 0);
  ------------------
  |  |  916|  1.90M|    do { \
  |  |  917|  1.90M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.90M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.90M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.90M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  467|       |
  468|  1.90M|    current_capacity = FUNCTION(igraph_vector, capacity)(v);
  ------------------
  |  |  183|  1.90M|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   27|  1.90M|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  1.90M|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  469|       |
  470|  1.90M|    if (capacity <= current_capacity) {
  ------------------
  |  Branch (470:9): [True: 1.80M, False: 95.4k]
  ------------------
  471|  1.80M|        return IGRAPH_SUCCESS;
  472|  1.80M|    }
  473|       |
  474|  95.4k|    tmp = IGRAPH_REALLOC(v->stor_begin, capacity, BASE);
  ------------------
  |  |   40|  95.4k|#define IGRAPH_REALLOC(p,n,t) IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, realloc((void*)(p), sizeof(t) * ((n) > 0 ? (n) : 1)))
  |  |  ------------------
  |  |  |  |   36|   190k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 95.4k, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 95.4k, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 95.4k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  475|  95.4k|    IGRAPH_CHECK_OOM(tmp, "Cannot reserve space for vector.");
  ------------------
  |  |  701|  95.4k|    do { \
  |  |  702|  95.4k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|  95.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 95.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|  95.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  476|       |
  477|  95.4k|    v->end = tmp + (v->end - v->stor_begin);
  478|  95.4k|    v->stor_begin = tmp;
  479|  95.4k|    v->stor_end = v->stor_begin + capacity;
  480|       |
  481|  95.4k|    return IGRAPH_SUCCESS;
  482|  95.4k|}
igraph_vector_int_empty:
  495|  2.79k|igraph_bool_t FUNCTION(igraph_vector, empty)(const TYPE(igraph_vector) *v) {
  496|  2.79k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  2.79k|    do { \
  |  |  917|  2.79k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  2.79k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.79k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  2.79k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  497|  2.79k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  2.79k|    do { \
  |  |  917|  2.79k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  2.79k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.79k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  2.79k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  498|  2.79k|    return v->stor_begin == v->end;
  499|  2.79k|}
igraph_vector_int_size:
  514|  2.88M|igraph_integer_t FUNCTION(igraph_vector, size)(const TYPE(igraph_vector) *v) {
  515|  2.88M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  2.88M|    do { \
  |  |  917|  2.88M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  2.88M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.88M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  2.88M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  516|  2.88M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  2.88M|    do { \
  |  |  917|  2.88M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  2.88M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.88M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  2.88M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  517|  2.88M|    return v->end - v->stor_begin;
  518|  2.88M|}
igraph_vector_int_clear:
  534|   621k|void FUNCTION(igraph_vector, clear)(TYPE(igraph_vector)* v) {
  535|   621k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|   621k|    do { \
  |  |  917|   621k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|   621k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 621k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|   621k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  536|   621k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|   621k|    do { \
  |  |  917|   621k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|   621k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 621k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|   621k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  537|   621k|    v->end = v->stor_begin;
  538|   621k|}
igraph_vector_int_push_back:
  565|  1.32M|igraph_error_t FUNCTION(igraph_vector, push_back)(TYPE(igraph_vector) *v, BASE e) {
  566|  1.32M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  1.32M|    do { \
  |  |  917|  1.32M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.32M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.32M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.32M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  567|  1.32M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  1.32M|    do { \
  |  |  917|  1.32M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.32M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.32M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.32M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  568|       |
  569|  1.32M|    if (v->stor_end == v->end) {
  ------------------
  |  Branch (569:9): [True: 60.1k, False: 1.26M]
  ------------------
  570|       |        /* full, allocate more storage */
  571|  60.1k|        igraph_integer_t old_size = FUNCTION(igraph_vector, size)(v);
  ------------------
  |  |  183|  60.1k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   27|  60.1k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  60.1k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  572|  60.1k|        igraph_integer_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   77|  60.1k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
                      igraph_integer_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   77|  60.1k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (572:37): [True: 60.1k, False: 0]
  ------------------
  573|  60.1k|        if (old_size == IGRAPH_INTEGER_MAX) {
  ------------------
  |  |   77|  60.1k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (573:13): [True: 0, False: 60.1k]
  ------------------
  574|      0|            IGRAPH_ERROR("Cannot push to vector, already at maximum size.", IGRAPH_EOVERFLOW);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  575|      0|        }
  576|  60.1k|        if (new_size == 0) {
  ------------------
  |  Branch (576:13): [True: 0, False: 60.1k]
  ------------------
  577|      0|            new_size = 1;
  578|      0|        }
  579|  60.1k|        IGRAPH_CHECK(FUNCTION(igraph_vector, reserve)(v, new_size));
  ------------------
  |  |  648|  60.1k|    do { \
  |  |  649|  60.1k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  60.1k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  60.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 60.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  60.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  580|  60.1k|    }
  581|       |
  582|  1.32M|    *(v->end) = e;
  583|  1.32M|    v->end += 1;
  584|       |
  585|  1.32M|    return IGRAPH_SUCCESS;
  586|  1.32M|}
igraph_vector_int_null:
  717|   178k|void FUNCTION(igraph_vector, null)(TYPE(igraph_vector) *v) {
  718|   178k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|   178k|    do { \
  |  |  917|   178k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|   178k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 178k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|   178k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  719|   178k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|   178k|    do { \
  |  |  917|   178k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|   178k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 178k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|   178k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  720|   178k|    if (FUNCTION(igraph_vector, size)(v) > 0) {
  ------------------
  |  |  183|   178k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   27|   178k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|   178k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (720:9): [True: 178k, False: 4]
  ------------------
  721|   178k|        memset(v->stor_begin, 0, sizeof(BASE) * FUNCTION(igraph_vector, size)(v));
  ------------------
  |  |  183|   178k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   27|   178k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|   178k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  722|   178k|    }
  723|   178k|}
igraph_vector_int_pop_back:
  813|  1.13M|BASE FUNCTION(igraph_vector, pop_back)(TYPE(igraph_vector) *v) {
  814|  1.13M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  1.13M|    do { \
  |  |  917|  1.13M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.13M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.13M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.13M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  815|  1.13M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  1.13M|    do { \
  |  |  917|  1.13M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.13M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.13M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.13M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  816|  1.13M|    IGRAPH_ASSERT(v->end != NULL);
  ------------------
  |  |  916|  1.13M|    do { \
  |  |  917|  1.13M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.13M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.13M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.13M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  817|  1.13M|    IGRAPH_ASSERT(v->end != v->stor_begin);
  ------------------
  |  |  916|  1.13M|    do { \
  |  |  917|  1.13M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.13M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.13M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.13M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  818|       |
  819|  1.13M|    (v->end)--;
  820|       |
  821|  1.13M|    return *(v->end);
  822|  1.13M|}
igraph_vector_int_resize:
 1241|  1.82M|igraph_error_t FUNCTION(igraph_vector, resize)(TYPE(igraph_vector)* v, igraph_integer_t new_size) {
 1242|  1.82M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  1.82M|    do { \
  |  |  917|  1.82M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.82M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.82M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.82M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1243|  1.82M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  1.82M|    do { \
  |  |  917|  1.82M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.82M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.82M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.82M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1244|  1.82M|    IGRAPH_CHECK(FUNCTION(igraph_vector, reserve)(v, new_size));
  ------------------
  |  |  648|  1.82M|    do { \
  |  |  649|  1.82M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.82M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.82M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.82M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.82M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1245|  1.82M|    v->end = v->stor_begin + new_size;
 1246|  1.82M|    return IGRAPH_SUCCESS;
 1247|  1.82M|}
igraph_vector_int_max:
 1304|  2.79k|BASE FUNCTION(igraph_vector, max)(const TYPE(igraph_vector) *v) {
 1305|  2.79k|    BASE max;
  ------------------
  |  |   71|  2.79k|    #define BASE igraph_integer_t
  ------------------
 1306|  2.79k|    BASE *ptr;
  ------------------
  |  |   71|  2.79k|    #define BASE igraph_integer_t
  ------------------
 1307|  2.79k|    IGRAPH_ASSERT(!FUNCTION(igraph_vector, empty)(v));
  ------------------
  |  |  916|  2.79k|    do { \
  |  |  917|  2.79k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  2.79k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.79k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  2.79k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1308|  2.79k|    max = *(v->stor_begin);
 1309|       |#if defined(BASE_IGRAPH_REAL)
 1310|       |    if (isnan(max)) { return max; }; /* Result is NaN */
 1311|       |#endif
 1312|  2.79k|    ptr = v->stor_begin + 1;
 1313|   103k|    while (ptr < v->end) {
  ------------------
  |  Branch (1313:12): [True: 100k, False: 2.79k]
  ------------------
 1314|   100k|        if ((*ptr) > max) {
  ------------------
  |  Branch (1314:13): [True: 8.76k, False: 91.6k]
  ------------------
 1315|  8.76k|            max = *ptr;
 1316|  8.76k|        }
 1317|       |#if defined(BASE_IGRAPH_REAL)
 1318|       |        else if (isnan(*ptr))
 1319|       |            return *ptr; /* Result is NaN */
 1320|       |#endif
 1321|   100k|        ptr++;
 1322|   100k|    }
 1323|  2.79k|    return max;
 1324|  2.79k|}
igraph_vector_int_isininterval:
 1809|  4.28k|        BASE high) {
 1810|  4.28k|    BASE *ptr;
  ------------------
  |  |   71|  4.28k|    #define BASE igraph_integer_t
  ------------------
 1811|  4.28k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  4.28k|    do { \
  |  |  917|  4.28k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  4.28k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 4.28k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  4.28k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1812|  4.28k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  4.28k|    do { \
  |  |  917|  4.28k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  4.28k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 4.28k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  4.28k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1813|   146k|    for (ptr = v->stor_begin; ptr < v->end; ptr++) {
  ------------------
  |  Branch (1813:31): [True: 142k, False: 4.28k]
  ------------------
 1814|       |        /* Note that the following is not equivalent to *ptr < low || *ptr > high
 1815|       |         * when *ptr is NaN! */
 1816|   142k|        if (!(*ptr >= low && *ptr <= high)) {
  ------------------
  |  Branch (1816:15): [True: 142k, False: 0]
  |  Branch (1816:30): [True: 142k, False: 0]
  ------------------
 1817|      0|            return 0;
 1818|      0|        }
 1819|   142k|    }
 1820|  4.28k|    return 1;
 1821|  4.28k|}
igraph_vector_int_append:
 2384|  31.8k|                                               const TYPE(igraph_vector) *from) {
 2385|  31.8k|    IGRAPH_ASSERT(to != NULL);
  ------------------
  |  |  916|  31.8k|    do { \
  |  |  917|  31.8k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  31.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 31.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  31.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2386|  31.8k|    IGRAPH_ASSERT(to->stor_begin != NULL);
  ------------------
  |  |  916|  31.8k|    do { \
  |  |  917|  31.8k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  31.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 31.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  31.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2387|       |
 2388|  31.8k|    const igraph_integer_t to_size = FUNCTION(igraph_vector, size)(to);
  ------------------
  |  |  183|  31.8k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   27|  31.8k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  31.8k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2389|  31.8k|    const igraph_integer_t from_size = FUNCTION(igraph_vector, size)(from);
  ------------------
  |  |  183|  31.8k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   27|  31.8k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  31.8k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2390|  31.8k|    const igraph_integer_t to_capacity = FUNCTION(igraph_vector, capacity)(to);
  ------------------
  |  |  183|  31.8k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   27|  31.8k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  31.8k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2391|  31.8k|    igraph_integer_t new_to_size;
 2392|       |
 2393|  31.8k|    IGRAPH_SAFE_ADD(to_size, from_size, &new_to_size);
  ------------------
  |  |   47|  31.8k|    do { \
  |  |   48|  31.8k|        igraph_integer_t _safe_a = (a), _safe_b = (b); \
  |  |   49|  31.8k|        igraph_integer_t _safe_sum; \
  |  |   50|  31.8k|        if (__builtin_add_overflow(_safe_a, _safe_b, &_safe_sum)) { \
  |  |  ------------------
  |  |  |  Branch (50:13): [True: 0, False: 31.8k]
  |  |  ------------------
  |  |   51|      0|            IGRAPH_ERRORF("Overflow when adding %" IGRAPH_PRId " and %" IGRAPH_PRId ".", IGRAPH_EOVERFLOW, _safe_a, _safe_b); \
  |  |  ------------------
  |  |  |  |  469|      0|    do { \
  |  |  |  |  470|      0|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  |  |  471|      0|                      igraph_errno, __VA_ARGS__) ; \
  |  |  |  |  472|      0|        return igraph_errno; \
  |  |  |  |  473|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (473:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|        } \
  |  |   53|  31.8k|        *(res) = _safe_sum; \
  |  |   54|  31.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (54:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2394|       |
 2395|  31.8k|    if (to_capacity < new_to_size) {
  ------------------
  |  Branch (2395:9): [True: 0, False: 31.8k]
  ------------------
 2396|      0|        igraph_integer_t new_to_capacity = to_capacity < IGRAPH_INTEGER_MAX/2 ? to_capacity * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   77|      0|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
                      igraph_integer_t new_to_capacity = to_capacity < IGRAPH_INTEGER_MAX/2 ? to_capacity * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   77|      0|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (2396:44): [True: 0, False: 0]
  ------------------
 2397|      0|        if (new_to_capacity < new_to_size) {
  ------------------
  |  Branch (2397:13): [True: 0, False: 0]
  ------------------
 2398|      0|            new_to_capacity = new_to_size;
 2399|      0|        }
 2400|      0|        IGRAPH_CHECK(FUNCTION(igraph_vector, reserve)(to, new_to_capacity));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2401|      0|    }
 2402|       |
 2403|  31.8k|    memcpy(to->stor_begin + to_size, from->stor_begin,
 2404|  31.8k|           sizeof(BASE) * from_size);
 2405|  31.8k|    to->end = to->stor_begin + new_to_size;
 2406|       |
 2407|  31.8k|    return IGRAPH_SUCCESS;
 2408|  31.8k|}

igraph_vector_ptr_init:
   87|    732|igraph_error_t igraph_vector_ptr_init(igraph_vector_ptr_t* v, igraph_integer_t size) {
   88|    732|    igraph_integer_t alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (88:35): [True: 0, False: 732]
  ------------------
   89|    732|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|    732|    do { \
  |  |  917|    732|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|    732|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 732]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   90|    732|    if (size < 0) {
  ------------------
  |  Branch (90:9): [True: 0, False: 732]
  ------------------
   91|      0|        size = 0;
   92|      0|    }
   93|    732|    v->stor_begin = IGRAPH_CALLOC(alloc_size, void*);
  ------------------
  |  |   38|    732|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  1.46k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 732, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 732, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 732, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   94|    732|    if (v->stor_begin == 0) {
  ------------------
  |  Branch (94:9): [True: 0, False: 732]
  ------------------
   95|      0|        IGRAPH_ERROR("vector ptr init failed", IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   96|      0|    }
   97|    732|    v->stor_end = v->stor_begin + alloc_size;
   98|    732|    v->end = v->stor_begin + size;
   99|    732|    v->item_destructor = 0;
  100|       |
  101|    732|    return IGRAPH_SUCCESS;
  102|    732|}
igraph_vector_ptr_destroy:
  133|    732|void igraph_vector_ptr_destroy(igraph_vector_ptr_t* v) {
  134|    732|    IGRAPH_ASSERT(v != 0);
  ------------------
  |  |  916|    732|    do { \
  |  |  917|    732|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|    732|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 732]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  135|    732|    if (v->stor_begin != 0) {
  ------------------
  |  Branch (135:9): [True: 732, False: 0]
  ------------------
  136|    732|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   41|    732|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  137|    732|        v->stor_begin = NULL;
  138|    732|    }
  139|    732|}
igraph_vector_ptr_size:
  292|  2.92k|igraph_integer_t igraph_vector_ptr_size(const igraph_vector_ptr_t* v) {
  293|  2.92k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  2.92k|    do { \
  |  |  917|  2.92k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  2.92k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  2.92k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  294|  2.92k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  2.92k|    do { \
  |  |  917|  2.92k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  2.92k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  2.92k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  295|  2.92k|    return v->end - v->stor_begin;
  296|  2.92k|}
igraph_vector_ptr_push_back:
  361|    732|igraph_error_t igraph_vector_ptr_push_back(igraph_vector_ptr_t* v, void* e) {
  362|    732|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|    732|    do { \
  |  |  917|    732|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|    732|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 732]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  363|    732|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|    732|    do { \
  |  |  917|    732|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|    732|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 732]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  364|       |
  365|       |    /* full, allocate more storage */
  366|    732|    if (v->stor_end == v->end) {
  ------------------
  |  Branch (366:9): [True: 0, False: 732]
  ------------------
  367|      0|        igraph_integer_t new_size = igraph_vector_ptr_size(v) * 2;
  368|      0|        if (new_size == 0) {
  ------------------
  |  Branch (368:13): [True: 0, False: 0]
  ------------------
  369|      0|            new_size = 1;
  370|      0|        }
  371|      0|        IGRAPH_CHECK(igraph_vector_ptr_reserve(v, new_size));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  372|      0|    }
  373|       |
  374|    732|    *(v->end) = e;
  375|    732|    v->end += 1;
  376|       |
  377|    732|    return IGRAPH_SUCCESS;
  378|    732|}

igraph_adjlist_init_empty:
  250|  2.13k|igraph_error_t igraph_adjlist_init_empty(igraph_adjlist_t *al, igraph_integer_t no_of_nodes) {
  251|       |
  252|  2.13k|    al->length = no_of_nodes;
  253|  2.13k|    al->adjs = IGRAPH_CALLOC(al->length, igraph_vector_int_t);
  ------------------
  |  |   38|  2.13k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  4.26k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 2.13k, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 2.13k, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 2.13k, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  254|  2.13k|    IGRAPH_CHECK_OOM(al->adjs, "Insufficient memory for creating adjlist.");
  ------------------
  |  |  701|  2.13k|    do { \
  |  |  702|  2.13k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|  2.13k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.13k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|  2.13k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  255|  2.13k|    IGRAPH_FINALLY(igraph_adjlist_destroy, al);
  ------------------
  |  |  591|  2.13k|    do { \
  |  |  592|  2.13k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  2.13k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  2.13k|         * incorrect destructor function with the pointer */ \
  |  |  595|  2.13k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  2.13k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  2.13k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  256|       |
  257|  97.3k|    for (igraph_integer_t i = 0; i < al->length; i++) {
  ------------------
  |  Branch (257:34): [True: 95.2k, False: 2.13k]
  ------------------
  258|  95.2k|        IGRAPH_CHECK(igraph_vector_int_init(&al->adjs[i], 0));
  ------------------
  |  |  648|  95.2k|    do { \
  |  |  649|  95.2k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  95.2k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  95.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 95.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  95.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  259|  95.2k|    }
  260|       |
  261|  2.13k|    IGRAPH_FINALLY_CLEAN(1);
  262|       |
  263|  2.13k|    return IGRAPH_SUCCESS;
  264|  2.13k|}
igraph_adjlist_destroy:
  429|  2.13k|void igraph_adjlist_destroy(igraph_adjlist_t *al) {
  430|  97.3k|    for (igraph_integer_t i = 0; i < al->length; i++) {
  ------------------
  |  Branch (430:34): [True: 95.2k, False: 2.13k]
  ------------------
  431|       |        /* This works if some igraph_vector_int_t's contain NULL,
  432|       |           because igraph_vector_int_destroy can handle this. */
  433|  95.2k|        igraph_vector_int_destroy(&al->adjs[i]);
  434|  95.2k|    }
  435|  2.13k|    IGRAPH_FREE(al->adjs);
  ------------------
  |  |   41|  2.13k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  436|  2.13k|}
igraph_inclist_init:
  770|  4.99k|                        igraph_loops_t loops) {
  771|  4.99k|    igraph_integer_t no_of_nodes = igraph_vcount(graph);
  772|  4.99k|    igraph_vector_int_t degrees;
  773|       |
  774|  4.99k|    if (mode != IGRAPH_IN && mode != IGRAPH_OUT && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (774:9): [True: 4.99k, False: 0]
  |  Branch (774:30): [True: 1.46k, False: 3.53k]
  |  Branch (774:52): [True: 0, False: 1.46k]
  ------------------
  775|      0|        IGRAPH_ERROR("Cannot create incidence list view.", IGRAPH_EINVMODE);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  776|      0|    }
  777|       |
  778|  4.99k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (778:9): [True: 731, False: 4.26k]
  ------------------
  779|    731|        mode = IGRAPH_ALL;
  780|    731|    }
  781|       |
  782|  4.99k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&degrees, no_of_nodes);
  ------------------
  |  |  124|  4.99k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  4.99k|    do { \
  |  |  |  |  649|  4.99k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  4.99k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  4.99k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 4.99k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  4.99k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  4.99k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  4.99k|    do { \
  |  |  |  |  592|  4.99k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  4.99k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  4.99k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  4.99k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  4.99k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  4.99k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  783|       |    /* igraph_degrees() is fast when loops=true */
  784|  4.99k|    IGRAPH_CHECK(igraph_degree(graph, &degrees, igraph_vss_all(), mode, /* loops= */ 1));
  ------------------
  |  |  648|  4.99k|    do { \
  |  |  649|  4.99k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  4.99k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  4.99k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 4.99k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  4.99k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  785|       |
  786|  4.99k|    il->length = no_of_nodes;
  787|  4.99k|    il->incs = IGRAPH_CALLOC(il->length, igraph_vector_int_t);
  ------------------
  |  |   38|  4.99k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  9.99k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 4.99k, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 4.99k, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 4.99k, False: 4]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  788|  4.99k|    if (il->incs == 0) {
  ------------------
  |  Branch (788:9): [True: 0, False: 4.99k]
  ------------------
  789|      0|        IGRAPH_ERROR("Cannot create incidence list view.", IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  790|      0|    }
  791|       |
  792|  4.99k|    IGRAPH_FINALLY(igraph_inclist_destroy, il);
  ------------------
  |  |  591|  4.99k|    do { \
  |  |  592|  4.99k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  4.99k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  4.99k|         * incorrect destructor function with the pointer */ \
  |  |  595|  4.99k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  4.99k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  4.99k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  793|   227k|    for (igraph_integer_t i = 0; i < il->length; i++) {
  ------------------
  |  Branch (793:34): [True: 222k, False: 4.99k]
  ------------------
  794|   222k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   47|   222k|    do { \
  |  |   48|   222k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (48:13): [True: 0, False: 222k]
  |  |  ------------------
  |  |   49|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (49:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   50|      0|                return IGRAPH_INTERRUPTED; \
  |  |   51|      0|            } \
  |  |   52|      0|        } \
  |  |   53|   222k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (53:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  795|       |
  796|   222k|        IGRAPH_CHECK(igraph_vector_int_init(&il->incs[i], VECTOR(degrees)[i]));
  ------------------
  |  |  648|   222k|    do { \
  |  |  649|   222k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|   222k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|   222k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 222k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|   222k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  797|   222k|        IGRAPH_CHECK(igraph_incident(graph, &il->incs[i], i, mode));
  ------------------
  |  |  648|   222k|    do { \
  |  |  649|   222k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|   222k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|   222k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 222k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|   222k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  798|       |
  799|   222k|        if (loops != IGRAPH_LOOPS_TWICE) {
  ------------------
  |  Branch (799:13): [True: 190k, False: 31.8k]
  ------------------
  800|   190k|            IGRAPH_CHECK(
  ------------------
  |  |  648|   190k|    do { \
  |  |  649|   190k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|   190k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|   190k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 190k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|   190k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  801|   190k|                igraph_i_remove_loops_from_incidence_vector_in_place(&il->incs[i], graph, loops)
  802|   190k|            );
  803|   190k|        }
  804|   222k|    }
  805|       |
  806|  4.99k|    igraph_vector_int_destroy(&degrees);
  807|  4.99k|    IGRAPH_FINALLY_CLEAN(2); /* + igraph_inclist_destroy */
  808|       |
  809|  4.99k|    return IGRAPH_SUCCESS;
  810|  4.99k|}
igraph_inclist_init_empty:
  827|  2.13k|igraph_error_t igraph_inclist_init_empty(igraph_inclist_t *il, igraph_integer_t n) {
  828|  2.13k|    igraph_integer_t i;
  829|       |
  830|  2.13k|    il->length = n;
  831|  2.13k|    il->incs = IGRAPH_CALLOC(il->length, igraph_vector_int_t);
  ------------------
  |  |   38|  2.13k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  4.26k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 2.13k, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 2.13k, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 2.13k, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  832|  2.13k|    if (il->incs == 0) {
  ------------------
  |  Branch (832:9): [True: 0, False: 2.13k]
  ------------------
  833|      0|        IGRAPH_ERROR("Cannot create incidence list view", IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  834|      0|    }
  835|       |
  836|  2.13k|    IGRAPH_FINALLY(igraph_inclist_destroy, il);
  ------------------
  |  |  591|  2.13k|    do { \
  |  |  592|  2.13k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  2.13k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  2.13k|         * incorrect destructor function with the pointer */ \
  |  |  595|  2.13k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  2.13k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  2.13k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  837|  97.3k|    for (i = 0; i < n; i++) {
  ------------------
  |  Branch (837:17): [True: 95.2k, False: 2.13k]
  ------------------
  838|  95.2k|        IGRAPH_CHECK(igraph_vector_int_init(&il->incs[i], 0));
  ------------------
  |  |  648|  95.2k|    do { \
  |  |  649|  95.2k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  95.2k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  95.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 95.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  95.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  839|  95.2k|    }
  840|       |
  841|  2.13k|    IGRAPH_FINALLY_CLEAN(1);
  842|  2.13k|    return IGRAPH_SUCCESS;
  843|  2.13k|}
igraph_inclist_destroy:
  854|  7.12k|void igraph_inclist_destroy(igraph_inclist_t *il) {
  855|   324k|    for (igraph_integer_t i = 0; i < il->length; i++) {
  ------------------
  |  Branch (855:34): [True: 317k, False: 7.12k]
  ------------------
  856|       |        /* This works if some igraph_vector_int_t's contain NULL,
  857|       |           because igraph_vector_int_destroy can handle this. */
  858|   317k|        igraph_vector_int_destroy(&il->incs[i]);
  859|   317k|    }
  860|  7.12k|    IGRAPH_FREE(il->incs);
  ------------------
  |  |   41|  7.12k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  861|  7.12k|}
igraph_lazy_inclist_init:
 1258|  4.39k|                             igraph_loops_t loops) {
 1259|       |
 1260|  4.39k|    if (mode != IGRAPH_IN && mode != IGRAPH_OUT && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (1260:9): [True: 3.66k, False: 732]
  |  Branch (1260:30): [True: 1.46k, False: 2.19k]
  |  Branch (1260:52): [True: 0, False: 1.46k]
  ------------------
 1261|      0|        IGRAPH_ERROR("Cannot create lazy incidence list view", IGRAPH_EINVMODE);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1262|      0|    }
 1263|       |
 1264|  4.39k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (1264:9): [True: 0, False: 4.39k]
  ------------------
 1265|      0|        mode = IGRAPH_ALL;
 1266|      0|    }
 1267|       |
 1268|  4.39k|    il->graph = graph;
 1269|  4.39k|    il->loops = loops;
 1270|  4.39k|    il->mode = mode;
 1271|       |
 1272|  4.39k|    il->length = igraph_vcount(graph);
 1273|  4.39k|    il->incs = IGRAPH_CALLOC(il->length, igraph_vector_int_t*);
  ------------------
  |  |   38|  4.39k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  8.78k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 4.39k, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 4.39k, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 4.38k, False: 6]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1274|  4.39k|    if (il->incs == 0) {
  ------------------
  |  Branch (1274:9): [True: 0, False: 4.39k]
  ------------------
 1275|      0|        IGRAPH_ERROR("Cannot create lazy incidence list view", IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1276|      0|    }
 1277|       |
 1278|  4.39k|    return IGRAPH_SUCCESS;
 1279|       |
 1280|  4.39k|}
igraph_lazy_inclist_destroy:
 1292|  4.39k|void igraph_lazy_inclist_destroy(igraph_lazy_inclist_t *il) {
 1293|  4.39k|    igraph_lazy_inclist_clear(il);
 1294|  4.39k|    IGRAPH_FREE(il->incs);
  ------------------
  |  |   41|  4.39k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1295|  4.39k|}
igraph_lazy_inclist_clear:
 1306|  4.39k|void igraph_lazy_inclist_clear(igraph_lazy_inclist_t *il) {
 1307|  4.39k|    igraph_integer_t i, n = il->length;
 1308|   195k|    for (i = 0; i < n; i++) {
  ------------------
  |  Branch (1308:17): [True: 191k, False: 4.39k]
  ------------------
 1309|   191k|        if (il->incs[i] != 0) {
  ------------------
  |  Branch (1309:13): [True: 163k, False: 28.0k]
  ------------------
 1310|   163k|            igraph_vector_int_destroy(il->incs[i]);
 1311|   163k|            IGRAPH_FREE(il->incs[i]);
  ------------------
  |  |   41|   163k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1312|   163k|        }
 1313|   191k|    }
 1314|  4.39k|}
igraph_i_lazy_inclist_get_real:
 1329|   163k|igraph_vector_int_t *igraph_i_lazy_inclist_get_real(igraph_lazy_inclist_t *il, igraph_integer_t no) {
 1330|   163k|    igraph_error_t ret;
 1331|       |
 1332|   163k|    if (il->incs[no] == NULL) {
  ------------------
  |  Branch (1332:9): [True: 163k, False: 0]
  ------------------
 1333|   163k|        il->incs[no] = IGRAPH_CALLOC(1, igraph_vector_int_t);
  ------------------
  |  |   38|   163k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|   326k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [Folded - Ignored]
  |  |  |  |  |  Branch (36:24): [Folded - Ignored]
  |  |  |  |  |  Branch (36:66): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1334|   163k|        if (il->incs[no] == NULL) {
  ------------------
  |  Branch (1334:13): [True: 0, False: 163k]
  ------------------
 1335|      0|            return NULL;
 1336|      0|        }
 1337|       |
 1338|   163k|        ret = igraph_vector_int_init(il->incs[no], 0);
 1339|   163k|        if (ret != IGRAPH_SUCCESS) {
  ------------------
  |  Branch (1339:13): [True: 0, False: 163k]
  ------------------
 1340|      0|            IGRAPH_FREE(il->incs[no]);
  ------------------
  |  |   41|      0|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1341|      0|            return NULL;
 1342|      0|        }
 1343|       |
 1344|   163k|        ret = igraph_incident(il->graph, il->incs[no], no, il->mode);
 1345|   163k|        if (ret != IGRAPH_SUCCESS) {
  ------------------
  |  Branch (1345:13): [True: 0, False: 163k]
  ------------------
 1346|      0|            igraph_vector_int_destroy(il->incs[no]);
 1347|      0|            IGRAPH_FREE(il->incs[no]);
  ------------------
  |  |   41|      0|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1348|      0|            return NULL;
 1349|      0|        }
 1350|       |
 1351|   163k|        if (il->loops != IGRAPH_LOOPS_TWICE) {
  ------------------
  |  Branch (1351:13): [True: 0, False: 163k]
  ------------------
 1352|      0|            ret = igraph_i_remove_loops_from_incidence_vector_in_place(il->incs[no], il->graph, il->loops);
 1353|      0|            if (ret != IGRAPH_SUCCESS) {
  ------------------
  |  Branch (1353:17): [True: 0, False: 0]
  ------------------
 1354|      0|                igraph_vector_int_destroy(il->incs[no]);
 1355|      0|                IGRAPH_FREE(il->incs[no]);
  ------------------
  |  |   41|      0|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1356|      0|                return NULL;
 1357|      0|            }
 1358|      0|        }
 1359|   163k|    }
 1360|       |
 1361|   163k|    return il->incs[no];
 1362|   163k|}
adjlist.c:igraph_i_remove_loops_from_incidence_vector_in_place:
  636|   190k|) {
  637|   190k|    igraph_integer_t i, length, eid, write_ptr;
  638|   190k|    igraph_vector_int_t *seen_loops = 0;
  639|       |
  640|       |    /* In this function we make use of the fact that we are dealing with
  641|       |     * _incidence_ lists, and the only way for an edge ID to appear twice
  642|       |     * within an incidence list is if the edge is a loop edge; otherwise each
  643|       |     * element will be unique.
  644|       |     *
  645|       |     * Note that incidence vectors are not sorted by edge ID, so we need to
  646|       |     * look up the edges in the graph to decide whether they are loops or not.
  647|       |     *
  648|       |     * Also, it may be tempting to introduce a boolean in case of IGRAPH_LOOPS_ONCE,
  649|       |     * and flip it every time we see a loop to get rid of half of the occurrences,
  650|       |     * but the problem is that even if the same loop edge ID appears twice in
  651|       |     * the input list, they are not guaranteed to be next to each other; it
  652|       |     * may be the case that there are multiple loop edges, each edge appears
  653|       |     * twice, and we want to keep exactly one of them for each ID. That's why
  654|       |     * we have a "seen_loops" vector.
  655|       |     */
  656|       |
  657|   190k|    if (loops == IGRAPH_LOOPS_TWICE) {
  ------------------
  |  Branch (657:9): [True: 0, False: 190k]
  ------------------
  658|       |        /* Loop edges appear twice by default, nothing to do. */
  659|      0|        return IGRAPH_SUCCESS;
  660|      0|    }
  661|       |
  662|   190k|    length = igraph_vector_int_size(v);
  663|   190k|    if (length == 0) {
  ------------------
  |  Branch (663:9): [True: 160k, False: 30.4k]
  ------------------
  664|   160k|        return IGRAPH_SUCCESS;
  665|   160k|    }
  666|       |
  667|  30.4k|    if (loops == IGRAPH_LOOPS_ONCE) {
  ------------------
  |  Branch (667:9): [True: 0, False: 30.4k]
  ------------------
  668|       |        /* We need a helper vector */
  669|      0|        seen_loops = IGRAPH_CALLOC(1, igraph_vector_int_t);
  ------------------
  |  |   38|      0|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|      0|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [Folded - Ignored]
  |  |  |  |  |  Branch (36:24): [Folded - Ignored]
  |  |  |  |  |  Branch (36:66): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  670|      0|        IGRAPH_FINALLY(igraph_free, seen_loops);
  ------------------
  |  |  591|      0|    do { \
  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  671|      0|        IGRAPH_CHECK(igraph_vector_int_init(seen_loops, 0));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  672|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, seen_loops);
  ------------------
  |  |  591|      0|    do { \
  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  673|  30.4k|    } else if (loops != IGRAPH_NO_LOOPS) {
  ------------------
  |  Branch (673:16): [True: 0, False: 30.4k]
  ------------------
  674|      0|        IGRAPH_ERROR("Invalid value for 'loops' argument", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  675|      0|    }
  676|       |
  677|   155k|    for (i = 0, write_ptr = 0; i < length; i++) {
  ------------------
  |  Branch (677:32): [True: 125k, False: 30.4k]
  ------------------
  678|   125k|        eid = VECTOR(*v)[i];
  ------------------
  |  |   65|   125k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  679|   125k|        if (IGRAPH_FROM(graph, eid) == IGRAPH_TO(graph, eid)) {
  ------------------
  |  |  113|   125k|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|   125k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
                      if (IGRAPH_FROM(graph, eid) == IGRAPH_TO(graph, eid)) {
  ------------------
  |  |  126|   125k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|   125k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (679:13): [True: 26.0k, False: 99.3k]
  ------------------
  680|       |            /* Loop edge */
  681|  26.0k|            if (seen_loops && !igraph_vector_int_contains(seen_loops, eid)) {
  ------------------
  |  Branch (681:17): [True: 0, False: 26.0k]
  |  Branch (681:31): [True: 0, False: 0]
  ------------------
  682|      0|                VECTOR(*v)[write_ptr++] = eid;
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  683|      0|                IGRAPH_CHECK(igraph_vector_int_push_back(seen_loops, eid));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  684|      0|            }
  685|  99.3k|        } else {
  686|       |            /* Not a loop edge */
  687|  99.3k|            VECTOR(*v)[write_ptr++] = eid;
  ------------------
  |  |   65|  99.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  688|  99.3k|        }
  689|   125k|    }
  690|       |
  691|       |    /* Always succeeds since we never grow the vector */
  692|  30.4k|    igraph_vector_int_resize(v, write_ptr);
  693|       |
  694|       |    /* Destroy the helper vector */
  695|  30.4k|    if (seen_loops) {
  ------------------
  |  Branch (695:9): [True: 0, False: 30.4k]
  ------------------
  696|      0|        igraph_vector_int_destroy(seen_loops);
  697|      0|        IGRAPH_FREE(seen_loops);
  ------------------
  |  |   41|      0|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  698|      0|        IGRAPH_FINALLY_CLEAN(2);
  699|      0|    }
  700|       |
  701|  30.4k|    return IGRAPH_SUCCESS;
  702|  30.4k|}

igraph_attribute_record_init:
  127|  2.19k|) {
  128|  2.19k|    attr->name = NULL;
  129|  2.19k|    attr->type = IGRAPH_ATTRIBUTE_UNSPECIFIED;
  130|  2.19k|    attr->value.as_raw = NULL;
  131|  2.19k|    attr->default_value.string = NULL;
  132|       |
  133|  2.19k|    IGRAPH_CHECK(igraph_attribute_record_set_name(attr, name));
  ------------------
  |  |  648|  2.19k|    do { \
  |  |  649|  2.19k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.19k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.19k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.19k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.19k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  134|  2.19k|    IGRAPH_CHECK(igraph_attribute_record_set_type(attr, type));
  ------------------
  |  |  648|  2.19k|    do { \
  |  |  649|  2.19k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.19k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.19k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.19k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.19k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  135|       |
  136|  2.19k|    return IGRAPH_SUCCESS;
  137|  2.19k|}
igraph_attribute_record_destroy:
  240|  2.19k|void igraph_attribute_record_destroy(igraph_attribute_record_t *attr) {
  241|  2.19k|    igraph_i_attribute_record_destroy_values(attr);
  242|       |
  243|  2.19k|    if (attr->name) {
  ------------------
  |  Branch (243:9): [True: 2.19k, False: 0]
  ------------------
  244|  2.19k|        igraph_free(attr->name);
  245|  2.19k|        attr->name = NULL;
  246|  2.19k|    }
  247|  2.19k|}
igraph_attribute_record_check_type:
  263|    732|) {
  264|    732|    if (type != attr->type) {
  ------------------
  |  Branch (264:9): [True: 0, False: 732]
  ------------------
  265|      0|        switch (type) {
  266|      0|            case IGRAPH_ATTRIBUTE_STRING:
  ------------------
  |  Branch (266:13): [True: 0, False: 0]
  ------------------
  267|      0|                IGRAPH_ERROR("String attribute expected.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  268|      0|                break;
  269|      0|            case IGRAPH_ATTRIBUTE_NUMERIC:
  ------------------
  |  Branch (269:13): [True: 0, False: 0]
  ------------------
  270|      0|                IGRAPH_ERROR("Numeric attribute expected.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  271|      0|                break;
  272|      0|            case IGRAPH_ATTRIBUTE_BOOLEAN:
  ------------------
  |  Branch (272:13): [True: 0, False: 0]
  ------------------
  273|      0|                IGRAPH_ERROR("Boolean attribute expected.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  274|      0|                break;
  275|      0|            case IGRAPH_ATTRIBUTE_OBJECT:
  ------------------
  |  Branch (275:13): [True: 0, False: 0]
  ------------------
  276|      0|                IGRAPH_ERROR("Object attribute expected.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  277|      0|                break;
  278|      0|            default:
  ------------------
  |  Branch (278:13): [True: 0, False: 0]
  ------------------
  279|      0|                IGRAPH_ERROR("Attribute with unknown type expected.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  280|      0|                break;
  281|      0|        }
  282|      0|    }
  283|       |
  284|    732|    return IGRAPH_SUCCESS;
  285|    732|}
igraph_attribute_record_size:
  294|    692|igraph_integer_t igraph_attribute_record_size(const igraph_attribute_record_t *attr) {
  295|    692|    IGRAPH_ASSERT(attr != NULL);
  ------------------
  |  |  916|    692|    do { \
  |  |  917|    692|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|    692|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 692]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|    692|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  296|       |
  297|    692|    switch (attr->type) {
  298|    692|        case IGRAPH_ATTRIBUTE_NUMERIC:
  ------------------
  |  Branch (298:9): [True: 692, False: 0]
  ------------------
  299|    692|            return igraph_vector_size(attr->value.as_vector);
  300|       |
  301|      0|        case IGRAPH_ATTRIBUTE_STRING:
  ------------------
  |  Branch (301:9): [True: 0, False: 692]
  ------------------
  302|      0|            return igraph_strvector_size(attr->value.as_strvector);
  303|       |
  304|      0|        case IGRAPH_ATTRIBUTE_BOOLEAN:
  ------------------
  |  Branch (304:9): [True: 0, False: 692]
  ------------------
  305|      0|            return igraph_vector_bool_size(attr->value.as_vector_bool);
  306|       |
  307|      0|        case IGRAPH_ATTRIBUTE_UNSPECIFIED:
  ------------------
  |  Branch (307:9): [True: 0, False: 692]
  ------------------
  308|      0|            return 0;
  309|       |
  310|      0|        default:
  ------------------
  |  Branch (310:9): [True: 0, False: 692]
  ------------------
  311|      0|            IGRAPH_ERRORF("Unsupported attribute type: %d", IGRAPH_EINVAL, (int) attr->type);
  ------------------
  |  |  469|      0|    do { \
  |  |  470|      0|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  471|      0|                      igraph_errno, __VA_ARGS__) ; \
  |  |  472|      0|        return igraph_errno; \
  |  |  473|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (473:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  312|    692|    }
  313|    692|}
igraph_attribute_record_resize:
  331|  2.15k|) {
  332|  2.15k|    igraph_integer_t i;
  333|  2.15k|    igraph_vector_t *vec;
  334|  2.15k|    igraph_vector_bool_t *log;
  335|  2.15k|    igraph_strvector_t *str;
  336|       |
  337|  2.15k|    IGRAPH_ASSERT(attr != NULL);
  ------------------
  |  |  916|  2.15k|    do { \
  |  |  917|  2.15k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  2.15k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.15k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  2.15k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  338|       |
  339|  2.15k|    switch (attr->type) {
  340|       |
  341|  2.15k|        case IGRAPH_ATTRIBUTE_NUMERIC:
  ------------------
  |  Branch (341:9): [True: 2.15k, False: 0]
  ------------------
  342|  2.15k|            vec = attr->value.as_vector;
  343|  2.15k|            i = igraph_vector_size(vec);
  344|  2.15k|            IGRAPH_CHECK(igraph_vector_resize(vec, new_size));
  ------------------
  |  |  648|  2.15k|    do { \
  |  |  649|  2.15k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.15k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.15k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.15k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.15k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  345|  37.7k|            while (i < new_size) {
  ------------------
  |  Branch (345:20): [True: 35.5k, False: 2.15k]
  ------------------
  346|  35.5k|                VECTOR(*vec)[i++] = attr->default_value.numeric;
  ------------------
  |  |   65|  35.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  347|  35.5k|            }
  348|  2.15k|            break;
  349|       |
  350|      0|        case IGRAPH_ATTRIBUTE_BOOLEAN:
  ------------------
  |  Branch (350:9): [True: 0, False: 2.15k]
  ------------------
  351|      0|            log = attr->value.as_vector_bool;
  352|      0|            i = igraph_vector_bool_size(log);
  353|      0|            IGRAPH_CHECK(igraph_vector_bool_resize(log, new_size));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  354|      0|            while (i < new_size) {
  ------------------
  |  Branch (354:20): [True: 0, False: 0]
  ------------------
  355|      0|                VECTOR(*log)[i++] = attr->default_value.boolean;
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  356|      0|            }
  357|      0|            break;
  358|       |
  359|      0|        case IGRAPH_ATTRIBUTE_STRING:
  ------------------
  |  Branch (359:9): [True: 0, False: 2.15k]
  ------------------
  360|      0|            str = attr->value.as_strvector;
  361|      0|            if (attr->default_value.string == 0 || (*attr->default_value.string == 0)) {
  ------------------
  |  Branch (361:17): [True: 0, False: 0]
  |  Branch (361:52): [True: 0, False: 0]
  ------------------
  362|      0|                IGRAPH_CHECK(igraph_strvector_resize(str, new_size));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  363|      0|            } else {
  364|      0|                i = igraph_strvector_size(str);
  365|      0|                IGRAPH_CHECK(igraph_strvector_resize(str, new_size));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  366|      0|                while (i < new_size) {
  ------------------
  |  Branch (366:24): [True: 0, False: 0]
  ------------------
  367|      0|                    IGRAPH_CHECK(igraph_strvector_set(str, i++, attr->default_value.string));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  368|      0|                }
  369|      0|            }
  370|      0|            break;
  371|       |
  372|      0|        case IGRAPH_ATTRIBUTE_UNSPECIFIED:
  ------------------
  |  Branch (372:9): [True: 0, False: 2.15k]
  ------------------
  373|      0|            IGRAPH_ERROR("Attribute record has no type yet.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  374|      0|            break;
  375|       |
  376|      0|        default:
  ------------------
  |  Branch (376:9): [True: 0, False: 2.15k]
  ------------------
  377|      0|            IGRAPH_ERRORF("Unsupported attribute type: %d", IGRAPH_EINVAL, (int) attr->type);
  ------------------
  |  |  469|      0|    do { \
  |  |  470|      0|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  471|      0|                      igraph_errno, __VA_ARGS__) ; \
  |  |  472|      0|        return igraph_errno; \
  |  |  473|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (473:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  378|  2.15k|    }
  379|       |
  380|  2.15k|    return IGRAPH_SUCCESS;
  381|  2.15k|}
igraph_attribute_record_set_default_numeric:
  398|  2.19k|) {
  399|  2.19k|    if (attr->type != IGRAPH_ATTRIBUTE_NUMERIC) {
  ------------------
  |  Branch (399:9): [True: 0, False: 2.19k]
  ------------------
  400|      0|        return IGRAPH_EINVAL;
  401|      0|    }
  402|       |
  403|  2.19k|    attr->default_value.numeric = value;
  404|  2.19k|    return IGRAPH_SUCCESS;
  405|  2.19k|}
igraph_attribute_record_set_name:
  482|  2.92k|) {
  483|  2.92k|    char* new_name;
  484|       |
  485|  2.92k|    IGRAPH_ASSERT(attr != NULL);
  ------------------
  |  |  916|  2.92k|    do { \
  |  |  917|  2.92k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  2.92k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  2.92k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  486|       |
  487|  2.92k|    if (name != NULL) {
  ------------------
  |  Branch (487:9): [True: 2.19k, False: 732]
  ------------------
  488|  2.19k|        new_name = strdup(name);
  489|  2.19k|        IGRAPH_CHECK_OOM(new_name, "Insufficient memory for allocating attribute name.");
  ------------------
  |  |  701|  2.19k|    do { \
  |  |  702|  2.19k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|  2.19k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.19k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|  2.19k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  490|  2.19k|    } else {
  491|    732|        new_name = NULL;
  492|    732|    }
  493|       |
  494|  2.92k|    if (attr->name) {
  ------------------
  |  Branch (494:9): [True: 0, False: 2.92k]
  ------------------
  495|      0|        igraph_free(attr->name);
  496|      0|    }
  497|       |
  498|  2.92k|    attr->name = new_name;
  499|       |
  500|  2.92k|    return IGRAPH_SUCCESS;
  501|  2.92k|}
igraph_attribute_record_set_type:
  538|  2.92k|) {
  539|  2.92k|    void* ptr;
  540|       |
  541|  2.92k|    IGRAPH_ASSERT(attr != NULL);
  ------------------
  |  |  916|  2.92k|    do { \
  |  |  917|  2.92k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  2.92k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  2.92k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  542|       |
  543|  2.92k|    if (attr->type != type) {
  ------------------
  |  Branch (543:9): [True: 2.19k, False: 732]
  ------------------
  544|  2.19k|        switch (type) {
  545|  2.19k|            case IGRAPH_ATTRIBUTE_NUMERIC: {
  ------------------
  |  Branch (545:13): [True: 2.19k, False: 0]
  ------------------
  546|  2.19k|                igraph_vector_t* vec = IGRAPH_CALLOC(1, igraph_vector_t);
  ------------------
  |  |   38|  2.19k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  4.39k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [Folded - Ignored]
  |  |  |  |  |  Branch (36:24): [Folded - Ignored]
  |  |  |  |  |  Branch (36:66): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  547|  2.19k|                IGRAPH_CHECK_OOM(vec, "Insufficient memory for attribute record.");
  ------------------
  |  |  701|  2.19k|    do { \
  |  |  702|  2.19k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|  2.19k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.19k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|  2.19k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  548|  2.19k|                IGRAPH_FINALLY(igraph_free, vec);
  ------------------
  |  |  591|  2.19k|    do { \
  |  |  592|  2.19k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  2.19k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  2.19k|         * incorrect destructor function with the pointer */ \
  |  |  595|  2.19k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  2.19k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  2.19k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  549|  2.19k|                IGRAPH_VECTOR_INIT_FINALLY(vec, 0);
  ------------------
  |  |  109|  2.19k|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.19k|    do { \
  |  |  |  |  649|  2.19k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.19k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.19k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.19k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.19k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  110|  2.19k|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.19k|    do { \
  |  |  |  |  592|  2.19k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.19k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.19k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.19k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.19k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.19k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (110:60): [Folded - Ignored]
  |  |  ------------------
  ------------------
  550|  2.19k|                ptr = vec;
  551|  2.19k|            }
  552|      0|            break;
  553|       |
  554|      0|            case IGRAPH_ATTRIBUTE_STRING: {
  ------------------
  |  Branch (554:13): [True: 0, False: 2.19k]
  ------------------
  555|      0|                igraph_strvector_t* strvec = IGRAPH_CALLOC(1, igraph_strvector_t);
  ------------------
  |  |   38|      0|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|      0|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [Folded - Ignored]
  |  |  |  |  |  Branch (36:24): [Folded - Ignored]
  |  |  |  |  |  Branch (36:66): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  556|      0|                IGRAPH_CHECK_OOM(strvec, "Insufficient memory for attribute record.");
  ------------------
  |  |  701|      0|    do { \
  |  |  702|      0|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  557|      0|                IGRAPH_FINALLY(igraph_free, strvec);
  ------------------
  |  |  591|      0|    do { \
  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  558|      0|                IGRAPH_CHECK(igraph_strvector_init(strvec, 0));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  559|      0|                IGRAPH_FINALLY(igraph_strvector_destroy, strvec);
  ------------------
  |  |  591|      0|    do { \
  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  560|      0|                ptr = strvec;
  561|      0|            }
  562|      0|            break;
  563|       |
  564|      0|            case IGRAPH_ATTRIBUTE_BOOLEAN: {
  ------------------
  |  Branch (564:13): [True: 0, False: 2.19k]
  ------------------
  565|      0|                igraph_vector_bool_t* boolvec = IGRAPH_CALLOC(1, igraph_vector_bool_t);
  ------------------
  |  |   38|      0|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|      0|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [Folded - Ignored]
  |  |  |  |  |  Branch (36:24): [Folded - Ignored]
  |  |  |  |  |  Branch (36:66): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  566|      0|                IGRAPH_CHECK_OOM(boolvec, "Insufficient memory for attribute record.");
  ------------------
  |  |  701|      0|    do { \
  |  |  702|      0|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  567|      0|                IGRAPH_FINALLY(igraph_free, boolvec);
  ------------------
  |  |  591|      0|    do { \
  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  568|      0|                IGRAPH_VECTOR_BOOL_INIT_FINALLY(boolvec, 0);
  ------------------
  |  |  114|      0|    do { IGRAPH_CHECK(igraph_vector_bool_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|      0|    do { \
  |  |  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  115|      0|        IGRAPH_FINALLY(igraph_vector_bool_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|      0|    do { \
  |  |  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (115:65): [Folded - Ignored]
  |  |  ------------------
  ------------------
  569|      0|                ptr = boolvec;
  570|      0|            }
  571|      0|            break;
  572|       |
  573|      0|            default:
  ------------------
  |  Branch (573:13): [True: 0, False: 2.19k]
  ------------------
  574|      0|                IGRAPH_ERRORF("Unsupported attribute type: %d", IGRAPH_EINVAL, (int) type);
  ------------------
  |  |  469|      0|    do { \
  |  |  470|      0|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  471|      0|                      igraph_errno, __VA_ARGS__) ; \
  |  |  472|      0|        return igraph_errno; \
  |  |  473|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (473:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  575|  2.19k|        }
  576|       |
  577|  2.19k|        igraph_i_attribute_record_set_type(attr, type, ptr);
  578|  2.19k|        IGRAPH_FINALLY_CLEAN(2);
  579|  2.19k|    }
  580|       |
  581|  2.92k|    return IGRAPH_SUCCESS;
  582|  2.92k|}
igraph_i_attribute_init:
  617|  2.22k|) {
  618|  2.22k|    graph->attr = NULL;
  619|  2.22k|    if (igraph_i_attribute_table) {
  ------------------
  |  Branch (619:9): [True: 2.22k, False: 0]
  ------------------
  620|  2.22k|        IGRAPH_CHECK(igraph_i_attribute_table->init(graph, attr));
  ------------------
  |  |  648|  2.22k|    do { \
  |  |  649|  2.22k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.22k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.22k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.22k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.22k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  621|  2.22k|        if (graph->attr == NULL) {
  ------------------
  |  Branch (621:13): [True: 0, False: 2.22k]
  ------------------
  622|      0|            IGRAPH_ERROR("Attribute handler did not initialize attr pointer", IGRAPH_FAILURE);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  623|      0|        }
  624|  2.22k|    }
  625|  2.22k|    return IGRAPH_SUCCESS;
  626|  2.22k|}
igraph_i_attribute_destroy:
  628|  3.68k|void igraph_i_attribute_destroy(igraph_t *graph) {
  629|  3.68k|    if (graph->attr && igraph_i_attribute_table) {
  ------------------
  |  Branch (629:9): [True: 3.68k, False: 0]
  |  Branch (629:24): [True: 3.68k, False: 0]
  ------------------
  630|  3.68k|        igraph_i_attribute_table->destroy(graph);
  631|  3.68k|    }
  632|  3.68k|    graph->attr = NULL;
  633|  3.68k|}
igraph_i_attribute_copy:
  636|  1.46k|                            igraph_bool_t va, igraph_bool_t ea) {
  637|  1.46k|    igraph_i_attribute_destroy(to);
  638|  1.46k|    if (from->attr && igraph_i_attribute_table) {
  ------------------
  |  Branch (638:9): [True: 1.46k, False: 0]
  |  Branch (638:23): [True: 1.46k, False: 0]
  ------------------
  639|  1.46k|        IGRAPH_CHECK(igraph_i_attribute_table->copy(to, from, ga, va, ea));
  ------------------
  |  |  648|  1.46k|    do { \
  |  |  649|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  640|  1.46k|        if (to->attr == NULL) {
  ------------------
  |  Branch (640:13): [True: 0, False: 1.46k]
  ------------------
  641|      0|            IGRAPH_ERROR("Attribute handler did not initialize attr pointer", IGRAPH_FAILURE);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  642|      0|        }
  643|  1.46k|    }
  644|  1.46k|    return IGRAPH_SUCCESS;
  645|  1.46k|}
igraph_i_attribute_add_vertices:
  649|  2.77k|) {
  650|  2.77k|    if (igraph_i_attribute_table) {
  ------------------
  |  Branch (650:9): [True: 2.77k, False: 0]
  ------------------
  651|  2.77k|        return igraph_i_attribute_table->add_vertices(graph, nv, attr);
  652|  2.77k|    } else {
  653|      0|        return IGRAPH_SUCCESS;
  654|      0|    }
  655|  2.77k|}
igraph_i_attribute_add_edges:
  690|  2.06k|) {
  691|  2.06k|    if (igraph_i_attribute_table) {
  ------------------
  |  Branch (691:9): [True: 2.06k, False: 0]
  ------------------
  692|  2.06k|        return igraph_i_attribute_table->add_edges(graph, edges, attr);
  693|  2.06k|    } else {
  694|      0|        return IGRAPH_SUCCESS;
  695|      0|    }
  696|  2.06k|}
igraph_i_attribute_combine_edges:
  714|  1.46k|                                     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.46k|    IGRAPH_ASSERT(graph != newgraph);
  ------------------
  |  |  916|  1.46k|    do { \
  |  |  917|  1.46k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  719|  1.46k|    if (igraph_i_attribute_table) {
  ------------------
  |  Branch (719:9): [True: 1.46k, False: 0]
  ------------------
  720|  1.46k|        return igraph_i_attribute_table->combine_edges(graph, newgraph,
  721|  1.46k|                merges,
  722|  1.46k|                comb);
  723|  1.46k|    } else {
  724|      0|        return IGRAPH_SUCCESS;
  725|      0|    }
  726|  1.46k|}
igraph_set_attribute_table:
  886|    756|igraph_set_attribute_table(const igraph_attribute_table_t * table) {
  887|    756|    igraph_attribute_table_t *old = igraph_i_attribute_table;
  888|    756|    igraph_i_attribute_table = (igraph_attribute_table_t*) table;
  889|    756|    return old;
  890|    756|}
igraph_has_attribute_table:
  892|  1.46k|igraph_bool_t igraph_has_attribute_table(void) {
  893|  1.46k|    return igraph_i_attribute_table != NULL;
  894|  1.46k|}
igraph_attribute_combination_init:
  906|    732|igraph_error_t igraph_attribute_combination_init(igraph_attribute_combination_t *comb) {
  907|    732|    IGRAPH_CHECK(igraph_vector_ptr_init(&comb->list, 0));
  ------------------
  |  |  648|    732|    do { \
  |  |  649|    732|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    732|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    732|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 732]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  908|    732|    return IGRAPH_SUCCESS;
  909|    732|}
igraph_attribute_combination_destroy:
  920|    732|void igraph_attribute_combination_destroy(igraph_attribute_combination_t *comb) {
  921|    732|    igraph_integer_t i, n = igraph_vector_ptr_size(&comb->list);
  922|  1.46k|    for (i = 0; i < n; i++) {
  ------------------
  |  Branch (922:17): [True: 732, False: 732]
  ------------------
  923|    732|        igraph_attribute_combination_record_t *rec = VECTOR(comb->list)[i];
  ------------------
  |  |   65|    732|#define VECTOR(v) ((v).stor_begin)
  ------------------
  924|    732|        if (rec->name) {
  ------------------
  |  Branch (924:13): [True: 732, False: 0]
  ------------------
  925|    732|            IGRAPH_FREE(rec->name);
  ------------------
  |  |   41|    732|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  926|    732|        }
  927|    732|        IGRAPH_FREE(rec);
  ------------------
  |  |   41|    732|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  928|    732|    }
  929|    732|    igraph_vector_ptr_destroy(&comb->list);
  930|    732|}
igraph_attribute_combination_add:
  959|    732|                                     igraph_function_pointer_t func) {
  960|    732|    igraph_integer_t i, n = igraph_vector_ptr_size(&comb->list);
  961|       |
  962|       |    /* Search, in case it is already there */
  963|    732|    for (i = 0; i < n; i++) {
  ------------------
  |  Branch (963:17): [True: 0, False: 732]
  ------------------
  964|      0|        igraph_attribute_combination_record_t *r = VECTOR(comb->list)[i];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  965|      0|        const char *n = r->name;
  966|      0|        if ( (!name && !n) ||
  ------------------
  |  Branch (966:15): [True: 0, False: 0]
  |  Branch (966:24): [True: 0, False: 0]
  ------------------
  967|      0|             (name && n && !strcmp(n, name)) ) {
  ------------------
  |  Branch (967:15): [True: 0, False: 0]
  |  Branch (967:23): [True: 0, False: 0]
  |  Branch (967:28): [True: 0, False: 0]
  ------------------
  968|      0|            r->type = type;
  969|      0|            r->func = func;
  970|      0|            break;
  971|      0|        }
  972|      0|    }
  973|       |
  974|    732|    if (i == n) {
  ------------------
  |  Branch (974:9): [True: 732, False: 0]
  ------------------
  975|       |        /* This is a new attribute name */
  976|    732|        igraph_attribute_combination_record_t *rec =
  977|    732|            IGRAPH_CALLOC(1, igraph_attribute_combination_record_t);
  ------------------
  |  |   38|    732|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  1.46k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [Folded - Ignored]
  |  |  |  |  |  Branch (36:24): [Folded - Ignored]
  |  |  |  |  |  Branch (36:66): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  978|    732|        if (! rec) {
  ------------------
  |  Branch (978:13): [True: 0, False: 732]
  ------------------
  979|      0|            IGRAPH_ERROR("Cannot create attribute combination data.",
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  980|      0|                         IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */
  981|      0|        }
  982|    732|        IGRAPH_FINALLY(igraph_free, rec);
  ------------------
  |  |  591|    732|    do { \
  |  |  592|    732|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|    732|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|    732|         * incorrect destructor function with the pointer */ \
  |  |  595|    732|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|    732|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  983|    732|        if (! name) {
  ------------------
  |  Branch (983:13): [True: 0, False: 732]
  ------------------
  984|      0|            rec->name = NULL;
  985|    732|        } else {
  986|    732|            rec->name = strdup(name);
  987|    732|            if (! rec->name) {
  ------------------
  |  Branch (987:17): [True: 0, False: 732]
  ------------------
  988|      0|                IGRAPH_ERROR("Cannot create attribute combination data.",
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  989|      0|                             IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */
  990|      0|            }
  991|    732|        }
  992|    732|        IGRAPH_FINALLY(igraph_free, (char *) rec->name); /* free() is safe on NULL */
  ------------------
  |  |  591|    732|    do { \
  |  |  592|    732|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|    732|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|    732|         * incorrect destructor function with the pointer */ \
  |  |  595|    732|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|    732|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  993|    732|        rec->type = type;
  994|    732|        rec->func = func;
  995|       |
  996|    732|        IGRAPH_CHECK(igraph_vector_ptr_push_back(&comb->list, rec));
  ------------------
  |  |  648|    732|    do { \
  |  |  649|    732|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    732|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    732|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 732]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  997|    732|        IGRAPH_FINALLY_CLEAN(2); /* ownership of 'rec' transferred to 'comb->list' */
  998|       |
  999|    732|    }
 1000|       |
 1001|    732|    return IGRAPH_SUCCESS;
 1002|    732|}
igraph_attribute_combination_query:
 1049|  1.46k|                                       igraph_function_pointer_t *func) {
 1050|  1.46k|    igraph_integer_t i, def = -1, len = igraph_vector_ptr_size(&comb->list);
 1051|       |
 1052|  1.46k|    for (i = 0; i < len; i++) {
  ------------------
  |  Branch (1052:17): [True: 1.46k, False: 0]
  ------------------
 1053|  1.46k|        igraph_attribute_combination_record_t *rec = VECTOR(comb->list)[i];
  ------------------
  |  |   65|  1.46k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1054|  1.46k|        const char *n = rec->name;
 1055|  1.46k|        if ( (!name && !n) ||
  ------------------
  |  Branch (1055:15): [True: 0, False: 1.46k]
  |  Branch (1055:24): [True: 0, False: 0]
  ------------------
 1056|  1.46k|             (name && n && !strcmp(n, name)) ) {
  ------------------
  |  Branch (1056:15): [True: 1.46k, False: 0]
  |  Branch (1056:23): [True: 1.46k, False: 0]
  |  Branch (1056:28): [True: 1.46k, False: 0]
  ------------------
 1057|  1.46k|            *type = rec->type;
 1058|  1.46k|            *func = rec->func;
 1059|  1.46k|            return IGRAPH_SUCCESS;
 1060|  1.46k|        }
 1061|      0|        if (!n) {
  ------------------
  |  Branch (1061:13): [True: 0, False: 0]
  ------------------
 1062|      0|            def = i;
 1063|      0|        }
 1064|      0|    }
 1065|       |
 1066|      0|    if (def == -1) {
  ------------------
  |  Branch (1066:9): [True: 0, False: 0]
  ------------------
 1067|       |        /* Did not find anything */
 1068|      0|        *type = IGRAPH_ATTRIBUTE_COMBINE_DEFAULT;
 1069|      0|        *func = 0;
 1070|      0|    } else {
 1071|      0|        igraph_attribute_combination_record_t *rec = VECTOR(comb->list)[def];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1072|      0|        *type = rec->type;
 1073|      0|        *func = rec->func;
 1074|      0|    }
 1075|       |
 1076|      0|    return IGRAPH_SUCCESS;
 1077|  1.46k|}
igraph_attribute_combination:
 1102|    732|        igraph_attribute_combination_t *comb, ...) {
 1103|       |
 1104|    732|    va_list ap;
 1105|       |
 1106|    732|    IGRAPH_CHECK(igraph_attribute_combination_init(comb));
  ------------------
  |  |  648|    732|    do { \
  |  |  649|    732|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    732|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    732|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 732]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1107|       |
 1108|    732|    va_start(ap, comb);
 1109|  1.46k|    while (true) {
 1110|  1.46k|        igraph_function_pointer_t func = NULL;
 1111|  1.46k|        igraph_attribute_combination_type_t type;
 1112|  1.46k|        const char *name;
 1113|       |
 1114|  1.46k|        name = va_arg(ap, const char *);
 1115|       |
 1116|  1.46k|        if (name == IGRAPH_NO_MORE_ATTRIBUTES) {
  ------------------
  |  |  219|  1.46k|#define IGRAPH_NO_MORE_ATTRIBUTES ((const char*)0)
  ------------------
  |  Branch (1116:13): [True: 732, False: 732]
  ------------------
 1117|    732|            break;
 1118|    732|        }
 1119|       |
 1120|    732|        type = (igraph_attribute_combination_type_t) va_arg(ap, int);
 1121|    732|        if (type == IGRAPH_ATTRIBUTE_COMBINE_FUNCTION) {
  ------------------
  |  Branch (1121:13): [True: 0, False: 732]
  ------------------
 1122|      0|            func = va_arg(ap, igraph_function_pointer_t);
 1123|      0|        }
 1124|       |
 1125|    732|        if (strlen(name) == 0) {
  ------------------
  |  Branch (1125:13): [True: 0, False: 732]
  ------------------
 1126|      0|            name = 0;
 1127|      0|        }
 1128|       |
 1129|    732|        igraph_error_t ret = igraph_attribute_combination_add(comb, name, type, func);
 1130|    732|        if (ret != IGRAPH_SUCCESS) {
  ------------------
  |  Branch (1130:13): [True: 0, False: 732]
  ------------------
 1131|      0|            va_end(ap);
 1132|      0|            return ret;
 1133|      0|        }
 1134|    732|    }
 1135|       |
 1136|    732|    va_end(ap);
 1137|       |
 1138|    732|    return IGRAPH_SUCCESS;
 1139|    732|}
attributes.c:igraph_i_attribute_record_destroy_values:
  184|  4.39k|static void igraph_i_attribute_record_destroy_values(igraph_attribute_record_t *attr) {
  185|  4.39k|    IGRAPH_ASSERT(attr != NULL);
  ------------------
  |  |  916|  4.39k|    do { \
  |  |  917|  4.39k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  4.39k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 4.39k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  4.39k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  186|       |
  187|  4.39k|    if (attr->value.as_raw) {
  ------------------
  |  Branch (187:9): [True: 2.19k, False: 2.19k]
  ------------------
  188|  2.19k|        switch (attr->type) {
  189|  2.19k|            case IGRAPH_ATTRIBUTE_NUMERIC:
  ------------------
  |  Branch (189:13): [True: 2.19k, False: 0]
  ------------------
  190|  2.19k|                igraph_vector_destroy(attr->value.as_vector);
  191|  2.19k|                break;
  192|       |
  193|      0|            case IGRAPH_ATTRIBUTE_STRING:
  ------------------
  |  Branch (193:13): [True: 0, False: 2.19k]
  ------------------
  194|      0|                igraph_strvector_destroy(attr->value.as_strvector);
  195|      0|                break;
  196|       |
  197|      0|            case IGRAPH_ATTRIBUTE_BOOLEAN:
  ------------------
  |  Branch (197:13): [True: 0, False: 2.19k]
  ------------------
  198|      0|                igraph_vector_bool_destroy(attr->value.as_vector_bool);
  199|      0|                break;
  200|       |
  201|      0|            default:
  ------------------
  |  Branch (201:13): [True: 0, False: 2.19k]
  ------------------
  202|      0|                break;
  203|  2.19k|        }
  204|       |
  205|  2.19k|        igraph_free(attr->value.as_raw);
  206|  2.19k|        attr->value.as_raw = NULL;
  207|  2.19k|    }
  208|       |
  209|  4.39k|    switch (attr->type) {
  210|  2.19k|        case IGRAPH_ATTRIBUTE_NUMERIC:
  ------------------
  |  Branch (210:9): [True: 2.19k, False: 2.19k]
  ------------------
  211|  2.19k|            attr->default_value.numeric = 0;
  212|  2.19k|            break;
  213|       |
  214|      0|        case IGRAPH_ATTRIBUTE_STRING:
  ------------------
  |  Branch (214:9): [True: 0, False: 4.39k]
  ------------------
  215|      0|            if (attr->default_value.string) {
  ------------------
  |  Branch (215:17): [True: 0, False: 0]
  ------------------
  216|      0|                igraph_free(attr->default_value.string);
  217|      0|                attr->default_value.string = NULL;
  218|      0|            }
  219|      0|            break;
  220|       |
  221|      0|        case IGRAPH_ATTRIBUTE_BOOLEAN:
  ------------------
  |  Branch (221:9): [True: 0, False: 4.39k]
  ------------------
  222|      0|            attr->default_value.boolean = 0;
  223|      0|            break;
  224|       |
  225|  2.19k|        default:
  ------------------
  |  Branch (225:9): [True: 2.19k, False: 2.19k]
  ------------------
  226|  2.19k|            break;
  227|  4.39k|    }
  228|       |
  229|  4.39k|    attr->type = IGRAPH_ATTRIBUTE_UNSPECIFIED;
  230|  4.39k|}
attributes.c:igraph_i_attribute_record_set_type:
  505|  2.19k|) {
  506|  2.19k|    bool type_changed = attr->type != type;
  507|       |
  508|  2.19k|    if (type_changed || attr->value.as_raw != ptr) {
  ------------------
  |  Branch (508:9): [True: 2.19k, False: 0]
  |  Branch (508:25): [True: 0, False: 0]
  ------------------
  509|  2.19k|        igraph_i_attribute_record_destroy_values(attr);
  510|  2.19k|        attr->type = type;
  511|  2.19k|        attr->value.as_raw = ptr;
  512|  2.19k|    }
  513|       |
  514|  2.19k|    if (type_changed && type == IGRAPH_ATTRIBUTE_NUMERIC) {
  ------------------
  |  Branch (514:9): [True: 2.19k, False: 0]
  |  Branch (514:25): [True: 2.19k, False: 0]
  ------------------
  515|  2.19k|        IGRAPH_ASSERT(
  ------------------
  |  |  916|  2.19k|    do { \
  |  |  917|  2.19k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  2.19k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.19k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  2.19k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  516|  2.19k|            igraph_attribute_record_set_default_numeric(attr, IGRAPH_NAN) == IGRAPH_SUCCESS
  517|  2.19k|        );
  518|  2.19k|    }
  519|  2.19k|}
attributes.c:igraph_i_attribute_record_list_init_item:
  596|    732|) {
  597|    732|    IGRAPH_UNUSED(list);
  ------------------
  |  |   32|    732|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
  598|    732|    return igraph_attribute_record_init(item, NULL, IGRAPH_ATTRIBUTE_UNSPECIFIED);
  599|    732|}
attributes.c:igraph_i_attribute_record_list_destroy_item:
  607|  2.19k|static void igraph_i_attribute_record_list_destroy_item(igraph_attribute_record_t* item) {
  608|  2.19k|    igraph_attribute_record_destroy(item);
  609|  2.19k|}

igraph_i_property_cache_init:
   30|  2.22k|igraph_error_t igraph_i_property_cache_init(igraph_i_property_cache_t *cache) {
   31|  2.22k|    IGRAPH_STATIC_ASSERT(IGRAPH_PROP_I_SIZE <= 32);
  ------------------
  |  |   69|  2.22k|#define IGRAPH_STATIC_ASSERT(condition) ((void)sizeof(char[1 - 2*!(condition)]))
  ------------------
   32|       |
   33|  2.22k|    memset(cache->value, 0, sizeof(cache->value));
   34|  2.22k|    cache->known = 0;
   35|  2.22k|    return IGRAPH_SUCCESS;
   36|  2.22k|}
igraph_i_property_cache_destroy:
   51|  2.22k|void igraph_i_property_cache_destroy(igraph_i_property_cache_t *cache) {
   52|  2.22k|    IGRAPH_UNUSED(cache);
  ------------------
  |  |   32|  2.22k|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
   53|       |    /* Nothing to do */
   54|  2.22k|}
igraph_i_property_cache_get_bool:
   70|  1.46k|igraph_bool_t igraph_i_property_cache_get_bool(const igraph_t *graph, igraph_cached_property_t prop) {
   71|  1.46k|    IGRAPH_ASSERT(prop >= 0 && prop < IGRAPH_PROP_I_SIZE);
  ------------------
  |  |  916|  1.46k|    do { \
  |  |  917|  1.46k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  2.92k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.46k]
  |  |  |  |  |  Branch (604:50): [True: 1.46k, False: 0]
  |  |  |  |  |  Branch (604:50): [True: 1.46k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   72|  1.46k|    assert(graph->cache != NULL);
   73|  1.46k|    return graph->cache->value[prop];
   74|  1.46k|}
igraph_i_property_cache_has:
   82|  2.92k|igraph_bool_t igraph_i_property_cache_has(const igraph_t *graph, igraph_cached_property_t prop) {
   83|  2.92k|    IGRAPH_ASSERT(prop >= 0 && prop < IGRAPH_PROP_I_SIZE);
  ------------------
  |  |  916|  2.92k|    do { \
  |  |  917|  2.92k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  5.85k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.92k]
  |  |  |  |  |  Branch (604:50): [True: 2.92k, False: 0]
  |  |  |  |  |  Branch (604:50): [True: 2.92k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  2.92k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   84|  2.92k|    assert(graph->cache != NULL);
   85|  2.92k|    return graph->cache->known & (1 << prop);
   86|  2.92k|}
igraph_i_property_cache_set_bool:
   95|  1.46k|void igraph_i_property_cache_set_bool(const igraph_t *graph, igraph_cached_property_t prop, igraph_bool_t value) {
   96|  1.46k|    IGRAPH_ASSERT(prop >= 0 && prop < IGRAPH_PROP_I_SIZE);
  ------------------
  |  |  916|  1.46k|    do { \
  |  |  917|  1.46k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  2.92k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.46k]
  |  |  |  |  |  Branch (604:50): [True: 1.46k, False: 0]
  |  |  |  |  |  Branch (604:50): [True: 1.46k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   97|  1.46k|    assert(graph->cache != NULL);
   98|       |    /* Even though graph is const, updating the cache is not considered modification.
   99|       |     * Functions that merely compute graph properties, and thus leave the graph structure
  100|       |     * intact, will often update the cache. */
  101|  1.46k|    graph->cache->value[prop] = value;
  102|  1.46k|    graph->cache->known |= (1 << prop);
  103|  1.46k|}
igraph_i_property_cache_set_bool_checked:
  121|  1.46k|void igraph_i_property_cache_set_bool_checked(const igraph_t *graph, igraph_cached_property_t prop, igraph_bool_t value) {
  122|  1.46k|    IGRAPH_ASSERT(prop >= 0 && prop < IGRAPH_PROP_I_SIZE);
  ------------------
  |  |  916|  1.46k|    do { \
  |  |  917|  1.46k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  2.92k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.46k]
  |  |  |  |  |  Branch (604:50): [True: 1.46k, False: 0]
  |  |  |  |  |  Branch (604:50): [True: 1.46k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  123|  1.46k|    assert(graph->cache != NULL);
  124|       |    /* Even though graph is const, updating the cache is not considered modification.
  125|       |     * Functions that merely compute graph properties, and thus leave the graph structure
  126|       |     * intact, will often update the cache. */
  127|  1.46k|    if (graph->cache->known & (1 << prop)) {
  ------------------
  |  Branch (127:9): [True: 0, False: 1.46k]
  ------------------
  128|      0|        IGRAPH_ASSERT(graph->cache->value[prop] == value);
  ------------------
  |  |  916|      0|    do { \
  |  |  917|      0|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  129|  1.46k|    } else {
  130|  1.46k|        igraph_i_property_cache_set_bool(graph, prop, value);
  131|  1.46k|    }
  132|  1.46k|}
igraph_i_property_cache_invalidate_conditionally:
  180|  4.84k|) {
  181|  4.84k|    uint32_t invalidate = ~keep_always;
  182|  4.84k|    uint32_t mask;
  183|  4.84k|    uint32_t maybe_keep;
  184|  4.84k|    igraph_bool_t cached_value;
  185|       |
  186|  4.84k|    assert(graph->cache != NULL);
  187|       |
  188|       |    /* The bits of maybe_keep are set to 1 for those properties that are:
  189|       |     *
  190|       |     * - currently cached
  191|       |     * - should _probably_ be invalidated
  192|       |     * - _but_ the current cached value of the property may change the decision
  193|       |     */
  194|  4.84k|    maybe_keep = graph->cache->known & invalidate & (keep_when_false | keep_when_true);
  195|       |
  196|  4.84k|    if (maybe_keep) {
  ------------------
  |  Branch (196:9): [True: 0, False: 4.84k]
  ------------------
  197|      0|        for (igraph_cached_property_t prop = (igraph_cached_property_t ) 0; prop < IGRAPH_PROP_I_SIZE; ++prop) {
  ------------------
  |  Branch (197:77): [True: 0, False: 0]
  ------------------
  198|      0|            mask = 1 << prop;
  199|      0|            if (maybe_keep & mask) {
  ------------------
  |  Branch (199:17): [True: 0, False: 0]
  ------------------
  200|       |                /* if we get here, we know that the property is cached; we have
  201|       |                 * masked maybe_keep with graph->cache->known */
  202|      0|                cached_value = igraph_i_property_cache_get_bool(graph, prop);
  203|      0|                if (
  204|      0|                    ((keep_when_false & mask) && !cached_value) ||
  ------------------
  |  Branch (204:22): [True: 0, False: 0]
  |  Branch (204:50): [True: 0, False: 0]
  ------------------
  205|      0|                    ((keep_when_true & mask) && cached_value)
  ------------------
  |  Branch (205:22): [True: 0, False: 0]
  |  Branch (205:49): [True: 0, False: 0]
  ------------------
  206|      0|                ) {
  207|      0|                    invalidate &= ~mask;
  208|      0|                }
  209|      0|            }
  210|      0|        }
  211|      0|    }
  212|       |
  213|  4.84k|    graph->cache->known &= ~invalidate;
  214|  4.84k|}

igraph_cattribute_EANV:
 2254|    732|                           igraph_es_t eids, igraph_vector_t *result) {
 2255|    732|    return igraph_i_cattribute_get_numeric_edge_attr(graph, name, eids, result);
 2256|    732|}
igraph_cattribute_EAN_setv:
 2758|    732|                               const igraph_vector_t *v) {
 2759|    732|    igraph_i_cattributes_t *attr = graph->attr;
 2760|    732|    igraph_attribute_record_t *rec;
 2761|    732|    igraph_integer_t ne = igraph_ecount(graph);
 2762|       |
 2763|       |    /* Check length first */
 2764|    732|    if (igraph_vector_size(v) != ne) {
  ------------------
  |  Branch (2764:9): [True: 0, False: 732]
  ------------------
 2765|      0|        IGRAPH_ERROR("Invalid edge attribute vector length.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2766|      0|    }
 2767|       |
 2768|    732|    IGRAPH_CHECK(igraph_i_cattribute_find_or_create(&attr->eal, name, IGRAPH_ATTRIBUTE_NUMERIC, ne, &rec));
  ------------------
  |  |  648|    732|    do { \
  |  |  649|    732|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    732|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    732|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 732]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2769|    732|    IGRAPH_CHECK(igraph_vector_update(rec->value.as_vector, v));
  ------------------
  |  |  648|    732|    do { \
  |  |  649|    732|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    732|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    732|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 732]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2770|       |
 2771|    732|    return IGRAPH_SUCCESS;
 2772|    732|}
igraph_cattribute_remove_e:
 2894|    732|void igraph_cattribute_remove_e(igraph_t *graph, const char *name) {
 2895|       |
 2896|    732|    igraph_i_cattributes_t *attr = graph->attr;
 2897|    732|    igraph_attribute_record_list_t *eal = &attr->eal;
 2898|    732|    igraph_integer_t j = igraph_i_cattribute_find_index(eal, name);
 2899|       |
 2900|    732|    if (j >= 0) {
  ------------------
  |  Branch (2900:9): [True: 732, False: 0]
  ------------------
 2901|    732|        igraph_attribute_record_list_discard(eal, j);
 2902|    732|    } else {
 2903|      0|        IGRAPH_WARNING("Cannot remove non-existent graph attribute");
  ------------------
  |  |  789|      0|    do { \
  |  |  790|      0|        igraph_warning(reason, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  791|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (791:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2904|      0|    }
 2905|    732|}
cattributes.c:igraph_i_cattribute_init:
  196|  2.22k|) {
  197|  2.22k|    igraph_i_cattributes_t *nattr;
  198|       |
  199|  2.22k|    nattr = IGRAPH_CALLOC(1, igraph_i_cattributes_t);
  ------------------
  |  |   38|  2.22k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  4.44k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [Folded - Ignored]
  |  |  |  |  |  Branch (36:24): [Folded - Ignored]
  |  |  |  |  |  Branch (36:66): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  200|  2.22k|    IGRAPH_CHECK_OOM(nattr, "Insufficient memory to allocate attribute storage.");
  ------------------
  |  |  701|  2.22k|    do { \
  |  |  702|  2.22k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|  2.22k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.22k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|  2.22k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  201|  2.22k|    IGRAPH_FINALLY(igraph_free, nattr);
  ------------------
  |  |  591|  2.22k|    do { \
  |  |  592|  2.22k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  2.22k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  2.22k|         * incorrect destructor function with the pointer */ \
  |  |  595|  2.22k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  2.22k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  2.22k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  202|       |
  203|  2.22k|    if (attr) {
  ------------------
  |  Branch (203:9): [True: 0, False: 2.22k]
  ------------------
  204|      0|        IGRAPH_CHECK(igraph_attribute_record_list_init_copy(&nattr->gal, attr));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  205|  2.22k|    } else {
  206|  2.22k|        IGRAPH_CHECK(igraph_attribute_record_list_init(&nattr->gal, 0));
  ------------------
  |  |  648|  2.22k|    do { \
  |  |  649|  2.22k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.22k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.22k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.22k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.22k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  207|  2.22k|    }
  208|  2.22k|    IGRAPH_FINALLY(igraph_attribute_record_list_destroy, &nattr->gal);
  ------------------
  |  |  591|  2.22k|    do { \
  |  |  592|  2.22k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  2.22k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  2.22k|         * incorrect destructor function with the pointer */ \
  |  |  595|  2.22k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  2.22k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  2.22k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  209|       |
  210|  2.22k|    IGRAPH_CHECK(igraph_attribute_record_list_init(&nattr->val, 0));
  ------------------
  |  |  648|  2.22k|    do { \
  |  |  649|  2.22k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.22k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.22k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.22k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.22k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  211|  2.22k|    IGRAPH_FINALLY(igraph_attribute_record_list_destroy, &nattr->val);
  ------------------
  |  |  591|  2.22k|    do { \
  |  |  592|  2.22k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  2.22k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  2.22k|         * incorrect destructor function with the pointer */ \
  |  |  595|  2.22k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  2.22k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  2.22k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  212|       |
  213|  2.22k|    IGRAPH_CHECK(igraph_attribute_record_list_init(&nattr->eal, 0));
  ------------------
  |  |  648|  2.22k|    do { \
  |  |  649|  2.22k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.22k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.22k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.22k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.22k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  214|  2.22k|    IGRAPH_FINALLY(igraph_attribute_record_list_destroy, &nattr->eal);
  ------------------
  |  |  591|  2.22k|    do { \
  |  |  592|  2.22k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  2.22k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  2.22k|         * incorrect destructor function with the pointer */ \
  |  |  595|  2.22k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  2.22k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  2.22k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  215|       |
  216|  2.22k|    graph->attr = nattr;
  217|  2.22k|    IGRAPH_FINALLY_CLEAN(4);
  218|       |
  219|  2.22k|    return IGRAPH_SUCCESS;
  220|  2.22k|}
cattributes.c:igraph_i_cattribute_destroy:
  222|  3.68k|static void igraph_i_cattribute_destroy(igraph_t *graph) {
  223|  3.68k|    igraph_i_cattributes_t *attr = graph->attr;
  224|  3.68k|    igraph_attribute_record_list_destroy(&attr->eal);
  225|  3.68k|    igraph_attribute_record_list_destroy(&attr->val);
  226|  3.68k|    igraph_attribute_record_list_destroy(&attr->gal);
  227|  3.68k|    IGRAPH_FREE(graph->attr); /* sets to NULL */
  ------------------
  |  |   41|  3.68k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  228|  3.68k|}
cattributes.c:igraph_i_cattribute_copy:
  236|  1.46k|) {
  237|  1.46k|    igraph_i_cattributes_t *attrto, *attrfrom = from->attr;
  238|  1.46k|    igraph_attribute_record_list_t *alto[3], *alfrom[3] = {
  239|  1.46k|        &attrfrom->gal, &attrfrom->val, &attrfrom->eal
  240|  1.46k|    };
  241|  1.46k|    igraph_bool_t copy[3] = { ga, va, ea };
  242|       |
  243|  1.46k|    attrto = IGRAPH_CALLOC(1, igraph_i_cattributes_t);
  ------------------
  |  |   38|  1.46k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  2.92k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [Folded - Ignored]
  |  |  |  |  |  Branch (36:24): [Folded - Ignored]
  |  |  |  |  |  Branch (36:66): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  244|  1.46k|    IGRAPH_CHECK_OOM(attrto, "Insufficient memory to copy attributes.");
  ------------------
  |  |  701|  1.46k|    do { \
  |  |  702|  1.46k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  245|  1.46k|    IGRAPH_FINALLY(igraph_free, attrto);
  ------------------
  |  |  591|  1.46k|    do { \
  |  |  592|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  595|  1.46k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  246|       |
  247|  1.46k|    alto[0] = &attrto->gal;
  248|  1.46k|    alto[1] = &attrto->val;
  249|  1.46k|    alto[2] = &attrto->eal;
  250|       |
  251|  5.85k|    for (igraph_integer_t i = 0; i < 3; i++) {
  ------------------
  |  Branch (251:34): [True: 4.39k, False: 1.46k]
  ------------------
  252|  4.39k|        if (copy[i]) {
  ------------------
  |  Branch (252:13): [True: 2.92k, False: 1.46k]
  ------------------
  253|  2.92k|            IGRAPH_CHECK(igraph_attribute_record_list_init_copy(alto[i], alfrom[i]));
  ------------------
  |  |  648|  2.92k|    do { \
  |  |  649|  2.92k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.92k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.92k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.92k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  254|  2.92k|        } else {
  255|  1.46k|            IGRAPH_CHECK(igraph_attribute_record_list_init(alto[i], 0));
  ------------------
  |  |  648|  1.46k|    do { \
  |  |  649|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  256|  1.46k|        }
  257|  4.39k|        IGRAPH_FINALLY(igraph_attribute_record_list_destroy, alto[i]);
  ------------------
  |  |  591|  4.39k|    do { \
  |  |  592|  4.39k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  4.39k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  4.39k|         * incorrect destructor function with the pointer */ \
  |  |  595|  4.39k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  4.39k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  4.39k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  258|  4.39k|    }
  259|       |
  260|  1.46k|    to->attr = attrto;
  261|  1.46k|    IGRAPH_FINALLY_CLEAN(4);
  262|       |
  263|  1.46k|    return IGRAPH_SUCCESS;
  264|  1.46k|}
cattributes.c:igraph_i_cattribute_add_vertices:
  374|  2.77k|) {
  375|  2.77k|    igraph_i_cattributes_t *attr = graph->attr;
  376|  2.77k|    return igraph_i_cattribute_add_vertices_or_edges(&attr->val, igraph_vcount(graph), nv, nattr);
  377|  2.77k|}
cattributes.c:igraph_i_cattribute_add_vertices_or_edges:
  345|  4.84k|) {
  346|  4.84k|    igraph_integer_t origlen = newlen - nv;
  347|  4.84k|    igraph_error_t err = igraph_i_cattribute_add_vertices_or_edges_inner(
  348|  4.84k|        val, newlen, nv, nattr
  349|  4.84k|    );
  350|       |
  351|  4.84k|    if (err != IGRAPH_SUCCESS) {
  ------------------
  |  Branch (351:9): [True: 0, False: 4.84k]
  ------------------
  352|       |        /* If unsuccessful, revert attribute vector sizes.
  353|       |         * The following function assumes that all attributes vectors that
  354|       |         * are present have a length at least as great as origlen.
  355|       |         * This is true at the moment because any new attributes that are
  356|       |         * added to the graph are created directly at 'origlen' instead of
  357|       |         * being created at smaller sizes and resized later.
  358|       |         *
  359|       |         * NOTE: While this ensures that all attribute vector lengths are
  360|       |         * correct, it does not ensure that no extra attributes have
  361|       |         * been added to the graph. However, the presence of extra
  362|       |         * attributes does not make the attribute table inconsistent
  363|       |         * like the incorrect attribute vector lengths would.
  364|       |         */
  365|      0|        igraph_i_cattribute_revert_attribute_vector_sizes(val, origlen);
  366|      0|    }
  367|       |
  368|  4.84k|    return err;
  369|  4.84k|}
cattributes.c:igraph_i_cattribute_add_vertices_or_edges_inner:
  270|  4.84k|) {
  271|  4.84k|    igraph_integer_t length;
  272|  4.84k|    igraph_integer_t nattrno = nattr == NULL ? 0 : igraph_attribute_record_list_size(nattr);
  ------------------
  |  Branch (272:32): [True: 4.84k, False: 0]
  ------------------
  273|  4.84k|    igraph_integer_t origlen = newlen - nv;
  274|       |
  275|  4.84k|    IGRAPH_ASSERT(origlen >= 0);
  ------------------
  |  |  916|  4.84k|    do { \
  |  |  917|  4.84k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  4.84k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 4.84k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  4.84k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  276|       |
  277|       |    /* Find all the attributes that are newly added, and create new value vectors
  278|       |     * for them in the original graph */
  279|  4.84k|    for (igraph_integer_t i = 0; i < nattrno; i++) {
  ------------------
  |  Branch (279:34): [True: 0, False: 4.84k]
  ------------------
  280|      0|        const igraph_attribute_record_t *nattr_entry = igraph_attribute_record_list_get_ptr(nattr, i);
  281|      0|        const char *nname = nattr_entry->name;
  282|      0|        IGRAPH_CHECK(igraph_i_cattribute_find_or_create(val, nname, nattr_entry->type, origlen, NULL));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  283|      0|    }
  284|       |
  285|       |    /* Now append the new values */
  286|  4.84k|    length = igraph_attribute_record_list_size(val);
  287|  4.84k|    for (igraph_integer_t i = 0; i < length; i++) {
  ------------------
  |  Branch (287:34): [True: 0, False: 4.84k]
  ------------------
  288|      0|        igraph_attribute_record_t *oldrec = igraph_attribute_record_list_get_ptr(val, i);
  289|      0|        const igraph_attribute_record_t *newrec = nattr
  ------------------
  |  Branch (289:51): [True: 0, False: 0]
  ------------------
  290|      0|            ? igraph_i_cattribute_find_const(nattr, oldrec->name, oldrec->type)
  291|      0|            : NULL;
  292|       |
  293|      0|        IGRAPH_ASSERT(igraph_attribute_record_size(oldrec) == origlen);
  ------------------
  |  |  916|      0|    do { \
  |  |  917|      0|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  294|       |
  295|      0|        if (newrec) {
  ------------------
  |  Branch (295:13): [True: 0, False: 0]
  ------------------
  296|       |            /* This attribute is present in nattr */
  297|      0|            switch (oldrec->type) {
  298|      0|            case IGRAPH_ATTRIBUTE_NUMERIC:
  ------------------
  |  Branch (298:13): [True: 0, False: 0]
  ------------------
  299|      0|                if (nv != igraph_vector_size(newrec->value.as_vector)) {
  ------------------
  |  Branch (299:21): [True: 0, False: 0]
  ------------------
  300|      0|                    IGRAPH_ERROR("Invalid numeric attribute length.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  301|      0|                }
  302|      0|                IGRAPH_CHECK(igraph_vector_append(
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  303|      0|                    oldrec->value.as_vector, newrec->value.as_vector
  304|      0|                ));
  305|      0|                break;
  306|      0|            case IGRAPH_ATTRIBUTE_STRING:
  ------------------
  |  Branch (306:13): [True: 0, False: 0]
  ------------------
  307|      0|                if (nv != igraph_strvector_size(newrec->value.as_strvector)) {
  ------------------
  |  Branch (307:21): [True: 0, False: 0]
  ------------------
  308|      0|                    IGRAPH_ERROR("Invalid string attribute length.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  309|      0|                }
  310|      0|                IGRAPH_CHECK(igraph_strvector_append(
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  311|      0|                    oldrec->value.as_strvector, newrec->value.as_strvector
  312|      0|                ));
  313|      0|                break;
  314|      0|            case IGRAPH_ATTRIBUTE_BOOLEAN:
  ------------------
  |  Branch (314:13): [True: 0, False: 0]
  ------------------
  315|      0|                if (nv != igraph_vector_bool_size(newrec->value.as_vector_bool)) {
  ------------------
  |  Branch (315:21): [True: 0, False: 0]
  ------------------
  316|      0|                    IGRAPH_ERROR("Invalid boolean attribute length.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  317|      0|                }
  318|      0|                IGRAPH_CHECK(igraph_vector_bool_append(
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  319|      0|                    oldrec->value.as_vector_bool, newrec->value.as_vector_bool
  320|      0|                ));
  321|      0|                break;
  322|      0|            default:
  ------------------
  |  Branch (322:13): [True: 0, False: 0]
  ------------------
  323|      0|                IGRAPH_WARNINGF(
  ------------------
  |  |  769|      0|    do { \
  |  |  770|      0|        igraph_warningf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  771|      0|                        __VA_ARGS__); \
  |  |  772|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (772:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  324|      0|                    "Attribute '%s' with unknown type %d ignored",
  325|      0|                    oldrec->name, (int) oldrec->type
  326|      0|                );
  327|      0|                break;
  328|      0|            }
  329|      0|        } else {
  330|       |            /* No such attribute among the new ones so just extend the length
  331|       |             * of the current record */
  332|      0|            IGRAPH_CHECK(igraph_attribute_record_resize(oldrec, newlen));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  333|      0|        }
  334|       |
  335|      0|        IGRAPH_ASSERT(igraph_attribute_record_size(oldrec) == newlen);
  ------------------
  |  |  916|      0|    do { \
  |  |  917|      0|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  336|      0|    }
  337|       |
  338|  4.84k|    return IGRAPH_SUCCESS;
  339|  4.84k|}
cattributes.c:igraph_i_cattribute_combine_attribute_record_lists:
 1287|  1.46k|) {
 1288|  1.46k|    igraph_integer_t no_attrs = igraph_attribute_record_list_size(attrs);
 1289|  1.46k|    igraph_attribute_combination_todo_item_t *todo_items;
 1290|       |
 1291|  1.46k|    IGRAPH_ASSERT(attrs != new_attrs);
  ------------------
  |  |  916|  1.46k|    do { \
  |  |  917|  1.46k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1292|  1.46k|    IGRAPH_ASSERT(igraph_attribute_record_list_empty(new_attrs));
  ------------------
  |  |  916|  1.46k|    do { \
  |  |  917|  1.46k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1293|       |
 1294|  1.46k|    todo_items = IGRAPH_CALLOC(no_attrs, igraph_attribute_combination_todo_item_t);
  ------------------
  |  |   38|  1.46k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  2.92k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 1.46k, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 1.46k, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 1.46k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1295|  1.46k|    IGRAPH_CHECK_OOM(todo_items, "Cannot combine attributes.");
  ------------------
  |  |  701|  1.46k|    do { \
  |  |  702|  1.46k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1296|  1.46k|    IGRAPH_FINALLY(igraph_free, todo_items);
  ------------------
  |  |  591|  1.46k|    do { \
  |  |  592|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  595|  1.46k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1297|       |
 1298|  2.92k|    for (igraph_integer_t i = 0; i < no_attrs; i++) {
  ------------------
  |  Branch (1298:34): [True: 1.46k, False: 1.46k]
  ------------------
 1299|  1.46k|        const igraph_attribute_record_t *oldrec = igraph_attribute_record_list_get_ptr(attrs, i);
 1300|  1.46k|        const char *name = oldrec->name;
 1301|  1.46k|        igraph_attribute_combination_type_t type;
 1302|  1.46k|        igraph_function_pointer_t voidfunc;
 1303|  1.46k|        IGRAPH_CHECK(igraph_attribute_combination_query(comb, name, &type, &voidfunc));
  ------------------
  |  |  648|  1.46k|    do { \
  |  |  649|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1304|  1.46k|        todo_items[i].type = type;
 1305|  1.46k|        todo_items[i].func.as_void = voidfunc;
 1306|  1.46k|    }
 1307|       |
 1308|  1.46k|    IGRAPH_FINALLY(igraph_attribute_record_list_clear, new_attrs);
  ------------------
  |  |  591|  1.46k|    do { \
  |  |  592|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  595|  1.46k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1309|       |
 1310|  2.92k|    for (igraph_integer_t i = 0; i < no_attrs; i++) {
  ------------------
  |  Branch (1310:34): [True: 1.46k, False: 1.46k]
  ------------------
 1311|  1.46k|        const igraph_attribute_record_t *oldrec = igraph_attribute_record_list_get_ptr(attrs, i);
 1312|  1.46k|        igraph_attribute_record_t newrec;
 1313|  1.46k|        const char *name = oldrec->name;
 1314|  1.46k|        igraph_attribute_combination_todo_item_t todo_item = todo_items[i];
 1315|  1.46k|        igraph_attribute_type_t attr_type = oldrec->type;
 1316|       |
 1317|  1.46k|        if (todo_item.type == IGRAPH_ATTRIBUTE_COMBINE_DEFAULT ||
  ------------------
  |  Branch (1317:13): [True: 0, False: 1.46k]
  ------------------
 1318|  1.46k|            todo_item.type == IGRAPH_ATTRIBUTE_COMBINE_IGNORE) {
  ------------------
  |  Branch (1318:13): [True: 0, False: 1.46k]
  ------------------
 1319|      0|            continue;
 1320|      0|        }
 1321|       |
 1322|  1.46k|        IGRAPH_CHECK(igraph_attribute_record_init(&newrec, name, attr_type));
  ------------------
  |  |  648|  1.46k|    do { \
  |  |  649|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1323|  1.46k|        IGRAPH_FINALLY(igraph_attribute_record_destroy, &newrec);
  ------------------
  |  |  591|  1.46k|    do { \
  |  |  592|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  595|  1.46k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1324|       |
 1325|  1.46k|        IGRAPH_CHECK(igraph_attribute_record_resize(&newrec, igraph_vector_int_list_size(merges)));
  ------------------
  |  |  648|  1.46k|    do { \
  |  |  649|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1326|       |
 1327|  1.46k|        if (attr_type == IGRAPH_ATTRIBUTE_NUMERIC) {
  ------------------
  |  Branch (1327:13): [True: 1.46k, False: 0]
  ------------------
 1328|  1.46k|            switch (todo_item.type) {
 1329|      0|            case IGRAPH_ATTRIBUTE_COMBINE_FUNCTION:
  ------------------
  |  Branch (1329:13): [True: 0, False: 1.46k]
  ------------------
 1330|      0|                IGRAPH_CHECK(igraph_i_cattributes_cn_func(oldrec, &newrec, merges,
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1331|      0|                             todo_item.func.as_num));
 1332|      0|                break;
 1333|  1.46k|            case IGRAPH_ATTRIBUTE_COMBINE_SUM:
  ------------------
  |  Branch (1333:13): [True: 1.46k, False: 0]
  ------------------
 1334|  1.46k|                IGRAPH_CHECK(igraph_i_cattributes_cn_sum(oldrec, &newrec, merges));
  ------------------
  |  |  648|  1.46k|    do { \
  |  |  649|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1335|  1.46k|                break;
 1336|  1.46k|            case IGRAPH_ATTRIBUTE_COMBINE_PROD:
  ------------------
  |  Branch (1336:13): [True: 0, False: 1.46k]
  ------------------
 1337|      0|                IGRAPH_CHECK(igraph_i_cattributes_cn_prod(oldrec, &newrec, merges));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1338|      0|                break;
 1339|      0|            case IGRAPH_ATTRIBUTE_COMBINE_MIN:
  ------------------
  |  Branch (1339:13): [True: 0, False: 1.46k]
  ------------------
 1340|      0|                IGRAPH_CHECK(igraph_i_cattributes_cn_min(oldrec, &newrec, merges));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1341|      0|                break;
 1342|      0|            case IGRAPH_ATTRIBUTE_COMBINE_MAX:
  ------------------
  |  Branch (1342:13): [True: 0, False: 1.46k]
  ------------------
 1343|      0|                IGRAPH_CHECK(igraph_i_cattributes_cn_max(oldrec, &newrec, merges));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1344|      0|                break;
 1345|      0|            case IGRAPH_ATTRIBUTE_COMBINE_RANDOM:
  ------------------
  |  Branch (1345:13): [True: 0, False: 1.46k]
  ------------------
 1346|      0|                IGRAPH_CHECK(igraph_i_cattributes_cn_random(oldrec, &newrec, merges));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1347|      0|                break;
 1348|      0|            case IGRAPH_ATTRIBUTE_COMBINE_FIRST:
  ------------------
  |  Branch (1348:13): [True: 0, False: 1.46k]
  ------------------
 1349|      0|                IGRAPH_CHECK(igraph_i_cattributes_cn_first(oldrec, &newrec, merges));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1350|      0|                break;
 1351|      0|            case IGRAPH_ATTRIBUTE_COMBINE_LAST:
  ------------------
  |  Branch (1351:13): [True: 0, False: 1.46k]
  ------------------
 1352|      0|                IGRAPH_CHECK(igraph_i_cattributes_cn_last(oldrec, &newrec, merges));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1353|      0|                break;
 1354|      0|            case IGRAPH_ATTRIBUTE_COMBINE_MEAN:
  ------------------
  |  Branch (1354:13): [True: 0, False: 1.46k]
  ------------------
 1355|      0|                IGRAPH_CHECK(igraph_i_cattributes_cn_mean(oldrec, &newrec, merges));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1356|      0|                break;
 1357|      0|            case IGRAPH_ATTRIBUTE_COMBINE_MEDIAN:
  ------------------
  |  Branch (1357:13): [True: 0, False: 1.46k]
  ------------------
 1358|      0|                IGRAPH_ERROR("Median calculation not implemented.",
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1359|      0|                             IGRAPH_UNIMPLEMENTED);
 1360|      0|                break;
 1361|      0|            case IGRAPH_ATTRIBUTE_COMBINE_CONCAT:
  ------------------
  |  Branch (1361:13): [True: 0, False: 1.46k]
  ------------------
 1362|      0|                IGRAPH_ERROR("Cannot concatenate numeric attributes.",
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1363|      0|                             IGRAPH_EATTRCOMBINE);
 1364|      0|                break;
 1365|      0|            default:
  ------------------
  |  Branch (1365:13): [True: 0, False: 1.46k]
  ------------------
 1366|      0|                IGRAPH_ERROR("Unknown attribute combination.",
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1367|      0|                             IGRAPH_UNIMPLEMENTED);
 1368|      0|                break;
 1369|  1.46k|            }
 1370|  1.46k|        } else if (attr_type == IGRAPH_ATTRIBUTE_BOOLEAN) {
  ------------------
  |  Branch (1370:20): [True: 0, False: 0]
  ------------------
 1371|      0|            switch (todo_item.type) {
 1372|      0|            case IGRAPH_ATTRIBUTE_COMBINE_FUNCTION:
  ------------------
  |  Branch (1372:13): [True: 0, False: 0]
  ------------------
 1373|      0|                IGRAPH_CHECK(igraph_i_cattributes_cb_func(oldrec, &newrec, merges,
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1374|      0|                             todo_item.func.as_bool));
 1375|      0|                break;
 1376|      0|            case IGRAPH_ATTRIBUTE_COMBINE_SUM:
  ------------------
  |  Branch (1376:13): [True: 0, False: 0]
  ------------------
 1377|      0|            case IGRAPH_ATTRIBUTE_COMBINE_MAX:
  ------------------
  |  Branch (1377:13): [True: 0, False: 0]
  ------------------
 1378|      0|                IGRAPH_CHECK(igraph_i_cattributes_cb_any_is_true(oldrec, &newrec, merges));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1379|      0|                break;
 1380|      0|            case IGRAPH_ATTRIBUTE_COMBINE_PROD:
  ------------------
  |  Branch (1380:13): [True: 0, False: 0]
  ------------------
 1381|      0|            case IGRAPH_ATTRIBUTE_COMBINE_MIN:
  ------------------
  |  Branch (1381:13): [True: 0, False: 0]
  ------------------
 1382|      0|                IGRAPH_CHECK(igraph_i_cattributes_cb_all_is_true(oldrec, &newrec, merges));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1383|      0|                break;
 1384|      0|            case IGRAPH_ATTRIBUTE_COMBINE_MEAN:
  ------------------
  |  Branch (1384:13): [True: 0, False: 0]
  ------------------
 1385|      0|            case IGRAPH_ATTRIBUTE_COMBINE_MEDIAN:
  ------------------
  |  Branch (1385:13): [True: 0, False: 0]
  ------------------
 1386|      0|                IGRAPH_CHECK(igraph_i_cattributes_cb_majority(oldrec, &newrec, merges));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1387|      0|                break;
 1388|      0|            case IGRAPH_ATTRIBUTE_COMBINE_RANDOM:
  ------------------
  |  Branch (1388:13): [True: 0, False: 0]
  ------------------
 1389|      0|                IGRAPH_CHECK(igraph_i_cattributes_cb_random(oldrec, &newrec, merges));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1390|      0|                break;
 1391|      0|            case IGRAPH_ATTRIBUTE_COMBINE_FIRST:
  ------------------
  |  Branch (1391:13): [True: 0, False: 0]
  ------------------
 1392|      0|                IGRAPH_CHECK(igraph_i_cattributes_cb_first(oldrec, &newrec, merges));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1393|      0|                break;
 1394|      0|            case IGRAPH_ATTRIBUTE_COMBINE_LAST:
  ------------------
  |  Branch (1394:13): [True: 0, False: 0]
  ------------------
 1395|      0|                IGRAPH_CHECK(igraph_i_cattributes_cb_last(oldrec, &newrec, merges));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1396|      0|                break;
 1397|      0|            case IGRAPH_ATTRIBUTE_COMBINE_CONCAT:
  ------------------
  |  Branch (1397:13): [True: 0, False: 0]
  ------------------
 1398|      0|                IGRAPH_ERROR("Cannot calculate concatenation of Booleans.",
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1399|      0|                             IGRAPH_EATTRCOMBINE);
 1400|      0|                break;
 1401|      0|            default:
  ------------------
  |  Branch (1401:13): [True: 0, False: 0]
  ------------------
 1402|      0|                IGRAPH_ERROR("Unknown attribute combination.",
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1403|      0|                             IGRAPH_UNIMPLEMENTED);
 1404|      0|                break;
 1405|      0|            }
 1406|      0|        } else if (attr_type == IGRAPH_ATTRIBUTE_STRING) {
  ------------------
  |  Branch (1406:20): [True: 0, False: 0]
  ------------------
 1407|      0|            switch (todo_item.type) {
 1408|      0|            case IGRAPH_ATTRIBUTE_COMBINE_FUNCTION:
  ------------------
  |  Branch (1408:13): [True: 0, False: 0]
  ------------------
 1409|      0|                IGRAPH_CHECK(igraph_i_cattributes_cs_func(oldrec, &newrec, merges,
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1410|      0|                             todo_item.func.as_str));
 1411|      0|                break;
 1412|      0|            case IGRAPH_ATTRIBUTE_COMBINE_SUM:
  ------------------
  |  Branch (1412:13): [True: 0, False: 0]
  ------------------
 1413|      0|                IGRAPH_ERROR("Cannot sum strings.", IGRAPH_EATTRCOMBINE);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1414|      0|                break;
 1415|      0|            case IGRAPH_ATTRIBUTE_COMBINE_PROD:
  ------------------
  |  Branch (1415:13): [True: 0, False: 0]
  ------------------
 1416|      0|                IGRAPH_ERROR("Cannot multiply strings.", IGRAPH_EATTRCOMBINE);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1417|      0|                break;
 1418|      0|            case IGRAPH_ATTRIBUTE_COMBINE_MIN:
  ------------------
  |  Branch (1418:13): [True: 0, False: 0]
  ------------------
 1419|      0|                IGRAPH_ERROR("Cannot find minimum of strings.",
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1420|      0|                             IGRAPH_EATTRCOMBINE);
 1421|      0|                break;
 1422|      0|            case IGRAPH_ATTRIBUTE_COMBINE_MAX:
  ------------------
  |  Branch (1422:13): [True: 0, False: 0]
  ------------------
 1423|      0|                IGRAPH_ERROR("Cannot find maximum of strings.",
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1424|      0|                             IGRAPH_EATTRCOMBINE);
 1425|      0|                break;
 1426|      0|            case IGRAPH_ATTRIBUTE_COMBINE_MEAN:
  ------------------
  |  Branch (1426:13): [True: 0, False: 0]
  ------------------
 1427|      0|                IGRAPH_ERROR("Cannot calculate mean of strings.",
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1428|      0|                             IGRAPH_EATTRCOMBINE);
 1429|      0|                break;
 1430|      0|            case IGRAPH_ATTRIBUTE_COMBINE_MEDIAN:
  ------------------
  |  Branch (1430:13): [True: 0, False: 0]
  ------------------
 1431|      0|                IGRAPH_ERROR("Cannot calculate median of strings.",
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1432|      0|                             IGRAPH_EATTRCOMBINE);
 1433|      0|                break;
 1434|      0|            case IGRAPH_ATTRIBUTE_COMBINE_RANDOM:
  ------------------
  |  Branch (1434:13): [True: 0, False: 0]
  ------------------
 1435|      0|                IGRAPH_CHECK(igraph_i_cattributes_sn_random(oldrec, &newrec, merges));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1436|      0|                break;
 1437|      0|            case IGRAPH_ATTRIBUTE_COMBINE_FIRST:
  ------------------
  |  Branch (1437:13): [True: 0, False: 0]
  ------------------
 1438|      0|                IGRAPH_CHECK(igraph_i_cattributes_cs_first(oldrec, &newrec, merges));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1439|      0|                break;
 1440|      0|            case IGRAPH_ATTRIBUTE_COMBINE_LAST:
  ------------------
  |  Branch (1440:13): [True: 0, False: 0]
  ------------------
 1441|      0|                IGRAPH_CHECK(igraph_i_cattributes_cs_last(oldrec, &newrec, merges));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1442|      0|                break;
 1443|      0|            case IGRAPH_ATTRIBUTE_COMBINE_CONCAT:
  ------------------
  |  Branch (1443:13): [True: 0, False: 0]
  ------------------
 1444|      0|                IGRAPH_CHECK(igraph_i_cattributes_cs_concat(oldrec, &newrec, merges));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1445|      0|                break;
 1446|      0|            default:
  ------------------
  |  Branch (1446:13): [True: 0, False: 0]
  ------------------
 1447|      0|                IGRAPH_ERROR("Unknown attribute combination.",
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1448|      0|                             IGRAPH_UNIMPLEMENTED);
 1449|      0|                break;
 1450|      0|            }
 1451|      0|        } else {
 1452|      0|            IGRAPH_ERROR("Unknown attribute type, this should not happen.",
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1453|      0|                         IGRAPH_UNIMPLEMENTED);
 1454|      0|        }
 1455|       |
 1456|  1.46k|        IGRAPH_CHECK(igraph_attribute_record_list_push_back(new_attrs, &newrec));
  ------------------
  |  |  648|  1.46k|    do { \
  |  |  649|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1457|  1.46k|        IGRAPH_FINALLY_CLEAN(1);  /* ownership of newrec transferred */
 1458|  1.46k|    }
 1459|       |
 1460|  1.46k|    IGRAPH_FREE(todo_items);
  ------------------
  |  |   41|  1.46k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1461|  1.46k|    IGRAPH_FINALLY_CLEAN(2);
 1462|       |
 1463|  1.46k|    return IGRAPH_SUCCESS;
 1464|  1.46k|}
cattributes.c:igraph_i_cattributes_cn_sum:
  690|  1.46k|                                       const igraph_vector_int_list_t *merges) {
  691|  1.46k|    const igraph_vector_t *oldv = oldrec->value.as_vector;
  692|  1.46k|    igraph_vector_t *newv = newrec->value.as_vector;
  693|  1.46k|    igraph_integer_t newlen = igraph_vector_int_list_size(merges);
  694|       |
  695|  18.8k|    for (igraph_integer_t i = 0; i < newlen; i++) {
  ------------------
  |  Branch (695:34): [True: 17.3k, False: 1.46k]
  ------------------
  696|  17.3k|        igraph_real_t s = 0.0;
  697|  17.3k|        const igraph_vector_int_t *idx = igraph_vector_int_list_get_ptr(merges, i);
  698|  17.3k|        igraph_integer_t n = igraph_vector_int_size(idx);
  699|  44.1k|        for (igraph_integer_t j = 0; j < n; j++) {
  ------------------
  |  Branch (699:38): [True: 26.7k, False: 17.3k]
  ------------------
  700|  26.7k|            igraph_integer_t x = VECTOR(*idx)[j];
  ------------------
  |  |   65|  26.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  701|  26.7k|            s += VECTOR(*oldv)[x];
  ------------------
  |  |   65|  26.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  702|  26.7k|        }
  703|  17.3k|        VECTOR(*newv)[i] = s;
  ------------------
  |  |   65|  17.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  704|  17.3k|    }
  705|       |
  706|  1.46k|    return IGRAPH_SUCCESS;
  707|  1.46k|}
cattributes.c:igraph_i_cattribute_add_edges:
 1480|  2.06k|) {
 1481|  2.06k|    igraph_integer_t ne = igraph_vector_int_size(edges) / 2;
 1482|  2.06k|    igraph_i_cattributes_t *attr = graph->attr;
 1483|  2.06k|    return igraph_i_cattribute_add_vertices_or_edges(&attr->eal, igraph_ecount(graph), ne, nattr);
 1484|  2.06k|}
cattributes.c:igraph_i_cattribute_combine_edges:
 1501|  1.46k|) {
 1502|  1.46k|    igraph_i_cattributes_t *attr = graph->attr;
 1503|  1.46k|    igraph_i_cattributes_t *toattr = newgraph->attr;
 1504|  1.46k|    return igraph_i_cattribute_combine_attribute_record_lists(
 1505|  1.46k|        &attr->eal, &toattr->eal, merges, comb
 1506|  1.46k|    );
 1507|  1.46k|}
cattributes.c:igraph_i_cattribute_find_or_return:
  114|    732|) {
  115|    732|    igraph_attribute_record_t *rec;
  116|       |
  117|    732|    rec = igraph_i_cattribute_find(attrs, name, IGRAPH_ATTRIBUTE_UNSPECIFIED);
  118|    732|    if (!rec) {
  ------------------
  |  Branch (118:9): [True: 0, False: 732]
  ------------------
  119|      0|        IGRAPH_ERRORF("Attribute '%s' does not exist.", IGRAPH_EINVAL, name);
  ------------------
  |  |  469|      0|    do { \
  |  |  470|      0|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  471|      0|                      igraph_errno, __VA_ARGS__) ; \
  |  |  472|      0|        return igraph_errno; \
  |  |  473|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (473:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  120|      0|    }
  121|       |
  122|    732|    if (type != IGRAPH_ATTRIBUTE_UNSPECIFIED) {
  ------------------
  |  Branch (122:9): [True: 732, False: 0]
  ------------------
  123|    732|        IGRAPH_CHECK(igraph_attribute_record_check_type(rec, type));
  ------------------
  |  |  648|    732|    do { \
  |  |  649|    732|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    732|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    732|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 732]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  124|    732|    }
  125|       |
  126|    732|    if (ptr) {
  ------------------
  |  Branch (126:9): [True: 732, False: 0]
  ------------------
  127|    732|        *ptr = rec;
  128|    732|    }
  129|       |
  130|    732|    return IGRAPH_SUCCESS;
  131|    732|}
cattributes.c:igraph_i_cattribute_get_numeric_edge_attr:
 1746|    732|) {
 1747|    732|    igraph_i_cattributes_t *attr = graph->attr;
 1748|    732|    igraph_attribute_record_list_t *eal = &attr->eal;
 1749|    732|    igraph_attribute_record_t *rec;
 1750|    732|    const igraph_vector_t *num;
 1751|       |
 1752|    732|    IGRAPH_CHECK(igraph_i_cattribute_find_or_return(eal, name, IGRAPH_ATTRIBUTE_NUMERIC, &rec));
  ------------------
  |  |  648|    732|    do { \
  |  |  649|    732|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    732|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    732|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 732]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1753|       |
 1754|    732|    num = rec->value.as_vector;
 1755|    732|    if (igraph_es_is_all(&es)) {
  ------------------
  |  Branch (1755:9): [True: 732, False: 0]
  ------------------
 1756|    732|        igraph_vector_clear(value);
 1757|    732|        IGRAPH_CHECK(igraph_vector_append(value, num));
  ------------------
  |  |  648|    732|    do { \
  |  |  649|    732|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    732|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    732|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 732]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1758|    732|    } else {
 1759|      0|        igraph_eit_t it;
 1760|      0|        IGRAPH_CHECK(igraph_eit_create(graph, es, &it));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1761|      0|        IGRAPH_FINALLY(igraph_eit_destroy, &it);
  ------------------
  |  |  591|      0|    do { \
  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1762|      0|        IGRAPH_CHECK(igraph_vector_resize(value, IGRAPH_EIT_SIZE(it)));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1763|      0|        for (igraph_integer_t i=0; !IGRAPH_EIT_END(it); IGRAPH_EIT_NEXT(it), i++) {
  ------------------
  |  |  370|      0|#define IGRAPH_EIT_END(eit)   ((eit).pos >= (eit).end)
  ------------------
                      for (igraph_integer_t i=0; !IGRAPH_EIT_END(it); IGRAPH_EIT_NEXT(it), i++) {
  ------------------
  |  |  358|      0|#define IGRAPH_EIT_NEXT(eit) (++((eit).pos))
  ------------------
  |  Branch (1763:36): [True: 0, False: 0]
  ------------------
 1764|      0|            igraph_integer_t e = IGRAPH_EIT_GET(it);
  ------------------
  |  |  404|      0|    (igraph_integer_t)((((eit).type == IGRAPH_EIT_RANGE) ? (eit).pos : \
  |  |  ------------------
  |  |  |  Branch (404:25): [True: 0, False: 0]
  |  |  ------------------
  |  |  405|      0|                        VECTOR(*(eit).vec)[(eit).pos]))
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1765|      0|            VECTOR(*value)[i] = VECTOR(*num)[e];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*value)[i] = VECTOR(*num)[e];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1766|      0|        }
 1767|      0|        igraph_eit_destroy(&it);
 1768|      0|        IGRAPH_FINALLY_CLEAN(1);
 1769|      0|    }
 1770|       |
 1771|    732|    return IGRAPH_SUCCESS;
 1772|    732|}
cattributes.c:igraph_i_cattribute_find:
   70|  1.46k|) {
   71|  1.46k|    igraph_integer_t index = igraph_i_cattribute_find_index(attrs, name);
   72|  1.46k|    igraph_attribute_record_t *rec;
   73|       |
   74|  1.46k|    if (index >= 0) {
  ------------------
  |  Branch (74:9): [True: 732, False: 732]
  ------------------
   75|    732|        rec = igraph_attribute_record_list_get_ptr(attrs, index);
   76|    732|        if (type == IGRAPH_ATTRIBUTE_UNSPECIFIED || type == rec->type) {
  ------------------
  |  Branch (76:13): [True: 732, False: 0]
  |  Branch (76:53): [True: 0, False: 0]
  ------------------
   77|    732|            return rec;
   78|    732|        }
   79|    732|    }
   80|       |
   81|    732|    return NULL;
   82|  1.46k|}
cattributes.c:igraph_i_cattribute_find_or_create:
  148|    732|) {
  149|    732|    igraph_attribute_record_t *rec;
  150|       |
  151|    732|    rec = igraph_i_cattribute_find(attrs, name, IGRAPH_ATTRIBUTE_UNSPECIFIED);
  152|    732|    if (rec) {
  ------------------
  |  Branch (152:9): [True: 0, False: 732]
  ------------------
  153|      0|        if (type != IGRAPH_ATTRIBUTE_UNSPECIFIED) {
  ------------------
  |  Branch (153:13): [True: 0, False: 0]
  ------------------
  154|      0|            IGRAPH_CHECK(igraph_attribute_record_check_type(rec, type));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  155|      0|        }
  156|    732|    } else {
  157|    732|        IGRAPH_CHECK(igraph_attribute_record_list_push_back_new(attrs, &rec));
  ------------------
  |  |  648|    732|    do { \
  |  |  649|    732|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    732|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    732|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 732]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  158|    732|        IGRAPH_CHECK(igraph_attribute_record_set_name(rec, name));
  ------------------
  |  |  648|    732|    do { \
  |  |  649|    732|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    732|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    732|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 732]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  159|    732|        IGRAPH_CHECK(igraph_attribute_record_set_type(rec, type));
  ------------------
  |  |  648|    732|    do { \
  |  |  649|    732|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    732|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    732|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 732]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  160|    732|    }
  161|       |
  162|    732|    if (length > 0 && igraph_attribute_record_size(rec) < length) {
  ------------------
  |  Branch (162:9): [True: 692, False: 40]
  |  Branch (162:23): [True: 692, False: 0]
  ------------------
  163|    692|        IGRAPH_CHECK(igraph_attribute_record_resize(rec, length));
  ------------------
  |  |  648|    692|    do { \
  |  |  649|    692|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    692|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    692|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 692]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    692|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  164|    692|    }
  165|       |
  166|    732|    if (ptr) {
  ------------------
  |  Branch (166:9): [True: 732, False: 0]
  ------------------
  167|    732|        *ptr = rec;
  168|    732|    }
  169|       |
  170|    732|    return IGRAPH_SUCCESS;
  171|    732|}
cattributes.c:igraph_i_cattribute_find_index:
   50|  2.19k|) {
   51|  2.19k|    igraph_integer_t n = igraph_attribute_record_list_size(attrs);
   52|  2.19k|    for (igraph_integer_t i = 0; i < n; i++) {
  ------------------
  |  Branch (52:34): [True: 1.46k, False: 732]
  ------------------
   53|  1.46k|        const igraph_attribute_record_t *rec = igraph_attribute_record_list_get_ptr(attrs, i);
   54|  1.46k|        if (!strcmp(rec->name, name)) {
  ------------------
  |  Branch (54:13): [True: 1.46k, False: 0]
  ------------------
   55|  1.46k|            return i;
   56|  1.46k|        }
   57|  1.46k|    }
   58|    732|    return -1;
   59|  2.19k|}

igraph_vss_all:
  116|  15.9k|igraph_vs_t igraph_vss_all(void) {
  117|  15.9k|    igraph_vs_t allvs;
  118|  15.9k|    allvs.type = IGRAPH_VS_ALL;
  119|  15.9k|    return allvs;
  120|  15.9k|}
igraph_vss_range:
  469|  2.67k|igraph_vs_t igraph_vss_range(igraph_integer_t start, igraph_integer_t end) {
  470|  2.67k|    igraph_vs_t vs;
  471|  2.67k|    vs.type = IGRAPH_VS_RANGE;
  472|  2.67k|    vs.data.range.start = start;
  473|  2.67k|    vs.data.range.end = end;
  474|  2.67k|    return vs;
  475|  2.67k|}
igraph_vs_is_all:
  528|  6.45k|igraph_bool_t igraph_vs_is_all(const igraph_vs_t *vs) {
  529|  6.45k|    return vs->type == IGRAPH_VS_ALL;
  530|  6.45k|}
igraph_vs_size:
  592|  1.33k|                   igraph_integer_t *result) {
  593|  1.33k|    igraph_vector_int_t vec;
  594|  1.33k|    igraph_bool_t *seen;
  595|  1.33k|    igraph_integer_t i;
  596|  1.33k|    igraph_integer_t vec_len;
  597|       |
  598|  1.33k|    switch (vs->type) {
  ------------------
  |  Branch (598:13): [True: 0, False: 1.33k]
  ------------------
  599|      0|    case IGRAPH_VS_NONE:
  ------------------
  |  Branch (599:5): [True: 0, False: 1.33k]
  ------------------
  600|      0|        *result = 0; return IGRAPH_SUCCESS;
  601|       |
  602|      0|    case IGRAPH_VS_1:
  ------------------
  |  Branch (602:5): [True: 0, False: 1.33k]
  ------------------
  603|      0|        *result = 0;
  604|      0|        if (vs->data.vid < igraph_vcount(graph) && vs->data.vid >= 0) {
  ------------------
  |  Branch (604:13): [True: 0, False: 0]
  |  Branch (604:52): [True: 0, False: 0]
  ------------------
  605|      0|            *result = 1;
  606|      0|        }
  607|      0|        return IGRAPH_SUCCESS;
  608|       |
  609|  1.33k|    case IGRAPH_VS_RANGE:
  ------------------
  |  Branch (609:5): [True: 1.33k, False: 0]
  ------------------
  610|  1.33k|        *result = vs->data.range.end - vs->data.range.start;
  611|  1.33k|        return IGRAPH_SUCCESS;
  612|       |
  613|      0|    case IGRAPH_VS_ALL:
  ------------------
  |  Branch (613:5): [True: 0, False: 1.33k]
  ------------------
  614|      0|        *result = igraph_vcount(graph); return IGRAPH_SUCCESS;
  615|       |
  616|      0|    case IGRAPH_VS_ADJ:
  ------------------
  |  Branch (616:5): [True: 0, False: 1.33k]
  ------------------
  617|      0|        IGRAPH_VECTOR_INT_INIT_FINALLY(&vec, 0);
  ------------------
  |  |  124|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|      0|    do { \
  |  |  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|      0|    do { \
  |  |  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  618|      0|        IGRAPH_CHECK(igraph_neighbors(graph, &vec, vs->data.adj.vid, vs->data.adj.mode));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  619|      0|        *result = igraph_vector_int_size(&vec);
  620|      0|        igraph_vector_int_destroy(&vec);
  621|      0|        IGRAPH_FINALLY_CLEAN(1);
  622|      0|        return IGRAPH_SUCCESS;
  623|       |
  624|      0|    case IGRAPH_VS_NONADJ:
  ------------------
  |  Branch (624:5): [True: 0, False: 1.33k]
  ------------------
  625|      0|        IGRAPH_VECTOR_INT_INIT_FINALLY(&vec, 0);
  ------------------
  |  |  124|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|      0|    do { \
  |  |  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|      0|    do { \
  |  |  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  626|      0|        IGRAPH_CHECK(igraph_neighbors(graph, &vec, vs->data.adj.vid, vs->data.adj.mode));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  627|      0|        vec_len = igraph_vector_int_size(&vec);
  628|      0|        *result = igraph_vcount(graph);
  629|      0|        seen = IGRAPH_CALLOC(*result, igraph_bool_t);
  ------------------
  |  |   38|      0|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|      0|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 0, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 0, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  630|      0|        IGRAPH_CHECK_OOM(seen, "Cannot calculate vertex selector length.");
  ------------------
  |  |  701|      0|    do { \
  |  |  702|      0|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  631|      0|        IGRAPH_FINALLY(igraph_free, seen);
  ------------------
  |  |  591|      0|    do { \
  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  632|      0|        for (i = 0; i < vec_len; i++) {
  ------------------
  |  Branch (632:21): [True: 0, False: 0]
  ------------------
  633|      0|            if (!seen[ VECTOR(vec)[i] ]) {
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (633:17): [True: 0, False: 0]
  ------------------
  634|      0|                (*result)--;
  635|      0|                seen[ VECTOR(vec)[i] ] = true;
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  636|      0|            }
  637|      0|        }
  638|      0|        igraph_free(seen);
  639|      0|        igraph_vector_int_destroy(&vec);
  640|      0|        IGRAPH_FINALLY_CLEAN(2);
  641|      0|        return IGRAPH_SUCCESS;
  642|       |
  643|      0|    case IGRAPH_VS_VECTOR:
  ------------------
  |  Branch (643:5): [True: 0, False: 1.33k]
  ------------------
  644|      0|    case IGRAPH_VS_VECTORPTR:
  ------------------
  |  Branch (644:5): [True: 0, False: 1.33k]
  ------------------
  645|      0|        *result = igraph_vector_int_size(vs->data.vecptr);
  646|      0|        return IGRAPH_SUCCESS;
  647|  1.33k|    }
  648|       |
  649|      0|    IGRAPH_ERROR("Cannot calculate selector length, invalid selector type",
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  650|      0|                 IGRAPH_EINVAL);
  651|      0|}
igraph_vit_create:
  687|  14.2k|igraph_error_t igraph_vit_create(const igraph_t *graph, igraph_vs_t vs, igraph_vit_t *vit) {
  688|  14.2k|    igraph_vector_int_t vec;
  689|  14.2k|    igraph_vector_int_t *vec_int;
  690|  14.2k|    igraph_bool_t *seen;
  691|  14.2k|    igraph_integer_t i, j, n;
  692|  14.2k|    igraph_integer_t vec_len;
  693|       |
  694|  14.2k|    switch (vs.type) {
  695|  11.5k|    case IGRAPH_VS_ALL:
  ------------------
  |  Branch (695:5): [True: 11.5k, False: 2.67k]
  ------------------
  696|  11.5k|        vit->type = IGRAPH_VIT_RANGE;
  697|  11.5k|        vit->pos = 0;
  698|  11.5k|        vit->start = 0;
  699|  11.5k|        vit->end = igraph_vcount(graph);
  700|  11.5k|        break;
  701|      0|    case IGRAPH_VS_ADJ:
  ------------------
  |  Branch (701:5): [True: 0, False: 14.2k]
  ------------------
  702|      0|        vec_int = IGRAPH_CALLOC(1, igraph_vector_int_t);
  ------------------
  |  |   38|      0|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|      0|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [Folded - Ignored]
  |  |  |  |  |  Branch (36:24): [Folded - Ignored]
  |  |  |  |  |  Branch (36:66): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  703|      0|        IGRAPH_CHECK_OOM(vec_int, "Cannot create vertex iterator.");
  ------------------
  |  |  701|      0|    do { \
  |  |  702|      0|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  704|      0|        IGRAPH_FINALLY(igraph_free, vec_int);
  ------------------
  |  |  591|      0|    do { \
  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  705|      0|        IGRAPH_VECTOR_INT_INIT_FINALLY(vec_int, 0);
  ------------------
  |  |  124|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|      0|    do { \
  |  |  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|      0|    do { \
  |  |  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  706|      0|        IGRAPH_VECTOR_INT_INIT_FINALLY(&vec, 0);
  ------------------
  |  |  124|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|      0|    do { \
  |  |  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|      0|    do { \
  |  |  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  707|      0|        IGRAPH_CHECK(igraph_neighbors(graph, &vec, vs.data.adj.vid, vs.data.adj.mode));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  708|      0|        n = igraph_vector_int_size(&vec);
  709|      0|        IGRAPH_CHECK(igraph_vector_int_resize(vec_int, n));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  710|      0|        for (i = 0; i < n; i++) {
  ------------------
  |  Branch (710:21): [True: 0, False: 0]
  ------------------
  711|      0|            VECTOR(*vec_int)[i] = VECTOR(vec)[i];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*vec_int)[i] = VECTOR(vec)[i];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  712|      0|        }
  713|       |
  714|      0|        igraph_vector_int_destroy(&vec);
  715|      0|        IGRAPH_FINALLY_CLEAN(3);
  716|       |
  717|      0|        vit->type = IGRAPH_VIT_VECTOR;
  718|      0|        vit->pos = 0;
  719|      0|        vit->start = 0;
  720|      0|        vit->vec = vec_int;
  721|      0|        vit->end = n;
  722|       |
  723|      0|        break;
  724|      0|    case IGRAPH_VS_NONADJ:
  ------------------
  |  Branch (724:5): [True: 0, False: 14.2k]
  ------------------
  725|      0|        vec_int = IGRAPH_CALLOC(1, igraph_vector_int_t);
  ------------------
  |  |   38|      0|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|      0|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [Folded - Ignored]
  |  |  |  |  |  Branch (36:24): [Folded - Ignored]
  |  |  |  |  |  Branch (36:66): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  726|      0|        IGRAPH_CHECK_OOM(vec_int, "Cannot create vertex iterator.");
  ------------------
  |  |  701|      0|    do { \
  |  |  702|      0|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  727|      0|        IGRAPH_FINALLY(igraph_free, vec_int);
  ------------------
  |  |  591|      0|    do { \
  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  728|      0|        IGRAPH_VECTOR_INT_INIT_FINALLY(vec_int, 0);
  ------------------
  |  |  124|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|      0|    do { \
  |  |  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|      0|    do { \
  |  |  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  729|      0|        IGRAPH_VECTOR_INT_INIT_FINALLY(&vec, 0);
  ------------------
  |  |  124|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|      0|    do { \
  |  |  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|      0|    do { \
  |  |  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  730|      0|        IGRAPH_CHECK(igraph_neighbors(graph, &vec, vs.data.adj.vid, vs.data.adj.mode));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  731|      0|        vec_len = igraph_vector_int_size(&vec);
  732|      0|        n = igraph_vcount(graph);
  733|      0|        seen = IGRAPH_CALLOC(n, igraph_bool_t);
  ------------------
  |  |   38|      0|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|      0|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 0, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 0, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  734|      0|        IGRAPH_CHECK_OOM(seen, "Cannot create vertex iterator.");
  ------------------
  |  |  701|      0|    do { \
  |  |  702|      0|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  735|      0|        IGRAPH_FINALLY(igraph_free, seen);
  ------------------
  |  |  591|      0|    do { \
  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  736|      0|        for (i = 0; i < vec_len; i++) {
  ------------------
  |  Branch (736:21): [True: 0, False: 0]
  ------------------
  737|      0|            if (! seen [ VECTOR(vec)[i] ] ) {
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (737:17): [True: 0, False: 0]
  ------------------
  738|      0|                n--;
  739|      0|                seen[ VECTOR(vec)[i] ] = true;
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  740|      0|            }
  741|      0|        }
  742|      0|        IGRAPH_CHECK(igraph_vector_int_resize(vec_int, n));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  743|      0|        for (i = 0, j = 0; j < n; i++) {
  ------------------
  |  Branch (743:28): [True: 0, False: 0]
  ------------------
  744|      0|            if (!seen[i]) {
  ------------------
  |  Branch (744:17): [True: 0, False: 0]
  ------------------
  745|      0|                VECTOR(*vec_int)[j++] = i;
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  746|      0|            }
  747|      0|        }
  748|       |
  749|      0|        IGRAPH_FREE(seen);
  ------------------
  |  |   41|      0|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  750|      0|        igraph_vector_int_destroy(&vec);
  751|      0|        IGRAPH_FINALLY_CLEAN(4);
  752|       |
  753|      0|        vit->type = IGRAPH_VIT_VECTOR;
  754|      0|        vit->pos = 0;
  755|      0|        vit->start = 0;
  756|      0|        vit->vec = vec_int;
  757|      0|        vit->end = n;
  758|      0|        break;
  759|      0|    case IGRAPH_VS_NONE:
  ------------------
  |  Branch (759:5): [True: 0, False: 14.2k]
  ------------------
  760|      0|        vit->type = IGRAPH_VIT_RANGE;
  761|      0|        vit->pos = 0;
  762|      0|        vit->start = 0;
  763|      0|        vit->end = 0;
  764|      0|        break;
  765|      0|    case IGRAPH_VS_1:
  ------------------
  |  Branch (765:5): [True: 0, False: 14.2k]
  ------------------
  766|      0|        vit->type = IGRAPH_VIT_RANGE;
  767|      0|        vit->pos = vs.data.vid;
  768|      0|        vit->start = vs.data.vid;
  769|      0|        vit->end = vs.data.vid + 1;
  770|      0|        if (vit->pos >= igraph_vcount(graph)) {
  ------------------
  |  Branch (770:13): [True: 0, False: 0]
  ------------------
  771|      0|            IGRAPH_ERROR("Cannot create iterator, invalid vertex ID.", IGRAPH_EINVVID);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  772|      0|        }
  773|      0|        break;
  774|      0|    case IGRAPH_VS_VECTORPTR:
  ------------------
  |  Branch (774:5): [True: 0, False: 14.2k]
  ------------------
  775|      0|    case IGRAPH_VS_VECTOR:
  ------------------
  |  Branch (775:5): [True: 0, False: 14.2k]
  ------------------
  776|      0|        vit->type = IGRAPH_VIT_VECTORPTR;
  777|      0|        vit->pos = 0;
  778|      0|        vit->start = 0;
  779|      0|        vit->vec = vs.data.vecptr;
  780|      0|        vit->end = igraph_vector_int_size(vit->vec);
  781|      0|        if (!igraph_vector_int_isininterval(vit->vec, 0, igraph_vcount(graph) - 1)) {
  ------------------
  |  Branch (781:13): [True: 0, False: 0]
  ------------------
  782|      0|            IGRAPH_ERROR("Cannot create iterator, invalid vertex ID.", IGRAPH_EINVVID);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  783|      0|        }
  784|      0|        break;
  785|  2.67k|    case IGRAPH_VS_RANGE:
  ------------------
  |  Branch (785:5): [True: 2.67k, False: 11.5k]
  ------------------
  786|  2.67k|        {
  787|  2.67k|            igraph_integer_t no_of_nodes = igraph_vcount(graph);
  788|  2.67k|            if (vs.data.range.start < 0 ||
  ------------------
  |  Branch (788:17): [True: 0, False: 2.67k]
  ------------------
  789|  2.67k|                vs.data.range.start > no_of_nodes ||
  ------------------
  |  Branch (789:17): [True: 0, False: 2.67k]
  ------------------
  790|  2.67k|                (no_of_nodes > 0 && vs.data.range.start == no_of_nodes)) {
  ------------------
  |  Branch (790:18): [True: 2.67k, False: 0]
  |  Branch (790:37): [True: 0, False: 2.67k]
  ------------------
  791|      0|                IGRAPH_ERROR("Cannot create range iterator, starting vertex ID out of range.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  792|      0|            }
  793|  2.67k|            if (vs.data.range.end < 0 || vs.data.range.end > no_of_nodes) {
  ------------------
  |  Branch (793:17): [True: 0, False: 2.67k]
  |  Branch (793:42): [True: 0, False: 2.67k]
  ------------------
  794|      0|                IGRAPH_ERROR("Cannot create range iterator, ending vertex ID out of range.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  795|      0|            }
  796|  2.67k|        }
  797|  2.67k|        vit->type = IGRAPH_VIT_RANGE;
  798|  2.67k|        vit->pos = vs.data.range.start;
  799|  2.67k|        vit->start = vs.data.range.start;
  800|  2.67k|        vit->end = vs.data.range.end;
  801|  2.67k|        break;
  802|      0|    default:
  ------------------
  |  Branch (802:5): [True: 0, False: 14.2k]
  ------------------
  803|      0|        IGRAPH_ERROR("Cannot create iterator, invalid selector.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  804|      0|        break;
  805|  14.2k|    }
  806|  14.2k|    return IGRAPH_SUCCESS;
  807|  14.2k|}
igraph_vit_destroy:
  822|  14.2k|void igraph_vit_destroy(const igraph_vit_t *vit) {
  823|  14.2k|    switch (vit->type) {
  824|  14.2k|    case IGRAPH_VIT_RANGE:
  ------------------
  |  Branch (824:5): [True: 14.2k, False: 0]
  ------------------
  825|  14.2k|    case IGRAPH_VIT_VECTORPTR:
  ------------------
  |  Branch (825:5): [True: 0, False: 14.2k]
  ------------------
  826|  14.2k|        break;
  827|      0|    case IGRAPH_VIT_VECTOR:
  ------------------
  |  Branch (827:5): [True: 0, False: 14.2k]
  ------------------
  828|      0|        igraph_vector_int_destroy((igraph_vector_int_t*) vit->vec);
  829|      0|        igraph_free((igraph_vector_int_t*) vit->vec);
  830|      0|        break;
  831|      0|    default:
  ------------------
  |  Branch (831:5): [True: 0, False: 14.2k]
  ------------------
  832|       |        /*     IGRAPH_ERROR("Cannot destroy iterator, unknown type", IGRAPH_EINVAL); */
  833|      0|        break;
  834|  14.2k|    }
  835|  14.2k|}
igraph_es_all:
  890|  2.86k|                  igraph_edgeorder_type_t order) {
  891|  2.86k|    switch (order) {
  892|  1.40k|    case IGRAPH_EDGEORDER_ID:
  ------------------
  |  Branch (892:5): [True: 1.40k, False: 1.46k]
  ------------------
  893|  1.40k|        es->type = IGRAPH_ES_ALL;
  894|  1.40k|        break;
  895|    732|    case IGRAPH_EDGEORDER_FROM:
  ------------------
  |  Branch (895:5): [True: 732, False: 2.13k]
  ------------------
  896|    732|        es->type = IGRAPH_ES_ALLFROM;
  897|    732|        break;
  898|    732|    case IGRAPH_EDGEORDER_TO:
  ------------------
  |  Branch (898:5): [True: 732, False: 2.13k]
  ------------------
  899|    732|        es->type = IGRAPH_ES_ALLTO;
  900|    732|        break;
  901|      0|    default:
  ------------------
  |  Branch (901:5): [True: 0, False: 2.86k]
  ------------------
  902|      0|        IGRAPH_ERROR("Invalid edge order, cannot create selector.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  903|      0|        break;
  904|  2.86k|    }
  905|  2.86k|    return IGRAPH_SUCCESS;
  906|  2.86k|}
igraph_ess_all:
  922|  2.13k|igraph_es_t igraph_ess_all(igraph_edgeorder_type_t order) {
  923|  2.13k|    igraph_es_t es;
  924|  2.13k|    igraph_es_all(&es, order); /* cannot fail */
  925|  2.13k|    return es;
  926|  2.13k|}
igraph_es_destroy:
 1369|    732|void igraph_es_destroy(igraph_es_t *es) {
 1370|    732|    switch (es->type) {
 1371|      0|    case IGRAPH_ES_ALL:
  ------------------
  |  Branch (1371:5): [True: 0, False: 732]
  ------------------
 1372|    732|    case IGRAPH_ES_ALLFROM:
  ------------------
  |  Branch (1372:5): [True: 732, False: 0]
  ------------------
 1373|    732|    case IGRAPH_ES_ALLTO:
  ------------------
  |  Branch (1373:5): [True: 0, False: 732]
  ------------------
 1374|    732|    case IGRAPH_ES_INCIDENT:
  ------------------
  |  Branch (1374:5): [True: 0, False: 732]
  ------------------
 1375|    732|    case IGRAPH_ES_NONE:
  ------------------
  |  Branch (1375:5): [True: 0, False: 732]
  ------------------
 1376|    732|    case IGRAPH_ES_1:
  ------------------
  |  Branch (1376:5): [True: 0, False: 732]
  ------------------
 1377|    732|    case IGRAPH_ES_VECTORPTR:
  ------------------
  |  Branch (1377:5): [True: 0, False: 732]
  ------------------
 1378|    732|    case IGRAPH_ES_RANGE:
  ------------------
  |  Branch (1378:5): [True: 0, False: 732]
  ------------------
 1379|    732|    case IGRAPH_ES_ALL_BETWEEN:
  ------------------
  |  Branch (1379:5): [True: 0, False: 732]
  ------------------
 1380|    732|        break;
 1381|      0|    case IGRAPH_ES_VECTOR:
  ------------------
  |  Branch (1381:5): [True: 0, False: 732]
  ------------------
 1382|      0|        igraph_vector_int_destroy((igraph_vector_int_t*)es->data.vecptr);
 1383|      0|        IGRAPH_FREE(es->data.vecptr);
  ------------------
  |  |   41|      0|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1384|      0|        break;
 1385|      0|    case IGRAPH_ES_PAIRS:
  ------------------
  |  Branch (1385:5): [True: 0, False: 732]
  ------------------
 1386|      0|    case IGRAPH_ES_PATH:
  ------------------
  |  Branch (1386:5): [True: 0, False: 732]
  ------------------
 1387|      0|        igraph_vector_int_destroy((igraph_vector_int_t*)es->data.path.ptr);
 1388|      0|        IGRAPH_FREE(es->data.path.ptr);
  ------------------
  |  |   41|      0|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1389|      0|        break;
 1390|      0|    default:
  ------------------
  |  Branch (1390:5): [True: 0, False: 732]
  ------------------
 1391|      0|        break;
 1392|    732|    }
 1393|    732|}
igraph_es_is_all:
 1406|  2.06k|igraph_bool_t igraph_es_is_all(const igraph_es_t *es) {
 1407|  2.06k|    return es->type == IGRAPH_ES_ALL;
 1408|  2.06k|}
igraph_eit_create:
 1872|  1.46k|igraph_error_t igraph_eit_create(const igraph_t *graph, igraph_es_t es, igraph_eit_t *eit) {
 1873|  1.46k|    switch (es.type) {
 1874|      0|    case IGRAPH_ES_ALL:
  ------------------
  |  Branch (1874:5): [True: 0, False: 1.46k]
  ------------------
 1875|      0|        eit->type = IGRAPH_EIT_RANGE;
 1876|      0|        eit->pos = 0;
 1877|      0|        eit->start = 0;
 1878|      0|        eit->end = igraph_ecount(graph);
 1879|      0|        break;
 1880|    732|    case IGRAPH_ES_ALLFROM:
  ------------------
  |  Branch (1880:5): [True: 732, False: 732]
  ------------------
 1881|    732|        IGRAPH_CHECK(igraph_i_eit_create_allfromto(graph, eit, IGRAPH_OUT));
  ------------------
  |  |  648|    732|    do { \
  |  |  649|    732|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    732|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    732|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 732]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1882|    732|        break;
 1883|    732|    case IGRAPH_ES_ALLTO:
  ------------------
  |  Branch (1883:5): [True: 732, False: 732]
  ------------------
 1884|    732|        IGRAPH_CHECK(igraph_i_eit_create_allfromto(graph, eit, IGRAPH_IN));
  ------------------
  |  |  648|    732|    do { \
  |  |  649|    732|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    732|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    732|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 732]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1885|    732|        break;
 1886|    732|    case IGRAPH_ES_INCIDENT:
  ------------------
  |  Branch (1886:5): [True: 0, False: 1.46k]
  ------------------
 1887|      0|        IGRAPH_CHECK(igraph_i_eit_create_incident(graph, es, eit));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1888|      0|        break;
 1889|      0|    case IGRAPH_ES_NONE:
  ------------------
  |  Branch (1889:5): [True: 0, False: 1.46k]
  ------------------
 1890|      0|        eit->type = IGRAPH_EIT_RANGE;
 1891|      0|        eit->pos = 0;
 1892|      0|        eit->start = 0;
 1893|      0|        eit->end = 0;
 1894|      0|        break;
 1895|      0|    case IGRAPH_ES_1:
  ------------------
  |  Branch (1895:5): [True: 0, False: 1.46k]
  ------------------
 1896|      0|        eit->type = IGRAPH_EIT_RANGE;
 1897|      0|        eit->pos = es.data.eid;
 1898|      0|        eit->start = es.data.eid;
 1899|      0|        eit->end = es.data.eid + 1;
 1900|      0|        if (eit->pos >= igraph_ecount(graph)) {
  ------------------
  |  Branch (1900:13): [True: 0, False: 0]
  ------------------
 1901|      0|            IGRAPH_ERROR("Cannot create iterator.", IGRAPH_EINVEID);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1902|      0|        }
 1903|      0|        break;
 1904|      0|    case IGRAPH_ES_VECTOR:
  ------------------
  |  Branch (1904:5): [True: 0, False: 1.46k]
  ------------------
 1905|      0|    case IGRAPH_ES_VECTORPTR:
  ------------------
  |  Branch (1905:5): [True: 0, False: 1.46k]
  ------------------
 1906|      0|        eit->type = IGRAPH_EIT_VECTORPTR;
 1907|      0|        eit->pos = 0;
 1908|      0|        eit->start = 0;
 1909|      0|        eit->vec = es.data.vecptr;
 1910|      0|        eit->end = igraph_vector_int_size(eit->vec);
 1911|      0|        if (!igraph_vector_int_isininterval(eit->vec, 0, igraph_ecount(graph) - 1)) {
  ------------------
  |  Branch (1911:13): [True: 0, False: 0]
  ------------------
 1912|      0|            IGRAPH_ERROR("Cannot create iterator.", IGRAPH_EINVEID);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1913|      0|        }
 1914|      0|        break;
 1915|      0|    case IGRAPH_ES_RANGE:
  ------------------
  |  Branch (1915:5): [True: 0, False: 1.46k]
  ------------------
 1916|      0|        {
 1917|      0|            igraph_integer_t no_of_edges = igraph_ecount(graph);
 1918|      0|            if (es.data.range.start < 0 ||
  ------------------
  |  Branch (1918:17): [True: 0, False: 0]
  ------------------
 1919|      0|                es.data.range.start > no_of_edges ||
  ------------------
  |  Branch (1919:17): [True: 0, False: 0]
  ------------------
 1920|      0|                (no_of_edges > 0 && es.data.range.start == no_of_edges)) {
  ------------------
  |  Branch (1920:18): [True: 0, False: 0]
  |  Branch (1920:37): [True: 0, False: 0]
  ------------------
 1921|      0|                IGRAPH_ERROR("Cannot create range iterator, starting edge ID out of range.", IGRAPH_EINVEID);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1922|      0|            }
 1923|      0|            if (es.data.range.end < 0 || es.data.range.end > no_of_edges) {
  ------------------
  |  Branch (1923:17): [True: 0, False: 0]
  |  Branch (1923:42): [True: 0, False: 0]
  ------------------
 1924|      0|                IGRAPH_ERROR("Cannot create range iterator, ending edge ID out of range.", IGRAPH_EINVEID);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1925|      0|            }
 1926|      0|        }
 1927|      0|        eit->type = IGRAPH_EIT_RANGE;
 1928|      0|        eit->pos = es.data.range.start;
 1929|      0|        eit->start = es.data.range.start;
 1930|      0|        eit->end = es.data.range.end;
 1931|      0|        break;
 1932|      0|    case IGRAPH_ES_PAIRS:
  ------------------
  |  Branch (1932:5): [True: 0, False: 1.46k]
  ------------------
 1933|      0|        IGRAPH_CHECK(igraph_i_eit_pairs(graph, es, eit));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1934|      0|        break;
 1935|      0|    case IGRAPH_ES_PATH:
  ------------------
  |  Branch (1935:5): [True: 0, False: 1.46k]
  ------------------
 1936|      0|        IGRAPH_CHECK(igraph_i_eit_path(graph, es, eit));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1937|      0|        break;
 1938|      0|    case IGRAPH_ES_ALL_BETWEEN:
  ------------------
  |  Branch (1938:5): [True: 0, False: 1.46k]
  ------------------
 1939|      0|        IGRAPH_CHECK(igraph_i_eit_all_between(graph, es, eit));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1940|      0|        break;
 1941|      0|    default:
  ------------------
  |  Branch (1941:5): [True: 0, False: 1.46k]
  ------------------
 1942|      0|        IGRAPH_ERROR("Cannot create iterator, invalid selector.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1943|      0|        break;
 1944|  1.46k|    }
 1945|  1.46k|    return IGRAPH_SUCCESS;
 1946|  1.46k|}
igraph_eit_destroy:
 1958|  1.46k|void igraph_eit_destroy(const igraph_eit_t *eit) {
 1959|  1.46k|    switch (eit->type) {
 1960|      0|    case IGRAPH_EIT_RANGE:
  ------------------
  |  Branch (1960:5): [True: 0, False: 1.46k]
  ------------------
 1961|      0|    case IGRAPH_EIT_VECTORPTR:
  ------------------
  |  Branch (1961:5): [True: 0, False: 1.46k]
  ------------------
 1962|      0|        break;
 1963|  1.46k|    case IGRAPH_EIT_VECTOR:
  ------------------
  |  Branch (1963:5): [True: 1.46k, False: 0]
  ------------------
 1964|  1.46k|        igraph_vector_int_destroy((igraph_vector_int_t*)eit->vec);
 1965|  1.46k|        igraph_free((igraph_vector_int_t*)eit->vec);
 1966|  1.46k|        break;
 1967|      0|    default:
  ------------------
  |  Branch (1967:5): [True: 0, False: 1.46k]
  ------------------
 1968|       |        /*     IGRAPH_ERROR("Cannot destroy iterator, unknown type", IGRAPH_EINVAL); */
 1969|      0|        break;
 1970|  1.46k|    }
 1971|  1.46k|}
iterators.c:igraph_i_eit_create_allfromto:
 1649|  1.46k|                                         igraph_neimode_t mode) {
 1650|  1.46k|    igraph_vector_int_t *vec;
 1651|  1.46k|    igraph_integer_t no_of_nodes = igraph_vcount(graph);
 1652|  1.46k|    igraph_integer_t no_of_edges = igraph_ecount(graph);
 1653|       |
 1654|  1.46k|    vec = IGRAPH_CALLOC(1, igraph_vector_int_t);
  ------------------
  |  |   38|  1.46k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  2.92k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [Folded - Ignored]
  |  |  |  |  |  Branch (36:24): [Folded - Ignored]
  |  |  |  |  |  Branch (36:66): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1655|  1.46k|    IGRAPH_CHECK_OOM(vec, "Cannot create edge iterator.");
  ------------------
  |  |  701|  1.46k|    do { \
  |  |  702|  1.46k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1656|  1.46k|    IGRAPH_FINALLY(igraph_free, vec);
  ------------------
  |  |  591|  1.46k|    do { \
  |  |  592|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  595|  1.46k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1657|       |
 1658|  1.46k|    IGRAPH_VECTOR_INT_INIT_FINALLY(vec, 0);
  ------------------
  |  |  124|  1.46k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  1.46k|    do { \
  |  |  |  |  649|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  1.46k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  1.46k|    do { \
  |  |  |  |  592|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  1.46k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1659|  1.46k|    IGRAPH_CHECK(igraph_vector_int_reserve(vec, no_of_edges));
  ------------------
  |  |  648|  1.46k|    do { \
  |  |  649|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1660|       |
 1661|  1.46k|    if (igraph_is_directed(graph)) {
  ------------------
  |  Branch (1661:9): [True: 732, False: 732]
  ------------------
 1662|    732|        igraph_vector_int_t adj;
 1663|    732|        IGRAPH_VECTOR_INT_INIT_FINALLY(&adj, 0);
  ------------------
  |  |  124|    732|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|    732|    do { \
  |  |  |  |  649|    732|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|    732|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|    732|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 732]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|    732|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|    732|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|    732|    do { \
  |  |  |  |  592|    732|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|    732|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|    732|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|    732|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|    732|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|    732|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1664|  32.5k|        for (igraph_integer_t i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (1664:38): [True: 31.8k, False: 732]
  ------------------
 1665|  31.8k|            IGRAPH_CHECK(igraph_incident(graph, &adj, i, mode));
  ------------------
  |  |  648|  31.8k|    do { \
  |  |  649|  31.8k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  31.8k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  31.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 31.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  31.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1666|  31.8k|            igraph_vector_int_append(vec, &adj);  /* reserved */
 1667|  31.8k|        }
 1668|    732|        igraph_vector_int_destroy(&adj);
 1669|    732|        IGRAPH_FINALLY_CLEAN(1);
 1670|    732|    } else {
 1671|    732|        igraph_vector_int_t adj;
 1672|    732|        igraph_bool_t *added;
 1673|    732|        IGRAPH_VECTOR_INT_INIT_FINALLY(&adj, 0);
  ------------------
  |  |  124|    732|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|    732|    do { \
  |  |  |  |  649|    732|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|    732|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|    732|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 732]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|    732|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|    732|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|    732|    do { \
  |  |  |  |  592|    732|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|    732|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|    732|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|    732|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|    732|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|    732|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1674|    732|        added = IGRAPH_CALLOC(no_of_edges, igraph_bool_t);
  ------------------
  |  |   38|    732|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  1.46k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 732, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 732, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 692, False: 40]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1675|    732|        IGRAPH_CHECK_OOM(added, "Cannot create edge iterator.");
  ------------------
  |  |  701|    732|    do { \
  |  |  702|    732|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|    732|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 732]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1676|    732|        IGRAPH_FINALLY(igraph_free, added);
  ------------------
  |  |  591|    732|    do { \
  |  |  592|    732|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|    732|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|    732|         * incorrect destructor function with the pointer */ \
  |  |  595|    732|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|    732|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1677|  32.5k|        for (igraph_integer_t i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (1677:38): [True: 31.8k, False: 732]
  ------------------
 1678|  31.8k|            IGRAPH_CHECK(igraph_incident(graph, &adj, i, IGRAPH_ALL));
  ------------------
  |  |  648|  31.8k|    do { \
  |  |  649|  31.8k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  31.8k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  31.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 31.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  31.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1679|  31.8k|            const igraph_integer_t length = igraph_vector_int_size(&adj);
 1680|  49.5k|            for (igraph_integer_t j = 0; j < length; j++) {
  ------------------
  |  Branch (1680:42): [True: 17.6k, False: 31.8k]
  ------------------
 1681|  17.6k|                if (!added[ VECTOR(adj)[j] ]) {
  ------------------
  |  |   65|  17.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1681:21): [True: 8.83k, False: 8.83k]
  ------------------
 1682|  8.83k|                    igraph_vector_int_push_back(vec, VECTOR(adj)[j]);  /* reserved */
  ------------------
  |  |   65|  8.83k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1683|  8.83k|                    added[ VECTOR(adj)[j] ] = true;
  ------------------
  |  |   65|  8.83k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1684|  8.83k|                }
 1685|  17.6k|            }
 1686|  31.8k|        }
 1687|    732|        igraph_vector_int_destroy(&adj);
 1688|    732|        IGRAPH_FREE(added);
  ------------------
  |  |   41|    732|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1689|    732|        IGRAPH_FINALLY_CLEAN(2);
 1690|    732|    }
 1691|       |
 1692|  1.46k|    eit->type = IGRAPH_EIT_VECTOR;
 1693|  1.46k|    eit->pos = 0;
 1694|  1.46k|    eit->start = 0;
 1695|  1.46k|    eit->vec = vec;
 1696|  1.46k|    eit->end = igraph_vector_int_size(eit->vec);
 1697|       |
 1698|  1.46k|    IGRAPH_FINALLY_CLEAN(2);
 1699|  1.46k|    return IGRAPH_SUCCESS;
 1700|  1.46k|}

igraph_empty:
   65|  2.22k|igraph_error_t igraph_empty(igraph_t *graph, igraph_integer_t n, igraph_bool_t directed) {
   66|  2.22k|    return igraph_empty_attrs(graph, n, directed, 0);
   67|  2.22k|}

igraph_empty_attrs:
  101|  2.22k|) {
  102|       |
  103|  2.22k|    if (n < 0) {
  ------------------
  |  Branch (103:9): [True: 0, False: 2.22k]
  ------------------
  104|      0|        IGRAPH_ERROR("Number of vertices must not be negative.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  105|      0|    }
  106|       |
  107|  2.22k|    memset(graph, 0, sizeof(igraph_t));
  108|       |
  109|  2.22k|    graph->n = 0;
  110|  2.22k|    graph->directed = directed;
  111|  2.22k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&graph->from, 0);
  ------------------
  |  |  124|  2.22k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.22k|    do { \
  |  |  |  |  649|  2.22k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.22k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.22k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.22k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.22k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  2.22k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.22k|    do { \
  |  |  |  |  592|  2.22k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.22k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.22k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.22k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.22k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.22k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  112|  2.22k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&graph->to, 0);
  ------------------
  |  |  124|  2.22k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.22k|    do { \
  |  |  |  |  649|  2.22k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.22k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.22k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.22k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.22k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  2.22k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.22k|    do { \
  |  |  |  |  592|  2.22k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.22k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.22k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.22k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.22k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.22k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  113|  2.22k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&graph->oi, 0);
  ------------------
  |  |  124|  2.22k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.22k|    do { \
  |  |  |  |  649|  2.22k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.22k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.22k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.22k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.22k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  2.22k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.22k|    do { \
  |  |  |  |  592|  2.22k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.22k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.22k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.22k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.22k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.22k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  114|  2.22k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&graph->ii, 0);
  ------------------
  |  |  124|  2.22k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.22k|    do { \
  |  |  |  |  649|  2.22k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.22k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.22k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.22k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.22k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  2.22k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.22k|    do { \
  |  |  |  |  592|  2.22k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.22k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.22k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.22k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.22k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.22k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  115|  2.22k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&graph->os, 1);
  ------------------
  |  |  124|  2.22k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.22k|    do { \
  |  |  |  |  649|  2.22k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.22k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.22k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.22k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.22k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  2.22k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.22k|    do { \
  |  |  |  |  592|  2.22k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.22k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.22k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.22k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.22k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.22k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  116|  2.22k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&graph->is, 1);
  ------------------
  |  |  124|  2.22k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  2.22k|    do { \
  |  |  |  |  649|  2.22k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.22k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.22k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.22k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.22k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  2.22k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  2.22k|    do { \
  |  |  |  |  592|  2.22k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  2.22k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  2.22k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  2.22k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  2.22k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  2.22k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  117|       |
  118|       |    /* init cache */
  119|  2.22k|    graph->cache = IGRAPH_CALLOC(1, igraph_i_property_cache_t);
  ------------------
  |  |   38|  2.22k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  4.44k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [Folded - Ignored]
  |  |  |  |  |  Branch (36:24): [Folded - Ignored]
  |  |  |  |  |  Branch (36:66): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  120|  2.22k|    IGRAPH_CHECK_OOM(graph->cache, "Cannot create graph.");
  ------------------
  |  |  701|  2.22k|    do { \
  |  |  702|  2.22k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|  2.22k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.22k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|  2.22k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  121|  2.22k|    IGRAPH_FINALLY(igraph_free, graph->cache);
  ------------------
  |  |  591|  2.22k|    do { \
  |  |  592|  2.22k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  2.22k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  2.22k|         * incorrect destructor function with the pointer */ \
  |  |  595|  2.22k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  2.22k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  2.22k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  122|  2.22k|    IGRAPH_CHECK(igraph_i_property_cache_init(graph->cache));
  ------------------
  |  |  648|  2.22k|    do { \
  |  |  649|  2.22k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.22k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.22k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.22k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.22k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  123|  2.22k|    IGRAPH_FINALLY(igraph_i_property_cache_destroy, graph->cache);
  ------------------
  |  |  591|  2.22k|    do { \
  |  |  592|  2.22k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  2.22k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  2.22k|         * incorrect destructor function with the pointer */ \
  |  |  595|  2.22k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  2.22k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  2.22k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  124|       |
  125|  2.22k|    VECTOR(graph->os)[0] = 0;
  ------------------
  |  |   65|  2.22k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  126|  2.22k|    VECTOR(graph->is)[0] = 0;
  ------------------
  |  |   65|  2.22k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  127|       |
  128|       |    /* init attributes */
  129|  2.22k|    IGRAPH_CHECK(igraph_i_attribute_init(graph, attr));
  ------------------
  |  |  648|  2.22k|    do { \
  |  |  649|  2.22k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.22k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.22k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.22k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.22k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  130|       |
  131|       |    /* add the vertices */
  132|  2.22k|    IGRAPH_CHECK(igraph_add_vertices(graph, n, 0));
  ------------------
  |  |  648|  2.22k|    do { \
  |  |  649|  2.22k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.22k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.22k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.22k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.22k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  133|       |
  134|  2.22k|    IGRAPH_FINALLY_CLEAN(8);
  135|  2.22k|    return IGRAPH_SUCCESS;
  136|  2.22k|}
igraph_destroy:
  154|  2.22k|void igraph_destroy(igraph_t *graph) {
  155|  2.22k|    igraph_i_attribute_destroy(graph);
  156|       |
  157|  2.22k|    igraph_i_property_cache_destroy(graph->cache);
  158|  2.22k|    IGRAPH_FREE(graph->cache);
  ------------------
  |  |   41|  2.22k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  159|       |
  160|  2.22k|    igraph_vector_int_destroy(&graph->from);
  161|  2.22k|    igraph_vector_int_destroy(&graph->to);
  162|  2.22k|    igraph_vector_int_destroy(&graph->oi);
  163|  2.22k|    igraph_vector_int_destroy(&graph->ii);
  164|  2.22k|    igraph_vector_int_destroy(&graph->os);
  165|  2.22k|    igraph_vector_int_destroy(&graph->is);
  166|  2.22k|}
igraph_add_edges:
  256|  2.06k|) {
  257|  2.06k|    igraph_integer_t no_of_edges = igraph_vector_int_size(&graph->from);
  258|  2.06k|    igraph_integer_t edges_to_add = igraph_vector_int_size(edges) / 2;
  259|  2.06k|    igraph_integer_t new_no_of_edges;
  260|  2.06k|    igraph_integer_t i = 0;
  261|  2.06k|    igraph_vector_int_t newoi, newii;
  262|  2.06k|    igraph_bool_t directed = igraph_is_directed(graph);
  263|       |
  264|  2.06k|    if (igraph_vector_int_size(edges) % 2 != 0) {
  ------------------
  |  Branch (264:9): [True: 0, False: 2.06k]
  ------------------
  265|      0|        IGRAPH_ERROR("Invalid (odd) length of edges vector.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  266|      0|    }
  267|  2.06k|    if (!igraph_vector_int_isininterval(edges, 0, igraph_vcount(graph) - 1)) {
  ------------------
  |  Branch (267:9): [True: 0, False: 2.06k]
  ------------------
  268|      0|        IGRAPH_ERROR("Out-of-range vertex IDs when adding edges.", IGRAPH_EINVVID);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  269|      0|    }
  270|       |
  271|       |    /* from & to */
  272|  2.06k|    IGRAPH_SAFE_ADD(no_of_edges, edges_to_add, &new_no_of_edges);
  ------------------
  |  |   47|  2.06k|    do { \
  |  |   48|  2.06k|        igraph_integer_t _safe_a = (a), _safe_b = (b); \
  |  |   49|  2.06k|        igraph_integer_t _safe_sum; \
  |  |   50|  2.06k|        if (__builtin_add_overflow(_safe_a, _safe_b, &_safe_sum)) { \
  |  |  ------------------
  |  |  |  Branch (50:13): [True: 0, False: 2.06k]
  |  |  ------------------
  |  |   51|      0|            IGRAPH_ERRORF("Overflow when adding %" IGRAPH_PRId " and %" IGRAPH_PRId ".", IGRAPH_EOVERFLOW, _safe_a, _safe_b); \
  |  |  ------------------
  |  |  |  |  469|      0|    do { \
  |  |  |  |  470|      0|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  |  |  471|      0|                      igraph_errno, __VA_ARGS__) ; \
  |  |  |  |  472|      0|        return igraph_errno; \
  |  |  |  |  473|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (473:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|        } \
  |  |   53|  2.06k|        *(res) = _safe_sum; \
  |  |   54|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (54:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  273|  2.06k|    if (new_no_of_edges > IGRAPH_ECOUNT_MAX) {
  ------------------
  |  |  121|  2.06k|#define IGRAPH_ECOUNT_MAX (IGRAPH_INTEGER_MAX/2)
  |  |  ------------------
  |  |  |  |   77|  2.06k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  |  |  ------------------
  ------------------
  |  Branch (273:9): [True: 0, False: 2.06k]
  ------------------
  274|      0|        IGRAPH_ERRORF("Maximum edge count (%" IGRAPH_PRId ") exceeded.", IGRAPH_ERANGE,
  ------------------
  |  |  469|      0|    do { \
  |  |  470|      0|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  471|      0|                      igraph_errno, __VA_ARGS__) ; \
  |  |  472|      0|        return igraph_errno; \
  |  |  473|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (473:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  275|      0|                      IGRAPH_ECOUNT_MAX);
  276|      0|    }
  277|  2.06k|    IGRAPH_CHECK(igraph_vector_int_reserve(&graph->from, no_of_edges + edges_to_add));
  ------------------
  |  |  648|  2.06k|    do { \
  |  |  649|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  278|  2.06k|    IGRAPH_CHECK(igraph_vector_int_reserve(&graph->to, no_of_edges + edges_to_add));
  ------------------
  |  |  648|  2.06k|    do { \
  |  |  649|  2.06k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.06k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.06k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  279|       |
  280|  37.7k|    while (i < edges_to_add * 2) {
  ------------------
  |  Branch (280:12): [True: 35.6k, False: 2.06k]
  ------------------
  281|  35.6k|        if (directed || VECTOR(*edges)[i] > VECTOR(*edges)[i + 1]) {
  ------------------
  |  |   65|  17.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      if (directed || VECTOR(*edges)[i] > VECTOR(*edges)[i + 1]) {
  ------------------
  |  |   65|  17.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (281:13): [True: 18.2k, False: 17.3k]
  |  Branch (281:25): [True: 17.1k, False: 281]
  ------------------
  282|  35.3k|            igraph_vector_int_push_back(&graph->from, VECTOR(*edges)[i++]); /* reserved */
  ------------------
  |  |   65|  35.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  283|  35.3k|            igraph_vector_int_push_back(&graph->to,   VECTOR(*edges)[i++]); /* reserved */
  ------------------
  |  |   65|  35.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  284|  35.3k|        } else {
  285|    281|            igraph_vector_int_push_back(&graph->to,   VECTOR(*edges)[i++]); /* reserved */
  ------------------
  |  |   65|    281|#define VECTOR(v) ((v).stor_begin)
  ------------------
  286|    281|            igraph_vector_int_push_back(&graph->from, VECTOR(*edges)[i++]); /* reserved */
  ------------------
  |  |   65|    281|#define VECTOR(v) ((v).stor_begin)
  ------------------
  287|    281|        }
  288|  35.6k|    }
  289|       |
  290|       |    /* If an error occurs while the edges are being added, we make the necessary fixup
  291|       |     * to ensure that the graph is still in a consistent state when this function returns.
  292|       |     * The graph may already be on the finally stack when calling this function. We use
  293|       |     * a separate finally stack level to avoid its destructor from being called on error,
  294|       |     * so that the fixup can succeed.
  295|       |     */
  296|       |
  297|  2.06k|#define CHECK_ERR(expr) \
  298|  2.06k|    do { \
  299|  2.06k|        igraph_error_t err = (expr); \
  300|  2.06k|        if (err != IGRAPH_SUCCESS) { \
  301|  2.06k|            igraph_vector_int_resize(&graph->from, no_of_edges); /* gets smaller, error safe */ \
  302|  2.06k|            igraph_vector_int_resize(&graph->to, no_of_edges);   /* gets smaller, error safe */ \
  303|  2.06k|            IGRAPH_FINALLY_EXIT(); \
  304|  2.06k|            IGRAPH_ERROR("Cannot add edges.", err); \
  305|  2.06k|        } \
  306|  2.06k|    } while (0)
  307|       |
  308|       |    /* oi & ii */
  309|  2.06k|    IGRAPH_FINALLY_ENTER();
  310|  2.06k|    {
  311|  2.06k|        CHECK_ERR(igraph_vector_int_init(&newoi, no_of_edges));
  ------------------
  |  |  298|  2.06k|    do { \
  |  |  299|  2.06k|        igraph_error_t err = (expr); \
  |  |  300|  2.06k|        if (err != IGRAPH_SUCCESS) { \
  |  |  ------------------
  |  |  |  Branch (300:13): [True: 0, False: 2.06k]
  |  |  ------------------
  |  |  301|      0|            igraph_vector_int_resize(&graph->from, no_of_edges); /* gets smaller, error safe */ \
  |  |  302|      0|            igraph_vector_int_resize(&graph->to, no_of_edges);   /* gets smaller, error safe */ \
  |  |  303|      0|            IGRAPH_FINALLY_EXIT(); \
  |  |  304|      0|            IGRAPH_ERROR("Cannot add edges.", err); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  305|      0|        } \
  |  |  306|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (306:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  312|  2.06k|        IGRAPH_FINALLY(igraph_vector_int_destroy, &newoi);
  ------------------
  |  |  591|  2.06k|    do { \
  |  |  592|  2.06k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  2.06k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  2.06k|         * incorrect destructor function with the pointer */ \
  |  |  595|  2.06k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  2.06k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  313|  2.06k|        CHECK_ERR(igraph_vector_int_init(&newii, no_of_edges));
  ------------------
  |  |  298|  2.06k|    do { \
  |  |  299|  2.06k|        igraph_error_t err = (expr); \
  |  |  300|  2.06k|        if (err != IGRAPH_SUCCESS) { \
  |  |  ------------------
  |  |  |  Branch (300:13): [True: 0, False: 2.06k]
  |  |  ------------------
  |  |  301|      0|            igraph_vector_int_resize(&graph->from, no_of_edges); /* gets smaller, error safe */ \
  |  |  302|      0|            igraph_vector_int_resize(&graph->to, no_of_edges);   /* gets smaller, error safe */ \
  |  |  303|      0|            IGRAPH_FINALLY_EXIT(); \
  |  |  304|      0|            IGRAPH_ERROR("Cannot add edges.", err); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  305|      0|        } \
  |  |  306|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (306:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  314|  2.06k|        IGRAPH_FINALLY(igraph_vector_int_destroy, &newii);
  ------------------
  |  |  591|  2.06k|    do { \
  |  |  592|  2.06k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  2.06k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  2.06k|         * incorrect destructor function with the pointer */ \
  |  |  595|  2.06k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  2.06k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  315|  2.06k|        CHECK_ERR(igraph_vector_int_pair_order(&graph->from, &graph->to, &newoi, graph->n));
  ------------------
  |  |  298|  2.06k|    do { \
  |  |  299|  2.06k|        igraph_error_t err = (expr); \
  |  |  300|  2.06k|        if (err != IGRAPH_SUCCESS) { \
  |  |  ------------------
  |  |  |  Branch (300:13): [True: 0, False: 2.06k]
  |  |  ------------------
  |  |  301|      0|            igraph_vector_int_resize(&graph->from, no_of_edges); /* gets smaller, error safe */ \
  |  |  302|      0|            igraph_vector_int_resize(&graph->to, no_of_edges);   /* gets smaller, error safe */ \
  |  |  303|      0|            IGRAPH_FINALLY_EXIT(); \
  |  |  304|      0|            IGRAPH_ERROR("Cannot add edges.", err); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  305|      0|        } \
  |  |  306|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (306:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  316|  2.06k|        CHECK_ERR(igraph_vector_int_pair_order(&graph->to, &graph->from, &newii, graph->n));
  ------------------
  |  |  298|  2.06k|    do { \
  |  |  299|  2.06k|        igraph_error_t err = (expr); \
  |  |  300|  2.06k|        if (err != IGRAPH_SUCCESS) { \
  |  |  ------------------
  |  |  |  Branch (300:13): [True: 0, False: 2.06k]
  |  |  ------------------
  |  |  301|      0|            igraph_vector_int_resize(&graph->from, no_of_edges); /* gets smaller, error safe */ \
  |  |  302|      0|            igraph_vector_int_resize(&graph->to, no_of_edges);   /* gets smaller, error safe */ \
  |  |  303|      0|            IGRAPH_FINALLY_EXIT(); \
  |  |  304|      0|            IGRAPH_ERROR("Cannot add edges.", err); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  305|      0|        } \
  |  |  306|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (306:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  317|       |
  318|       |        /* Attributes */
  319|  2.06k|        if (graph->attr) {
  ------------------
  |  Branch (319:13): [True: 2.06k, False: 0]
  ------------------
  320|       |            /* TODO: Does this keep the attribute table in a consistent state upon failure? */
  321|  2.06k|            CHECK_ERR(igraph_i_attribute_add_edges(graph, edges, attr));
  ------------------
  |  |  298|  2.06k|    do { \
  |  |  299|  2.06k|        igraph_error_t err = (expr); \
  |  |  300|  2.06k|        if (err != IGRAPH_SUCCESS) { \
  |  |  ------------------
  |  |  |  Branch (300:13): [True: 0, False: 2.06k]
  |  |  ------------------
  |  |  301|      0|            igraph_vector_int_resize(&graph->from, no_of_edges); /* gets smaller, error safe */ \
  |  |  302|      0|            igraph_vector_int_resize(&graph->to, no_of_edges);   /* gets smaller, error safe */ \
  |  |  303|      0|            IGRAPH_FINALLY_EXIT(); \
  |  |  304|      0|            IGRAPH_ERROR("Cannot add edges.", err); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  305|      0|        } \
  |  |  306|  2.06k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (306:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  322|  2.06k|        }
  323|       |
  324|       |        /* os & is, its length does not change, error safe */
  325|  2.06k|        igraph_i_create_start_vectors(&graph->os, &graph->from, &newoi, graph->n);
  326|  2.06k|        igraph_i_create_start_vectors(&graph->is, &graph->to, &newii, graph->n);
  327|       |
  328|       |        /* everything went fine */
  329|  2.06k|        igraph_vector_int_destroy(&graph->oi);
  330|  2.06k|        igraph_vector_int_destroy(&graph->ii);
  331|  2.06k|        IGRAPH_FINALLY_CLEAN(2);
  332|       |
  333|  2.06k|        graph->oi = newoi;
  334|  2.06k|        graph->ii = newii;
  335|  2.06k|    }
  336|      0|    IGRAPH_FINALLY_EXIT();
  337|       |
  338|  2.06k|#undef CHECK_ERR
  339|       |
  340|       |    /* modification successful, clear the cached properties of the graph.
  341|       |     *
  342|       |     * Adding one or more edges cannot make a strongly or weakly connected
  343|       |     * graph disconnected, so we keep those flags if they are cached as true.
  344|       |     *
  345|       |     * Adding one or more edges may turn a DAG into a non-DAG or a forest into
  346|       |     * a non-forest, so we can keep those flags only if they are cached as
  347|       |     * false.
  348|       |     *
  349|       |     * Also, adding one or more edges does not change HAS_LOOP, HAS_MULTI and
  350|       |     * HAS_MUTUAL if they were already true.
  351|       |     */
  352|  2.06k|    igraph_i_property_cache_invalidate_conditionally(
  353|  2.06k|        graph,
  354|  2.06k|        /* keep_always = */ 0,
  355|       |        /* keep_when_false = */
  356|  2.06k|        (1 << IGRAPH_PROP_IS_DAG) | (1 << IGRAPH_PROP_IS_FOREST),
  357|       |        /* keep_when_true = */
  358|  2.06k|        (1 << IGRAPH_PROP_IS_WEAKLY_CONNECTED) |
  359|  2.06k|        (1 << IGRAPH_PROP_IS_STRONGLY_CONNECTED) |
  360|  2.06k|        (1 << IGRAPH_PROP_HAS_LOOP) |
  361|  2.06k|        (1 << IGRAPH_PROP_HAS_MULTI) |
  362|  2.06k|        (1 << IGRAPH_PROP_HAS_MUTUAL)
  363|  2.06k|    );
  364|       |
  365|  2.06k|    return IGRAPH_SUCCESS;
  366|  2.06k|}
igraph_add_vertices:
  390|  2.77k|) {
  391|  2.77k|    igraph_integer_t ec = igraph_ecount(graph);
  392|  2.77k|    igraph_integer_t vc = igraph_vcount(graph);
  393|  2.77k|    igraph_integer_t new_vc;
  394|  2.77k|    igraph_integer_t i;
  395|       |
  396|  2.77k|    if (nv < 0) {
  ------------------
  |  Branch (396:9): [True: 0, False: 2.77k]
  ------------------
  397|      0|        IGRAPH_ERROR("Cannot add negative number of vertices.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  398|      0|    }
  399|       |
  400|  2.77k|    IGRAPH_SAFE_ADD(graph->n, nv, &new_vc);
  ------------------
  |  |   47|  2.77k|    do { \
  |  |   48|  2.77k|        igraph_integer_t _safe_a = (a), _safe_b = (b); \
  |  |   49|  2.77k|        igraph_integer_t _safe_sum; \
  |  |   50|  2.77k|        if (__builtin_add_overflow(_safe_a, _safe_b, &_safe_sum)) { \
  |  |  ------------------
  |  |  |  Branch (50:13): [True: 0, False: 2.77k]
  |  |  ------------------
  |  |   51|      0|            IGRAPH_ERRORF("Overflow when adding %" IGRAPH_PRId " and %" IGRAPH_PRId ".", IGRAPH_EOVERFLOW, _safe_a, _safe_b); \
  |  |  ------------------
  |  |  |  |  469|      0|    do { \
  |  |  |  |  470|      0|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  |  |  471|      0|                      igraph_errno, __VA_ARGS__) ; \
  |  |  |  |  472|      0|        return igraph_errno; \
  |  |  |  |  473|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (473:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|        } \
  |  |   53|  2.77k|        *(res) = _safe_sum; \
  |  |   54|  2.77k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (54:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  401|  2.77k|    if (new_vc > IGRAPH_VCOUNT_MAX) {
  ------------------
  |  |  105|  2.77k|#define IGRAPH_VCOUNT_MAX (IGRAPH_INTEGER_MAX-1)
  |  |  ------------------
  |  |  |  |   77|  2.77k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  |  |  ------------------
  ------------------
  |  Branch (401:9): [True: 0, False: 2.77k]
  ------------------
  402|      0|        IGRAPH_ERRORF("Maximum vertex count (%" IGRAPH_PRId ") exceeded.", IGRAPH_ERANGE,
  ------------------
  |  |  469|      0|    do { \
  |  |  470|      0|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  471|      0|                      igraph_errno, __VA_ARGS__) ; \
  |  |  472|      0|        return igraph_errno; \
  |  |  473|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (473:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  403|      0|                      IGRAPH_VCOUNT_MAX);
  404|      0|    }
  405|  2.77k|    IGRAPH_CHECK(igraph_vector_int_reserve(&graph->os, new_vc + 1));
  ------------------
  |  |  648|  2.77k|    do { \
  |  |  649|  2.77k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.77k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.77k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.77k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.77k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  406|  2.77k|    IGRAPH_CHECK(igraph_vector_int_reserve(&graph->is, new_vc + 1));
  ------------------
  |  |  648|  2.77k|    do { \
  |  |  649|  2.77k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  2.77k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  2.77k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.77k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  2.77k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  407|       |
  408|  2.77k|    igraph_vector_int_resize(&graph->os, new_vc + 1); /* reserved */
  409|  2.77k|    igraph_vector_int_resize(&graph->is, new_vc + 1); /* reserved */
  410|   103k|    for (i = graph->n + 1; i < new_vc + 1; i++) {
  ------------------
  |  Branch (410:28): [True: 100k, False: 2.77k]
  ------------------
  411|   100k|        VECTOR(graph->os)[i] = ec;
  ------------------
  |  |   65|   100k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  412|   100k|        VECTOR(graph->is)[i] = ec;
  ------------------
  |  |   65|   100k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  413|   100k|    }
  414|       |
  415|  2.77k|    graph->n += nv;
  416|       |
  417|       |    /* Add attributes if necessary. This section is protected with
  418|       |     * FINALLY_ENTER/EXIT so that the graph would not be accidentally
  419|       |     * free upon error until it could be restored to a consistant state. */
  420|       |
  421|  2.77k|    if (graph->attr) {
  ------------------
  |  Branch (421:9): [True: 2.77k, False: 0]
  ------------------
  422|  2.77k|        igraph_error_t err;
  423|  2.77k|        IGRAPH_FINALLY_ENTER();
  424|  2.77k|        err = igraph_i_attribute_add_vertices(graph, nv, attr);
  425|  2.77k|        if (err != IGRAPH_SUCCESS) {
  ------------------
  |  Branch (425:13): [True: 0, False: 2.77k]
  ------------------
  426|       |            /* Restore original vertex count on failure */
  427|      0|            graph->n = vc;
  428|      0|            igraph_vector_int_resize(&graph->os, vc + 1); /* shrinks */
  429|      0|            igraph_vector_int_resize(&graph->is, vc + 1); /* shrinks */
  430|      0|        }
  431|  2.77k|        IGRAPH_FINALLY_EXIT();
  432|  2.77k|        if (err != IGRAPH_SUCCESS) {
  ------------------
  |  Branch (432:13): [True: 0, False: 2.77k]
  ------------------
  433|      0|            IGRAPH_ERROR("Cannot add vertices.", err);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  434|      0|        }
  435|  2.77k|    }
  436|       |
  437|       |    /* modification successful, clear the cached properties of the graph.
  438|       |     *
  439|       |     * Adding one or more nodes does not change the following cached properties:
  440|       |     *
  441|       |     * - IGRAPH_PROP_HAS_LOOP
  442|       |     * - IGRAPH_PROP_HAS_MULTI
  443|       |     * - IGRAPH_PROP_HAS_MUTUAL
  444|       |     * - IGRAPH_PROP_IS_DAG (adding a node does not create/destroy cycles)
  445|       |     * - IGRAPH_PROP_IS_FOREST (same)
  446|       |     *
  447|       |     * Adding one or more nodes without any edges incident on them is sure to
  448|       |     * make the graph disconnected (weakly or strongly), so we can keep the
  449|       |     * connectivity-related properties if they are currently cached as false.
  450|       |     * (Actually, even if they weren't cached as false, we could still set them
  451|       |     * to false, but we don't have that functionality yet). The only exception
  452|       |     * is when the graph had zero vertices and gained only one vertex, because
  453|       |     * it then becomes connected. That's why we have the condition below in the
  454|       |     * keep_when_false section.
  455|       |     */
  456|  2.77k|    igraph_i_property_cache_invalidate_conditionally(
  457|  2.77k|        graph,
  458|       |        /* keep_always = */
  459|  2.77k|        (1 << IGRAPH_PROP_HAS_LOOP) |
  460|  2.77k|        (1 << IGRAPH_PROP_HAS_MULTI) |
  461|  2.77k|        (1 << IGRAPH_PROP_HAS_MUTUAL) |
  462|  2.77k|        (1 << IGRAPH_PROP_IS_DAG) |
  463|  2.77k|        (1 << IGRAPH_PROP_IS_FOREST),
  464|       |        /* keep_when_false = */
  465|  2.77k|        igraph_vcount(graph) >= 2 ? (
  ------------------
  |  Branch (465:9): [True: 2.56k, False: 216]
  ------------------
  466|  2.56k|            (1 << IGRAPH_PROP_IS_STRONGLY_CONNECTED) |
  467|  2.56k|            (1 << IGRAPH_PROP_IS_WEAKLY_CONNECTED)
  468|  2.56k|        ) : 0,
  469|       |        /* keep_when_true = */
  470|  2.77k|        0
  471|  2.77k|    );
  472|       |
  473|  2.77k|    return IGRAPH_SUCCESS;
  474|  2.77k|}
igraph_vcount:
  828|   893k|igraph_integer_t igraph_vcount(const igraph_t *graph) {
  829|   893k|    return graph->n;
  830|   893k|}
igraph_ecount:
  842|  24.4k|igraph_integer_t igraph_ecount(const igraph_t *graph) {
  843|  24.4k|    return igraph_vector_int_size(&graph->from);
  844|  24.4k|}
igraph_neighbors:
  880|  31.8k|        igraph_neimode_t mode) {
  881|  31.8k|    if (!igraph_is_directed(graph) || mode == IGRAPH_ALL) {
  ------------------
  |  Branch (881:9): [True: 0, False: 31.8k]
  |  Branch (881:39): [True: 0, False: 31.8k]
  ------------------
  882|      0|        return igraph_i_neighbors(graph, neis, pnode, mode, IGRAPH_LOOPS_TWICE, IGRAPH_MULTIPLE);
  883|  31.8k|    } else {
  884|  31.8k|        return igraph_i_neighbors(graph, neis, pnode, mode, IGRAPH_LOOPS_ONCE, IGRAPH_MULTIPLE);
  885|  31.8k|    }
  886|  31.8k|}
igraph_i_neighbors:
  889|  31.8k|        igraph_neimode_t mode, igraph_loops_t loops, igraph_multiple_t multiple) {
  890|  31.8k|#define DEDUPLICATE_IF_NEEDED(vertex, n)                                                 \
  891|  31.8k|    if (should_filter_duplicates) {                                                        \
  892|  31.8k|        if (                                                                               \
  893|  31.8k|            (loops == IGRAPH_NO_LOOPS && vertex == pnode) ||                               \
  894|  31.8k|            (loops == IGRAPH_LOOPS_ONCE && vertex == pnode && last_added == pnode)         \
  895|  31.8k|        ) {                                                                                \
  896|  31.8k|            length -= n;                                                                   \
  897|  31.8k|            if (loops == IGRAPH_LOOPS_ONCE) {                                              \
  898|  31.8k|                last_added = -1;                                                           \
  899|  31.8k|            }                                                                              \
  900|  31.8k|            continue;                                                                      \
  901|  31.8k|        } else if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {               \
  902|  31.8k|            length -= n;                                                                   \
  903|  31.8k|            continue;                                                                      \
  904|  31.8k|        } else {                                                                           \
  905|  31.8k|            last_added = vertex;                                                           \
  906|  31.8k|        }                                                                                  \
  907|  31.8k|    }
  908|       |
  909|  31.8k|    igraph_integer_t length = 0, idx = 0;
  910|  31.8k|    igraph_integer_t i, j;
  911|       |
  912|  31.8k|    igraph_integer_t node = pnode;
  913|  31.8k|    igraph_integer_t last_added = -1;
  914|  31.8k|    igraph_bool_t should_filter_duplicates;
  915|       |
  916|  31.8k|    if (node < 0 || node > igraph_vcount(graph) - 1) {
  ------------------
  |  Branch (916:9): [True: 0, False: 31.8k]
  |  Branch (916:21): [True: 0, False: 31.8k]
  ------------------
  917|      0|        IGRAPH_ERROR("Given vertex is not in the graph.", IGRAPH_EINVVID);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  918|      0|    }
  919|  31.8k|    if (mode != IGRAPH_OUT && mode != IGRAPH_IN &&
  ------------------
  |  Branch (919:9): [True: 0, False: 31.8k]
  |  Branch (919:31): [True: 0, False: 0]
  ------------------
  920|  31.8k|            mode != IGRAPH_ALL) {
  ------------------
  |  Branch (920:13): [True: 0, False: 0]
  ------------------
  921|      0|        IGRAPH_ERROR("Mode should be either IGRAPH_OUT, IGRAPH_IN or IGRAPH_ALL.", IGRAPH_EINVMODE);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  922|      0|    }
  923|       |
  924|  31.8k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (924:9): [True: 0, False: 31.8k]
  ------------------
  925|      0|        mode = IGRAPH_ALL;
  926|      0|    }
  927|       |
  928|  31.8k|    if (mode != IGRAPH_ALL && loops == IGRAPH_LOOPS_TWICE) {
  ------------------
  |  Branch (928:9): [True: 31.8k, False: 0]
  |  Branch (928:31): [True: 0, False: 31.8k]
  ------------------
  929|      0|        IGRAPH_ERROR("For a directed graph (with directions not ignored), "
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  930|      0|                     "IGRAPH_LOOPS_TWICE does not make sense.", IGRAPH_EINVAL);
  931|      0|    }
  932|       |    /* Calculate needed space first & allocate it */
  933|       |    /* Note that 'mode' is treated as a bit field here; it's okay because
  934|       |     * IGRAPH_ALL = IGRAPH_IN | IGRAPH_OUT, bit-wise */
  935|  31.8k|    if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (935:9): [True: 31.8k, False: 0]
  ------------------
  936|  31.8k|        length += (VECTOR(graph->os)[node + 1] - VECTOR(graph->os)[node]);
  ------------------
  |  |   65|  31.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      length += (VECTOR(graph->os)[node + 1] - VECTOR(graph->os)[node]);
  ------------------
  |  |   65|  31.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  937|  31.8k|    }
  938|  31.8k|    if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (938:9): [True: 0, False: 31.8k]
  ------------------
  939|      0|        length += (VECTOR(graph->is)[node + 1] - VECTOR(graph->is)[node]);
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      length += (VECTOR(graph->is)[node + 1] - VECTOR(graph->is)[node]);
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  940|      0|    }
  941|       |
  942|  31.8k|    IGRAPH_CHECK(igraph_vector_int_resize(neis, length));
  ------------------
  |  |  648|  31.8k|    do { \
  |  |  649|  31.8k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  31.8k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  31.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 31.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  31.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  943|       |
  944|       |    /* The loops below produce an ordering what is consistent with the
  945|       |     * ordering returned by igraph_neighbors(), and this should be preserved.
  946|       |     * We are dealing with two sorted lists; one for the successors and one
  947|       |     * for the predecessors. If we have requested only one of them, we have
  948|       |     * an easy job. If we have requested both, we need to merge the two lists
  949|       |     * to ensure that the output is sorted by the vertex IDs of the "other"
  950|       |     * endpoint of the affected edges. We don't need to merge if the graph
  951|       |     * is undirected, because in that case the data structure guarantees that
  952|       |     * the "out-edges" contain only (u, v) pairs where u <= v and the
  953|       |     * "in-edges" contains the rest, so the result is sorted even without
  954|       |     * merging. */
  955|  31.8k|    if (!igraph_is_directed(graph) || mode != IGRAPH_ALL) {
  ------------------
  |  Branch (955:9): [True: 0, False: 31.8k]
  |  Branch (955:39): [True: 31.8k, False: 0]
  ------------------
  956|       |        /* graph is undirected or we did not ask for both directions in a
  957|       |         * directed graph; this is the easy case */
  958|       |
  959|  31.8k|        should_filter_duplicates = !(multiple == IGRAPH_MULTIPLE &&
  ------------------
  |  Branch (959:38): [True: 31.8k, False: 0]
  ------------------
  960|  31.8k|                ((!igraph_is_directed(graph) && loops == IGRAPH_LOOPS_TWICE) ||
  ------------------
  |  Branch (960:19): [True: 0, False: 31.8k]
  |  Branch (960:49): [True: 0, False: 0]
  ------------------
  961|  31.8k|                 (igraph_is_directed(graph) && loops != IGRAPH_NO_LOOPS)));
  ------------------
  |  Branch (961:19): [True: 31.8k, False: 0]
  |  Branch (961:48): [True: 31.8k, False: 0]
  ------------------
  962|       |
  963|  31.8k|        if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (963:13): [True: 31.8k, False: 0]
  ------------------
  964|  31.8k|            j = VECTOR(graph->os)[node + 1];
  ------------------
  |  |   65|  31.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  965|  50.0k|            for (i = VECTOR(graph->os)[node]; i < j; i++) {
  ------------------
  |  |   65|  31.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (965:47): [True: 18.2k, False: 31.8k]
  ------------------
  966|  18.2k|                igraph_integer_t to = VECTOR(graph->to)[ VECTOR(graph->oi)[i] ];
  ------------------
  |  |   65|  18.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              igraph_integer_t to = VECTOR(graph->to)[ VECTOR(graph->oi)[i] ];
  ------------------
  |  |   65|  18.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  967|  18.2k|                DEDUPLICATE_IF_NEEDED(to, 1);
  ------------------
  |  |  891|  18.2k|    if (should_filter_duplicates) {                                                        \
  |  |  ------------------
  |  |  |  Branch (891:9): [True: 0, False: 18.2k]
  |  |  ------------------
  |  |  892|      0|        if (                                                                               \
  |  |  893|      0|            (loops == IGRAPH_NO_LOOPS && vertex == pnode) ||                               \
  |  |  ------------------
  |  |  |  Branch (893:14): [True: 0, False: 0]
  |  |  |  Branch (893:42): [True: 0, False: 0]
  |  |  ------------------
  |  |  894|      0|            (loops == IGRAPH_LOOPS_ONCE && vertex == pnode && last_added == pnode)         \
  |  |  ------------------
  |  |  |  Branch (894:14): [True: 0, False: 0]
  |  |  |  Branch (894:44): [True: 0, False: 0]
  |  |  |  Branch (894:63): [True: 0, False: 0]
  |  |  ------------------
  |  |  895|      0|        ) {                                                                                \
  |  |  896|      0|            length -= n;                                                                   \
  |  |  897|      0|            if (loops == IGRAPH_LOOPS_ONCE) {                                              \
  |  |  ------------------
  |  |  |  Branch (897:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  898|      0|                last_added = -1;                                                           \
  |  |  899|      0|            }                                                                              \
  |  |  900|      0|            continue;                                                                      \
  |  |  901|      0|        } else if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {               \
  |  |  ------------------
  |  |  |  Branch (901:20): [True: 0, False: 0]
  |  |  |  Branch (901:54): [True: 0, False: 0]
  |  |  ------------------
  |  |  902|      0|            length -= n;                                                                   \
  |  |  903|      0|            continue;                                                                      \
  |  |  904|      0|        } else {                                                                           \
  |  |  905|      0|            last_added = vertex;                                                           \
  |  |  906|      0|        }                                                                                  \
  |  |  907|      0|    }
  ------------------
  968|  18.2k|                VECTOR(*neis)[idx++] = to;
  ------------------
  |  |   65|  18.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  969|  18.2k|            }
  970|  31.8k|        }
  971|       |
  972|  31.8k|        if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (972:13): [True: 0, False: 31.8k]
  ------------------
  973|      0|            j = VECTOR(graph->is)[node + 1];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  974|      0|            for (i = VECTOR(graph->is)[node]; i < j; i++) {
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (974:47): [True: 0, False: 0]
  ------------------
  975|      0|                igraph_integer_t from = VECTOR(graph->from)[ VECTOR(graph->ii)[i] ];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              igraph_integer_t from = VECTOR(graph->from)[ VECTOR(graph->ii)[i] ];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  976|      0|                DEDUPLICATE_IF_NEEDED(from, 1);
  ------------------
  |  |  891|      0|    if (should_filter_duplicates) {                                                        \
  |  |  ------------------
  |  |  |  Branch (891:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  892|      0|        if (                                                                               \
  |  |  893|      0|            (loops == IGRAPH_NO_LOOPS && vertex == pnode) ||                               \
  |  |  ------------------
  |  |  |  Branch (893:14): [True: 0, False: 0]
  |  |  |  Branch (893:42): [True: 0, False: 0]
  |  |  ------------------
  |  |  894|      0|            (loops == IGRAPH_LOOPS_ONCE && vertex == pnode && last_added == pnode)         \
  |  |  ------------------
  |  |  |  Branch (894:14): [True: 0, False: 0]
  |  |  |  Branch (894:44): [True: 0, False: 0]
  |  |  |  Branch (894:63): [True: 0, False: 0]
  |  |  ------------------
  |  |  895|      0|        ) {                                                                                \
  |  |  896|      0|            length -= n;                                                                   \
  |  |  897|      0|            if (loops == IGRAPH_LOOPS_ONCE) {                                              \
  |  |  ------------------
  |  |  |  Branch (897:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  898|      0|                last_added = -1;                                                           \
  |  |  899|      0|            }                                                                              \
  |  |  900|      0|            continue;                                                                      \
  |  |  901|      0|        } else if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {               \
  |  |  ------------------
  |  |  |  Branch (901:20): [True: 0, False: 0]
  |  |  |  Branch (901:54): [True: 0, False: 0]
  |  |  ------------------
  |  |  902|      0|            length -= n;                                                                   \
  |  |  903|      0|            continue;                                                                      \
  |  |  904|      0|        } else {                                                                           \
  |  |  905|      0|            last_added = vertex;                                                           \
  |  |  906|      0|        }                                                                                  \
  |  |  907|      0|    }
  ------------------
  977|      0|                VECTOR(*neis)[idx++] = from;
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  978|      0|            }
  979|      0|        }
  980|  31.8k|    } else {
  981|       |        /* Both in- and out- neighbors in a directed graph,
  982|       |           we need to merge the two 'vectors' so the result is
  983|       |           correctly ordered. */
  984|      0|        igraph_integer_t j1 = VECTOR(graph->os)[node + 1];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  985|      0|        igraph_integer_t j2 = VECTOR(graph->is)[node + 1];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  986|      0|        igraph_integer_t i1 = VECTOR(graph->os)[node];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  987|      0|        igraph_integer_t i2 = VECTOR(graph->is)[node];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  988|      0|        igraph_integer_t eid1, eid2;
  989|      0|        igraph_integer_t n1, n2;
  990|       |
  991|      0|        should_filter_duplicates = !(multiple == IGRAPH_MULTIPLE &&
  ------------------
  |  Branch (991:38): [True: 0, False: 0]
  ------------------
  992|      0|                loops == IGRAPH_LOOPS_TWICE);
  ------------------
  |  Branch (992:17): [True: 0, False: 0]
  ------------------
  993|       |
  994|      0|        while (i1 < j1 && i2 < j2) {
  ------------------
  |  Branch (994:16): [True: 0, False: 0]
  |  Branch (994:27): [True: 0, False: 0]
  ------------------
  995|      0|            eid1 = VECTOR(graph->oi)[i1];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  996|      0|            eid2 = VECTOR(graph->ii)[i2];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  997|      0|            n1 = VECTOR(graph->to)[eid1];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  998|      0|            n2 = VECTOR(graph->from)[eid2];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  999|      0|            if (n1 < n2) {
  ------------------
  |  Branch (999:17): [True: 0, False: 0]
  ------------------
 1000|      0|                i1++;
 1001|      0|                DEDUPLICATE_IF_NEEDED(n1, 1);
  ------------------
  |  |  891|      0|    if (should_filter_duplicates) {                                                        \
  |  |  ------------------
  |  |  |  Branch (891:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  892|      0|        if (                                                                               \
  |  |  893|      0|            (loops == IGRAPH_NO_LOOPS && vertex == pnode) ||                               \
  |  |  ------------------
  |  |  |  Branch (893:14): [True: 0, False: 0]
  |  |  |  Branch (893:42): [True: 0, False: 0]
  |  |  ------------------
  |  |  894|      0|            (loops == IGRAPH_LOOPS_ONCE && vertex == pnode && last_added == pnode)         \
  |  |  ------------------
  |  |  |  Branch (894:14): [True: 0, False: 0]
  |  |  |  Branch (894:44): [True: 0, False: 0]
  |  |  |  Branch (894:63): [True: 0, False: 0]
  |  |  ------------------
  |  |  895|      0|        ) {                                                                                \
  |  |  896|      0|            length -= n;                                                                   \
  |  |  897|      0|            if (loops == IGRAPH_LOOPS_ONCE) {                                              \
  |  |  ------------------
  |  |  |  Branch (897:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  898|      0|                last_added = -1;                                                           \
  |  |  899|      0|            }                                                                              \
  |  |  900|      0|            continue;                                                                      \
  |  |  901|      0|        } else if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {               \
  |  |  ------------------
  |  |  |  Branch (901:20): [True: 0, False: 0]
  |  |  |  Branch (901:54): [True: 0, False: 0]
  |  |  ------------------
  |  |  902|      0|            length -= n;                                                                   \
  |  |  903|      0|            continue;                                                                      \
  |  |  904|      0|        } else {                                                                           \
  |  |  905|      0|            last_added = vertex;                                                           \
  |  |  906|      0|        }                                                                                  \
  |  |  907|      0|    }
  ------------------
 1002|      0|                VECTOR(*neis)[idx++] = n1;
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1003|      0|            } else if (n1 > n2) {
  ------------------
  |  Branch (1003:24): [True: 0, False: 0]
  ------------------
 1004|      0|                i2++;
 1005|      0|                DEDUPLICATE_IF_NEEDED(n2, 1);
  ------------------
  |  |  891|      0|    if (should_filter_duplicates) {                                                        \
  |  |  ------------------
  |  |  |  Branch (891:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  892|      0|        if (                                                                               \
  |  |  893|      0|            (loops == IGRAPH_NO_LOOPS && vertex == pnode) ||                               \
  |  |  ------------------
  |  |  |  Branch (893:14): [True: 0, False: 0]
  |  |  |  Branch (893:42): [True: 0, False: 0]
  |  |  ------------------
  |  |  894|      0|            (loops == IGRAPH_LOOPS_ONCE && vertex == pnode && last_added == pnode)         \
  |  |  ------------------
  |  |  |  Branch (894:14): [True: 0, False: 0]
  |  |  |  Branch (894:44): [True: 0, False: 0]
  |  |  |  Branch (894:63): [True: 0, False: 0]
  |  |  ------------------
  |  |  895|      0|        ) {                                                                                \
  |  |  896|      0|            length -= n;                                                                   \
  |  |  897|      0|            if (loops == IGRAPH_LOOPS_ONCE) {                                              \
  |  |  ------------------
  |  |  |  Branch (897:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  898|      0|                last_added = -1;                                                           \
  |  |  899|      0|            }                                                                              \
  |  |  900|      0|            continue;                                                                      \
  |  |  901|      0|        } else if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {               \
  |  |  ------------------
  |  |  |  Branch (901:20): [True: 0, False: 0]
  |  |  |  Branch (901:54): [True: 0, False: 0]
  |  |  ------------------
  |  |  902|      0|            length -= n;                                                                   \
  |  |  903|      0|            continue;                                                                      \
  |  |  904|      0|        } else {                                                                           \
  |  |  905|      0|            last_added = vertex;                                                           \
  |  |  906|      0|        }                                                                                  \
  |  |  907|      0|    }
  ------------------
 1006|      0|                VECTOR(*neis)[idx++] = n2;
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1007|      0|            } else {
 1008|      0|                i1++;
 1009|      0|                i2++;
 1010|      0|                DEDUPLICATE_IF_NEEDED(n1, 2);
  ------------------
  |  |  891|      0|    if (should_filter_duplicates) {                                                        \
  |  |  ------------------
  |  |  |  Branch (891:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  892|      0|        if (                                                                               \
  |  |  893|      0|            (loops == IGRAPH_NO_LOOPS && vertex == pnode) ||                               \
  |  |  ------------------
  |  |  |  Branch (893:14): [True: 0, False: 0]
  |  |  |  Branch (893:42): [True: 0, False: 0]
  |  |  ------------------
  |  |  894|      0|            (loops == IGRAPH_LOOPS_ONCE && vertex == pnode && last_added == pnode)         \
  |  |  ------------------
  |  |  |  Branch (894:14): [True: 0, False: 0]
  |  |  |  Branch (894:44): [True: 0, False: 0]
  |  |  |  Branch (894:63): [True: 0, False: 0]
  |  |  ------------------
  |  |  895|      0|        ) {                                                                                \
  |  |  896|      0|            length -= n;                                                                   \
  |  |  897|      0|            if (loops == IGRAPH_LOOPS_ONCE) {                                              \
  |  |  ------------------
  |  |  |  Branch (897:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  898|      0|                last_added = -1;                                                           \
  |  |  899|      0|            }                                                                              \
  |  |  900|      0|            continue;                                                                      \
  |  |  901|      0|        } else if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {               \
  |  |  ------------------
  |  |  |  Branch (901:20): [True: 0, False: 0]
  |  |  |  Branch (901:54): [True: 0, False: 0]
  |  |  ------------------
  |  |  902|      0|            length -= n;                                                                   \
  |  |  903|      0|            continue;                                                                      \
  |  |  904|      0|        } else {                                                                           \
  |  |  905|      0|            last_added = vertex;                                                           \
  |  |  906|      0|        }                                                                                  \
  |  |  907|      0|    }
  ------------------
 1011|      0|                VECTOR(*neis)[idx++] = n1;
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1012|      0|                if (should_filter_duplicates && ((loops == IGRAPH_LOOPS_ONCE && n1 == pnode && last_added == pnode) ||
  ------------------
  |  Branch (1012:21): [True: 0, False: 0]
  |  Branch (1012:51): [True: 0, False: 0]
  |  Branch (1012:81): [True: 0, False: 0]
  |  Branch (1012:96): [True: 0, False: 0]
  ------------------
 1013|      0|                        (multiple == IGRAPH_NO_MULTIPLE))) {
  ------------------
  |  Branch (1013:25): [True: 0, False: 0]
  ------------------
 1014|      0|                    length--;
 1015|      0|                    if (loops == IGRAPH_LOOPS_ONCE) {
  ------------------
  |  Branch (1015:25): [True: 0, False: 0]
  ------------------
 1016|      0|                        last_added = -1;
 1017|      0|                    }
 1018|      0|                    continue;
 1019|      0|                }
 1020|      0|                VECTOR(*neis)[idx++] = n2;
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1021|      0|            }
 1022|      0|        }
 1023|       |
 1024|      0|        while (i1 < j1) {
  ------------------
  |  Branch (1024:16): [True: 0, False: 0]
  ------------------
 1025|      0|            eid1 = VECTOR(graph->oi)[i1++];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1026|      0|            igraph_integer_t to = VECTOR(graph->to)[eid1];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1027|      0|            DEDUPLICATE_IF_NEEDED(to, 1);
  ------------------
  |  |  891|      0|    if (should_filter_duplicates) {                                                        \
  |  |  ------------------
  |  |  |  Branch (891:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  892|      0|        if (                                                                               \
  |  |  893|      0|            (loops == IGRAPH_NO_LOOPS && vertex == pnode) ||                               \
  |  |  ------------------
  |  |  |  Branch (893:14): [True: 0, False: 0]
  |  |  |  Branch (893:42): [True: 0, False: 0]
  |  |  ------------------
  |  |  894|      0|            (loops == IGRAPH_LOOPS_ONCE && vertex == pnode && last_added == pnode)         \
  |  |  ------------------
  |  |  |  Branch (894:14): [True: 0, False: 0]
  |  |  |  Branch (894:44): [True: 0, False: 0]
  |  |  |  Branch (894:63): [True: 0, False: 0]
  |  |  ------------------
  |  |  895|      0|        ) {                                                                                \
  |  |  896|      0|            length -= n;                                                                   \
  |  |  897|      0|            if (loops == IGRAPH_LOOPS_ONCE) {                                              \
  |  |  ------------------
  |  |  |  Branch (897:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  898|      0|                last_added = -1;                                                           \
  |  |  899|      0|            }                                                                              \
  |  |  900|      0|            continue;                                                                      \
  |  |  901|      0|        } else if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {               \
  |  |  ------------------
  |  |  |  Branch (901:20): [True: 0, False: 0]
  |  |  |  Branch (901:54): [True: 0, False: 0]
  |  |  ------------------
  |  |  902|      0|            length -= n;                                                                   \
  |  |  903|      0|            continue;                                                                      \
  |  |  904|      0|        } else {                                                                           \
  |  |  905|      0|            last_added = vertex;                                                           \
  |  |  906|      0|        }                                                                                  \
  |  |  907|      0|    }
  ------------------
 1028|      0|            VECTOR(*neis)[idx++] = to;
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1029|      0|        }
 1030|       |
 1031|      0|        while (i2 < j2) {
  ------------------
  |  Branch (1031:16): [True: 0, False: 0]
  ------------------
 1032|      0|            eid2 = VECTOR(graph->ii)[i2++];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1033|      0|            igraph_integer_t from = VECTOR(graph->from)[eid2];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1034|      0|            DEDUPLICATE_IF_NEEDED(from, 1);
  ------------------
  |  |  891|      0|    if (should_filter_duplicates) {                                                        \
  |  |  ------------------
  |  |  |  Branch (891:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  892|      0|        if (                                                                               \
  |  |  893|      0|            (loops == IGRAPH_NO_LOOPS && vertex == pnode) ||                               \
  |  |  ------------------
  |  |  |  Branch (893:14): [True: 0, False: 0]
  |  |  |  Branch (893:42): [True: 0, False: 0]
  |  |  ------------------
  |  |  894|      0|            (loops == IGRAPH_LOOPS_ONCE && vertex == pnode && last_added == pnode)         \
  |  |  ------------------
  |  |  |  Branch (894:14): [True: 0, False: 0]
  |  |  |  Branch (894:44): [True: 0, False: 0]
  |  |  |  Branch (894:63): [True: 0, False: 0]
  |  |  ------------------
  |  |  895|      0|        ) {                                                                                \
  |  |  896|      0|            length -= n;                                                                   \
  |  |  897|      0|            if (loops == IGRAPH_LOOPS_ONCE) {                                              \
  |  |  ------------------
  |  |  |  Branch (897:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  898|      0|                last_added = -1;                                                           \
  |  |  899|      0|            }                                                                              \
  |  |  900|      0|            continue;                                                                      \
  |  |  901|      0|        } else if (multiple == IGRAPH_NO_MULTIPLE && vertex == last_added) {               \
  |  |  ------------------
  |  |  |  Branch (901:20): [True: 0, False: 0]
  |  |  |  Branch (901:54): [True: 0, False: 0]
  |  |  ------------------
  |  |  902|      0|            length -= n;                                                                   \
  |  |  903|      0|            continue;                                                                      \
  |  |  904|      0|        } else {                                                                           \
  |  |  905|      0|            last_added = vertex;                                                           \
  |  |  906|      0|        }                                                                                  \
  |  |  907|      0|    }
  ------------------
 1035|      0|            VECTOR(*neis)[idx++] = from;
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1036|      0|        }
 1037|       |
 1038|      0|    }
 1039|  31.8k|    IGRAPH_CHECK(igraph_vector_int_resize(neis, length));
  ------------------
  |  |  648|  31.8k|    do { \
  |  |  649|  31.8k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  31.8k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  31.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 31.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  31.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1040|       |
 1041|  31.8k|    return IGRAPH_SUCCESS;
 1042|  31.8k|#undef DEDUPLICATE_IF_NEEDED
 1043|  31.8k|}
igraph_is_directed:
 1108|  1.62M|igraph_bool_t igraph_is_directed(const igraph_t *graph) {
 1109|  1.62M|    return graph->directed;
 1110|  1.62M|}
igraph_degree:
 1218|  5.72k|                  igraph_neimode_t mode, igraph_bool_t loops) {
 1219|       |
 1220|  5.72k|    igraph_integer_t nodes_to_calc;
 1221|  5.72k|    igraph_integer_t i, j;
 1222|  5.72k|    igraph_vit_t vit;
 1223|       |
 1224|  5.72k|    IGRAPH_CHECK(igraph_vit_create(graph, vids, &vit));
  ------------------
  |  |  648|  5.72k|    do { \
  |  |  649|  5.72k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  5.72k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  5.72k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 5.72k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  5.72k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1225|  5.72k|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  591|  5.72k|    do { \
  |  |  592|  5.72k|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|  5.72k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|  5.72k|         * incorrect destructor function with the pointer */ \
  |  |  595|  5.72k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|  5.72k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|  5.72k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1226|       |
 1227|  5.72k|    if (mode != IGRAPH_OUT && mode != IGRAPH_IN && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (1227:9): [True: 2.19k, False: 3.53k]
  |  Branch (1227:31): [True: 2.19k, False: 0]
  |  Branch (1227:52): [True: 0, False: 2.19k]
  ------------------
 1228|      0|        IGRAPH_ERROR("Invalid mode for degree calculation.", IGRAPH_EINVMODE);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1229|      0|    }
 1230|       |
 1231|  5.72k|    if (! loops) {
  ------------------
  |  Branch (1231:9): [True: 0, False: 5.72k]
  ------------------
 1232|       |        /* If the graph is known not to have loops, we can use the faster
 1233|       |         * loops == true code path, which has O(1) complexity instead of of O(d). */
 1234|      0|        if (igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_LOOP) &&
  ------------------
  |  Branch (1234:13): [True: 0, False: 0]
  ------------------
 1235|      0|            !igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_HAS_LOOP)) {
  ------------------
  |  Branch (1235:13): [True: 0, False: 0]
  ------------------
 1236|      0|            loops = true;
 1237|      0|        }
 1238|      0|    }
 1239|       |
 1240|  5.72k|    nodes_to_calc = IGRAPH_VIT_SIZE(vit);
  ------------------
  |  |  191|  5.72k|#define IGRAPH_VIT_SIZE(vit)  ((vit).end - (vit).start)
  ------------------
 1241|  5.72k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (1241:9): [True: 1.46k, False: 4.26k]
  ------------------
 1242|  1.46k|        mode = IGRAPH_ALL;
 1243|  1.46k|    }
 1244|       |
 1245|  5.72k|    IGRAPH_CHECK(igraph_vector_int_resize(res, nodes_to_calc));
  ------------------
  |  |  648|  5.72k|    do { \
  |  |  649|  5.72k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  5.72k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  5.72k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 5.72k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  5.72k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1246|  5.72k|    igraph_vector_int_null(res);
 1247|       |
 1248|  5.72k|    if (loops) {
  ------------------
  |  Branch (1248:9): [True: 5.72k, False: 0]
  ------------------
 1249|  5.72k|        if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (1249:13): [True: 5.72k, False: 0]
  ------------------
 1250|  5.72k|            for (IGRAPH_VIT_RESET(vit), i = 0;
  ------------------
  |  |  202|  5.72k|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
 1251|   259k|                 !IGRAPH_VIT_END(vit);
  ------------------
  |  |  180|   259k|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (1251:18): [True: 254k, False: 5.72k]
  ------------------
 1252|   254k|                 IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  168|   254k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
 1253|   254k|                igraph_integer_t vid = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  215|   254k|    ((igraph_integer_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (215:25): [True: 254k, False: 0]
  |  |  ------------------
  |  |  216|   254k|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1254|   254k|                VECTOR(*res)[i] += (VECTOR(graph->os)[vid + 1] - VECTOR(graph->os)[vid]);
  ------------------
  |  |   65|   254k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[i] += (VECTOR(graph->os)[vid + 1] - VECTOR(graph->os)[vid]);
  ------------------
  |  |   65|   254k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[i] += (VECTOR(graph->os)[vid + 1] - VECTOR(graph->os)[vid]);
  ------------------
  |  |   65|   254k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1255|   254k|            }
 1256|  5.72k|        }
 1257|  5.72k|        if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (1257:13): [True: 2.19k, False: 3.53k]
  ------------------
 1258|  2.19k|            for (IGRAPH_VIT_RESET(vit), i = 0;
  ------------------
  |  |  202|  2.19k|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
 1259|  97.7k|                 !IGRAPH_VIT_END(vit);
  ------------------
  |  |  180|  97.7k|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (1259:18): [True: 95.5k, False: 2.19k]
  ------------------
 1260|  95.5k|                 IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  168|  95.5k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
 1261|  95.5k|                igraph_integer_t vid = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  215|  95.5k|    ((igraph_integer_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (215:25): [True: 95.5k, False: 0]
  |  |  ------------------
  |  |  216|  95.5k|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1262|  95.5k|                VECTOR(*res)[i] += (VECTOR(graph->is)[vid + 1] - VECTOR(graph->is)[vid]);
  ------------------
  |  |   65|  95.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[i] += (VECTOR(graph->is)[vid + 1] - VECTOR(graph->is)[vid]);
  ------------------
  |  |   65|  95.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[i] += (VECTOR(graph->is)[vid + 1] - VECTOR(graph->is)[vid]);
  ------------------
  |  |   65|  95.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1263|  95.5k|            }
 1264|  2.19k|        }
 1265|  5.72k|    } else if (igraph_vs_is_all(&vids)) { /* no loops, calculating degree for all vertices */
  ------------------
  |  Branch (1265:16): [True: 0, False: 0]
  ------------------
 1266|       |        // When calculating degree for all vertices, iterating over edges is faster
 1267|      0|        igraph_integer_t no_of_edges = igraph_ecount(graph);
 1268|       |
 1269|      0|        if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (1269:13): [True: 0, False: 0]
  ------------------
 1270|      0|            for (igraph_integer_t edge = 0; edge < no_of_edges; ++edge) {
  ------------------
  |  Branch (1270:45): [True: 0, False: 0]
  ------------------
 1271|      0|                igraph_integer_t from = IGRAPH_FROM(graph, edge);
  ------------------
  |  |  113|      0|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1272|      0|                if (from != IGRAPH_TO(graph, edge)) {
  ------------------
  |  |  126|      0|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (1272:21): [True: 0, False: 0]
  ------------------
 1273|      0|                    VECTOR(*res)[from]++;
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1274|      0|                }
 1275|      0|            }
 1276|      0|        }
 1277|      0|        if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (1277:13): [True: 0, False: 0]
  ------------------
 1278|      0|            for (igraph_integer_t edge = 0; edge < no_of_edges; ++edge) {
  ------------------
  |  Branch (1278:45): [True: 0, False: 0]
  ------------------
 1279|      0|                igraph_integer_t to = IGRAPH_TO(graph, edge);
  ------------------
  |  |  126|      0|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1280|      0|                if (IGRAPH_FROM(graph, edge) != to) {
  ------------------
  |  |  113|      0|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (1280:21): [True: 0, False: 0]
  ------------------
 1281|      0|                    VECTOR(*res)[to]++;
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1282|      0|                }
 1283|      0|            }
 1284|      0|        }
 1285|      0|    } else { /* no loops */
 1286|      0|        if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (1286:13): [True: 0, False: 0]
  ------------------
 1287|      0|            for (IGRAPH_VIT_RESET(vit), i = 0;
  ------------------
  |  |  202|      0|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
 1288|      0|                 !IGRAPH_VIT_END(vit);
  ------------------
  |  |  180|      0|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (1288:18): [True: 0, False: 0]
  ------------------
 1289|      0|                 IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  168|      0|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
 1290|      0|                igraph_integer_t vid = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  215|      0|    ((igraph_integer_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (215:25): [True: 0, False: 0]
  |  |  ------------------
  |  |  216|      0|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1291|      0|                VECTOR(*res)[i] += (VECTOR(graph->os)[vid + 1] - VECTOR(graph->os)[vid]);
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[i] += (VECTOR(graph->os)[vid + 1] - VECTOR(graph->os)[vid]);
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[i] += (VECTOR(graph->os)[vid + 1] - VECTOR(graph->os)[vid]);
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1292|      0|                for (j = VECTOR(graph->os)[vid];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1293|      0|                     j < VECTOR(graph->os)[vid + 1]; j++) {
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1293:22): [True: 0, False: 0]
  ------------------
 1294|      0|                    if (VECTOR(graph->to)[ VECTOR(graph->oi)[j] ] == vid) {
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  if (VECTOR(graph->to)[ VECTOR(graph->oi)[j] ] == vid) {
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1294:25): [True: 0, False: 0]
  ------------------
 1295|      0|                        VECTOR(*res)[i] -= 1;
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1296|      0|                    }
 1297|      0|                }
 1298|      0|            }
 1299|      0|        }
 1300|      0|        if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (1300:13): [True: 0, False: 0]
  ------------------
 1301|      0|            for (IGRAPH_VIT_RESET(vit), i = 0;
  ------------------
  |  |  202|      0|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
 1302|      0|                 !IGRAPH_VIT_END(vit);
  ------------------
  |  |  180|      0|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (1302:18): [True: 0, False: 0]
  ------------------
 1303|      0|                 IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  168|      0|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
 1304|      0|                igraph_integer_t vid = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  215|      0|    ((igraph_integer_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (215:25): [True: 0, False: 0]
  |  |  ------------------
  |  |  216|      0|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1305|      0|                VECTOR(*res)[i] += (VECTOR(graph->is)[vid + 1] - VECTOR(graph->is)[vid]);
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[i] += (VECTOR(graph->is)[vid + 1] - VECTOR(graph->is)[vid]);
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[i] += (VECTOR(graph->is)[vid + 1] - VECTOR(graph->is)[vid]);
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1306|      0|                for (j = VECTOR(graph->is)[vid];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1307|      0|                     j < VECTOR(graph->is)[vid + 1]; j++) {
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1307:22): [True: 0, False: 0]
  ------------------
 1308|      0|                    if (VECTOR(graph->from)[ VECTOR(graph->ii)[j] ] == vid) {
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  if (VECTOR(graph->from)[ VECTOR(graph->ii)[j] ] == vid) {
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1308:25): [True: 0, False: 0]
  ------------------
 1309|      0|                        VECTOR(*res)[i] -= 1;
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1310|      0|                    }
 1311|      0|                }
 1312|      0|            }
 1313|      0|        }
 1314|      0|    }  /* loops */
 1315|       |
 1316|  5.72k|    igraph_vit_destroy(&vit);
 1317|  5.72k|    IGRAPH_FINALLY_CLEAN(1);
 1318|       |
 1319|  5.72k|    return IGRAPH_SUCCESS;
 1320|  5.72k|}
igraph_incident:
 1667|   665k|        igraph_neimode_t mode) {
 1668|   665k|    if (!igraph_is_directed(graph) || mode == IGRAPH_ALL) {
  ------------------
  |  Branch (1668:9): [True: 95.5k, False: 569k]
  |  Branch (1668:39): [True: 95.5k, False: 474k]
  ------------------
 1669|   191k|        return igraph_i_incident(graph, eids, pnode, mode, IGRAPH_LOOPS_TWICE);
 1670|   474k|    } else {
 1671|   474k|        return igraph_i_incident(graph, eids, pnode, mode, IGRAPH_LOOPS_ONCE);
 1672|   474k|    }
 1673|   665k|}
igraph_i_incident:
 1676|   665k|        igraph_neimode_t mode, igraph_loops_t loops) {
 1677|   665k|    igraph_integer_t length = 0, idx = 0;
 1678|   665k|    igraph_integer_t i, j;
 1679|   665k|    igraph_integer_t node = pnode;
 1680|   665k|    igraph_bool_t directed = igraph_is_directed(graph);
 1681|       |
 1682|   665k|    if (node < 0 || node > igraph_vcount(graph) - 1) {
  ------------------
  |  Branch (1682:9): [True: 0, False: 665k]
  |  Branch (1682:21): [True: 0, False: 665k]
  ------------------
 1683|      0|        IGRAPH_ERROR("Given vertex is not in the graph.", IGRAPH_EINVVID);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1684|      0|    }
 1685|   665k|    if (mode != IGRAPH_OUT && mode != IGRAPH_IN &&
  ------------------
  |  Branch (1685:9): [True: 347k, False: 318k]
  |  Branch (1685:31): [True: 191k, False: 155k]
  ------------------
 1686|   665k|        mode != IGRAPH_ALL) {
  ------------------
  |  Branch (1686:9): [True: 0, False: 191k]
  ------------------
 1687|      0|        IGRAPH_ERROR("Mode should be either IGRAPH_OUT, IGRAPH_IN or IGRAPH_ALL.", IGRAPH_EINVMODE);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1688|      0|    }
 1689|       |
 1690|   665k|    if (!directed) {
  ------------------
  |  Branch (1690:9): [True: 95.5k, False: 569k]
  ------------------
 1691|  95.5k|        mode = IGRAPH_ALL;
 1692|  95.5k|    }
 1693|       |
 1694|   665k|    if (mode != IGRAPH_ALL && loops == IGRAPH_LOOPS_TWICE) {
  ------------------
  |  Branch (1694:9): [True: 474k, False: 191k]
  |  Branch (1694:31): [True: 0, False: 474k]
  ------------------
 1695|      0|        IGRAPH_ERROR("For a directed graph (with directions not ignored), "
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1696|      0|                     "IGRAPH_LOOPS_TWICE does not make sense.", IGRAPH_EINVAL);
 1697|      0|    }
 1698|       |
 1699|       |    /* Calculate needed space first & allocate it */
 1700|       |    /* Note that 'mode' is treated as a bit field here; it's okay because
 1701|       |     * IGRAPH_ALL = IGRAPH_IN | IGRAPH_OUT, bit-wise */
 1702|   665k|    if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (1702:9): [True: 509k, False: 155k]
  ------------------
 1703|   509k|        length += (VECTOR(graph->os)[node + 1] - VECTOR(graph->os)[node]);
  ------------------
  |  |   65|   509k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      length += (VECTOR(graph->os)[node + 1] - VECTOR(graph->os)[node]);
  ------------------
  |  |   65|   509k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1704|   509k|    }
 1705|   665k|    if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (1705:9): [True: 347k, False: 318k]
  ------------------
 1706|   347k|        length += (VECTOR(graph->is)[node + 1] - VECTOR(graph->is)[node]);
  ------------------
  |  |   65|   347k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      length += (VECTOR(graph->is)[node + 1] - VECTOR(graph->is)[node]);
  ------------------
  |  |   65|   347k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1707|   347k|    }
 1708|       |
 1709|   665k|    IGRAPH_CHECK(igraph_vector_int_resize(eids, length));
  ------------------
  |  |  648|   665k|    do { \
  |  |  649|   665k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|   665k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|   665k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 665k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|   665k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1710|       |
 1711|       |    /* The loops below produce an ordering what is consistent with the
 1712|       |     * ordering returned by igraph_neighbors(), and this should be preserved.
 1713|       |     * We are dealing with two sorted lists; one for the successors and one
 1714|       |     * for the predecessors. If we have requested only one of them, we have
 1715|       |     * an easy job. If we have requested both, we need to merge the two lists
 1716|       |     * to ensure that the output is sorted by the vertex IDs of the "other"
 1717|       |     * endpoint of the affected edges */
 1718|   665k|    if (!directed || mode != IGRAPH_ALL) {
  ------------------
  |  Branch (1718:9): [True: 95.5k, False: 569k]
  |  Branch (1718:22): [True: 474k, False: 95.5k]
  ------------------
 1719|       |        /* We did not ask for both directions; this is the easy case */
 1720|       |
 1721|   569k|        if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (1721:13): [True: 414k, False: 155k]
  ------------------
 1722|   414k|            j = VECTOR(graph->os)[node + 1];
  ------------------
  |  |   65|   414k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1723|  1.51M|            for (i = VECTOR(graph->os)[node]; i < j; i++) {
  ------------------
  |  |   65|   414k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1723:47): [True: 1.10M, False: 414k]
  ------------------
 1724|  1.10M|                igraph_integer_t edge = VECTOR(graph->oi)[i];
  ------------------
  |  |   65|  1.10M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1725|  1.10M|                igraph_integer_t other = VECTOR(graph->to)[edge];
  ------------------
  |  |   65|  1.10M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1726|  1.10M|                if (loops == IGRAPH_NO_LOOPS && other == pnode) {
  ------------------
  |  Branch (1726:21): [True: 0, False: 1.10M]
  |  Branch (1726:49): [True: 0, False: 0]
  ------------------
 1727|      0|                    length--;
 1728|  1.10M|                } else {
 1729|  1.10M|                    VECTOR(*eids)[idx++] = edge;
  ------------------
  |  |   65|  1.10M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1730|  1.10M|                }
 1731|  1.10M|            }
 1732|   414k|        }
 1733|       |
 1734|   569k|        if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (1734:13): [True: 251k, False: 318k]
  ------------------
 1735|   251k|            j = VECTOR(graph->is)[node + 1];
  ------------------
  |  |   65|   251k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1736|  1.22M|            for (i = VECTOR(graph->is)[node]; i < j; i++) {
  ------------------
  |  |   65|   251k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1736:47): [True: 972k, False: 251k]
  ------------------
 1737|   972k|                igraph_integer_t edge = VECTOR(graph->ii)[i];
  ------------------
  |  |   65|   972k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1738|   972k|                igraph_integer_t other = VECTOR(graph->from)[edge];
  ------------------
  |  |   65|   972k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1739|   972k|                if ((loops == IGRAPH_NO_LOOPS || (loops == IGRAPH_LOOPS_ONCE && !directed)) && other == pnode) {
  ------------------
  |  Branch (1739:22): [True: 0, False: 972k]
  |  Branch (1739:51): [True: 946k, False: 25.9k]
  |  Branch (1739:81): [True: 0, False: 946k]
  |  Branch (1739:96): [True: 0, False: 0]
  ------------------
 1740|      0|                    length--;
 1741|   972k|                } else {
 1742|   972k|                    VECTOR(*eids)[idx++] = edge;
  ------------------
  |  |   65|   972k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1743|   972k|                }
 1744|   972k|            }
 1745|   251k|        }
 1746|   569k|    } else {
 1747|       |        /* both in- and out- neighbors in a directed graph,
 1748|       |           we need to merge the two 'vectors' */
 1749|  95.5k|        igraph_integer_t j1 = VECTOR(graph->os)[node + 1];
  ------------------
  |  |   65|  95.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1750|  95.5k|        igraph_integer_t j2 = VECTOR(graph->is)[node + 1];
  ------------------
  |  |   65|  95.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1751|  95.5k|        igraph_integer_t i1 = VECTOR(graph->os)[node];
  ------------------
  |  |   65|  95.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1752|  95.5k|        igraph_integer_t i2 = VECTOR(graph->is)[node];
  ------------------
  |  |   65|  95.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1753|  95.5k|        igraph_integer_t eid1, eid2;
 1754|  95.5k|        igraph_integer_t n1, n2;
 1755|  95.5k|        igraph_bool_t seen_loop_edge = false;
 1756|       |
 1757|   135k|        while (i1 < j1 && i2 < j2) {
  ------------------
  |  Branch (1757:16): [True: 49.6k, False: 86.1k]
  |  Branch (1757:27): [True: 40.1k, False: 9.46k]
  ------------------
 1758|  40.1k|            eid1 = VECTOR(graph->oi)[i1];
  ------------------
  |  |   65|  40.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1759|  40.1k|            eid2 = VECTOR(graph->ii)[i2];
  ------------------
  |  |   65|  40.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1760|  40.1k|            n1 = VECTOR(graph->to)[eid1];
  ------------------
  |  |   65|  40.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1761|  40.1k|            n2 = VECTOR(graph->from)[eid2];
  ------------------
  |  |   65|  40.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1762|  40.1k|            if (n1 < n2) {
  ------------------
  |  Branch (1762:17): [True: 12.5k, False: 27.6k]
  ------------------
 1763|  12.5k|                i1++;
 1764|  12.5k|                VECTOR(*eids)[idx++] = eid1;
  ------------------
  |  |   65|  12.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1765|  27.6k|            } else if (n1 > n2) {
  ------------------
  |  Branch (1765:24): [True: 13.7k, False: 13.9k]
  ------------------
 1766|  13.7k|                i2++;
 1767|  13.7k|                VECTOR(*eids)[idx++] = eid2;
  ------------------
  |  |   65|  13.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1768|  13.9k|            } else if (n1 != pnode) {
  ------------------
  |  Branch (1768:24): [True: 2.08k, False: 11.8k]
  ------------------
 1769|       |                /* multiple edge */
 1770|  2.08k|                i1++;
 1771|  2.08k|                i2++;
 1772|  2.08k|                VECTOR(*eids)[idx++] = eid1;
  ------------------
  |  |   65|  2.08k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1773|  2.08k|                VECTOR(*eids)[idx++] = eid2;
  ------------------
  |  |   65|  2.08k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1774|  11.8k|            } else {
 1775|       |                /* loop edge */
 1776|  11.8k|                i1++;
 1777|  11.8k|                i2++;
 1778|  11.8k|                if (loops == IGRAPH_NO_LOOPS) {
  ------------------
  |  Branch (1778:21): [True: 0, False: 11.8k]
  ------------------
 1779|      0|                    length -= 2;
 1780|  11.8k|                } else if (loops == IGRAPH_LOOPS_ONCE) {
  ------------------
  |  Branch (1780:28): [True: 0, False: 11.8k]
  ------------------
 1781|      0|                    length--;
 1782|      0|                    if (!seen_loop_edge) {
  ------------------
  |  Branch (1782:25): [True: 0, False: 0]
  ------------------
 1783|      0|                        VECTOR(*eids)[idx++] = eid1;
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1784|      0|                    } else {
 1785|      0|                        VECTOR(*eids)[idx++] = eid2;
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1786|      0|                    }
 1787|      0|                    seen_loop_edge = !seen_loop_edge;
 1788|  11.8k|                } else {
 1789|  11.8k|                    VECTOR(*eids)[idx++] = eid1;
  ------------------
  |  |   65|  11.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1790|  11.8k|                    VECTOR(*eids)[idx++] = eid2;
  ------------------
  |  |   65|  11.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1791|  11.8k|                }
 1792|  11.8k|            }
 1793|  40.1k|        }
 1794|       |
 1795|   123k|        while (i1 < j1) {
  ------------------
  |  Branch (1795:16): [True: 28.1k, False: 95.5k]
  ------------------
 1796|  28.1k|            eid1 = VECTOR(graph->oi)[i1++];
  ------------------
  |  |   65|  28.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1797|  28.1k|            VECTOR(*eids)[idx++] = eid1;
  ------------------
  |  |   65|  28.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1798|  28.1k|        }
 1799|       |
 1800|   122k|        while (i2 < j2) {
  ------------------
  |  Branch (1800:16): [True: 26.9k, False: 95.5k]
  ------------------
 1801|  26.9k|            eid2 = VECTOR(graph->ii)[i2++];
  ------------------
  |  |   65|  26.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1802|  26.9k|            VECTOR(*eids)[idx++] = eid2;
  ------------------
  |  |   65|  26.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1803|  26.9k|        }
 1804|  95.5k|    }
 1805|   665k|    IGRAPH_CHECK(igraph_vector_int_resize(eids, length));
  ------------------
  |  |  648|   665k|    do { \
  |  |  649|   665k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|   665k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|   665k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 665k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|   665k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1806|   665k|    return IGRAPH_SUCCESS;
 1807|   665k|#undef DEDUPLICATE_IF_NEEDED
 1808|   665k|}
type_indexededgelist.c:igraph_i_create_start_vectors:
 1051|  4.12k|        igraph_vector_int_t *iindex, igraph_integer_t nodes) {
 1052|       |
 1053|  4.12k|# define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
 1054|       |
 1055|  4.12k|    igraph_integer_t no_of_nodes;
 1056|  4.12k|    igraph_integer_t no_of_edges;
 1057|  4.12k|    igraph_integer_t i, j, idx;
 1058|       |
 1059|  4.12k|    no_of_nodes = nodes;
 1060|  4.12k|    no_of_edges = igraph_vector_int_size(el);
 1061|       |
 1062|       |    /* result */
 1063|       |
 1064|  4.12k|    IGRAPH_CHECK(igraph_vector_int_resize(res, nodes + 1));
  ------------------
  |  |  648|  4.12k|    do { \
  |  |  649|  4.12k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  4.12k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  4.12k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 4.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  4.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1065|       |
 1066|       |    /* create the index */
 1067|       |
 1068|  4.12k|    if (no_of_edges == 0) {
  ------------------
  |  Branch (1068:9): [True: 0, False: 4.12k]
  ------------------
 1069|       |        /* empty graph */
 1070|      0|        igraph_vector_int_null(res);
 1071|  4.12k|    } else {
 1072|  4.12k|        idx = -1;
 1073|  44.4k|        for (i = 0; i <= EDGE(0); i++) {
  ------------------
  |  | 1053|  44.4k|# define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   65|  44.4k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               # define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   65|  44.4k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (1073:21): [True: 40.2k, False: 4.12k]
  ------------------
 1074|  40.2k|            idx++; VECTOR(*res)[idx] = 0;
  ------------------
  |  |   65|  40.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1075|  40.2k|        }
 1076|  71.3k|        for (i = 1; i < no_of_edges; i++) {
  ------------------
  |  Branch (1076:21): [True: 67.2k, False: 4.12k]
  ------------------
 1077|  67.2k|            igraph_integer_t n = EDGE(i) - EDGE(VECTOR(*res)[idx]);
  ------------------
  |  | 1053|  67.2k|# define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   65|  67.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               # define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   65|  67.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
                          igraph_integer_t n = EDGE(i) - EDGE(VECTOR(*res)[idx]);
  ------------------
  |  | 1053|  67.2k|# define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   65|  67.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               # define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   65|  67.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1078|   167k|            for (j = 0; j < n; j++) {
  ------------------
  |  Branch (1078:25): [True: 99.8k, False: 67.2k]
  ------------------
 1079|  99.8k|                idx++; VECTOR(*res)[idx] = i;
  ------------------
  |  |   65|  99.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1080|  99.8k|            }
 1081|  67.2k|        }
 1082|  4.12k|        j = EDGE(VECTOR(*res)[idx]);
  ------------------
  |  | 1053|  4.12k|# define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   65|  4.12k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               # define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   65|  4.12k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1083|  57.2k|        for (i = 0; i < no_of_nodes - j; i++) {
  ------------------
  |  Branch (1083:21): [True: 53.1k, False: 4.12k]
  ------------------
 1084|  53.1k|            idx++; VECTOR(*res)[idx] = no_of_edges;
  ------------------
  |  |   65|  53.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1085|  53.1k|        }
 1086|  4.12k|    }
 1087|       |
 1088|       |    /* clean */
 1089|       |
 1090|  4.12k|# undef EDGE
 1091|  4.12k|    return IGRAPH_SUCCESS;
 1092|  4.12k|}

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

igraph_to_undirected:
  512|    732|                         const igraph_attribute_combination_t *edge_comb) {
  513|       |
  514|    732|    igraph_integer_t no_of_nodes = igraph_vcount(graph);
  515|    732|    igraph_integer_t no_of_edges = igraph_ecount(graph);
  516|    732|    igraph_vector_int_t edges;
  517|    732|    igraph_t newgraph;
  518|    732|    igraph_bool_t attr = edge_comb && igraph_has_attribute_table();
  ------------------
  |  Branch (518:26): [True: 732, False: 0]
  |  Branch (518:39): [True: 732, False: 0]
  ------------------
  519|       |
  520|    732|    if (mode != IGRAPH_TO_UNDIRECTED_EACH &&
  ------------------
  |  Branch (520:9): [True: 732, False: 0]
  ------------------
  521|    732|        mode != IGRAPH_TO_UNDIRECTED_COLLAPSE &&
  ------------------
  |  Branch (521:9): [True: 0, False: 732]
  ------------------
  522|    732|        mode != IGRAPH_TO_UNDIRECTED_MUTUAL) {
  ------------------
  |  Branch (522:9): [True: 0, False: 0]
  ------------------
  523|      0|        IGRAPH_ERROR("Cannot undirect graph, invalid mode", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  524|      0|    }
  525|       |
  526|    732|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (526:9): [True: 0, False: 732]
  ------------------
  527|      0|        return IGRAPH_SUCCESS;
  528|      0|    }
  529|       |
  530|    732|    IGRAPH_VECTOR_INT_INIT_FINALLY(&edges, 0);
  ------------------
  |  |  124|    732|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|    732|    do { \
  |  |  |  |  649|    732|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|    732|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|    732|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 732]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|    732|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|    732|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|    732|    do { \
  |  |  |  |  592|    732|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|    732|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|    732|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|    732|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|    732|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|    732|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  531|       |
  532|    732|    if (mode == IGRAPH_TO_UNDIRECTED_EACH) {
  ------------------
  |  Branch (532:9): [True: 0, False: 732]
  ------------------
  533|      0|        igraph_es_t es;
  534|      0|        igraph_eit_t eit;
  535|       |
  536|      0|        IGRAPH_CHECK(igraph_vector_int_reserve(&edges, no_of_edges * 2));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  537|      0|        IGRAPH_CHECK(igraph_es_all(&es, IGRAPH_EDGEORDER_ID));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  538|      0|        IGRAPH_FINALLY(igraph_es_destroy, &es);
  ------------------
  |  |  591|      0|    do { \
  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  539|      0|        IGRAPH_CHECK(igraph_eit_create(graph, es, &eit));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  540|      0|        IGRAPH_FINALLY(igraph_eit_destroy, &eit);
  ------------------
  |  |  591|      0|    do { \
  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  541|       |
  542|      0|        while (!IGRAPH_EIT_END(eit)) {
  ------------------
  |  |  370|      0|#define IGRAPH_EIT_END(eit)   ((eit).pos >= (eit).end)
  ------------------
  |  Branch (542:16): [True: 0, False: 0]
  ------------------
  543|      0|            igraph_integer_t edge = IGRAPH_EIT_GET(eit);
  ------------------
  |  |  404|      0|    (igraph_integer_t)((((eit).type == IGRAPH_EIT_RANGE) ? (eit).pos : \
  |  |  ------------------
  |  |  |  Branch (404:25): [True: 0, False: 0]
  |  |  ------------------
  |  |  405|      0|                        VECTOR(*(eit).vec)[(eit).pos]))
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  544|      0|            IGRAPH_CHECK(igraph_vector_int_push_back(&edges, IGRAPH_FROM(graph, edge)));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  545|      0|            IGRAPH_CHECK(igraph_vector_int_push_back(&edges, IGRAPH_TO(graph, edge)));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  546|      0|            IGRAPH_EIT_NEXT(eit);
  ------------------
  |  |  358|      0|#define IGRAPH_EIT_NEXT(eit) (++((eit).pos))
  ------------------
  547|      0|        }
  548|       |
  549|      0|        igraph_eit_destroy(&eit);
  550|      0|        igraph_es_destroy(&es);
  551|      0|        IGRAPH_FINALLY_CLEAN(2);
  552|       |
  553|      0|        IGRAPH_CHECK(igraph_create(&newgraph, &edges,
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  554|      0|                                   no_of_nodes,
  555|      0|                                   IGRAPH_UNDIRECTED));
  556|      0|        IGRAPH_FINALLY(igraph_destroy, &newgraph);
  ------------------
  |  |  591|      0|    do { \
  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  557|      0|        igraph_vector_int_destroy(&edges);
  558|      0|        IGRAPH_CHECK(igraph_i_attribute_copy(&newgraph, graph, true, true, true));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  559|      0|        IGRAPH_FINALLY_CLEAN(2);
  560|      0|        igraph_destroy(graph);
  561|      0|        *graph = newgraph;
  562|       |
  563|    732|    } else if (mode == IGRAPH_TO_UNDIRECTED_COLLAPSE) {
  ------------------
  |  Branch (563:16): [True: 732, False: 0]
  ------------------
  564|    732|        igraph_vector_int_t inadj, outadj;
  565|    732|        igraph_vector_int_t mergeinto;
  566|    732|        igraph_integer_t actedge = 0;
  567|       |
  568|    732|        if (attr) {
  ------------------
  |  Branch (568:13): [True: 732, False: 0]
  ------------------
  569|    732|            IGRAPH_VECTOR_INT_INIT_FINALLY(&mergeinto, no_of_edges);
  ------------------
  |  |  124|    732|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|    732|    do { \
  |  |  |  |  649|    732|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|    732|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|    732|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 732]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|    732|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|    732|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|    732|    do { \
  |  |  |  |  592|    732|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|    732|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|    732|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|    732|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|    732|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|    732|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  570|    732|        }
  571|       |
  572|    732|        IGRAPH_CHECK(igraph_vector_int_reserve(&edges, no_of_edges * 2));
  ------------------
  |  |  648|    732|    do { \
  |  |  649|    732|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    732|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    732|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 732]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  573|    732|        IGRAPH_VECTOR_INT_INIT_FINALLY(&inadj, 0);
  ------------------
  |  |  124|    732|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|    732|    do { \
  |  |  |  |  649|    732|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|    732|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|    732|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 732]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|    732|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|    732|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|    732|    do { \
  |  |  |  |  592|    732|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|    732|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|    732|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|    732|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|    732|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|    732|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  574|    732|        IGRAPH_VECTOR_INT_INIT_FINALLY(&outadj, 0);
  ------------------
  |  |  124|    732|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|    732|    do { \
  |  |  |  |  649|    732|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|    732|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|    732|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 732]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|    732|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|    732|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|    732|    do { \
  |  |  |  |  592|    732|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|    732|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|    732|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|    732|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|    732|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|    732|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  575|       |
  576|  32.5k|        for (igraph_integer_t i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (576:38): [True: 31.8k, False: 732]
  ------------------
  577|  31.8k|            igraph_integer_t n_out, n_in;
  578|  31.8k|            igraph_integer_t p1 = -1, p2 = -1;
  579|  31.8k|            igraph_integer_t e1 = 0, e2 = 0, n1 = 0, n2 = 0, last;
  580|  31.8k|            IGRAPH_CHECK(igraph_incident(graph, &outadj, i, IGRAPH_OUT));
  ------------------
  |  |  648|  31.8k|    do { \
  |  |  649|  31.8k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  31.8k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  31.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 31.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  31.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  581|  31.8k|            IGRAPH_CHECK(igraph_incident(graph, &inadj, i, IGRAPH_IN));
  ------------------
  |  |  648|  31.8k|    do { \
  |  |  649|  31.8k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  31.8k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  31.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 31.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  31.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  582|  31.8k|            n_out = igraph_vector_int_size(&outadj);
  583|  31.8k|            n_in = igraph_vector_int_size(&inadj);
  584|       |
  585|  31.8k|#define STEPOUT() if ( (++p1) < n_out) {    \
  586|  31.8k|        e1 = VECTOR(outadj)[p1]; \
  587|  31.8k|        n1 = IGRAPH_TO(graph, e1);      \
  588|  31.8k|    }
  589|  31.8k|#define STEPIN()  if ( (++p2) < n_in) {         \
  590|  31.8k|        e2 = VECTOR(inadj )[p2]; \
  591|  31.8k|        n2 = IGRAPH_FROM(graph, e2);        \
  592|  31.8k|    }
  593|  31.8k|#define ADD_NEW_EDGE() { \
  594|  31.8k|    IGRAPH_CHECK(igraph_vector_int_push_back(&edges, i)); \
  595|  31.8k|    IGRAPH_CHECK(igraph_vector_int_push_back(&edges, last)); \
  596|  31.8k|}
  597|  31.8k|#define MERGE_INTO_CURRENT_EDGE(which) { \
  598|  31.8k|    if (attr) { \
  599|  31.8k|        VECTOR(mergeinto)[which] = actedge; \
  600|  31.8k|    } \
  601|  31.8k|}
  602|       |
  603|  31.8k|            STEPOUT();
  ------------------
  |  |  585|  31.8k|#define STEPOUT() if ( (++p1) < n_out) {    \
  |  |  ------------------
  |  |  |  Branch (585:24): [True: 4.71k, False: 27.1k]
  |  |  ------------------
  |  |  586|  4.71k|        e1 = VECTOR(outadj)[p1]; \
  |  |  ------------------
  |  |  |  |   65|  4.71k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  587|  4.71k|        n1 = IGRAPH_TO(graph, e1);      \
  |  |  ------------------
  |  |  |  |  126|  4.71k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  4.71k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  588|  4.71k|    }
  ------------------
  604|  31.8k|            STEPIN();
  ------------------
  |  |  589|  31.8k|#define STEPIN()  if ( (++p2) < n_in) {         \
  |  |  ------------------
  |  |  |  Branch (589:24): [True: 5.29k, False: 26.5k]
  |  |  ------------------
  |  |  590|  5.29k|        e2 = VECTOR(inadj )[p2]; \
  |  |  ------------------
  |  |  |  |   65|  5.29k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  591|  5.29k|        n2 = IGRAPH_FROM(graph, e2);        \
  |  |  ------------------
  |  |  |  |  113|  5.29k|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  5.29k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  592|  5.29k|    }
  ------------------
  605|       |
  606|  34.9k|            while (p1 < n_out && n1 <= i && p2 < n_in && n2 <= i) {
  ------------------
  |  Branch (606:20): [True: 7.21k, False: 27.7k]
  |  Branch (606:34): [True: 5.06k, False: 2.15k]
  |  Branch (606:45): [True: 3.67k, False: 1.38k]
  |  Branch (606:58): [True: 3.13k, False: 548]
  ------------------
  607|  3.13k|                last = (n1 <= n2) ? n1 : n2;
  ------------------
  |  Branch (607:24): [True: 1.87k, False: 1.25k]
  ------------------
  608|  3.13k|                ADD_NEW_EDGE();
  ------------------
  |  |  593|  3.13k|#define ADD_NEW_EDGE() { \
  |  |  594|  3.13k|    IGRAPH_CHECK(igraph_vector_int_push_back(&edges, i)); \
  |  |  ------------------
  |  |  |  |  648|  3.13k|    do { \
  |  |  |  |  649|  3.13k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  3.13k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  3.13k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 3.13k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  3.13k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  595|  3.13k|    IGRAPH_CHECK(igraph_vector_int_push_back(&edges, last)); \
  |  |  ------------------
  |  |  |  |  648|  3.13k|    do { \
  |  |  |  |  649|  3.13k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  3.13k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  3.13k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 3.13k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  3.13k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  596|  3.13k|}
  ------------------
  609|  8.85k|                while (p1 < n_out && last == n1) {
  ------------------
  |  Branch (609:24): [True: 8.22k, False: 630]
  |  Branch (609:38): [True: 5.71k, False: 2.50k]
  ------------------
  610|  5.71k|                    MERGE_INTO_CURRENT_EDGE(e1);
  ------------------
  |  |  597|  5.71k|#define MERGE_INTO_CURRENT_EDGE(which) { \
  |  |  598|  5.71k|    if (attr) { \
  |  |  ------------------
  |  |  |  Branch (598:9): [True: 5.71k, False: 0]
  |  |  ------------------
  |  |  599|  5.71k|        VECTOR(mergeinto)[which] = actedge; \
  |  |  ------------------
  |  |  |  |   65|  5.71k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  600|  5.71k|    } \
  |  |  601|  5.71k|}
  ------------------
  611|  5.71k|                    STEPOUT();
  ------------------
  |  |  585|  5.71k|#define STEPOUT() if ( (++p1) < n_out) {    \
  |  |  ------------------
  |  |  |  Branch (585:24): [True: 5.08k, False: 630]
  |  |  ------------------
  |  |  586|  5.08k|        e1 = VECTOR(outadj)[p1]; \
  |  |  ------------------
  |  |  |  |   65|  5.08k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  587|  5.08k|        n1 = IGRAPH_TO(graph, e1);      \
  |  |  ------------------
  |  |  |  |  126|  5.08k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  5.08k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  588|  5.08k|    }
  ------------------
  612|  5.71k|                }
  613|  9.74k|                while (p2 < n_in && last == n2) {
  ------------------
  |  Branch (613:24): [True: 9.15k, False: 593]
  |  Branch (613:37): [True: 6.61k, False: 2.53k]
  ------------------
  614|  6.61k|                    MERGE_INTO_CURRENT_EDGE(e2);
  ------------------
  |  |  597|  6.61k|#define MERGE_INTO_CURRENT_EDGE(which) { \
  |  |  598|  6.61k|    if (attr) { \
  |  |  ------------------
  |  |  |  Branch (598:9): [True: 6.61k, False: 0]
  |  |  ------------------
  |  |  599|  6.61k|        VECTOR(mergeinto)[which] = actedge; \
  |  |  ------------------
  |  |  |  |   65|  6.61k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  600|  6.61k|    } \
  |  |  601|  6.61k|}
  ------------------
  615|  6.61k|                    STEPIN();
  ------------------
  |  |  589|  6.61k|#define STEPIN()  if ( (++p2) < n_in) {         \
  |  |  ------------------
  |  |  |  Branch (589:24): [True: 6.02k, False: 593]
  |  |  ------------------
  |  |  590|  6.02k|        e2 = VECTOR(inadj )[p2]; \
  |  |  ------------------
  |  |  |  |   65|  6.02k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  591|  6.02k|        n2 = IGRAPH_FROM(graph, e2);        \
  |  |  ------------------
  |  |  |  |  113|  6.02k|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  6.02k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  592|  6.02k|    }
  ------------------
  616|  6.61k|                }
  617|  3.13k|                actedge++;
  618|  3.13k|            }
  619|       |
  620|  34.2k|            while (p1 < n_out && n1 <= i) {
  ------------------
  |  Branch (620:20): [True: 4.94k, False: 29.2k]
  |  Branch (620:34): [True: 2.35k, False: 2.59k]
  ------------------
  621|  2.35k|                last = n1;
  622|  2.35k|                ADD_NEW_EDGE();
  ------------------
  |  |  593|  2.35k|#define ADD_NEW_EDGE() { \
  |  |  594|  2.35k|    IGRAPH_CHECK(igraph_vector_int_push_back(&edges, i)); \
  |  |  ------------------
  |  |  |  |  648|  2.35k|    do { \
  |  |  |  |  649|  2.35k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.35k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.35k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.35k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.35k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  595|  2.35k|    IGRAPH_CHECK(igraph_vector_int_push_back(&edges, last)); \
  |  |  ------------------
  |  |  |  |  648|  2.35k|    do { \
  |  |  |  |  649|  2.35k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  2.35k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  2.35k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.35k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  2.35k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  596|  2.35k|}
  ------------------
  623|  6.07k|                while (p1 < n_out && last == n1) {
  ------------------
  |  Branch (623:24): [True: 4.58k, False: 1.49k]
  |  Branch (623:38): [True: 3.72k, False: 859]
  ------------------
  624|  3.72k|                    MERGE_INTO_CURRENT_EDGE(e1);
  ------------------
  |  |  597|  3.72k|#define MERGE_INTO_CURRENT_EDGE(which) { \
  |  |  598|  3.72k|    if (attr) { \
  |  |  ------------------
  |  |  |  Branch (598:9): [True: 3.72k, False: 0]
  |  |  ------------------
  |  |  599|  3.72k|        VECTOR(mergeinto)[which] = actedge; \
  |  |  ------------------
  |  |  |  |   65|  3.72k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  600|  3.72k|    } \
  |  |  601|  3.72k|}
  ------------------
  625|  3.72k|                    STEPOUT();
  ------------------
  |  |  585|  3.72k|#define STEPOUT() if ( (++p1) < n_out) {    \
  |  |  ------------------
  |  |  |  Branch (585:24): [True: 2.23k, False: 1.49k]
  |  |  ------------------
  |  |  586|  2.23k|        e1 = VECTOR(outadj)[p1]; \
  |  |  ------------------
  |  |  |  |   65|  2.23k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  587|  2.23k|        n1 = IGRAPH_TO(graph, e1);      \
  |  |  ------------------
  |  |  |  |  126|  2.23k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  2.23k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  588|  2.23k|    }
  ------------------
  626|  3.72k|                }
  627|  2.35k|                actedge++;
  628|  2.35k|            }
  629|       |
  630|  35.2k|            while (p2 < n_in && n2 <= i) {
  ------------------
  |  Branch (630:20): [True: 5.67k, False: 29.5k]
  |  Branch (630:33): [True: 3.34k, False: 2.32k]
  ------------------
  631|  3.34k|                last = n2;
  632|  3.34k|                ADD_NEW_EDGE();
  ------------------
  |  |  593|  3.34k|#define ADD_NEW_EDGE() { \
  |  |  594|  3.34k|    IGRAPH_CHECK(igraph_vector_int_push_back(&edges, i)); \
  |  |  ------------------
  |  |  |  |  648|  3.34k|    do { \
  |  |  |  |  649|  3.34k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  3.34k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  3.34k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 3.34k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  3.34k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  595|  3.34k|    IGRAPH_CHECK(igraph_vector_int_push_back(&edges, last)); \
  |  |  ------------------
  |  |  |  |  648|  3.34k|    do { \
  |  |  |  |  649|  3.34k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  3.34k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  3.34k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 3.34k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  3.34k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  596|  3.34k|}
  ------------------
  633|  9.43k|                while (p2 < n_in && last == n2) {
  ------------------
  |  Branch (633:24): [True: 7.06k, False: 2.36k]
  |  Branch (633:37): [True: 6.08k, False: 980]
  ------------------
  634|  6.08k|                    MERGE_INTO_CURRENT_EDGE(e2);
  ------------------
  |  |  597|  6.08k|#define MERGE_INTO_CURRENT_EDGE(which) { \
  |  |  598|  6.08k|    if (attr) { \
  |  |  ------------------
  |  |  |  Branch (598:9): [True: 6.08k, False: 0]
  |  |  ------------------
  |  |  599|  6.08k|        VECTOR(mergeinto)[which] = actedge; \
  |  |  ------------------
  |  |  |  |   65|  6.08k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  600|  6.08k|    } \
  |  |  601|  6.08k|}
  ------------------
  635|  6.08k|                    STEPIN();
  ------------------
  |  |  589|  6.08k|#define STEPIN()  if ( (++p2) < n_in) {         \
  |  |  ------------------
  |  |  |  Branch (589:24): [True: 3.71k, False: 2.36k]
  |  |  ------------------
  |  |  590|  3.71k|        e2 = VECTOR(inadj )[p2]; \
  |  |  ------------------
  |  |  |  |   65|  3.71k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  591|  3.71k|        n2 = IGRAPH_FROM(graph, e2);        \
  |  |  ------------------
  |  |  |  |  113|  3.71k|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  3.71k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  592|  3.71k|    }
  ------------------
  636|  6.08k|                }
  637|  3.34k|                actedge++;
  638|  3.34k|            }
  639|  31.8k|        }
  640|       |
  641|    732|#undef MERGE_INTO_CURRENT_EDGE
  642|    732|#undef ADD_NEW_EDGE
  643|    732|#undef STEPOUT
  644|    732|#undef STEPIN
  645|       |
  646|    732|        igraph_vector_int_destroy(&outadj);
  647|    732|        igraph_vector_int_destroy(&inadj);
  648|    732|        IGRAPH_FINALLY_CLEAN(2);
  649|       |
  650|    732|        IGRAPH_CHECK(igraph_create(&newgraph, &edges,
  ------------------
  |  |  648|    732|    do { \
  |  |  649|    732|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    732|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    732|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 732]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  651|    732|                                   no_of_nodes,
  652|    732|                                   IGRAPH_UNDIRECTED));
  653|    732|        IGRAPH_FINALLY(igraph_destroy, &newgraph);
  ------------------
  |  |  591|    732|    do { \
  |  |  592|    732|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|    732|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|    732|         * incorrect destructor function with the pointer */ \
  |  |  595|    732|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|    732|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  654|    732|        igraph_vector_int_destroy(&edges);
  655|    732|        IGRAPH_CHECK(igraph_i_attribute_copy(&newgraph, graph, true, true, /* edges= */ false));
  ------------------
  |  |  648|    732|    do { \
  |  |  649|    732|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    732|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    732|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 732]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  656|       |
  657|    732|        if (attr) {
  ------------------
  |  Branch (657:13): [True: 732, False: 0]
  ------------------
  658|    732|            igraph_fixed_vectorlist_t vl;
  659|    732|            IGRAPH_CHECK(igraph_fixed_vectorlist_convert(&vl, &mergeinto, actedge));
  ------------------
  |  |  648|    732|    do { \
  |  |  649|    732|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    732|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    732|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 732]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  660|    732|            IGRAPH_FINALLY(igraph_fixed_vectorlist_destroy, &vl);
  ------------------
  |  |  591|    732|    do { \
  |  |  592|    732|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|    732|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|    732|         * incorrect destructor function with the pointer */ \
  |  |  595|    732|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|    732|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  661|       |
  662|    732|            IGRAPH_CHECK(igraph_i_attribute_combine_edges(graph, &newgraph, &vl.vecs, edge_comb));
  ------------------
  |  |  648|    732|    do { \
  |  |  649|    732|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    732|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    732|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 732]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  663|       |
  664|    732|            igraph_fixed_vectorlist_destroy(&vl);
  665|    732|            IGRAPH_FINALLY_CLEAN(1);
  666|    732|        }
  667|       |
  668|    732|        IGRAPH_FINALLY_CLEAN(2);
  669|    732|        igraph_destroy(graph);
  670|    732|        *graph = newgraph;
  671|       |
  672|    732|        if (attr) {
  ------------------
  |  Branch (672:13): [True: 732, False: 0]
  ------------------
  673|    732|            igraph_vector_int_destroy(&mergeinto);
  674|    732|            IGRAPH_FINALLY_CLEAN(1);
  675|    732|        }
  676|    732|    } else if (mode == IGRAPH_TO_UNDIRECTED_MUTUAL) {
  ------------------
  |  Branch (676:16): [True: 0, False: 0]
  ------------------
  677|      0|        igraph_vector_int_t inadj, outadj;
  678|      0|        igraph_vector_int_t mergeinto;
  679|      0|        igraph_integer_t actedge = 0;
  680|       |
  681|      0|        if (attr) {
  ------------------
  |  Branch (681:13): [True: 0, False: 0]
  ------------------
  682|      0|            IGRAPH_VECTOR_INT_INIT_FINALLY(&mergeinto, no_of_edges);
  ------------------
  |  |  124|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|      0|    do { \
  |  |  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|      0|    do { \
  |  |  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  683|      0|            igraph_vector_int_fill(&mergeinto, -1);
  684|      0|        }
  685|       |
  686|      0|        IGRAPH_CHECK(igraph_vector_int_reserve(&edges, no_of_edges * 2));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  687|      0|        IGRAPH_VECTOR_INT_INIT_FINALLY(&inadj, 0);
  ------------------
  |  |  124|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|      0|    do { \
  |  |  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|      0|    do { \
  |  |  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  688|      0|        IGRAPH_VECTOR_INT_INIT_FINALLY(&outadj, 0);
  ------------------
  |  |  124|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|      0|    do { \
  |  |  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|      0|    do { \
  |  |  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  689|       |
  690|      0|        for (igraph_integer_t i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (690:38): [True: 0, False: 0]
  ------------------
  691|      0|            igraph_integer_t n_out, n_in;
  692|      0|            igraph_integer_t p1 = -1, p2 = -1;
  693|      0|            igraph_integer_t e1 = 0, e2 = 0, n1 = 0, n2 = 0;
  694|      0|            IGRAPH_CHECK(igraph_incident(graph, &outadj, i,
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  695|      0|                                         IGRAPH_OUT));
  696|      0|            IGRAPH_CHECK(igraph_incident(graph, &inadj,  i,
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  697|      0|                                         IGRAPH_IN));
  698|      0|            n_out = igraph_vector_int_size(&outadj);
  699|      0|            n_in = igraph_vector_int_size(&inadj);
  700|       |
  701|      0|#define STEPOUT() if ( (++p1) < n_out) {    \
  702|      0|        e1 = VECTOR(outadj)[p1]; \
  703|      0|        n1 = IGRAPH_TO(graph, e1);      \
  704|      0|    }
  705|      0|#define STEPIN()  if ( (++p2) < n_in) {         \
  706|      0|        e2 = VECTOR(inadj )[p2]; \
  707|      0|        n2 = IGRAPH_FROM(graph, e2);        \
  708|      0|    }
  709|       |
  710|      0|            STEPOUT();
  ------------------
  |  |  701|      0|#define STEPOUT() if ( (++p1) < n_out) {    \
  |  |  ------------------
  |  |  |  Branch (701:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  702|      0|        e1 = VECTOR(outadj)[p1]; \
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  703|      0|        n1 = IGRAPH_TO(graph, e1);      \
  |  |  ------------------
  |  |  |  |  126|      0|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|    }
  ------------------
  711|      0|            STEPIN();
  ------------------
  |  |  705|      0|#define STEPIN()  if ( (++p2) < n_in) {         \
  |  |  ------------------
  |  |  |  Branch (705:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  706|      0|        e2 = VECTOR(inadj )[p2]; \
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  707|      0|        n2 = IGRAPH_FROM(graph, e2);        \
  |  |  ------------------
  |  |  |  |  113|      0|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  708|      0|    }
  ------------------
  712|       |
  713|      0|            while (p1 < n_out && n1 <= i && p2 < n_in && n2 <= i) {
  ------------------
  |  Branch (713:20): [True: 0, False: 0]
  |  Branch (713:34): [True: 0, False: 0]
  |  Branch (713:45): [True: 0, False: 0]
  |  Branch (713:58): [True: 0, False: 0]
  ------------------
  714|      0|                if (n1 == n2) {
  ------------------
  |  Branch (714:21): [True: 0, False: 0]
  ------------------
  715|      0|                    IGRAPH_CHECK(igraph_vector_int_push_back(&edges, i));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  716|      0|                    IGRAPH_CHECK(igraph_vector_int_push_back(&edges, n1));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  717|      0|                    if (attr) {
  ------------------
  |  Branch (717:25): [True: 0, False: 0]
  ------------------
  718|      0|                        VECTOR(mergeinto)[e1] = actedge;
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  719|      0|                        VECTOR(mergeinto)[e2] = actedge;
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  720|      0|                        actedge++;
  721|      0|                    }
  722|      0|                    STEPOUT();
  ------------------
  |  |  701|      0|#define STEPOUT() if ( (++p1) < n_out) {    \
  |  |  ------------------
  |  |  |  Branch (701:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  702|      0|        e1 = VECTOR(outadj)[p1]; \
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  703|      0|        n1 = IGRAPH_TO(graph, e1);      \
  |  |  ------------------
  |  |  |  |  126|      0|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|    }
  ------------------
  723|      0|                    STEPIN();
  ------------------
  |  |  705|      0|#define STEPIN()  if ( (++p2) < n_in) {         \
  |  |  ------------------
  |  |  |  Branch (705:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  706|      0|        e2 = VECTOR(inadj )[p2]; \
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  707|      0|        n2 = IGRAPH_FROM(graph, e2);        \
  |  |  ------------------
  |  |  |  |  113|      0|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  708|      0|    }
  ------------------
  724|      0|                } else if (n1 < n2) {
  ------------------
  |  Branch (724:28): [True: 0, False: 0]
  ------------------
  725|      0|                    STEPOUT();
  ------------------
  |  |  701|      0|#define STEPOUT() if ( (++p1) < n_out) {    \
  |  |  ------------------
  |  |  |  Branch (701:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  702|      0|        e1 = VECTOR(outadj)[p1]; \
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  703|      0|        n1 = IGRAPH_TO(graph, e1);      \
  |  |  ------------------
  |  |  |  |  126|      0|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|    }
  ------------------
  726|      0|                } else { /* n2<n1 */
  727|      0|                    STEPIN();
  ------------------
  |  |  705|      0|#define STEPIN()  if ( (++p2) < n_in) {         \
  |  |  ------------------
  |  |  |  Branch (705:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  706|      0|        e2 = VECTOR(inadj )[p2]; \
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  707|      0|        n2 = IGRAPH_FROM(graph, e2);        \
  |  |  ------------------
  |  |  |  |  113|      0|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  708|      0|    }
  ------------------
  728|      0|                }
  729|      0|            }
  730|      0|        }
  731|       |
  732|      0|#undef STEPOUT
  733|      0|#undef STEPIN
  734|       |
  735|      0|        igraph_vector_int_destroy(&outadj);
  736|      0|        igraph_vector_int_destroy(&inadj);
  737|      0|        IGRAPH_FINALLY_CLEAN(2);
  738|       |
  739|      0|        IGRAPH_CHECK(igraph_create(&newgraph, &edges,
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  740|      0|                                   no_of_nodes,
  741|      0|                                   IGRAPH_UNDIRECTED));
  742|      0|        IGRAPH_FINALLY(igraph_destroy, &newgraph);
  ------------------
  |  |  591|      0|    do { \
  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  743|      0|        igraph_vector_int_destroy(&edges);
  744|      0|        IGRAPH_CHECK(igraph_i_attribute_copy(&newgraph, graph, true, true, /* edges= */ false));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  745|       |
  746|      0|        if (attr) {
  ------------------
  |  Branch (746:13): [True: 0, False: 0]
  ------------------
  747|      0|            igraph_fixed_vectorlist_t vl;
  748|      0|            IGRAPH_CHECK(igraph_fixed_vectorlist_convert(&vl, &mergeinto, actedge));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  749|      0|            IGRAPH_FINALLY(igraph_fixed_vectorlist_destroy, &vl);
  ------------------
  |  |  591|      0|    do { \
  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  750|       |
  751|      0|            IGRAPH_CHECK(igraph_i_attribute_combine_edges(graph, &newgraph, &vl.vecs, edge_comb));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  752|       |
  753|      0|            igraph_fixed_vectorlist_destroy(&vl);
  754|      0|            IGRAPH_FINALLY_CLEAN(1);
  755|      0|        }
  756|       |
  757|      0|        IGRAPH_FINALLY_CLEAN(2);
  758|      0|        igraph_destroy(graph);
  759|      0|        *graph = newgraph;
  760|       |
  761|      0|        if (attr) {
  ------------------
  |  Branch (761:13): [True: 0, False: 0]
  ------------------
  762|      0|            igraph_vector_int_destroy(&mergeinto);
  763|      0|            IGRAPH_FINALLY_CLEAN(1);
  764|      0|        }
  765|      0|    }
  766|       |
  767|    732|    return IGRAPH_SUCCESS;
  768|    732|}

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

igraph_global_efficiency:
  433|    732|{
  434|    732|    return igraph_i_average_path_length_dijkstra(graph, res, NULL, weights, directed, /* invert= */ true, /* unconn= */ false);
  435|    732|}
igraph_local_efficiency:
  722|    732|{
  723|    732|    igraph_integer_t no_of_nodes = igraph_vcount(graph);
  724|    732|    igraph_integer_t no_of_edges = igraph_ecount(graph);
  725|    732|    igraph_integer_t nodes_to_calc; /* no. of vertices includes in computation */
  726|    732|    igraph_vit_t vit;
  727|    732|    igraph_vector_int_t vertex_neis;
  728|    732|    igraph_vector_char_t nei_mask;
  729|    732|    igraph_integer_t i;
  730|       |
  731|       |    /* 'nei_mask' is a vector indexed by vertices. The meaning of its values is as follows:
  732|       |     *   0: not a neighbour of 'vertex'
  733|       |     *   1: a not-yet-processed neighbour of 'vertex'
  734|       |     *   2: an already processed neighbour of 'vertex'
  735|       |     *
  736|       |     * Marking neighbours of already processed is necessary to avoid processing them more
  737|       |     * than once in multigraphs.
  738|       |     */
  739|    732|    IGRAPH_CHECK(igraph_vector_char_init(&nei_mask, no_of_nodes));
  ------------------
  |  |  648|    732|    do { \
  |  |  649|    732|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    732|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    732|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 732]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  740|    732|    IGRAPH_FINALLY(igraph_vector_char_destroy, &nei_mask);
  ------------------
  |  |  591|    732|    do { \
  |  |  592|    732|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|    732|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|    732|         * incorrect destructor function with the pointer */ \
  |  |  595|    732|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|    732|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  741|    732|    IGRAPH_VECTOR_INT_INIT_FINALLY(&vertex_neis, 0);
  ------------------
  |  |  124|    732|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|    732|    do { \
  |  |  |  |  649|    732|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|    732|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|    732|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 732]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|    732|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|    732|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|    732|    do { \
  |  |  |  |  592|    732|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|    732|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|    732|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|    732|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|    732|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|    732|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  742|       |
  743|    732|    IGRAPH_CHECK(igraph_vit_create(graph, vids, &vit));
  ------------------
  |  |  648|    732|    do { \
  |  |  649|    732|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    732|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    732|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 732]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  744|    732|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  591|    732|    do { \
  |  |  592|    732|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|    732|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|    732|         * incorrect destructor function with the pointer */ \
  |  |  595|    732|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|    732|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  745|       |
  746|    732|    nodes_to_calc = IGRAPH_VIT_SIZE(vit);
  ------------------
  |  |  191|    732|#define IGRAPH_VIT_SIZE(vit)  ((vit).end - (vit).start)
  ------------------
  747|       |
  748|    732|    IGRAPH_CHECK(igraph_vector_resize(res, nodes_to_calc));
  ------------------
  |  |  648|    732|    do { \
  |  |  649|    732|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    732|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    732|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 732]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  749|       |
  750|    732|    if (! weights) /* unweighted case */
  ------------------
  |  Branch (750:9): [True: 0, False: 732]
  ------------------
  751|      0|    {
  752|      0|        igraph_integer_t *already_counted;
  753|      0|        igraph_adjlist_t adjlist;
  754|      0|        igraph_dqueue_int_t q = IGRAPH_DQUEUE_NULL;
  ------------------
  |  |   61|      0|#define IGRAPH_DQUEUE_NULL { 0,0,0,0 }
  ------------------
  755|       |
  756|      0|        already_counted = IGRAPH_CALLOC(no_of_nodes, igraph_integer_t);
  ------------------
  |  |   38|      0|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|      0|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 0, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 0, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  757|      0|        IGRAPH_CHECK_OOM(already_counted, "Insufficient memory for local efficiency calculation.");
  ------------------
  |  |  701|      0|    do { \
  |  |  702|      0|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  758|      0|        IGRAPH_FINALLY(igraph_free, already_counted);
  ------------------
  |  |  591|      0|    do { \
  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  759|       |
  760|      0|        IGRAPH_CHECK(igraph_adjlist_init(
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  ------------------
  |  |  |  Branch (649:40): [True: 0, False: 0]
  |  |  ------------------
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  761|      0|            graph, &adjlist,
  762|      0|            directed ? IGRAPH_OUT : IGRAPH_ALL,
  763|      0|            IGRAPH_LOOPS, IGRAPH_MULTIPLE
  764|      0|        ));
  765|      0|        IGRAPH_FINALLY(igraph_adjlist_destroy, &adjlist);
  ------------------
  |  |  591|      0|    do { \
  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  766|       |
  767|      0|        IGRAPH_DQUEUE_INT_INIT_FINALLY(&q, 100);
  ------------------
  |  |   66|      0|    do { IGRAPH_CHECK(igraph_dqueue_int_init(q, capacity)); \
  |  |  ------------------
  |  |  |  |  648|      0|    do { \
  |  |  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   67|      0|        IGRAPH_FINALLY(igraph_dqueue_int_destroy, q); } while (0)
  |  |  ------------------
  |  |  |  |  591|      0|    do { \
  |  |  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (67:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  768|       |
  769|      0|        for (IGRAPH_VIT_RESET(vit), i=0;
  ------------------
  |  |  202|      0|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
  770|      0|             ! IGRAPH_VIT_END(vit);
  ------------------
  |  |  180|      0|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (770:14): [True: 0, False: 0]
  ------------------
  771|      0|             IGRAPH_VIT_NEXT(vit), i++)
  ------------------
  |  |  168|      0|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  772|      0|        {
  773|      0|            IGRAPH_CHECK(igraph_i_local_efficiency_unweighted(
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  ------------------
  |  |  |  Branch (649:40): [True: 0, False: 0]
  |  |  ------------------
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  774|      0|                             graph, &adjlist,
  775|      0|                             &q, already_counted, &vertex_neis, &nei_mask,
  776|      0|                             &(VECTOR(*res)[i]), IGRAPH_VIT_GET(vit), mode));
  777|      0|        }
  778|       |
  779|      0|        igraph_dqueue_int_destroy(&q);
  780|      0|        igraph_adjlist_destroy(&adjlist);
  781|      0|        IGRAPH_FREE(already_counted);
  ------------------
  |  |   41|      0|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  782|      0|        IGRAPH_FINALLY_CLEAN(3);
  783|      0|    }
  784|    732|    else /* weighted case */
  785|    732|    {
  786|    732|        igraph_lazy_inclist_t inclist;
  787|    732|        igraph_2wheap_t Q;
  788|       |
  789|    732|        if (igraph_vector_size(weights) != no_of_edges) {
  ------------------
  |  Branch (789:13): [True: 0, False: 732]
  ------------------
  790|      0|            IGRAPH_ERROR("Weight vector length does not match the number of edges.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  791|      0|        }
  792|    732|        if (no_of_edges > 0) {
  ------------------
  |  Branch (792:13): [True: 692, False: 40]
  ------------------
  793|    692|            igraph_real_t min = igraph_vector_min(weights);
  794|    692|            if (min < 0) {
  ------------------
  |  Branch (794:17): [True: 0, False: 692]
  ------------------
  795|      0|                IGRAPH_ERRORF("Weights must not be negative, got %g.", IGRAPH_EINVAL, min);
  ------------------
  |  |  469|      0|    do { \
  |  |  470|      0|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  471|      0|                      igraph_errno, __VA_ARGS__) ; \
  |  |  472|      0|        return igraph_errno; \
  |  |  473|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (473:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  796|      0|            }
  797|    692|            else if (isnan(min)) {
  798|      0|                IGRAPH_ERROR("Weights must not contain NaN values.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  799|      0|            }
  800|    692|        }
  801|       |
  802|    732|        IGRAPH_CHECK(igraph_lazy_inclist_init(
  ------------------
  |  |  648|    732|    do { \
  |  |  649|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  ------------------
  |  |  |  Branch (649:40): [True: 732, False: 0]
  |  |  ------------------
  |  |  650|    732|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    732|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 732]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  803|    732|            graph, &inclist, directed ? IGRAPH_OUT : IGRAPH_ALL, IGRAPH_LOOPS
  804|    732|        ));
  805|    732|        IGRAPH_FINALLY(igraph_lazy_inclist_destroy, &inclist);
  ------------------
  |  |  591|    732|    do { \
  |  |  592|    732|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|    732|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|    732|         * incorrect destructor function with the pointer */ \
  |  |  595|    732|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|    732|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  806|    732|        IGRAPH_CHECK(igraph_2wheap_init(&Q, no_of_nodes));
  ------------------
  |  |  648|    732|    do { \
  |  |  649|    732|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    732|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    732|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 732]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  807|    732|        IGRAPH_FINALLY(igraph_2wheap_destroy, &Q);
  ------------------
  |  |  591|    732|    do { \
  |  |  592|    732|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|    732|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|    732|         * incorrect destructor function with the pointer */ \
  |  |  595|    732|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|    732|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  808|       |
  809|    732|        for (IGRAPH_VIT_RESET(vit), i=0;
  ------------------
  |  |  202|    732|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
  810|  32.5k|             ! IGRAPH_VIT_END(vit);
  ------------------
  |  |  180|  32.5k|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (810:14): [True: 31.8k, False: 732]
  ------------------
  811|  31.8k|             IGRAPH_VIT_NEXT(vit), i++)
  ------------------
  |  |  168|  31.8k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  812|  31.8k|        {
  813|  31.8k|            IGRAPH_CHECK(igraph_i_local_efficiency_dijkstra(
  ------------------
  |  |  648|  31.8k|    do { \
  |  |  649|  63.7k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  ------------------
  |  |  |  Branch (649:40): [True: 31.8k, False: 0]
  |  |  ------------------
  |  |  650|  31.8k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  31.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 31.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  31.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  814|  31.8k|                             graph, &inclist,
  815|  31.8k|                             &Q, &vertex_neis, &nei_mask,
  816|  31.8k|                             &(VECTOR(*res)[i]), IGRAPH_VIT_GET(vit), mode, weights));
  817|  31.8k|        }
  818|       |
  819|    732|        igraph_2wheap_destroy(&Q);
  820|    732|        igraph_lazy_inclist_destroy(&inclist);
  821|    732|        IGRAPH_FINALLY_CLEAN(2);
  822|    732|    }
  823|       |
  824|    732|    igraph_vit_destroy(&vit);
  825|    732|    igraph_vector_int_destroy(&vertex_neis);
  826|    732|    igraph_vector_char_destroy(&nei_mask);
  827|    732|    IGRAPH_FINALLY_CLEAN(3);
  828|       |
  829|    732|    return IGRAPH_SUCCESS;
  830|    732|}
shortest_paths.c:igraph_i_average_path_length_dijkstra:
  157|    732|{
  158|       |
  159|       |    /* Implementation details. This is the basic Dijkstra algorithm,
  160|       |       with a binary heap. The heap is indexed, i.e. it stores not only
  161|       |       the distances, but also which vertex they belong to.
  162|       |
  163|       |       From now on we use a 2-way heap, so the distances can be queried
  164|       |       directly from the heap.
  165|       |
  166|       |       Dirty tricks:
  167|       |       - the opposite of the distance is stored in the heap, as it is a
  168|       |         maximum heap and we need a minimum heap.
  169|       |       - we don't use IGRAPH_INFINITY in the res matrix during the
  170|       |         computation, as isfinite() might involve a function call
  171|       |         and we want to spare that. -1 will denote infinity instead.
  172|       |    */
  173|       |
  174|    732|    igraph_integer_t no_of_nodes = igraph_vcount(graph);
  175|    732|    igraph_integer_t no_of_edges = igraph_ecount(graph);
  176|    732|    igraph_2wheap_t Q;
  177|    732|    igraph_lazy_inclist_t inclist;
  178|    732|    igraph_real_t no_of_pairs;
  179|    732|    igraph_real_t no_of_conn_pairs = 0.0; /* no. of ordered pairs between which there is a path */
  180|       |
  181|    732|    if (!weights) {
  ------------------
  |  Branch (181:9): [True: 0, False: 732]
  ------------------
  182|      0|        return igraph_i_average_path_length_unweighted(graph, res, unconnected_pairs, directed, invert, unconn);
  183|      0|    }
  184|       |
  185|    732|    if (igraph_vector_size(weights) != no_of_edges) {
  ------------------
  |  Branch (185:9): [True: 0, False: 732]
  ------------------
  186|      0|        IGRAPH_ERRORF("Weight vector length (%" IGRAPH_PRId ") does not match the number of edges (%" IGRAPH_PRId ").",
  ------------------
  |  |  469|      0|    do { \
  |  |  470|      0|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  471|      0|                      igraph_errno, __VA_ARGS__) ; \
  |  |  472|      0|        return igraph_errno; \
  |  |  473|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (473:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  187|      0|                      IGRAPH_EINVAL, igraph_vector_size(weights), no_of_edges);
  188|      0|    }
  189|    732|    if (no_of_edges > 0) {
  ------------------
  |  Branch (189:9): [True: 692, False: 40]
  ------------------
  190|    692|        igraph_real_t min = igraph_vector_min(weights);
  191|    692|        if (min < 0) {
  ------------------
  |  Branch (191:13): [True: 0, False: 692]
  ------------------
  192|      0|            IGRAPH_ERRORF("Weight vector must be non-negative, got %g.", IGRAPH_EINVAL, min);
  ------------------
  |  |  469|      0|    do { \
  |  |  470|      0|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  471|      0|                      igraph_errno, __VA_ARGS__) ; \
  |  |  472|      0|        return igraph_errno; \
  |  |  473|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (473:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  193|      0|        }
  194|    692|        else if (isnan(min)) {
  195|      0|            IGRAPH_ERROR("Weight vector must not contain NaN values.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  196|      0|        }
  197|    692|    }
  198|       |
  199|       |    /* Avoid returning a negative zero, which would be printed as -0 in tests. */
  200|    732|    if (no_of_nodes > 0) {
  ------------------
  |  Branch (200:9): [True: 731, False: 1]
  ------------------
  201|    731|        no_of_pairs = no_of_nodes * (no_of_nodes - 1.0);
  202|    731|    } else {
  203|      1|        no_of_pairs = 0;
  204|      1|    }
  205|       |
  206|    732|    IGRAPH_CHECK(igraph_2wheap_init(&Q, no_of_nodes));
  ------------------
  |  |  648|    732|    do { \
  |  |  649|    732|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    732|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    732|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 732]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  207|    732|    IGRAPH_FINALLY(igraph_2wheap_destroy, &Q);
  ------------------
  |  |  591|    732|    do { \
  |  |  592|    732|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|    732|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|    732|         * incorrect destructor function with the pointer */ \
  |  |  595|    732|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|    732|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  208|    732|    IGRAPH_CHECK(igraph_lazy_inclist_init(
  ------------------
  |  |  648|    732|    do { \
  |  |  649|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  ------------------
  |  |  |  Branch (649:40): [True: 732, False: 0]
  |  |  ------------------
  |  |  650|    732|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    732|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 732]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  209|    732|        graph, &inclist, directed ? IGRAPH_OUT : IGRAPH_ALL, IGRAPH_LOOPS
  210|    732|    ));
  211|    732|    IGRAPH_FINALLY(igraph_lazy_inclist_destroy, &inclist);
  ------------------
  |  |  591|    732|    do { \
  |  |  592|    732|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|    732|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|    732|         * incorrect destructor function with the pointer */ \
  |  |  595|    732|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|    732|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  212|       |
  213|    732|    *res = 0.0;
  214|       |
  215|  32.5k|    for (igraph_integer_t source = 0; source < no_of_nodes; ++source) {
  ------------------
  |  Branch (215:39): [True: 31.8k, False: 732]
  ------------------
  216|       |
  217|  31.8k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   47|  31.8k|    do { \
  |  |   48|  31.8k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (48:13): [True: 0, False: 31.8k]
  |  |  ------------------
  |  |   49|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (49:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   50|      0|                return IGRAPH_INTERRUPTED; \
  |  |   51|      0|            } \
  |  |   52|      0|        } \
  |  |   53|  31.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (53:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  218|       |
  219|  31.8k|        igraph_2wheap_clear(&Q);
  220|  31.8k|        igraph_2wheap_push_with_index(&Q, source, -1.0);
  221|       |
  222|   118k|        while (!igraph_2wheap_empty(&Q)) {
  ------------------
  |  Branch (222:16): [True: 86.4k, False: 31.8k]
  ------------------
  223|  86.4k|            igraph_integer_t minnei = igraph_2wheap_max_index(&Q);
  224|  86.4k|            igraph_real_t mindist = -igraph_2wheap_deactivate_max(&Q);
  225|  86.4k|            igraph_vector_int_t *neis;
  226|  86.4k|            igraph_integer_t nlen;
  227|       |
  228|  86.4k|            if (minnei != source) {
  ------------------
  |  Branch (228:17): [True: 54.5k, False: 31.8k]
  ------------------
  229|  54.5k|                if (invert) {
  ------------------
  |  Branch (229:21): [True: 54.5k, False: 0]
  ------------------
  230|  54.5k|                    *res += 1.0/(mindist - 1.0);
  231|  54.5k|                } else {
  232|      0|                    *res += mindist - 1.0;
  233|      0|                }
  234|  54.5k|                no_of_conn_pairs += 1;
  235|  54.5k|            }
  236|       |
  237|       |            /* Now check all neighbors of 'minnei' for a shorter path */
  238|  86.4k|            neis = igraph_lazy_inclist_get(&inclist, minnei);
  ------------------
  |  |  219|  86.4k|    (igraph_lazy_inclist_has(il,no) ? ((il)->incs[(igraph_integer_t)(no)]) \
  |  |  ------------------
  |  |  |  |  194|  86.4k|#define igraph_lazy_inclist_has(il,no) ((il)->incs[(igraph_integer_t)(no)] != NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:40): [True: 54.5k, False: 31.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  220|  86.4k|                                    : (igraph_i_lazy_inclist_get_real(il,no)))
  ------------------
  239|  86.4k|            IGRAPH_CHECK_OOM(neis, "Failed to query incident edges.");
  ------------------
  |  |  701|  86.4k|    do { \
  |  |  702|  86.4k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|  86.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 86.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|  86.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  240|  86.4k|            nlen = igraph_vector_int_size(neis);
  241|   236k|            for (igraph_integer_t j = 0; j < nlen; j++) {
  ------------------
  |  Branch (241:42): [True: 150k, False: 86.4k]
  ------------------
  242|   150k|                igraph_integer_t edge = VECTOR(*neis)[j];
  ------------------
  |  |   65|   150k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  243|   150k|                igraph_integer_t tto = IGRAPH_OTHER(graph, edge, minnei);
  ------------------
  |  |  144|   150k|    ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  126|   150k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|   150k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  113|  17.0k|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  17.0k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  126|   133k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|   133k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (144:25): [True: 17.0k, False: 133k]
  |  |  ------------------
  ------------------
  244|   150k|                igraph_real_t altdist = mindist + VECTOR(*weights)[edge];
  ------------------
  |  |   65|   150k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  245|   150k|                igraph_bool_t active = igraph_2wheap_has_active(&Q, tto);
  246|   150k|                igraph_bool_t has = igraph_2wheap_has_elem(&Q, tto);
  247|   150k|                igraph_real_t curdist = active ? -igraph_2wheap_get(&Q, tto) : 0.0;
  ------------------
  |  Branch (247:41): [True: 32.0k, False: 118k]
  ------------------
  248|   150k|                if (altdist == IGRAPH_INFINITY) {
  ------------------
  |  |  140|   150k|#define IGRAPH_INFINITY ((double)INFINITY)
  ------------------
  |  Branch (248:21): [True: 0, False: 150k]
  ------------------
  249|       |                    /* Ignore edges with positive infinite weight */
  250|   150k|                } else if (!has) {
  ------------------
  |  Branch (250:28): [True: 54.5k, False: 95.5k]
  ------------------
  251|       |                    /* This is the first non-infinite distance */
  252|  54.5k|                    IGRAPH_CHECK(igraph_2wheap_push_with_index(&Q, tto, -altdist));
  ------------------
  |  |  648|  54.5k|    do { \
  |  |  649|  54.5k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  54.5k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  54.5k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 54.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  54.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  253|  95.5k|                } else if (altdist < curdist) {
  ------------------
  |  Branch (253:28): [True: 8.31k, False: 87.2k]
  ------------------
  254|       |                    /* This is a shorter path */
  255|  8.31k|                    igraph_2wheap_modify(&Q, tto, -altdist);
  256|  8.31k|                }
  257|   150k|            }
  258|  86.4k|        } /* !igraph_2wheap_empty(&Q) */
  259|  31.8k|    } /* for source < no_of_nodes */
  260|       |
  261|    732|    if (no_of_pairs == 0) {
  ------------------
  |  Branch (261:9): [True: 6, False: 726]
  ------------------
  262|      6|        *res = IGRAPH_NAN; /* can't average zero items */
  ------------------
  |  |  143|      6|#define IGRAPH_NAN ((double)NAN)
  ------------------
  263|    726|    } else {
  264|    726|        if (unconn) { /* average over connected pairs */
  ------------------
  |  Branch (264:13): [True: 0, False: 726]
  ------------------
  265|      0|            if (no_of_conn_pairs == 0) {
  ------------------
  |  Branch (265:17): [True: 0, False: 0]
  ------------------
  266|      0|                *res = IGRAPH_NAN; /* can't average zero items */
  ------------------
  |  |  143|      0|#define IGRAPH_NAN ((double)NAN)
  ------------------
  267|      0|            } else {
  268|      0|                *res /= no_of_conn_pairs;
  269|      0|            }
  270|    726|        } else { /* average over all pairs */
  271|       |            /* no_of_conn_pairs < no_of_pairs implies that the graph is disconnected */
  272|    726|            if (no_of_conn_pairs < no_of_pairs && ! invert) {
  ------------------
  |  Branch (272:17): [True: 718, False: 8]
  |  Branch (272:51): [True: 0, False: 718]
  ------------------
  273|      0|                *res = IGRAPH_INFINITY;
  ------------------
  |  |  140|      0|#define IGRAPH_INFINITY ((double)INFINITY)
  ------------------
  274|    726|            } else {
  275|    726|                *res /= no_of_pairs;
  276|    726|            }
  277|    726|        }
  278|    726|    }
  279|       |
  280|    732|    if (unconnected_pairs) {
  ------------------
  |  Branch (280:9): [True: 0, False: 732]
  ------------------
  281|      0|        *unconnected_pairs = no_of_pairs - no_of_conn_pairs;
  282|      0|    }
  283|       |
  284|    732|    igraph_lazy_inclist_destroy(&inclist);
  285|    732|    igraph_2wheap_destroy(&Q);
  286|    732|    IGRAPH_FINALLY_CLEAN(2);
  287|       |
  288|    732|    return IGRAPH_SUCCESS;
  289|    732|}
shortest_paths.c:igraph_i_local_efficiency_dijkstra:
  548|  31.8k|{
  549|       |
  550|       |    /* Implementation details. This is the basic Dijkstra algorithm,
  551|       |       with a binary heap. The heap is indexed, i.e. it stores not only
  552|       |       the distances, but also which vertex they belong to.
  553|       |
  554|       |       From now on we use a 2-way heap, so the distances can be queried
  555|       |       directly from the heap.
  556|       |
  557|       |       Dirty tricks:
  558|       |       - the opposite of the distance is stored in the heap, as it is a
  559|       |         maximum heap and we need a minimum heap.
  560|       |       - we don't use IGRAPH_INFINITY in the res matrix during the
  561|       |         computation, as isfinite() might involve a function call
  562|       |         and we want to spare that. -1 will denote infinity instead.
  563|       |    */
  564|       |
  565|  31.8k|    igraph_integer_t vertex_neis_size;
  566|  31.8k|    igraph_integer_t neighbor_count; /* unlike 'inc_edges_size', 'neighbor_count' does not count self-loops or multi-edges */
  567|       |
  568|  31.8k|    IGRAPH_CHECK(igraph_neighbors(graph, vertex_neis, vertex, mode));
  ------------------
  |  |  648|  31.8k|    do { \
  |  |  649|  31.8k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  31.8k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  31.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 31.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  31.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  569|  31.8k|    vertex_neis_size = igraph_vector_int_size(vertex_neis);
  570|       |
  571|  31.8k|    igraph_vector_char_null(nei_mask);
  572|  31.8k|    neighbor_count = 0;
  573|  50.0k|    for (igraph_integer_t i=0; i < vertex_neis_size; ++i) {
  ------------------
  |  Branch (573:32): [True: 18.2k, False: 31.8k]
  ------------------
  574|  18.2k|        igraph_integer_t v = VECTOR(*vertex_neis)[i];
  ------------------
  |  |   65|  18.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  575|  18.2k|        if (v != vertex && ! VECTOR(*nei_mask)[v]) {
  ------------------
  |  |   65|  14.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (575:13): [True: 14.2k, False: 3.94k]
  |  Branch (575:28): [True: 8.77k, False: 5.48k]
  ------------------
  576|  8.77k|            VECTOR(*nei_mask)[v] = 1; /* mark as unprocessed neighbour */
  ------------------
  |  |   65|  8.77k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  577|  8.77k|            neighbor_count++;
  578|  8.77k|        }
  579|  18.2k|    }
  580|       |
  581|  31.8k|    *res = 0.0;
  582|       |
  583|       |    /* when the neighbor count is smaller than 2, we return 0.0 */
  584|  31.8k|    if (neighbor_count < 2) {
  ------------------
  |  Branch (584:9): [True: 30.3k, False: 1.53k]
  ------------------
  585|  30.3k|        return IGRAPH_SUCCESS;
  586|  30.3k|    }
  587|       |
  588|  10.9k|    for (igraph_integer_t i=0; i < vertex_neis_size; ++i) {
  ------------------
  |  Branch (588:32): [True: 9.37k, False: 1.53k]
  ------------------
  589|  9.37k|        igraph_integer_t source = VECTOR(*vertex_neis)[i];
  ------------------
  |  |   65|  9.37k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  590|  9.37k|        igraph_integer_t reached = 0;
  591|       |
  592|  9.37k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   47|  9.37k|    do { \
  |  |   48|  9.37k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (48:13): [True: 0, False: 9.37k]
  |  |  ------------------
  |  |   49|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (49:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   50|      0|                return IGRAPH_INTERRUPTED; \
  |  |   51|      0|            } \
  |  |   52|      0|        } \
  |  |   53|  9.37k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (53:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  593|       |
  594|  9.37k|        if (source == vertex)
  ------------------
  |  Branch (594:13): [True: 1.13k, False: 8.23k]
  ------------------
  595|  1.13k|            continue;
  596|       |
  597|       |        /* avoid processing a neighbour twice in multigraphs */
  598|  8.23k|        if (VECTOR(*nei_mask)[source] == 2)
  ------------------
  |  |   65|  8.23k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (598:13): [True: 2.49k, False: 5.73k]
  ------------------
  599|  2.49k|            continue;
  600|  5.73k|        VECTOR(*nei_mask)[source] = 2; /* mark as already processed */
  ------------------
  |  |   65|  5.73k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  601|       |
  602|  5.73k|        igraph_2wheap_clear(Q);
  603|  5.73k|        igraph_2wheap_push_with_index(Q, source, -1.0);
  604|       |
  605|  95.9k|        while (!igraph_2wheap_empty(Q)) {
  ------------------
  |  Branch (605:16): [True: 90.1k, False: 5.73k]
  ------------------
  606|  90.1k|            igraph_integer_t minnei = igraph_2wheap_max_index(Q);
  607|  90.1k|            igraph_real_t mindist = -igraph_2wheap_deactivate_max(Q);
  608|  90.1k|            igraph_vector_int_t *neis;
  609|  90.1k|            igraph_integer_t nlen;
  610|       |
  611|  90.1k|            if (minnei != source && VECTOR(*nei_mask)[minnei]) {
  ------------------
  |  |   65|  84.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (611:17): [True: 84.4k, False: 5.73k]
  |  Branch (611:37): [True: 11.1k, False: 73.3k]
  ------------------
  612|  11.1k|                *res += 1.0/(mindist - 1.0);
  613|  11.1k|                reached++;
  614|  11.1k|                if (reached == neighbor_count) {
  ------------------
  |  Branch (614:21): [True: 0, False: 11.1k]
  ------------------
  615|      0|                    igraph_2wheap_clear(Q);
  616|      0|                    break;
  617|      0|                }
  618|  11.1k|            }
  619|       |
  620|       |            /* Now check all neighbors of 'minnei' for a shorter path */
  621|  90.1k|            neis = igraph_lazy_inclist_get(inclist, minnei);
  ------------------
  |  |  219|  90.1k|    (igraph_lazy_inclist_has(il,no) ? ((il)->incs[(igraph_integer_t)(no)]) \
  |  |  ------------------
  |  |  |  |  194|  90.1k|#define igraph_lazy_inclist_has(il,no) ((il)->incs[(igraph_integer_t)(no)] != NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:40): [True: 86.3k, False: 3.82k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  220|  90.1k|                                    : (igraph_i_lazy_inclist_get_real(il,no)))
  ------------------
  622|  90.1k|            IGRAPH_CHECK_OOM(neis, "Failed to query incident edges.");
  ------------------
  |  |  701|  90.1k|    do { \
  |  |  702|  90.1k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|  90.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 90.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|  90.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  623|  90.1k|            nlen = igraph_vector_int_size(neis);
  624|   347k|            for (igraph_integer_t j = 0; j < nlen; j++) {
  ------------------
  |  Branch (624:42): [True: 257k, False: 90.1k]
  ------------------
  625|   257k|                igraph_real_t altdist, curdist;
  626|   257k|                igraph_bool_t active, has;
  627|   257k|                igraph_integer_t edge = VECTOR(*neis)[j];
  ------------------
  |  |   65|   257k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  628|   257k|                igraph_integer_t tto = IGRAPH_OTHER(graph, edge, minnei);
  ------------------
  |  |  144|   257k|    ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  126|   257k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|   257k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  113|  14.2k|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  14.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  126|   243k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|   243k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (144:25): [True: 14.2k, False: 243k]
  |  |  ------------------
  ------------------
  629|       |
  630|   257k|                if (tto == vertex) {
  ------------------
  |  Branch (630:21): [True: 10.6k, False: 246k]
  ------------------
  631|  10.6k|                    continue;
  632|  10.6k|                }
  633|       |
  634|   246k|                altdist = mindist + VECTOR(*weights)[edge];
  ------------------
  |  |   65|   246k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  635|   246k|                active = igraph_2wheap_has_active(Q, tto);
  636|   246k|                has = igraph_2wheap_has_elem(Q, tto);
  637|   246k|                curdist = active ? -igraph_2wheap_get(Q, tto) : 0.0;
  ------------------
  |  Branch (637:27): [True: 52.6k, False: 194k]
  ------------------
  638|   246k|                if (!has) {
  ------------------
  |  Branch (638:21): [True: 84.4k, False: 162k]
  ------------------
  639|       |                    /* This is the first non-infinite distance */
  640|  84.4k|                    IGRAPH_CHECK(igraph_2wheap_push_with_index(Q, tto, -altdist));
  ------------------
  |  |  648|  84.4k|    do { \
  |  |  649|  84.4k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  84.4k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  84.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 84.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  84.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  641|   162k|                } else if (altdist < curdist) {
  ------------------
  |  Branch (641:28): [True: 16.6k, False: 145k]
  ------------------
  642|       |                    /* This is a shorter path */
  643|  16.6k|                    igraph_2wheap_modify(Q, tto, -altdist);
  644|  16.6k|                }
  645|   246k|            }
  646|       |
  647|  90.1k|        } /* !igraph_2wheap_empty(&Q) */
  648|       |
  649|  5.73k|    }
  650|       |
  651|  1.53k|    *res /= neighbor_count * (neighbor_count - 1.0);
  652|       |
  653|  1.53k|    return IGRAPH_SUCCESS;
  654|  1.53k|}

igraph_diversity:
  174|    732|                     igraph_vector_t *res, const igraph_vs_t vids) {
  175|       |
  176|    732|    igraph_integer_t no_of_edges = igraph_ecount(graph);
  177|    732|    igraph_integer_t k, i;
  178|    732|    igraph_vector_int_t incident;
  179|    732|    igraph_bool_t has_multiple;
  180|    732|    igraph_vit_t vit;
  181|       |
  182|    732|    if (igraph_is_directed(graph)) {
  ------------------
  |  Branch (182:9): [True: 0, False: 732]
  ------------------
  183|      0|        IGRAPH_ERROR("Diversity measure works with undirected graphs only.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  184|      0|    }
  185|       |
  186|    732|    if (!weights) {
  ------------------
  |  Branch (186:9): [True: 0, False: 732]
  ------------------
  187|      0|        IGRAPH_ERROR("Edge weights must be given.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  188|      0|    }
  189|       |
  190|    732|    if (igraph_vector_size(weights) != no_of_edges) {
  ------------------
  |  Branch (190:9): [True: 0, False: 732]
  ------------------
  191|      0|        IGRAPH_ERROR("Invalid edge weight vector length.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  192|      0|    }
  193|       |
  194|    732|    IGRAPH_CHECK(igraph_has_multiple(graph, &has_multiple));
  ------------------
  |  |  648|    732|    do { \
  |  |  649|    732|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    732|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    732|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 732]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  195|    732|    if (has_multiple) {
  ------------------
  |  Branch (195:9): [True: 0, False: 732]
  ------------------
  196|      0|        IGRAPH_ERROR("Diversity measure works only if the graph has no multiple edges.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  197|      0|    }
  198|       |
  199|    732|    if (no_of_edges > 0) {
  ------------------
  |  Branch (199:9): [True: 659, False: 73]
  ------------------
  200|    659|        igraph_real_t minweight = igraph_vector_min(weights);
  201|    659|        if (minweight < 0) {
  ------------------
  |  Branch (201:13): [True: 0, False: 659]
  ------------------
  202|      0|            IGRAPH_ERROR("Weight vector must be non-negative.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  203|    659|        } else if (isnan(minweight)) {
  204|      0|            IGRAPH_ERROR("Weight vector must not contain NaN values.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  205|      0|        }
  206|    659|    }
  207|       |
  208|    732|    IGRAPH_VECTOR_INT_INIT_FINALLY(&incident, 10);
  ------------------
  |  |  124|    732|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|    732|    do { \
  |  |  |  |  649|    732|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|    732|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|    732|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 732]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|    732|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|    732|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|    732|    do { \
  |  |  |  |  592|    732|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|    732|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|    732|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|    732|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|    732|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|    732|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  209|       |
  210|    732|    IGRAPH_CHECK(igraph_vit_create(graph, vids, &vit));
  ------------------
  |  |  648|    732|    do { \
  |  |  649|    732|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    732|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    732|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 732]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  211|    732|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  591|    732|    do { \
  |  |  592|    732|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|    732|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|    732|         * incorrect destructor function with the pointer */ \
  |  |  595|    732|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|    732|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  212|       |
  213|    732|    igraph_vector_clear(res);
  214|    732|    IGRAPH_CHECK(igraph_vector_reserve(res, IGRAPH_VIT_SIZE(vit)));
  ------------------
  |  |  648|    732|    do { \
  |  |  649|    732|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    732|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    732|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 732]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    732|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  215|       |
  216|  32.5k|    for (IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  202|    732|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
                  for (IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  180|  32.5k|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
                  for (IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  168|  31.8k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  |  Branch (216:33): [True: 31.8k, False: 732]
  ------------------
  217|  31.8k|        igraph_real_t d;
  218|  31.8k|        igraph_integer_t v = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  215|  31.8k|    ((igraph_integer_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (215:25): [True: 31.8k, False: 0]
  |  |  ------------------
  |  |  216|  31.8k|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  219|       |
  220|  31.8k|        IGRAPH_CHECK(igraph_incident(graph, &incident, v, /*mode=*/ IGRAPH_ALL));
  ------------------
  |  |  648|  31.8k|    do { \
  |  |  649|  31.8k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  31.8k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  31.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 31.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  31.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  221|  31.8k|        k = igraph_vector_int_size(&incident); /* degree */
  222|       |
  223|       |        /*
  224|       |         * Non-normalized diversity is defined as
  225|       |         * d = -sum_i w_i/s log (w_i/s)
  226|       |         * where s = sum_i w_i. In order to avoid two passes through the w vector,
  227|       |         * we use the equivalent formulation of
  228|       |         * d = log s - (sum_i w_i log w_i) / s
  229|       |         * However, this formulation may not give an exact 0.0 for some w when k=1,
  230|       |         * due to roundoff errors (examples: w=3 or w=7). For this reason, we
  231|       |         * special-case the computation for k=1 even for the unnormalized diversity
  232|       |         * insted of just setting the normalization factor to 1 for this case.
  233|       |         */
  234|  31.8k|        if (k == 0) {
  ------------------
  |  Branch (234:13): [True: 24.8k, False: 7.03k]
  ------------------
  235|  24.8k|            d = IGRAPH_NAN;
  ------------------
  |  |  143|  24.8k|#define IGRAPH_NAN ((double)NAN)
  ------------------
  236|  24.8k|        } else if (k == 1) {
  ------------------
  |  Branch (236:20): [True: 3.80k, False: 3.23k]
  ------------------
  237|  3.80k|            if (VECTOR(*weights)[0] > 0) d = 0.0; /* s > 0 */
  ------------------
  |  |   65|  3.80k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (237:17): [True: 3.80k, False: 0]
  ------------------
  238|      0|            else d = IGRAPH_NAN; /* s == 0 */
  ------------------
  |  |  143|      0|#define IGRAPH_NAN ((double)NAN)
  ------------------
  239|  3.80k|        } else {
  240|  3.23k|            igraph_real_t s = 0.0, ent = 0.0;
  241|  16.5k|            for (i = 0; i < k; i++) {
  ------------------
  |  Branch (241:25): [True: 13.3k, False: 3.23k]
  ------------------
  242|  13.3k|                igraph_real_t w = VECTOR(*weights)[VECTOR(incident)[i]];
  ------------------
  |  |   65|  13.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              igraph_real_t w = VECTOR(*weights)[VECTOR(incident)[i]];
  ------------------
  |  |   65|  13.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  243|  13.3k|                if (w == 0) continue;
  ------------------
  |  Branch (243:21): [True: 0, False: 13.3k]
  ------------------
  244|  13.3k|                s += w;
  245|  13.3k|                ent += (w * log(w));
  246|  13.3k|            }
  247|  3.23k|            d = (log(s) - ent / s) / log(k);
  248|  3.23k|        }
  249|       |
  250|  31.8k|        igraph_vector_push_back(res, d); /* reserved */
  251|  31.8k|    }
  252|       |
  253|    732|    igraph_vit_destroy(&vit);
  254|    732|    igraph_vector_int_destroy(&incident);
  255|    732|    IGRAPH_FINALLY_CLEAN(2);
  256|       |
  257|    732|    return IGRAPH_SUCCESS;
  258|    732|}

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

igraph_i_strength_all:
  542|  1.46k|        const igraph_vector_t *weights) {
  543|       |
  544|       |    // When calculating strength for all vertices, iterating over edges is faster
  545|  1.46k|    igraph_integer_t no_of_nodes = igraph_vcount(graph);
  546|  1.46k|    igraph_integer_t no_of_edges = igraph_ecount(graph);
  547|       |
  548|  1.46k|    IGRAPH_CHECK(igraph_vector_resize(res, no_of_nodes));
  ------------------
  |  |  648|  1.46k|    do { \
  |  |  649|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  549|  1.46k|    igraph_vector_null(res);
  550|       |
  551|  1.46k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (551:9): [True: 731, False: 732]
  ------------------
  552|    731|        mode = IGRAPH_ALL;
  553|    731|    }
  554|       |
  555|  1.46k|    if (loops) {
  ------------------
  |  Branch (555:9): [True: 731, False: 732]
  ------------------
  556|    731|        if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (556:13): [True: 731, False: 0]
  ------------------
  557|  9.28k|            for (igraph_integer_t edge = 0; edge < no_of_edges; ++edge) {
  ------------------
  |  Branch (557:45): [True: 8.55k, False: 731]
  ------------------
  558|  8.55k|                VECTOR(*res)[IGRAPH_FROM(graph, edge)] += VECTOR(*weights)[edge];
  ------------------
  |  |   65|  8.55k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[IGRAPH_FROM(graph, edge)] += VECTOR(*weights)[edge];
  ------------------
  |  |  113|  8.55k|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|  8.55k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
                              VECTOR(*res)[IGRAPH_FROM(graph, edge)] += VECTOR(*weights)[edge];
  ------------------
  |  |   65|  8.55k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  559|  8.55k|            }
  560|    731|        }
  561|    731|        if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (561:13): [True: 731, False: 0]
  ------------------
  562|  9.28k|            for (igraph_integer_t edge = 0; edge < no_of_edges; ++edge) {
  ------------------
  |  Branch (562:45): [True: 8.55k, False: 731]
  ------------------
  563|  8.55k|                VECTOR(*res)[IGRAPH_TO(graph, edge)] += VECTOR(*weights)[edge];
  ------------------
  |  |   65|  8.55k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[IGRAPH_TO(graph, edge)] += VECTOR(*weights)[edge];
  ------------------
  |  |  126|  8.55k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|  8.55k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
                              VECTOR(*res)[IGRAPH_TO(graph, edge)] += VECTOR(*weights)[edge];
  ------------------
  |  |   65|  8.55k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  564|  8.55k|            }
  565|    731|        }
  566|    732|    } else {
  567|    732|        if (mode & IGRAPH_OUT) {
  ------------------
  |  Branch (567:13): [True: 732, False: 0]
  ------------------
  568|  18.9k|            for (igraph_integer_t edge = 0; edge < no_of_edges; ++edge) {
  ------------------
  |  Branch (568:45): [True: 18.2k, False: 732]
  ------------------
  569|  18.2k|                igraph_integer_t from = IGRAPH_FROM(graph, edge);
  ------------------
  |  |  113|  18.2k|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|  18.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  570|  18.2k|                if (from != IGRAPH_TO(graph, edge)) {
  ------------------
  |  |  126|  18.2k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|  18.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (570:21): [True: 14.2k, False: 3.94k]
  ------------------
  571|  14.2k|                   VECTOR(*res)[from] += VECTOR(*weights)[edge];
  ------------------
  |  |   65|  14.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                 VECTOR(*res)[from] += VECTOR(*weights)[edge];
  ------------------
  |  |   65|  14.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  572|  14.2k|                }
  573|  18.2k|            }
  574|    732|        }
  575|    732|        if (mode & IGRAPH_IN) {
  ------------------
  |  Branch (575:13): [True: 732, False: 0]
  ------------------
  576|  18.9k|            for (igraph_integer_t edge = 0; edge < no_of_edges; ++edge) {
  ------------------
  |  Branch (576:45): [True: 18.2k, False: 732]
  ------------------
  577|  18.2k|                igraph_integer_t to = IGRAPH_TO(graph, edge);
  ------------------
  |  |  126|  18.2k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|  18.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  578|  18.2k|                if (IGRAPH_FROM(graph, edge) != to) {
  ------------------
  |  |  113|  18.2k|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|  18.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (578:21): [True: 14.2k, False: 3.94k]
  ------------------
  579|  14.2k|                    VECTOR(*res)[to] += VECTOR(*weights)[edge];
  ------------------
  |  |   65|  14.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  VECTOR(*res)[to] += VECTOR(*weights)[edge];
  ------------------
  |  |   65|  14.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  580|  14.2k|                }
  581|  18.2k|            }
  582|    732|        }
  583|    732|    }
  584|       |
  585|  1.46k|    return IGRAPH_SUCCESS;
  586|  1.46k|}
igraph_strength:
  616|  1.46k|                    igraph_bool_t loops, const igraph_vector_t *weights) {
  617|       |
  618|  1.46k|    igraph_integer_t no_of_nodes = igraph_vcount(graph);
  619|  1.46k|    igraph_vit_t vit;
  620|  1.46k|    igraph_integer_t no_vids;
  621|  1.46k|    igraph_vector_int_t degrees;
  622|  1.46k|    igraph_vector_int_t neis;
  623|       |
  624|  1.46k|    if (! weights) {
  ------------------
  |  Branch (624:9): [True: 0, False: 1.46k]
  ------------------
  625|      0|        IGRAPH_VECTOR_INT_INIT_FINALLY(&degrees, no_of_nodes);
  ------------------
  |  |  124|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|      0|    do { \
  |  |  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|      0|    do { \
  |  |  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  626|      0|        IGRAPH_CHECK(igraph_vector_resize(res, no_of_nodes));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  627|      0|        IGRAPH_CHECK(igraph_degree(graph, &degrees, vids, mode, loops));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  628|      0|        for (igraph_integer_t i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (628:38): [True: 0, False: 0]
  ------------------
  629|      0|            VECTOR(*res)[i] = VECTOR(degrees)[i];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*res)[i] = VECTOR(degrees)[i];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  630|      0|        }
  631|      0|        igraph_vector_int_destroy(&degrees);
  632|      0|        IGRAPH_FINALLY_CLEAN(1);
  633|      0|        return IGRAPH_SUCCESS;
  634|      0|    }
  635|       |
  636|  1.46k|    if (igraph_vector_size(weights) != igraph_ecount(graph)) {
  ------------------
  |  Branch (636:9): [True: 0, False: 1.46k]
  ------------------
  637|      0|        IGRAPH_ERROR("Invalid weight vector length.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  638|      0|    }
  639|       |
  640|  1.46k|    if (mode != IGRAPH_OUT && mode != IGRAPH_IN && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (640:9): [True: 1.46k, False: 0]
  |  Branch (640:31): [True: 1.46k, False: 0]
  |  Branch (640:52): [True: 0, False: 1.46k]
  ------------------
  641|      0|        IGRAPH_ERROR("Invalid mode for vertex strength calculation.", IGRAPH_EINVMODE);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  642|      0|    }
  643|       |
  644|  1.46k|    if (igraph_vs_is_all(&vids)) {
  ------------------
  |  Branch (644:9): [True: 1.46k, False: 0]
  ------------------
  645|  1.46k|        return igraph_i_strength_all(graph, res, mode, loops, weights);
  646|  1.46k|    }
  647|       |
  648|      0|    IGRAPH_CHECK(igraph_vit_create(graph, vids, &vit));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  649|      0|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  591|      0|    do { \
  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  650|      0|    no_vids = IGRAPH_VIT_SIZE(vit);
  ------------------
  |  |  191|      0|#define IGRAPH_VIT_SIZE(vit)  ((vit).end - (vit).start)
  ------------------
  651|       |
  652|      0|    IGRAPH_VECTOR_INT_INIT_FINALLY(&neis, 0);
  ------------------
  |  |  124|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|      0|    do { \
  |  |  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|      0|    do { \
  |  |  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  653|      0|    IGRAPH_CHECK(igraph_vector_int_reserve(&neis, no_of_nodes));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  654|      0|    IGRAPH_CHECK(igraph_vector_resize(res, no_vids));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  655|      0|    igraph_vector_null(res);
  656|       |
  657|      0|    if (loops) {
  ------------------
  |  Branch (657:9): [True: 0, False: 0]
  ------------------
  658|      0|        for (igraph_integer_t i = 0; !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  180|      0|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
                      for (igraph_integer_t i = 0; !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  168|      0|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  |  Branch (658:38): [True: 0, False: 0]
  ------------------
  659|      0|            IGRAPH_CHECK(igraph_incident(graph, &neis, IGRAPH_VIT_GET(vit), mode));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  ------------------
  |  |  |  Branch (649:40): [True: 0, False: 0]
  |  |  ------------------
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  660|      0|            const igraph_integer_t n = igraph_vector_int_size(&neis);
  661|      0|            for (igraph_integer_t j = 0; j < n; j++) {
  ------------------
  |  Branch (661:42): [True: 0, False: 0]
  ------------------
  662|      0|                igraph_integer_t edge = VECTOR(neis)[j];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  663|      0|                VECTOR(*res)[i] += VECTOR(*weights)[edge];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*res)[i] += VECTOR(*weights)[edge];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  664|      0|            }
  665|      0|        }
  666|      0|    } else {
  667|      0|        for (igraph_integer_t i = 0; !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  180|      0|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
                      for (igraph_integer_t i = 0; !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  168|      0|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  |  Branch (667:38): [True: 0, False: 0]
  ------------------
  668|      0|            IGRAPH_CHECK(igraph_incident(graph, &neis, IGRAPH_VIT_GET(vit), mode));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  ------------------
  |  |  |  Branch (649:40): [True: 0, False: 0]
  |  |  ------------------
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  669|      0|            const igraph_integer_t n = igraph_vector_int_size(&neis);
  670|      0|            for (igraph_integer_t j = 0; j < n; j++) {
  ------------------
  |  Branch (670:42): [True: 0, False: 0]
  ------------------
  671|      0|                igraph_integer_t edge = VECTOR(neis)[j];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  672|      0|                igraph_integer_t from = IGRAPH_FROM(graph, edge);
  ------------------
  |  |  113|      0|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  673|      0|                igraph_integer_t to = IGRAPH_TO(graph, edge);
  ------------------
  |  |  126|      0|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  ------------------
  |  |  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  674|      0|                if (from != to) {
  ------------------
  |  Branch (674:21): [True: 0, False: 0]
  ------------------
  675|      0|                    VECTOR(*res)[i] += VECTOR(*weights)[edge];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  VECTOR(*res)[i] += VECTOR(*weights)[edge];
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  676|      0|                }
  677|      0|            }
  678|      0|        }
  679|      0|    }
  680|       |
  681|      0|    igraph_vit_destroy(&vit);
  682|      0|    igraph_vector_int_destroy(&neis);
  683|      0|    IGRAPH_FINALLY_CLEAN(2);
  684|       |
  685|      0|    return IGRAPH_SUCCESS;
  686|      0|}

igraph_has_multiple:
  157|  1.46k|igraph_error_t igraph_has_multiple(const igraph_t *graph, igraph_bool_t *res) {
  158|  1.46k|    igraph_integer_t vc = igraph_vcount(graph);
  159|  1.46k|    igraph_integer_t ec = igraph_ecount(graph);
  160|  1.46k|    igraph_bool_t directed = igraph_is_directed(graph);
  161|       |
  162|  1.46k|    IGRAPH_RETURN_IF_CACHED_BOOL(graph, IGRAPH_PROP_HAS_MULTI, res);
  ------------------
  |  |   95|  1.46k|    do { \
  |  |   96|  1.46k|        if (igraph_i_property_cache_has((graphptr), (prop))) { \
  |  |  ------------------
  |  |  |  Branch (96:13): [True: 1.46k, False: 0]
  |  |  ------------------
  |  |   97|  1.46k|            *(resptr) = igraph_i_property_cache_get_bool((graphptr), (prop)); \
  |  |   98|  1.46k|            return IGRAPH_SUCCESS; \
  |  |   99|  1.46k|        } \
  |  |  100|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (100:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  163|       |
  164|      0|    if (vc == 0 || ec == 0) {
  ------------------
  |  Branch (164:9): [True: 0, False: 0]
  |  Branch (164:20): [True: 0, False: 0]
  ------------------
  165|      0|        *res = false;
  166|      0|    } else {
  167|      0|        igraph_vector_int_t neis;
  168|      0|        igraph_integer_t i, j, n;
  169|      0|        igraph_bool_t found = false;
  170|      0|        IGRAPH_VECTOR_INT_INIT_FINALLY(&neis, 0);
  ------------------
  |  |  124|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|      0|    do { \
  |  |  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|      0|    do { \
  |  |  |  |  592|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  171|      0|        for (i = 0; i < vc && !found; i++) {
  ------------------
  |  Branch (171:21): [True: 0, False: 0]
  |  Branch (171:31): [True: 0, False: 0]
  ------------------
  172|      0|            IGRAPH_CHECK(igraph_neighbors(graph, &neis, i,
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  173|      0|                                          IGRAPH_OUT));
  174|      0|            n = igraph_vector_int_size(&neis);
  175|      0|            for (j = 1; j < n; j++) {
  ------------------
  |  Branch (175:25): [True: 0, False: 0]
  ------------------
  176|      0|                if (VECTOR(neis)[j - 1] == VECTOR(neis)[j]) {
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              if (VECTOR(neis)[j - 1] == VECTOR(neis)[j]) {
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (176:21): [True: 0, False: 0]
  ------------------
  177|       |                    /* If the graph is undirected, loop edges appear twice in the neighbor
  178|       |                     * list, so check the next item as well */
  179|      0|                    if (directed) {
  ------------------
  |  Branch (179:25): [True: 0, False: 0]
  ------------------
  180|       |                        /* Directed, so this is a real multiple edge */
  181|      0|                        found = true; break;
  182|      0|                    } else if (VECTOR(neis)[j - 1] != i) {
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (182:32): [True: 0, False: 0]
  ------------------
  183|       |                        /* Undirected, but not a loop edge */
  184|      0|                        found = true; break;
  185|      0|                    } else if (j < n - 1 && VECTOR(neis)[j] == VECTOR(neis)[j + 1]) {
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  } else if (j < n - 1 && VECTOR(neis)[j] == VECTOR(neis)[j + 1]) {
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (185:32): [True: 0, False: 0]
  |  Branch (185:45): [True: 0, False: 0]
  ------------------
  186|       |                        /* Undirected, loop edge, multiple times */
  187|      0|                        found = true; break;
  188|      0|                    }
  189|      0|                }
  190|      0|            }
  191|      0|        }
  192|      0|        *res = found;
  193|      0|        igraph_vector_int_destroy(&neis);
  194|      0|        IGRAPH_FINALLY_CLEAN(1);
  195|      0|    }
  196|       |
  197|      0|    igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_HAS_MULTI, *res);
  198|       |
  199|      0|    return IGRAPH_SUCCESS;
  200|      0|}

igraph_transitivity_barrat:
  905|    732|                               igraph_transitivity_mode_t mode) {
  906|    732|    igraph_integer_t no_of_nodes = igraph_vcount(graph);
  907|    732|    igraph_integer_t no_of_edges = igraph_ecount(graph);
  908|    732|    igraph_bool_t has_multiple;
  909|       |
  910|       |    /* Handle fallback to unweighted version and common cases */
  911|    732|    if (!weights) {
  ------------------
  |  Branch (911:9): [True: 0, False: 732]
  ------------------
  912|      0|        if (no_of_edges != 0) {
  ------------------
  |  Branch (912:13): [True: 0, False: 0]
  ------------------
  913|      0|            IGRAPH_WARNING("No weights given for Barrat's transitivity, unweighted version is used.");
  ------------------
  |  |  789|      0|    do { \
  |  |  790|      0|        igraph_warning(reason, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  791|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (791:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  914|      0|        }
  915|      0|        return igraph_transitivity_local_undirected(graph, res, vids, mode);
  916|      0|    }
  917|       |
  918|    732|    if (igraph_vector_size(weights) != no_of_edges) {
  ------------------
  |  Branch (918:9): [True: 0, False: 732]
  ------------------
  919|      0|        IGRAPH_ERRORF("Edge weight vector length (%" IGRAPH_PRId ") not equal to "
  ------------------
  |  |  469|      0|    do { \
  |  |  470|      0|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  471|      0|                      igraph_errno, __VA_ARGS__) ; \
  |  |  472|      0|        return igraph_errno; \
  |  |  473|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (473:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  920|      0|                      "number of edges (%" IGRAPH_PRId ").", IGRAPH_EINVAL,
  921|      0|                      igraph_vector_size(weights), no_of_edges);
  922|      0|    }
  923|       |
  924|    732|    if (no_of_nodes == 0) {
  ------------------
  |  Branch (924:9): [True: 1, False: 731]
  ------------------
  925|      1|        igraph_vector_clear(res);
  926|      1|        return IGRAPH_SUCCESS;
  927|      1|    }
  928|       |
  929|    731|    IGRAPH_CHECK(igraph_has_multiple(graph, &has_multiple));
  ------------------
  |  |  648|    731|    do { \
  |  |  649|    731|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    731|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    731|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 731]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    731|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  930|    731|    if (! has_multiple && igraph_is_directed(graph)) {
  ------------------
  |  Branch (930:9): [True: 731, False: 0]
  |  Branch (930:27): [True: 0, False: 731]
  ------------------
  931|       |        /* When the graph is directed, mutual edges are effectively multi-edges as we
  932|       |         * are ignoring edge directions. */
  933|      0|        IGRAPH_CHECK(igraph_has_mutual(graph, &has_multiple, false));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  934|      0|    }
  935|    731|    if (has_multiple) {
  ------------------
  |  Branch (935:9): [True: 0, False: 731]
  ------------------
  936|      0|        IGRAPH_ERROR("Barrat's weighted transitivity measure works only if the graph has no multi-edges.",
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  937|      0|                     IGRAPH_EINVAL);
  938|      0|    }
  939|       |
  940|       |    /* Preconditions validated, now we can call the real implementation */
  941|       |
  942|    731|    if (igraph_vs_is_all(&vids)) {
  ------------------
  |  Branch (942:9): [True: 731, False: 0]
  ------------------
  943|    731|        return transitivity_barrat4(graph, res, weights, mode);
  944|    731|    } else {
  945|      0|        return transitivity_barrat1(graph, res, vids, weights, mode);
  946|      0|    }
  947|    731|}
triangles.c:transitivity_barrat4:
  755|    731|        igraph_transitivity_mode_t mode) {
  756|       |
  757|    731|    igraph_integer_t no_of_nodes = igraph_vcount(graph);
  758|    731|    igraph_vector_int_t order;
  759|    731|    igraph_vector_int_t degree;
  760|    731|    igraph_vector_t strength;
  761|    731|    igraph_vector_t rank;
  762|    731|    igraph_integer_t maxdegree;
  763|    731|    igraph_inclist_t incident;
  764|    731|    igraph_vector_int_t neis;
  765|    731|    igraph_vector_int_t *adj1, *adj2;
  766|    731|    igraph_vector_t actw;
  767|    731|    igraph_integer_t i, nn;
  768|       |
  769|       |    /* Precondition: weight vector is not null, its length equals the number of
  770|       |     * edges, and the graph has at least one vertex. The graph must not have
  771|       |     * multi-edges. These must be ensured by the caller.
  772|       |     */
  773|       |
  774|    731|    IGRAPH_VECTOR_INT_INIT_FINALLY(&order, no_of_nodes);
  ------------------
  |  |  124|    731|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|    731|    do { \
  |  |  |  |  649|    731|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|    731|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|    731|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 731]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|    731|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|    731|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|    731|    do { \
  |  |  |  |  592|    731|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|    731|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|    731|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|    731|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|    731|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|    731|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  775|    731|    IGRAPH_VECTOR_INT_INIT_FINALLY(&degree, no_of_nodes);
  ------------------
  |  |  124|    731|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|    731|    do { \
  |  |  |  |  649|    731|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|    731|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|    731|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 731]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|    731|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|    731|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|    731|    do { \
  |  |  |  |  592|    731|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|    731|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|    731|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|    731|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|    731|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|    731|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  776|    731|    IGRAPH_VECTOR_INIT_FINALLY(&strength, no_of_nodes);
  ------------------
  |  |  109|    731|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|    731|    do { \
  |  |  |  |  649|    731|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|    731|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|    731|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 731]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|    731|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  110|    731|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|    731|    do { \
  |  |  |  |  592|    731|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|    731|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|    731|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|    731|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|    731|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|    731|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (110:60): [Folded - Ignored]
  |  |  ------------------
  ------------------
  777|       |
  778|    731|    IGRAPH_CHECK(igraph_degree(graph, &degree, igraph_vss_all(), IGRAPH_ALL,
  ------------------
  |  |  648|    731|    do { \
  |  |  649|    731|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    731|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    731|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 731]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    731|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  779|    731|                               IGRAPH_LOOPS));
  780|    731|    maxdegree = igraph_vector_int_max(&degree) + 1;
  781|    731|    IGRAPH_CHECK(igraph_i_vector_int_order(&degree, &order, maxdegree));
  ------------------
  |  |  648|    731|    do { \
  |  |  649|    731|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    731|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    731|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 731]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    731|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  782|       |
  783|    731|    IGRAPH_CHECK(igraph_strength(graph, &strength, igraph_vss_all(), IGRAPH_ALL,
  ------------------
  |  |  648|    731|    do { \
  |  |  649|    731|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    731|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    731|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 731]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    731|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  784|    731|                                 IGRAPH_LOOPS, weights));
  785|       |
  786|    731|    IGRAPH_VECTOR_INIT_FINALLY(&rank, no_of_nodes);
  ------------------
  |  |  109|    731|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|    731|    do { \
  |  |  |  |  649|    731|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|    731|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|    731|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 731]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|    731|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  110|    731|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|    731|    do { \
  |  |  |  |  592|    731|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|    731|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|    731|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|    731|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|    731|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|    731|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (110:60): [Folded - Ignored]
  |  |  ------------------
  ------------------
  787|  32.5k|    for (i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (787:17): [True: 31.8k, False: 731]
  ------------------
  788|  31.8k|        VECTOR(rank)[ VECTOR(order)[i] ] = no_of_nodes - i - 1;
  ------------------
  |  |   65|  31.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      VECTOR(rank)[ VECTOR(order)[i] ] = no_of_nodes - i - 1;
  ------------------
  |  |   65|  31.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  789|  31.8k|    }
  790|       |
  791|    731|    IGRAPH_CHECK(igraph_inclist_init(graph, &incident, IGRAPH_ALL, IGRAPH_LOOPS_TWICE));
  ------------------
  |  |  648|    731|    do { \
  |  |  649|    731|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    731|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    731|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 731]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    731|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  792|    731|    IGRAPH_FINALLY(igraph_inclist_destroy, &incident);
  ------------------
  |  |  591|    731|    do { \
  |  |  592|    731|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|    731|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|    731|         * incorrect destructor function with the pointer */ \
  |  |  595|    731|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|    731|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|    731|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  793|       |
  794|    731|    IGRAPH_CHECK(igraph_vector_int_init(&neis, no_of_nodes));
  ------------------
  |  |  648|    731|    do { \
  |  |  649|    731|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    731|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    731|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 731]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    731|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  795|    731|    IGRAPH_FINALLY(igraph_vector_int_destroy, &neis);
  ------------------
  |  |  591|    731|    do { \
  |  |  592|    731|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|    731|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|    731|         * incorrect destructor function with the pointer */ \
  |  |  595|    731|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|    731|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|    731|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  796|       |
  797|    731|    IGRAPH_VECTOR_INIT_FINALLY(&actw, no_of_nodes);
  ------------------
  |  |  109|    731|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|    731|    do { \
  |  |  |  |  649|    731|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|    731|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|    731|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 731]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|    731|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  110|    731|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|    731|    do { \
  |  |  |  |  592|    731|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|    731|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|    731|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|    731|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|    731|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|    731|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (110:60): [Folded - Ignored]
  |  |  ------------------
  ------------------
  798|       |
  799|    731|    IGRAPH_CHECK(igraph_vector_resize(res, no_of_nodes));
  ------------------
  |  |  648|    731|    do { \
  |  |  649|    731|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    731|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    731|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 731]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    731|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  800|    731|    igraph_vector_null(res);
  801|       |
  802|  32.5k|    for (nn = no_of_nodes - 1; nn >= 0; nn--) {
  ------------------
  |  Branch (802:32): [True: 31.8k, False: 731]
  ------------------
  803|  31.8k|        igraph_integer_t adjlen1, adjlen2;
  804|  31.8k|        igraph_real_t triples;
  805|  31.8k|        igraph_integer_t node = VECTOR(order)[nn];
  ------------------
  |  |   65|  31.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  806|       |
  807|  31.8k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   47|  31.8k|    do { \
  |  |   48|  31.8k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (48:13): [True: 0, False: 31.8k]
  |  |  ------------------
  |  |   49|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (49:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   50|      0|                return IGRAPH_INTERRUPTED; \
  |  |   51|      0|            } \
  |  |   52|      0|        } \
  |  |   53|  31.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (53:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  808|       |
  809|  31.8k|        adj1 = igraph_inclist_get(&incident, node);
  ------------------
  |  |  107|  31.8k|#define igraph_inclist_get(il,no) (&(il)->incs[(igraph_integer_t)(no)])
  ------------------
  810|  31.8k|        adjlen1 = igraph_vector_int_size(adj1);
  811|  31.8k|        triples = VECTOR(strength)[node] * (adjlen1 - 1) / 2.0;
  ------------------
  |  |   65|  31.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  812|       |        /* Mark the neighbors of the node */
  813|  48.9k|        for (i = 0; i < adjlen1; i++) {
  ------------------
  |  Branch (813:21): [True: 17.1k, False: 31.8k]
  ------------------
  814|  17.1k|            igraph_integer_t edge = VECTOR(*adj1)[i];
  ------------------
  |  |   65|  17.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  815|  17.1k|            igraph_integer_t nei = IGRAPH_OTHER(graph, edge, node);
  ------------------
  |  |  144|  17.1k|    ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  126|  17.1k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  17.1k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  113|  8.55k|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  8.55k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  126|  8.55k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  8.55k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (144:25): [True: 8.55k, False: 8.55k]
  |  |  ------------------
  ------------------
  816|  17.1k|            VECTOR(neis)[nei] = node + 1;
  ------------------
  |  |   65|  17.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  817|  17.1k|            VECTOR(actw)[nei] = VECTOR(*weights)[edge];
  ------------------
  |  |   65|  17.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(actw)[nei] = VECTOR(*weights)[edge];
  ------------------
  |  |   65|  17.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  818|  17.1k|        }
  819|       |
  820|  48.9k|        for (i = 0; i < adjlen1; i++) {
  ------------------
  |  Branch (820:21): [True: 17.1k, False: 31.8k]
  ------------------
  821|  17.1k|            igraph_integer_t edge1 = VECTOR(*adj1)[i];
  ------------------
  |  |   65|  17.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  822|  17.1k|            igraph_real_t weight1 = VECTOR(*weights)[edge1];
  ------------------
  |  |   65|  17.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  823|  17.1k|            igraph_integer_t nei = IGRAPH_OTHER(graph, edge1, node);
  ------------------
  |  |  144|  17.1k|    ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  126|  17.1k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  17.1k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  113|  8.55k|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  8.55k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  126|  8.55k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  8.55k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (144:25): [True: 8.55k, False: 8.55k]
  |  |  ------------------
  ------------------
  824|  17.1k|            igraph_integer_t j;
  825|  17.1k|            if (VECTOR(rank)[nei] > VECTOR(rank)[node]) {
  ------------------
  |  |   65|  17.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          if (VECTOR(rank)[nei] > VECTOR(rank)[node]) {
  ------------------
  |  |   65|  17.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (825:17): [True: 8.55k, False: 8.55k]
  ------------------
  826|  8.55k|                adj2 = igraph_inclist_get(&incident, nei);
  ------------------
  |  |  107|  8.55k|#define igraph_inclist_get(il,no) (&(il)->incs[(igraph_integer_t)(no)])
  ------------------
  827|  8.55k|                adjlen2 = igraph_vector_int_size(adj2);
  828|  34.6k|                for (j = 0; j < adjlen2; j++) {
  ------------------
  |  Branch (828:29): [True: 26.0k, False: 8.55k]
  ------------------
  829|  26.0k|                    igraph_integer_t edge2 = VECTOR(*adj2)[j];
  ------------------
  |  |   65|  26.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  830|  26.0k|                    igraph_real_t weight2 = VECTOR(*weights)[edge2];
  ------------------
  |  |   65|  26.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  831|  26.0k|                    igraph_integer_t nei2 = IGRAPH_OTHER(graph, edge2, nei);
  ------------------
  |  |  144|  26.0k|    ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  126|  26.0k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  26.0k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  113|  10.1k|#define IGRAPH_FROM(graph,eid) ((igraph_integer_t)(VECTOR((graph)->from)[(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  10.1k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_integer_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  126|  15.8k|#define IGRAPH_TO(graph,eid)   ((igraph_integer_t)(VECTOR((graph)->to)  [(igraph_integer_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|  15.8k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (144:25): [True: 10.1k, False: 15.8k]
  |  |  ------------------
  ------------------
  832|  26.0k|                    if (VECTOR(rank)[nei2] < VECTOR(rank)[nei]) {
  ------------------
  |  |   65|  26.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  if (VECTOR(rank)[nei2] < VECTOR(rank)[nei]) {
  ------------------
  |  |   65|  26.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (832:25): [True: 18.0k, False: 8.01k]
  ------------------
  833|  18.0k|                        continue;
  834|  18.0k|                    }
  835|  8.01k|                    if (VECTOR(neis)[nei2] == node + 1) {
  ------------------
  |  |   65|  8.01k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (835:25): [True: 2.78k, False: 5.23k]
  ------------------
  836|  2.78k|                        VECTOR(*res)[nei2] += (VECTOR(actw)[nei2] + weight2) / 2.0;
  ------------------
  |  |   65|  2.78k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                      VECTOR(*res)[nei2] += (VECTOR(actw)[nei2] + weight2) / 2.0;
  ------------------
  |  |   65|  2.78k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  837|  2.78k|                        VECTOR(*res)[nei] += (weight1 + weight2) / 2.0;
  ------------------
  |  |   65|  2.78k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  838|  2.78k|                        VECTOR(*res)[node] += (VECTOR(actw)[nei2] + weight1) / 2.0;
  ------------------
  |  |   65|  2.78k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                      VECTOR(*res)[node] += (VECTOR(actw)[nei2] + weight1) / 2.0;
  ------------------
  |  |   65|  2.78k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  839|  2.78k|                    }
  840|  8.01k|                }
  841|  8.55k|            }
  842|  17.1k|        }
  843|       |
  844|  31.8k|        if (mode == IGRAPH_TRANSITIVITY_ZERO && triples == 0) {
  ------------------
  |  Branch (844:13): [True: 0, False: 31.8k]
  |  Branch (844:49): [True: 0, False: 0]
  ------------------
  845|      0|            VECTOR(*res)[node] = 0.0;
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  846|  31.8k|        } else {
  847|  31.8k|            VECTOR(*res)[node] /= triples;
  ------------------
  |  |   65|  31.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  848|  31.8k|        }
  849|  31.8k|    }
  850|       |
  851|    731|    igraph_vector_destroy(&actw);
  852|    731|    igraph_vector_int_destroy(&neis);
  853|    731|    igraph_inclist_destroy(&incident);
  854|    731|    igraph_vector_destroy(&rank);
  855|    731|    igraph_vector_int_destroy(&degree);
  856|    731|    igraph_vector_destroy(&strength);
  857|    731|    igraph_vector_int_destroy(&order);
  858|    731|    IGRAPH_FINALLY_CLEAN(7);
  859|       |
  860|    731|    return IGRAPH_SUCCESS;
  861|    731|}

igraph_rng_default:
  189|    756|igraph_rng_t *igraph_rng_default(void) {
  190|    756|    return igraph_i_rng_default_ptr;
  191|    756|}
igraph_rng_seed:
  261|    756|igraph_error_t igraph_rng_seed(igraph_rng_t *rng, igraph_uint_t seed) {
  262|    756|    const igraph_rng_type_t *type = rng->type;
  263|    756|    IGRAPH_CHECK(type->seed(rng->state, seed));
  ------------------
  |  |  648|    756|    do { \
  |  |  649|    756|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    756|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    756|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 756]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    756|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  264|    756|    rng->is_seeded = true;
  265|    756|    return IGRAPH_SUCCESS;
  266|    756|}

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

