_Z23vector_isininterval_epsPK15igraph_vector_tdd:
   26|  11.7k|bool vector_isininterval_eps(const igraph_vector_t *v, igraph_real_t lo, igraph_real_t hi) {
   27|  11.7k|    const igraph_int_t n = igraph_vector_size(v);
   28|       |
   29|   433k|    for (igraph_int_t i=0; i < n; i++) {
  ------------------
  |  Branch (29:28): [True: 421k, False: 11.7k]
  ------------------
   30|   421k|        igraph_real_t x = VECTOR(*v)[i];
  ------------------
  |  |   60|   421k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   31|   421k|        if (igraph_cmp_epsilon(lo, x, eps) > 0 || igraph_cmp_epsilon(x, hi, eps) > 0) {
  ------------------
  |  Branch (31:13): [True: 0, False: 421k]
  |  Branch (31:51): [True: 0, False: 421k]
  ------------------
   32|      0|            return false;
   33|      0|        }
   34|   421k|    }
   35|       |
   36|  11.7k|    return true;
   37|  11.7k|}
LLVMFuzzerTestOneInput:
   39|  1.52k|extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
   40|  1.52k|    igraph_t graph;
   41|  1.52k|    igraph_vector_int_t edges;
   42|       |
   43|  1.52k|    igraph_set_warning_handler(igraph_warning_handler_ignore);
   44|       |
   45|  1.52k|    if (Size % 2 == 0 || Size > 512+1 || Size < 1) {
  ------------------
  |  Branch (45:9): [True: 3, False: 1.51k]
  |  Branch (45:26): [True: 11, False: 1.50k]
  |  Branch (45:42): [True: 0, False: 1.50k]
  ------------------
   46|     14|        return 0;
   47|     14|    }
   48|       |
   49|  1.50k|    igraph_vector_int_init(&edges, Size-1);
   50|  87.2k|    for (size_t i=0; i < Size-1; ++i) {
  ------------------
  |  Branch (50:22): [True: 85.7k, False: 1.50k]
  ------------------
   51|  85.7k|        VECTOR(edges)[i] = Data[i+1];
  ------------------
  |  |   60|  85.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   52|  85.7k|    }
   53|       |
   54|  1.50k|    igraph_rng_seed(igraph_rng_default(), 42);
   55|       |
   56|  1.50k|    if (igraph_create(&graph, &edges, Data[0], IGRAPH_DIRECTED) == IGRAPH_SUCCESS) {
  ------------------
  |  Branch (56:9): [True: 1.50k, False: 0]
  ------------------
   57|  1.50k|        const igraph_int_t vcount = igraph_vcount(&graph);
   58|  1.50k|        igraph_vector_t v, v2;
   59|  1.50k|        igraph_vector_int_t iv;
   60|  1.50k|        igraph_bool_t b;
   61|  1.50k|        igraph_real_t r;
   62|       |
   63|       |        /* Limit graph size for the sake of performance. */
   64|  1.50k|        if (vcount <= 64) {
  ------------------
  |  Branch (64:13): [True: 1.46k, False: 43]
  ------------------
   65|  1.46k|            igraph_vector_init(&v, 0);
   66|  1.46k|            igraph_vector_init(&v2, 0);
   67|  1.46k|            igraph_vector_int_init(&iv, 0);
   68|       |
   69|  1.46k|            igraph_betweenness(&graph, NULL, &v2, igraph_vss_all(), IGRAPH_UNDIRECTED, false);
   70|  1.46k|            IGRAPH_ASSERT(vector_isininterval_eps(&v2, 0, vcount == 0 ? 0 : (vcount-1)*(vcount-2)/2));
  ------------------
  |  |  924|  1.46k|    do { \
  |  |  925|  1.46k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.92k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  |  Branch (612:52): [True: 1, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  ------------------
  |  |  |  |  401|       |#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  927|      0|        } \
  |  |  928|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
   71|       |
   72|  1.46k|            igraph_betweenness_cutoff(&graph, NULL, &v, igraph_vss_all(), IGRAPH_UNDIRECTED, false, 4);
   73|  1.46k|            IGRAPH_ASSERT(vector_isininterval_eps(&v, 0, vcount == 0 ? 0 : (vcount-1)*(vcount-2)/2));
  ------------------
  |  |  924|  1.46k|    do { \
  |  |  925|  1.46k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.92k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  |  Branch (612:52): [True: 1, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  ------------------
  |  |  |  |  401|       |#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  927|      0|        } \
  |  |  928|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
   74|  1.46k|            IGRAPH_ASSERT(igraph_vector_all_le(&v, &v2));
  ------------------
  |  |  924|  1.46k|    do { \
  |  |  925|  1.46k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  ------------------
  |  |  |  |  401|       |#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  927|      0|        } \
  |  |  928|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
   75|       |
   76|  1.46k|            igraph_betweenness(&graph, NULL, &v2, igraph_vss_all(), IGRAPH_DIRECTED, false);
   77|  1.46k|            IGRAPH_ASSERT(vector_isininterval_eps(&v2, 0, vcount == 0 ? 0 : (vcount-1)*(vcount-2)));
  ------------------
  |  |  924|  1.46k|    do { \
  |  |  925|  1.46k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.92k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  |  Branch (612:52): [True: 1, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  ------------------
  |  |  |  |  401|       |#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  927|      0|        } \
  |  |  928|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
   78|       |
   79|  1.46k|            igraph_betweenness_cutoff(&graph, NULL, &v, igraph_vss_all(), IGRAPH_DIRECTED, false, 5);
   80|  1.46k|            IGRAPH_ASSERT(vector_isininterval_eps(&v, 0, vcount == 0 ? 0 : (vcount-1)*(vcount-2)));
  ------------------
  |  |  924|  1.46k|    do { \
  |  |  925|  1.46k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.92k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  |  Branch (612:52): [True: 1, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  ------------------
  |  |  |  |  401|       |#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  927|      0|        } \
  |  |  928|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
   81|  1.46k|            IGRAPH_ASSERT(igraph_vector_all_le(&v, &v2));
  ------------------
  |  |  924|  1.46k|    do { \
  |  |  925|  1.46k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  ------------------
  |  |  |  |  401|       |#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  927|      0|        } \
  |  |  928|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
   82|       |
   83|  1.46k|            igraph_edge_betweenness(&graph, NULL, &v2, igraph_ess_all(IGRAPH_EDGEORDER_ID), IGRAPH_DIRECTED, false);
   84|  1.46k|            IGRAPH_ASSERT(vector_isininterval_eps(&v2, 0, vcount*(vcount-1)/2));
  ------------------
  |  |  924|  1.46k|    do { \
  |  |  925|  1.46k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  ------------------
  |  |  |  |  401|       |#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  927|      0|        } \
  |  |  928|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
   85|       |
   86|  1.46k|            igraph_edge_betweenness_cutoff(&graph, NULL, &v, igraph_ess_all(IGRAPH_EDGEORDER_ID), IGRAPH_DIRECTED,
   87|  1.46k|                                           false, 4);
   88|  1.46k|            IGRAPH_ASSERT(vector_isininterval_eps(&v, 0, vcount*(vcount-1)/2));
  ------------------
  |  |  924|  1.46k|    do { \
  |  |  925|  1.46k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  ------------------
  |  |  |  |  401|       |#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  927|      0|        } \
  |  |  928|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
   89|  1.46k|            IGRAPH_ASSERT(igraph_vector_all_le(&v, &v2));
  ------------------
  |  |  924|  1.46k|    do { \
  |  |  925|  1.46k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  ------------------
  |  |  |  |  401|       |#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  927|      0|        } \
  |  |  928|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
   90|       |
   91|  1.46k|            igraph_edge_betweenness(&graph, NULL, &v2, igraph_ess_all(IGRAPH_EDGEORDER_ID), IGRAPH_UNDIRECTED, false);
   92|  1.46k|            IGRAPH_ASSERT(vector_isininterval_eps(&v2, 0, vcount*(vcount-1)));
  ------------------
  |  |  924|  1.46k|    do { \
  |  |  925|  1.46k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  ------------------
  |  |  |  |  401|       |#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  927|      0|        } \
  |  |  928|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
   93|       |
   94|  1.46k|            igraph_edge_betweenness_cutoff(&graph, NULL, &v, igraph_ess_all(IGRAPH_EDGEORDER_ID), IGRAPH_UNDIRECTED,
   95|  1.46k|                                           false, 3);
   96|  1.46k|            IGRAPH_ASSERT(vector_isininterval_eps(&v, 0, vcount*(vcount-1)));
  ------------------
  |  |  924|  1.46k|    do { \
  |  |  925|  1.46k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  ------------------
  |  |  |  |  401|       |#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  927|      0|        } \
  |  |  928|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
   97|  1.46k|            IGRAPH_ASSERT(igraph_vector_all_le(&v, &v2));
  ------------------
  |  |  924|  1.46k|    do { \
  |  |  925|  1.46k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  ------------------
  |  |  |  |  401|       |#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  927|      0|        } \
  |  |  928|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
   98|       |
   99|  1.46k|            if (vcount >= 10) {
  ------------------
  |  Branch (99:17): [True: 1.33k, False: 133]
  ------------------
  100|  1.33k|                igraph_betweenness_subset(&graph, NULL, &v,
  101|  1.33k|                                          igraph_vss_range(0,5), igraph_vss_range(5,10),
  102|  1.33k|                                          igraph_vss_all(), IGRAPH_DIRECTED, false);
  103|  1.33k|                igraph_edge_betweenness_subset(&graph, NULL, &v,
  104|  1.33k|                                               igraph_vss_range(0,10), igraph_vss_range(0,10),
  105|  1.33k|                                               igraph_ess_all(IGRAPH_EDGEORDER_ID), IGRAPH_DIRECTED, false);
  106|  1.33k|            }
  107|  1.46k|            igraph_closeness_cutoff(&graph, &v, &iv, &b, igraph_vss_all(), IGRAPH_ALL, NULL, true, 3);
  108|  1.46k|            igraph_closeness_cutoff(&graph, &v, &iv, &b, igraph_vss_all(), IGRAPH_OUT, NULL, true, 4);
  109|  1.46k|            igraph_harmonic_centrality_cutoff(&graph, &v, igraph_vss_all(), IGRAPH_ALL, NULL, true, 3);
  110|  1.46k|            igraph_harmonic_centrality_cutoff(&graph, &v, igraph_vss_all(), IGRAPH_IN, NULL, true, 4);
  111|  1.46k|            igraph_global_efficiency(&graph, NULL, &r, IGRAPH_DIRECTED);
  112|  1.46k|            igraph_local_efficiency(&graph, NULL, &v, igraph_vss_all(), IGRAPH_DIRECTED, IGRAPH_OUT);
  113|  1.46k|            igraph_transitivity_undirected(&graph, &r, IGRAPH_TRANSITIVITY_NAN);
  114|  1.46k|            igraph_transitivity_local_undirected(&graph, &v, igraph_vss_all(), IGRAPH_TRANSITIVITY_NAN);
  115|  1.46k|            igraph_transitivity_avglocal_undirected(&graph, &r, IGRAPH_TRANSITIVITY_ZERO);
  116|  1.46k|            igraph_count_adjacent_triangles(&graph, &v, igraph_vss_all());
  117|       |
  118|  1.46k|            igraph_pagerank(&graph, NULL, &v, &r, 0.6, IGRAPH_DIRECTED, igraph_vss_all(), IGRAPH_PAGERANK_ALGO_PRPACK,
  119|  1.46k|                            NULL);
  120|  1.46k|            IGRAPH_ASSERT(vcount == 0 || igraph_almost_equals(igraph_vector_sum(&v), 1.0, 1e-10));
  ------------------
  |  |  924|  1.46k|    do { \
  |  |  925|  1.46k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.92k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  |  Branch (612:52): [True: 1, False: 1.46k]
  |  |  |  |  |  Branch (612:52): [True: 1.46k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  ------------------
  |  |  |  |  401|       |#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  927|      0|        } \
  |  |  928|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
  121|       |
  122|  1.46k|            igraph_constraint(&graph, &v, igraph_vss_all(), NULL);
  123|  1.46k|            igraph_spanner(&graph, &iv, 2.34, NULL);
  124|       |
  125|  1.46k|            igraph_to_undirected(&graph, IGRAPH_TO_UNDIRECTED_COLLAPSE, NULL);
  126|  1.46k|            igraph_simplify(&graph, /* remove_multiple */ true, /* remove_loops */ false, NULL);
  127|  1.46k|            igraph_trussness(&graph, &iv);
  128|       |
  129|  1.46k|            igraph_vector_int_destroy(&iv);
  130|  1.46k|            igraph_vector_destroy(&v2);
  131|  1.46k|            igraph_vector_destroy(&v);
  132|  1.46k|        }
  133|       |
  134|  1.50k|        igraph_destroy(&graph);
  135|  1.50k|    }
  136|       |
  137|  1.50k|    igraph_vector_int_destroy(&edges);
  138|       |
  139|  1.50k|    IGRAPH_ASSERT(IGRAPH_FINALLY_STACK_EMPTY);
  ------------------
  |  |  924|  1.50k|    do { \
  |  |  925|  1.50k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.50k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.50k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  ------------------
  |  |  |  |  401|       |#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  927|      0|        } \
  |  |  928|  1.50k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.50k]
  |  |  ------------------
  ------------------
  140|       |
  141|  1.50k|    return 0;  // Non-zero return values are reserved for future use.
  142|  1.50k|}

igraph_betweenness:
  507|  2.92k|        igraph_bool_t directed, igraph_bool_t normalized) {
  508|  2.92k|    return igraph_betweenness_cutoff(graph, weights, res, vids, directed, normalized, -1);
  509|  2.92k|}
igraph_betweenness_cutoff:
  558|  5.85k|        igraph_real_t cutoff) {
  559|       |
  560|  5.85k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  561|  5.85k|    igraph_int_t no_of_edges = igraph_ecount(graph);
  562|  5.85k|    igraph_adjlist_t adjlist, parents;
  563|  5.85k|    igraph_inclist_t inclist;
  564|  5.85k|    igraph_int_t source, j, neighbor;
  565|  5.85k|    igraph_stack_int_t S;
  566|  5.85k|    igraph_neimode_t mode;
  567|  5.85k|    igraph_vector_t dist;
  568|       |    /* Note: nrgeo holds the number of shortest paths, which may be very large in some cases,
  569|       |     * e.g. in a grid graph. If using an integer type, this results in overflow.
  570|       |     * With a 'long long int', overflow already affects the result for a grid as small as 36*36.
  571|       |     * Therefore, we use a 'igraph_real_t' instead. While a 'igraph_real_t' holds fewer digits than a
  572|       |     * 'long long int', i.e. its precision is lower, it is effectively immune to overflow.
  573|       |     * The impact on the precision of the final result is negligible. The max betweenness
  574|       |     * is correct to 14 decimal digits, i.e. the precision limit of 'igraph_real_t', even
  575|       |     * for a 101*101 grid graph. */
  576|  5.85k|    igraph_real_t *nrgeo = 0;
  577|  5.85k|    igraph_real_t *tmpscore;
  578|  5.85k|    igraph_vector_t v_tmpres, *tmpres = &v_tmpres;
  579|  5.85k|    igraph_vit_t vit;
  580|  5.85k|    igraph_real_t normalization_factor;
  581|       |
  582|  5.85k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (582:9): [True: 0, False: 5.85k]
  ------------------
  583|      0|        directed = false;
  584|      0|    }
  585|  5.85k|    mode = directed ? IGRAPH_OUT : IGRAPH_ALL;
  ------------------
  |  Branch (585:12): [True: 2.92k, False: 2.92k]
  ------------------
  586|       |
  587|  5.85k|    IGRAPH_CHECK(betweenness_check_weights(weights, no_of_edges));
  ------------------
  |  |  656|  5.85k|    do { \
  |  |  657|  5.85k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  5.85k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  5.85k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.85k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  5.85k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 5.85k]
  |  |  ------------------
  ------------------
  588|       |
  589|  5.85k|    if (weights) {
  ------------------
  |  Branch (589:9): [True: 0, False: 5.85k]
  ------------------
  590|      0|        IGRAPH_CHECK(igraph_inclist_init(graph, &inclist, mode, IGRAPH_NO_LOOPS));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  591|      0|        IGRAPH_FINALLY(igraph_inclist_destroy, &inclist);
  ------------------
  |  |  603|      0|    do { \
  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  ------------------
  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  592|  5.85k|    } else {
  593|  5.85k|        IGRAPH_CHECK(igraph_adjlist_init(graph, &adjlist, mode, IGRAPH_NO_LOOPS, IGRAPH_MULTIPLE));
  ------------------
  |  |  656|  5.85k|    do { \
  |  |  657|  5.85k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  5.85k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  5.85k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.85k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  5.85k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 5.85k]
  |  |  ------------------
  ------------------
  594|  5.85k|        IGRAPH_FINALLY(igraph_adjlist_destroy, &adjlist);
  ------------------
  |  |  603|  5.85k|    do { \
  |  |  604|  5.85k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  5.85k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  5.85k|         * incorrect destructor function with the pointer */ \
  |  |  607|  5.85k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 5.85k]
  |  |  ------------------
  |  |  608|  5.85k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  5.85k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 5.85k]
  |  |  ------------------
  ------------------
  595|  5.85k|    }
  596|       |
  597|  5.85k|    IGRAPH_CHECK(igraph_adjlist_init_empty(&parents, no_of_nodes));
  ------------------
  |  |  656|  5.85k|    do { \
  |  |  657|  5.85k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  5.85k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  5.85k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.85k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  5.85k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 5.85k]
  |  |  ------------------
  ------------------
  598|  5.85k|    IGRAPH_FINALLY(igraph_adjlist_destroy, &parents);
  ------------------
  |  |  603|  5.85k|    do { \
  |  |  604|  5.85k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  5.85k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  5.85k|         * incorrect destructor function with the pointer */ \
  |  |  607|  5.85k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 5.85k]
  |  |  ------------------
  |  |  608|  5.85k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  5.85k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 5.85k]
  |  |  ------------------
  ------------------
  599|       |
  600|  5.85k|    IGRAPH_CHECK(igraph_stack_int_init(&S, no_of_nodes));
  ------------------
  |  |  656|  5.85k|    do { \
  |  |  657|  5.85k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  5.85k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  5.85k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.85k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  5.85k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 5.85k]
  |  |  ------------------
  ------------------
  601|  5.85k|    IGRAPH_FINALLY(igraph_stack_int_destroy, &S);
  ------------------
  |  |  603|  5.85k|    do { \
  |  |  604|  5.85k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  5.85k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  5.85k|         * incorrect destructor function with the pointer */ \
  |  |  607|  5.85k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 5.85k]
  |  |  ------------------
  |  |  608|  5.85k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  5.85k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 5.85k]
  |  |  ------------------
  ------------------
  602|       |
  603|  5.85k|    IGRAPH_VECTOR_INIT_FINALLY(&dist, no_of_nodes);
  ------------------
  |  |  104|  5.85k|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  5.85k|    do { \
  |  |  |  |  657|  5.85k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  5.85k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  5.85k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.85k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  5.85k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 5.85k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  5.85k|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  5.85k|    do { \
  |  |  |  |  604|  5.85k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  5.85k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  5.85k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  5.85k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 5.85k]
  |  |  |  |  ------------------
  |  |  |  |  608|  5.85k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  5.85k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 5.85k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (105:60): [Folded, False: 5.85k]
  |  |  ------------------
  ------------------
  604|       |
  605|  5.85k|    nrgeo = IGRAPH_CALLOC(no_of_nodes, igraph_real_t);
  ------------------
  |  |   33|  5.85k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  11.7k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 5.85k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 5.85k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 5.85k, False: 4]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  606|  5.85k|    IGRAPH_CHECK_OOM(nrgeo, "Insufficient memory for betweenness calculation.");
  ------------------
  |  |  709|  5.85k|    do { \
  |  |  710|  5.85k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  5.85k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.85k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  5.85k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 5.85k]
  |  |  ------------------
  ------------------
  607|  5.85k|    IGRAPH_FINALLY(igraph_free, nrgeo);
  ------------------
  |  |  603|  5.85k|    do { \
  |  |  604|  5.85k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  5.85k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  5.85k|         * incorrect destructor function with the pointer */ \
  |  |  607|  5.85k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 5.85k]
  |  |  ------------------
  |  |  608|  5.85k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  5.85k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 5.85k]
  |  |  ------------------
  ------------------
  608|       |
  609|  5.85k|    tmpscore = IGRAPH_CALLOC(no_of_nodes, igraph_real_t);
  ------------------
  |  |   33|  5.85k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  11.7k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 5.85k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 5.85k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 5.85k, False: 4]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  610|  5.85k|    IGRAPH_CHECK_OOM(tmpscore, "Insufficient memory for betweenness calculation.");
  ------------------
  |  |  709|  5.85k|    do { \
  |  |  710|  5.85k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  5.85k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.85k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  5.85k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 5.85k]
  |  |  ------------------
  ------------------
  611|  5.85k|    IGRAPH_FINALLY(igraph_free, tmpscore);
  ------------------
  |  |  603|  5.85k|    do { \
  |  |  604|  5.85k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  5.85k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  5.85k|         * incorrect destructor function with the pointer */ \
  |  |  607|  5.85k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 5.85k]
  |  |  ------------------
  |  |  608|  5.85k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  5.85k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 5.85k]
  |  |  ------------------
  ------------------
  612|       |
  613|  5.85k|    if (igraph_vs_is_all(&vids)) {
  ------------------
  |  Branch (613:9): [True: 5.85k, False: 0]
  ------------------
  614|       |        /* result covers all vertices */
  615|  5.85k|        IGRAPH_CHECK(igraph_vector_resize(res, no_of_nodes));
  ------------------
  |  |  656|  5.85k|    do { \
  |  |  657|  5.85k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  5.85k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  5.85k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.85k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  5.85k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 5.85k]
  |  |  ------------------
  ------------------
  616|  5.85k|        igraph_vector_null(res);
  617|  5.85k|        tmpres = res;
  618|  5.85k|    } else {
  619|       |        /* result needed only for a subset of the vertices */
  620|      0|        IGRAPH_VECTOR_INIT_FINALLY(tmpres, no_of_nodes);
  ------------------
  |  |  104|      0|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|      0|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|      0|    do { \
  |  |  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (105:60): [Folded, False: 0]
  |  |  ------------------
  ------------------
  621|      0|    }
  622|       |
  623|   257k|    for (source = 0; source < no_of_nodes; source++) {
  ------------------
  |  Branch (623:22): [True: 251k, False: 5.85k]
  ------------------
  624|       |
  625|       |        /* Loop invariant that is valid at this point:
  626|       |         *
  627|       |         * - the stack S is empty
  628|       |         * - the 'dist' vector contains zeros only
  629|       |         * - the 'nrgeo' array contains zeros only
  630|       |         * - the 'tmpscore' array contains zeros only
  631|       |         * - the 'parents' adjacency list contains empty vectors only
  632|       |         */
  633|       |
  634|   251k|        IGRAPH_PROGRESS("Betweenness centrality: ", 100.0 * source / no_of_nodes, 0);
  ------------------
  |  |  169|   251k|    do { \
  |  |  170|   251k|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  656|   251k|    do { \
  |  |  |  |  657|   251k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|   251k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|   251k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 251k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|   251k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 251k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  171|   251k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (171:14): [Folded, False: 251k]
  |  |  ------------------
  ------------------
  635|   251k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|   251k|    do { \
  |  |   47|   251k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 251k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|   251k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 251k]
  |  |  ------------------
  ------------------
  636|       |
  637|       |        /* Conduct a single-source shortest path search from the source node */
  638|   251k|        if (weights) {
  ------------------
  |  Branch (638:13): [True: 0, False: 251k]
  ------------------
  639|      0|            IGRAPH_CHECK(sspf_weighted(graph, source, &dist, nrgeo, weights, &S, &parents, &inclist, cutoff));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  640|   251k|        } else {
  641|   251k|            IGRAPH_CHECK(sspf(source, &dist, nrgeo, &S, &parents, &adjlist, cutoff));
  ------------------
  |  |  656|   251k|    do { \
  |  |  657|   251k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   251k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   251k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 251k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   251k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 251k]
  |  |  ------------------
  ------------------
  642|   251k|        }
  643|       |
  644|       |        /* Aggregate betweenness scores for the nodes we have reached in this
  645|       |         * traversal */
  646|  1.83M|        while (!igraph_stack_int_empty(&S)) {
  ------------------
  |  Branch (646:16): [True: 1.58M, False: 251k]
  ------------------
  647|  1.58M|            igraph_int_t actnode = igraph_stack_int_pop(&S);
  648|  1.58M|            igraph_vector_int_t *neis = igraph_adjlist_get(&parents, actnode);
  ------------------
  |  |   73|  1.58M|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  649|  1.58M|            igraph_int_t nneis = igraph_vector_int_size(neis);
  650|  1.58M|            igraph_real_t coeff = (1 + tmpscore[actnode]) / nrgeo[actnode];
  651|       |
  652|  3.47M|            for (j = 0; j < nneis; j++) {
  ------------------
  |  Branch (652:25): [True: 1.89M, False: 1.58M]
  ------------------
  653|  1.89M|                neighbor = VECTOR(*neis)[j];
  ------------------
  |  |   60|  1.89M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  654|  1.89M|                tmpscore[neighbor] += nrgeo[neighbor] * coeff;
  655|  1.89M|            }
  656|       |
  657|  1.58M|            if (actnode != source) {
  ------------------
  |  Branch (657:17): [True: 1.33M, False: 251k]
  ------------------
  658|  1.33M|                VECTOR(*tmpres)[actnode] += tmpscore[actnode];
  ------------------
  |  |   60|  1.33M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  659|  1.33M|            }
  660|       |
  661|       |            /* Reset variables to ensure that the 'for' loop invariant will
  662|       |             * still be valid in the next iteration */
  663|       |
  664|  1.58M|            VECTOR(dist)[actnode] = 0;
  ------------------
  |  |   60|  1.58M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  665|  1.58M|            nrgeo[actnode] = 0;
  666|  1.58M|            tmpscore[actnode] = 0;
  667|  1.58M|            igraph_vector_int_clear(neis);
  668|  1.58M|        }
  669|       |
  670|   251k|    } /* for source < no_of_nodes */
  671|       |
  672|       |    /* Keep only the requested vertices */
  673|  5.85k|    if (!igraph_vs_is_all(&vids)) {
  ------------------
  |  Branch (673:9): [True: 0, False: 5.85k]
  ------------------
  674|      0|        IGRAPH_CHECK(igraph_vit_create(graph, vids, &vit));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  675|      0|        IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  603|      0|    do { \
  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  ------------------
  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  676|      0|        IGRAPH_CHECK(igraph_vector_resize(res, IGRAPH_VIT_SIZE(vit)));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  677|       |
  678|      0|        for (j = 0, IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit);
  ------------------
  |  |  201|      0|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
                      for (j = 0, IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit);
  ------------------
  |  |  179|      0|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (678:44): [True: 0, False: 0]
  ------------------
  679|      0|             IGRAPH_VIT_NEXT(vit), j++) {
  ------------------
  |  |  167|      0|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  680|      0|            igraph_int_t node = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  214|      0|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 0, False: 0]
  |  |  ------------------
  |  |  215|      0|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  681|      0|            VECTOR(*res)[j] = VECTOR(*tmpres)[node];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*res)[j] = VECTOR(*tmpres)[node];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  682|      0|        }
  683|       |
  684|      0|        igraph_vit_destroy(&vit);
  685|      0|        igraph_vector_destroy(tmpres);
  686|      0|        IGRAPH_FINALLY_CLEAN(2);
  687|      0|    }
  688|       |
  689|       |    /* The betweenness calculation is always done for all _ordered_ vertex pairs.
  690|       |     * We only need to correct for this in undirected graphs when normalized=false. */
  691|  5.85k|    if (normalized) {
  ------------------
  |  Branch (691:9): [True: 0, False: 5.85k]
  ------------------
  692|      0|        normalization_factor = 1.0 / (no_of_nodes * (no_of_nodes - 1.0));
  693|  5.85k|    } else {
  694|  5.85k|        normalization_factor = directed ? 1.0 : 0.5;
  ------------------
  |  Branch (694:32): [True: 2.92k, False: 2.92k]
  ------------------
  695|  5.85k|    }
  696|       |
  697|  5.85k|    igraph_vector_scale(res, normalization_factor);
  698|       |
  699|  5.85k|    IGRAPH_PROGRESS("Betweenness centrality: ", 100.0, 0);
  ------------------
  |  |  169|  5.85k|    do { \
  |  |  170|  5.85k|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  656|  5.85k|    do { \
  |  |  |  |  657|  5.85k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  5.85k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  5.85k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.85k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  5.85k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 5.85k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  171|  5.85k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (171:14): [Folded, False: 5.85k]
  |  |  ------------------
  ------------------
  700|       |
  701|  5.85k|    IGRAPH_FREE(nrgeo);
  ------------------
  |  |   36|  5.85k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  702|  5.85k|    IGRAPH_FREE(tmpscore);
  ------------------
  |  |   36|  5.85k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  703|  5.85k|    igraph_vector_destroy(&dist);
  704|  5.85k|    igraph_stack_int_destroy(&S);
  705|  5.85k|    igraph_adjlist_destroy(&parents);
  706|  5.85k|    if (weights) {
  ------------------
  |  Branch (706:9): [True: 0, False: 5.85k]
  ------------------
  707|      0|        igraph_inclist_destroy(&inclist);
  708|  5.85k|    } else {
  709|  5.85k|        igraph_adjlist_destroy(&adjlist);
  710|  5.85k|    }
  711|  5.85k|    IGRAPH_FINALLY_CLEAN(6);
  712|       |
  713|  5.85k|    return IGRAPH_SUCCESS;
  714|  5.85k|}
igraph_edge_betweenness:
  769|  2.92k|        igraph_bool_t directed, igraph_bool_t normalized) {
  770|       |
  771|  2.92k|    return igraph_edge_betweenness_cutoff(
  772|  2.92k|            graph, weights,
  773|  2.92k|            res, eids,
  774|  2.92k|            directed, normalized, -1);
  775|  2.92k|}
igraph_edge_betweenness_cutoff:
  821|  5.85k|        igraph_real_t cutoff) {
  822|       |
  823|  5.85k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  824|  5.85k|    igraph_int_t no_of_edges = igraph_ecount(graph);
  825|  5.85k|    igraph_inclist_t inclist, parents;
  826|  5.85k|    igraph_neimode_t mode;
  827|  5.85k|    igraph_vector_t dist;
  828|  5.85k|    igraph_vector_t v_tmpres, *tmpres = &v_tmpres;
  829|  5.85k|    igraph_real_t *nrgeo;
  830|  5.85k|    igraph_real_t *tmpscore;
  831|  5.85k|    igraph_int_t source, j;
  832|  5.85k|    igraph_stack_int_t S;
  833|  5.85k|    igraph_real_t normalization_factor;
  834|       |
  835|  5.85k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (835:9): [True: 0, False: 5.85k]
  ------------------
  836|      0|        directed = false;
  837|      0|    }
  838|  5.85k|    mode = directed ? IGRAPH_OUT : IGRAPH_ALL;
  ------------------
  |  Branch (838:12): [True: 2.92k, False: 2.92k]
  ------------------
  839|       |
  840|  5.85k|    IGRAPH_CHECK(betweenness_check_weights(weights, no_of_edges));
  ------------------
  |  |  656|  5.85k|    do { \
  |  |  657|  5.85k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  5.85k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  5.85k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.85k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  5.85k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 5.85k]
  |  |  ------------------
  ------------------
  841|       |
  842|  5.85k|    IGRAPH_CHECK(igraph_inclist_init(graph, &inclist, mode, IGRAPH_NO_LOOPS));
  ------------------
  |  |  656|  5.85k|    do { \
  |  |  657|  5.85k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  5.85k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  5.85k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.85k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  5.85k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 5.85k]
  |  |  ------------------
  ------------------
  843|  5.85k|    IGRAPH_FINALLY(igraph_inclist_destroy, &inclist);
  ------------------
  |  |  603|  5.85k|    do { \
  |  |  604|  5.85k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  5.85k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  5.85k|         * incorrect destructor function with the pointer */ \
  |  |  607|  5.85k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 5.85k]
  |  |  ------------------
  |  |  608|  5.85k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  5.85k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 5.85k]
  |  |  ------------------
  ------------------
  844|       |
  845|  5.85k|    IGRAPH_CHECK(igraph_inclist_init_empty(&parents, no_of_nodes));
  ------------------
  |  |  656|  5.85k|    do { \
  |  |  657|  5.85k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  5.85k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  5.85k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.85k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  5.85k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 5.85k]
  |  |  ------------------
  ------------------
  846|  5.85k|    IGRAPH_FINALLY(igraph_inclist_destroy, &parents);
  ------------------
  |  |  603|  5.85k|    do { \
  |  |  604|  5.85k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  5.85k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  5.85k|         * incorrect destructor function with the pointer */ \
  |  |  607|  5.85k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 5.85k]
  |  |  ------------------
  |  |  608|  5.85k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  5.85k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 5.85k]
  |  |  ------------------
  ------------------
  847|       |
  848|  5.85k|    IGRAPH_VECTOR_INIT_FINALLY(&dist, no_of_nodes);
  ------------------
  |  |  104|  5.85k|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  5.85k|    do { \
  |  |  |  |  657|  5.85k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  5.85k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  5.85k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.85k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  5.85k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 5.85k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  5.85k|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  5.85k|    do { \
  |  |  |  |  604|  5.85k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  5.85k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  5.85k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  5.85k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 5.85k]
  |  |  |  |  ------------------
  |  |  |  |  608|  5.85k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  5.85k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 5.85k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (105:60): [Folded, False: 5.85k]
  |  |  ------------------
  ------------------
  849|       |
  850|  5.85k|    nrgeo = IGRAPH_CALLOC(no_of_nodes, igraph_real_t);
  ------------------
  |  |   33|  5.85k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  11.7k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 5.85k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 5.85k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 5.85k, False: 4]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  851|  5.85k|    IGRAPH_CHECK_OOM(nrgeo, "Insufficient memory for edge betweenness calculation.");
  ------------------
  |  |  709|  5.85k|    do { \
  |  |  710|  5.85k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  5.85k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.85k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  5.85k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 5.85k]
  |  |  ------------------
  ------------------
  852|  5.85k|    IGRAPH_FINALLY(igraph_free, nrgeo);
  ------------------
  |  |  603|  5.85k|    do { \
  |  |  604|  5.85k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  5.85k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  5.85k|         * incorrect destructor function with the pointer */ \
  |  |  607|  5.85k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 5.85k]
  |  |  ------------------
  |  |  608|  5.85k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  5.85k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 5.85k]
  |  |  ------------------
  ------------------
  853|       |
  854|  5.85k|    tmpscore = IGRAPH_CALLOC(no_of_nodes, igraph_real_t);
  ------------------
  |  |   33|  5.85k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  11.7k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 5.85k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 5.85k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 5.85k, False: 4]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  855|  5.85k|    if (tmpscore == 0) {
  ------------------
  |  Branch (855:9): [True: 0, False: 5.85k]
  ------------------
  856|      0|        IGRAPH_ERROR("Insufficient memory for edge betweenness calculation.", IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  857|      0|    }
  858|  5.85k|    IGRAPH_FINALLY(igraph_free, tmpscore);
  ------------------
  |  |  603|  5.85k|    do { \
  |  |  604|  5.85k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  5.85k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  5.85k|         * incorrect destructor function with the pointer */ \
  |  |  607|  5.85k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 5.85k]
  |  |  ------------------
  |  |  608|  5.85k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  5.85k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 5.85k]
  |  |  ------------------
  ------------------
  859|       |
  860|  5.85k|    IGRAPH_CHECK(igraph_stack_int_init(&S, no_of_nodes));
  ------------------
  |  |  656|  5.85k|    do { \
  |  |  657|  5.85k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  5.85k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  5.85k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.85k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  5.85k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 5.85k]
  |  |  ------------------
  ------------------
  861|  5.85k|    IGRAPH_FINALLY(igraph_stack_int_destroy, &S);
  ------------------
  |  |  603|  5.85k|    do { \
  |  |  604|  5.85k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  5.85k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  5.85k|         * incorrect destructor function with the pointer */ \
  |  |  607|  5.85k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 5.85k]
  |  |  ------------------
  |  |  608|  5.85k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  5.85k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 5.85k]
  |  |  ------------------
  ------------------
  862|       |
  863|  5.85k|    if (!igraph_es_is_all(&eids)) {
  ------------------
  |  Branch (863:9): [True: 0, False: 5.85k]
  ------------------
  864|       |        /* result needed only for a subset of the vertices */
  865|      0|        IGRAPH_VECTOR_INIT_FINALLY(tmpres, no_of_edges);
  ------------------
  |  |  104|      0|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|      0|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|      0|    do { \
  |  |  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (105:60): [Folded, False: 0]
  |  |  ------------------
  ------------------
  866|  5.85k|    } else {
  867|       |        /* result covers all vertices */
  868|  5.85k|        IGRAPH_CHECK(igraph_vector_resize(res, no_of_edges));
  ------------------
  |  |  656|  5.85k|    do { \
  |  |  657|  5.85k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  5.85k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  5.85k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.85k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  5.85k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 5.85k]
  |  |  ------------------
  ------------------
  869|  5.85k|        igraph_vector_null(res);
  870|  5.85k|        tmpres = res;
  871|  5.85k|    }
  872|       |
  873|   257k|    for (source = 0; source < no_of_nodes; source++) {
  ------------------
  |  Branch (873:22): [True: 251k, False: 5.85k]
  ------------------
  874|       |
  875|       |        /* Loop invariant that is valid at this point:
  876|       |         *
  877|       |         * - the stack S is empty
  878|       |         * - the 'dist' vector contains zeros only
  879|       |         * - the 'nrgeo' array contains zeros only
  880|       |         * - the 'tmpscore' array contains zeros only
  881|       |         * - the 'parents' incidence list contains empty vectors only
  882|       |         */
  883|       |
  884|   251k|        IGRAPH_PROGRESS("Edge betweenness centrality: ", 100.0 * source / no_of_nodes, 0);
  ------------------
  |  |  169|   251k|    do { \
  |  |  170|   251k|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  656|   251k|    do { \
  |  |  |  |  657|   251k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|   251k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|   251k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 251k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|   251k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 251k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  171|   251k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (171:14): [Folded, False: 251k]
  |  |  ------------------
  ------------------
  885|   251k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|   251k|    do { \
  |  |   47|   251k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 251k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|   251k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 251k]
  |  |  ------------------
  ------------------
  886|       |
  887|       |        /* Conduct a single-source shortest path search from the source node */
  888|   251k|        if (weights) {
  ------------------
  |  Branch (888:13): [True: 0, False: 251k]
  ------------------
  889|      0|            IGRAPH_CHECK(sspf_weighted_edge(graph, source, &dist, nrgeo, weights, &S, &parents, &inclist, cutoff));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  890|   251k|        } else {
  891|   251k|            IGRAPH_CHECK(sspf_edge(graph, source, &dist, nrgeo, &S, &parents, &inclist, cutoff));
  ------------------
  |  |  656|   251k|    do { \
  |  |  657|   251k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   251k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   251k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 251k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   251k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 251k]
  |  |  ------------------
  ------------------
  892|   251k|        }
  893|       |
  894|       |        /* Aggregate betweenness scores for the edges we have reached in this
  895|       |         * traversal */
  896|  1.78M|        while (!igraph_stack_int_empty(&S)) {
  ------------------
  |  Branch (896:16): [True: 1.53M, False: 251k]
  ------------------
  897|  1.53M|            igraph_int_t actnode = igraph_stack_int_pop(&S);
  898|  1.53M|            igraph_vector_int_t *parentv = igraph_inclist_get(&parents, actnode);
  ------------------
  |  |  102|  1.53M|#define igraph_inclist_get(il,no) (&(il)->incs[(igraph_int_t)(no)])
  ------------------
  899|  1.53M|            igraph_int_t parentv_len = igraph_vector_int_size(parentv);
  900|  1.53M|            igraph_real_t coeff = (1 + tmpscore[actnode]) / nrgeo[actnode];
  901|       |
  902|  3.37M|            for (j = 0; j < parentv_len; j++) {
  ------------------
  |  Branch (902:25): [True: 1.83M, False: 1.53M]
  ------------------
  903|  1.83M|                igraph_int_t fedge = VECTOR(*parentv)[j];
  ------------------
  |  |   60|  1.83M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  904|  1.83M|                igraph_int_t neighbor = IGRAPH_OTHER(graph, fedge, actnode);
  ------------------
  |  |  146|  1.83M|    ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|  1.83M|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  1.83M|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  115|  1.19M|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  1.19M|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|   639k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|   639k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (146:21): [True: 1.19M, False: 639k]
  |  |  ------------------
  ------------------
  905|  1.83M|                tmpscore[neighbor] += nrgeo[neighbor] * coeff;
  906|  1.83M|                VECTOR(*tmpres)[fedge] += nrgeo[neighbor] * coeff;
  ------------------
  |  |   60|  1.83M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  907|  1.83M|            }
  908|       |
  909|       |            /* Reset variables to ensure that the 'for' loop invariant will
  910|       |             * still be valid in the next iteration */
  911|       |
  912|  1.53M|            VECTOR(dist)[actnode] = 0;
  ------------------
  |  |   60|  1.53M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  913|  1.53M|            nrgeo[actnode] = 0;
  914|  1.53M|            tmpscore[actnode] = 0;
  915|  1.53M|            igraph_vector_int_clear(parentv);
  916|  1.53M|        }
  917|   251k|    } /* source < no_of_nodes */
  918|       |
  919|       |    /* Keep only the requested edges */
  920|  5.85k|    if (!igraph_es_is_all(&eids)) {
  ------------------
  |  Branch (920:9): [True: 0, False: 5.85k]
  ------------------
  921|      0|        igraph_eit_t eit;
  922|       |
  923|      0|        IGRAPH_CHECK(igraph_eit_create(graph, eids, &eit));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  924|      0|        IGRAPH_FINALLY(igraph_eit_destroy, &eit);
  ------------------
  |  |  603|      0|    do { \
  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  ------------------
  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  925|       |
  926|      0|        IGRAPH_CHECK(igraph_vector_resize(res, IGRAPH_EIT_SIZE(eit)));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  927|       |
  928|      0|        for (j = 0, IGRAPH_EIT_RESET(eit); !IGRAPH_EIT_END(eit);
  ------------------
  |  |  393|      0|#define IGRAPH_EIT_RESET(eit) ((eit).pos = (eit).start)
  ------------------
                      for (j = 0, IGRAPH_EIT_RESET(eit); !IGRAPH_EIT_END(eit);
  ------------------
  |  |  371|      0|#define IGRAPH_EIT_END(eit)   ((eit).pos >= (eit).end)
  ------------------
  |  Branch (928:44): [True: 0, False: 0]
  ------------------
  929|      0|             IGRAPH_EIT_NEXT(eit), j++) {
  ------------------
  |  |  359|      0|#define IGRAPH_EIT_NEXT(eit) (++((eit).pos))
  ------------------
  930|      0|            igraph_int_t edge = IGRAPH_EIT_GET(eit);
  ------------------
  |  |  405|      0|    (igraph_int_t)((((eit).type == IGRAPH_EIT_RANGE) ? (eit).pos : \
  |  |  ------------------
  |  |  |  Branch (405:21): [True: 0, False: 0]
  |  |  ------------------
  |  |  406|      0|                        VECTOR(*(eit).vec)[(eit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  931|      0|            VECTOR(*res)[j] = VECTOR(*tmpres)[edge];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*res)[j] = VECTOR(*tmpres)[edge];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  932|      0|        }
  933|       |
  934|      0|        igraph_eit_destroy(&eit);
  935|      0|        igraph_vector_destroy(tmpres);
  936|      0|        IGRAPH_FINALLY_CLEAN(2);
  937|      0|    }
  938|       |
  939|       |    /* The betweenness calculation is always done for all _ordered_ vertex pairs.
  940|       |     * We only need to correct for this in undirected graphs when normalized=false. */
  941|  5.85k|    if (normalized) {
  ------------------
  |  Branch (941:9): [True: 0, False: 5.85k]
  ------------------
  942|      0|        normalization_factor = 1.0 / (no_of_nodes * (no_of_nodes - 1.0));
  943|  5.85k|    } else {
  944|  5.85k|        normalization_factor = directed ? 1.0 : 0.5;
  ------------------
  |  Branch (944:32): [True: 2.92k, False: 2.92k]
  ------------------
  945|  5.85k|    }
  946|       |
  947|  5.85k|    igraph_vector_scale(res, normalization_factor);
  948|       |
  949|  5.85k|    IGRAPH_PROGRESS("Edge betweenness centrality: ", 100.0, 0);
  ------------------
  |  |  169|  5.85k|    do { \
  |  |  170|  5.85k|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  656|  5.85k|    do { \
  |  |  |  |  657|  5.85k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  5.85k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  5.85k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.85k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  5.85k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 5.85k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  171|  5.85k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (171:14): [Folded, False: 5.85k]
  |  |  ------------------
  ------------------
  950|       |
  951|  5.85k|    igraph_stack_int_destroy(&S);
  952|  5.85k|    igraph_inclist_destroy(&inclist);
  953|  5.85k|    igraph_inclist_destroy(&parents);
  954|  5.85k|    igraph_vector_destroy(&dist);
  955|  5.85k|    IGRAPH_FREE(tmpscore);
  ------------------
  |  |   36|  5.85k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  956|  5.85k|    IGRAPH_FREE(nrgeo);
  ------------------
  |  |   36|  5.85k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  957|  5.85k|    IGRAPH_FINALLY_CLEAN(6);
  958|       |
  959|  5.85k|    return IGRAPH_SUCCESS;
  960|  5.85k|}
igraph_betweenness_subset:
 1005|  1.33k|        igraph_bool_t directed, igraph_bool_t normalized) {
 1006|       |
 1007|  1.33k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
 1008|  1.33k|    igraph_int_t no_of_edges = igraph_ecount(graph);
 1009|  1.33k|    igraph_int_t no_of_sources;
 1010|  1.33k|    igraph_int_t no_of_processed_sources;
 1011|  1.33k|    igraph_adjlist_t adjlist, parents;
 1012|  1.33k|    igraph_inclist_t inclist;
 1013|  1.33k|    igraph_int_t source, j;
 1014|  1.33k|    igraph_stack_int_t S;
 1015|  1.33k|    igraph_vector_t v_tmpres, *tmpres = &v_tmpres;
 1016|  1.33k|    igraph_neimode_t mode = directed ? IGRAPH_OUT : IGRAPH_ALL;
  ------------------
  |  Branch (1016:29): [True: 1.33k, False: 0]
  ------------------
 1017|  1.33k|    igraph_int_t parent;
 1018|  1.33k|    igraph_vector_t dist;
 1019|  1.33k|    igraph_real_t *nrgeo;
 1020|  1.33k|    igraph_real_t *tmpscore;
 1021|  1.33k|    igraph_vit_t vit;
 1022|  1.33k|    bool *is_target;
 1023|       |
 1024|  1.33k|    if (normalized) {
  ------------------
  |  Branch (1024:9): [True: 0, False: 1.33k]
  ------------------
 1025|      0|        IGRAPH_ERROR("Normalization is not yet implemented for subset betweenness.", IGRAPH_UNIMPLEMENTED);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1026|      0|    }
 1027|       |
 1028|  1.33k|    IGRAPH_CHECK(betweenness_check_weights(weights, no_of_edges));
  ------------------
  |  |  656|  1.33k|    do { \
  |  |  657|  1.33k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.33k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.33k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.33k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.33k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.33k]
  |  |  ------------------
  ------------------
 1029|       |
 1030|  1.33k|    IGRAPH_CHECK(igraph_vs_size(graph, &sources, &no_of_sources));
  ------------------
  |  |  656|  1.33k|    do { \
  |  |  657|  1.33k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.33k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.33k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.33k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.33k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.33k]
  |  |  ------------------
  ------------------
 1031|       |
 1032|  1.33k|    if (weights) {
  ------------------
  |  Branch (1032:9): [True: 0, False: 1.33k]
  ------------------
 1033|      0|        IGRAPH_CHECK(igraph_inclist_init(graph, &inclist, mode, IGRAPH_NO_LOOPS));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1034|      0|        IGRAPH_FINALLY(igraph_inclist_destroy, &inclist);
  ------------------
  |  |  603|      0|    do { \
  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  ------------------
  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1035|  1.33k|    } else {
 1036|  1.33k|        IGRAPH_CHECK(igraph_adjlist_init(graph, &adjlist, mode, IGRAPH_NO_LOOPS, IGRAPH_MULTIPLE));
  ------------------
  |  |  656|  1.33k|    do { \
  |  |  657|  1.33k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.33k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.33k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.33k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.33k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.33k]
  |  |  ------------------
  ------------------
 1037|  1.33k|        IGRAPH_FINALLY(igraph_adjlist_destroy, &adjlist);
  ------------------
  |  |  603|  1.33k|    do { \
  |  |  604|  1.33k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  1.33k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  1.33k|         * incorrect destructor function with the pointer */ \
  |  |  607|  1.33k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 1.33k]
  |  |  ------------------
  |  |  608|  1.33k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  1.33k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 1.33k]
  |  |  ------------------
  ------------------
 1038|  1.33k|    }
 1039|       |
 1040|  1.33k|    IGRAPH_CHECK(igraph_adjlist_init_empty(&parents, no_of_nodes));
  ------------------
  |  |  656|  1.33k|    do { \
  |  |  657|  1.33k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.33k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.33k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.33k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.33k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.33k]
  |  |  ------------------
  ------------------
 1041|  1.33k|    IGRAPH_FINALLY(igraph_adjlist_destroy, &parents);
  ------------------
  |  |  603|  1.33k|    do { \
  |  |  604|  1.33k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  1.33k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  1.33k|         * incorrect destructor function with the pointer */ \
  |  |  607|  1.33k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 1.33k]
  |  |  ------------------
  |  |  608|  1.33k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  1.33k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 1.33k]
  |  |  ------------------
  ------------------
 1042|       |
 1043|  1.33k|    IGRAPH_CHECK(igraph_stack_int_init(&S, no_of_nodes));
  ------------------
  |  |  656|  1.33k|    do { \
  |  |  657|  1.33k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.33k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.33k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.33k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.33k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.33k]
  |  |  ------------------
  ------------------
 1044|  1.33k|    IGRAPH_FINALLY(igraph_stack_int_destroy, &S);
  ------------------
  |  |  603|  1.33k|    do { \
  |  |  604|  1.33k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  1.33k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  1.33k|         * incorrect destructor function with the pointer */ \
  |  |  607|  1.33k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 1.33k]
  |  |  ------------------
  |  |  608|  1.33k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  1.33k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 1.33k]
  |  |  ------------------
  ------------------
 1045|       |
 1046|  1.33k|    IGRAPH_VECTOR_INIT_FINALLY(&dist, no_of_nodes);
  ------------------
  |  |  104|  1.33k|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  1.33k|    do { \
  |  |  |  |  657|  1.33k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.33k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.33k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.33k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.33k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.33k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  1.33k|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  1.33k|    do { \
  |  |  |  |  604|  1.33k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.33k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.33k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.33k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.33k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.33k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.33k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.33k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (105:60): [Folded, False: 1.33k]
  |  |  ------------------
  ------------------
 1047|       |
 1048|  1.33k|    nrgeo = IGRAPH_CALLOC(no_of_nodes, igraph_real_t);
  ------------------
  |  |   33|  1.33k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  2.66k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 1.33k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 1.33k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 1.33k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1049|  1.33k|    IGRAPH_CHECK_OOM(nrgeo, "Insufficient memory for subset betweenness calculation.");
  ------------------
  |  |  709|  1.33k|    do { \
  |  |  710|  1.33k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  1.33k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.33k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  1.33k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 1.33k]
  |  |  ------------------
  ------------------
 1050|  1.33k|    IGRAPH_FINALLY(igraph_free, nrgeo);
  ------------------
  |  |  603|  1.33k|    do { \
  |  |  604|  1.33k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  1.33k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  1.33k|         * incorrect destructor function with the pointer */ \
  |  |  607|  1.33k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 1.33k]
  |  |  ------------------
  |  |  608|  1.33k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  1.33k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 1.33k]
  |  |  ------------------
  ------------------
 1051|       |
 1052|  1.33k|    tmpscore = IGRAPH_CALLOC(no_of_nodes, igraph_real_t);
  ------------------
  |  |   33|  1.33k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  2.66k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 1.33k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 1.33k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 1.33k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1053|  1.33k|    IGRAPH_CHECK_OOM(tmpscore, "Insufficient memory for subset betweenness calculation.");
  ------------------
  |  |  709|  1.33k|    do { \
  |  |  710|  1.33k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  1.33k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.33k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  1.33k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 1.33k]
  |  |  ------------------
  ------------------
 1054|  1.33k|    IGRAPH_FINALLY(igraph_free, tmpscore);
  ------------------
  |  |  603|  1.33k|    do { \
  |  |  604|  1.33k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  1.33k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  1.33k|         * incorrect destructor function with the pointer */ \
  |  |  607|  1.33k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 1.33k]
  |  |  ------------------
  |  |  608|  1.33k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  1.33k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 1.33k]
  |  |  ------------------
  ------------------
 1055|       |
 1056|  1.33k|    is_target = IGRAPH_CALLOC(no_of_nodes, bool);
  ------------------
  |  |   33|  1.33k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  2.66k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 1.33k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 1.33k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 1.33k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1057|  1.33k|    IGRAPH_CHECK_OOM(is_target, "Insufficient memory for subset betweenness calculation.");
  ------------------
  |  |  709|  1.33k|    do { \
  |  |  710|  1.33k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  1.33k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.33k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  1.33k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 1.33k]
  |  |  ------------------
  ------------------
 1058|  1.33k|    IGRAPH_FINALLY(igraph_free, is_target);
  ------------------
  |  |  603|  1.33k|    do { \
  |  |  604|  1.33k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  1.33k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  1.33k|         * incorrect destructor function with the pointer */ \
  |  |  607|  1.33k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 1.33k]
  |  |  ------------------
  |  |  608|  1.33k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  1.33k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 1.33k]
  |  |  ------------------
  ------------------
 1059|       |
 1060|  1.33k|    IGRAPH_CHECK(igraph_vit_create(graph, targets, &vit));
  ------------------
  |  |  656|  1.33k|    do { \
  |  |  657|  1.33k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.33k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.33k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.33k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.33k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.33k]
  |  |  ------------------
  ------------------
 1061|  1.33k|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  603|  1.33k|    do { \
  |  |  604|  1.33k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  1.33k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  1.33k|         * incorrect destructor function with the pointer */ \
  |  |  607|  1.33k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 1.33k]
  |  |  ------------------
  |  |  608|  1.33k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  1.33k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 1.33k]
  |  |  ------------------
  ------------------
 1062|  7.98k|    for (IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  201|  1.33k|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
                  for (IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  179|  7.98k|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
                  for (IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  167|  6.65k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  |  Branch (1062:33): [True: 6.65k, False: 1.33k]
  ------------------
 1063|  6.65k|        is_target[IGRAPH_VIT_GET(vit)] = true;
  ------------------
  |  |  214|  6.65k|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 6.65k, False: 0]
  |  |  ------------------
  |  |  215|  6.65k|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1064|  6.65k|    }
 1065|  1.33k|    igraph_vit_destroy(&vit);
 1066|  1.33k|    IGRAPH_FINALLY_CLEAN(1);
 1067|       |
 1068|  1.33k|    if (!igraph_vs_is_all(&vids)) {
  ------------------
  |  Branch (1068:9): [True: 0, False: 1.33k]
  ------------------
 1069|       |        /* result needed only for a subset of the vertices */
 1070|      0|        IGRAPH_VECTOR_INIT_FINALLY(tmpres, no_of_nodes);
  ------------------
  |  |  104|      0|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|      0|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|      0|    do { \
  |  |  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (105:60): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1071|  1.33k|    } else {
 1072|       |        /* result covers all vertices */
 1073|  1.33k|        IGRAPH_CHECK(igraph_vector_resize(res, no_of_nodes));
  ------------------
  |  |  656|  1.33k|    do { \
  |  |  657|  1.33k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.33k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.33k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.33k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.33k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.33k]
  |  |  ------------------
  ------------------
 1074|  1.33k|        igraph_vector_null(res);
 1075|  1.33k|        tmpres = res;
 1076|  1.33k|    }
 1077|       |
 1078|  1.33k|    IGRAPH_CHECK(igraph_vit_create(graph, sources, &vit));
  ------------------
  |  |  656|  1.33k|    do { \
  |  |  657|  1.33k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.33k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.33k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.33k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.33k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.33k]
  |  |  ------------------
  ------------------
 1079|  1.33k|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  603|  1.33k|    do { \
  |  |  604|  1.33k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  1.33k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  1.33k|         * incorrect destructor function with the pointer */ \
  |  |  607|  1.33k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 1.33k]
  |  |  ------------------
  |  |  608|  1.33k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  1.33k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 1.33k]
  |  |  ------------------
  ------------------
 1080|       |
 1081|  1.33k|    for (
 1082|  1.33k|        no_of_processed_sources = 0, IGRAPH_VIT_RESET(vit);
  ------------------
  |  |  201|  1.33k|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
 1083|  7.98k|        !IGRAPH_VIT_END(vit);
  ------------------
  |  |  179|  7.98k|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (1083:9): [True: 6.65k, False: 1.33k]
  ------------------
 1084|  6.65k|        IGRAPH_VIT_NEXT(vit), no_of_processed_sources++
  ------------------
  |  |  167|  6.65k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
 1085|  6.65k|    ) {
 1086|  6.65k|        source = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  214|  6.65k|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 6.65k, False: 0]
  |  |  ------------------
  |  |  215|  6.65k|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1087|       |
 1088|  6.65k|        IGRAPH_PROGRESS(
  ------------------
  |  |  169|  6.65k|    do { \
  |  |  170|  6.65k|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  656|  6.65k|    do { \
  |  |  |  |  657|  6.65k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  6.65k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  6.65k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 6.65k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  6.65k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 6.65k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  171|  6.65k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (171:14): [Folded, False: 6.65k]
  |  |  ------------------
  ------------------
 1089|  6.65k|            "Betweenness centrality (subset): ",
 1090|  6.65k|            100.0 * no_of_processed_sources / no_of_sources, 0
 1091|  6.65k|        );
 1092|  6.65k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|  6.65k|    do { \
  |  |   47|  6.65k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 6.65k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|  6.65k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 6.65k]
  |  |  ------------------
  ------------------
 1093|       |
 1094|       |        /* Loop invariant that is valid at this point:
 1095|       |         *
 1096|       |         * - the stack S is empty
 1097|       |         * - the 'dist' vector contains zeros only
 1098|       |         * - the 'nrgeo' array contains zeros only
 1099|       |         * - the 'tmpscore' array contains zeros only
 1100|       |         * - the 'parents' adjacency list contains empty vectors only
 1101|       |         */
 1102|       |
 1103|       |        /* TODO: there is more room for optimization here; the single-source
 1104|       |         * shortest path search runs until it reaches all the nodes in the
 1105|       |         * component of the source node even if we are only interested in a
 1106|       |         * smaller target subset. We could stop the search when all target
 1107|       |         * nodes were reached.
 1108|       |         */
 1109|       |
 1110|       |        /* Conduct a single-source shortest path search from the source node */
 1111|  6.65k|        if (weights) {
  ------------------
  |  Branch (1111:13): [True: 0, False: 6.65k]
  ------------------
 1112|      0|            IGRAPH_CHECK(sspf_weighted(graph, source, &dist, nrgeo, weights, &S, &parents, &inclist, -1));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1113|  6.65k|        } else {
 1114|  6.65k|            IGRAPH_CHECK(sspf(source, &dist, nrgeo, &S, &parents, &adjlist, -1));
  ------------------
  |  |  656|  6.65k|    do { \
  |  |  657|  6.65k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  6.65k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  6.65k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 6.65k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  6.65k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 6.65k]
  |  |  ------------------
  ------------------
 1115|  6.65k|        }
 1116|       |
 1117|       |        /* Aggregate betweenness scores for the nodes we have reached in this
 1118|       |         * traversal */
 1119|  46.4k|        while (!igraph_stack_int_empty(&S)) {
  ------------------
  |  Branch (1119:16): [True: 39.8k, False: 6.65k]
  ------------------
 1120|  39.8k|            igraph_int_t actnode = igraph_stack_int_pop(&S);
 1121|  39.8k|            igraph_vector_int_t *parentv = igraph_adjlist_get(&parents, actnode);
  ------------------
  |  |   73|  39.8k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
 1122|  39.8k|            igraph_int_t parentv_len = igraph_vector_int_size(parentv);
 1123|  39.8k|            igraph_real_t coeff;
 1124|       |
 1125|  39.8k|            if (is_target[actnode]) {
  ------------------
  |  Branch (1125:17): [True: 3.84k, False: 35.9k]
  ------------------
 1126|  3.84k|                coeff = (1 + tmpscore[actnode]) / nrgeo[actnode];
 1127|  35.9k|            } else {
 1128|  35.9k|                coeff = tmpscore[actnode] / nrgeo[actnode];
 1129|  35.9k|            }
 1130|       |
 1131|  83.8k|            for (j = 0; j < parentv_len; j++) {
  ------------------
  |  Branch (1131:25): [True: 43.9k, False: 39.8k]
  ------------------
 1132|  43.9k|                parent = VECTOR(*parentv)[j];
  ------------------
  |  |   60|  43.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1133|  43.9k|                tmpscore[parent] += nrgeo[parent] * coeff;
 1134|  43.9k|            }
 1135|       |
 1136|  39.8k|            if (actnode != source) {
  ------------------
  |  Branch (1136:17): [True: 33.1k, False: 6.65k]
  ------------------
 1137|  33.1k|                VECTOR(*tmpres)[actnode] += tmpscore[actnode];
  ------------------
  |  |   60|  33.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1138|  33.1k|            }
 1139|       |
 1140|       |            /* Reset variables to ensure that the 'for' loop invariant will
 1141|       |             * still be valid in the next iteration */
 1142|       |
 1143|  39.8k|            VECTOR(dist)[actnode] = 0;
  ------------------
  |  |   60|  39.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1144|  39.8k|            nrgeo[actnode] = 0;
 1145|  39.8k|            tmpscore[actnode] = 0;
 1146|  39.8k|            igraph_vector_int_clear(parentv);
 1147|  39.8k|        }
 1148|  6.65k|    }
 1149|       |
 1150|  1.33k|    igraph_vit_destroy(&vit);
 1151|  1.33k|    IGRAPH_FINALLY_CLEAN(1);
 1152|       |
 1153|       |    /* Keep only the requested vertices */
 1154|  1.33k|    if (!igraph_vs_is_all(&vids)) {
  ------------------
  |  Branch (1154:9): [True: 0, False: 1.33k]
  ------------------
 1155|      0|        IGRAPH_CHECK(igraph_vit_create(graph, vids, &vit));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1156|      0|        IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  603|      0|    do { \
  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  ------------------
  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1157|       |
 1158|      0|        IGRAPH_CHECK(igraph_vector_resize(res, IGRAPH_VIT_SIZE(vit)));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1159|      0|        for (j = 0, IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit);
  ------------------
  |  |  201|      0|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
                      for (j = 0, IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit);
  ------------------
  |  |  179|      0|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (1159:44): [True: 0, False: 0]
  ------------------
 1160|      0|             IGRAPH_VIT_NEXT(vit), j++) {
  ------------------
  |  |  167|      0|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
 1161|      0|            igraph_int_t node = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  214|      0|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 0, False: 0]
  |  |  ------------------
  |  |  215|      0|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1162|      0|            VECTOR(*res)[j] = VECTOR(*tmpres)[node];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*res)[j] = VECTOR(*tmpres)[node];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1163|      0|        }
 1164|       |
 1165|      0|        igraph_vit_destroy(&vit);
 1166|      0|        igraph_vector_destroy(tmpres);
 1167|      0|        IGRAPH_FINALLY_CLEAN(2);
 1168|      0|    }
 1169|       |
 1170|  1.33k|   if (!directed || !igraph_is_directed(graph)) {
  ------------------
  |  Branch (1170:8): [True: 0, False: 1.33k]
  |  Branch (1170:21): [True: 0, False: 1.33k]
  ------------------
 1171|      0|        igraph_vector_scale(res, 0.5);
 1172|      0|    }
 1173|       |
 1174|  1.33k|    IGRAPH_FREE(is_target);
  ------------------
  |  |   36|  1.33k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1175|  1.33k|    IGRAPH_FREE(tmpscore);
  ------------------
  |  |   36|  1.33k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1176|  1.33k|    IGRAPH_FREE(nrgeo);
  ------------------
  |  |   36|  1.33k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1177|  1.33k|    igraph_vector_destroy(&dist);
 1178|  1.33k|    igraph_stack_int_destroy(&S);
 1179|  1.33k|    igraph_adjlist_destroy(&parents);
 1180|  1.33k|    if (weights) {
  ------------------
  |  Branch (1180:9): [True: 0, False: 1.33k]
  ------------------
 1181|      0|        igraph_inclist_destroy(&inclist);
 1182|  1.33k|    } else {
 1183|  1.33k|        igraph_adjlist_destroy(&adjlist);
 1184|  1.33k|    }
 1185|  1.33k|    IGRAPH_FINALLY_CLEAN(7);
 1186|       |
 1187|  1.33k|    return IGRAPH_SUCCESS;
 1188|  1.33k|}
igraph_edge_betweenness_subset:
 1232|  1.33k|        igraph_bool_t directed, igraph_bool_t normalized) {
 1233|       |
 1234|  1.33k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
 1235|  1.33k|    igraph_int_t no_of_edges = igraph_ecount(graph);
 1236|  1.33k|    igraph_int_t no_of_sources;
 1237|  1.33k|    igraph_int_t no_of_processed_sources;
 1238|  1.33k|    igraph_inclist_t inclist, parents;
 1239|  1.33k|    igraph_vit_t vit;
 1240|  1.33k|    igraph_eit_t eit;
 1241|  1.33k|    igraph_neimode_t mode = directed ? IGRAPH_OUT : IGRAPH_ALL;
  ------------------
  |  Branch (1241:29): [True: 1.33k, False: 0]
  ------------------
 1242|  1.33k|    igraph_vector_t dist;
 1243|  1.33k|    igraph_vector_t v_tmpres, *tmpres = &v_tmpres;
 1244|  1.33k|    igraph_real_t *nrgeo;
 1245|  1.33k|    igraph_real_t *tmpscore;
 1246|  1.33k|    igraph_int_t source, j;
 1247|  1.33k|    bool *is_target;
 1248|  1.33k|    igraph_stack_int_t S;
 1249|       |
 1250|  1.33k|    if (normalized) {
  ------------------
  |  Branch (1250:9): [True: 0, False: 1.33k]
  ------------------
 1251|      0|        IGRAPH_ERROR("Normalization is not yet implemented for subset edge betweenness.", IGRAPH_UNIMPLEMENTED);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1252|      0|    }
 1253|       |
 1254|  1.33k|    IGRAPH_CHECK(betweenness_check_weights(weights, no_of_edges));
  ------------------
  |  |  656|  1.33k|    do { \
  |  |  657|  1.33k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.33k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.33k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.33k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.33k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.33k]
  |  |  ------------------
  ------------------
 1255|       |
 1256|  1.33k|    IGRAPH_CHECK(igraph_vs_size(graph, &sources, &no_of_sources));
  ------------------
  |  |  656|  1.33k|    do { \
  |  |  657|  1.33k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.33k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.33k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.33k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.33k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.33k]
  |  |  ------------------
  ------------------
 1257|       |
 1258|  1.33k|    is_target = IGRAPH_CALLOC(no_of_nodes, bool);
  ------------------
  |  |   33|  1.33k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  2.66k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 1.33k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 1.33k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 1.33k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1259|  1.33k|    IGRAPH_CHECK_OOM(is_target, "Insufficient memory for subset edge betweenness calculation.");
  ------------------
  |  |  709|  1.33k|    do { \
  |  |  710|  1.33k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  1.33k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.33k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  1.33k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 1.33k]
  |  |  ------------------
  ------------------
 1260|  1.33k|    IGRAPH_FINALLY(igraph_free, is_target);
  ------------------
  |  |  603|  1.33k|    do { \
  |  |  604|  1.33k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  1.33k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  1.33k|         * incorrect destructor function with the pointer */ \
  |  |  607|  1.33k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 1.33k]
  |  |  ------------------
  |  |  608|  1.33k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  1.33k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 1.33k]
  |  |  ------------------
  ------------------
 1261|       |
 1262|  1.33k|    IGRAPH_CHECK(igraph_vit_create(graph, targets, &vit));
  ------------------
  |  |  656|  1.33k|    do { \
  |  |  657|  1.33k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.33k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.33k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.33k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.33k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.33k]
  |  |  ------------------
  ------------------
 1263|  1.33k|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  603|  1.33k|    do { \
  |  |  604|  1.33k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  1.33k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  1.33k|         * incorrect destructor function with the pointer */ \
  |  |  607|  1.33k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 1.33k]
  |  |  ------------------
  |  |  608|  1.33k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  1.33k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 1.33k]
  |  |  ------------------
  ------------------
 1264|  14.6k|    for (IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  201|  1.33k|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
                  for (IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  179|  14.6k|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
                  for (IGRAPH_VIT_RESET(vit); !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit)) {
  ------------------
  |  |  167|  13.3k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  |  Branch (1264:33): [True: 13.3k, False: 1.33k]
  ------------------
 1265|  13.3k|        is_target[IGRAPH_VIT_GET(vit)] = true;
  ------------------
  |  |  214|  13.3k|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 13.3k, False: 0]
  |  |  ------------------
  |  |  215|  13.3k|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1266|  13.3k|    }
 1267|  1.33k|    igraph_vit_destroy(&vit);
 1268|  1.33k|    IGRAPH_FINALLY_CLEAN(1);
 1269|       |
 1270|  1.33k|    IGRAPH_CHECK(igraph_inclist_init(graph, &inclist, mode, IGRAPH_NO_LOOPS));
  ------------------
  |  |  656|  1.33k|    do { \
  |  |  657|  1.33k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.33k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.33k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.33k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.33k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.33k]
  |  |  ------------------
  ------------------
 1271|  1.33k|    IGRAPH_FINALLY(igraph_inclist_destroy, &inclist);
  ------------------
  |  |  603|  1.33k|    do { \
  |  |  604|  1.33k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  1.33k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  1.33k|         * incorrect destructor function with the pointer */ \
  |  |  607|  1.33k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 1.33k]
  |  |  ------------------
  |  |  608|  1.33k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  1.33k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 1.33k]
  |  |  ------------------
  ------------------
 1272|  1.33k|    IGRAPH_CHECK(igraph_inclist_init_empty(&parents, no_of_nodes));
  ------------------
  |  |  656|  1.33k|    do { \
  |  |  657|  1.33k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.33k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.33k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.33k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.33k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.33k]
  |  |  ------------------
  ------------------
 1273|  1.33k|    IGRAPH_FINALLY(igraph_inclist_destroy, &parents);
  ------------------
  |  |  603|  1.33k|    do { \
  |  |  604|  1.33k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  1.33k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  1.33k|         * incorrect destructor function with the pointer */ \
  |  |  607|  1.33k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 1.33k]
  |  |  ------------------
  |  |  608|  1.33k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  1.33k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 1.33k]
  |  |  ------------------
  ------------------
 1274|       |
 1275|  1.33k|    IGRAPH_VECTOR_INIT_FINALLY(&dist, no_of_nodes);
  ------------------
  |  |  104|  1.33k|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  1.33k|    do { \
  |  |  |  |  657|  1.33k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.33k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.33k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.33k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.33k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.33k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  1.33k|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  1.33k|    do { \
  |  |  |  |  604|  1.33k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.33k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.33k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.33k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.33k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.33k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.33k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.33k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (105:60): [Folded, False: 1.33k]
  |  |  ------------------
  ------------------
 1276|       |
 1277|  1.33k|    nrgeo = IGRAPH_CALLOC(no_of_nodes, igraph_real_t);
  ------------------
  |  |   33|  1.33k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  2.66k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 1.33k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 1.33k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 1.33k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1278|  1.33k|    IGRAPH_CHECK_OOM(nrgeo, "Insufficient memory for subset edge betweenness calculation.");
  ------------------
  |  |  709|  1.33k|    do { \
  |  |  710|  1.33k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  1.33k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.33k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  1.33k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 1.33k]
  |  |  ------------------
  ------------------
 1279|  1.33k|    IGRAPH_FINALLY(igraph_free, nrgeo);
  ------------------
  |  |  603|  1.33k|    do { \
  |  |  604|  1.33k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  1.33k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  1.33k|         * incorrect destructor function with the pointer */ \
  |  |  607|  1.33k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 1.33k]
  |  |  ------------------
  |  |  608|  1.33k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  1.33k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 1.33k]
  |  |  ------------------
  ------------------
 1280|       |
 1281|  1.33k|    tmpscore = IGRAPH_CALLOC(no_of_nodes, igraph_real_t);
  ------------------
  |  |   33|  1.33k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  2.66k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 1.33k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 1.33k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 1.33k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1282|  1.33k|    IGRAPH_CHECK_OOM(tmpscore, "Insufficient memory for subset edge betweenness calculation.");
  ------------------
  |  |  709|  1.33k|    do { \
  |  |  710|  1.33k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  1.33k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.33k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  1.33k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 1.33k]
  |  |  ------------------
  ------------------
 1283|  1.33k|    IGRAPH_FINALLY(igraph_free, tmpscore);
  ------------------
  |  |  603|  1.33k|    do { \
  |  |  604|  1.33k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  1.33k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  1.33k|         * incorrect destructor function with the pointer */ \
  |  |  607|  1.33k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 1.33k]
  |  |  ------------------
  |  |  608|  1.33k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  1.33k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 1.33k]
  |  |  ------------------
  ------------------
 1284|       |
 1285|  1.33k|    IGRAPH_CHECK(igraph_stack_int_init(&S, no_of_nodes));
  ------------------
  |  |  656|  1.33k|    do { \
  |  |  657|  1.33k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.33k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.33k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.33k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.33k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.33k]
  |  |  ------------------
  ------------------
 1286|  1.33k|    IGRAPH_FINALLY(igraph_stack_int_destroy, &S);
  ------------------
  |  |  603|  1.33k|    do { \
  |  |  604|  1.33k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  1.33k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  1.33k|         * incorrect destructor function with the pointer */ \
  |  |  607|  1.33k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 1.33k]
  |  |  ------------------
  |  |  608|  1.33k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  1.33k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 1.33k]
  |  |  ------------------
  ------------------
 1287|       |
 1288|  1.33k|    if (!igraph_es_is_all(&eids)) {
  ------------------
  |  Branch (1288:9): [True: 0, False: 1.33k]
  ------------------
 1289|       |        /* result needed only for a subset of the vertices */
 1290|      0|        IGRAPH_VECTOR_INIT_FINALLY(tmpres, no_of_edges);
  ------------------
  |  |  104|      0|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|      0|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|      0|    do { \
  |  |  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (105:60): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1291|  1.33k|    } else {
 1292|       |        /* result covers all vertices */
 1293|  1.33k|        IGRAPH_CHECK(igraph_vector_resize(res, no_of_edges));
  ------------------
  |  |  656|  1.33k|    do { \
  |  |  657|  1.33k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.33k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.33k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.33k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.33k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.33k]
  |  |  ------------------
  ------------------
 1294|  1.33k|        igraph_vector_null(res);
 1295|  1.33k|        tmpres = res;
 1296|  1.33k|    }
 1297|       |
 1298|  1.33k|    IGRAPH_CHECK(igraph_vit_create(graph, sources, &vit));
  ------------------
  |  |  656|  1.33k|    do { \
  |  |  657|  1.33k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.33k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.33k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.33k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.33k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.33k]
  |  |  ------------------
  ------------------
 1299|  1.33k|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  603|  1.33k|    do { \
  |  |  604|  1.33k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  1.33k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  1.33k|         * incorrect destructor function with the pointer */ \
  |  |  607|  1.33k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 1.33k]
  |  |  ------------------
  |  |  608|  1.33k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  1.33k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 1.33k]
  |  |  ------------------
  ------------------
 1300|       |
 1301|  1.33k|    for (
 1302|  1.33k|        no_of_processed_sources = 0, IGRAPH_VIT_RESET(vit);
  ------------------
  |  |  201|  1.33k|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
 1303|  14.6k|        !IGRAPH_VIT_END(vit);
  ------------------
  |  |  179|  14.6k|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (1303:9): [True: 13.3k, False: 1.33k]
  ------------------
 1304|  13.3k|        IGRAPH_VIT_NEXT(vit), no_of_processed_sources++
  ------------------
  |  |  167|  13.3k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
 1305|  13.3k|    ) {
 1306|  13.3k|        source = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  214|  13.3k|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 13.3k, False: 0]
  |  |  ------------------
  |  |  215|  13.3k|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1307|       |
 1308|  13.3k|        IGRAPH_PROGRESS(
  ------------------
  |  |  169|  13.3k|    do { \
  |  |  170|  13.3k|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  656|  13.3k|    do { \
  |  |  |  |  657|  13.3k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  13.3k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  13.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 13.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  13.3k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 13.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  171|  13.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (171:14): [Folded, False: 13.3k]
  |  |  ------------------
  ------------------
 1309|  13.3k|            "Edge betweenness centrality (subset): ",
 1310|  13.3k|            100.0 * no_of_processed_sources / no_of_sources, 0
 1311|  13.3k|        );
 1312|  13.3k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|  13.3k|    do { \
  |  |   47|  13.3k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 13.3k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|  13.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 13.3k]
  |  |  ------------------
  ------------------
 1313|       |
 1314|       |        /* Loop invariant that is valid at this point:
 1315|       |         *
 1316|       |         * - the stack S is empty
 1317|       |         * - the 'dist' vector contains zeros only
 1318|       |         * - the 'nrgeo' array contains zeros only
 1319|       |         * - the 'tmpscore' array contains zeros only
 1320|       |         * - the 'parents' incidence list contains empty vectors only
 1321|       |         */
 1322|       |
 1323|       |        /* TODO: there is more room for optimization here; the single-source
 1324|       |         * shortest path search runs until it reaches all the nodes in the
 1325|       |         * component of the source node even if we are only interested in a
 1326|       |         * smaller target subset. We could stop the search when all target
 1327|       |         * nodes were reached.
 1328|       |         */
 1329|       |
 1330|       |        /* Conduct a single-source shortest path search from the source node */
 1331|  13.3k|        if (weights) {
  ------------------
  |  Branch (1331:13): [True: 0, False: 13.3k]
  ------------------
 1332|      0|            IGRAPH_CHECK(sspf_weighted_edge(graph, source, &dist, nrgeo, weights, &S, &parents, &inclist, -1));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1333|  13.3k|        } else {
 1334|  13.3k|            IGRAPH_CHECK(sspf_edge(graph, source, &dist, nrgeo, &S, &parents, &inclist, -1));
  ------------------
  |  |  656|  13.3k|    do { \
  |  |  657|  13.3k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  13.3k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  13.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 13.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  13.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 13.3k]
  |  |  ------------------
  ------------------
 1335|  13.3k|        }
 1336|       |
 1337|       |        /* Aggregate betweenness scores for the nodes we have reached in this
 1338|       |         * traversal */
 1339|  83.0k|        while (!igraph_stack_int_empty(&S)) {
  ------------------
  |  Branch (1339:16): [True: 69.7k, False: 13.3k]
  ------------------
 1340|  69.7k|            igraph_int_t actnode = igraph_stack_int_pop(&S);
 1341|  69.7k|            igraph_vector_int_t *parentv = igraph_inclist_get(&parents, actnode);
  ------------------
  |  |  102|  69.7k|#define igraph_inclist_get(il,no) (&(il)->incs[(igraph_int_t)(no)])
  ------------------
 1342|  69.7k|            igraph_int_t parentv_len = igraph_vector_int_size(parentv);
 1343|  69.7k|            igraph_real_t coeff;
 1344|       |
 1345|  69.7k|            if (is_target[actnode]) {
  ------------------
  |  Branch (1345:17): [True: 27.8k, False: 41.8k]
  ------------------
 1346|  27.8k|                coeff = (1 + tmpscore[actnode]) / nrgeo[actnode];
 1347|  41.8k|            } else {
 1348|  41.8k|                coeff = tmpscore[actnode] / nrgeo[actnode];
 1349|  41.8k|            }
 1350|       |
 1351|   144k|            for (j = 0; j < parentv_len; j++) {
  ------------------
  |  Branch (1351:25): [True: 74.8k, False: 69.7k]
  ------------------
 1352|  74.8k|                igraph_int_t parent_edge = VECTOR(*parentv)[j];
  ------------------
  |  |   60|  74.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1353|  74.8k|                igraph_int_t neighbor = IGRAPH_OTHER(graph, parent_edge, actnode);
  ------------------
  |  |  146|  74.8k|    ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|  74.8k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  74.8k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  115|  74.8k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  74.8k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|      0|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (146:21): [True: 74.8k, False: 0]
  |  |  ------------------
  ------------------
 1354|  74.8k|                tmpscore[neighbor] += nrgeo[neighbor] * coeff;
 1355|  74.8k|                VECTOR(*tmpres)[parent_edge] += nrgeo[neighbor] * coeff;
  ------------------
  |  |   60|  74.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1356|  74.8k|            }
 1357|       |
 1358|       |            /* Reset variables to ensure that the 'for' loop invariant will
 1359|       |             * still be valid in the next iteration */
 1360|       |
 1361|  69.7k|            VECTOR(dist)[actnode] = 0;
  ------------------
  |  |   60|  69.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1362|  69.7k|            nrgeo[actnode] = 0;
 1363|  69.7k|            tmpscore[actnode] = 0;
 1364|  69.7k|            igraph_vector_int_clear(parentv);
 1365|  69.7k|        }
 1366|  13.3k|    }
 1367|       |
 1368|  1.33k|    igraph_vit_destroy(&vit);
 1369|  1.33k|    IGRAPH_FINALLY_CLEAN(1);
 1370|       |
 1371|       |    /* Keep only the requested edges */
 1372|  1.33k|    if (!igraph_es_is_all(&eids)) {
  ------------------
  |  Branch (1372:9): [True: 0, False: 1.33k]
  ------------------
 1373|      0|        IGRAPH_CHECK(igraph_eit_create(graph, eids, &eit));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1374|      0|        IGRAPH_FINALLY(igraph_eit_destroy, &eit);
  ------------------
  |  |  603|      0|    do { \
  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  ------------------
  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1375|       |
 1376|      0|        IGRAPH_CHECK(igraph_vector_resize(res, IGRAPH_EIT_SIZE(eit)));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1377|       |
 1378|      0|        for (j = 0, IGRAPH_EIT_RESET(eit); !IGRAPH_EIT_END(eit);
  ------------------
  |  |  393|      0|#define IGRAPH_EIT_RESET(eit) ((eit).pos = (eit).start)
  ------------------
                      for (j = 0, IGRAPH_EIT_RESET(eit); !IGRAPH_EIT_END(eit);
  ------------------
  |  |  371|      0|#define IGRAPH_EIT_END(eit)   ((eit).pos >= (eit).end)
  ------------------
  |  Branch (1378:44): [True: 0, False: 0]
  ------------------
 1379|      0|             IGRAPH_EIT_NEXT(eit), j++) {
  ------------------
  |  |  359|      0|#define IGRAPH_EIT_NEXT(eit) (++((eit).pos))
  ------------------
 1380|      0|            igraph_int_t edge = IGRAPH_EIT_GET(eit);
  ------------------
  |  |  405|      0|    (igraph_int_t)((((eit).type == IGRAPH_EIT_RANGE) ? (eit).pos : \
  |  |  ------------------
  |  |  |  Branch (405:21): [True: 0, False: 0]
  |  |  ------------------
  |  |  406|      0|                        VECTOR(*(eit).vec)[(eit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1381|      0|            VECTOR(*res)[j] = VECTOR(*tmpres)[edge];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*res)[j] = VECTOR(*tmpres)[edge];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1382|      0|        }
 1383|       |
 1384|      0|        igraph_eit_destroy(&eit);
 1385|      0|        igraph_vector_destroy(tmpres);
 1386|      0|        IGRAPH_FINALLY_CLEAN(2);
 1387|      0|    }
 1388|       |
 1389|       |
 1390|  1.33k|    if (!directed || !igraph_is_directed(graph)) {
  ------------------
  |  Branch (1390:9): [True: 0, False: 1.33k]
  |  Branch (1390:22): [True: 0, False: 1.33k]
  ------------------
 1391|      0|        igraph_vector_scale(res, 0.5);
 1392|      0|    }
 1393|       |
 1394|  1.33k|    igraph_stack_int_destroy(&S);
 1395|  1.33k|    IGRAPH_FREE(tmpscore);
  ------------------
  |  |   36|  1.33k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1396|  1.33k|    IGRAPH_FREE(nrgeo);
  ------------------
  |  |   36|  1.33k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1397|  1.33k|    igraph_vector_destroy(&dist);
 1398|  1.33k|    igraph_inclist_destroy(&parents);
 1399|  1.33k|    igraph_inclist_destroy(&inclist);
 1400|  1.33k|    IGRAPH_FREE(is_target);
  ------------------
  |  |   36|  1.33k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
 1401|  1.33k|    IGRAPH_FINALLY_CLEAN(7);
 1402|       |
 1403|  1.33k|    return IGRAPH_SUCCESS;
 1404|  1.33k|}
betweenness.c:betweenness_check_weights:
  427|  14.3k|) {
  428|  14.3k|    igraph_real_t minweight;
  429|       |
  430|  14.3k|    if (weights) {
  ------------------
  |  Branch (430:9): [True: 0, False: 14.3k]
  ------------------
  431|      0|        if (igraph_vector_size(weights) != no_of_edges) {
  ------------------
  |  Branch (431:13): [True: 0, False: 0]
  ------------------
  432|      0|            IGRAPH_ERROR("Edge weight vector length must match the number of edges.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  433|      0|        }
  434|      0|        if (no_of_edges > 0) {
  ------------------
  |  Branch (434:13): [True: 0, False: 0]
  ------------------
  435|      0|            minweight = igraph_vector_min(weights);
  436|      0|            if (minweight <= 0) {
  ------------------
  |  Branch (436:17): [True: 0, False: 0]
  ------------------
  437|      0|                IGRAPH_ERROR("Edge weights must be positive for betweenness.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  438|      0|            } else if (isnan(minweight)) {
  ------------------
  |  Branch (438:24): [True: 0, False: 0]
  ------------------
  439|      0|                IGRAPH_ERROR("Edge weights must not contain NaN values.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  440|      0|            } else if (minweight <= IGRAPH_SHORTEST_PATH_EPSILON) {
  ------------------
  |  |   35|      0|#define IGRAPH_SHORTEST_PATH_EPSILON 1e-10
  ------------------
  |  Branch (440:24): [True: 0, False: 0]
  ------------------
  441|      0|                IGRAPH_WARNINGF(
  ------------------
  |  |  777|      0|    do { \
  |  |  778|      0|        igraph_warningf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  779|      0|                        __VA_ARGS__); \
  |  |  780|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (780:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  442|      0|                    "Some weights are smaller than the path length comparison tolerance (%g), "
  443|      0|                    "betweenness calculations may suffer from numerical precision issues.",
  444|      0|                    IGRAPH_SHORTEST_PATH_EPSILON
  445|      0|                );
  446|      0|            }
  447|      0|        }
  448|      0|    }
  449|       |
  450|  14.3k|    return IGRAPH_SUCCESS;
  451|  14.3k|}
betweenness.c:sspf:
   69|   257k|        igraph_real_t cutoff) {
   70|       |
   71|   257k|    igraph_dqueue_int_t queue;
   72|   257k|    const igraph_vector_int_t *neis;
   73|   257k|    igraph_vector_int_t *v;
   74|   257k|    igraph_int_t nlen;
   75|       |
   76|   257k|    IGRAPH_DQUEUE_INT_INIT_FINALLY(&queue, 100);
  ------------------
  |  |   61|   257k|    do { IGRAPH_CHECK(igraph_dqueue_int_init(q, capacity)); \
  |  |  ------------------
  |  |  |  |  656|   257k|    do { \
  |  |  |  |  657|   257k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|   257k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|   257k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 257k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|   257k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 257k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|   257k|        IGRAPH_FINALLY(igraph_dqueue_int_destroy, q); } while (0)
  |  |  ------------------
  |  |  |  |  603|   257k|    do { \
  |  |  |  |  604|   257k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|   257k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|   257k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|   257k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 257k]
  |  |  |  |  ------------------
  |  |  |  |  608|   257k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|   257k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 257k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (62:64): [Folded, False: 257k]
  |  |  ------------------
  ------------------
   77|       |
   78|   257k|    IGRAPH_CHECK(igraph_dqueue_int_push(&queue, source));
  ------------------
  |  |  656|   257k|    do { \
  |  |  657|   257k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   257k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   257k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 257k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   257k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 257k]
  |  |  ------------------
  ------------------
   79|   257k|    VECTOR(*dist)[source] = 1.0;
  ------------------
  |  |   60|   257k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   80|   257k|    nrgeo[source] = 1;
   81|       |
   82|  1.89M|    while (!igraph_dqueue_int_empty(&queue)) {
  ------------------
  |  Branch (82:12): [True: 1.63M, False: 257k]
  ------------------
   83|  1.63M|        igraph_int_t actnode = igraph_dqueue_int_pop(&queue);
   84|       |
   85|       |        /* Ignore vertices that are more distant than the cutoff */
   86|  1.63M|        if (cutoff >= 0 && VECTOR(*dist)[actnode] > cutoff + 1) {
  ------------------
  |  |   60|   789k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (86:13): [True: 789k, False: 845k]
  |  Branch (86:28): [True: 14.8k, False: 775k]
  ------------------
   87|       |            /* Reset variables if node is too distant */
   88|  14.8k|            VECTOR(*dist)[actnode] = 0;
  ------------------
  |  |   60|  14.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   89|  14.8k|            nrgeo[actnode] = 0;
   90|  14.8k|            igraph_vector_int_clear(igraph_adjlist_get(parents, actnode));
  ------------------
  |  |   73|  14.8k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
   91|  14.8k|            continue;
   92|  14.8k|        }
   93|       |
   94|       |        /* Record that we have visited this node */
   95|  1.62M|        IGRAPH_CHECK(igraph_stack_int_push(stack, actnode));
  ------------------
  |  |  656|  1.62M|    do { \
  |  |  657|  1.62M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.62M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.62M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.62M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.62M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.62M]
  |  |  ------------------
  ------------------
   96|       |
   97|       |        /* Examine the neighbors of this node */
   98|  1.62M|        neis = igraph_adjlist_get(adjlist, actnode);
  ------------------
  |  |   73|  1.62M|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
   99|  1.62M|        nlen = igraph_vector_int_size(neis);
  100|  6.55M|        for (igraph_int_t j = 0; j < nlen; j++) {
  ------------------
  |  Branch (100:34): [True: 4.93M, False: 1.62M]
  ------------------
  101|  4.93M|            igraph_int_t neighbor = VECTOR(*neis)[j];
  ------------------
  |  |   60|  4.93M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  102|       |
  103|  4.93M|            if (VECTOR(*dist)[neighbor] == 0) {
  ------------------
  |  |   60|  4.93M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (103:17): [True: 1.37M, False: 3.55M]
  ------------------
  104|       |                /* We have found 'neighbor' for the first time */
  105|  1.37M|                VECTOR(*dist)[neighbor] = VECTOR(*dist)[actnode] + 1;
  ------------------
  |  |   60|  1.37M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*dist)[neighbor] = VECTOR(*dist)[actnode] + 1;
  ------------------
  |  |   60|  1.37M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  106|  1.37M|                IGRAPH_CHECK(igraph_dqueue_int_push(&queue, neighbor));
  ------------------
  |  |  656|  1.37M|    do { \
  |  |  657|  1.37M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.37M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.37M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.37M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.37M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.37M]
  |  |  ------------------
  ------------------
  107|  1.37M|            }
  108|       |
  109|  4.93M|            if (VECTOR(*dist)[neighbor] == VECTOR(*dist)[actnode] + 1 &&
  ------------------
  |  |   60|  4.93M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          if (VECTOR(*dist)[neighbor] == VECTOR(*dist)[actnode] + 1 &&
  ------------------
  |  |   60|  4.93M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (109:17): [True: 1.95M, False: 2.97M]
  ------------------
  110|  1.95M|                (VECTOR(*dist)[neighbor] <= cutoff + 1 || cutoff < 0)) {
  ------------------
  |  |   60|  1.95M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (110:18): [True: 930k, False: 1.02M]
  |  Branch (110:59): [True: 1.00M, False: 17.8k]
  ------------------
  111|       |                /* Only add if the node is not more distant than the cutoff */
  112|  1.94M|                v = igraph_adjlist_get(parents, neighbor);
  ------------------
  |  |   73|  1.94M|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  113|  1.94M|                IGRAPH_CHECK(igraph_vector_int_push_back(v, actnode));
  ------------------
  |  |  656|  1.94M|    do { \
  |  |  657|  1.94M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.94M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.94M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.94M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.94M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.94M]
  |  |  ------------------
  ------------------
  114|  1.94M|                nrgeo[neighbor] += nrgeo[actnode];
  115|  1.94M|            }
  116|  4.93M|        }
  117|  1.62M|    }
  118|       |
  119|   257k|    igraph_dqueue_int_destroy(&queue);
  120|   257k|    IGRAPH_FINALLY_CLEAN(1);
  121|       |
  122|   257k|    return IGRAPH_SUCCESS;
  123|   257k|}
betweenness.c:sspf_edge:
  150|   264k|        igraph_real_t cutoff) {
  151|       |
  152|   264k|    igraph_dqueue_int_t queue;
  153|   264k|    const igraph_vector_int_t *neis;
  154|   264k|    igraph_vector_int_t *v;
  155|   264k|    igraph_int_t nlen;
  156|       |
  157|   264k|    IGRAPH_DQUEUE_INT_INIT_FINALLY(&queue, 100);
  ------------------
  |  |   61|   264k|    do { IGRAPH_CHECK(igraph_dqueue_int_init(q, capacity)); \
  |  |  ------------------
  |  |  |  |  656|   264k|    do { \
  |  |  |  |  657|   264k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|   264k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|   264k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 264k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|   264k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 264k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|   264k|        IGRAPH_FINALLY(igraph_dqueue_int_destroy, q); } while (0)
  |  |  ------------------
  |  |  |  |  603|   264k|    do { \
  |  |  |  |  604|   264k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|   264k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|   264k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|   264k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 264k]
  |  |  |  |  ------------------
  |  |  |  |  608|   264k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|   264k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 264k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (62:64): [Folded, False: 264k]
  |  |  ------------------
  ------------------
  158|       |
  159|   264k|    IGRAPH_CHECK(igraph_dqueue_int_push(&queue, source));
  ------------------
  |  |  656|   264k|    do { \
  |  |  657|   264k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   264k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   264k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 264k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   264k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 264k]
  |  |  ------------------
  ------------------
  160|   264k|    VECTOR(*dist)[source] = 1.0;
  ------------------
  |  |   60|   264k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  161|   264k|    nrgeo[source] = 1;
  162|       |
  163|  1.91M|    while (!igraph_dqueue_int_empty(&queue)) {
  ------------------
  |  Branch (163:12): [True: 1.65M, False: 264k]
  ------------------
  164|  1.65M|        igraph_int_t actnode = igraph_dqueue_int_pop(&queue);
  165|       |
  166|       |        /* Ignore vertices that are more distant than the cutoff */
  167|  1.65M|        if (cutoff >= 0 && VECTOR(*dist)[actnode] > cutoff + 1) {
  ------------------
  |  |   60|   775k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (167:13): [True: 775k, False: 875k]
  |  Branch (167:28): [True: 44.3k, False: 730k]
  ------------------
  168|       |            /* Reset variables if node is too distant */
  169|  44.3k|            VECTOR(*dist)[actnode] = 0;
  ------------------
  |  |   60|  44.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  170|  44.3k|            nrgeo[actnode] = 0;
  171|  44.3k|            igraph_vector_int_clear(igraph_inclist_get(parents, actnode));
  ------------------
  |  |  102|  44.3k|#define igraph_inclist_get(il,no) (&(il)->incs[(igraph_int_t)(no)])
  ------------------
  172|  44.3k|            continue;
  173|  44.3k|        }
  174|       |
  175|       |        /* Record that we have visited this node */
  176|  1.60M|        IGRAPH_CHECK(igraph_stack_int_push(stack, actnode));
  ------------------
  |  |  656|  1.60M|    do { \
  |  |  657|  1.60M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.60M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.60M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.60M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.60M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.60M]
  |  |  ------------------
  ------------------
  177|       |
  178|       |        /* Examine the neighbors of this node */
  179|  1.60M|        neis = igraph_inclist_get(inclist, actnode);
  ------------------
  |  |  102|  1.60M|#define igraph_inclist_get(il,no) (&(il)->incs[(igraph_int_t)(no)])
  ------------------
  180|  1.60M|        nlen = igraph_vector_int_size(neis);
  181|  6.50M|        for (igraph_int_t j = 0; j < nlen; j++) {
  ------------------
  |  Branch (181:34): [True: 4.90M, False: 1.60M]
  ------------------
  182|  4.90M|            igraph_int_t edge = VECTOR(*neis)[j];
  ------------------
  |  |   60|  4.90M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  183|  4.90M|            igraph_int_t neighbor = IGRAPH_OTHER(graph, edge, actnode);
  ------------------
  |  |  146|  4.90M|    ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|  4.90M|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  4.90M|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  115|  1.81M|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  1.81M|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|  3.09M|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  3.09M|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (146:21): [True: 1.81M, False: 3.09M]
  |  |  ------------------
  ------------------
  184|       |
  185|  4.90M|            if (VECTOR(*dist)[neighbor] == 0) {
  ------------------
  |  |   60|  4.90M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (185:17): [True: 1.38M, False: 3.51M]
  ------------------
  186|       |                /* We have found 'neighbor' for the first time */
  187|  1.38M|                VECTOR(*dist)[neighbor] = VECTOR(*dist)[actnode] + 1;
  ------------------
  |  |   60|  1.38M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*dist)[neighbor] = VECTOR(*dist)[actnode] + 1;
  ------------------
  |  |   60|  1.38M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  188|  1.38M|                IGRAPH_CHECK(igraph_dqueue_int_push(&queue, neighbor));
  ------------------
  |  |  656|  1.38M|    do { \
  |  |  657|  1.38M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.38M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.38M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.38M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.38M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.38M]
  |  |  ------------------
  ------------------
  189|  1.38M|            }
  190|       |
  191|  4.90M|            if (VECTOR(*dist)[neighbor] == VECTOR(*dist)[actnode] + 1 &&
  ------------------
  |  |   60|  4.90M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          if (VECTOR(*dist)[neighbor] == VECTOR(*dist)[actnode] + 1 &&
  ------------------
  |  |   60|  4.90M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (191:17): [True: 1.97M, False: 2.93M]
  ------------------
  192|  1.97M|                (VECTOR(*dist)[neighbor] <= cutoff + 1 || cutoff < 0)) {
  ------------------
  |  |   60|  1.97M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (192:18): [True: 868k, False: 1.10M]
  |  Branch (192:59): [True: 1.04M, False: 62.1k]
  ------------------
  193|       |                /* Only add if the node is not more distant than the cutoff */
  194|  1.90M|                v = igraph_inclist_get(parents, neighbor);
  ------------------
  |  |  102|  1.90M|#define igraph_inclist_get(il,no) (&(il)->incs[(igraph_int_t)(no)])
  ------------------
  195|  1.90M|                IGRAPH_CHECK(igraph_vector_int_push_back(v, edge));
  ------------------
  |  |  656|  1.90M|    do { \
  |  |  657|  1.90M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.90M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.90M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.90M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.90M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.90M]
  |  |  ------------------
  ------------------
  196|  1.90M|                nrgeo[neighbor] += nrgeo[actnode];
  197|  1.90M|            }
  198|  4.90M|        }
  199|  1.60M|    }
  200|       |
  201|   264k|    igraph_dqueue_int_destroy(&queue);
  202|   264k|    IGRAPH_FINALLY_CLEAN(1);
  203|       |
  204|   264k|    return IGRAPH_SUCCESS;
  205|   264k|}

igraph_closeness_cutoff:
  329|  2.92k|                            igraph_real_t cutoff) {
  330|       |
  331|  2.92k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  332|  2.92k|    igraph_vector_int_t already_counted;
  333|  2.92k|    igraph_vector_int_t *neis;
  334|  2.92k|    igraph_int_t i, j;
  335|  2.92k|    igraph_int_t nodes_reached;
  336|  2.92k|    igraph_adjlist_t allneis;
  337|       |
  338|  2.92k|    igraph_int_t actdist = 0;
  339|       |
  340|  2.92k|    igraph_dqueue_int_t q;
  341|       |
  342|  2.92k|    igraph_int_t nodes_to_calc;
  343|  2.92k|    igraph_vit_t vit;
  344|       |
  345|  2.92k|    if (weights) {
  ------------------
  |  Branch (345:9): [True: 0, False: 2.92k]
  ------------------
  346|      0|        return igraph_i_closeness_cutoff_weighted(graph, res, reachable_count, all_reachable, vids, mode, cutoff,
  347|      0|                weights, normalized);
  348|      0|    }
  349|       |
  350|  2.92k|    IGRAPH_CHECK(igraph_vit_create(graph, vids, &vit));
  ------------------
  |  |  656|  2.92k|    do { \
  |  |  657|  2.92k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.92k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.92k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.92k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.92k]
  |  |  ------------------
  ------------------
  351|  2.92k|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  603|  2.92k|    do { \
  |  |  604|  2.92k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.92k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.92k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.92k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.92k]
  |  |  ------------------
  |  |  608|  2.92k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.92k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.92k]
  |  |  ------------------
  ------------------
  352|       |
  353|  2.92k|    nodes_to_calc = IGRAPH_VIT_SIZE(vit);
  ------------------
  |  |  190|  2.92k|#define IGRAPH_VIT_SIZE(vit)  ((vit).end - (vit).start)
  ------------------
  354|       |
  355|  2.92k|    if (reachable_count) {
  ------------------
  |  Branch (355:9): [True: 2.92k, False: 0]
  ------------------
  356|  2.92k|        IGRAPH_CHECK(igraph_vector_int_resize(reachable_count, nodes_to_calc));
  ------------------
  |  |  656|  2.92k|    do { \
  |  |  657|  2.92k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.92k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.92k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.92k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.92k]
  |  |  ------------------
  ------------------
  357|  2.92k|    }
  358|       |
  359|  2.92k|    if (all_reachable) {
  ------------------
  |  Branch (359:9): [True: 2.92k, False: 0]
  ------------------
  360|  2.92k|        *all_reachable = true; /* be optimistic */
  361|  2.92k|    }
  362|       |
  363|  2.92k|    if (mode != IGRAPH_OUT && mode != IGRAPH_IN && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (363:9): [True: 1.46k, False: 1.46k]
  |  Branch (363:31): [True: 1.46k, False: 0]
  |  Branch (363:52): [True: 0, False: 1.46k]
  ------------------
  364|      0|        IGRAPH_ERROR("Invalid mode for closeness.", IGRAPH_EINVMODE);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  365|      0|    }
  366|       |
  367|  2.92k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&already_counted, no_of_nodes);
  ------------------
  |  |  119|  2.92k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.92k|    do { \
  |  |  |  |  657|  2.92k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.92k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.92k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.92k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.92k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.92k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.92k|    do { \
  |  |  |  |  604|  2.92k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.92k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.92k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.92k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.92k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.92k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.92k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.92k]
  |  |  ------------------
  ------------------
  368|  2.92k|    IGRAPH_DQUEUE_INT_INIT_FINALLY(&q, 100);
  ------------------
  |  |   61|  2.92k|    do { IGRAPH_CHECK(igraph_dqueue_int_init(q, capacity)); \
  |  |  ------------------
  |  |  |  |  656|  2.92k|    do { \
  |  |  |  |  657|  2.92k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.92k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.92k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.92k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.92k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|  2.92k|        IGRAPH_FINALLY(igraph_dqueue_int_destroy, q); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.92k|    do { \
  |  |  |  |  604|  2.92k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.92k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.92k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.92k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.92k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.92k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.92k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (62:64): [Folded, False: 2.92k]
  |  |  ------------------
  ------------------
  369|       |
  370|  2.92k|    IGRAPH_CHECK(igraph_adjlist_init(graph, &allneis, mode, IGRAPH_LOOPS, IGRAPH_MULTIPLE));
  ------------------
  |  |  656|  2.92k|    do { \
  |  |  657|  2.92k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.92k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.92k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.92k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.92k]
  |  |  ------------------
  ------------------
  371|  2.92k|    IGRAPH_FINALLY(igraph_adjlist_destroy, &allneis);
  ------------------
  |  |  603|  2.92k|    do { \
  |  |  604|  2.92k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.92k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.92k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.92k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.92k]
  |  |  ------------------
  |  |  608|  2.92k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.92k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.92k]
  |  |  ------------------
  ------------------
  372|       |
  373|  2.92k|    IGRAPH_CHECK(igraph_vector_resize(res, nodes_to_calc));
  ------------------
  |  |  656|  2.92k|    do { \
  |  |  657|  2.92k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.92k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.92k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.92k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.92k]
  |  |  ------------------
  ------------------
  374|  2.92k|    igraph_vector_null(res);
  375|       |
  376|  2.92k|    for (IGRAPH_VIT_RESET(vit), i = 0;
  ------------------
  |  |  201|  2.92k|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
  377|   128k|         !IGRAPH_VIT_END(vit);
  ------------------
  |  |  179|   128k|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (377:10): [True: 125k, False: 2.92k]
  ------------------
  378|   125k|         IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  167|   125k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  379|   125k|        nodes_reached = 0;
  380|       |
  381|   125k|        igraph_dqueue_int_clear(&q);
  382|   125k|        IGRAPH_CHECK(igraph_dqueue_int_push(&q, IGRAPH_VIT_GET(vit)));
  ------------------
  |  |  656|   125k|    do { \
  |  |  657|   251k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  ------------------
  |  |  |  Branch (657:40): [True: 125k, False: 0]
  |  |  ------------------
  |  |  658|   125k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   125k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 125k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   125k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 125k]
  |  |  ------------------
  ------------------
  383|   125k|        IGRAPH_CHECK(igraph_dqueue_int_push(&q, 0));
  ------------------
  |  |  656|   125k|    do { \
  |  |  657|   125k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   125k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   125k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 125k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   125k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 125k]
  |  |  ------------------
  ------------------
  384|   125k|        VECTOR(already_counted)[IGRAPH_VIT_GET(vit)] = i + 1;
  ------------------
  |  |   60|   125k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      VECTOR(already_counted)[IGRAPH_VIT_GET(vit)] = i + 1;
  ------------------
  |  |  214|   125k|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 125k, False: 0]
  |  |  ------------------
  |  |  215|   125k|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  385|       |
  386|   125k|        IGRAPH_PROGRESS("Closeness: ", 100.0 * i / nodes_to_calc, NULL);
  ------------------
  |  |  169|   125k|    do { \
  |  |  170|   125k|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  656|   125k|    do { \
  |  |  |  |  657|   125k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|   125k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|   125k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 125k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|   125k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 125k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  171|   125k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (171:14): [Folded, False: 125k]
  |  |  ------------------
  ------------------
  387|   125k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|   125k|    do { \
  |  |   47|   125k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 125k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|   125k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 125k]
  |  |  ------------------
  ------------------
  388|       |
  389|   900k|        while (!igraph_dqueue_int_empty(&q)) {
  ------------------
  |  Branch (389:16): [True: 775k, False: 125k]
  ------------------
  390|   775k|            igraph_int_t act = igraph_dqueue_int_pop(&q);
  391|   775k|            actdist = igraph_dqueue_int_pop(&q);
  392|       |
  393|   775k|            if (cutoff >= 0 && actdist > cutoff) {
  ------------------
  |  Branch (393:17): [True: 775k, False: 0]
  |  Branch (393:32): [True: 44.3k, False: 730k]
  ------------------
  394|  44.3k|                continue;    /* NOT break!!! */
  395|  44.3k|            }
  396|       |
  397|   730k|            VECTOR(*res)[i] += actdist;
  ------------------
  |  |   60|   730k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  398|   730k|            nodes_reached++;
  399|       |
  400|       |            /* check the neighbors */
  401|   730k|            neis = igraph_adjlist_get(&allneis, act);
  ------------------
  |  |   73|   730k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  402|   730k|            igraph_int_t nei_count = igraph_vector_int_size(neis);
  403|  3.10M|            for (j = 0; j < nei_count; j++) {
  ------------------
  |  Branch (403:25): [True: 2.36M, False: 730k]
  ------------------
  404|  2.36M|                igraph_int_t neighbor = VECTOR(*neis)[j];
  ------------------
  |  |   60|  2.36M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  405|  2.36M|                if (VECTOR(already_counted)[neighbor] == i + 1) {
  ------------------
  |  |   60|  2.36M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (405:21): [True: 1.72M, False: 649k]
  ------------------
  406|  1.72M|                    continue;
  407|  1.72M|                }
  408|   649k|                VECTOR(already_counted)[neighbor] = i + 1;
  ------------------
  |  |   60|   649k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  409|   649k|                IGRAPH_CHECK(igraph_dqueue_int_push(&q, neighbor));
  ------------------
  |  |  656|   649k|    do { \
  |  |  657|   649k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   649k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   649k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 649k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   649k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 649k]
  |  |  ------------------
  ------------------
  410|   649k|                IGRAPH_CHECK(igraph_dqueue_int_push(&q, actdist + 1));
  ------------------
  |  |  656|   649k|    do { \
  |  |  657|   649k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   649k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   649k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 649k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   649k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 649k]
  |  |  ------------------
  ------------------
  411|   649k|            }
  412|   730k|        }
  413|       |
  414|   125k|        if (reachable_count) {
  ------------------
  |  Branch (414:13): [True: 125k, False: 0]
  ------------------
  415|   125k|            VECTOR(*reachable_count)[i] = nodes_reached - 1;
  ------------------
  |  |   60|   125k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  416|   125k|        }
  417|       |
  418|   125k|        if (normalized) {
  ------------------
  |  Branch (418:13): [True: 125k, False: 0]
  ------------------
  419|       |            /* compute the inverse of the average distance, considering only reachable nodes */
  420|   125k|            VECTOR(*res)[i] = VECTOR(*res)[i] == 0 ? IGRAPH_NAN : ((igraph_real_t) (nodes_reached-1)) / VECTOR(*res)[i];
  ------------------
  |  |   60|   125k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*res)[i] = VECTOR(*res)[i] == 0 ? IGRAPH_NAN : ((igraph_real_t) (nodes_reached-1)) / VECTOR(*res)[i];
  ------------------
  |  |   60|   125k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*res)[i] = VECTOR(*res)[i] == 0 ? IGRAPH_NAN : ((igraph_real_t) (nodes_reached-1)) / VECTOR(*res)[i];
  ------------------
  |  |  138|  93.7k|#define IGRAPH_NAN ((double)NAN)
  ------------------
                          VECTOR(*res)[i] = VECTOR(*res)[i] == 0 ? IGRAPH_NAN : ((igraph_real_t) (nodes_reached-1)) / VECTOR(*res)[i];
  ------------------
  |  |   60|  31.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (420:31): [True: 93.7k, False: 31.8k]
  ------------------
  421|   125k|        } else {
  422|       |            /* compute the inverse of the sum of distances */
  423|      0|            VECTOR(*res)[i] = VECTOR(*res)[i] == 0 ? IGRAPH_NAN : 1.0 / VECTOR(*res)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*res)[i] = VECTOR(*res)[i] == 0 ? IGRAPH_NAN : 1.0 / VECTOR(*res)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*res)[i] = VECTOR(*res)[i] == 0 ? IGRAPH_NAN : 1.0 / VECTOR(*res)[i];
  ------------------
  |  |  138|      0|#define IGRAPH_NAN ((double)NAN)
  ------------------
                          VECTOR(*res)[i] = VECTOR(*res)[i] == 0 ? IGRAPH_NAN : 1.0 / VECTOR(*res)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (423:31): [True: 0, False: 0]
  ------------------
  424|      0|        }
  425|       |
  426|   125k|        if (all_reachable) {
  ------------------
  |  Branch (426:13): [True: 125k, False: 0]
  ------------------
  427|   125k|            if (nodes_reached < no_of_nodes) {
  ------------------
  |  Branch (427:17): [True: 124k, False: 628]
  ------------------
  428|   124k|                *all_reachable = false;
  429|   124k|            }
  430|   125k|        }
  431|   125k|    }
  432|       |
  433|  2.92k|    IGRAPH_PROGRESS("Closeness: ", 100.0, NULL);
  ------------------
  |  |  169|  2.92k|    do { \
  |  |  170|  2.92k|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  656|  2.92k|    do { \
  |  |  |  |  657|  2.92k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.92k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.92k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.92k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.92k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  171|  2.92k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (171:14): [Folded, False: 2.92k]
  |  |  ------------------
  ------------------
  434|       |
  435|       |    /* Clean */
  436|  2.92k|    igraph_dqueue_int_destroy(&q);
  437|  2.92k|    igraph_vector_int_destroy(&already_counted);
  438|  2.92k|    igraph_vit_destroy(&vit);
  439|  2.92k|    igraph_adjlist_destroy(&allneis);
  440|  2.92k|    IGRAPH_FINALLY_CLEAN(4);
  441|       |
  442|  2.92k|    return IGRAPH_SUCCESS;
  443|  2.92k|}
igraph_harmonic_centrality_cutoff:
  726|  2.92k|                                      igraph_real_t cutoff) {
  727|  2.92k|    if (weights) {
  ------------------
  |  Branch (727:9): [True: 0, False: 2.92k]
  ------------------
  728|      0|        return igraph_i_harmonic_centrality_weighted(graph, res, vids, mode, weights, normalized, cutoff);
  729|  2.92k|    } else {
  730|  2.92k|        return igraph_i_harmonic_centrality_unweighted(graph, res, vids, mode, normalized, cutoff);
  731|  2.92k|    }
  732|  2.92k|}
closeness.c:igraph_i_harmonic_centrality_unweighted:
  451|  2.92k|                                                   igraph_real_t cutoff) {
  452|       |
  453|  2.92k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  454|  2.92k|    igraph_vector_int_t already_counted;
  455|  2.92k|    igraph_vector_int_t *neis;
  456|  2.92k|    igraph_int_t i, j;
  457|  2.92k|    igraph_adjlist_t allneis;
  458|       |
  459|  2.92k|    igraph_int_t actdist = 0;
  460|       |
  461|  2.92k|    igraph_dqueue_int_t q;
  462|       |
  463|  2.92k|    igraph_int_t nodes_to_calc;
  464|  2.92k|    igraph_vit_t vit;
  465|       |
  466|  2.92k|    IGRAPH_CHECK(igraph_vit_create(graph, vids, &vit));
  ------------------
  |  |  656|  2.92k|    do { \
  |  |  657|  2.92k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.92k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.92k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.92k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.92k]
  |  |  ------------------
  ------------------
  467|  2.92k|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  603|  2.92k|    do { \
  |  |  604|  2.92k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.92k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.92k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.92k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.92k]
  |  |  ------------------
  |  |  608|  2.92k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.92k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.92k]
  |  |  ------------------
  ------------------
  468|       |
  469|  2.92k|    nodes_to_calc = IGRAPH_VIT_SIZE(vit);
  ------------------
  |  |  190|  2.92k|#define IGRAPH_VIT_SIZE(vit)  ((vit).end - (vit).start)
  ------------------
  470|       |
  471|  2.92k|    if (mode != IGRAPH_OUT && mode != IGRAPH_IN &&
  ------------------
  |  Branch (471:9): [True: 2.92k, False: 0]
  |  Branch (471:31): [True: 1.46k, False: 1.46k]
  ------------------
  472|  1.46k|        mode != IGRAPH_ALL) {
  ------------------
  |  Branch (472:9): [True: 0, False: 1.46k]
  ------------------
  473|      0|        IGRAPH_ERROR("Invalid mode for harmonic centrality.", IGRAPH_EINVMODE);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  474|      0|    }
  475|       |
  476|  2.92k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&already_counted, no_of_nodes);
  ------------------
  |  |  119|  2.92k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  2.92k|    do { \
  |  |  |  |  657|  2.92k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.92k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.92k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.92k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.92k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  2.92k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.92k|    do { \
  |  |  |  |  604|  2.92k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.92k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.92k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.92k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.92k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.92k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.92k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 2.92k]
  |  |  ------------------
  ------------------
  477|  2.92k|    IGRAPH_DQUEUE_INT_INIT_FINALLY(&q, 100);
  ------------------
  |  |   61|  2.92k|    do { IGRAPH_CHECK(igraph_dqueue_int_init(q, capacity)); \
  |  |  ------------------
  |  |  |  |  656|  2.92k|    do { \
  |  |  |  |  657|  2.92k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.92k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.92k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.92k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.92k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|  2.92k|        IGRAPH_FINALLY(igraph_dqueue_int_destroy, q); } while (0)
  |  |  ------------------
  |  |  |  |  603|  2.92k|    do { \
  |  |  |  |  604|  2.92k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.92k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.92k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.92k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.92k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.92k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.92k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (62:64): [Folded, False: 2.92k]
  |  |  ------------------
  ------------------
  478|       |
  479|  2.92k|    IGRAPH_CHECK(igraph_adjlist_init(graph, &allneis, mode, IGRAPH_LOOPS, IGRAPH_MULTIPLE));
  ------------------
  |  |  656|  2.92k|    do { \
  |  |  657|  2.92k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.92k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.92k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.92k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.92k]
  |  |  ------------------
  ------------------
  480|  2.92k|    IGRAPH_FINALLY(igraph_adjlist_destroy, &allneis);
  ------------------
  |  |  603|  2.92k|    do { \
  |  |  604|  2.92k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  2.92k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  2.92k|         * incorrect destructor function with the pointer */ \
  |  |  607|  2.92k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 2.92k]
  |  |  ------------------
  |  |  608|  2.92k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  2.92k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 2.92k]
  |  |  ------------------
  ------------------
  481|       |
  482|  2.92k|    IGRAPH_CHECK(igraph_vector_resize(res, nodes_to_calc));
  ------------------
  |  |  656|  2.92k|    do { \
  |  |  657|  2.92k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.92k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.92k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.92k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.92k]
  |  |  ------------------
  ------------------
  483|  2.92k|    igraph_vector_null(res);
  484|       |
  485|  2.92k|    for (IGRAPH_VIT_RESET(vit), i = 0;
  ------------------
  |  |  201|  2.92k|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
  486|   128k|         !IGRAPH_VIT_END(vit);
  ------------------
  |  |  179|   128k|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (486:10): [True: 125k, False: 2.92k]
  ------------------
  487|   125k|         IGRAPH_VIT_NEXT(vit), i++)
  ------------------
  |  |  167|   125k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  488|   125k|    {
  489|   125k|        igraph_int_t source = IGRAPH_VIT_GET(vit);
  ------------------
  |  |  214|   125k|    ((igraph_int_t)(((vit).type == IGRAPH_VIT_RANGE) ? (vit).pos : \
  |  |  ------------------
  |  |  |  Branch (214:21): [True: 125k, False: 0]
  |  |  ------------------
  |  |  215|   125k|                        VECTOR(*(vit).vec)[(vit).pos]))
  |  |  ------------------
  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  490|       |
  491|   125k|        igraph_dqueue_int_clear(&q);
  492|   125k|        IGRAPH_CHECK(igraph_dqueue_int_push(&q, source));
  ------------------
  |  |  656|   125k|    do { \
  |  |  657|   125k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   125k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   125k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 125k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   125k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 125k]
  |  |  ------------------
  ------------------
  493|   125k|        IGRAPH_CHECK(igraph_dqueue_int_push(&q, 0));
  ------------------
  |  |  656|   125k|    do { \
  |  |  657|   125k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   125k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   125k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 125k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   125k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 125k]
  |  |  ------------------
  ------------------
  494|   125k|        VECTOR(already_counted)[source] = i + 1;
  ------------------
  |  |   60|   125k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  495|       |
  496|   125k|        IGRAPH_PROGRESS("Harmonic centrality: ", 100.0 * i / nodes_to_calc, NULL);
  ------------------
  |  |  169|   125k|    do { \
  |  |  170|   125k|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  656|   125k|    do { \
  |  |  |  |  657|   125k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|   125k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|   125k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 125k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|   125k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 125k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  171|   125k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (171:14): [Folded, False: 125k]
  |  |  ------------------
  ------------------
  497|   125k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|   125k|    do { \
  |  |   47|   125k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 125k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|   125k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 125k]
  |  |  ------------------
  ------------------
  498|       |
  499|   900k|        while (!igraph_dqueue_int_empty(&q)) {
  ------------------
  |  Branch (499:16): [True: 775k, False: 125k]
  ------------------
  500|   775k|            igraph_int_t act = igraph_dqueue_int_pop(&q);
  501|   775k|            actdist = igraph_dqueue_int_pop(&q);
  502|       |
  503|   775k|            if (cutoff >= 0 && actdist > cutoff) {
  ------------------
  |  Branch (503:17): [True: 775k, False: 0]
  |  Branch (503:32): [True: 44.3k, False: 730k]
  ------------------
  504|  44.3k|                continue;    /* NOT break!!! */
  505|  44.3k|            }
  506|       |
  507|       |            /* Exclude self-distance, which is zero. */
  508|   730k|            if (source != act) {
  ------------------
  |  Branch (508:17): [True: 605k, False: 125k]
  ------------------
  509|   605k|                VECTOR(*res)[i] += 1.0/actdist;
  ------------------
  |  |   60|   605k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  510|   605k|            }
  511|       |
  512|       |            /* check the neighbors */
  513|   730k|            neis = igraph_adjlist_get(&allneis, act);
  ------------------
  |  |   73|   730k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  514|   730k|            igraph_int_t nei_count = igraph_vector_int_size(neis);
  515|  3.09M|            for (j = 0; j < nei_count; j++) {
  ------------------
  |  Branch (515:25): [True: 2.36M, False: 730k]
  ------------------
  516|  2.36M|                igraph_int_t neighbor = VECTOR(*neis)[j];
  ------------------
  |  |   60|  2.36M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  517|  2.36M|                if (VECTOR(already_counted)[neighbor] == i + 1) {
  ------------------
  |  |   60|  2.36M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (517:21): [True: 1.71M, False: 649k]
  ------------------
  518|  1.71M|                    continue;
  519|  1.71M|                }
  520|   649k|                VECTOR(already_counted)[neighbor] = i + 1;
  ------------------
  |  |   60|   649k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  521|   649k|                IGRAPH_CHECK(igraph_dqueue_int_push(&q, neighbor));
  ------------------
  |  |  656|   649k|    do { \
  |  |  657|   649k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   649k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   649k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 649k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   649k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 649k]
  |  |  ------------------
  ------------------
  522|   649k|                IGRAPH_CHECK(igraph_dqueue_int_push(&q, actdist + 1));
  ------------------
  |  |  656|   649k|    do { \
  |  |  657|   649k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   649k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   649k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 649k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   649k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 649k]
  |  |  ------------------
  ------------------
  523|   649k|            }
  524|   730k|        }
  525|   125k|    }
  526|       |
  527|  2.92k|    if (normalized && no_of_nodes > 1 /* not a null graph or singleton graph */) {
  ------------------
  |  Branch (527:9): [True: 2.92k, False: 0]
  |  Branch (527:23): [True: 2.91k, False: 18]
  ------------------
  528|  2.91k|        igraph_vector_scale(res, 1.0 / (no_of_nodes - 1));
  529|  2.91k|    }
  530|       |
  531|  2.92k|    IGRAPH_PROGRESS("Harmonic centrality: ", 100.0, NULL);
  ------------------
  |  |  169|  2.92k|    do { \
  |  |  170|  2.92k|        IGRAPH_CHECK(igraph_progress((message), (percent), (data))); \
  |  |  ------------------
  |  |  |  |  656|  2.92k|    do { \
  |  |  |  |  657|  2.92k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.92k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.92k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.92k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.92k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  171|  2.92k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (171:14): [Folded, False: 2.92k]
  |  |  ------------------
  ------------------
  532|       |
  533|       |    /* Clean */
  534|  2.92k|    igraph_dqueue_int_destroy(&q);
  535|  2.92k|    igraph_vector_int_destroy(&already_counted);
  536|  2.92k|    igraph_vit_destroy(&vit);
  537|  2.92k|    igraph_adjlist_destroy(&allneis);
  538|  2.92k|    IGRAPH_FINALLY_CLEAN(4);
  539|       |
  540|  2.92k|    return IGRAPH_SUCCESS;
  541|  2.92k|}

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

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

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

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

_ZN6prpack19prpack_igraph_graphC2Ev:
   16|  1.46k|        prpack_igraph_graph() { }

_ZN6prpack28prpack_preprocessed_ge_graph10initializeEv:
    6|  1.46k|void prpack_preprocessed_ge_graph::initialize() {
    7|  1.46k|    matrix = NULL;
    8|       |    d = NULL;
    9|  1.46k|}
_ZN6prpack28prpack_preprocessed_ge_graph21initialize_unweightedEPKNS_17prpack_base_graphE:
   25|  1.46k|void prpack_preprocessed_ge_graph::initialize_unweighted(const prpack_base_graph* bg) {
   26|       |    // fill in the matrix
   27|  64.2k|    for (int i = 0, inum_vs = 0; i < num_vs; ++i, inum_vs += num_vs) {
  ------------------
  |  Branch (27:34): [True: 62.7k, False: 1.46k]
  ------------------
   28|  62.7k|        const int start_j = bg->tails[i];
   29|  62.7k|        const int end_j = (i + 1 != num_vs) ? bg->tails[i + 1] : bg->num_es;
  ------------------
  |  Branch (29:27): [True: 61.3k, False: 1.46k]
  ------------------
   30|   105k|        for (int j = start_j; j < end_j; ++j)
  ------------------
  |  Branch (30:31): [True: 42.6k, False: 62.7k]
  ------------------
   31|  42.6k|            ++matrix[inum_vs + bg->heads[j]];
   32|  62.7k|    }
   33|       |    // normalize the columns
   34|  64.2k|    for (int j = 0; j < num_vs; ++j) {
  ------------------
  |  Branch (34:21): [True: 62.7k, False: 1.46k]
  ------------------
   35|  62.7k|        double sum = 0;
   36|  3.40M|        for (int inum_vs = 0; inum_vs < num_vs*num_vs; inum_vs += num_vs)
  ------------------
  |  Branch (36:31): [True: 3.34M, False: 62.7k]
  ------------------
   37|  3.34M|            sum += matrix[inum_vs + j];
   38|  62.7k|        if (sum > 0) {
  ------------------
  |  Branch (38:13): [True: 13.8k, False: 48.9k]
  ------------------
   39|  13.8k|            d[j] = 0;
   40|  13.8k|            const double coeff = 1/sum;
   41|   776k|            for (int inum_vs = 0; inum_vs < num_vs*num_vs; inum_vs += num_vs)
  ------------------
  |  Branch (41:35): [True: 762k, False: 13.8k]
  ------------------
   42|   762k|                matrix[inum_vs + j] *= coeff;
   43|  48.9k|        } else {
   44|  48.9k|            d[j] = 1;
   45|  48.9k|        }
   46|  62.7k|    }
   47|  1.46k|}
_ZN6prpack28prpack_preprocessed_ge_graphC2EPKNS_17prpack_base_graphE:
   49|  1.46k|prpack_preprocessed_ge_graph::prpack_preprocessed_ge_graph(const prpack_base_graph* bg) {
   50|  1.46k|    initialize();
   51|  1.46k|    num_vs = bg->num_vs;
   52|  1.46k|    num_es = bg->num_es;
   53|  1.46k|    matrix = new double[num_vs*num_vs];
   54|  1.46k|    d = new double[num_vs];
   55|  1.46k|    fill(matrix, matrix + num_vs*num_vs, 0);
   56|  1.46k|    if (bg->vals != NULL)
  ------------------
  |  Branch (56:9): [True: 0, False: 1.46k]
  ------------------
   57|      0|        initialize_weighted(bg);
   58|  1.46k|    else
   59|  1.46k|        initialize_unweighted(bg);
   60|  1.46k|}
_ZN6prpack28prpack_preprocessed_ge_graphD2Ev:
   62|  1.46k|prpack_preprocessed_ge_graph::~prpack_preprocessed_ge_graph() {
   63|  1.46k|    delete[] matrix;
   64|  1.46k|    delete[] d;
   65|  1.46k|}

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

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

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

igraph_trussness:
  241|  1.46k|igraph_error_t igraph_trussness(const igraph_t* graph, igraph_vector_int_t* trussness) {
  242|  1.46k|    igraph_vector_int_t triangles, support, unpacked_triangles, eid;
  243|  1.46k|    igraph_bool_t is_multigraph;
  244|       |
  245|       |    /* Check whether the graph is a multigraph; trussness will not work for these */
  246|  1.46k|    IGRAPH_CHECK(igraph_has_multiple(graph, &is_multigraph));
  ------------------
  |  |  656|  1.46k|    do { \
  |  |  657|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
  247|  1.46k|    if (! is_multigraph && igraph_is_directed(graph)) {
  ------------------
  |  Branch (247:9): [True: 1.46k, False: 0]
  |  Branch (247:28): [True: 0, False: 1.46k]
  ------------------
  248|       |        /* Directed graphs with mutual edges are effectively multigraphs
  249|       |         * when edge directions are ignored. */
  250|      0|        IGRAPH_CHECK(igraph_has_mutual(graph, &is_multigraph, /* loops */ false));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  251|      0|    }
  252|  1.46k|    if (is_multigraph) {
  ------------------
  |  Branch (252:9): [True: 0, False: 1.46k]
  ------------------
  253|      0|        IGRAPH_ERROR("Trussness is not implemented for graphs with multi-edges.", IGRAPH_UNIMPLEMENTED);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  254|      0|    }
  255|       |
  256|       |    /* Manage the stack to make it memory safe: do not change the order of
  257|       |     * initialization of the following four vectors */
  258|  1.46k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&support, igraph_ecount(graph));
  ------------------
  |  |  119|  1.46k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  1.46k|    do { \
  |  |  |  |  657|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  1.46k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  1.46k|    do { \
  |  |  |  |  604|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.46k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
  259|  1.46k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&eid, 0);
  ------------------
  |  |  119|  1.46k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  1.46k|    do { \
  |  |  |  |  657|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  1.46k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  1.46k|    do { \
  |  |  |  |  604|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.46k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
  260|  1.46k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&unpacked_triangles, 0);
  ------------------
  |  |  119|  1.46k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  1.46k|    do { \
  |  |  |  |  657|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  1.46k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  1.46k|    do { \
  |  |  |  |  604|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.46k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
  261|  1.46k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&triangles, 0);
  ------------------
  |  |  119|  1.46k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  1.46k|    do { \
  |  |  |  |  657|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  1.46k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  1.46k|    do { \
  |  |  |  |  604|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.46k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
  262|       |
  263|       |    // List the triangles as vertex triplets.
  264|  1.46k|    IGRAPH_CHECK(igraph_list_triangles(graph, &triangles));
  ------------------
  |  |  656|  1.46k|    do { \
  |  |  657|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
  265|       |
  266|       |    // Unpack the triangles from vertex list to edge list.
  267|  1.46k|    IGRAPH_CHECK(igraph_truss_i_unpack(&triangles, &unpacked_triangles));
  ------------------
  |  |  656|  1.46k|    do { \
  |  |  657|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
  268|  1.46k|    igraph_vector_int_destroy(&triangles);
  269|  1.46k|    IGRAPH_FINALLY_CLEAN(1);
  270|       |
  271|       |    // Get the edge IDs of the unpacked triangles. Note: a given eid can occur
  272|       |    // multiple times in this list if it is in multiple triangles.
  273|  1.46k|    IGRAPH_CHECK(igraph_get_eids(graph, &eid, &unpacked_triangles, /* directed = */ false, /* error = */ true));
  ------------------
  |  |  656|  1.46k|    do { \
  |  |  657|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
  274|  1.46k|    igraph_vector_int_destroy(&unpacked_triangles);
  275|  1.46k|    IGRAPH_FINALLY_CLEAN(1);
  276|       |
  277|       |    // Compute the support of the edges.
  278|  1.46k|    igraph_truss_i_compute_support(&eid, &support);
  279|  1.46k|    igraph_vector_int_destroy(&eid);
  280|  1.46k|    IGRAPH_FINALLY_CLEAN(1);
  281|       |
  282|       |    // Compute the trussness of the edges.
  283|  1.46k|    IGRAPH_CHECK(igraph_i_trussness(graph, &support, trussness));
  ------------------
  |  |  656|  1.46k|    do { \
  |  |  657|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
  284|  1.46k|    igraph_vector_int_destroy(&support);
  285|  1.46k|    IGRAPH_FINALLY_CLEAN(1);
  286|       |
  287|  1.46k|    return IGRAPH_SUCCESS;
  288|  1.46k|}
truss.cpp:_ZL21igraph_truss_i_unpackPK19igraph_vector_int_tPS_:
   49|  1.46k|static igraph_error_t igraph_truss_i_unpack(const igraph_vector_int_t *tri, igraph_vector_int_t *unpacked_tri) {
   50|  1.46k|    igraph_int_t num_triangles = igraph_vector_int_size(tri);
   51|       |
   52|  1.46k|    IGRAPH_CHECK(igraph_vector_int_resize(unpacked_tri, 2 * num_triangles));
  ------------------
  |  |  656|  1.46k|    do { \
  |  |  657|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
   53|       |
   54|  23.1k|    for (igraph_int_t i = 0, j = 0; i < num_triangles; i += 3, j += 6) {
  ------------------
  |  Branch (54:37): [True: 21.6k, False: 1.46k]
  ------------------
   55|  21.6k|        VECTOR(*unpacked_tri)[j]   = VECTOR(*unpacked_tri)[j+2] = VECTOR(*tri)[i];
  ------------------
  |  |   60|  21.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      VECTOR(*unpacked_tri)[j]   = VECTOR(*unpacked_tri)[j+2] = VECTOR(*tri)[i];
  ------------------
  |  |   60|  21.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      VECTOR(*unpacked_tri)[j]   = VECTOR(*unpacked_tri)[j+2] = VECTOR(*tri)[i];
  ------------------
  |  |   60|  21.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   56|  21.6k|        VECTOR(*unpacked_tri)[j+1] = VECTOR(*unpacked_tri)[j+4] = VECTOR(*tri)[i+1];
  ------------------
  |  |   60|  21.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      VECTOR(*unpacked_tri)[j+1] = VECTOR(*unpacked_tri)[j+4] = VECTOR(*tri)[i+1];
  ------------------
  |  |   60|  21.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      VECTOR(*unpacked_tri)[j+1] = VECTOR(*unpacked_tri)[j+4] = VECTOR(*tri)[i+1];
  ------------------
  |  |   60|  21.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   57|  21.6k|        VECTOR(*unpacked_tri)[j+3] = VECTOR(*unpacked_tri)[j+5] = VECTOR(*tri)[i+2];
  ------------------
  |  |   60|  21.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      VECTOR(*unpacked_tri)[j+3] = VECTOR(*unpacked_tri)[j+5] = VECTOR(*tri)[i+2];
  ------------------
  |  |   60|  21.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      VECTOR(*unpacked_tri)[j+3] = VECTOR(*unpacked_tri)[j+5] = VECTOR(*tri)[i+2];
  ------------------
  |  |   60|  21.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   58|  21.6k|    }
   59|       |
   60|  1.46k|    return IGRAPH_SUCCESS;
   61|  1.46k|}
truss.cpp:_ZL30igraph_truss_i_compute_supportPK19igraph_vector_int_tPS_:
   66|  1.46k|static void igraph_truss_i_compute_support(const igraph_vector_int_t *eid, igraph_vector_int_t *support) {
   67|  1.46k|    igraph_int_t m = igraph_vector_int_size(eid);
   68|  66.5k|    for (igraph_int_t i = 0; i < m; ++i) {
  ------------------
  |  Branch (68:30): [True: 65.0k, False: 1.46k]
  ------------------
   69|  65.0k|        VECTOR(*support)[VECTOR(*eid)[i]] += 1;
  ------------------
  |  |   60|  65.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      VECTOR(*support)[VECTOR(*eid)[i]] += 1;
  ------------------
  |  |   60|  65.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   70|  65.0k|    }
   71|  1.46k|}
truss.cpp:_ZL18igraph_i_trussnessPK8igraph_tP19igraph_vector_int_tS3_:
   76|  1.46k|                                         igraph_vector_int_t *trussness) {
   77|  1.46k|    IGRAPH_HANDLE_EXCEPTIONS_BEGIN;
  ------------------
  |  |   21|  1.46k|    try {
  ------------------
   78|       |
   79|  1.46k|    igraph_adjlist_t adjlist;
   80|  1.46k|    igraph_vector_int_t commonNeighbors;
   81|  1.46k|    igraph_vector_bool_t completed;
   82|       |
   83|       |    // C++ data structures
   84|  1.46k|    vector< unordered_set<igraph_int_t> > vec;
   85|       |
   86|       |    // Allocate memory for result
   87|  1.46k|    igraph_int_t no_of_edges = igraph_vector_int_size(support);
   88|  1.46k|    IGRAPH_CHECK(igraph_vector_int_resize(trussness, no_of_edges));
  ------------------
  |  |  656|  1.46k|    do { \
  |  |  657|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
   89|  1.46k|    if (no_of_edges == 0) {
  ------------------
  |  Branch (89:9): [True: 49, False: 1.41k]
  ------------------
   90|     49|        return IGRAPH_SUCCESS;
   91|     49|    }
   92|       |
   93|       |    // Get max possible value = max entry in support.
   94|       |    // This cannot be computed if there are no edges, hence the above check
   95|  1.41k|    igraph_int_t max = igraph_vector_int_max(support);
   96|       |
   97|       |    // Initialize completed edges.
   98|  1.41k|    IGRAPH_VECTOR_BOOL_INIT_FINALLY(&completed, no_of_edges);
  ------------------
  |  |  109|  1.41k|    do { IGRAPH_CHECK(igraph_vector_bool_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  1.41k|    do { \
  |  |  |  |  657|  1.41k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.41k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.41k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.41k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.41k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.41k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  110|  1.41k|        IGRAPH_FINALLY(igraph_vector_bool_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  1.41k|    do { \
  |  |  |  |  604|  1.41k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.41k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.41k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.41k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.41k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.41k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.41k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.41k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (110:65): [Folded, False: 1.41k]
  |  |  ------------------
  ------------------
   99|       |
  100|       |    // The vector of levels. Each level of the vector is a set of edges initially
  101|       |    // at that level of support, where support is # of triangles the edge is in.
  102|  1.41k|    vec.resize(max + 1);
  103|       |
  104|       |    // Add each edge to its appropriate level of support.
  105|  32.4k|    for (igraph_int_t i = 0; i < no_of_edges; ++i) {
  ------------------
  |  Branch (105:30): [True: 31.0k, False: 1.41k]
  ------------------
  106|  31.0k|        vec[VECTOR(*support)[i]].insert(i);  // insert edge i into its support level
  ------------------
  |  |   60|  31.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  107|  31.0k|    }
  108|       |
  109|       |    // Record the trussness of edges at level 0. These edges are not part
  110|       |    // of any triangles, so there's not much to do and we "complete" them
  111|  11.7k|    for (auto edge : vec[0]) {
  ------------------
  |  Branch (111:20): [True: 11.7k, False: 1.41k]
  ------------------
  112|  11.7k|        VECTOR(*trussness)[edge] = 2;
  ------------------
  |  |   60|  11.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  113|  11.7k|        VECTOR(completed)[edge] = true;
  ------------------
  |  |   60|  11.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  114|  11.7k|    }
  115|       |
  116|       |    // Initialize variables needed below.
  117|  1.41k|    IGRAPH_CHECK(igraph_adjlist_init(graph, &adjlist, IGRAPH_ALL, IGRAPH_NO_LOOPS, IGRAPH_MULTIPLE));
  ------------------
  |  |  656|  1.41k|    do { \
  |  |  657|  1.41k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.41k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.41k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.41k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.41k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.41k]
  |  |  ------------------
  ------------------
  118|  1.41k|    IGRAPH_FINALLY(igraph_adjlist_destroy, &adjlist);
  ------------------
  |  |  603|  1.41k|    do { \
  |  |  604|  1.41k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  1.41k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  1.41k|         * incorrect destructor function with the pointer */ \
  |  |  607|  1.41k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 1.41k]
  |  |  ------------------
  |  |  608|  1.41k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  1.41k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 1.41k]
  |  |  ------------------
  ------------------
  119|  1.41k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&commonNeighbors, 0);
  ------------------
  |  |  119|  1.41k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  1.41k|    do { \
  |  |  |  |  657|  1.41k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.41k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.41k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.41k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.41k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.41k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  1.41k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  1.41k|    do { \
  |  |  |  |  604|  1.41k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.41k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.41k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.41k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.41k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.41k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.41k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.41k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 1.41k]
  |  |  ------------------
  ------------------
  120|       |
  121|       |    // Move through the levels, one level at a time, starting at first level.
  122|  5.35k|    for (igraph_int_t level = 1; level <= max; ++level) {
  ------------------
  |  Branch (122:34): [True: 3.94k, False: 1.41k]
  ------------------
  123|       |
  124|       |        /* Track down edges one at a time */
  125|  23.2k|        while (!vec[level].empty()) {
  ------------------
  |  Branch (125:16): [True: 19.2k, False: 3.94k]
  ------------------
  126|  19.2k|            IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|  19.2k|    do { \
  |  |   47|  19.2k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 19.2k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|  19.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 19.2k]
  |  |  ------------------
  ------------------
  127|       |
  128|  19.2k|            igraph_int_t seed = *vec[level].begin();  // pull out the first edge
  129|  19.2k|            vec[level].erase(seed);  // remove the first element
  130|       |
  131|       |            /* Find the vertices of this edge */
  132|  19.2k|            igraph_int_t fromVertex = IGRAPH_FROM(graph, seed);
  ------------------
  |  |  115|  19.2k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  19.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  133|  19.2k|            igraph_int_t toVertex = IGRAPH_TO(graph, seed);
  ------------------
  |  |  128|  19.2k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  ------------------
  |  |  |  |   60|  19.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  134|       |
  135|       |            /* Find neighbors of both vertices. If they run into each other,
  136|       |             * there is a triangle. We rely on the neighbor lists being sorted,
  137|       |             * as guaranteed by igraph_adjlist_init(), when computing intersections. */
  138|  19.2k|            igraph_vector_int_t *fromNeighbors = igraph_adjlist_get(&adjlist, fromVertex);
  ------------------
  |  |   73|  19.2k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  139|  19.2k|            igraph_vector_int_t *toNeighbors = igraph_adjlist_get(&adjlist, toVertex);
  ------------------
  |  |   73|  19.2k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  140|  19.2k|            igraph_vector_int_t *q1 = fromNeighbors;
  141|  19.2k|            igraph_vector_int_t *q2 = toNeighbors;
  142|       |
  143|  19.2k|            if (igraph_vector_int_size(q1) > igraph_vector_int_size(q2)) {
  ------------------
  |  Branch (143:17): [True: 5.56k, False: 13.7k]
  ------------------
  144|       |                // case: #fromNeighbors > #toNeigbors, so make q1 the smaller set.
  145|  5.56k|                q1 = toNeighbors;
  146|  5.56k|                q2 = fromNeighbors;
  147|  5.56k|            }
  148|       |
  149|       |            // Intersect the neighbors.
  150|  19.2k|            IGRAPH_CHECK(igraph_vector_int_intersect_sorted(q1, q2, &commonNeighbors));
  ------------------
  |  |  656|  19.2k|    do { \
  |  |  657|  19.2k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  19.2k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  19.2k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 19.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  19.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 19.2k]
  |  |  ------------------
  ------------------
  151|       |
  152|       |            /* Go over the overlapping neighbors and check each */
  153|  19.2k|            igraph_int_t ncommon = igraph_vector_int_size(&commonNeighbors);
  154|  84.3k|            for (igraph_int_t j = 0; j < ncommon; j++) {
  ------------------
  |  Branch (154:38): [True: 65.0k, False: 19.2k]
  ------------------
  155|  65.0k|                igraph_int_t n = VECTOR(commonNeighbors)[j];  // the common neighbor
  ------------------
  |  |   60|  65.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  156|  65.0k|                igraph_int_t e1, e2;
  157|       |
  158|  65.0k|                igraph_get_eid(graph, &e1, fromVertex, n, IGRAPH_UNDIRECTED, /* error= */ false);
  159|  65.0k|                igraph_get_eid(graph, &e2, toVertex, n, IGRAPH_UNDIRECTED, /* error= */ false);
  160|  65.0k|                IGRAPH_ASSERT(e1 >= 0 && e2 >= 0);
  ------------------
  |  |  924|  65.0k|    do { \
  |  |  925|  65.0k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   130k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 65.0k]
  |  |  |  |  |  Branch (612:52): [True: 65.0k, False: 0]
  |  |  |  |  |  Branch (612:52): [True: 65.0k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  65.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 65.0k]
  |  |  ------------------
  ------------------
  161|       |
  162|  65.0k|                bool e1_complete = VECTOR(completed)[e1];
  ------------------
  |  |   60|  65.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  163|  65.0k|                bool e2_complete = VECTOR(completed)[e2];
  ------------------
  |  |   60|  65.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  164|       |
  165|  65.0k|                if (!e1_complete && !e2_complete) {
  ------------------
  |  Branch (165:21): [True: 29.9k, False: 35.0k]
  |  Branch (165:37): [True: 21.6k, False: 8.29k]
  ------------------
  166|  21.6k|                    igraph_int_t newLevel;
  167|       |
  168|       |                    // Demote this edge, if higher than current level.
  169|  21.6k|                    if (VECTOR(*support)[e1] > level) {
  ------------------
  |  |   60|  21.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (169:25): [True: 8.76k, False: 12.9k]
  ------------------
  170|  8.76k|                        VECTOR(*support)[e1] -= 1;  // decrement the level
  ------------------
  |  |   60|  8.76k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  171|  8.76k|                        newLevel = VECTOR(*support)[e1];
  ------------------
  |  |   60|  8.76k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  172|  8.76k|                        vec[newLevel].insert(e1);
  173|  8.76k|                        vec[newLevel + 1].erase(e1);  // the old level
  174|  8.76k|                    }
  175|       |                    // Demote this edge, if higher than current level.
  176|  21.6k|                    if (VECTOR(*support)[e2] > level) {
  ------------------
  |  |   60|  21.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (176:25): [True: 10.5k, False: 11.1k]
  ------------------
  177|  10.5k|                        VECTOR(*support)[e2] -= 1;  // decrement the level
  ------------------
  |  |   60|  10.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  178|  10.5k|                        newLevel = VECTOR(*support)[e2];
  ------------------
  |  |   60|  10.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  179|  10.5k|                        vec[newLevel].insert(e2);
  180|  10.5k|                        vec[newLevel + 1].erase(e2);  // the old level
  181|  10.5k|                    }
  182|  21.6k|                }
  183|  65.0k|            }
  184|       |            // Record this edge; its level is its trussness.
  185|  19.2k|            VECTOR(*trussness)[seed] = level + 2;
  ------------------
  |  |   60|  19.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  186|  19.2k|            VECTOR(completed)[seed] = true; // mark as complete
  ------------------
  |  |   60|  19.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  187|  19.2k|            igraph_vector_int_clear(&commonNeighbors);
  188|  19.2k|        }  // end while
  189|  3.94k|    }  // end for-loop over levels
  190|       |
  191|       |    // Clean up.
  192|  1.41k|    igraph_vector_int_destroy(&commonNeighbors);
  193|  1.41k|    igraph_adjlist_destroy(&adjlist);
  194|  1.41k|    igraph_vector_bool_destroy(&completed);
  195|  1.41k|    IGRAPH_FINALLY_CLEAN(3);
  196|       |
  197|  1.41k|    return IGRAPH_SUCCESS;
  198|       |
  199|  1.41k|    IGRAPH_HANDLE_EXCEPTIONS_END;
  ------------------
  |  |   23|  1.41k|    } \
  |  |   24|  1.46k|    catch (const std::bad_alloc &e) { IGRAPH_ERROR(e.what(), IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ } \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   25|  1.46k|    catch (const std::range_error &e) { IGRAPH_ERROR(e.what(), IGRAPH_EOVERFLOW); /* LCOV_EXCL_LINE */ } \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   26|  1.46k|    catch (const std::exception &e) { IGRAPH_ERROR(e.what(), IGRAPH_FAILURE); /* LCOV_EXCL_LINE */ } \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   27|  1.46k|    catch (...) { IGRAPH_ERROR("Unknown exception caught.", IGRAPH_FAILURE); /* LCOV_EXCL_LINE */ }
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  200|      0|}

igraph_create:
   54|  4.43k|                             igraph_int_t n, igraph_bool_t directed) {
   55|  4.43k|    igraph_bool_t has_edges = igraph_vector_int_size(edges) > 0;
   56|  4.43k|    igraph_int_t max;
   57|       |
   58|  4.43k|    if (igraph_vector_int_size(edges) % 2 != 0) {
  ------------------
  |  Branch (58:9): [True: 0, False: 4.43k]
  ------------------
   59|      0|        IGRAPH_ERROR("Invalid (odd) edges vector.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
   60|      0|    }
   61|  4.43k|    if (!igraph_vector_int_isininterval(edges, 0, IGRAPH_VCOUNT_MAX-1)) {
  ------------------
  |  |  100|  4.43k|#define IGRAPH_VCOUNT_MAX (IGRAPH_INTEGER_MAX-1)
  |  |  ------------------
  |  |  |  |   72|  4.43k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  |  |  ------------------
  ------------------
  |  Branch (61:9): [True: 0, False: 4.43k]
  ------------------
   62|      0|        IGRAPH_ERROR("Invalid (negative or too large) vertex ID.", IGRAPH_EINVVID);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
   63|      0|    }
   64|       |
   65|       |    /* The + 1 here cannot overflow as above we have already
   66|       |     * checked that vertex IDs are within range. */
   67|  4.43k|    max = has_edges ? igraph_vector_int_max(edges) + 1 : 0;
  ------------------
  |  Branch (67:11): [True: 4.27k, False: 159]
  ------------------
   68|       |
   69|  4.43k|    IGRAPH_CHECK(igraph_empty(graph, n, directed));
  ------------------
  |  |  656|  4.43k|    do { \
  |  |  657|  4.43k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.43k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.43k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.43k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  4.43k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.43k]
  |  |  ------------------
  ------------------
   70|  4.43k|    IGRAPH_FINALLY(igraph_destroy, graph);
  ------------------
  |  |  603|  4.43k|    do { \
  |  |  604|  4.43k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  4.43k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  4.43k|         * incorrect destructor function with the pointer */ \
  |  |  607|  4.43k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 4.43k]
  |  |  ------------------
  |  |  608|  4.43k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  4.43k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 4.43k]
  |  |  ------------------
  ------------------
   71|  4.43k|    if (has_edges) {
  ------------------
  |  Branch (71:9): [True: 4.27k, False: 159]
  ------------------
   72|  4.27k|        n = igraph_vcount(graph);
   73|  4.27k|        if (n < max) {
  ------------------
  |  Branch (73:13): [True: 1.23k, False: 3.04k]
  ------------------
   74|  1.23k|            IGRAPH_CHECK(igraph_add_vertices(graph, (max - n), 0));
  ------------------
  |  |  656|  1.23k|    do { \
  |  |  657|  1.23k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.23k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.23k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.23k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.23k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.23k]
  |  |  ------------------
  ------------------
   75|  1.23k|        }
   76|  4.27k|        IGRAPH_CHECK(igraph_add_edges(graph, edges, 0));
  ------------------
  |  |  656|  4.27k|    do { \
  |  |  657|  4.27k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.27k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.27k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.27k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  4.27k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.27k]
  |  |  ------------------
  ------------------
   77|  4.27k|    }
   78|       |
   79|  4.43k|    IGRAPH_FINALLY_CLEAN(1);
   80|  4.43k|    return IGRAPH_SUCCESS;
   81|  4.43k|}

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

igraph_dqueue_int_init:
   75|   531k|igraph_error_t FUNCTION(igraph_dqueue, init)(TYPE(igraph_dqueue)* q, igraph_int_t capacity) {
   76|   531k|    IGRAPH_ASSERT(q != NULL);
  ------------------
  |  |  924|   531k|    do { \
  |  |  925|   531k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   531k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 531k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   531k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 531k]
  |  |  ------------------
  ------------------
   77|   531k|    IGRAPH_ASSERT(capacity >= 0);
  ------------------
  |  |  924|   531k|    do { \
  |  |  925|   531k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   531k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 531k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   531k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 531k]
  |  |  ------------------
  ------------------
   78|       |
   79|   531k|    if (capacity == 0) capacity = 1;
  ------------------
  |  Branch (79:9): [True: 0, False: 531k]
  ------------------
   80|       |
   81|   531k|    q->stor_begin = IGRAPH_CALLOC(capacity, BASE);
  ------------------
  |  |   33|   531k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  1.06M|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 531k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 531k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 531k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   82|   531k|    IGRAPH_CHECK_OOM(q->stor_begin, "Cannot initialize dqueue.");
  ------------------
  |  |  709|   531k|    do { \
  |  |  710|   531k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|   531k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 531k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|   531k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 531k]
  |  |  ------------------
  ------------------
   83|   531k|    q->stor_end = q->stor_begin + capacity;
   84|   531k|    q->begin = q->stor_begin;
   85|   531k|    q->end = NULL;
   86|       |
   87|   531k|    return IGRAPH_SUCCESS;
   88|   531k|}
igraph_dqueue_int_destroy:
  100|   531k|void FUNCTION(igraph_dqueue, destroy)(TYPE(igraph_dqueue)* q) {
  101|   531k|    IGRAPH_ASSERT(q != NULL);
  ------------------
  |  |  924|   531k|    do { \
  |  |  925|   531k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   531k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 531k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   531k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 531k]
  |  |  ------------------
  ------------------
  102|   531k|    IGRAPH_FREE(q->stor_begin); /* sets to NULL */
  ------------------
  |  |   36|   531k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  103|   531k|}
igraph_dqueue_int_empty:
  117|  6.40M|igraph_bool_t FUNCTION(igraph_dqueue, empty)(const TYPE(igraph_dqueue)* q) {
  118|  6.40M|    IGRAPH_ASSERT(q != NULL);
  ------------------
  |  |  924|  6.40M|    do { \
  |  |  925|  6.40M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  6.40M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 6.40M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  6.40M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 6.40M]
  |  |  ------------------
  ------------------
  119|  6.40M|    IGRAPH_ASSERT(q->stor_begin != NULL);
  ------------------
  |  |  924|  6.40M|    do { \
  |  |  925|  6.40M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  6.40M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 6.40M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  6.40M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 6.40M]
  |  |  ------------------
  ------------------
  120|  6.40M|    return q->end == NULL;
  121|  6.40M|}
igraph_dqueue_int_clear:
  133|   313k|void FUNCTION(igraph_dqueue, clear)(TYPE(igraph_dqueue)* q) {
  134|   313k|    IGRAPH_ASSERT(q != NULL);
  ------------------
  |  |  924|   313k|    do { \
  |  |  925|   313k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   313k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 313k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   313k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 313k]
  |  |  ------------------
  ------------------
  135|   313k|    IGRAPH_ASSERT(q->stor_begin != NULL);
  ------------------
  |  |  924|   313k|    do { \
  |  |  925|   313k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   313k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 313k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   313k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 313k]
  |  |  ------------------
  ------------------
  136|   313k|    q->begin = q->stor_begin;
  137|       |    q->end = NULL;
  138|   313k|}
igraph_dqueue_int_pop:
  240|  7.79M|BASE FUNCTION(igraph_dqueue, pop)(TYPE(igraph_dqueue)* q) {
  241|  7.79M|    IGRAPH_ASSERT(q != NULL);
  ------------------
  |  |  924|  7.79M|    do { \
  |  |  925|  7.79M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  7.79M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 7.79M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  7.79M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 7.79M]
  |  |  ------------------
  ------------------
  242|  7.79M|    IGRAPH_ASSERT(q->stor_begin != NULL);
  ------------------
  |  |  924|  7.79M|    do { \
  |  |  925|  7.79M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  7.79M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 7.79M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  7.79M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 7.79M]
  |  |  ------------------
  ------------------
  243|  7.79M|    IGRAPH_ASSERT(q->stor_end != NULL); /* queue is not empty */
  ------------------
  |  |  924|  7.79M|    do { \
  |  |  925|  7.79M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  7.79M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 7.79M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  7.79M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 7.79M]
  |  |  ------------------
  ------------------
  244|  7.79M|    BASE tmp = *(q->begin);
  ------------------
  |  |   66|  7.79M|    #define BASE igraph_int_t
  ------------------
  245|  7.79M|    (q->begin)++;
  246|  7.79M|    if (q->begin == q->stor_end) {
  ------------------
  |  Branch (246:9): [True: 16.1k, False: 7.78M]
  ------------------
  247|  16.1k|        q->begin = q->stor_begin;
  248|  16.1k|    }
  249|  7.79M|    if (q->begin == q->end) {
  ------------------
  |  Branch (249:9): [True: 1.23M, False: 6.55M]
  ------------------
  250|  1.23M|        q->end = NULL;
  251|  1.23M|    }
  252|       |
  253|  7.79M|    return tmp;
  254|  7.79M|}
igraph_dqueue_int_push:
  307|  7.79M|igraph_error_t FUNCTION(igraph_dqueue, push)(TYPE(igraph_dqueue)* q, BASE elem) {
  308|  7.79M|    IGRAPH_ASSERT(q != NULL);
  ------------------
  |  |  924|  7.79M|    do { \
  |  |  925|  7.79M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  7.79M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 7.79M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  7.79M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 7.79M]
  |  |  ------------------
  ------------------
  309|  7.79M|    IGRAPH_ASSERT(q->stor_begin != NULL);
  ------------------
  |  |  924|  7.79M|    do { \
  |  |  925|  7.79M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  7.79M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 7.79M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  7.79M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 7.79M]
  |  |  ------------------
  ------------------
  310|  7.79M|    if (q->begin != q->end) {
  ------------------
  |  Branch (310:9): [True: 7.79M, False: 53]
  ------------------
  311|       |        /* not full */
  312|  7.79M|        if (q->end == NULL) {
  ------------------
  |  Branch (312:13): [True: 1.23M, False: 6.55M]
  ------------------
  313|  1.23M|            q->end = q->begin;
  314|  1.23M|        }
  315|  7.79M|        *(q->end) = elem;
  316|  7.79M|        (q->end)++;
  317|  7.79M|        if (q->end == q->stor_end) {
  ------------------
  |  Branch (317:13): [True: 16.2k, False: 7.78M]
  ------------------
  318|  16.2k|            q->end = q->stor_begin;
  319|  16.2k|        }
  320|  7.79M|    } else {
  321|       |        /* full, allocate more storage */
  322|       |
  323|     53|        BASE *bigger = NULL, *old = q->stor_begin;
  ------------------
  |  |   66|     53|    #define BASE igraph_int_t
  ------------------
  324|     53|        igraph_int_t old_size = q->stor_end - q->stor_begin;
  325|     53|        igraph_int_t new_capacity = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   72|     53|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
                      igraph_int_t new_capacity = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   72|     53|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (325:37): [True: 53, False: 0]
  ------------------
  326|       |
  327|     53|        if (old_size == IGRAPH_INTEGER_MAX) {
  ------------------
  |  |   72|     53|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (327:13): [True: 0, False: 53]
  ------------------
  328|      0|            IGRAPH_ERROR("Cannot push to dqueue, already at maximum size.", IGRAPH_EOVERFLOW);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  329|      0|        }
  330|     53|        if (new_capacity == 0) {
  ------------------
  |  Branch (330:13): [True: 0, False: 53]
  ------------------
  331|      0|            new_capacity = 1;
  332|      0|        }
  333|       |
  334|     53|        bigger = IGRAPH_CALLOC(new_capacity, BASE);
  ------------------
  |  |   33|     53|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|    106|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 53, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 53, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 53, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  335|     53|        IGRAPH_CHECK_OOM(bigger, "Cannot push to dqueue.");
  ------------------
  |  |  709|     53|    do { \
  |  |  710|     53|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|     53|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 53]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|     53|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 53]
  |  |  ------------------
  ------------------
  336|       |
  337|     53|        if (q->stor_end - q->begin > 0) {
  ------------------
  |  Branch (337:13): [True: 53, False: 0]
  ------------------
  338|     53|            memcpy(bigger, q->begin,
  339|     53|                   (size_t)(q->stor_end - q->begin) * sizeof(BASE));
  340|     53|        }
  341|     53|        if (q->end - q->stor_begin > 0) {
  ------------------
  |  Branch (341:13): [True: 50, False: 3]
  ------------------
  342|     50|            memcpy(bigger + (q->stor_end - q->begin), q->stor_begin,
  343|     50|                   (size_t)(q->end - q->stor_begin) * sizeof(BASE));
  344|     50|        }
  345|       |
  346|     53|        q->end        = bigger + old_size;
  347|     53|        q->stor_end   = bigger + new_capacity;
  348|     53|        q->stor_begin = bigger;
  349|     53|        q->begin      = bigger;
  350|       |
  351|     53|        *(q->end) = elem;
  352|     53|        (q->end)++;
  353|     53|        if (q->end == q->stor_end) {
  ------------------
  |  Branch (353:13): [True: 0, False: 53]
  ------------------
  354|      0|            q->end = q->stor_begin;
  355|      0|        }
  356|       |
  357|     53|        IGRAPH_FREE(old);
  ------------------
  |  |   36|     53|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  358|     53|    }
  359|       |
  360|  7.79M|    return IGRAPH_SUCCESS;
  361|  7.79M|}

IGRAPH_FINALLY_REAL:
  320|   947k|void IGRAPH_FINALLY_REAL(void (*func)(void*), void* ptr) {
  321|   947k|    int no = igraph_i_finally_stack_size;
  322|   947k|    if (no < 0) {
  ------------------
  |  Branch (322:9): [True: 0, False: 947k]
  ------------------
  323|       |        /* Reset finally stack in case fatal error handler does a longjmp instead of terminating the process: */
  324|      0|        igraph_i_reset_finally_stack();
  325|      0|        IGRAPH_FATALF("Corrupt finally stack: it contains %d elements.", no);
  ------------------
  |  |  875|      0|    do { \
  |  |  876|      0|        igraph_fatalf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  877|      0|                      __VA_ARGS__); \
  |  |  878|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (878:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  326|      0|    }
  327|   947k|    if (no >= (int) (sizeof(igraph_i_finally_stack) / sizeof(igraph_i_finally_stack[0]))) {
  ------------------
  |  Branch (327:9): [True: 0, False: 947k]
  ------------------
  328|       |        /* Reset finally stack in case fatal error handler does a longjmp instead of terminating the process: */
  329|      0|        igraph_i_reset_finally_stack();
  330|      0|        IGRAPH_FATALF("Finally stack too large: it contains %d elements.", no);
  ------------------
  |  |  875|      0|    do { \
  |  |  876|      0|        igraph_fatalf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  877|      0|                      __VA_ARGS__); \
  |  |  878|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (878:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  331|      0|    }
  332|   947k|    igraph_i_finally_stack[no].ptr = ptr;
  333|   947k|    igraph_i_finally_stack[no].func = func;
  334|   947k|    igraph_i_finally_stack[no].level = igraph_i_finally_stack_level;
  335|   947k|    igraph_i_finally_stack_size++;
  336|   947k|}
IGRAPH_FINALLY_CLEAN:
  338|   706k|void IGRAPH_FINALLY_CLEAN(int minus) {
  339|   706k|    igraph_i_finally_stack_size -= minus;
  340|   706k|    if (igraph_i_finally_stack_size < 0) {
  ------------------
  |  Branch (340:9): [True: 0, False: 706k]
  ------------------
  341|      0|        int left = igraph_i_finally_stack_size + minus;
  342|       |        /* Reset finally stack in case fatal error handler does a longjmp instead of terminating the process: */
  343|      0|        igraph_i_reset_finally_stack();
  344|      0|        IGRAPH_FATALF("Corrupt finally stack: trying to pop %d element(s) when only %d left.", minus, left);
  ------------------
  |  |  875|      0|    do { \
  |  |  876|      0|        igraph_fatalf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  877|      0|                      __VA_ARGS__); \
  |  |  878|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (878:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  345|      0|    }
  346|   706k|}
IGRAPH_FINALLY_STACK_SIZE:
  359|  1.50k|int IGRAPH_FINALLY_STACK_SIZE(void) {
  360|  1.50k|    return igraph_i_finally_stack_size;
  361|  1.50k|}
IGRAPH_FINALLY_ENTER:
  377|  4.27k|void IGRAPH_FINALLY_ENTER(void) {
  378|  4.27k|    int no = igraph_i_finally_stack_size;
  379|       |    /* Level indices must always be in increasing order in the finally stack */
  380|  4.27k|    if (no > 0 && igraph_i_finally_stack[no-1].level > igraph_i_finally_stack_level) {
  ------------------
  |  Branch (380:9): [True: 4.27k, False: 0]
  |  Branch (380:19): [True: 0, False: 4.27k]
  ------------------
  381|       |        /* Reset finally stack in case fatal error handler does a longjmp instead of terminating the process: */
  382|      0|        igraph_i_reset_finally_stack();
  383|      0|        IGRAPH_FATAL("Corrupt finally stack: cannot create new finally stack level before last one is freed.");
  ------------------
  |  |  895|      0|    do { \
  |  |  896|      0|        igraph_fatal(reason, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  897|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (897:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  384|      0|    }
  385|  4.27k|    igraph_i_finally_stack_level++;
  386|  4.27k|}
IGRAPH_FINALLY_EXIT:
  399|  4.27k|void IGRAPH_FINALLY_EXIT(void) {
  400|  4.27k|    igraph_i_finally_stack_level--;
  401|  4.27k|    if (igraph_i_finally_stack_level < 0) {
  ------------------
  |  Branch (401:9): [True: 0, False: 4.27k]
  ------------------
  402|       |        /* Reset finally stack in case fatal error handler does a longjmp instead of terminating the process: */
  403|      0|        igraph_i_reset_finally_stack();
  404|      0|        IGRAPH_FATAL("Corrupt finally stack: trying to exit outermost finally stack level.");
  ------------------
  |  |  895|      0|    do { \
  |  |  896|      0|        igraph_fatal(reason, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  897|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (897:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  405|      0|    }
  406|  4.27k|}
igraph_set_warning_handler:
  514|  1.52k|igraph_warning_handler_t *igraph_set_warning_handler(igraph_warning_handler_t *new_handler) {
  515|  1.52k|    igraph_warning_handler_t *previous_handler = igraph_i_warning_handler;
  516|  1.52k|    igraph_i_warning_handler = new_handler;
  517|  1.52k|    return previous_handler;
  518|  1.52k|}

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

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

igraph_stack_int_init:
   44|  14.3k|igraph_error_t FUNCTION(igraph_stack, init)(TYPE(igraph_stack)* s, igraph_int_t capacity) {
   45|  14.3k|    igraph_int_t alloc_size;
   46|  14.3k|    IGRAPH_ASSERT(capacity >= 0);
  ------------------
  |  |  924|  14.3k|    do { \
  |  |  925|  14.3k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  14.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 14.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  14.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 14.3k]
  |  |  ------------------
  ------------------
   47|  14.3k|    alloc_size = capacity > 0 ? capacity : 1;
  ------------------
  |  Branch (47:18): [True: 14.3k, False: 8]
  ------------------
   48|  14.3k|    IGRAPH_ASSERT(s != NULL);
  ------------------
  |  |  924|  14.3k|    do { \
  |  |  925|  14.3k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  14.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 14.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  14.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 14.3k]
  |  |  ------------------
  ------------------
   49|  14.3k|    s->stor_begin = IGRAPH_CALLOC(alloc_size, BASE);
  ------------------
  |  |   33|  14.3k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  28.7k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 14.3k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 14.3k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 14.3k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   50|  14.3k|    if (s->stor_begin == NULL) {
  ------------------
  |  Branch (50:9): [True: 0, False: 14.3k]
  ------------------
   51|      0|        IGRAPH_ERROR("Cannot initialize stack.", IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
   52|      0|    }
   53|  14.3k|    s->stor_end = s->stor_begin + alloc_size;
   54|  14.3k|    s->end = s->stor_begin;
   55|       |
   56|  14.3k|    return IGRAPH_SUCCESS;
   57|  14.3k|}
igraph_stack_int_destroy:
   72|  14.3k|void FUNCTION(igraph_stack, destroy)    (TYPE(igraph_stack)* s) {
   73|  14.3k|    IGRAPH_ASSERT(s != NULL);
  ------------------
  |  |  924|  14.3k|    do { \
  |  |  925|  14.3k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  14.3k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 14.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  14.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 14.3k]
  |  |  ------------------
  ------------------
   74|  14.3k|    if (s->stor_begin != NULL) {
  ------------------
  |  Branch (74:9): [True: 14.3k, False: 0]
  ------------------
   75|  14.3k|        IGRAPH_FREE(s->stor_begin);
  ------------------
  |  |   36|  14.3k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
   76|       |        s->stor_begin = NULL;
   77|  14.3k|    }
   78|  14.3k|}
igraph_stack_int_empty:
  154|  3.75M|igraph_bool_t FUNCTION(igraph_stack, empty)(TYPE(igraph_stack)* s) {
  155|  3.75M|    IGRAPH_ASSERT(s != NULL);
  ------------------
  |  |  924|  3.75M|    do { \
  |  |  925|  3.75M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  3.75M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.75M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  3.75M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 3.75M]
  |  |  ------------------
  ------------------
  156|  3.75M|    IGRAPH_ASSERT(s->stor_begin != NULL);
  ------------------
  |  |  924|  3.75M|    do { \
  |  |  925|  3.75M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  3.75M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.75M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  3.75M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 3.75M]
  |  |  ------------------
  ------------------
  157|  3.75M|    return s->stor_begin == s->end;
  158|  3.75M|}
igraph_stack_int_push:
  208|  3.22M|igraph_error_t FUNCTION(igraph_stack, push)(TYPE(igraph_stack)* s, BASE elem) {
  209|  3.22M|    IGRAPH_ASSERT(s != NULL);
  ------------------
  |  |  924|  3.22M|    do { \
  |  |  925|  3.22M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  3.22M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.22M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  3.22M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 3.22M]
  |  |  ------------------
  ------------------
  210|  3.22M|    IGRAPH_ASSERT(s->stor_begin != NULL);
  ------------------
  |  |  924|  3.22M|    do { \
  |  |  925|  3.22M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  3.22M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.22M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  3.22M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 3.22M]
  |  |  ------------------
  ------------------
  211|       |
  212|  3.22M|    if (s->stor_end == s->end) {
  ------------------
  |  Branch (212:9): [True: 0, False: 3.22M]
  ------------------
  213|       |        /* full, allocate more storage */
  214|      0|        igraph_int_t old_size = FUNCTION(igraph_stack, size)(s);
  ------------------
  |  |  178|      0|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|      0|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|      0|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  215|      0|        igraph_int_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   72|      0|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
                      igraph_int_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   72|      0|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (215:33): [True: 0, False: 0]
  ------------------
  216|      0|        if (old_size == IGRAPH_INTEGER_MAX) {
  ------------------
  |  |   72|      0|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (216:13): [True: 0, False: 0]
  ------------------
  217|      0|            IGRAPH_ERROR("Cannot push to stack, already at maximum size.", IGRAPH_EOVERFLOW);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  218|      0|        }
  219|      0|        if (new_size == 0) {
  ------------------
  |  Branch (219:13): [True: 0, False: 0]
  ------------------
  220|      0|            new_size = 1;
  221|      0|        }
  222|      0|        IGRAPH_CHECK(FUNCTION(igraph_stack, reserve)(s, new_size));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  223|      0|    }
  224|       |
  225|  3.22M|    *(s->end) = elem;
  226|  3.22M|    s->end += 1;
  227|       |
  228|  3.22M|    return IGRAPH_SUCCESS;
  229|  3.22M|}
igraph_stack_int_pop:
  244|  3.22M|BASE FUNCTION(igraph_stack, pop)(TYPE(igraph_stack)* s) {
  245|  3.22M|    IGRAPH_ASSERT(s != NULL);
  ------------------
  |  |  924|  3.22M|    do { \
  |  |  925|  3.22M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  3.22M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.22M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  3.22M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 3.22M]
  |  |  ------------------
  ------------------
  246|  3.22M|    IGRAPH_ASSERT(s->stor_begin != NULL);
  ------------------
  |  |  924|  3.22M|    do { \
  |  |  925|  3.22M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  3.22M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.22M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  3.22M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 3.22M]
  |  |  ------------------
  ------------------
  247|  3.22M|    IGRAPH_ASSERT(s->end != NULL);
  ------------------
  |  |  924|  3.22M|    do { \
  |  |  925|  3.22M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  3.22M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.22M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  3.22M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 3.22M]
  |  |  ------------------
  ------------------
  248|  3.22M|    IGRAPH_ASSERT(s->end != s->stor_begin);
  ------------------
  |  |  924|  3.22M|    do { \
  |  |  925|  3.22M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  3.22M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.22M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  3.22M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 3.22M]
  |  |  ------------------
  ------------------
  249|       |
  250|  3.22M|    (s->end)--;
  251|       |
  252|  3.22M|    return *(s->end);
  253|  3.22M|}

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

igraph_vector_init:
  134|  23.1k|igraph_error_t FUNCTION(igraph_vector, init)(TYPE(igraph_vector) *v, igraph_int_t size) {
  135|  23.1k|    igraph_int_t alloc_size;
  136|  23.1k|    IGRAPH_ASSERT(size >= 0);
  ------------------
  |  |  924|  23.1k|    do { \
  |  |  925|  23.1k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  23.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 23.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  23.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 23.1k]
  |  |  ------------------
  ------------------
  137|  23.1k|    alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (137:18): [True: 20.2k, False: 2.93k]
  ------------------
  138|       |
  139|       |    /* When this function fails, it should leave stor_begin set to NULL,
  140|       |     * so that vector_destroy() is still safe to call on the vector.
  141|       |     * This simplifies freeing partially initialized data structures,
  142|       |     * such as adjacency lists, when an error occurs mid-initialization. */
  143|  23.1k|    v->stor_begin = IGRAPH_CALLOC(alloc_size, BASE);
  ------------------
  |  |   33|  23.1k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  46.3k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 23.1k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 23.1k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 23.1k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  144|  23.1k|    IGRAPH_CHECK_OOM(v->stor_begin, "Insufficient memory to initialize vector.");
  ------------------
  |  |  709|  23.1k|    do { \
  |  |  710|  23.1k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  23.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 23.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  23.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 23.1k]
  |  |  ------------------
  ------------------
  145|  23.1k|    v->stor_end = v->stor_begin + alloc_size;
  146|  23.1k|    v->end = v->stor_begin + size;
  147|       |
  148|  23.1k|    return IGRAPH_SUCCESS;
  149|  23.1k|}
igraph_vector_destroy:
  408|  23.1k|void FUNCTION(igraph_vector, destroy)(TYPE(igraph_vector) *v) {
  409|  23.1k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  23.1k|    do { \
  |  |  925|  23.1k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  23.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 23.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  23.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 23.1k]
  |  |  ------------------
  ------------------
  410|       |    /* vector_init() will leave stor_begin set to NULL when it fails.
  411|       |     * We handle these cases gracefully. */
  412|  23.1k|    if (v->stor_begin != NULL) {
  ------------------
  |  Branch (412:9): [True: 23.1k, False: 0]
  ------------------
  413|  23.1k|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   36|  23.1k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  414|       |        v->stor_begin = NULL;
  415|  23.1k|    }
  416|  23.1k|}
igraph_vector_capacity:
  436|  30.4k|igraph_int_t FUNCTION(igraph_vector, capacity)(const TYPE(igraph_vector) *v) {
  437|  30.4k|    return v->stor_end - v->stor_begin;
  438|  30.4k|}
igraph_vector_reserve:
  468|  30.4k|igraph_error_t FUNCTION(igraph_vector, reserve)(TYPE(igraph_vector) *v, igraph_int_t capacity) {
  469|  30.4k|    igraph_int_t current_capacity;
  470|  30.4k|    BASE *tmp;
  ------------------
  |  |   29|  30.4k|    #define BASE igraph_real_t
  ------------------
  471|       |
  472|  30.4k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  30.4k|    do { \
  |  |  925|  30.4k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  30.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 30.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  30.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 30.4k]
  |  |  ------------------
  ------------------
  473|  30.4k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  30.4k|    do { \
  |  |  925|  30.4k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  30.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 30.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  30.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 30.4k]
  |  |  ------------------
  ------------------
  474|  30.4k|    IGRAPH_ASSERT(capacity >= 0);
  ------------------
  |  |  924|  30.4k|    do { \
  |  |  925|  30.4k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  30.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 30.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  30.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 30.4k]
  |  |  ------------------
  ------------------
  475|       |
  476|  30.4k|    current_capacity = FUNCTION(igraph_vector, capacity)(v);
  ------------------
  |  |  170|  30.4k|        #define FUNCTION(a,c) CONCAT2(a,c)
  |  |  ------------------
  |  |  |  |   20|  30.4k|#define CONCAT2(a,b) CONCAT2x(a,b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|  30.4k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  477|       |
  478|  30.4k|    if (capacity <= current_capacity) {
  ------------------
  |  Branch (478:9): [True: 26.9k, False: 3.51k]
  ------------------
  479|  26.9k|        return IGRAPH_SUCCESS;
  480|  26.9k|    }
  481|       |
  482|  3.51k|    tmp = IGRAPH_REALLOC(v->stor_begin, capacity, BASE);
  ------------------
  |  |   35|  3.51k|#define IGRAPH_REALLOC(p,n,t) IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, realloc((void*)(p), sizeof(t) * ((n) > 0 ? (n) : 1)))
  |  |  ------------------
  |  |  |  |   31|  7.03k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 3.51k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 3.51k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 3.51k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  483|  3.51k|    IGRAPH_CHECK_OOM(tmp, "Cannot reserve space for vector.");
  ------------------
  |  |  709|  3.51k|    do { \
  |  |  710|  3.51k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  3.51k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.51k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  3.51k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 3.51k]
  |  |  ------------------
  ------------------
  484|       |
  485|  3.51k|    v->end = tmp + (v->end - v->stor_begin);
  486|  3.51k|    v->stor_begin = tmp;
  487|  3.51k|    v->stor_end = v->stor_begin + capacity;
  488|       |
  489|  3.51k|    return IGRAPH_SUCCESS;
  490|  3.51k|}
igraph_vector_size:
  522|  89.9k|igraph_int_t FUNCTION(igraph_vector, size)(const TYPE(igraph_vector) *v) {
  523|  89.9k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  89.9k|    do { \
  |  |  925|  89.9k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  89.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 89.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  89.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 89.9k]
  |  |  ------------------
  ------------------
  524|  89.9k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  89.9k|    do { \
  |  |  925|  89.9k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  89.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 89.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  89.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 89.9k]
  |  |  ------------------
  ------------------
  525|  89.9k|    return v->end - v->stor_begin;
  526|  89.9k|}
igraph_vector_clear:
  542|      2|void FUNCTION(igraph_vector, clear)(TYPE(igraph_vector)* v) {
  543|      2|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|      2|    do { \
  |  |  925|      2|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|      2|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|      2|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2]
  |  |  ------------------
  ------------------
  544|      2|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|      2|    do { \
  |  |  925|      2|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|      2|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|      2|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2]
  |  |  ------------------
  ------------------
  545|      2|    v->end = v->stor_begin;
  546|      2|}
igraph_vector_null:
  725|  26.0k|void FUNCTION(igraph_vector, null)(TYPE(igraph_vector) *v) {
  726|  26.0k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  26.0k|    do { \
  |  |  925|  26.0k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  26.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 26.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  26.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 26.0k]
  |  |  ------------------
  ------------------
  727|  26.0k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  26.0k|    do { \
  |  |  925|  26.0k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  26.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 26.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  26.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 26.0k]
  |  |  ------------------
  ------------------
  728|  26.0k|    if (FUNCTION(igraph_vector, size)(v) > 0) {
  ------------------
  |  |  170|  26.0k|        #define FUNCTION(a,c) CONCAT2(a,c)
  |  |  ------------------
  |  |  |  |   20|  26.0k|#define CONCAT2(a,b) CONCAT2x(a,b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|  26.0k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (728:9): [True: 25.8k, False: 245]
  ------------------
  729|  25.8k|        memset(v->stor_begin, 0, sizeof(BASE) * FUNCTION(igraph_vector, size)(v));
  ------------------
  |  |  170|  25.8k|        #define FUNCTION(a,c) CONCAT2(a,c)
  |  |  ------------------
  |  |  |  |   20|  25.8k|#define CONCAT2(a,b) CONCAT2x(a,b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|  25.8k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  730|  25.8k|    }
  731|  26.0k|}
igraph_vector_fill:
  745|  2.92k|void FUNCTION(igraph_vector, fill)(TYPE(igraph_vector) *v, BASE e) {
  746|  2.92k|    BASE *ptr;
  ------------------
  |  |   29|  2.92k|    #define BASE igraph_real_t
  ------------------
  747|  2.92k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  2.92k|    do { \
  |  |  925|  2.92k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.92k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.92k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.92k]
  |  |  ------------------
  ------------------
  748|  2.92k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  2.92k|    do { \
  |  |  925|  2.92k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.92k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.92k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.92k]
  |  |  ------------------
  ------------------
  749|       |
  750|       |    /* Optimize the commonly used integer case when filling with 0
  751|       |     * or -1, which are an all-0 and all-1 bit pattern that the
  752|       |     * compiler can generate higher efficiency code for. */
  753|       |#if defined(BASE_INT)
  754|       |    if (e == 0) {
  755|       |        FUNCTION(igraph_vector, null)(v);
  756|       |        return;
  757|       |    }
  758|       |    if (e == -1) {
  759|       |        for (ptr = v->stor_begin; ptr < v->end; ptr++) {
  760|       |            *ptr = -1;
  761|       |        }
  762|       |        return;
  763|       |    }
  764|       |#endif
  765|       |
  766|   128k|    for (ptr = v->stor_begin; ptr < v->end; ptr++) {
  ------------------
  |  Branch (766:31): [True: 125k, False: 2.92k]
  ------------------
  767|   125k|        *ptr = e;
  768|   125k|    }
  769|  2.92k|}
igraph_vector_resize:
 1264|  30.4k|igraph_error_t FUNCTION(igraph_vector, resize)(TYPE(igraph_vector)* v, igraph_int_t new_size) {
 1265|  30.4k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  30.4k|    do { \
  |  |  925|  30.4k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  30.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 30.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  30.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 30.4k]
  |  |  ------------------
  ------------------
 1266|  30.4k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  30.4k|    do { \
  |  |  925|  30.4k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  30.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 30.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  30.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 30.4k]
  |  |  ------------------
  ------------------
 1267|  30.4k|    IGRAPH_CHECK(FUNCTION(igraph_vector, reserve)(v, new_size));
  ------------------
  |  |  656|  30.4k|    do { \
  |  |  657|  30.4k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  30.4k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  30.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 30.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  30.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 30.4k]
  |  |  ------------------
  ------------------
 1268|  30.4k|    v->end = v->stor_begin + new_size;
 1269|  30.4k|    return IGRAPH_SUCCESS;
 1270|  30.4k|}
igraph_vector_sum:
 1566|  1.46k|BASE FUNCTION(igraph_vector, sum)(const TYPE(igraph_vector) *v) {
 1567|  1.46k|    BASE res = ZERO;
  ------------------
  |  |   29|  1.46k|    #define BASE igraph_real_t
  ------------------
                  BASE res = ZERO;
  ------------------
  |  |   38|  1.46k|    #define ZERO 0.0
  ------------------
 1568|  1.46k|    const BASE *p;
 1569|  1.46k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  1.46k|    do { \
  |  |  925|  1.46k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
 1570|  1.46k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  1.46k|    do { \
  |  |  925|  1.46k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
 1571|  64.2k|    for (p = v->stor_begin; p < v->end; p++) {
  ------------------
  |  Branch (1571:29): [True: 62.7k, False: 1.46k]
  ------------------
 1572|       |#ifdef SUM
 1573|       |        SUM(res, res, *p);
 1574|       |#else
 1575|  62.7k|        res += *p;
 1576|  62.7k|#endif
 1577|  62.7k|    }
 1578|  1.46k|    return res;
 1579|  1.46k|}
igraph_vector_all_le:
 2034|  5.85k|                                   const TYPE(igraph_vector) *rhs) {
 2035|  5.85k|    igraph_int_t i, s;
 2036|  5.85k|    IGRAPH_ASSERT(lhs != 0);
  ------------------
  |  |  924|  5.85k|    do { \
  |  |  925|  5.85k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  5.85k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.85k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  5.85k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 5.85k]
  |  |  ------------------
  ------------------
 2037|  5.85k|    IGRAPH_ASSERT(rhs != 0);
  ------------------
  |  |  924|  5.85k|    do { \
  |  |  925|  5.85k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  5.85k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.85k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  5.85k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 5.85k]
  |  |  ------------------
  ------------------
 2038|  5.85k|    IGRAPH_ASSERT(lhs->stor_begin != 0);
  ------------------
  |  |  924|  5.85k|    do { \
  |  |  925|  5.85k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  5.85k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.85k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  5.85k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 5.85k]
  |  |  ------------------
  ------------------
 2039|  5.85k|    IGRAPH_ASSERT(rhs->stor_begin != 0);
  ------------------
  |  |  924|  5.85k|    do { \
  |  |  925|  5.85k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  5.85k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.85k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  5.85k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 5.85k]
  |  |  ------------------
  ------------------
 2040|       |
 2041|  5.85k|    s = FUNCTION(igraph_vector, size)(lhs);
  ------------------
  |  |  170|  5.85k|        #define FUNCTION(a,c) CONCAT2(a,c)
  |  |  ------------------
  |  |  |  |   20|  5.85k|#define CONCAT2(a,b) CONCAT2x(a,b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|  5.85k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2042|  5.85k|    if (s != FUNCTION(igraph_vector, size)(rhs)) {
  ------------------
  |  |  170|  5.85k|        #define FUNCTION(a,c) CONCAT2(a,c)
  |  |  ------------------
  |  |  |  |   20|  5.85k|#define CONCAT2(a,b) CONCAT2x(a,b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|  5.85k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (2042:9): [True: 0, False: 5.85k]
  ------------------
 2043|      0|        return false;
 2044|  5.85k|    } else {
 2045|   216k|        for (i = 0; i < s; i++) {
  ------------------
  |  Branch (2045:21): [True: 210k, False: 5.85k]
  ------------------
 2046|   210k|            BASE l = VECTOR(*lhs)[i];
  ------------------
  |  |   29|   210k|    #define BASE igraph_real_t
  ------------------
                          BASE l = VECTOR(*lhs)[i];
  ------------------
  |  |   60|   210k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 2047|   210k|            BASE r = VECTOR(*rhs)[i];
  ------------------
  |  |   29|   210k|    #define BASE igraph_real_t
  ------------------
                          BASE r = VECTOR(*rhs)[i];
  ------------------
  |  |   60|   210k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 2048|   210k|            if (l > r) {
  ------------------
  |  Branch (2048:17): [True: 0, False: 210k]
  ------------------
 2049|      0|                return false;
 2050|      0|            }
 2051|   210k|        }
 2052|  5.85k|        return true;
 2053|  5.85k|    }
 2054|  5.85k|}
igraph_vector_scale:
 2258|  14.6k|void FUNCTION(igraph_vector, scale)(TYPE(igraph_vector) *v, BASE by) {
 2259|  14.6k|    const igraph_int_t n = FUNCTION(igraph_vector, size)(v);
  ------------------
  |  |  170|  14.6k|        #define FUNCTION(a,c) CONCAT2(a,c)
  |  |  ------------------
  |  |  |  |   20|  14.6k|#define CONCAT2(a,b) CONCAT2x(a,b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|  14.6k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2260|       |#ifdef EQ
 2261|       |    const BASE one = ONE;
 2262|       |    if (EQ(by, one)) {
 2263|       |        return;
 2264|       |    }
 2265|       |#else
 2266|  14.6k|    if (by == ONE) {
  ------------------
  |  |   39|  14.6k|    #define ONE 1.0
  ------------------
  |  Branch (2266:9): [True: 5.88k, False: 8.73k]
  ------------------
 2267|  5.88k|        return;
 2268|  5.88k|    }
 2269|  8.73k|#endif
 2270|   345k|    for (igraph_int_t i = 0; i < n; i++) {
  ------------------
  |  Branch (2270:30): [True: 336k, False: 8.73k]
  ------------------
 2271|       |#ifdef PROD
 2272|       |        PROD(VECTOR(*v)[i], VECTOR(*v)[i], by);
 2273|       |#else
 2274|   336k|        VECTOR(*v)[i] *= by;
  ------------------
  |  |   60|   336k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 2275|   336k|#endif
 2276|   336k|    }
 2277|  8.73k|}
igraph_vector_char_init:
  134|  1.46k|igraph_error_t FUNCTION(igraph_vector, init)(TYPE(igraph_vector) *v, igraph_int_t size) {
  135|  1.46k|    igraph_int_t alloc_size;
  136|  1.46k|    IGRAPH_ASSERT(size >= 0);
  ------------------
  |  |  924|  1.46k|    do { \
  |  |  925|  1.46k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
  137|  1.46k|    alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (137:18): [True: 1.46k, False: 1]
  ------------------
  138|       |
  139|       |    /* When this function fails, it should leave stor_begin set to NULL,
  140|       |     * so that vector_destroy() is still safe to call on the vector.
  141|       |     * This simplifies freeing partially initialized data structures,
  142|       |     * such as adjacency lists, when an error occurs mid-initialization. */
  143|  1.46k|    v->stor_begin = IGRAPH_CALLOC(alloc_size, BASE);
  ------------------
  |  |   33|  1.46k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  2.92k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 1.46k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 1.46k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 1.46k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  144|  1.46k|    IGRAPH_CHECK_OOM(v->stor_begin, "Insufficient memory to initialize vector.");
  ------------------
  |  |  709|  1.46k|    do { \
  |  |  710|  1.46k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
  145|  1.46k|    v->stor_end = v->stor_begin + alloc_size;
  146|  1.46k|    v->end = v->stor_begin + size;
  147|       |
  148|  1.46k|    return IGRAPH_SUCCESS;
  149|  1.46k|}
igraph_vector_char_destroy:
  408|  1.46k|void FUNCTION(igraph_vector, destroy)(TYPE(igraph_vector) *v) {
  409|  1.46k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  1.46k|    do { \
  |  |  925|  1.46k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
  410|       |    /* vector_init() will leave stor_begin set to NULL when it fails.
  411|       |     * We handle these cases gracefully. */
  412|  1.46k|    if (v->stor_begin != NULL) {
  ------------------
  |  Branch (412:9): [True: 1.46k, False: 0]
  ------------------
  413|  1.46k|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   36|  1.46k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  414|       |        v->stor_begin = NULL;
  415|  1.46k|    }
  416|  1.46k|}
igraph_vector_char_size:
  522|   125k|igraph_int_t FUNCTION(igraph_vector, size)(const TYPE(igraph_vector) *v) {
  523|   125k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|   125k|    do { \
  |  |  925|   125k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   125k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 125k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   125k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 125k]
  |  |  ------------------
  ------------------
  524|   125k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|   125k|    do { \
  |  |  925|   125k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   125k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 125k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   125k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 125k]
  |  |  ------------------
  ------------------
  525|   125k|    return v->end - v->stor_begin;
  526|   125k|}
igraph_vector_char_null:
  725|  62.7k|void FUNCTION(igraph_vector, null)(TYPE(igraph_vector) *v) {
  726|  62.7k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  62.7k|    do { \
  |  |  925|  62.7k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  62.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 62.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  62.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 62.7k]
  |  |  ------------------
  ------------------
  727|  62.7k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  62.7k|    do { \
  |  |  925|  62.7k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  62.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 62.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  62.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 62.7k]
  |  |  ------------------
  ------------------
  728|  62.7k|    if (FUNCTION(igraph_vector, size)(v) > 0) {
  ------------------
  |  |  178|  62.7k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  62.7k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  62.7k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (728:9): [True: 62.7k, False: 0]
  ------------------
  729|  62.7k|        memset(v->stor_begin, 0, sizeof(BASE) * FUNCTION(igraph_vector, size)(v));
  ------------------
  |  |  178|  62.7k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  62.7k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  62.7k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  730|  62.7k|    }
  731|  62.7k|}
igraph_vector_bool_init:
  134|  1.41k|igraph_error_t FUNCTION(igraph_vector, init)(TYPE(igraph_vector) *v, igraph_int_t size) {
  135|  1.41k|    igraph_int_t alloc_size;
  136|  1.41k|    IGRAPH_ASSERT(size >= 0);
  ------------------
  |  |  924|  1.41k|    do { \
  |  |  925|  1.41k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.41k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.41k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.41k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.41k]
  |  |  ------------------
  ------------------
  137|  1.41k|    alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (137:18): [True: 1.41k, False: 0]
  ------------------
  138|       |
  139|       |    /* When this function fails, it should leave stor_begin set to NULL,
  140|       |     * so that vector_destroy() is still safe to call on the vector.
  141|       |     * This simplifies freeing partially initialized data structures,
  142|       |     * such as adjacency lists, when an error occurs mid-initialization. */
  143|  1.41k|    v->stor_begin = IGRAPH_CALLOC(alloc_size, BASE);
  ------------------
  |  |   33|  1.41k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  2.83k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 1.41k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 1.41k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 1.41k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  144|  1.41k|    IGRAPH_CHECK_OOM(v->stor_begin, "Insufficient memory to initialize vector.");
  ------------------
  |  |  709|  1.41k|    do { \
  |  |  710|  1.41k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  1.41k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.41k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  1.41k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 1.41k]
  |  |  ------------------
  ------------------
  145|  1.41k|    v->stor_end = v->stor_begin + alloc_size;
  146|  1.41k|    v->end = v->stor_begin + size;
  147|       |
  148|  1.41k|    return IGRAPH_SUCCESS;
  149|  1.41k|}
igraph_vector_bool_destroy:
  408|  1.41k|void FUNCTION(igraph_vector, destroy)(TYPE(igraph_vector) *v) {
  409|  1.41k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  1.41k|    do { \
  |  |  925|  1.41k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  1.41k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.41k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  1.41k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 1.41k]
  |  |  ------------------
  ------------------
  410|       |    /* vector_init() will leave stor_begin set to NULL when it fails.
  411|       |     * We handle these cases gracefully. */
  412|  1.41k|    if (v->stor_begin != NULL) {
  ------------------
  |  Branch (412:9): [True: 1.41k, False: 0]
  ------------------
  413|  1.41k|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   36|  1.41k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  414|       |        v->stor_begin = NULL;
  415|  1.41k|    }
  416|  1.41k|}
igraph_vector_int_init:
  134|  2.29M|igraph_error_t FUNCTION(igraph_vector, init)(TYPE(igraph_vector) *v, igraph_int_t size) {
  135|  2.29M|    igraph_int_t alloc_size;
  136|  2.29M|    IGRAPH_ASSERT(size >= 0);
  ------------------
  |  |  924|  2.29M|    do { \
  |  |  925|  2.29M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.29M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.29M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.29M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.29M]
  |  |  ------------------
  ------------------
  137|  2.29M|    alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (137:18): [True: 488k, False: 1.80M]
  ------------------
  138|       |
  139|       |    /* When this function fails, it should leave stor_begin set to NULL,
  140|       |     * so that vector_destroy() is still safe to call on the vector.
  141|       |     * This simplifies freeing partially initialized data structures,
  142|       |     * such as adjacency lists, when an error occurs mid-initialization. */
  143|  2.29M|    v->stor_begin = IGRAPH_CALLOC(alloc_size, BASE);
  ------------------
  |  |   33|  2.29M|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  4.59M|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 2.29M, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 2.29M, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 2.29M, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  144|  2.29M|    IGRAPH_CHECK_OOM(v->stor_begin, "Insufficient memory to initialize vector.");
  ------------------
  |  |  709|  2.29M|    do { \
  |  |  710|  2.29M|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  2.29M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.29M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  2.29M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 2.29M]
  |  |  ------------------
  ------------------
  145|  2.29M|    v->stor_end = v->stor_begin + alloc_size;
  146|  2.29M|    v->end = v->stor_begin + size;
  147|       |
  148|  2.29M|    return IGRAPH_SUCCESS;
  149|  2.29M|}
igraph_vector_int_destroy:
  408|  2.29M|void FUNCTION(igraph_vector, destroy)(TYPE(igraph_vector) *v) {
  409|  2.29M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  2.29M|    do { \
  |  |  925|  2.29M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.29M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.29M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.29M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.29M]
  |  |  ------------------
  ------------------
  410|       |    /* vector_init() will leave stor_begin set to NULL when it fails.
  411|       |     * We handle these cases gracefully. */
  412|  2.29M|    if (v->stor_begin != NULL) {
  ------------------
  |  Branch (412:9): [True: 2.29M, False: 0]
  ------------------
  413|  2.29M|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   36|  2.29M|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  414|       |        v->stor_begin = NULL;
  415|  2.29M|    }
  416|  2.29M|}
igraph_vector_int_capacity:
  436|  4.86M|igraph_int_t FUNCTION(igraph_vector, capacity)(const TYPE(igraph_vector) *v) {
  437|  4.86M|    return v->stor_end - v->stor_begin;
  438|  4.86M|}
igraph_vector_int_reserve:
  468|  4.80M|igraph_error_t FUNCTION(igraph_vector, reserve)(TYPE(igraph_vector) *v, igraph_int_t capacity) {
  469|  4.80M|    igraph_int_t current_capacity;
  470|  4.80M|    BASE *tmp;
  ------------------
  |  |   66|  4.80M|    #define BASE igraph_int_t
  ------------------
  471|       |
  472|  4.80M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  4.80M|    do { \
  |  |  925|  4.80M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.80M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.80M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.80M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.80M]
  |  |  ------------------
  ------------------
  473|  4.80M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  4.80M|    do { \
  |  |  925|  4.80M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.80M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.80M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.80M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.80M]
  |  |  ------------------
  ------------------
  474|  4.80M|    IGRAPH_ASSERT(capacity >= 0);
  ------------------
  |  |  924|  4.80M|    do { \
  |  |  925|  4.80M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.80M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.80M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.80M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.80M]
  |  |  ------------------
  ------------------
  475|       |
  476|  4.80M|    current_capacity = FUNCTION(igraph_vector, capacity)(v);
  ------------------
  |  |  178|  4.80M|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  4.80M|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  4.80M|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  477|       |
  478|  4.80M|    if (capacity <= current_capacity) {
  ------------------
  |  Branch (478:9): [True: 4.62M, False: 177k]
  ------------------
  479|  4.62M|        return IGRAPH_SUCCESS;
  480|  4.62M|    }
  481|       |
  482|   177k|    tmp = IGRAPH_REALLOC(v->stor_begin, capacity, BASE);
  ------------------
  |  |   35|   177k|#define IGRAPH_REALLOC(p,n,t) IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, realloc((void*)(p), sizeof(t) * ((n) > 0 ? (n) : 1)))
  |  |  ------------------
  |  |  |  |   31|   354k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 177k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 177k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 177k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  483|   177k|    IGRAPH_CHECK_OOM(tmp, "Cannot reserve space for vector.");
  ------------------
  |  |  709|   177k|    do { \
  |  |  710|   177k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|   177k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 177k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|   177k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 177k]
  |  |  ------------------
  ------------------
  484|       |
  485|   177k|    v->end = tmp + (v->end - v->stor_begin);
  486|   177k|    v->stor_begin = tmp;
  487|   177k|    v->stor_end = v->stor_begin + capacity;
  488|       |
  489|   177k|    return IGRAPH_SUCCESS;
  490|   177k|}
igraph_vector_int_empty:
  503|  11.5k|igraph_bool_t FUNCTION(igraph_vector, empty)(const TYPE(igraph_vector) *v) {
  504|  11.5k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  11.5k|    do { \
  |  |  925|  11.5k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  11.5k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 11.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  11.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 11.5k]
  |  |  ------------------
  ------------------
  505|  11.5k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  11.5k|    do { \
  |  |  925|  11.5k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  11.5k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 11.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  11.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 11.5k]
  |  |  ------------------
  ------------------
  506|  11.5k|    return v->stor_begin == v->end;
  507|  11.5k|}
igraph_vector_int_size:
  522|  12.6M|igraph_int_t FUNCTION(igraph_vector, size)(const TYPE(igraph_vector) *v) {
  523|  12.6M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  12.6M|    do { \
  |  |  925|  12.6M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  12.6M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 12.6M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  12.6M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 12.6M]
  |  |  ------------------
  ------------------
  524|  12.6M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  12.6M|    do { \
  |  |  925|  12.6M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  12.6M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 12.6M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  12.6M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 12.6M]
  |  |  ------------------
  ------------------
  525|  12.6M|    return v->end - v->stor_begin;
  526|  12.6M|}
igraph_vector_int_clear:
  542|  3.50M|void FUNCTION(igraph_vector, clear)(TYPE(igraph_vector)* v) {
  543|  3.50M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  3.50M|    do { \
  |  |  925|  3.50M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  3.50M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.50M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  3.50M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 3.50M]
  |  |  ------------------
  ------------------
  544|  3.50M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  3.50M|    do { \
  |  |  925|  3.50M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  3.50M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 3.50M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  3.50M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 3.50M]
  |  |  ------------------
  ------------------
  545|  3.50M|    v->end = v->stor_begin;
  546|  3.50M|}
igraph_vector_int_push_back:
  573|  4.41M|igraph_error_t FUNCTION(igraph_vector, push_back)(TYPE(igraph_vector) *v, BASE e) {
  574|  4.41M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  4.41M|    do { \
  |  |  925|  4.41M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.41M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.41M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.41M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.41M]
  |  |  ------------------
  ------------------
  575|  4.41M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  4.41M|    do { \
  |  |  925|  4.41M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.41M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.41M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.41M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.41M]
  |  |  ------------------
  ------------------
  576|       |
  577|  4.41M|    if (v->stor_end == v->end) {
  ------------------
  |  Branch (577:9): [True: 116k, False: 4.29M]
  ------------------
  578|       |        /* full, allocate more storage */
  579|   116k|        igraph_int_t old_size = FUNCTION(igraph_vector, size)(v);
  ------------------
  |  |  178|   116k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|   116k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|   116k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  580|   116k|        igraph_int_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   72|   116k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
                      igraph_int_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   72|   116k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (580:33): [True: 116k, False: 0]
  ------------------
  581|   116k|        if (old_size == IGRAPH_INTEGER_MAX) {
  ------------------
  |  |   72|   116k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (581:13): [True: 0, False: 116k]
  ------------------
  582|      0|            IGRAPH_ERROR("Cannot push to vector, already at maximum size.", IGRAPH_EOVERFLOW);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  583|      0|        }
  584|   116k|        if (new_size == 0) {
  ------------------
  |  Branch (584:13): [True: 0, False: 116k]
  ------------------
  585|      0|            new_size = 1;
  586|      0|        }
  587|   116k|        IGRAPH_CHECK(FUNCTION(igraph_vector, reserve)(v, new_size));
  ------------------
  |  |  656|   116k|    do { \
  |  |  657|   116k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   116k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   116k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 116k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   116k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 116k]
  |  |  ------------------
  ------------------
  588|   116k|    }
  589|       |
  590|  4.41M|    *(v->end) = e;
  591|  4.41M|    v->end += 1;
  592|       |
  593|  4.41M|    return IGRAPH_SUCCESS;
  594|  4.41M|}
igraph_vector_int_null:
  725|  51.9k|void FUNCTION(igraph_vector, null)(TYPE(igraph_vector) *v) {
  726|  51.9k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  51.9k|    do { \
  |  |  925|  51.9k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  51.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 51.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  51.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 51.9k]
  |  |  ------------------
  ------------------
  727|  51.9k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  51.9k|    do { \
  |  |  925|  51.9k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  51.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 51.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  51.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 51.9k]
  |  |  ------------------
  ------------------
  728|  51.9k|    if (FUNCTION(igraph_vector, size)(v) > 0) {
  ------------------
  |  |  178|  51.9k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  51.9k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  51.9k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (728:9): [True: 51.9k, False: 17]
  ------------------
  729|  51.9k|        memset(v->stor_begin, 0, sizeof(BASE) * FUNCTION(igraph_vector, size)(v));
  ------------------
  |  |  178|  51.9k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  51.9k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  51.9k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  730|  51.9k|    }
  731|  51.9k|}
igraph_vector_int_fill:
  745|  2.92k|void FUNCTION(igraph_vector, fill)(TYPE(igraph_vector) *v, BASE e) {
  746|  2.92k|    BASE *ptr;
  ------------------
  |  |   66|  2.92k|    #define BASE igraph_int_t
  ------------------
  747|  2.92k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  2.92k|    do { \
  |  |  925|  2.92k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.92k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.92k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.92k]
  |  |  ------------------
  ------------------
  748|  2.92k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  2.92k|    do { \
  |  |  925|  2.92k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  2.92k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  2.92k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 2.92k]
  |  |  ------------------
  ------------------
  749|       |
  750|       |    /* Optimize the commonly used integer case when filling with 0
  751|       |     * or -1, which are an all-0 and all-1 bit pattern that the
  752|       |     * compiler can generate higher efficiency code for. */
  753|  2.92k|#if defined(BASE_INT)
  754|  2.92k|    if (e == 0) {
  ------------------
  |  Branch (754:9): [True: 0, False: 2.92k]
  ------------------
  755|      0|        FUNCTION(igraph_vector, null)(v);
  ------------------
  |  |  178|      0|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|      0|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|      0|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  756|      0|        return;
  757|      0|    }
  758|  2.92k|    if (e == -1) {
  ------------------
  |  Branch (758:9): [True: 2.92k, False: 0]
  ------------------
  759|   128k|        for (ptr = v->stor_begin; ptr < v->end; ptr++) {
  ------------------
  |  Branch (759:35): [True: 125k, False: 2.92k]
  ------------------
  760|   125k|            *ptr = -1;
  761|   125k|        }
  762|  2.92k|        return;
  763|  2.92k|    }
  764|      0|#endif
  765|       |
  766|      0|    for (ptr = v->stor_begin; ptr < v->end; ptr++) {
  ------------------
  |  Branch (766:31): [True: 0, False: 0]
  ------------------
  767|      0|        *ptr = e;
  768|      0|    }
  769|      0|}
igraph_vector_int_tail:
  819|   121k|BASE FUNCTION(igraph_vector, tail)(const TYPE(igraph_vector) *v) {
  820|   121k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|   121k|    do { \
  |  |  925|   121k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   121k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 121k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   121k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 121k]
  |  |  ------------------
  ------------------
  821|   121k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|   121k|    do { \
  |  |  925|   121k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   121k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 121k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   121k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 121k]
  |  |  ------------------
  ------------------
  822|   121k|    return *((v->end) - 1);
  823|   121k|}
igraph_vector_int_pop_back:
  838|   206k|BASE FUNCTION(igraph_vector, pop_back)(TYPE(igraph_vector) *v) {
  839|   206k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|   206k|    do { \
  |  |  925|   206k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   206k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 206k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   206k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 206k]
  |  |  ------------------
  ------------------
  840|   206k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|   206k|    do { \
  |  |  925|   206k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   206k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 206k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   206k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 206k]
  |  |  ------------------
  ------------------
  841|   206k|    IGRAPH_ASSERT(v->end != NULL);
  ------------------
  |  |  924|   206k|    do { \
  |  |  925|   206k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   206k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 206k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   206k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 206k]
  |  |  ------------------
  ------------------
  842|   206k|    IGRAPH_ASSERT(v->end != v->stor_begin);
  ------------------
  |  |  924|   206k|    do { \
  |  |  925|   206k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   206k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 206k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|   206k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 206k]
  |  |  ------------------
  ------------------
  843|       |
  844|   206k|    (v->end)--;
  845|       |
  846|   206k|    return *(v->end);
  847|   206k|}
igraph_vector_int_resize:
 1264|  4.66M|igraph_error_t FUNCTION(igraph_vector, resize)(TYPE(igraph_vector)* v, igraph_int_t new_size) {
 1265|  4.66M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  4.66M|    do { \
  |  |  925|  4.66M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.66M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.66M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.66M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.66M]
  |  |  ------------------
  ------------------
 1266|  4.66M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  4.66M|    do { \
  |  |  925|  4.66M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  4.66M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.66M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  4.66M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 4.66M]
  |  |  ------------------
  ------------------
 1267|  4.66M|    IGRAPH_CHECK(FUNCTION(igraph_vector, reserve)(v, new_size));
  ------------------
  |  |  656|  4.66M|    do { \
  |  |  657|  4.66M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.66M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.66M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.66M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  4.66M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.66M]
  |  |  ------------------
  ------------------
 1268|  4.66M|    v->end = v->stor_begin + new_size;
 1269|  4.66M|    return IGRAPH_SUCCESS;
 1270|  4.66M|}
igraph_vector_int_max:
 1327|  11.5k|BASE FUNCTION(igraph_vector, max)(const TYPE(igraph_vector) *v) {
 1328|  11.5k|    BASE max;
  ------------------
  |  |   66|  11.5k|    #define BASE igraph_int_t
  ------------------
 1329|  11.5k|    BASE *ptr;
  ------------------
  |  |   66|  11.5k|    #define BASE igraph_int_t
  ------------------
 1330|  11.5k|    IGRAPH_ASSERT(!FUNCTION(igraph_vector, empty)(v));
  ------------------
  |  |  924|  11.5k|    do { \
  |  |  925|  11.5k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  11.5k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 11.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  11.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 11.5k]
  |  |  ------------------
  ------------------
 1331|  11.5k|    max = *(v->stor_begin);
 1332|       |#if defined(BASE_IGRAPH_REAL)
 1333|       |    if (isnan(max)) { return max; }; /* Result is NaN */
 1334|       |#endif
 1335|  11.5k|    ptr = v->stor_begin + 1;
 1336|   491k|    while (ptr < v->end) {
  ------------------
  |  Branch (1336:12): [True: 480k, False: 11.5k]
  ------------------
 1337|   480k|        if ((*ptr) > max) {
  ------------------
  |  Branch (1337:13): [True: 29.0k, False: 451k]
  ------------------
 1338|  29.0k|            max = *ptr;
 1339|  29.0k|        }
 1340|       |#if defined(BASE_IGRAPH_REAL)
 1341|       |        else if (isnan(*ptr))
 1342|       |            return *ptr; /* Result is NaN */
 1343|       |#endif
 1344|   480k|        ptr++;
 1345|   480k|    }
 1346|  11.5k|    return max;
 1347|  11.5k|}
igraph_vector_int_init_range:
 1686|  1.46k|igraph_error_t FUNCTION(igraph_vector, init_range)(TYPE(igraph_vector) *v, BASE start, BASE end) {
 1687|  1.46k|    BASE *p;
  ------------------
  |  |   66|  1.46k|    #define BASE igraph_int_t
  ------------------
 1688|  1.46k|    IGRAPH_CHECK(FUNCTION(igraph_vector, init)(v, (end - start)));
  ------------------
  |  |  656|  1.46k|    do { \
  |  |  657|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
 1689|       |
 1690|  64.2k|    for (p = v->stor_begin; p < v->end; p++) {
  ------------------
  |  Branch (1690:29): [True: 62.7k, False: 1.46k]
  ------------------
 1691|  62.7k|        *p = start;
 1692|  62.7k|        start = start + ONE;
  ------------------
  |  |   72|  62.7k|    #define ONE 1
  ------------------
 1693|  62.7k|    }
 1694|       |
 1695|  1.46k|    return IGRAPH_SUCCESS;
 1696|  1.46k|}
igraph_vector_int_remove_fast:
 1776|  85.4k|void FUNCTION(igraph_vector, remove_fast)(TYPE(igraph_vector) *v, igraph_int_t elem) {
 1777|  85.4k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  85.4k|    do { \
  |  |  925|  85.4k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  85.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 85.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  85.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 85.4k]
  |  |  ------------------
  ------------------
 1778|  85.4k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  85.4k|    do { \
  |  |  925|  85.4k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  85.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 85.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  85.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 85.4k]
  |  |  ------------------
  ------------------
 1779|       |
 1780|  85.4k|    igraph_int_t len = FUNCTION(igraph_vector, size)(v);
  ------------------
  |  |  178|  85.4k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  85.4k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  85.4k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1781|  85.4k|    VECTOR(*v)[elem] = VECTOR(*v)[len - 1];
  ------------------
  |  |   60|  85.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                  VECTOR(*v)[elem] = VECTOR(*v)[len - 1];
  ------------------
  |  |   60|  85.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1782|  85.4k|    FUNCTION(igraph_vector, pop_back)(v);
  ------------------
  |  |  178|  85.4k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  85.4k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  85.4k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1783|  85.4k|}
igraph_vector_int_isininterval:
 1832|  9.41k|        BASE high) {
 1833|  9.41k|    BASE *ptr;
  ------------------
  |  |   66|  9.41k|    #define BASE igraph_int_t
  ------------------
 1834|  9.41k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  924|  9.41k|    do { \
  |  |  925|  9.41k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  9.41k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.41k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  9.41k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 9.41k]
  |  |  ------------------
  ------------------
 1835|  9.41k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  924|  9.41k|    do { \
  |  |  925|  9.41k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  9.41k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 9.41k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  9.41k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 9.41k]
  |  |  ------------------
  ------------------
 1836|   559k|    for (ptr = v->stor_begin; ptr < v->end; ptr++) {
  ------------------
  |  Branch (1836:31): [True: 549k, False: 9.41k]
  ------------------
 1837|       |        /* Note that the following is not equivalent to *ptr < low || *ptr > high
 1838|       |         * when *ptr is NaN! */
 1839|   549k|        if (!(*ptr >= low && *ptr <= high)) {
  ------------------
  |  Branch (1839:15): [True: 549k, False: 0]
  |  Branch (1839:30): [True: 549k, False: 0]
  ------------------
 1840|      0|            return 0;
 1841|      0|        }
 1842|   549k|    }
 1843|  9.41k|    return 1;
 1844|  9.41k|}
igraph_vector_int_search:
 2364|  31.7k|        igraph_int_t from, BASE what, igraph_int_t *pos) {
 2365|  31.7k|    igraph_int_t i, n = FUNCTION(igraph_vector, size)(v);
  ------------------
  |  |  178|  31.7k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  31.7k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  31.7k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2366|   214k|    for (i = from; i < n; i++) {
  ------------------
  |  Branch (2366:20): [True: 214k, False: 0]
  ------------------
 2367|       |#ifdef EQ
 2368|       |        if (EQ(VECTOR(*v)[i], what)) {
 2369|       |            break;
 2370|       |        }
 2371|       |#else
 2372|   214k|        if (VECTOR(*v)[i] == what) {
  ------------------
  |  |   60|   214k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (2372:13): [True: 31.7k, False: 182k]
  ------------------
 2373|  31.7k|            break;
 2374|  31.7k|        }
 2375|   214k|#endif
 2376|   214k|    }
 2377|       |
 2378|  31.7k|    if (i < n) {
  ------------------
  |  Branch (2378:9): [True: 31.7k, False: 0]
  ------------------
 2379|  31.7k|        if (pos != 0) {
  ------------------
  |  Branch (2379:13): [True: 31.7k, False: 0]
  ------------------
 2380|  31.7k|            *pos = i;
 2381|  31.7k|        }
 2382|  31.7k|        return true;
 2383|  31.7k|    } else {
 2384|       |        return false;
 2385|      0|    }
 2386|  31.7k|}
igraph_vector_int_append:
 2427|  62.7k|                                               const TYPE(igraph_vector) *from) {
 2428|  62.7k|    IGRAPH_ASSERT(to != NULL);
  ------------------
  |  |  924|  62.7k|    do { \
  |  |  925|  62.7k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  62.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 62.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  62.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 62.7k]
  |  |  ------------------
  ------------------
 2429|  62.7k|    IGRAPH_ASSERT(to->stor_begin != NULL);
  ------------------
  |  |  924|  62.7k|    do { \
  |  |  925|  62.7k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  62.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 62.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  62.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 62.7k]
  |  |  ------------------
  ------------------
 2430|       |
 2431|  62.7k|    const igraph_int_t to_size = FUNCTION(igraph_vector, size)(to);
  ------------------
  |  |  178|  62.7k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  62.7k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  62.7k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2432|  62.7k|    const igraph_int_t from_size = FUNCTION(igraph_vector, size)(from);
  ------------------
  |  |  178|  62.7k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  62.7k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  62.7k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2433|  62.7k|    const igraph_int_t to_capacity = FUNCTION(igraph_vector, capacity)(to);
  ------------------
  |  |  178|  62.7k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  62.7k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  62.7k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2434|  62.7k|    igraph_int_t new_to_size;
 2435|       |
 2436|  62.7k|    IGRAPH_SAFE_ADD(to_size, from_size, &new_to_size);
  ------------------
  |  |   47|  62.7k|    do { \
  |  |   48|  62.7k|        igraph_int_t _safe_a = (a), _safe_b = (b); \
  |  |   49|  62.7k|        igraph_int_t _safe_sum; \
  |  |   50|  62.7k|        if (__builtin_add_overflow(_safe_a, _safe_b, &_safe_sum)) { \
  |  |  ------------------
  |  |  |  Branch (50:13): [True: 0, False: 62.7k]
  |  |  ------------------
  |  |   51|      0|            IGRAPH_ERRORF("Overflow when adding %" IGRAPH_PRId " and %" IGRAPH_PRId ".", IGRAPH_EOVERFLOW, _safe_a, _safe_b); \
  |  |  ------------------
  |  |  |  |  464|      0|    do { \
  |  |  |  |  465|      0|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  |  |  466|      0|                      igraph_errno, __VA_ARGS__) ; \
  |  |  |  |  467|      0|        return igraph_errno; \
  |  |  |  |  468|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (468:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|        } \
  |  |   53|  62.7k|        *(res) = _safe_sum; \
  |  |   54|  62.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (54:14): [Folded, False: 62.7k]
  |  |  ------------------
  ------------------
 2437|       |
 2438|  62.7k|    if (to_capacity < new_to_size) {
  ------------------
  |  Branch (2438:9): [True: 0, False: 62.7k]
  ------------------
 2439|      0|        igraph_int_t new_to_capacity = to_capacity < IGRAPH_INTEGER_MAX/2 ? to_capacity * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   72|      0|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
                      igraph_int_t new_to_capacity = to_capacity < IGRAPH_INTEGER_MAX/2 ? to_capacity * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   72|      0|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (2439:40): [True: 0, False: 0]
  ------------------
 2440|      0|        if (new_to_capacity < new_to_size) {
  ------------------
  |  Branch (2440:13): [True: 0, False: 0]
  ------------------
 2441|      0|            new_to_capacity = new_to_size;
 2442|      0|        }
 2443|      0|        IGRAPH_CHECK(FUNCTION(igraph_vector, reserve)(to, new_to_capacity));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2444|      0|    }
 2445|       |
 2446|  62.7k|    memcpy(to->stor_begin + to_size, from->stor_begin,
 2447|  62.7k|           sizeof(BASE) * from_size);
 2448|  62.7k|    to->end = to->stor_begin + new_to_size;
 2449|       |
 2450|  62.7k|    return IGRAPH_SUCCESS;
 2451|  62.7k|}
igraph_vector_int_update:
 2524|  1.46k|                                    const TYPE(igraph_vector) *from) {
 2525|  1.46k|    igraph_int_t n = FUNCTION(igraph_vector, size)(from);
  ------------------
  |  |  178|  1.46k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  1.46k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  1.46k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2526|  1.46k|    IGRAPH_CHECK(FUNCTION(igraph_vector, resize)(to, n));
  ------------------
  |  |  656|  1.46k|    do { \
  |  |  657|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
 2527|  1.46k|    memcpy(to->stor_begin, from->stor_begin, sizeof(BASE)*n);
 2528|  1.46k|    return IGRAPH_SUCCESS;
 2529|  1.46k|}
igraph_vector_int_intersect_sorted:
 3054|  19.2k|        const TYPE(igraph_vector) *v2, TYPE(igraph_vector) *result) {
 3055|  19.2k|    igraph_int_t size1, size2;
 3056|  19.2k|    igraph_real_t r;
 3057|       |
 3058|  19.2k|    size1 = FUNCTION(igraph_vector, size)(v1);
  ------------------
  |  |  178|  19.2k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  19.2k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  19.2k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3059|  19.2k|    size2 = FUNCTION(igraph_vector, size)(v2);
  ------------------
  |  |  178|  19.2k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  19.2k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  19.2k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3060|       |
 3061|  19.2k|    FUNCTION(igraph_vector, clear)(result);
  ------------------
  |  |  178|  19.2k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  19.2k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  19.2k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3062|       |
 3063|  19.2k|    if (size1 == 0 || size2 == 0) {
  ------------------
  |  Branch (3063:9): [True: 0, False: 19.2k]
  |  Branch (3063:23): [True: 0, False: 19.2k]
  ------------------
 3064|      0|        return IGRAPH_SUCCESS;
 3065|      0|    }
 3066|       |
 3067|  19.2k|    r = size1 > size2 ? (igraph_real_t) size1 / size2 : (igraph_real_t) size2 / size1;
  ------------------
  |  Branch (3067:9): [True: 0, False: 19.2k]
  ------------------
 3068|       |
 3069|       |    /* When the set size ratio is small, use a simple linear scan. See comments in
 3070|       |     * igraph_vector_intersection_size_sorted() for the justification of this r threshold. */
 3071|  19.2k|    if (r < 10) {
  ------------------
  |  Branch (3071:9): [True: 16.7k, False: 2.58k]
  ------------------
 3072|  16.7k|        igraph_int_t i1 = 0, i2 = 0;
 3073|   211k|        while (i1 < size1 && i2 < size2) {
  ------------------
  |  Branch (3073:16): [True: 198k, False: 13.7k]
  |  Branch (3073:30): [True: 195k, False: 2.98k]
  ------------------
 3074|   195k|            BASE e1 = VECTOR(*v1)[i1], e2 = VECTOR(*v2)[i2];
  ------------------
  |  |   66|   195k|    #define BASE igraph_int_t
  ------------------
                          BASE e1 = VECTOR(*v1)[i1], e2 = VECTOR(*v2)[i2];
  ------------------
  |  |   60|   195k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          BASE e1 = VECTOR(*v1)[i1], e2 = VECTOR(*v2)[i2];
  ------------------
  |  |   60|   195k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 3075|   195k|            if (e1 < e2) {
  ------------------
  |  Branch (3075:17): [True: 36.7k, False: 158k]
  ------------------
 3076|  36.7k|                i1++;
 3077|   158k|            } else if (e1 > e2) {
  ------------------
  |  Branch (3077:24): [True: 96.3k, False: 61.9k]
  ------------------
 3078|  96.3k|                i2++;
 3079|  96.3k|            } else {
 3080|  61.9k|                i1++; i2++;
 3081|  61.9k|                IGRAPH_CHECK(FUNCTION(igraph_vector, push_back)(result, e1));
  ------------------
  |  |  656|  61.9k|    do { \
  |  |  657|  61.9k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  61.9k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  61.9k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 61.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  61.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 61.9k]
  |  |  ------------------
  ------------------
 3082|  61.9k|            }
 3083|   195k|        }
 3084|  16.7k|    } else {
 3085|  2.58k|        IGRAPH_CHECK(FUNCTION(igraph_i_vector, intersect_sorted)(
  ------------------
  |  |  656|  2.58k|    do { \
  |  |  657|  2.58k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.58k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.58k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.58k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.58k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.58k]
  |  |  ------------------
  ------------------
 3086|  2.58k|                         v1, 0, size1, v2, 0, size2, result));
 3087|  2.58k|    }
 3088|  19.2k|    return IGRAPH_SUCCESS;
 3089|  19.2k|}
vector.c:igraph_i_vector_int_binsearch_slice:
 2183|  5.24k|        BASE what, igraph_int_t *pos, igraph_int_t start, igraph_int_t end) {
 2184|  5.24k|    igraph_int_t left  = start;
 2185|  5.24k|    igraph_int_t right = end - 1;
 2186|       |
 2187|  22.1k|    while (left <= right) {
  ------------------
  |  Branch (2187:12): [True: 20.0k, False: 2.10k]
  ------------------
 2188|       |        /* (right + left) / 2 could theoretically overflow for long vectors */
 2189|  20.0k|        igraph_int_t middle = left + ((right - left) >> 1);
 2190|  20.0k|        if (VECTOR(*v)[middle] > what) {
  ------------------
  |  |   60|  20.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (2190:13): [True: 10.5k, False: 9.45k]
  ------------------
 2191|  10.5k|            right = middle - 1;
 2192|  10.5k|        } else if (VECTOR(*v)[middle] < what) {
  ------------------
  |  |   60|  9.45k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (2192:20): [True: 6.31k, False: 3.13k]
  ------------------
 2193|  6.31k|            left = middle + 1;
 2194|  6.31k|        } else {
 2195|  3.13k|            if (pos != 0) {
  ------------------
  |  Branch (2195:17): [True: 3.13k, False: 0]
  ------------------
 2196|  3.13k|                *pos = middle;
 2197|  3.13k|            }
 2198|  3.13k|            return true;
 2199|  3.13k|        }
 2200|  20.0k|    }
 2201|       |
 2202|       |    /* if we are here, the element was not found */
 2203|  2.10k|    if (pos != 0) {
  ------------------
  |  Branch (2203:9): [True: 2.10k, False: 0]
  ------------------
 2204|  2.10k|        *pos = left;
 2205|  2.10k|    }
 2206|       |
 2207|       |    return false;
 2208|  5.24k|}
vector.c:igraph_i_vector_int_intersect_sorted:
 2977|  13.0k|    TYPE(igraph_vector) *result) {
 2978|  13.0k|    igraph_int_t size1, size2, probe1, probe2;
 2979|       |
 2980|  13.0k|    if (begin1 == end1 || begin2 == end2) {
  ------------------
  |  Branch (2980:9): [True: 6.95k, False: 6.11k]
  |  Branch (2980:27): [True: 869, False: 5.24k]
  ------------------
 2981|  7.82k|        return IGRAPH_SUCCESS;
 2982|  7.82k|    }
 2983|       |
 2984|  5.24k|    size1 = end1 - begin1;
 2985|  5.24k|    size2 = end2 - begin2;
 2986|       |
 2987|  5.24k|    if (size1 < size2) {
  ------------------
  |  Branch (2987:9): [True: 4.36k, False: 882]
  ------------------
 2988|  4.36k|        probe1 = begin1 + (size1 >> 1);      /* pick the median element */
 2989|  4.36k|        FUNCTION(igraph_i_vector, binsearch_slice)(v2, VECTOR(*v1)[probe1], &probe2, begin2, end2);
  ------------------
  |  |  178|  4.36k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|  4.36k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|  4.36k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      FUNCTION(igraph_i_vector, binsearch_slice)(v2, VECTOR(*v1)[probe1], &probe2, begin2, end2);
  ------------------
  |  |   60|  4.36k|#define VECTOR(v) ((v).stor_begin)
  ------------------
 2990|  4.36k|        IGRAPH_CHECK(FUNCTION(igraph_i_vector, intersect_sorted)(
  ------------------
  |  |  656|  4.36k|    do { \
  |  |  657|  4.36k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.36k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.36k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  4.36k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.36k]
  |  |  ------------------
  ------------------
 2991|  4.36k|            v1, begin1, probe1, v2, begin2, probe2, result
 2992|  4.36k|        ));
 2993|  4.36k|        if (!(probe2 == end2 || VECTOR(*v1)[probe1] < VECTOR(*v2)[probe2])) {
  ------------------
  |  |   60|  4.03k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      if (!(probe2 == end2 || VECTOR(*v1)[probe1] < VECTOR(*v2)[probe2])) {
  ------------------
  |  |   60|  4.03k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (2993:15): [True: 331, False: 4.03k]
  |  Branch (2993:33): [True: 1.50k, False: 2.52k]
  ------------------
 2994|  2.52k|            IGRAPH_CHECK(FUNCTION(igraph_vector, push_back)(result, VECTOR(*v2)[probe2]));
  ------------------
  |  |  656|  2.52k|    do { \
  |  |  657|  2.52k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  2.52k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  2.52k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.52k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  2.52k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 2.52k]
  |  |  ------------------
  ------------------
 2995|  2.52k|            probe2++;
 2996|  2.52k|        }
 2997|  4.36k|        IGRAPH_CHECK(FUNCTION(igraph_i_vector, intersect_sorted)(
  ------------------
  |  |  656|  4.36k|    do { \
  |  |  657|  4.36k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  4.36k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  4.36k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 4.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  4.36k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 4.36k]
  |  |  ------------------
  ------------------
 2998|  4.36k|            v1, probe1 + 1, end1, v2, probe2, end2, result
 2999|  4.36k|        ));
 3000|  4.36k|    } else {
 3001|    882|        probe2 = begin2 + (size2 >> 1);      /* pick the median element */
 3002|    882|        FUNCTION(igraph_i_vector, binsearch_slice)(v1, VECTOR(*v2)[probe2], &probe1, begin1, end1);
  ------------------
  |  |  178|    882|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   22|    882|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   21|    882|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      FUNCTION(igraph_i_vector, binsearch_slice)(v1, VECTOR(*v2)[probe2], &probe1, begin1, end1);
  ------------------
  |  |   60|    882|#define VECTOR(v) ((v).stor_begin)
  ------------------
 3003|    882|        IGRAPH_CHECK(FUNCTION(igraph_i_vector, intersect_sorted)(
  ------------------
  |  |  656|    882|    do { \
  |  |  657|    882|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    882|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    882|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 882]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    882|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 882]
  |  |  ------------------
  ------------------
 3004|    882|            v1, begin1, probe1, v2, begin2, probe2, result
 3005|    882|        ));
 3006|    882|        if (!(probe1 == end1 || VECTOR(*v2)[probe2] < VECTOR(*v1)[probe1])) {
  ------------------
  |  |   60|    667|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      if (!(probe1 == end1 || VECTOR(*v2)[probe2] < VECTOR(*v1)[probe1])) {
  ------------------
  |  |   60|    667|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (3006:15): [True: 215, False: 667]
  |  Branch (3006:33): [True: 50, False: 617]
  ------------------
 3007|    617|            IGRAPH_CHECK(FUNCTION(igraph_vector, push_back)(result, VECTOR(*v2)[probe2]));
  ------------------
  |  |  656|    617|    do { \
  |  |  657|    617|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    617|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    617|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 617]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    617|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 617]
  |  |  ------------------
  ------------------
 3008|    617|            probe1++;
 3009|    617|        }
 3010|    882|        IGRAPH_CHECK(FUNCTION(igraph_i_vector, intersect_sorted)(
  ------------------
  |  |  656|    882|    do { \
  |  |  657|    882|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|    882|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|    882|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 882]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|    882|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 882]
  |  |  ------------------
  ------------------
 3011|    882|            v1, probe1, end1, v2, probe2 + 1, end2, result
 3012|    882|        ));
 3013|    882|    }
 3014|       |
 3015|  5.24k|    return IGRAPH_SUCCESS;
 3016|  5.24k|}

igraph_adjlist_init:
  155|  24.7k|                        igraph_bool_t multiple) {
  156|       |
  157|  24.7k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  158|  24.7k|    igraph_vector_int_t degrees;
  159|  24.7k|    int iter = 0;
  160|       |
  161|  24.7k|    multiple = !!multiple; /* normalize Boolean value to enable == comparisons below */
  162|       |
  163|  24.7k|    if (mode != IGRAPH_IN && mode != IGRAPH_OUT && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (163:9): [True: 23.2k, False: 1.46k]
  |  Branch (163:30): [True: 14.5k, False: 8.65k]
  |  Branch (163:52): [True: 0, False: 14.5k]
  ------------------
  164|      0|        IGRAPH_ERROR("Cannot create adjacency list view.", IGRAPH_EINVMODE);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  165|      0|    }
  166|       |
  167|  24.7k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (167:9): [True: 2.87k, False: 21.8k]
  ------------------
  168|  2.87k|        mode = IGRAPH_ALL;
  169|  2.87k|    }
  170|       |
  171|  24.7k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&degrees, no_of_nodes);
  ------------------
  |  |  119|  24.7k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  24.7k|    do { \
  |  |  |  |  657|  24.7k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  24.7k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  24.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 24.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  24.7k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 24.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  24.7k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  24.7k|    do { \
  |  |  |  |  604|  24.7k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  24.7k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  24.7k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  24.7k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 24.7k]
  |  |  |  |  ------------------
  |  |  |  |  608|  24.7k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  24.7k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 24.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 24.7k]
  |  |  ------------------
  ------------------
  172|       |    /* igraph_degree() is fast when loops=true */
  173|  24.7k|    IGRAPH_CHECK(igraph_degree(graph, &degrees, igraph_vss_all(), mode, IGRAPH_LOOPS));
  ------------------
  |  |  656|  24.7k|    do { \
  |  |  657|  24.7k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  24.7k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  24.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 24.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  24.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 24.7k]
  |  |  ------------------
  ------------------
  174|       |
  175|  24.7k|    al->length = no_of_nodes;
  176|  24.7k|    al->adjs = IGRAPH_CALLOC(al->length, igraph_vector_int_t);
  ------------------
  |  |   33|  24.7k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  49.4k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 24.7k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 24.7k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 24.6k, False: 11]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  177|  24.7k|    IGRAPH_CHECK_OOM(al->adjs, "Insufficient memory for creating adjacency list view.");
  ------------------
  |  |  709|  24.7k|    do { \
  |  |  710|  24.7k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  24.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 24.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  24.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 24.7k]
  |  |  ------------------
  ------------------
  178|  24.7k|    IGRAPH_FINALLY(igraph_adjlist_destroy, al);
  ------------------
  |  |  603|  24.7k|    do { \
  |  |  604|  24.7k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  24.7k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  24.7k|         * incorrect destructor function with the pointer */ \
  |  |  607|  24.7k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 24.7k]
  |  |  ------------------
  |  |  608|  24.7k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  24.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 24.7k]
  |  |  ------------------
  ------------------
  179|       |
  180|       |    /* if we already know there are no multi-edges, they don't need to be removed */
  181|  24.7k|    if (igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_MULTI) &&
  ------------------
  |  Branch (181:9): [True: 6.21k, False: 18.4k]
  ------------------
  182|  6.21k|        !igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_HAS_MULTI)) {
  ------------------
  |  Branch (182:9): [True: 6.21k, False: 0]
  ------------------
  183|       |
  184|       |        /* special case: if the graph is directed, but we are ignoring edge directions,
  185|       |         * mutual edges also act as multi-edges */
  186|  6.21k|        if (igraph_is_directed(graph) && mode == IGRAPH_ALL) {
  ------------------
  |  Branch (186:13): [True: 3.33k, False: 2.87k]
  |  Branch (186:42): [True: 3.33k, False: 0]
  ------------------
  187|  3.33k|            if (igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_MUTUAL) &&
  ------------------
  |  Branch (187:17): [True: 0, False: 3.33k]
  ------------------
  188|      0|                !igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_HAS_MUTUAL)) {
  ------------------
  |  Branch (188:17): [True: 0, False: 0]
  ------------------
  189|      0|                multiple = IGRAPH_MULTIPLE;
  190|      0|            }
  191|  3.33k|        } else {
  192|  2.87k|            multiple = IGRAPH_MULTIPLE;
  193|  2.87k|        }
  194|  6.21k|    }
  195|       |
  196|       |    /* if we already know there are no loops, they don't need to be removed */
  197|  24.7k|    if (igraph_i_property_cache_has(graph, IGRAPH_PROP_HAS_LOOP) &&
  ------------------
  |  Branch (197:9): [True: 21.7k, False: 2.92k]
  ------------------
  198|  21.7k|        !igraph_i_property_cache_get_bool(graph, IGRAPH_PROP_HAS_LOOP)) {
  ------------------
  |  Branch (198:9): [True: 16.4k, False: 5.35k]
  ------------------
  199|  16.4k|        if (mode == IGRAPH_ALL) {
  ------------------
  |  Branch (199:13): [True: 8.78k, False: 7.64k]
  ------------------
  200|  8.78k|            loops = IGRAPH_LOOPS_TWICE;
  201|  8.78k|        } else {
  202|  7.64k|            loops = IGRAPH_LOOPS_ONCE;
  203|  7.64k|        }
  204|  16.4k|    }
  205|       |
  206|  24.7k|    igraph_bool_t has_loops = false;
  207|  24.7k|    igraph_bool_t has_multiple = false;
  208|       |
  209|       |    /* In theory, we could just run igraph_neighbors() in a loop with 'loops'
  210|       |     * and 'multiple' set exactly how the caller wants it. However, we take the
  211|       |     * opportunity to also _cache_ whether the graph has multiple or loop edges
  212|       |     * if we are looping over all vertices anyway, and that requires us to query
  213|       |     * the neighbors in full */
  214|       |
  215|  1.08M|    for (igraph_int_t i = 0; i < al->length; i++) {
  ------------------
  |  Branch (215:30): [True: 1.06M, False: 24.7k]
  ------------------
  216|  1.06M|        IGRAPH_ALLOW_INTERRUPTION_LIMITED(iter, 1000);
  ------------------
  |  |   71|  1.06M|    do { \
  |  |   72|  1.06M|        if (++iter >= skips) { \
  |  |  ------------------
  |  |  |  Branch (72:13): [True: 0, False: 1.06M]
  |  |  ------------------
  |  |   73|      0|            IGRAPH_ALLOW_INTERRUPTION(); \
  |  |  ------------------
  |  |  |  |   46|      0|    do { \
  |  |  |  |   47|      0|        if (igraph_i_interruption_handler) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (47:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |  |  |   50|      0|            } \
  |  |  |  |   51|      0|        } \
  |  |  |  |   52|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   74|      0|            iter = 0; \
  |  |   75|      0|        } \
  |  |   76|  1.06M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (76:14): [Folded, False: 1.06M]
  |  |  ------------------
  ------------------
  217|       |
  218|  1.06M|        IGRAPH_CHECK(igraph_vector_int_init(&al->adjs[i], VECTOR(degrees)[i]));
  ------------------
  |  |  656|  1.06M|    do { \
  |  |  657|  1.06M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.06M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.06M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.06M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.06M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.06M]
  |  |  ------------------
  ------------------
  219|  1.06M|        IGRAPH_CHECK(igraph_neighbors(graph, &al->adjs[i], i, mode, IGRAPH_LOOPS, IGRAPH_MULTIPLE));
  ------------------
  |  |  656|  1.06M|    do { \
  |  |  657|  1.06M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.06M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.06M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.06M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.06M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.06M]
  |  |  ------------------
  ------------------
  220|       |
  221|       |        /* Attention: This function will only set values for has_loops and has_multiple
  222|       |         * if it finds loops/multi-edges. Otherwise, they are left at their original value. */
  223|  1.06M|        IGRAPH_CHECK(igraph_i_simplify_sorted_int_adjacency_vector_in_place(
  ------------------
  |  |  656|  1.06M|    do { \
  |  |  657|  1.06M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.06M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.06M|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.06M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.06M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.06M]
  |  |  ------------------
  ------------------
  224|  1.06M|            &al->adjs[i], i, mode, loops, multiple, &has_loops, &has_multiple
  225|  1.06M|        ));
  226|  1.06M|    }
  227|  24.7k|    if (has_loops) {
  ------------------
  |  Branch (227:9): [True: 3.91k, False: 20.7k]
  ------------------
  228|       |        /* If we have found at least one loop above, set the cache to true. */
  229|  3.91k|        igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_HAS_LOOP, true);
  230|  20.7k|    } else if (loops == IGRAPH_NO_LOOPS) {
  ------------------
  |  Branch (230:16): [True: 2.20k, False: 18.5k]
  ------------------
  231|       |        /* If we explicitly _checked_ for loops (to remove them) and haven't
  232|       |         * found one, set the cache to false. This is the only case when a
  233|       |         * definite "no" from has_loops really means that there are no loops at
  234|       |         * all. */
  235|  2.20k|        igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_HAS_LOOP, false);
  236|  2.20k|    }
  237|  24.7k|    if (has_multiple) {
  ------------------
  |  Branch (237:9): [True: 1.40k, False: 23.3k]
  ------------------
  238|       |        /* If we have found at least one multiedge above, set the cache to true,
  239|       |         * except when treating a directed graph as undirected. In that case, mutual
  240|       |         * edges would also look like multi-edges in this check. */
  241|  1.40k|        if (! igraph_is_directed(graph) || mode != IGRAPH_ALL) {
  ------------------
  |  Branch (241:13): [True: 0, False: 1.40k]
  |  Branch (241:44): [True: 0, False: 1.40k]
  ------------------
  242|      0|            igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_HAS_MULTI, true);
  243|      0|        }
  244|  23.3k|    } else if (multiple == IGRAPH_NO_MULTIPLE) {
  ------------------
  |  Branch (244:16): [True: 4.45k, False: 18.8k]
  ------------------
  245|       |        /* If we explicitly _checked_ for multi-edges (to remove them) and
  246|       |         * haven't found one, set the cache to false. This is the only case
  247|       |         * when a definite "no" from has_multiple really means that there are
  248|       |         * no multi-edges at all. */
  249|  4.45k|        igraph_i_property_cache_set_bool_checked(graph, IGRAPH_PROP_HAS_MULTI, false);
  250|  4.45k|    }
  251|       |
  252|  24.7k|    igraph_vector_int_destroy(&degrees);
  253|  24.7k|    IGRAPH_FINALLY_CLEAN(2); /* + igraph_adjlist_destroy */
  254|       |
  255|  24.7k|    return IGRAPH_SUCCESS;
  256|  24.7k|}
igraph_adjlist_init_empty:
  272|  8.65k|igraph_error_t igraph_adjlist_init_empty(igraph_adjlist_t *al, igraph_int_t no_of_nodes) {
  273|       |
  274|  8.65k|    al->length = no_of_nodes;
  275|  8.65k|    al->adjs = IGRAPH_CALLOC(al->length, igraph_vector_int_t);
  ------------------
  |  |   33|  8.65k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  17.3k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 8.65k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 8.65k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 8.64k, False: 5]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  276|  8.65k|    IGRAPH_CHECK_OOM(al->adjs, "Insufficient memory for creating adjlist.");
  ------------------
  |  |  709|  8.65k|    do { \
  |  |  710|  8.65k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  8.65k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 8.65k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  8.65k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 8.65k]
  |  |  ------------------
  ------------------
  277|  8.65k|    IGRAPH_FINALLY(igraph_adjlist_destroy, al);
  ------------------
  |  |  603|  8.65k|    do { \
  |  |  604|  8.65k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  8.65k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  8.65k|         * incorrect destructor function with the pointer */ \
  |  |  607|  8.65k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 8.65k]
  |  |  ------------------
  |  |  608|  8.65k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  8.65k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 8.65k]
  |  |  ------------------
  ------------------
  278|       |
  279|   384k|    for (igraph_int_t i = 0; i < al->length; i++) {
  ------------------
  |  Branch (279:30): [True: 376k, False: 8.65k]
  ------------------
  280|   376k|        IGRAPH_CHECK(igraph_vector_int_init(&al->adjs[i], 0));
  ------------------
  |  |  656|   376k|    do { \
  |  |  657|   376k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   376k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   376k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 376k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   376k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 376k]
  |  |  ------------------
  ------------------
  281|   376k|    }
  282|       |
  283|  8.65k|    IGRAPH_FINALLY_CLEAN(1);
  284|       |
  285|  8.65k|    return IGRAPH_SUCCESS;
  286|  8.65k|}
igraph_adjlist_init_from_inclist:
  434|  1.46k|    const igraph_t *graph, igraph_adjlist_t *al, const igraph_inclist_t *il) {
  435|  1.46k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  436|  1.46k|    igraph_int_t i, j, num_neis;
  437|       |
  438|  1.46k|    igraph_vector_int_t *neis;
  439|  1.46k|    igraph_vector_int_t *incs;
  440|       |
  441|  1.46k|    if (igraph_inclist_size(il) != no_of_nodes) {
  ------------------
  |  Branch (441:9): [True: 0, False: 1.46k]
  ------------------
  442|      0|        IGRAPH_ERRORF(
  ------------------
  |  |  464|      0|    do { \
  |  |  465|      0|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  466|      0|                      igraph_errno, __VA_ARGS__) ; \
  |  |  467|      0|        return igraph_errno; \
  |  |  468|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (468:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  443|      0|            "Incidence list has %" IGRAPH_PRId " entries but the graph has %" IGRAPH_PRId " vertices.",
  444|      0|            IGRAPH_EINVAL,
  445|      0|            igraph_inclist_size(il),
  446|      0|            no_of_nodes
  447|      0|        );
  448|      0|    }
  449|       |
  450|  1.46k|    IGRAPH_CHECK(igraph_adjlist_init_empty(al, no_of_nodes));
  ------------------
  |  |  656|  1.46k|    do { \
  |  |  657|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
  451|  64.2k|    for (i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (451:17): [True: 62.7k, False: 1.46k]
  ------------------
  452|  62.7k|        neis = igraph_adjlist_get(al, i);
  ------------------
  |  |   73|  62.7k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  453|  62.7k|        incs = igraph_inclist_get(il, i);
  ------------------
  |  |  102|  62.7k|#define igraph_inclist_get(il,no) (&(il)->incs[(igraph_int_t)(no)])
  ------------------
  454|       |
  455|  62.7k|        num_neis = igraph_vector_int_size(incs);
  456|  62.7k|        IGRAPH_CHECK(igraph_vector_int_resize(neis, num_neis));
  ------------------
  |  |  656|  62.7k|    do { \
  |  |  657|  62.7k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  62.7k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  62.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 62.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  62.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 62.7k]
  |  |  ------------------
  ------------------
  457|       |
  458|   140k|        for (j = 0; j < num_neis; j++) {
  ------------------
  |  Branch (458:21): [True: 77.3k, False: 62.7k]
  ------------------
  459|  77.3k|            VECTOR(*neis)[j] = IGRAPH_OTHER(graph, VECTOR(*incs)[j], i);
  ------------------
  |  |   60|  77.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*neis)[j] = IGRAPH_OTHER(graph, VECTOR(*incs)[j], i);
  ------------------
  |  |  146|  77.3k|    ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|  77.3k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  77.3k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  115|  38.6k|#define IGRAPH_FROM(graph,eid) ((igraph_int_t)(VECTOR((graph)->from)[(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  38.6k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ((igraph_int_t)(IGRAPH_TO(graph,(eid))==(vid) ? IGRAPH_FROM((graph),(eid)) : IGRAPH_TO((graph),(eid))))
  |  |  ------------------
  |  |  |  |  128|  38.6k|#define IGRAPH_TO(graph,eid)   ((igraph_int_t)(VECTOR((graph)->to)  [(igraph_int_t)(eid)]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  38.6k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (146:21): [True: 38.6k, False: 38.6k]
  |  |  ------------------
  ------------------
  460|  77.3k|        }
  461|  62.7k|    }
  462|       |
  463|  1.46k|    return IGRAPH_SUCCESS;
  464|  1.46k|}
igraph_adjlist_destroy:
  475|  33.3k|void igraph_adjlist_destroy(igraph_adjlist_t *al) {
  476|  1.47M|    for (igraph_int_t i = 0; i < al->length; i++) {
  ------------------
  |  Branch (476:30): [True: 1.44M, False: 33.3k]
  ------------------
  477|       |        /* This works if some igraph_vector_int_t's contain NULL,
  478|       |           because igraph_vector_int_destroy can handle this. */
  479|  1.44M|        igraph_vector_int_destroy(&al->adjs[i]);
  480|  1.44M|    }
  481|       |    IGRAPH_FREE(al->adjs);
  ------------------
  |  |   36|  33.3k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  482|  33.3k|}
igraph_inclist_init:
  746|  8.65k|                        igraph_loops_t loops) {
  747|  8.65k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  748|  8.65k|    igraph_vector_int_t degrees;
  749|  8.65k|    int iter = 0;
  750|       |
  751|  8.65k|    if (mode != IGRAPH_IN && mode != IGRAPH_OUT && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (751:9): [True: 8.65k, False: 0]
  |  Branch (751:30): [True: 4.39k, False: 4.25k]
  |  Branch (751:52): [True: 0, False: 4.39k]
  ------------------
  752|      0|        IGRAPH_ERROR("Cannot create incidence list view.", IGRAPH_EINVMODE);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  753|      0|    }
  754|       |
  755|  8.65k|    if (!igraph_is_directed(graph)) {
  ------------------
  |  Branch (755:9): [True: 0, False: 8.65k]
  ------------------
  756|      0|        mode = IGRAPH_ALL;
  757|      0|    }
  758|       |
  759|  8.65k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&degrees, no_of_nodes);
  ------------------
  |  |  119|  8.65k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  8.65k|    do { \
  |  |  |  |  657|  8.65k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  8.65k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  8.65k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 8.65k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  8.65k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 8.65k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  8.65k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  8.65k|    do { \
  |  |  |  |  604|  8.65k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  8.65k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  8.65k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  8.65k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 8.65k]
  |  |  |  |  ------------------
  |  |  |  |  608|  8.65k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  8.65k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 8.65k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 8.65k]
  |  |  ------------------
  ------------------
  760|       |    /* igraph_degrees() is fast when loops=true */
  761|  8.65k|    IGRAPH_CHECK(igraph_degree(graph, &degrees, igraph_vss_all(), mode, IGRAPH_LOOPS));
  ------------------
  |  |  656|  8.65k|    do { \
  |  |  657|  8.65k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  8.65k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  8.65k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 8.65k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  8.65k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 8.65k]
  |  |  ------------------
  ------------------
  762|       |
  763|  8.65k|    il->length = no_of_nodes;
  764|  8.65k|    il->incs = IGRAPH_CALLOC(il->length, igraph_vector_int_t);
  ------------------
  |  |   33|  8.65k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  17.3k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 8.65k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 8.65k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 8.64k, False: 5]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  765|  8.65k|    if (il->incs == 0) {
  ------------------
  |  Branch (765:9): [True: 0, False: 8.65k]
  ------------------
  766|      0|        IGRAPH_ERROR("Cannot create incidence list view.", IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  767|      0|    }
  768|       |
  769|  8.65k|    IGRAPH_FINALLY(igraph_inclist_destroy, il);
  ------------------
  |  |  603|  8.65k|    do { \
  |  |  604|  8.65k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  8.65k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  8.65k|         * incorrect destructor function with the pointer */ \
  |  |  607|  8.65k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 8.65k]
  |  |  ------------------
  |  |  608|  8.65k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  8.65k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 8.65k]
  |  |  ------------------
  ------------------
  770|   384k|    for (igraph_int_t i = 0; i < il->length; i++) {
  ------------------
  |  Branch (770:30): [True: 376k, False: 8.65k]
  ------------------
  771|   376k|        IGRAPH_ALLOW_INTERRUPTION_LIMITED(iter, 1000);
  ------------------
  |  |   71|   376k|    do { \
  |  |   72|   376k|        if (++iter >= skips) { \
  |  |  ------------------
  |  |  |  Branch (72:13): [True: 0, False: 376k]
  |  |  ------------------
  |  |   73|      0|            IGRAPH_ALLOW_INTERRUPTION(); \
  |  |  ------------------
  |  |  |  |   46|      0|    do { \
  |  |  |  |   47|      0|        if (igraph_i_interruption_handler) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (47:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |  |  |   50|      0|            } \
  |  |  |  |   51|      0|        } \
  |  |  |  |   52|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   74|      0|            iter = 0; \
  |  |   75|      0|        } \
  |  |   76|   376k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (76:14): [Folded, False: 376k]
  |  |  ------------------
  ------------------
  772|       |
  773|   376k|        IGRAPH_CHECK(igraph_vector_int_init(&il->incs[i], VECTOR(degrees)[i]));
  ------------------
  |  |  656|   376k|    do { \
  |  |  657|   376k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   376k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   376k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 376k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   376k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 376k]
  |  |  ------------------
  ------------------
  774|   376k|        IGRAPH_CHECK(igraph_incident(graph, &il->incs[i], i, mode, loops));
  ------------------
  |  |  656|   376k|    do { \
  |  |  657|   376k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   376k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   376k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 376k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   376k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 376k]
  |  |  ------------------
  ------------------
  775|   376k|    }
  776|       |
  777|  8.65k|    igraph_vector_int_destroy(&degrees);
  778|  8.65k|    IGRAPH_FINALLY_CLEAN(2); /* + igraph_inclist_destroy */
  779|       |
  780|  8.65k|    return IGRAPH_SUCCESS;
  781|  8.65k|}
igraph_inclist_init_empty:
  798|  7.18k|igraph_error_t igraph_inclist_init_empty(igraph_inclist_t *il, igraph_int_t n) {
  799|  7.18k|    igraph_int_t i;
  800|       |
  801|  7.18k|    il->length = n;
  802|  7.18k|    il->incs = IGRAPH_CALLOC(il->length, igraph_vector_int_t);
  ------------------
  |  |   33|  7.18k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  14.3k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 7.18k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 7.18k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 7.18k, False: 4]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  803|  7.18k|    if (il->incs == 0) {
  ------------------
  |  Branch (803:9): [True: 0, False: 7.18k]
  ------------------
  804|      0|        IGRAPH_ERROR("Cannot create incidence list view", IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  805|      0|    }
  806|       |
  807|  7.18k|    IGRAPH_FINALLY(igraph_inclist_destroy, il);
  ------------------
  |  |  603|  7.18k|    do { \
  |  |  604|  7.18k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  7.18k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  7.18k|         * incorrect destructor function with the pointer */ \
  |  |  607|  7.18k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 7.18k]
  |  |  ------------------
  |  |  608|  7.18k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  7.18k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 7.18k]
  |  |  ------------------
  ------------------
  808|   320k|    for (i = 0; i < n; i++) {
  ------------------
  |  Branch (808:17): [True: 313k, False: 7.18k]
  ------------------
  809|   313k|        IGRAPH_CHECK(igraph_vector_int_init(&il->incs[i], 0));
  ------------------
  |  |  656|   313k|    do { \
  |  |  657|   313k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   313k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   313k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 313k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   313k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 313k]
  |  |  ------------------
  ------------------
  810|   313k|    }
  811|       |
  812|  7.18k|    IGRAPH_FINALLY_CLEAN(1);
  813|  7.18k|    return IGRAPH_SUCCESS;
  814|  7.18k|}
igraph_inclist_destroy:
  825|  15.8k|void igraph_inclist_destroy(igraph_inclist_t *il) {
  826|   705k|    for (igraph_int_t i = 0; i < il->length; i++) {
  ------------------
  |  Branch (826:30): [True: 689k, False: 15.8k]
  ------------------
  827|       |        /* This works if some igraph_vector_int_t's contain NULL,
  828|       |           because igraph_vector_int_destroy can handle this. */
  829|   689k|        igraph_vector_int_destroy(&il->incs[i]);
  830|   689k|    }
  831|       |    IGRAPH_FREE(il->incs);
  ------------------
  |  |   36|  15.8k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  832|  15.8k|}
igraph_inclist_size:
  861|  1.46k|igraph_int_t igraph_inclist_size(const igraph_inclist_t *il) {
  862|  1.46k|    return il->length;
  863|  1.46k|}
adjlist.c:igraph_i_simplify_sorted_int_adjacency_vector_in_place:
  871|  1.06M|) {
  872|  1.06M|    igraph_bool_t dummy1 = true, dummy2 = true; /* set dummies to avoid uninitialized read */
  873|  1.06M|    if (has_loops == NULL) {
  ------------------
  |  Branch (873:9): [True: 0, False: 1.06M]
  ------------------
  874|      0|        has_loops = &dummy1;
  875|      0|    }
  876|  1.06M|    if (has_multiple == NULL) {
  ------------------
  |  Branch (876:9): [True: 0, False: 1.06M]
  ------------------
  877|      0|        has_multiple = &dummy2;
  878|      0|    }
  879|       |
  880|  1.06M|    igraph_int_t i, p = 0;
  881|  1.06M|    igraph_int_t n = igraph_vector_int_size(v);
  882|       |
  883|  1.06M|    multiple = !!multiple; /* normalize Boolean value to enable == comparisons below */
  884|       |
  885|  1.06M|    if (
  886|  1.06M|        multiple == IGRAPH_MULTIPLE &&
  ------------------
  |  Branch (886:9): [True: 814k, False: 251k]
  ------------------
  887|   814k|        (
  888|   814k|            loops == IGRAPH_LOOPS_TWICE ||
  ------------------
  |  Branch (888:13): [True: 279k, False: 534k]
  ------------------
  889|   534k|            (loops == IGRAPH_LOOPS_ONCE && (mode == IGRAPH_IN || mode == IGRAPH_OUT))
  ------------------
  |  Branch (889:14): [True: 333k, False: 201k]
  |  Branch (889:45): [True: 47.6k, False: 285k]
  |  Branch (889:66): [True: 285k, False: 0]
  ------------------
  890|   814k|        )
  891|  1.06M|    ) {
  892|       |        /* nothing to simplify */
  893|   613k|        return IGRAPH_SUCCESS;
  894|   613k|    }
  895|       |
  896|   452k|    if (loops == IGRAPH_NO_LOOPS) {
  ------------------
  |  Branch (896:9): [True: 261k, False: 190k]
  ------------------
  897|   261k|        if (multiple == IGRAPH_NO_MULTIPLE) {
  ------------------
  |  Branch (897:13): [True: 60.4k, False: 201k]
  ------------------
  898|       |            /* We need to get rid of loops and multiple edges completely */
  899|   193k|            for (i = 0; i < n; i++) {
  ------------------
  |  Branch (899:25): [True: 133k, False: 60.4k]
  ------------------
  900|   133k|                if (VECTOR(*v)[i] != index &&
  ------------------
  |  |   60|   133k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (900:21): [True: 101k, False: 32.1k]
  ------------------
  901|   101k|                    (i == n - 1 || VECTOR(*v)[i + 1] != VECTOR(*v)[i])) {
  ------------------
  |  |   60|  81.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  (i == n - 1 || VECTOR(*v)[i + 1] != VECTOR(*v)[i])) {
  ------------------
  |  |   60|  81.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (901:22): [True: 19.8k, False: 81.2k]
  |  Branch (901:36): [True: 60.5k, False: 20.7k]
  ------------------
  902|  80.4k|                    VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   60|  80.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   60|  80.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  903|  80.4k|                    p++;
  904|  80.4k|                } else {
  905|  52.8k|                    if (VECTOR(*v)[i] == index) {
  ------------------
  |  |   60|  52.8k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (905:25): [True: 32.1k, False: 20.7k]
  ------------------
  906|  32.1k|                        *has_loops = true;
  907|       |                        /* If we haven't found multi-edges yet, we also need to check
  908|       |                         * if this is a multi-loop, to set 'has_multiple' correctly. */
  909|  32.1k|                        if (! *has_multiple) {
  ------------------
  |  Branch (909:29): [True: 4.39k, False: 27.7k]
  ------------------
  910|  4.39k|                            if (mode == IGRAPH_ALL) {
  ------------------
  |  Branch (910:33): [True: 4.39k, False: 0]
  ------------------
  911|       |                                /* Undirected loops appear twice in the neighbour list,
  912|       |                                 * so we check two following items instead of one. */
  913|  4.39k|                                if (i < n - 2 &&
  ------------------
  |  Branch (913:37): [True: 2.55k, False: 1.84k]
  ------------------
  914|  2.55k|                                    VECTOR(*v)[i + 1] == VECTOR(*v)[i] &&
  ------------------
  |  |   60|  2.55k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                                  VECTOR(*v)[i + 1] == VECTOR(*v)[i] &&
  ------------------
  |  |   60|  2.55k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (914:37): [True: 1.63k, False: 916]
  ------------------
  915|  1.63k|                                    VECTOR(*v)[i + 2] == VECTOR(*v)[i]) {
  ------------------
  |  |   60|  1.63k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                                  VECTOR(*v)[i + 2] == VECTOR(*v)[i]) {
  ------------------
  |  |   60|  1.63k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (915:37): [True: 360, False: 1.27k]
  ------------------
  916|    360|                                    *has_multiple = true;
  917|    360|                                }
  918|  4.39k|                            } else {
  919|      0|                                if (i != n - 1 && VECTOR(*v)[i + 1] == VECTOR(*v)[i]) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                              if (i != n - 1 && VECTOR(*v)[i + 1] == VECTOR(*v)[i]) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (919:37): [True: 0, False: 0]
  |  Branch (919:51): [True: 0, False: 0]
  ------------------
  920|      0|                                    *has_multiple = true;
  921|      0|                                }
  922|      0|                            }
  923|  4.39k|                        }
  924|  32.1k|                    } else if (i != n - 1 && VECTOR(*v)[i + 1] == VECTOR(*v)[i]) {
  ------------------
  |  |   60|  20.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  } else if (i != n - 1 && VECTOR(*v)[i + 1] == VECTOR(*v)[i]) {
  ------------------
  |  |   60|  20.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (924:32): [True: 20.7k, False: 0]
  |  Branch (924:46): [True: 20.7k, False: 0]
  ------------------
  925|  20.7k|                        *has_multiple = true;
  926|  20.7k|                    }
  927|  52.8k|                }
  928|   133k|            }
  929|   201k|        } else {
  930|       |            /* We need to get rid of loops but keep multiple edges */
  931|   452k|            for (i = 0; i < n; i++) {
  ------------------
  |  Branch (931:25): [True: 251k, False: 201k]
  ------------------
  932|   251k|                if (VECTOR(*v)[i] != index) {
  ------------------
  |  |   60|   251k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (932:21): [True: 220k, False: 30.3k]
  ------------------
  933|   220k|                    VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   60|   220k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   60|   220k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  934|   220k|                    p++;
  935|   220k|                } else {
  936|  30.3k|                    *has_loops = true;
  937|  30.3k|                }
  938|   251k|            }
  939|   201k|        }
  940|   261k|    } else if (loops == IGRAPH_LOOPS_ONCE) {
  ------------------
  |  Branch (940:16): [True: 0, False: 190k]
  ------------------
  941|      0|        if (multiple == IGRAPH_NO_MULTIPLE) {
  ------------------
  |  Branch (941:13): [True: 0, False: 0]
  ------------------
  942|       |            /* We need to get rid of multiple edges completely (including
  943|       |             * multiple loop edges), but keep one edge from each loop edge */
  944|      0|            for (i = 0; i < n; i++) {
  ------------------
  |  Branch (944:25): [True: 0, False: 0]
  ------------------
  945|      0|                if (i == n - 1 || VECTOR(*v)[i + 1] != VECTOR(*v)[i]) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              if (i == n - 1 || VECTOR(*v)[i + 1] != VECTOR(*v)[i]) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (945:21): [True: 0, False: 0]
  |  Branch (945:35): [True: 0, False: 0]
  ------------------
  946|      0|                    VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  947|      0|                    p++;
  948|      0|                } else if (
  949|       |                        /* If this is not a loop then we have a multigraph.
  950|       |                           Else we have at least two loops.
  951|       |                           The v vector comes from a call to igraph_neighbors.
  952|       |                           This will count loops twice if mode == IGRAPH_ALL.
  953|       |                           So if mode != IGRAPH_ALL,
  954|       |                           then we have a multigraph.
  955|       |                           If mode == IGRAPH_ALL and we have three loops
  956|       |                           then we also have a multigraph
  957|       |                           */
  958|      0|                        (VECTOR(*v)[i] != index) ||
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (958:25): [True: 0, False: 0]
  ------------------
  959|      0|                       (mode != IGRAPH_ALL)  ||
  ------------------
  |  Branch (959:24): [True: 0, False: 0]
  ------------------
  960|      0|                       (mode == IGRAPH_ALL && i < n - 2 && VECTOR(*v)[i + 2] == VECTOR(*v)[i])
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                     (mode == IGRAPH_ALL && i < n - 2 && VECTOR(*v)[i + 2] == VECTOR(*v)[i])
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (960:25): [True: 0, False: 0]
  |  Branch (960:47): [True: 0, False: 0]
  |  Branch (960:60): [True: 0, False: 0]
  ------------------
  961|      0|                       ){
  962|      0|                    *has_multiple = true;
  963|      0|                }
  964|      0|            }
  965|      0|        } else {
  966|       |            /* We need to keep one edge from each loop edge and we don't need to
  967|       |             * touch multiple edges. Note that we can get here only if
  968|       |             * mode == IGRAPH_ALL; if mode was IGRAPH_IN or IGRAPH_OUT, we would
  969|       |             * have bailed out earlier */
  970|      0|            for (i = 0; i < n; i++) {
  ------------------
  |  Branch (970:25): [True: 0, False: 0]
  ------------------
  971|      0|                VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  972|      0|                if (VECTOR(*v)[i] == index) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (972:21): [True: 0, False: 0]
  ------------------
  973|      0|                    *has_loops = true;
  974|       |                    /* this was a loop edge so if the next element is the same, we
  975|       |                    * need to skip that */
  976|      0|                    if (i < n-1 && VECTOR(*v)[i + 1] == index) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (976:25): [True: 0, False: 0]
  |  Branch (976:36): [True: 0, False: 0]
  ------------------
  977|      0|                        i++;
  978|      0|                    }
  979|      0|                }
  980|      0|                p++;
  981|      0|            }
  982|      0|        }
  983|   190k|    } else if (loops == IGRAPH_LOOPS_TWICE && multiple == IGRAPH_NO_MULTIPLE) {
  ------------------
  |  Branch (983:16): [True: 190k, False: 0]
  |  Branch (983:47): [True: 190k, False: 0]
  ------------------
  984|       |        /* We need to get rid of multiple edges completely (including
  985|       |         * multiple loop edges), but keep both edge from each loop edge */
  986|   398k|        for (i = 0; i < n; i++) {
  ------------------
  |  Branch (986:21): [True: 208k, False: 190k]
  ------------------
  987|   208k|            if (i == n - 1 || VECTOR(*v)[i + 1] != VECTOR(*v)[i]) {
  ------------------
  |  |   60|   155k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          if (i == n - 1 || VECTOR(*v)[i + 1] != VECTOR(*v)[i]) {
  ------------------
  |  |   60|   155k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (987:17): [True: 52.9k, False: 155k]
  |  Branch (987:31): [True: 108k, False: 46.6k]
  ------------------
  988|   161k|                VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   60|   161k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   60|   161k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  989|   161k|                p++;
  990|   161k|            } else {
  991|  46.6k|                *has_multiple = true;
  992|       |                /* Current item is the same as the next one, but if it is a
  993|       |                 * loop edge, then the first one or two items are okay. We need
  994|       |                 * to keep one if mode == IGRAPH_IN or mode == IGRAPH_OUT,
  995|       |                 * otherwise we need to keep two */
  996|  46.6k|                if (VECTOR(*v)[i] == index) {
  ------------------
  |  |   60|  46.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (996:21): [True: 0, False: 46.6k]
  ------------------
  997|      0|                    VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                  VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  998|      0|                    p++;
  999|      0|                    if (mode == IGRAPH_ALL) {
  ------------------
  |  Branch (999:25): [True: 0, False: 0]
  ------------------
 1000|      0|                        VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                                      VECTOR(*v)[p] = VECTOR(*v)[i];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1001|      0|                        p++;
 1002|      0|                    }
 1003|       |                    /* skip over all the items corresponding to the loop edges */
 1004|      0|                    while (i < n && VECTOR(*v)[i] == index) {
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (1004:28): [True: 0, False: 0]
  |  Branch (1004:37): [True: 0, False: 0]
  ------------------
 1005|      0|                        i++;
 1006|      0|                    }
 1007|      0|                    i--; /* because the for loop also increases i by 1 */
 1008|      0|                }
 1009|  46.6k|            }
 1010|   208k|        }
 1011|   190k|    } else {
 1012|       |        /* TODO; we don't use this combination yet */
 1013|      0|        return IGRAPH_UNIMPLEMENTED;
 1014|      0|    }
 1015|       |
 1016|       |    /* always succeeds since we are never growing the vector */
 1017|   452k|    igraph_vector_int_resize(v, p);
 1018|       |
 1019|   452k|    return IGRAPH_SUCCESS;
 1020|   452k|}

igraph_i_attribute_init:
  617|  4.43k|) {
  618|  4.43k|    graph->attr = NULL;
  619|  4.43k|    if (igraph_i_attribute_table) {
  ------------------
  |  Branch (619:9): [True: 0, False: 4.43k]
  ------------------
  620|      0|        IGRAPH_CHECK(igraph_i_attribute_table->init(graph, attr));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  621|      0|        if (graph->attr == NULL) {
  ------------------
  |  Branch (621:13): [True: 0, False: 0]
  ------------------
  622|      0|            IGRAPH_ERROR("Attribute handler did not initialize attr pointer", IGRAPH_FAILURE);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  623|      0|        }
  624|      0|    }
  625|  4.43k|    return IGRAPH_SUCCESS;
  626|  4.43k|}
igraph_i_attribute_destroy:
  628|  7.36k|void igraph_i_attribute_destroy(igraph_t *graph) {
  629|  7.36k|    if (graph->attr && igraph_i_attribute_table) {
  ------------------
  |  Branch (629:9): [True: 0, False: 7.36k]
  |  Branch (629:24): [True: 0, False: 0]
  ------------------
  630|      0|        igraph_i_attribute_table->destroy(graph);
  631|      0|    }
  632|       |    graph->attr = NULL;
  633|  7.36k|}
igraph_i_attribute_copy:
  636|  2.92k|                            igraph_bool_t va, igraph_bool_t ea) {
  637|  2.92k|    igraph_i_attribute_destroy(to);
  638|  2.92k|    if (from->attr && igraph_i_attribute_table) {
  ------------------
  |  Branch (638:9): [True: 0, False: 2.92k]
  |  Branch (638:23): [True: 0, False: 0]
  ------------------
  639|      0|        IGRAPH_CHECK(igraph_i_attribute_table->copy(to, from, ga, va, ea));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  640|      0|        if (to->attr == NULL) {
  ------------------
  |  Branch (640:13): [True: 0, False: 0]
  ------------------
  641|      0|            IGRAPH_ERROR("Attribute handler did not initialize attr pointer", IGRAPH_FAILURE);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  642|      0|        }
  643|      0|    }
  644|  2.92k|    return IGRAPH_SUCCESS;
  645|  2.92k|}

igraph_i_property_cache_init:
   32|  4.43k|igraph_error_t igraph_i_property_cache_init(igraph_i_property_cache_t *cache) {
   33|  4.43k|    IGRAPH_STATIC_ASSERT(IGRAPH_PROP_I_SIZE <= 32);
  ------------------
  |  |   68|  4.43k|#define IGRAPH_STATIC_ASSERT(condition) ((void)sizeof(char[1 - 2*!(condition)]))
  ------------------
   34|       |
   35|  4.43k|    memset(cache->value, 0, sizeof(cache->value));
   36|  4.43k|    cache->known = 0;
   37|  4.43k|    return IGRAPH_SUCCESS;
   38|  4.43k|}
igraph_i_property_cache_destroy:
   53|  4.43k|void igraph_i_property_cache_destroy(igraph_i_property_cache_t *cache) {
   54|  4.43k|    IGRAPH_UNUSED(cache);
  ------------------
  |  |   30|  4.43k|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
   55|       |    /* Nothing to do */
   56|  4.43k|}
igraph_i_property_cache_get_bool:
   72|  30.9k|igraph_bool_t igraph_i_property_cache_get_bool(const igraph_t *graph, igraph_cached_property_t prop) {
   73|  30.9k|    IGRAPH_ASSERT(prop >= 0 && prop < IGRAPH_PROP_I_SIZE);
  ------------------
  |  |  924|  30.9k|    do { \
  |  |  925|  30.9k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  61.8k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 30.9k]
  |  |  |  |  |  Branch (612:52): [True: 30.9k, False: 0]
  |  |  |  |  |  Branch (612:52): [True: 30.9k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  30.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 30.9k]
  |  |  ------------------
  ------------------
   74|  30.9k|    assert(graph->cache != NULL);
  ------------------
  |  Branch (74:5): [True: 0, False: 30.9k]
  |  Branch (74:5): [True: 30.9k, False: 0]
  ------------------
   75|  30.9k|    return graph->cache->value[prop];
   76|  30.9k|}
igraph_i_property_cache_has:
   84|  58.5k|igraph_bool_t igraph_i_property_cache_has(const igraph_t *graph, igraph_cached_property_t prop) {
   85|  58.5k|    IGRAPH_ASSERT(prop >= 0 && prop < IGRAPH_PROP_I_SIZE);
  ------------------
  |  |  924|  58.5k|    do { \
  |  |  925|  58.5k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|   117k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 58.5k]
  |  |  |  |  |  Branch (612:52): [True: 58.5k, False: 0]
  |  |  |  |  |  Branch (612:52): [True: 58.5k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  58.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 58.5k]
  |  |  ------------------
  ------------------
   86|  58.5k|    assert(graph->cache != NULL);
  ------------------
  |  Branch (86:5): [True: 0, False: 58.5k]
  |  Branch (86:5): [True: 58.5k, False: 0]
  ------------------
   87|  58.5k|    return graph->cache->known & (1 << prop);
   88|  58.5k|}
igraph_i_property_cache_set_bool:
   97|  5.50k|void igraph_i_property_cache_set_bool(const igraph_t *graph, igraph_cached_property_t prop, igraph_bool_t value) {
   98|  5.50k|    IGRAPH_ASSERT(prop >= 0 && prop < IGRAPH_PROP_I_SIZE);
  ------------------
  |  |  924|  5.50k|    do { \
  |  |  925|  5.50k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  11.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.50k]
  |  |  |  |  |  Branch (612:52): [True: 5.50k, False: 0]
  |  |  |  |  |  Branch (612:52): [True: 5.50k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  5.50k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 5.50k]
  |  |  ------------------
  ------------------
   99|  5.50k|    assert(graph->cache != NULL);
  ------------------
  |  Branch (99:5): [True: 0, False: 5.50k]
  |  Branch (99:5): [True: 5.50k, False: 0]
  ------------------
  100|       |    /* Even though graph is const, updating the cache is not considered modification.
  101|       |     * Functions that merely compute graph properties, and thus leave the graph structure
  102|       |     * intact, will often update the cache. */
  103|  5.50k|    graph->cache->value[prop] = value;
  104|  5.50k|    graph->cache->known |= (1 << prop);
  105|  5.50k|}
igraph_i_property_cache_set_bool_checked:
  123|  12.0k|void igraph_i_property_cache_set_bool_checked(const igraph_t *graph, igraph_cached_property_t prop, igraph_bool_t value) {
  124|  12.0k|    IGRAPH_ASSERT(prop >= 0 && prop < IGRAPH_PROP_I_SIZE);
  ------------------
  |  |  924|  12.0k|    do { \
  |  |  925|  12.0k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  24.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 12.0k]
  |  |  |  |  |  Branch (612:52): [True: 12.0k, False: 0]
  |  |  |  |  |  Branch (612:52): [True: 12.0k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  12.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 12.0k]
  |  |  ------------------
  ------------------
  125|  12.0k|    assert(graph->cache != NULL);
  ------------------
  |  Branch (125:5): [True: 0, False: 12.0k]
  |  Branch (125:5): [True: 12.0k, False: 0]
  ------------------
  126|       |    /* Even though graph is const, updating the cache is not considered modification.
  127|       |     * Functions that merely compute graph properties, and thus leave the graph structure
  128|       |     * intact, will often update the cache. */
  129|  12.0k|    if (graph->cache->known & (1 << prop)) {
  ------------------
  |  Branch (129:9): [True: 6.53k, False: 5.50k]
  ------------------
  130|  6.53k|        IGRAPH_ASSERT(graph->cache->value[prop] == value);
  ------------------
  |  |  924|  6.53k|    do { \
  |  |  925|  6.53k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  612|  6.53k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 6.53k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  926|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  927|      0|        } \
  |  |  928|  6.53k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (928:14): [Folded, False: 6.53k]
  |  |  ------------------
  ------------------
  131|  6.53k|    } else {
  132|  5.50k|        igraph_i_property_cache_set_bool(graph, prop, value);
  133|  5.50k|    }
  134|  12.0k|}
igraph_i_property_cache_invalidate_conditionally:
  182|  9.94k|) {
  183|  9.94k|    uint32_t invalidate = ~keep_always;
  184|  9.94k|    uint32_t mask;
  185|  9.94k|    uint32_t maybe_keep;
  186|  9.94k|    igraph_bool_t cached_value;
  187|       |
  188|  9.94k|    assert(graph->cache != NULL);
  ------------------
  |  Branch (188:5): [True: 0, False: 9.94k]
  |  Branch (188:5): [True: 9.94k, False: 0]
  ------------------
  189|       |
  190|       |    /* The bits of maybe_keep are set to 1 for those properties that are:
  191|       |     *
  192|       |     * - currently cached
  193|       |     * - should _probably_ be invalidated
  194|       |     * - _but_ the current cached value of the property may change the decision
  195|       |     */
  196|  9.94k|    maybe_keep = graph->cache->known & invalidate & (keep_when_false | keep_when_true);
  197|       |
  198|  9.94k|    if (maybe_keep) {
  ------------------
  |  Branch (198:9): [True: 0, False: 9.94k]
  ------------------
  199|      0|        for (igraph_cached_property_t prop = (igraph_cached_property_t ) 0; prop < IGRAPH_PROP_I_SIZE; ++prop) {
  ------------------
  |  Branch (199:77): [True: 0, False: 0]
  ------------------
  200|      0|            mask = 1 << prop;
  201|      0|            if (maybe_keep & mask) {
  ------------------
  |  Branch (201:17): [True: 0, False: 0]
  ------------------
  202|       |                /* if we get here, we know that the property is cached; we have
  203|       |                 * masked maybe_keep with graph->cache->known */
  204|      0|                cached_value = igraph_i_property_cache_get_bool(graph, prop);
  205|      0|                if (
  206|      0|                    ((keep_when_false & mask) && !cached_value) ||
  ------------------
  |  Branch (206:22): [True: 0, False: 0]
  |  Branch (206:50): [True: 0, False: 0]
  ------------------
  207|      0|                    ((keep_when_true & mask) && cached_value)
  ------------------
  |  Branch (207:22): [True: 0, False: 0]
  |  Branch (207:49): [True: 0, False: 0]
  ------------------
  208|      0|                ) {
  209|      0|                    invalidate &= ~mask;
  210|      0|                }
  211|      0|            }
  212|      0|        }
  213|      0|    }
  214|       |
  215|  9.94k|    graph->cache->known &= ~invalidate;
  216|  9.94k|}

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

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

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

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

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

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

igraph_global_efficiency:
  395|  1.46k|) {
  396|  1.46k|    if (weights) {
  ------------------
  |  Branch (396:9): [True: 0, False: 1.46k]
  ------------------
  397|      0|        return igraph_i_average_path_length_dijkstra(
  398|      0|            graph, weights, res, NULL, directed, /* invert= */ true, /* unconn= */ false
  399|      0|        );
  400|  1.46k|    } else {
  401|  1.46k|        return igraph_i_average_path_length_unweighted(
  402|  1.46k|            graph, res, NULL, directed, /* invert= */ true, /* unconn= */ false
  403|  1.46k|        );
  404|  1.46k|    }
  405|  1.46k|}
igraph_local_efficiency:
  691|  1.46k|) {
  692|  1.46k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  693|  1.46k|    igraph_int_t no_of_edges = igraph_ecount(graph);
  694|  1.46k|    igraph_int_t nodes_to_calc; /* no. of vertices includes in computation */
  695|  1.46k|    igraph_vit_t vit;
  696|  1.46k|    igraph_vector_int_t vertex_neis;
  697|  1.46k|    igraph_vector_char_t nei_mask;
  698|  1.46k|    igraph_int_t i;
  699|       |
  700|       |    /* 'nei_mask' is a vector indexed by vertices. The meaning of its values is as follows:
  701|       |     *   0: not a neighbour of 'vertex'
  702|       |     *   1: a not-yet-processed neighbour of 'vertex'
  703|       |     *   2: an already processed neighbour of 'vertex'
  704|       |     *
  705|       |     * Marking neighbours of already processed is necessary to avoid processing them more
  706|       |     * than once in multigraphs.
  707|       |     */
  708|  1.46k|    IGRAPH_CHECK(igraph_vector_char_init(&nei_mask, no_of_nodes));
  ------------------
  |  |  656|  1.46k|    do { \
  |  |  657|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
  709|  1.46k|    IGRAPH_FINALLY(igraph_vector_char_destroy, &nei_mask);
  ------------------
  |  |  603|  1.46k|    do { \
  |  |  604|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  607|  1.46k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 1.46k]
  |  |  ------------------
  |  |  608|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
  710|  1.46k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&vertex_neis, 0);
  ------------------
  |  |  119|  1.46k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  1.46k|    do { \
  |  |  |  |  657|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  1.46k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  1.46k|    do { \
  |  |  |  |  604|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.46k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
  711|       |
  712|  1.46k|    IGRAPH_CHECK(igraph_vit_create(graph, vids, &vit));
  ------------------
  |  |  656|  1.46k|    do { \
  |  |  657|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
  713|  1.46k|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  603|  1.46k|    do { \
  |  |  604|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  607|  1.46k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 1.46k]
  |  |  ------------------
  |  |  608|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
  714|       |
  715|  1.46k|    nodes_to_calc = IGRAPH_VIT_SIZE(vit);
  ------------------
  |  |  190|  1.46k|#define IGRAPH_VIT_SIZE(vit)  ((vit).end - (vit).start)
  ------------------
  716|       |
  717|  1.46k|    IGRAPH_CHECK(igraph_vector_resize(res, nodes_to_calc));
  ------------------
  |  |  656|  1.46k|    do { \
  |  |  657|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
  718|       |
  719|  1.46k|    if (! weights) /* unweighted case */
  ------------------
  |  Branch (719:9): [True: 1.46k, False: 0]
  ------------------
  720|  1.46k|    {
  721|  1.46k|        igraph_int_t *already_counted;
  722|  1.46k|        igraph_adjlist_t adjlist;
  723|  1.46k|        igraph_dqueue_int_t q = IGRAPH_DQUEUE_NULL;
  ------------------
  |  |   56|  1.46k|#define IGRAPH_DQUEUE_NULL { 0,0,0,0 }
  ------------------
  724|       |
  725|  1.46k|        already_counted = IGRAPH_CALLOC(no_of_nodes, igraph_int_t);
  ------------------
  |  |   33|  1.46k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  2.92k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 1.46k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 1.46k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 1.46k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  726|  1.46k|        IGRAPH_CHECK_OOM(already_counted, "Insufficient memory for local efficiency calculation.");
  ------------------
  |  |  709|  1.46k|    do { \
  |  |  710|  1.46k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
  727|  1.46k|        IGRAPH_FINALLY(igraph_free, already_counted);
  ------------------
  |  |  603|  1.46k|    do { \
  |  |  604|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  607|  1.46k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 1.46k]
  |  |  ------------------
  |  |  608|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
  728|       |
  729|  1.46k|        IGRAPH_CHECK(igraph_adjlist_init(
  ------------------
  |  |  656|  1.46k|    do { \
  |  |  657|  2.92k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  ------------------
  |  |  |  Branch (657:40): [True: 1.46k, False: 0]
  |  |  ------------------
  |  |  658|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
  730|  1.46k|            graph, &adjlist,
  731|  1.46k|            directed ? IGRAPH_OUT : IGRAPH_ALL,
  732|  1.46k|            IGRAPH_LOOPS, IGRAPH_MULTIPLE
  733|  1.46k|        ));
  734|  1.46k|        IGRAPH_FINALLY(igraph_adjlist_destroy, &adjlist);
  ------------------
  |  |  603|  1.46k|    do { \
  |  |  604|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  607|  1.46k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 1.46k]
  |  |  ------------------
  |  |  608|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
  735|       |
  736|  1.46k|        IGRAPH_DQUEUE_INT_INIT_FINALLY(&q, 100);
  ------------------
  |  |   61|  1.46k|    do { IGRAPH_CHECK(igraph_dqueue_int_init(q, capacity)); \
  |  |  ------------------
  |  |  |  |  656|  1.46k|    do { \
  |  |  |  |  657|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|  1.46k|        IGRAPH_FINALLY(igraph_dqueue_int_destroy, q); } while (0)
  |  |  ------------------
  |  |  |  |  603|  1.46k|    do { \
  |  |  |  |  604|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.46k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (62:64): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
  737|       |
  738|  1.46k|        for (IGRAPH_VIT_RESET(vit), i=0;
  ------------------
  |  |  201|  1.46k|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
  739|  64.2k|             ! IGRAPH_VIT_END(vit);
  ------------------
  |  |  179|  64.2k|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (739:14): [True: 62.7k, False: 1.46k]
  ------------------
  740|  62.7k|             IGRAPH_VIT_NEXT(vit), i++)
  ------------------
  |  |  167|  62.7k|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  741|  62.7k|        {
  742|  62.7k|            IGRAPH_CHECK(igraph_i_local_efficiency_unweighted(
  ------------------
  |  |  656|  62.7k|    do { \
  |  |  657|   125k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  ------------------
  |  |  |  Branch (657:40): [True: 62.7k, False: 0]
  |  |  ------------------
  |  |  658|  62.7k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  62.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 62.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  62.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 62.7k]
  |  |  ------------------
  ------------------
  743|  62.7k|                             graph, &adjlist,
  744|  62.7k|                             &q, already_counted, &vertex_neis, &nei_mask,
  745|  62.7k|                             &(VECTOR(*res)[i]), IGRAPH_VIT_GET(vit), mode));
  746|  62.7k|        }
  747|       |
  748|  1.46k|        igraph_dqueue_int_destroy(&q);
  749|  1.46k|        igraph_adjlist_destroy(&adjlist);
  750|  1.46k|        IGRAPH_FREE(already_counted);
  ------------------
  |  |   36|  1.46k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  751|  1.46k|        IGRAPH_FINALLY_CLEAN(3);
  752|  1.46k|    }
  753|      0|    else /* weighted case */
  754|      0|    {
  755|      0|        igraph_lazy_inclist_t inclist;
  756|      0|        igraph_2wheap_t Q;
  757|       |
  758|      0|        if (igraph_vector_size(weights) != no_of_edges) {
  ------------------
  |  Branch (758:13): [True: 0, False: 0]
  ------------------
  759|      0|            IGRAPH_ERROR("Weight vector length does not match the number of edges.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  760|      0|        }
  761|      0|        if (no_of_edges > 0) {
  ------------------
  |  Branch (761:13): [True: 0, False: 0]
  ------------------
  762|      0|            igraph_real_t min = igraph_vector_min(weights);
  763|      0|            if (min < 0) {
  ------------------
  |  Branch (763:17): [True: 0, False: 0]
  ------------------
  764|      0|                IGRAPH_ERRORF("Weights must not be negative, got %g.", IGRAPH_EINVAL, min);
  ------------------
  |  |  464|      0|    do { \
  |  |  465|      0|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  466|      0|                      igraph_errno, __VA_ARGS__) ; \
  |  |  467|      0|        return igraph_errno; \
  |  |  468|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (468:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  765|      0|            }
  766|      0|            else if (isnan(min)) {
  ------------------
  |  Branch (766:22): [True: 0, False: 0]
  ------------------
  767|      0|                IGRAPH_ERROR("Weights must not contain NaN values.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  768|      0|            }
  769|      0|        }
  770|       |
  771|      0|        IGRAPH_CHECK(igraph_lazy_inclist_init(
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  ------------------
  |  |  |  Branch (657:40): [True: 0, False: 0]
  |  |  ------------------
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  772|      0|            graph, &inclist, directed ? IGRAPH_OUT : IGRAPH_ALL, IGRAPH_LOOPS
  773|      0|        ));
  774|      0|        IGRAPH_FINALLY(igraph_lazy_inclist_destroy, &inclist);
  ------------------
  |  |  603|      0|    do { \
  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  ------------------
  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  775|      0|        IGRAPH_CHECK(igraph_2wheap_init(&Q, no_of_nodes));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  776|      0|        IGRAPH_FINALLY(igraph_2wheap_destroy, &Q);
  ------------------
  |  |  603|      0|    do { \
  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  ------------------
  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  777|       |
  778|      0|        for (IGRAPH_VIT_RESET(vit), i=0;
  ------------------
  |  |  201|      0|#define IGRAPH_VIT_RESET(vit) ((vit).pos = (vit).start)
  ------------------
  779|      0|             ! IGRAPH_VIT_END(vit);
  ------------------
  |  |  179|      0|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
  |  Branch (779:14): [True: 0, False: 0]
  ------------------
  780|      0|             IGRAPH_VIT_NEXT(vit), i++)
  ------------------
  |  |  167|      0|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  781|      0|        {
  782|      0|            IGRAPH_CHECK(igraph_i_local_efficiency_dijkstra(
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  ------------------
  |  |  |  Branch (657:40): [True: 0, False: 0]
  |  |  ------------------
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  783|      0|                             graph, &inclist,
  784|      0|                             &Q, &vertex_neis, &nei_mask,
  785|      0|                             &(VECTOR(*res)[i]), IGRAPH_VIT_GET(vit), mode, weights));
  786|      0|        }
  787|       |
  788|      0|        igraph_2wheap_destroy(&Q);
  789|      0|        igraph_lazy_inclist_destroy(&inclist);
  790|      0|        IGRAPH_FINALLY_CLEAN(2);
  791|      0|    }
  792|       |
  793|  1.46k|    igraph_vit_destroy(&vit);
  794|  1.46k|    igraph_vector_int_destroy(&vertex_neis);
  795|  1.46k|    igraph_vector_char_destroy(&nei_mask);
  796|  1.46k|    IGRAPH_FINALLY_CLEAN(3);
  797|       |
  798|  1.46k|    return IGRAPH_SUCCESS;
  799|  1.46k|}
shortest_paths.c:igraph_i_average_path_length_unweighted:
   45|  1.46k|{
   46|  1.46k|    const igraph_int_t no_of_nodes = igraph_vcount(graph);
   47|       |
   48|       |    /* The number of ordered vertex pairs.
   49|       |     * While the conditional below is not mathematically necessary, it prevents
   50|       |     * returning -0.0 where 0.0 would be expected. */
   51|  1.46k|    const igraph_real_t no_of_pairs = no_of_nodes > 0 ? no_of_nodes * (no_of_nodes - 1.0) : 0.0;
  ------------------
  |  Branch (51:39): [True: 1.46k, False: 1]
  ------------------
   52|       |
   53|  1.46k|    igraph_int_t n;
   54|  1.46k|    igraph_int_t *already_added;
   55|       |
   56|  1.46k|    igraph_real_t no_of_conn_pairs = 0.0; /* no. of ordered pairs between which there is a path */
   57|       |
   58|  1.46k|    igraph_dqueue_int_t q = IGRAPH_DQUEUE_NULL;
  ------------------
  |  |   56|  1.46k|#define IGRAPH_DQUEUE_NULL { 0,0,0,0 }
  ------------------
   59|  1.46k|    igraph_vector_int_t *neis;
   60|  1.46k|    igraph_adjlist_t allneis;
   61|       |
   62|  1.46k|    *res = 0;
   63|  1.46k|    already_added = IGRAPH_CALLOC(no_of_nodes, igraph_int_t);
  ------------------
  |  |   33|  1.46k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   31|  2.92k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (31:12): [True: 1.46k, False: 0]
  |  |  |  |  |  Branch (31:24): [True: 1.46k, False: 0]
  |  |  |  |  |  Branch (31:66): [True: 1.46k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   64|  1.46k|    IGRAPH_CHECK_OOM(already_added, "Insufficient memory for average path length.");
  ------------------
  |  |  709|  1.46k|    do { \
  |  |  710|  1.46k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  712|      0|        } \
  |  |  713|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (713:14): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
   65|  1.46k|    IGRAPH_FINALLY(igraph_free, already_added);
  ------------------
  |  |  603|  1.46k|    do { \
  |  |  604|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  607|  1.46k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 1.46k]
  |  |  ------------------
  |  |  608|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
   66|       |
   67|  1.46k|    IGRAPH_DQUEUE_INT_INIT_FINALLY(&q, 100);
  ------------------
  |  |   61|  1.46k|    do { IGRAPH_CHECK(igraph_dqueue_int_init(q, capacity)); \
  |  |  ------------------
  |  |  |  |  656|  1.46k|    do { \
  |  |  |  |  657|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|  1.46k|        IGRAPH_FINALLY(igraph_dqueue_int_destroy, q); } while (0)
  |  |  ------------------
  |  |  |  |  603|  1.46k|    do { \
  |  |  |  |  604|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.46k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (62:64): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
   68|       |
   69|  1.46k|    IGRAPH_CHECK(igraph_adjlist_init(
  ------------------
  |  |  656|  1.46k|    do { \
  |  |  657|  2.92k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  ------------------
  |  |  |  Branch (657:40): [True: 1.46k, False: 0]
  |  |  ------------------
  |  |  658|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
   70|  1.46k|        graph, &allneis,
   71|  1.46k|        directed ? IGRAPH_OUT : IGRAPH_ALL,
   72|  1.46k|        IGRAPH_LOOPS, IGRAPH_MULTIPLE
   73|  1.46k|    ));
   74|  1.46k|    IGRAPH_FINALLY(igraph_adjlist_destroy, &allneis);
  ------------------
  |  |  603|  1.46k|    do { \
  |  |  604|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  607|  1.46k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 1.46k]
  |  |  ------------------
  |  |  608|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
   75|       |
   76|  64.2k|    for (igraph_int_t source = 0; source < no_of_nodes; source++) {
  ------------------
  |  Branch (76:35): [True: 62.7k, False: 1.46k]
  ------------------
   77|  62.7k|        IGRAPH_CHECK(igraph_dqueue_int_push(&q, source));
  ------------------
  |  |  656|  62.7k|    do { \
  |  |  657|  62.7k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  62.7k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  62.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 62.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  62.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 62.7k]
  |  |  ------------------
  ------------------
   78|  62.7k|        IGRAPH_CHECK(igraph_dqueue_int_push(&q, 0));
  ------------------
  |  |  656|  62.7k|    do { \
  |  |  657|  62.7k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  62.7k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  62.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 62.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  62.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 62.7k]
  |  |  ------------------
  ------------------
   79|  62.7k|        already_added[source] = source + 1;
   80|       |
   81|  62.7k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|  62.7k|    do { \
  |  |   47|  62.7k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 62.7k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|  62.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 62.7k]
  |  |  ------------------
  ------------------
   82|       |
   83|   355k|        while (!igraph_dqueue_int_empty(&q)) {
  ------------------
  |  Branch (83:16): [True: 292k, False: 62.7k]
  ------------------
   84|   292k|            igraph_int_t actnode = igraph_dqueue_int_pop(&q);
   85|   292k|            igraph_int_t actdist = igraph_dqueue_int_pop(&q);
   86|       |
   87|   292k|            neis = igraph_adjlist_get(&allneis, actnode);
  ------------------
  |  |   73|   292k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
   88|   292k|            n = igraph_vector_int_size(neis);
   89|   898k|            for (igraph_int_t j = 0; j < n; j++) {
  ------------------
  |  Branch (89:38): [True: 605k, False: 292k]
  ------------------
   90|   605k|                igraph_int_t neighbor = VECTOR(*neis)[j];
  ------------------
  |  |   60|   605k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   91|   605k|                if (already_added[neighbor] == source + 1) {
  ------------------
  |  Branch (91:21): [True: 375k, False: 230k]
  ------------------
   92|   375k|                    continue;
   93|   375k|                }
   94|   230k|                already_added[neighbor] = source + 1;
   95|   230k|                if (invert) {
  ------------------
  |  Branch (95:21): [True: 230k, False: 0]
  ------------------
   96|   230k|                    *res += 1.0/(actdist + 1.0);
   97|   230k|                } else {
   98|      0|                    *res += actdist + 1.0;
   99|      0|                }
  100|   230k|                no_of_conn_pairs += 1;
  101|   230k|                IGRAPH_CHECK(igraph_dqueue_int_push(&q, neighbor));
  ------------------
  |  |  656|   230k|    do { \
  |  |  657|   230k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   230k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   230k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 230k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   230k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 230k]
  |  |  ------------------
  ------------------
  102|   230k|                IGRAPH_CHECK(igraph_dqueue_int_push(&q, actdist + 1));
  ------------------
  |  |  656|   230k|    do { \
  |  |  657|   230k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   230k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   230k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 230k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   230k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 230k]
  |  |  ------------------
  ------------------
  103|   230k|            }
  104|   292k|        } /* while !igraph_dqueue_int_empty */
  105|  62.7k|    } /* for source < no_of_nodes */
  106|       |
  107|       |
  108|  1.46k|    if (no_of_pairs == 0) {
  ------------------
  |  Branch (108:9): [True: 9, False: 1.45k]
  ------------------
  109|      9|        *res = IGRAPH_NAN; /* can't average zero items */
  ------------------
  |  |  138|      9|#define IGRAPH_NAN ((double)NAN)
  ------------------
  110|  1.45k|    } else {
  111|  1.45k|        if (unconn) { /* average over connected pairs */
  ------------------
  |  Branch (111:13): [True: 0, False: 1.45k]
  ------------------
  112|      0|            if (no_of_conn_pairs == 0) {
  ------------------
  |  Branch (112:17): [True: 0, False: 0]
  ------------------
  113|      0|                *res = IGRAPH_NAN; /* can't average zero items */
  ------------------
  |  |  138|      0|#define IGRAPH_NAN ((double)NAN)
  ------------------
  114|      0|            } else {
  115|      0|                *res /= no_of_conn_pairs;
  116|      0|            }
  117|  1.45k|        } else { /* average over all pairs */
  118|       |            /* no_of_conn_pairs < no_of_pairs implies that the graph is disconnected */
  119|  1.45k|            if (no_of_conn_pairs < no_of_pairs && ! invert) {
  ------------------
  |  Branch (119:17): [True: 1.44k, False: 15]
  |  Branch (119:51): [True: 0, False: 1.44k]
  ------------------
  120|       |                /* When invert=false, assume the distance between non-connected pairs to be infinity */
  121|      0|                *res = IGRAPH_INFINITY;
  ------------------
  |  |  137|      0|#define IGRAPH_INFINITY ((double)INFINITY)
  ------------------
  122|  1.45k|            } else {
  123|       |                /* When invert=true, assume the inverse distance between non-connected pairs
  124|       |                 * to be zero. Therefore, no special treatment is needed for disconnected graphs. */
  125|  1.45k|                *res /= no_of_pairs;
  126|  1.45k|            }
  127|  1.45k|        }
  128|  1.45k|    }
  129|       |
  130|  1.46k|    if (unconnected_pairs)
  ------------------
  |  Branch (130:9): [True: 0, False: 1.46k]
  ------------------
  131|      0|        *unconnected_pairs = no_of_pairs - no_of_conn_pairs;
  132|       |
  133|       |    /* clean */
  134|  1.46k|    IGRAPH_FREE(already_added);
  ------------------
  |  |   36|  1.46k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  135|  1.46k|    igraph_dqueue_int_destroy(&q);
  136|  1.46k|    igraph_adjlist_destroy(&allneis);
  137|  1.46k|    IGRAPH_FINALLY_CLEAN(3);
  138|       |
  139|  1.46k|    return IGRAPH_SUCCESS;
  140|  1.46k|}
shortest_paths.c:igraph_i_local_efficiency_unweighted:
  422|  62.7k|{
  423|       |
  424|  62.7k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  425|  62.7k|    igraph_int_t vertex_neis_size;
  426|  62.7k|    igraph_int_t neighbor_count; /* unlike 'vertex_neis_size', 'neighbor_count' does not count self-loops and multi-edges */
  427|       |
  428|  62.7k|    igraph_dqueue_int_clear(q);
  429|       |
  430|       |    /* already_counted[i] is 0 iff vertex i was not reached so far, otherwise
  431|       |     * it is the index of the source vertex in vertex_neis that it was reached
  432|       |     * from, plus 1 */
  433|  62.7k|    memset(already_counted, 0, no_of_nodes * sizeof(already_counted[0]));
  434|       |
  435|  62.7k|    IGRAPH_CHECK(igraph_neighbors(graph, vertex_neis, vertex, mode, IGRAPH_LOOPS, IGRAPH_MULTIPLE));
  ------------------
  |  |  656|  62.7k|    do { \
  |  |  657|  62.7k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  62.7k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  62.7k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 62.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  62.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 62.7k]
  |  |  ------------------
  ------------------
  436|  62.7k|    vertex_neis_size = igraph_vector_int_size(vertex_neis);
  437|       |
  438|  62.7k|    igraph_vector_char_null(nei_mask);
  439|  62.7k|    neighbor_count = 0;
  440|   105k|    for (igraph_int_t i=0; i < vertex_neis_size; ++i) {
  ------------------
  |  Branch (440:28): [True: 42.6k, False: 62.7k]
  ------------------
  441|  42.6k|        igraph_int_t v = VECTOR(*vertex_neis)[i];
  ------------------
  |  |   60|  42.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  442|  42.6k|        if (v != vertex && ! VECTOR(*nei_mask)[v]) {
  ------------------
  |  |   60|  38.6k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (442:13): [True: 38.6k, False: 4.01k]
  |  Branch (442:28): [True: 30.5k, False: 8.10k]
  ------------------
  443|  30.5k|            VECTOR(*nei_mask)[v] = 1; /* mark as unprocessed neighbour */
  ------------------
  |  |   60|  30.5k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  444|  30.5k|            neighbor_count++;
  445|  30.5k|        }
  446|  42.6k|    }
  447|       |
  448|  62.7k|    *res = 0.0;
  449|       |
  450|       |    /* when the neighbor count is smaller than 2, we return 0.0 */
  451|  62.7k|    if (neighbor_count < 2) {
  ------------------
  |  Branch (451:9): [True: 56.6k, False: 6.09k]
  ------------------
  452|  56.6k|        return IGRAPH_SUCCESS;
  453|  56.6k|    }
  454|       |
  455|  34.3k|    for (igraph_int_t i=0; i < vertex_neis_size; ++i) {
  ------------------
  |  Branch (455:28): [True: 28.2k, False: 6.09k]
  ------------------
  456|  28.2k|        igraph_int_t source = VECTOR(*vertex_neis)[i];
  ------------------
  |  |   60|  28.2k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  457|  28.2k|        igraph_int_t reached = 0;
  458|       |
  459|  28.2k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|  28.2k|    do { \
  |  |   47|  28.2k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 28.2k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|  28.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 28.2k]
  |  |  ------------------
  ------------------
  460|       |
  461|  28.2k|        if (source == vertex)
  ------------------
  |  Branch (461:13): [True: 1.10k, False: 27.1k]
  ------------------
  462|  1.10k|            continue;
  463|       |
  464|  27.1k|        if (VECTOR(*nei_mask)[source] == 2)
  ------------------
  |  |   60|  27.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (464:13): [True: 4.00k, False: 23.1k]
  ------------------
  465|  4.00k|            continue;
  466|       |
  467|  23.1k|        VECTOR(*nei_mask)[source] = 2; /* mark neighbour as already processed */
  ------------------
  |  |   60|  23.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  468|       |
  469|  23.1k|        IGRAPH_CHECK(igraph_dqueue_int_push(q, source));
  ------------------
  |  |  656|  23.1k|    do { \
  |  |  657|  23.1k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  23.1k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  23.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 23.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  23.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 23.1k]
  |  |  ------------------
  ------------------
  470|  23.1k|        IGRAPH_CHECK(igraph_dqueue_int_push(q, 0));
  ------------------
  |  |  656|  23.1k|    do { \
  |  |  657|  23.1k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  23.1k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  23.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 23.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  23.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 23.1k]
  |  |  ------------------
  ------------------
  471|  23.1k|        already_counted[source] = i + 1;
  472|       |
  473|   435k|        while (!igraph_dqueue_int_empty(q)) {
  ------------------
  |  Branch (473:16): [True: 412k, False: 23.1k]
  ------------------
  474|   412k|            igraph_vector_int_t *act_neis;
  475|   412k|            igraph_int_t act_neis_size;
  476|   412k|            igraph_int_t act = igraph_dqueue_int_pop(q);
  477|   412k|            igraph_int_t actdist = igraph_dqueue_int_pop(q);
  478|       |
  479|   412k|            if (act != source && VECTOR(*nei_mask)[act]) {
  ------------------
  |  |   60|   389k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (479:17): [True: 389k, False: 23.1k]
  |  Branch (479:34): [True: 59.9k, False: 329k]
  ------------------
  480|  59.9k|                *res += 1.0 / actdist;
  481|  59.9k|                reached++;
  482|  59.9k|                if (reached == neighbor_count) {
  ------------------
  |  Branch (482:21): [True: 0, False: 59.9k]
  ------------------
  483|      0|                    igraph_dqueue_int_clear(q);
  484|      0|                    break;
  485|      0|                }
  486|  59.9k|            }
  487|       |
  488|   412k|            act_neis      = igraph_adjlist_get(adjlist, act);
  ------------------
  |  |   73|   412k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  489|   412k|            act_neis_size = igraph_vector_int_size(act_neis);
  490|  1.65M|            for (igraph_int_t j = 0; j < act_neis_size; j++) {
  ------------------
  |  Branch (490:38): [True: 1.24M, False: 412k]
  ------------------
  491|  1.24M|                igraph_int_t neighbor = VECTOR(*act_neis)[j];
  ------------------
  |  |   60|  1.24M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  492|       |
  493|  1.24M|                if (neighbor == vertex || already_counted[neighbor] == i + 1)
  ------------------
  |  Branch (493:21): [True: 65.9k, False: 1.18M]
  |  Branch (493:43): [True: 790k, False: 389k]
  ------------------
  494|   856k|                    continue;
  495|       |
  496|   389k|                already_counted[neighbor] = i + 1;
  497|   389k|                IGRAPH_CHECK(igraph_dqueue_int_push(q, neighbor));
  ------------------
  |  |  656|   389k|    do { \
  |  |  657|   389k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   389k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   389k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 389k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   389k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 389k]
  |  |  ------------------
  ------------------
  498|   389k|                IGRAPH_CHECK(igraph_dqueue_int_push(q, actdist + 1));
  ------------------
  |  |  656|   389k|    do { \
  |  |  657|   389k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|   389k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|   389k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 389k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|   389k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 389k]
  |  |  ------------------
  ------------------
  499|   389k|            }
  500|   412k|        }
  501|  23.1k|    }
  502|       |
  503|  6.09k|    *res /= neighbor_count * (neighbor_count - 1.0);
  504|       |
  505|  6.09k|    return IGRAPH_SUCCESS;
  506|  6.09k|}

igraph_spanner:
  153|  1.46k|        igraph_real_t stretch, const igraph_vector_t *weights) {
  154|       |
  155|  1.46k|    const igraph_int_t no_of_nodes = igraph_vcount(graph);
  156|  1.46k|    const igraph_int_t no_of_edges = igraph_ecount(graph);
  157|  1.46k|    igraph_int_t nlen, neighbor, cluster;
  158|  1.46k|    igraph_real_t sample_prob, k = (stretch + 1) / 2, weight, lightest_sampled_weight;
  159|  1.46k|    igraph_vector_int_t clustering, lightest_eid;
  160|  1.46k|    igraph_vector_t lightest_weight;
  161|  1.46k|    igraph_bitset_t is_cluster_sampled;
  162|  1.46k|    igraph_bitset_t is_edge_in_spanner;
  163|  1.46k|    igraph_vector_int_t new_clustering;
  164|  1.46k|    igraph_vector_int_t dirty_vids;
  165|  1.46k|    igraph_vector_int_t *adjacent_vertices;
  166|  1.46k|    igraph_vector_int_t *incident_edges;
  167|  1.46k|    igraph_adjlist_t adjlist;
  168|  1.46k|    igraph_inclist_t inclist;
  169|  1.46k|    igraph_int_t edge;
  170|  1.46k|    igraph_int_t index;
  171|       |
  172|  1.46k|    if (spanner == NULL) {
  ------------------
  |  Branch (172:9): [True: 0, False: 1.46k]
  ------------------
  173|      0|        return IGRAPH_SUCCESS;
  174|      0|    }
  175|       |
  176|       |    /* Test validity of stretch factor */
  177|  1.46k|    if (stretch < 1) {
  ------------------
  |  Branch (177:9): [True: 0, False: 1.46k]
  ------------------
  178|      0|        IGRAPH_ERROR("Stretch factor must be at least 1.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  179|      0|    }
  180|       |
  181|       |    /* Test validity of weights vector */
  182|  1.46k|    if (weights) {
  ------------------
  |  Branch (182:9): [True: 0, False: 1.46k]
  ------------------
  183|      0|        if (igraph_vector_size(weights) != no_of_edges) {
  ------------------
  |  Branch (183:13): [True: 0, False: 0]
  ------------------
  184|      0|            IGRAPH_ERROR("Weight vector length does not match.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  185|      0|        }
  186|      0|        if (no_of_edges > 0) {
  ------------------
  |  Branch (186:13): [True: 0, False: 0]
  ------------------
  187|      0|            igraph_real_t min = igraph_vector_min(weights);
  188|      0|            if (min < 0) {
  ------------------
  |  Branch (188:17): [True: 0, False: 0]
  ------------------
  189|      0|                IGRAPH_ERROR("Weight vector must be non-negative.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  190|      0|            }
  191|      0|            else if (isnan(min)) {
  ------------------
  |  Branch (191:22): [True: 0, False: 0]
  ------------------
  192|      0|                IGRAPH_ERROR("Weight vector must not contain NaN values.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  193|      0|            }
  194|      0|        }
  195|      0|    }
  196|       |
  197|       |    // Clear the vector that will contain the IDs of the edges in the spanner
  198|  1.46k|    igraph_vector_int_clear(spanner);
  199|       |
  200|       |    // Create an incidence list representation of the graph and also create the
  201|       |    // corresponding adjacency list. The residual graph will not be constructed
  202|       |    // explicitly; it will only exist in terms of the incidence and the adjacency
  203|       |    // lists, maintained in parallel as the edges are removed from the residual
  204|       |    // graph.
  205|  1.46k|    IGRAPH_CHECK(igraph_inclist_init(graph, &inclist, IGRAPH_ALL, IGRAPH_NO_LOOPS));
  ------------------
  |  |  656|  1.46k|    do { \
  |  |  657|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
  206|  1.46k|    IGRAPH_FINALLY(igraph_inclist_destroy, &inclist);
  ------------------
  |  |  603|  1.46k|    do { \
  |  |  604|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  607|  1.46k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 1.46k]
  |  |  ------------------
  |  |  608|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
  207|  1.46k|    IGRAPH_CHECK(igraph_adjlist_init_from_inclist(graph, &adjlist, &inclist));
  ------------------
  |  |  656|  1.46k|    do { \
  |  |  657|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
  208|  1.46k|    IGRAPH_FINALLY(igraph_adjlist_destroy, &adjlist);
  ------------------
  |  |  603|  1.46k|    do { \
  |  |  604|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  607|  1.46k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 1.46k]
  |  |  ------------------
  |  |  608|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
  209|       |
  210|       |    // Phase 1: forming the clusters
  211|       |    // Create a vector which maps the nodes to the centers of the corresponding
  212|       |    // clusters. At the beginning each node is its own cluster center.
  213|  1.46k|    IGRAPH_CHECK(igraph_vector_int_init_range(&clustering, 0, no_of_nodes));
  ------------------
  |  |  656|  1.46k|    do { \
  |  |  657|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
  214|  1.46k|    IGRAPH_FINALLY(igraph_vector_int_destroy, &clustering);
  ------------------
  |  |  603|  1.46k|    do { \
  |  |  604|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  607|  1.46k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 1.46k]
  |  |  ------------------
  |  |  608|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
  215|       |
  216|       |    // A mapping vector which indicates the neighboring edge with the smallest
  217|       |    // weight for each cluster central, for a single vertex of interest.
  218|       |    // Preconditions needed by collect_lightest_edges_to_clusters()
  219|       |    // are enforced here.
  220|  1.46k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&lightest_eid, no_of_nodes);
  ------------------
  |  |  119|  1.46k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  1.46k|    do { \
  |  |  |  |  657|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  1.46k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  1.46k|    do { \
  |  |  |  |  604|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.46k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
  221|  1.46k|    igraph_vector_int_fill(&lightest_eid, -1);
  222|       |
  223|       |    // A mapping vector which indicated the minimum weight to each neighboring
  224|       |    // cluster, for a single vertex of interest.
  225|       |    // Preconditions needed by collect_lightest_edges_to_clusters()
  226|       |    // are enforced here.
  227|  1.46k|    IGRAPH_VECTOR_INIT_FINALLY(&lightest_weight, no_of_nodes);
  ------------------
  |  |  104|  1.46k|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  1.46k|    do { \
  |  |  |  |  657|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  1.46k|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  1.46k|    do { \
  |  |  |  |  604|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.46k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (105:60): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
  228|  1.46k|    igraph_vector_fill(&lightest_weight, IGRAPH_INFINITY);
  ------------------
  |  |  137|  1.46k|#define IGRAPH_INFINITY ((double)INFINITY)
  ------------------
  229|       |
  230|  1.46k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&new_clustering, no_of_nodes);
  ------------------
  |  |  119|  1.46k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  1.46k|    do { \
  |  |  |  |  657|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  1.46k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  1.46k|    do { \
  |  |  |  |  604|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.46k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
  231|       |
  232|       |    // A boolean vector whose i-th element is 1 if the i-th vertex is a cluster
  233|       |    // center that is sampled in the current iteration, 0 otherwise
  234|  1.46k|    IGRAPH_BITSET_INIT_FINALLY(&is_cluster_sampled, no_of_nodes);
  ------------------
  |  |  259|  1.46k|#define IGRAPH_BITSET_INIT_FINALLY(bitset, size) \
  |  |  260|  1.46k|do { IGRAPH_CHECK(igraph_bitset_init(bitset, size)); \
  |  |  ------------------
  |  |  |  |  656|  1.46k|    do { \
  |  |  |  |  657|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  261|  1.46k|     IGRAPH_FINALLY(igraph_bitset_destroy, bitset); } while (0)
  |  |  ------------------
  |  |  |  |  603|  1.46k|    do { \
  |  |  |  |  604|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.46k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (261:62): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
  235|  1.46k|    IGRAPH_BITSET_INIT_FINALLY(&is_edge_in_spanner, no_of_edges);
  ------------------
  |  |  259|  1.46k|#define IGRAPH_BITSET_INIT_FINALLY(bitset, size) \
  |  |  260|  1.46k|do { IGRAPH_CHECK(igraph_bitset_init(bitset, size)); \
  |  |  ------------------
  |  |  |  |  656|  1.46k|    do { \
  |  |  |  |  657|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  261|  1.46k|     IGRAPH_FINALLY(igraph_bitset_destroy, bitset); } while (0)
  |  |  ------------------
  |  |  |  |  603|  1.46k|    do { \
  |  |  |  |  604|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.46k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (261:62): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
  236|       |
  237|       |    // Temporary vector used by collect_lightest_edges_to_clusters()
  238|       |    // to keep track of the nodes that it has written to
  239|  1.46k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&dirty_vids, 0);
  ------------------
  |  |  119|  1.46k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  1.46k|    do { \
  |  |  |  |  657|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  1.46k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  1.46k|    do { \
  |  |  |  |  604|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.46k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
  240|       |
  241|  1.46k|    sample_prob = pow((igraph_real_t) no_of_nodes, -1 / k);
  242|       |
  243|  1.46k|#define ADD_EDGE_TO_SPANNER \
  244|  1.46k|    do { if (!IGRAPH_BIT_TEST(is_edge_in_spanner, edge)) { \
  245|  1.46k|        IGRAPH_BIT_SET(is_edge_in_spanner, edge); \
  246|  1.46k|        IGRAPH_CHECK(igraph_vector_int_push_back(spanner, edge)); \
  247|  1.46k|    } } while (0)
  248|       |
  249|  1.46k|    igraph_vector_fill(&lightest_weight, IGRAPH_INFINITY);
  ------------------
  |  |  137|  1.46k|#define IGRAPH_INFINITY ((double)INFINITY)
  ------------------
  250|       |
  251|  2.92k|    for (igraph_int_t i = 0; i < k - 1; i++) {
  ------------------
  |  Branch (251:30): [True: 1.46k, False: 1.46k]
  ------------------
  252|  1.46k|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   46|  1.46k|    do { \
  |  |   47|  1.46k|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (47:13): [True: 0, False: 1.46k]
  |  |  ------------------
  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |   50|      0|            } \
  |  |   51|      0|        } \
  |  |   52|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (52:14): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
  253|       |
  254|  1.46k|        igraph_vector_int_fill(&new_clustering, -1);
  255|  1.46k|        igraph_bitset_null(&is_cluster_sampled);
  256|       |
  257|       |        // Step 1: sample cluster centers
  258|  64.2k|        for (igraph_int_t j = 0; j < no_of_nodes; j++) {
  ------------------
  |  Branch (258:34): [True: 62.7k, False: 1.46k]
  ------------------
  259|  62.7k|            if (VECTOR(clustering)[j] == j && RNG_UNIF01() < sample_prob) {
  ------------------
  |  |   60|  62.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          if (VECTOR(clustering)[j] == j && RNG_UNIF01() < sample_prob) {
  ------------------
  |  |  155|  62.7k|#define RNG_UNIF01()     (igraph_rng_get_unif01(igraph_rng_default()))
  ------------------
  |  Branch (259:17): [True: 62.7k, False: 0]
  |  Branch (259:47): [True: 5.09k, False: 57.6k]
  ------------------
  260|  5.09k|                IGRAPH_BIT_SET(is_cluster_sampled, j);
  ------------------
  |  |  103|  5.09k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|  5.09k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|  5.09k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  5.09k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|  5.09k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  5.09k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  261|  5.09k|            }
  262|  62.7k|        }
  263|       |
  264|       |        // Step 2 and 3
  265|  64.2k|        for (igraph_int_t v = 0; v < no_of_nodes; v++) {
  ------------------
  |  Branch (265:34): [True: 62.7k, False: 1.46k]
  ------------------
  266|       |            // If v is inside a cluster and the cluster of v is sampled, then continue
  267|  62.7k|            cluster = VECTOR(clustering)[v];
  ------------------
  |  |   60|  62.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  268|  62.7k|            if (cluster != -1 && IGRAPH_BIT_TEST(is_cluster_sampled, cluster)) {
  ------------------
  |  |  142|  62.7k|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|  62.7k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|  62.7k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  62.7k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|  62.7k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  62.7k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (142:36): [True: 5.09k, False: 57.6k]
  |  |  ------------------
  ------------------
  |  Branch (268:17): [True: 62.7k, False: 0]
  ------------------
  269|  5.09k|                VECTOR(new_clustering)[v] = cluster;
  ------------------
  |  |   60|  5.09k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  270|  5.09k|                continue;
  271|  5.09k|            }
  272|       |
  273|       |            // Step 2: find the lightest edge that connects vertex v to its
  274|       |            // neighboring sampled clusters
  275|  57.6k|            igraph_int_t nearest_neighboring_sampled_cluster = -1;
  276|  57.6k|            IGRAPH_CHECK(collect_lightest_edges_to_clusters(
  ------------------
  |  |  656|  57.6k|    do { \
  |  |  657|  57.6k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  57.6k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  57.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 57.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  57.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 57.6k]
  |  |  ------------------
  ------------------
  277|  57.6k|                    &adjlist,
  278|  57.6k|                    &inclist,
  279|  57.6k|                    weights,
  280|  57.6k|                    &clustering,
  281|  57.6k|                    &is_cluster_sampled,
  282|  57.6k|                    v,
  283|  57.6k|                    &lightest_eid,
  284|  57.6k|                    &lightest_weight,
  285|  57.6k|                    &dirty_vids,
  286|  57.6k|                    &nearest_neighboring_sampled_cluster
  287|  57.6k|            ));
  288|       |
  289|       |            // Step 3: add edges to spanner
  290|  57.6k|            if (nearest_neighboring_sampled_cluster == -1) {
  ------------------
  |  Branch (290:17): [True: 54.7k, False: 2.93k]
  ------------------
  291|       |                // Case 3(a) from the paper: v is not adjacent to any of the
  292|       |                // sampled clusters.
  293|       |
  294|       |                // Add lightest edge which connects vertex v to each neighboring
  295|       |                // cluster (none of which are sampled)
  296|  3.04M|                for (igraph_int_t j = 0; j < no_of_nodes; j++) {
  ------------------
  |  Branch (296:42): [True: 2.98M, False: 54.7k]
  ------------------
  297|  2.98M|                    edge = VECTOR(lightest_eid)[j];
  ------------------
  |  |   60|  2.98M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  298|  2.98M|                    if (edge != -1) {
  ------------------
  |  Branch (298:25): [True: 23.0k, False: 2.96M]
  ------------------
  299|  23.0k|                        ADD_EDGE_TO_SPANNER;
  ------------------
  |  |  244|  23.0k|    do { if (!IGRAPH_BIT_TEST(is_edge_in_spanner, edge)) { \
  |  |  ------------------
  |  |  |  |  142|  23.0k|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  23.0k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  |  |  ------------------
  |  |  |  |  |  |   85|  23.0k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   32|  23.0k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|  23.0k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   32|  23.0k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (244:14): [True: 23.0k, False: 0]
  |  |  ------------------
  |  |  245|  23.0k|        IGRAPH_BIT_SET(is_edge_in_spanner, edge); \
  |  |  ------------------
  |  |  |  |  103|  23.0k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  23.0k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  |  |  ------------------
  |  |  |  |  |  |   85|  23.0k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   32|  23.0k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|  23.0k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   32|  23.0k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  246|  23.0k|        IGRAPH_CHECK(igraph_vector_int_push_back(spanner, edge)); \
  |  |  ------------------
  |  |  |  |  656|  23.0k|    do { \
  |  |  |  |  657|  23.0k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  23.0k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  23.0k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 23.0k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  23.0k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 23.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  247|  23.0k|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (247:16): [Folded, False: 23.0k]
  |  |  ------------------
  ------------------
  300|  23.0k|                    }
  301|  2.98M|                }
  302|       |
  303|       |                // Remove all edges incident on v from the graph. Note that each
  304|       |                // edge being removed occurs twice in the adjacency / incidence
  305|       |                // lists
  306|  54.7k|                adjacent_vertices = igraph_adjlist_get(&adjlist, v);
  ------------------
  |  |   73|  54.7k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  307|  54.7k|                incident_edges = igraph_inclist_get(&inclist, v);
  ------------------
  |  |  102|  54.7k|#define igraph_inclist_get(il,no) (&(il)->incs[(igraph_int_t)(no)])
  ------------------
  308|  54.7k|                nlen = igraph_vector_int_size(incident_edges);
  309|  80.1k|                for (igraph_int_t j = 0; j < nlen; j++) {
  ------------------
  |  Branch (309:42): [True: 25.4k, False: 54.7k]
  ------------------
  310|  25.4k|                    neighbor = VECTOR(*adjacent_vertices)[j];
  ------------------
  |  |   60|  25.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  311|  25.4k|                    if (neighbor == v) {
  ------------------
  |  Branch (311:25): [True: 0, False: 25.4k]
  ------------------
  312|       |                        /* should not happen as we did not ask for loop edges in
  313|       |                         * the adjacency / incidence lists, but let's be defensive */
  314|      0|                        continue;
  315|      0|                    }
  316|       |
  317|  25.4k|                    if (igraph_vector_int_search(
  ------------------
  |  Branch (317:25): [True: 25.4k, False: 0]
  ------------------
  318|  25.4k|                        igraph_inclist_get(&inclist, neighbor),
  ------------------
  |  |  102|  25.4k|#define igraph_inclist_get(il,no) (&(il)->incs[(igraph_int_t)(no)])
  ------------------
  319|  25.4k|                        0,
  320|  25.4k|                        VECTOR(*incident_edges)[j],
  ------------------
  |  |   60|  25.4k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  321|  25.4k|                        &index
  322|  25.4k|                    )) {
  323|  25.4k|                        igraph_vector_int_remove_fast(igraph_adjlist_get(&adjlist, neighbor), index);
  ------------------
  |  |   73|  25.4k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  324|  25.4k|                        igraph_vector_int_remove_fast(igraph_inclist_get(&inclist, neighbor), index);
  ------------------
  |  |  102|  25.4k|#define igraph_inclist_get(il,no) (&(il)->incs[(igraph_int_t)(no)])
  ------------------
  325|  25.4k|                    }
  326|  25.4k|                }
  327|  54.7k|                igraph_vector_int_clear(adjacent_vertices);
  328|  54.7k|                igraph_vector_int_clear(incident_edges);
  329|  54.7k|            } else {
  330|       |                // Case 3(b) from the paper: v is adjacent to at least one of
  331|       |                // the sampled clusters
  332|       |
  333|       |                // add the edge connecting to the lightest sampled cluster
  334|  2.93k|                edge = VECTOR(lightest_eid)[nearest_neighboring_sampled_cluster];
  ------------------
  |  |   60|  2.93k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  335|  2.93k|                ADD_EDGE_TO_SPANNER;
  ------------------
  |  |  244|  2.93k|    do { if (!IGRAPH_BIT_TEST(is_edge_in_spanner, edge)) { \
  |  |  ------------------
  |  |  |  |  142|  2.93k|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  2.93k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  |  |  ------------------
  |  |  |  |  |  |   85|  2.93k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   32|  2.93k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|  2.93k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   32|  2.93k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (244:14): [True: 2.93k, False: 0]
  |  |  ------------------
  |  |  245|  2.93k|        IGRAPH_BIT_SET(is_edge_in_spanner, edge); \
  |  |  ------------------
  |  |  |  |  103|  2.93k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  2.93k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  |  |  ------------------
  |  |  |  |  |  |   85|  2.93k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   32|  2.93k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|  2.93k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   32|  2.93k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  246|  2.93k|        IGRAPH_CHECK(igraph_vector_int_push_back(spanner, edge)); \
  |  |  ------------------
  |  |  |  |  656|  2.93k|    do { \
  |  |  |  |  657|  2.93k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.93k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.93k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.93k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.93k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.93k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  247|  2.93k|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (247:16): [Folded, False: 2.93k]
  |  |  ------------------
  ------------------
  336|       |
  337|       |                // 'lightest_sampled_weight' is the weight of the lightest edge connecting v to
  338|       |                // one of the sampled clusters. This is where v will belong in
  339|       |                // the new clustering.
  340|  2.93k|                lightest_sampled_weight = VECTOR(lightest_weight)[nearest_neighboring_sampled_cluster];
  ------------------
  |  |   60|  2.93k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  341|  2.93k|                VECTOR(new_clustering)[v] = nearest_neighboring_sampled_cluster;
  ------------------
  |  |   60|  2.93k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  342|       |
  343|       |                // Add to the spanner light edges with weight less than 'lightest_sampled_weight'
  344|   147k|                for (igraph_int_t j = 0; j < no_of_nodes; j++) {
  ------------------
  |  Branch (344:42): [True: 144k, False: 2.93k]
  ------------------
  345|   144k|                    if (VECTOR(lightest_weight)[j] < lightest_sampled_weight) {
  ------------------
  |  |   60|   144k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (345:25): [True: 0, False: 144k]
  ------------------
  346|      0|                        edge = VECTOR(lightest_eid)[j];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  347|      0|                        ADD_EDGE_TO_SPANNER;
  ------------------
  |  |  244|      0|    do { if (!IGRAPH_BIT_TEST(is_edge_in_spanner, edge)) { \
  |  |  ------------------
  |  |  |  |  142|      0|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  |  |  ------------------
  |  |  |  |  |  |   85|      0|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   32|      0|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      0|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   32|      0|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (244:14): [True: 0, False: 0]
  |  |  ------------------
  |  |  245|      0|        IGRAPH_BIT_SET(is_edge_in_spanner, edge); \
  |  |  ------------------
  |  |  |  |  103|      0|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  |  |  ------------------
  |  |  |  |  |  |   85|      0|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   32|      0|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      0|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   32|      0|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  246|      0|        IGRAPH_CHECK(igraph_vector_int_push_back(spanner, edge)); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  247|      0|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (247:16): [Folded, False: 0]
  |  |  ------------------
  ------------------
  348|      0|                    }
  349|   144k|                }
  350|       |
  351|       |                // Remove edges to centers with edge weight less than 'lightest_sampled_weight'
  352|  2.93k|                adjacent_vertices = igraph_adjlist_get(&adjlist, v);
  ------------------
  |  |   73|  2.93k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  353|  2.93k|                incident_edges = igraph_inclist_get(&inclist, v);
  ------------------
  |  |  102|  2.93k|#define igraph_inclist_get(il,no) (&(il)->incs[(igraph_int_t)(no)])
  ------------------
  354|  2.93k|                nlen = igraph_vector_int_size(incident_edges);
  355|  25.3k|                for (igraph_int_t j = 0; j < nlen; j++) {
  ------------------
  |  Branch (355:42): [True: 22.3k, False: 2.93k]
  ------------------
  356|  22.3k|                    neighbor = VECTOR(*adjacent_vertices)[j];
  ------------------
  |  |   60|  22.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  357|  22.3k|                    if (neighbor == v) {
  ------------------
  |  Branch (357:25): [True: 0, False: 22.3k]
  ------------------
  358|       |                        /* should not happen as we did not ask for loop edges in
  359|       |                         * the adjacency / incidence lists, but let's be defensive */
  360|      0|                        continue;
  361|      0|                    }
  362|       |
  363|  22.3k|                    cluster = VECTOR(clustering)[neighbor];
  ------------------
  |  |   60|  22.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  364|  22.3k|                    weight = VECTOR(lightest_weight)[cluster];
  ------------------
  |  |   60|  22.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  365|  22.3k|                    if ((cluster == nearest_neighboring_sampled_cluster) || (weight < lightest_sampled_weight)) {
  ------------------
  |  Branch (365:25): [True: 6.27k, False: 16.1k]
  |  Branch (365:77): [True: 0, False: 16.1k]
  ------------------
  366|  6.27k|                        edge = VECTOR(*incident_edges)[j];
  ------------------
  |  |   60|  6.27k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  367|       |
  368|  6.27k|                        if (igraph_vector_int_search(
  ------------------
  |  Branch (368:29): [True: 6.27k, False: 0]
  ------------------
  369|  6.27k|                            igraph_inclist_get(&inclist, neighbor), 0, edge, &index
  ------------------
  |  |  102|  6.27k|#define igraph_inclist_get(il,no) (&(il)->incs[(igraph_int_t)(no)])
  ------------------
  370|  6.27k|                        )) {
  371|  6.27k|                            igraph_vector_int_remove_fast(igraph_adjlist_get(&adjlist, neighbor), index);
  ------------------
  |  |   73|  6.27k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  372|  6.27k|                            igraph_vector_int_remove_fast(igraph_inclist_get(&inclist, neighbor), index);
  ------------------
  |  |  102|  6.27k|#define igraph_inclist_get(il,no) (&(il)->incs[(igraph_int_t)(no)])
  ------------------
  373|  6.27k|                        }
  374|       |
  375|  6.27k|                        igraph_vector_int_remove_fast(adjacent_vertices, j);
  376|  6.27k|                        igraph_vector_int_remove_fast(incident_edges, j);
  377|       |
  378|  6.27k|                        j--;
  379|  6.27k|                        nlen--;
  380|  6.27k|                    }
  381|  22.3k|                }
  382|  2.93k|            }
  383|       |
  384|       |            // We don't need lightest_eids and lightest_weights anymore so
  385|       |            // clear them in O(d) time
  386|  57.6k|            clear_lightest_edges_to_clusters(
  387|  57.6k|                    &dirty_vids, &lightest_eid, &lightest_weight
  388|  57.6k|            );
  389|  57.6k|        }
  390|       |
  391|       |        // Commit the new clustering
  392|  1.46k|        igraph_vector_int_update(&clustering, &new_clustering); /* reserved */
  393|       |
  394|       |        // Remove intra-cluster edges
  395|  64.2k|        for (igraph_int_t v = 0; v < no_of_nodes; v++) {
  ------------------
  |  Branch (395:34): [True: 62.7k, False: 1.46k]
  ------------------
  396|  62.7k|            adjacent_vertices = igraph_adjlist_get(&adjlist, v);
  ------------------
  |  |   73|  62.7k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  397|  62.7k|            incident_edges = igraph_inclist_get(&inclist, v);
  ------------------
  |  |  102|  62.7k|#define igraph_inclist_get(il,no) (&(il)->incs[(igraph_int_t)(no)])
  ------------------
  398|  62.7k|            nlen = igraph_vector_int_size(incident_edges);
  399|  76.7k|            for (igraph_int_t j = 0; j < nlen; j++) {
  ------------------
  |  Branch (399:38): [True: 13.9k, False: 62.7k]
  ------------------
  400|  13.9k|                neighbor = VECTOR(*adjacent_vertices)[j];
  ------------------
  |  |   60|  13.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  401|  13.9k|                edge = VECTOR(*incident_edges)[j];
  ------------------
  |  |   60|  13.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  402|       |
  403|  13.9k|                if (VECTOR(clustering)[neighbor] == VECTOR(clustering)[v]) {
  ------------------
  |  |   60|  13.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                              if (VECTOR(clustering)[neighbor] == VECTOR(clustering)[v]) {
  ------------------
  |  |   60|  13.9k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (403:21): [True: 4.72k, False: 9.21k]
  ------------------
  404|       |                    /* We don't need to bother with removing the other copy
  405|       |                     * of the edge from the incidence lists (and the corresponding
  406|       |                     * vertices from the adjacency lists) because we will find
  407|       |                     * them anyway as we are iterating over all nodes */
  408|  4.72k|                    igraph_vector_int_remove_fast(adjacent_vertices, j);
  409|  4.72k|                    igraph_vector_int_remove_fast(incident_edges, j);
  410|  4.72k|                    j--;
  411|  4.72k|                    nlen--;
  412|  4.72k|                }
  413|  13.9k|            }
  414|  62.7k|        }
  415|  1.46k|    }
  416|       |
  417|       |    // Phase 2: vertex_clustering joining
  418|  64.2k|    for (igraph_int_t v = 0; v < no_of_nodes; v++) {
  ------------------
  |  Branch (418:30): [True: 62.7k, False: 1.46k]
  ------------------
  419|  62.7k|        if (VECTOR(clustering)[v] != -1) {
  ------------------
  |  |   60|  62.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (419:13): [True: 8.02k, False: 54.7k]
  ------------------
  420|  8.02k|            IGRAPH_CHECK(collect_lightest_edges_to_clusters(
  ------------------
  |  |  656|  8.02k|    do { \
  |  |  657|  8.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  8.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  8.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 8.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  8.02k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 8.02k]
  |  |  ------------------
  ------------------
  421|  8.02k|                    &adjlist,
  422|  8.02k|                    &inclist,
  423|  8.02k|                    weights,
  424|  8.02k|                    &clustering,
  425|  8.02k|                    /* is_cluster_sampled = */ NULL,
  426|  8.02k|                    v,
  427|  8.02k|                    &lightest_eid,
  428|  8.02k|                    &lightest_weight,
  429|  8.02k|                    &dirty_vids,
  430|  8.02k|                    NULL
  431|  8.02k|            ));
  432|   363k|            for (igraph_int_t j = 0; j < no_of_nodes; j++) {
  ------------------
  |  Branch (432:38): [True: 355k, False: 8.02k]
  ------------------
  433|   355k|                edge = VECTOR(lightest_eid)[j];
  ------------------
  |  |   60|   355k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  434|   355k|                if (edge != -1) {
  ------------------
  |  Branch (434:21): [True: 3.20k, False: 352k]
  ------------------
  435|  3.20k|                    ADD_EDGE_TO_SPANNER;
  ------------------
  |  |  244|  3.20k|    do { if (!IGRAPH_BIT_TEST(is_edge_in_spanner, edge)) { \
  |  |  ------------------
  |  |  |  |  142|  3.20k|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  3.20k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  |  |  ------------------
  |  |  |  |  |  |   85|  3.20k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   32|  3.20k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|  3.20k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   32|  3.20k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (244:14): [True: 2.02k, False: 1.17k]
  |  |  ------------------
  |  |  245|  2.02k|        IGRAPH_BIT_SET(is_edge_in_spanner, edge); \
  |  |  ------------------
  |  |  |  |  103|  2.02k|#define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  |  |  ------------------
  |  |  |  |  |  |   60|  2.02k|#define VECTOR(v) ((v).stor_begin)
  |  |  |  |  ------------------
  |  |  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  |  |  ------------------
  |  |  |  |  |  |   85|  2.02k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   32|  2.02k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define IGRAPH_BIT_SET(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] |= IGRAPH_BIT_MASK(i))
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|  2.02k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   32|  2.02k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  246|  2.02k|        IGRAPH_CHECK(igraph_vector_int_push_back(spanner, edge)); \
  |  |  ------------------
  |  |  |  |  656|  2.02k|    do { \
  |  |  |  |  657|  2.02k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.02k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.02k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.02k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  247|  3.20k|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (247:16): [Folded, False: 3.20k]
  |  |  ------------------
  ------------------
  436|  3.20k|                }
  437|   355k|            }
  438|  8.02k|            clear_lightest_edges_to_clusters(&dirty_vids, &lightest_eid, &lightest_weight);
  439|  8.02k|        }
  440|  62.7k|    }
  441|       |
  442|       |    // Free memory
  443|  1.46k|    igraph_vector_int_destroy(&dirty_vids);
  444|  1.46k|    igraph_bitset_destroy(&is_edge_in_spanner);
  445|  1.46k|    igraph_bitset_destroy(&is_cluster_sampled);
  446|  1.46k|    igraph_vector_int_destroy(&new_clustering);
  447|  1.46k|    igraph_vector_destroy(&lightest_weight);
  448|  1.46k|    igraph_vector_int_destroy(&lightest_eid);
  449|  1.46k|    igraph_vector_int_destroy(&clustering);
  450|  1.46k|    igraph_adjlist_destroy(&adjlist);
  451|  1.46k|    igraph_inclist_destroy(&inclist);
  452|  1.46k|    IGRAPH_FINALLY_CLEAN(9);
  453|       |
  454|  1.46k|    return IGRAPH_SUCCESS;
  455|  1.46k|}
sparsifier.c:collect_lightest_edges_to_clusters:
   63|  65.7k|) {
   64|       |    // This internal function gets the residual graph, the clustering, the sampled clustering and
   65|       |    // the vector and returns the lightest edge to each neighboring cluster and the index of the lightest
   66|       |    // sampled cluster (if any)
   67|       |
   68|  65.7k|    igraph_real_t lightest_weight_to_sampled = IGRAPH_INFINITY;
  ------------------
  |  |  137|  65.7k|#define IGRAPH_INFINITY ((double)INFINITY)
  ------------------
   69|  65.7k|    const igraph_vector_int_t *adjacent_nodes = igraph_adjlist_get(adjlist, v);
  ------------------
  |  |   73|  65.7k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
   70|  65.7k|    const igraph_vector_int_t *incident_edges = igraph_inclist_get(inclist, v);
  ------------------
  |  |  102|  65.7k|#define igraph_inclist_get(il,no) (&(il)->incs[(igraph_int_t)(no)])
  ------------------
   71|  65.7k|    const igraph_int_t nlen = igraph_vector_int_size(incident_edges);
   72|       |
   73|   122k|    for (igraph_int_t i = 0; i < nlen; i++) {
  ------------------
  |  Branch (73:30): [True: 57.0k, False: 65.7k]
  ------------------
   74|  57.0k|        igraph_int_t neighbor_node = VECTOR(*adjacent_nodes)[i];
  ------------------
  |  |   60|  57.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   75|  57.0k|        igraph_int_t edge = VECTOR(*incident_edges)[i];
  ------------------
  |  |   60|  57.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   76|  57.0k|        igraph_int_t neighbor_cluster = VECTOR(*clustering)[neighbor_node];
  ------------------
  |  |   60|  57.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   77|  57.0k|        igraph_real_t weight = weights ? VECTOR(*weights)[edge] : 1;
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (77:32): [True: 0, False: 57.0k]
  ------------------
   78|       |
   79|       |        // If the weight of the edge being considered is smaller than the weight
   80|       |        // of the lightest edge found so far that connects v to the same
   81|       |        // cluster, remember the new minimum.
   82|  57.0k|        if (VECTOR(*lightest_weight)[neighbor_cluster] > weight) {
  ------------------
  |  |   60|  57.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (82:13): [True: 44.1k, False: 12.8k]
  ------------------
   83|  44.1k|            VECTOR(*lightest_weight)[neighbor_cluster] = weight;
  ------------------
  |  |   60|  44.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   84|  44.1k|            VECTOR(*lightest_eid)[neighbor_cluster] = edge;
  ------------------
  |  |   60|  44.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   85|       |
   86|  44.1k|            IGRAPH_CHECK(igraph_vector_int_push_back(dirty_vids, neighbor_cluster));
  ------------------
  |  |  656|  44.1k|    do { \
  |  |  657|  44.1k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  44.1k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  44.1k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 44.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  44.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 44.1k]
  |  |  ------------------
  ------------------
   87|       |
   88|       |            // Also, if this cluster happens to be a sampled cluster, also update
   89|       |            // the variables that store which is the lightest edge that connects
   90|       |            // v to any of the sampled clusters.
   91|  44.1k|            if (is_cluster_sampled) {
  ------------------
  |  Branch (91:17): [True: 40.9k, False: 3.20k]
  ------------------
   92|  40.9k|                if ((IGRAPH_BIT_TEST(*is_cluster_sampled, neighbor_cluster)) && (lightest_weight_to_sampled > weight)) {
  ------------------
  |  |  142|  40.9k|#define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   60|  40.9k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   85|  40.9k|#define IGRAPH_BIT_SLOT(i) ((i) / IGRAPH_INTEGER_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  40.9k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IGRAPH_BIT_TEST(bitset, i) (VECTOR((bitset))[IGRAPH_BIT_SLOT(i)] & IGRAPH_BIT_MASK(i))
  |  |  ------------------
  |  |  |  |   66|  40.9k|#define IGRAPH_BIT_MASK(i) ((igraph_uint_t)(1) << ((i) % IGRAPH_INTEGER_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   32|  40.9k|#define IGRAPH_INTEGER_SIZE 64
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (92:21): [True: 3.78k, False: 37.1k]
  |  Branch (92:81): [True: 2.93k, False: 849]
  ------------------
   93|  2.93k|                    lightest_weight_to_sampled = weight;
   94|  2.93k|                    *nearest_neighboring_sampled_cluster = neighbor_cluster;
   95|  2.93k|                }
   96|  40.9k|            }
   97|  44.1k|        }
   98|  57.0k|    }
   99|       |
  100|  65.7k|    return IGRAPH_SUCCESS;
  101|  65.7k|}
sparsifier.c:clear_lightest_edges_to_clusters:
  107|  65.7k|) {
  108|  65.7k|    const igraph_int_t n = igraph_vector_int_size(dirty_vids);
  109|   109k|    for (igraph_int_t i = 0; i < n; i++) {
  ------------------
  |  Branch (109:30): [True: 44.1k, False: 65.7k]
  ------------------
  110|  44.1k|        igraph_int_t vid = VECTOR(*dirty_vids)[i];
  ------------------
  |  |   60|  44.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  111|  44.1k|        VECTOR(*lightest_weight)[vid] = IGRAPH_INFINITY;
  ------------------
  |  |   60|  44.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      VECTOR(*lightest_weight)[vid] = IGRAPH_INFINITY;
  ------------------
  |  |  137|  44.1k|#define IGRAPH_INFINITY ((double)INFINITY)
  ------------------
  112|  44.1k|        VECTOR(*lightest_eid)[vid] = -1;
  ------------------
  |  |   60|  44.1k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  113|  44.1k|    }
  114|       |
  115|  65.7k|    igraph_vector_int_clear(dirty_vids);
  116|  65.7k|}

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

igraph_strength:
  619|  1.46k|) {
  620|       |
  621|  1.46k|    igraph_int_t no_of_nodes = igraph_vcount(graph);
  622|  1.46k|    igraph_vit_t vit;
  623|  1.46k|    igraph_int_t no_vids;
  624|  1.46k|    igraph_vector_int_t degrees;
  625|  1.46k|    igraph_vector_int_t neis;
  626|       |
  627|  1.46k|    if (! weights) {
  ------------------
  |  Branch (627:9): [True: 1.46k, False: 0]
  ------------------
  628|  1.46k|        IGRAPH_VECTOR_INT_INIT_FINALLY(&degrees, no_of_nodes);
  ------------------
  |  |  119|  1.46k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  1.46k|    do { \
  |  |  |  |  657|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  1.46k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  1.46k|    do { \
  |  |  |  |  604|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.46k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
  629|  1.46k|        IGRAPH_CHECK(igraph_vector_resize(res, no_of_nodes));
  ------------------
  |  |  656|  1.46k|    do { \
  |  |  657|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
  630|  1.46k|        IGRAPH_CHECK(igraph_degree(graph, &degrees, vids, mode, loops));
  ------------------
  |  |  656|  1.46k|    do { \
  |  |  657|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
  631|  64.2k|        for (igraph_int_t i = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (631:34): [True: 62.7k, False: 1.46k]
  ------------------
  632|  62.7k|            VECTOR(*res)[i] = VECTOR(degrees)[i];
  ------------------
  |  |   60|  62.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*res)[i] = VECTOR(degrees)[i];
  ------------------
  |  |   60|  62.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  633|  62.7k|        }
  634|  1.46k|        igraph_vector_int_destroy(&degrees);
  635|  1.46k|        IGRAPH_FINALLY_CLEAN(1);
  636|  1.46k|        return IGRAPH_SUCCESS;
  637|  1.46k|    }
  638|       |
  639|      0|    if (igraph_vector_size(weights) != igraph_ecount(graph)) {
  ------------------
  |  Branch (639:9): [True: 0, False: 0]
  ------------------
  640|      0|        IGRAPH_ERROR("Invalid weight vector length.", IGRAPH_EINVAL);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  641|      0|    }
  642|       |
  643|      0|    if (mode != IGRAPH_OUT && mode != IGRAPH_IN && mode != IGRAPH_ALL) {
  ------------------
  |  Branch (643:9): [True: 0, False: 0]
  |  Branch (643:31): [True: 0, False: 0]
  |  Branch (643:52): [True: 0, False: 0]
  ------------------
  644|      0|        IGRAPH_ERROR("Invalid mode for vertex strength calculation.", IGRAPH_EINVMODE);
  ------------------
  |  |  426|      0|    do { \
  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  428|      0|        return igraph_errno ; \
  |  |  429|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  645|      0|    }
  646|       |
  647|      0|    if (igraph_vs_is_all(&vids)) {
  ------------------
  |  Branch (647:9): [True: 0, False: 0]
  ------------------
  648|      0|        return strength_all(graph, res, mode, loops, weights);
  649|      0|    }
  650|       |
  651|      0|    IGRAPH_CHECK(igraph_vit_create(graph, vids, &vit));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  652|      0|    IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  603|      0|    do { \
  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  ------------------
  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  653|      0|    no_vids = IGRAPH_VIT_SIZE(vit);
  ------------------
  |  |  190|      0|#define IGRAPH_VIT_SIZE(vit)  ((vit).end - (vit).start)
  ------------------
  654|       |
  655|      0|    IGRAPH_VECTOR_INT_INIT_FINALLY(&neis, 0);
  ------------------
  |  |  119|      0|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|      0|    do { \
  |  |  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|      0|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|      0|    do { \
  |  |  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 0]
  |  |  ------------------
  ------------------
  656|      0|    IGRAPH_CHECK(igraph_vector_int_reserve(&neis, no_of_nodes));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  657|      0|    IGRAPH_CHECK(igraph_vector_resize(res, no_vids));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  658|      0|    igraph_vector_null(res);
  659|       |
  660|      0|    for (igraph_int_t i = 0; !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  179|      0|#define IGRAPH_VIT_END(vit)   ((vit).pos >= (vit).end)
  ------------------
                  for (igraph_int_t i = 0; !IGRAPH_VIT_END(vit); IGRAPH_VIT_NEXT(vit), i++) {
  ------------------
  |  |  167|      0|#define IGRAPH_VIT_NEXT(vit)  (++((vit).pos))
  ------------------
  |  Branch (660:30): [True: 0, False: 0]
  ------------------
  661|      0|        IGRAPH_CHECK(igraph_incident(graph, &neis, IGRAPH_VIT_GET(vit), mode, loops));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  ------------------
  |  |  |  Branch (657:40): [True: 0, False: 0]
  |  |  ------------------
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  662|      0|        const igraph_int_t n = igraph_vector_int_size(&neis);
  663|      0|        for (igraph_int_t j = 0; j < n; j++) {
  ------------------
  |  Branch (663:34): [True: 0, False: 0]
  ------------------
  664|      0|            igraph_int_t edge = VECTOR(neis)[j];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  665|      0|            VECTOR(*res)[i] += VECTOR(*weights)[edge];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(*res)[i] += VECTOR(*weights)[edge];
  ------------------
  |  |   60|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  666|      0|        }
  667|      0|    }
  668|       |
  669|      0|    igraph_vit_destroy(&vit);
  670|      0|    igraph_vector_int_destroy(&neis);
  671|      0|    IGRAPH_FINALLY_CLEAN(2);
  672|       |
  673|      0|    return IGRAPH_SUCCESS;
  674|      0|}

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

igraph_transitivity_avglocal_undirected:
   76|  1.46k|        igraph_transitivity_mode_t mode) {
   77|       |
   78|  1.46k|    igraph_int_t i, no_of_nodes = igraph_vcount(graph), nans = 0;
   79|  1.46k|    igraph_real_t sum = 0.0;
   80|  1.46k|    igraph_vector_t vec;
   81|       |
   82|  1.46k|    if (no_of_nodes == 0) {
  ------------------
  |  Branch (82:9): [True: 1, False: 1.46k]
  ------------------
   83|      1|        if (mode == IGRAPH_TRANSITIVITY_ZERO) {
  ------------------
  |  Branch (83:13): [True: 1, False: 0]
  ------------------
   84|      1|            *res = 0;
   85|      1|        } else {
   86|      0|            *res = IGRAPH_NAN;
  ------------------
  |  |  138|      0|#define IGRAPH_NAN ((double)NAN)
  ------------------
   87|      0|        }
   88|  1.46k|    } else {
   89|  1.46k|        IGRAPH_VECTOR_INIT_FINALLY(&vec, no_of_nodes);
  ------------------
  |  |  104|  1.46k|    do { IGRAPH_CHECK(igraph_vector_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  1.46k|    do { \
  |  |  |  |  657|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  1.46k|        IGRAPH_FINALLY(igraph_vector_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  1.46k|    do { \
  |  |  |  |  604|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.46k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (105:60): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
   90|       |
   91|  1.46k|        IGRAPH_CHECK(igraph_transitivity_local_undirected(graph, &vec, igraph_vss_all(), mode));
  ------------------
  |  |  656|  1.46k|    do { \
  |  |  657|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
   92|       |
   93|  64.2k|        for (i = 0, nans = 0; i < no_of_nodes; i++) {
  ------------------
  |  Branch (93:31): [True: 62.7k, False: 1.46k]
  ------------------
   94|  62.7k|            if (!isnan(VECTOR(vec)[i])) {
  ------------------
  |  Branch (94:17): [True: 62.7k, False: 0]
  ------------------
   95|  62.7k|                sum += VECTOR(vec)[i];
  ------------------
  |  |   60|  62.7k|#define VECTOR(v) ((v).stor_begin)
  ------------------
   96|  62.7k|            } else {
   97|      0|                nans++;
   98|      0|            }
   99|  62.7k|        }
  100|       |
  101|  1.46k|        igraph_vector_destroy(&vec);
  102|  1.46k|        IGRAPH_FINALLY_CLEAN(1);
  103|       |
  104|  1.46k|        *res = sum / (no_of_nodes - nans);
  105|  1.46k|    }
  106|       |
  107|  1.46k|    return IGRAPH_SUCCESS;
  108|  1.46k|}
igraph_i_trans4_al_simplify:
  286|  5.85k|                                const igraph_vector_int_t *rank) {
  287|  5.85k|    igraph_int_t i;
  288|  5.85k|    igraph_int_t n = al->length;
  289|  5.85k|    igraph_vector_int_t mark;
  290|       |
  291|  5.85k|    IGRAPH_CHECK(igraph_vector_int_init(&mark, n));
  ------------------
  |  |  656|  5.85k|    do { \
  |  |  657|  5.85k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  5.85k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  5.85k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 5.85k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  5.85k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 5.85k]
  |  |  ------------------
  ------------------
  292|  5.85k|    IGRAPH_FINALLY(igraph_vector_int_destroy, &mark);
  ------------------
  |  |  603|  5.85k|    do { \
  |  |  604|  5.85k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  5.85k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  5.85k|         * incorrect destructor function with the pointer */ \
  |  |  607|  5.85k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 5.85k]
  |  |  ------------------
  |  |  608|  5.85k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  5.85k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 5.85k]
  |  |  ------------------
  ------------------
  293|       |
  294|   257k|    for (i = 0; i < n; i++) {
  ------------------
  |  Branch (294:17): [True: 251k, False: 5.85k]
  ------------------
  295|   251k|        igraph_vector_int_t *v = &al->adjs[i];
  296|   251k|        igraph_int_t j, l = igraph_vector_int_size(v);
  297|   251k|        igraph_int_t irank = VECTOR(*rank)[i];
  ------------------
  |  |   60|   251k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  298|   251k|        VECTOR(mark)[i] = i + 1;
  ------------------
  |  |   60|   251k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  299|   493k|        for (j = 0; j < l; /* nothing */) {
  ------------------
  |  Branch (299:21): [True: 242k, False: 251k]
  ------------------
  300|   242k|            igraph_int_t e = VECTOR(*v)[j];
  ------------------
  |  |   60|   242k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  301|   242k|            if (VECTOR(*rank)[e] > irank && VECTOR(mark)[e] != i + 1) {
  ------------------
  |  |   60|   242k|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          if (VECTOR(*rank)[e] > irank && VECTOR(mark)[e] != i + 1) {
  ------------------
  |  |   60|   121k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (301:17): [True: 121k, False: 121k]
  |  Branch (301:45): [True: 121k, False: 0]
  ------------------
  302|   121k|                VECTOR(mark)[e] = i + 1;
  ------------------
  |  |   60|   121k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  303|   121k|                j++;
  304|   121k|            } else {
  305|   121k|                VECTOR(*v)[j] = igraph_vector_int_tail(v);
  ------------------
  |  |   60|   121k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  306|   121k|                igraph_vector_int_pop_back(v);
  307|   121k|                l--;
  308|   121k|            }
  309|   242k|        }
  310|   251k|    }
  311|       |
  312|  5.85k|    igraph_vector_int_destroy(&mark);
  313|  5.85k|    IGRAPH_FINALLY_CLEAN(1);
  314|       |
  315|  5.85k|    return IGRAPH_SUCCESS;
  316|  5.85k|}
igraph_transitivity_local_undirected:
  372|  2.92k|        igraph_transitivity_mode_t mode) {
  373|       |
  374|  2.92k|    if (igraph_vs_is_all(&vids)) {
  ------------------
  |  Branch (374:9): [True: 2.92k, False: 0]
  ------------------
  375|  2.92k|        return transitivity_local_undirected4(graph, res, mode);
  376|  2.92k|    } else {
  377|      0|        igraph_vit_t vit;
  378|      0|        igraph_int_t size;
  379|      0|        IGRAPH_CHECK(igraph_vit_create(graph, vids, &vit));
  ------------------
  |  |  656|      0|    do { \
  |  |  657|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  380|      0|        IGRAPH_FINALLY(igraph_vit_destroy, &vit);
  ------------------
  |  |  603|      0|    do { \
  |  |  604|      0|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|      0|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|      0|         * incorrect destructor function with the pointer */ \
  |  |  607|      0|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 0]
  |  |  ------------------
  |  |  608|      0|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  381|      0|        size = IGRAPH_VIT_SIZE(vit);
  ------------------
  |  |  190|      0|#define IGRAPH_VIT_SIZE(vit)  ((vit).end - (vit).start)
  ------------------
  382|      0|        igraph_vit_destroy(&vit);
  383|      0|        IGRAPH_FINALLY_CLEAN(1);
  384|      0|        if (size < 100) {
  ------------------
  |  Branch (384:13): [True: 0, False: 0]
  ------------------
  385|      0|            return transitivity_local_undirected1(graph, res, vids, mode);
  386|      0|        } else {
  387|      0|            return transitivity_local_undirected2(graph, res, vids, mode);
  388|      0|        }
  389|      0|    }
  390|  2.92k|}
igraph_count_adjacent_triangles:
  524|  1.46k|                              const igraph_vs_t vids) {
  525|  1.46k|    if (igraph_vs_is_all(&vids)) {
  ------------------
  |  Branch (525:9): [True: 1.46k, False: 0]
  ------------------
  526|  1.46k|        return adjacent_triangles4(graph, res);
  527|  1.46k|    } else {
  528|      0|        return adjacent_triangles1(graph, res, vids);
  529|      0|    }
  530|  1.46k|}
igraph_list_triangles:
  563|  1.46k|                          igraph_vector_int_t *res) {
  564|  1.46k|# define TRIANGLES
  565|  1.46k|# include "properties/triangles_template.h"
  ------------------
  |  |    1|       |/*
  |  |    2|       |   igraph library.
  |  |    3|       |   Copyright (C) 2005-2012  Gabor Csardi <csardi.gabor@gmail.com>
  |  |    4|       |   334 Harvard street, Cambridge, MA 02139 USA
  |  |    5|       |
  |  |    6|       |   This program is free software; you can redistribute it and/or modify
  |  |    7|       |   it under the terms of the GNU General Public License as published by
  |  |    8|       |   the Free Software Foundation; either version 2 of the License, or
  |  |    9|       |   (at your option) any later version.
  |  |   10|       |
  |  |   11|       |   This program is distributed in the hope that it will be useful,
  |  |   12|       |   but WITHOUT ANY WARRANTY; without even the implied warranty of
  |  |   13|       |   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  |  |   14|       |   GNU General Public License for more details.
  |  |   15|       |
  |  |   16|       |   You should have received a copy of the GNU General Public License
  |  |   17|       |   along with this program; if not, write to the Free Software
  |  |   18|       |   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  |  |   19|       |   02110-1301 USA
  |  |   20|       |
  |  |   21|       |*/
  |  |   22|       |
  |  |   23|       |#ifdef TRANSIT
  |  |   24|       |#define TRANSIT_TRIEDGES
  |  |   25|       |#endif
  |  |   26|       |
  |  |   27|  1.46k|igraph_int_t no_of_nodes = igraph_vcount(graph);
  |  |   28|  1.46k|igraph_int_t node, i, j, nn;
  |  |   29|  1.46k|igraph_adjlist_t allneis;
  |  |   30|  1.46k|igraph_vector_int_t *neis1, *neis2;
  |  |   31|  1.46k|igraph_int_t neilen1, neilen2;
  |  |   32|  1.46k|igraph_int_t *neis;
  |  |   33|  1.46k|igraph_int_t maxdegree;
  |  |   34|       |
  |  |   35|       |#ifdef TRANSIT_TRIEDGES
  |  |   36|       |igraph_int_t deg1;
  |  |   37|       |#endif
  |  |   38|       |
  |  |   39|  1.46k|igraph_vector_int_t order;
  |  |   40|  1.46k|igraph_vector_int_t rank;
  |  |   41|  1.46k|igraph_vector_int_t degree;
  |  |   42|       |
  |  |   43|  1.46k|if (no_of_nodes == 0) {
  |  |  ------------------
  |  |  |  Branch (43:5): [True: 1, False: 1.46k]
  |  |  ------------------
  |  |   44|       |#ifndef TRIANGLES
  |  |   45|       |    igraph_vector_clear(res);
  |  |   46|       |#else
  |  |   47|      1|    igraph_vector_int_clear(res);
  |  |   48|      1|#endif
  |  |   49|      1|    return IGRAPH_SUCCESS;
  |  |   50|      1|}
  |  |   51|       |
  |  |   52|  1.46k|IGRAPH_VECTOR_INT_INIT_FINALLY(&order, no_of_nodes);
  |  |  ------------------
  |  |  |  |  119|  1.46k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  656|  1.46k|    do { \
  |  |  |  |  |  |  657|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  |  |  658|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  660|      0|        } \
  |  |  |  |  |  |  661|  1.46k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (661:14): [Folded, False: 1.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  120|  1.46k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  603|  1.46k|    do { \
  |  |  |  |  |  |  604|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  |  |  605|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  |  |  606|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  |  |  607|  1.46k|        if (0) { func(ptr); } \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (607:13): [Folded, False: 1.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  608|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  |  |  609|  1.46k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (609:14): [Folded, False: 1.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (120:64): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   53|  1.46k|IGRAPH_VECTOR_INT_INIT_FINALLY(&degree, no_of_nodes);
  |  |  ------------------
  |  |  |  |  119|  1.46k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  656|  1.46k|    do { \
  |  |  |  |  |  |  657|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  |  |  658|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  660|      0|        } \
  |  |  |  |  |  |  661|  1.46k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (661:14): [Folded, False: 1.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  120|  1.46k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  603|  1.46k|    do { \
  |  |  |  |  |  |  604|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  |  |  605|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  |  |  606|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  |  |  607|  1.46k|        if (0) { func(ptr); } \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (607:13): [Folded, False: 1.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  608|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  |  |  609|  1.46k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (609:14): [Folded, False: 1.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (120:64): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   54|       |
  |  |   55|  1.46k|IGRAPH_CHECK(igraph_adjlist_init(graph, &allneis, IGRAPH_ALL, IGRAPH_NO_LOOPS, IGRAPH_NO_MULTIPLE));
  |  |  ------------------
  |  |  |  |  656|  1.46k|    do { \
  |  |  |  |  657|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|  1.46k|IGRAPH_FINALLY(igraph_adjlist_destroy, &allneis);
  |  |  ------------------
  |  |  |  |  603|  1.46k|    do { \
  |  |  |  |  604|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.46k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   57|       |
  |  |   58|  64.2k|for (i = 0; i < no_of_nodes; i++) {
  |  |  ------------------
  |  |  |  Branch (58:13): [True: 62.7k, False: 1.46k]
  |  |  ------------------
  |  |   59|  62.7k|    VECTOR(degree)[i] = igraph_vector_int_size(igraph_adjlist_get(&allneis, i));
  |  |  ------------------
  |  |  |  |   60|  62.7k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |                   VECTOR(degree)[i] = igraph_vector_int_size(igraph_adjlist_get(&allneis, i));
  |  |  ------------------
  |  |  |  |   73|  62.7k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  |  |  ------------------
  |  |   60|  62.7k|}
  |  |   61|       |
  |  |   62|  1.46k|maxdegree = igraph_vector_int_max(&degree) + 1;
  |  |   63|  1.46k|IGRAPH_CHECK(igraph_i_vector_int_order(&degree, &order, maxdegree));
  |  |  ------------------
  |  |  |  |  656|  1.46k|    do { \
  |  |  |  |  657|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   64|  1.46k|IGRAPH_VECTOR_INT_INIT_FINALLY(&rank, no_of_nodes);
  |  |  ------------------
  |  |  |  |  119|  1.46k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  656|  1.46k|    do { \
  |  |  |  |  |  |  657|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  |  |  658|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  660|      0|        } \
  |  |  |  |  |  |  661|  1.46k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (661:14): [Folded, False: 1.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  120|  1.46k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  603|  1.46k|    do { \
  |  |  |  |  |  |  604|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  |  |  605|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  |  |  606|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  |  |  607|  1.46k|        if (0) { func(ptr); } \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (607:13): [Folded, False: 1.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  608|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  |  |  609|  1.46k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (609:14): [Folded, False: 1.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (120:64): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   65|  64.2k|for (i = 0; i < no_of_nodes; i++) {
  |  |  ------------------
  |  |  |  Branch (65:13): [True: 62.7k, False: 1.46k]
  |  |  ------------------
  |  |   66|  62.7k|    VECTOR(rank)[ VECTOR(order)[i] ] = no_of_nodes - i - 1;
  |  |  ------------------
  |  |  |  |   60|  62.7k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |                   VECTOR(rank)[ VECTOR(order)[i] ] = no_of_nodes - i - 1;
  |  |  ------------------
  |  |  |  |   60|  62.7k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |   67|  62.7k|}
  |  |   68|       |
  |  |   69|  1.46k|IGRAPH_CHECK(igraph_i_trans4_al_simplify(&allneis, &rank));
  |  |  ------------------
  |  |  |  |  656|  1.46k|    do { \
  |  |  |  |  657|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   70|       |
  |  |   71|  1.46k|neis = IGRAPH_CALLOC(no_of_nodes, igraph_int_t);
  |  |  ------------------
  |  |  |  |   33|  1.46k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  2.92k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (31:12): [True: 1.46k, False: 0]
  |  |  |  |  |  |  |  Branch (31:24): [True: 1.46k, False: 0]
  |  |  |  |  |  |  |  Branch (31:66): [True: 1.46k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   72|  1.46k|IGRAPH_CHECK_OOM(neis, "Insufficient memory to count triangles.");
  |  |  ------------------
  |  |  |  |  709|  1.46k|    do { \
  |  |  |  |  710|  1.46k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  712|      0|        } \
  |  |  |  |  713|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (713:14): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   73|  1.46k|IGRAPH_FINALLY(igraph_free, neis);
  |  |  ------------------
  |  |  |  |  603|  1.46k|    do { \
  |  |  |  |  604|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.46k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   74|       |
  |  |   75|       |#ifndef TRIANGLES
  |  |   76|       |    IGRAPH_CHECK(igraph_vector_resize(res, no_of_nodes));
  |  |   77|       |    igraph_vector_null(res);
  |  |   78|       |#else
  |  |   79|  1.46k|    igraph_vector_int_clear(res);
  |  |   80|  1.46k|#endif
  |  |   81|       |
  |  |   82|  64.2k|for (nn = no_of_nodes - 1; nn >= 0; nn--) {
  |  |  ------------------
  |  |  |  Branch (82:28): [True: 62.7k, False: 1.46k]
  |  |  ------------------
  |  |   83|  62.7k|    node = VECTOR(order)[nn];
  |  |  ------------------
  |  |  |  |   60|  62.7k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |   84|       |
  |  |   85|  62.7k|    IGRAPH_ALLOW_INTERRUPTION();
  |  |  ------------------
  |  |  |  |   46|  62.7k|    do { \
  |  |  |  |   47|  62.7k|        if (igraph_i_interruption_handler) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (47:13): [True: 0, False: 62.7k]
  |  |  |  |  ------------------
  |  |  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |  |  |   50|      0|            } \
  |  |  |  |   51|      0|        } \
  |  |  |  |   52|  62.7k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:14): [Folded, False: 62.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   86|       |
  |  |   87|  62.7k|    neis1 = igraph_adjlist_get(&allneis, node);
  |  |  ------------------
  |  |  |  |   73|  62.7k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  |  |  ------------------
  |  |   88|  62.7k|    neilen1 = igraph_vector_int_size(neis1);
  |  |   89|       |
  |  |   90|       |#ifdef TRANSIT_TRIEDGES
  |  |   91|       |    deg1 = VECTOR(degree)[node];
  |  |   92|       |#endif
  |  |   93|       |
  |  |   94|       |    /* Mark the neighbors of the node */
  |  |   95|  93.0k|    for (i = 0; i < neilen1; i++) {
  |  |  ------------------
  |  |  |  Branch (95:17): [True: 30.2k, False: 62.7k]
  |  |  ------------------
  |  |   96|  30.2k|        neis[ VECTOR(*neis1)[i] ] = node + 1;
  |  |  ------------------
  |  |  |  |   60|  30.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |   97|  30.2k|    }
  |  |   98|       |
  |  |   99|  93.0k|    for (i = 0; i < neilen1; i++) {
  |  |  ------------------
  |  |  |  Branch (99:17): [True: 30.2k, False: 62.7k]
  |  |  ------------------
  |  |  100|  30.2k|        igraph_int_t nei = VECTOR(*neis1)[i];
  |  |  ------------------
  |  |  |  |   60|  30.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  101|  30.2k|        neis2 = igraph_adjlist_get(&allneis, nei);
  |  |  ------------------
  |  |  |  |   73|  30.2k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  |  |  ------------------
  |  |  102|  30.2k|        neilen2 = igraph_vector_int_size(neis2);
  |  |  103|  69.7k|        for (j = 0; j < neilen2; j++) {
  |  |  ------------------
  |  |  |  Branch (103:21): [True: 39.4k, False: 30.2k]
  |  |  ------------------
  |  |  104|  39.4k|            igraph_int_t nei2 = VECTOR(*neis2)[j];
  |  |  ------------------
  |  |  |  |   60|  39.4k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  105|  39.4k|            if (neis[nei2] == node + 1) {
  |  |  ------------------
  |  |  |  Branch (105:17): [True: 21.6k, False: 17.7k]
  |  |  ------------------
  |  |  106|       |#ifndef TRIANGLES
  |  |  107|       |                VECTOR(*res)[nei2] += 1;
  |  |  108|       |                VECTOR(*res)[nei] += 1;
  |  |  109|       |                VECTOR(*res)[node] += 1;
  |  |  110|       |#else
  |  |  111|  21.6k|                IGRAPH_CHECK(igraph_vector_int_push_back(res, node));
  |  |  ------------------
  |  |  |  |  656|  21.6k|    do { \
  |  |  |  |  657|  21.6k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  21.6k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  21.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 21.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  21.6k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 21.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  112|  21.6k|                IGRAPH_CHECK(igraph_vector_int_push_back(res, nei));
  |  |  ------------------
  |  |  |  |  656|  21.6k|    do { \
  |  |  |  |  657|  21.6k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  21.6k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  21.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 21.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  21.6k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 21.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  113|  21.6k|                IGRAPH_CHECK(igraph_vector_int_push_back(res, nei2));
  |  |  ------------------
  |  |  |  |  656|  21.6k|    do { \
  |  |  |  |  657|  21.6k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  21.6k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  21.6k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 21.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  21.6k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 21.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  114|  21.6k|#endif
  |  |  115|  21.6k|            }
  |  |  116|  39.4k|        }
  |  |  117|  30.2k|    }
  |  |  118|       |
  |  |  119|       |#ifdef TRANSIT
  |  |  120|       |    if (mode == IGRAPH_TRANSITIVITY_ZERO && deg1 < 2) {
  |  |  121|       |        VECTOR(*res)[node] = 0.0;
  |  |  122|       |    } else {
  |  |  123|       |        VECTOR(*res)[node] = VECTOR(*res)[node] / deg1 / (deg1 - 1) * 2.0;
  |  |  124|       |    }
  |  |  125|       |#endif
  |  |  126|  62.7k|}
  |  |  127|       |
  |  |  128|  1.46k|igraph_free(neis);
  |  |  129|  1.46k|igraph_adjlist_destroy(&allneis);
  |  |  130|  1.46k|igraph_vector_int_destroy(&rank);
  |  |  131|  1.46k|igraph_vector_int_destroy(&degree);
  |  |  132|  1.46k|igraph_vector_int_destroy(&order);
  |  |  133|  1.46k|IGRAPH_FINALLY_CLEAN(5);
  |  |  134|       |
  |  |  135|       |#ifdef TRANSIT_TRIEDGES
  |  |  136|       |#undef TRANSIT_TRIEDGES
  |  |  137|       |#endif
  ------------------
  566|  1.46k|# undef TRIANGLES
  567|  1.46k|    return IGRAPH_SUCCESS;
  568|  11.7k|}
igraph_transitivity_undirected:
  617|  1.46k|                                   igraph_transitivity_mode_t mode) {
  618|       |
  619|  1.46k|    igraph_real_t triangles, connected_triples;
  620|       |
  621|  1.46k|    IGRAPH_CHECK(count_triangles_and_triples(graph, &triangles, &connected_triples));
  ------------------
  |  |  656|  1.46k|    do { \
  |  |  657|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
  622|       |
  623|  1.46k|    if (connected_triples == 0 && mode == IGRAPH_TRANSITIVITY_ZERO) {
  ------------------
  |  Branch (623:9): [True: 272, False: 1.19k]
  |  Branch (623:35): [True: 0, False: 272]
  ------------------
  624|      0|        *res = 0;
  625|  1.46k|    } else {
  626|  1.46k|        *res = triangles / connected_triples * 3.0;
  627|  1.46k|    }
  628|       |
  629|  1.46k|    return IGRAPH_SUCCESS;
  630|  1.46k|}
triangles.c:transitivity_local_undirected4:
  320|  2.92k|        igraph_transitivity_mode_t mode) {
  321|       |
  322|  2.92k|#define TRANSIT 1
  323|  2.92k|#include "properties/triangles_template.h"
  ------------------
  |  |    1|       |/*
  |  |    2|       |   igraph library.
  |  |    3|       |   Copyright (C) 2005-2012  Gabor Csardi <csardi.gabor@gmail.com>
  |  |    4|       |   334 Harvard street, Cambridge, MA 02139 USA
  |  |    5|       |
  |  |    6|       |   This program is free software; you can redistribute it and/or modify
  |  |    7|       |   it under the terms of the GNU General Public License as published by
  |  |    8|       |   the Free Software Foundation; either version 2 of the License, or
  |  |    9|       |   (at your option) any later version.
  |  |   10|       |
  |  |   11|       |   This program is distributed in the hope that it will be useful,
  |  |   12|       |   but WITHOUT ANY WARRANTY; without even the implied warranty of
  |  |   13|       |   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  |  |   14|       |   GNU General Public License for more details.
  |  |   15|       |
  |  |   16|       |   You should have received a copy of the GNU General Public License
  |  |   17|       |   along with this program; if not, write to the Free Software
  |  |   18|       |   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  |  |   19|       |   02110-1301 USA
  |  |   20|       |
  |  |   21|       |*/
  |  |   22|       |
  |  |   23|  2.92k|#ifdef TRANSIT
  |  |   24|  2.92k|#define TRANSIT_TRIEDGES
  |  |   25|  2.92k|#endif
  |  |   26|       |
  |  |   27|  2.92k|igraph_int_t no_of_nodes = igraph_vcount(graph);
  |  |   28|  2.92k|igraph_int_t node, i, j, nn;
  |  |   29|  2.92k|igraph_adjlist_t allneis;
  |  |   30|  2.92k|igraph_vector_int_t *neis1, *neis2;
  |  |   31|  2.92k|igraph_int_t neilen1, neilen2;
  |  |   32|  2.92k|igraph_int_t *neis;
  |  |   33|  2.92k|igraph_int_t maxdegree;
  |  |   34|       |
  |  |   35|  2.92k|#ifdef TRANSIT_TRIEDGES
  |  |   36|  2.92k|igraph_int_t deg1;
  |  |   37|  2.92k|#endif
  |  |   38|       |
  |  |   39|  2.92k|igraph_vector_int_t order;
  |  |   40|  2.92k|igraph_vector_int_t rank;
  |  |   41|  2.92k|igraph_vector_int_t degree;
  |  |   42|       |
  |  |   43|  2.92k|if (no_of_nodes == 0) {
  |  |  ------------------
  |  |  |  Branch (43:5): [True: 1, False: 2.92k]
  |  |  ------------------
  |  |   44|      1|#ifndef TRIANGLES
  |  |   45|      1|    igraph_vector_clear(res);
  |  |   46|       |#else
  |  |   47|       |    igraph_vector_int_clear(res);
  |  |   48|       |#endif
  |  |   49|      1|    return IGRAPH_SUCCESS;
  |  |   50|      1|}
  |  |   51|       |
  |  |   52|  2.92k|IGRAPH_VECTOR_INT_INIT_FINALLY(&order, no_of_nodes);
  |  |  ------------------
  |  |  |  |  119|  2.92k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  656|  2.92k|    do { \
  |  |  |  |  |  |  657|  2.92k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  |  |  658|  2.92k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  612|  2.92k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.92k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  660|      0|        } \
  |  |  |  |  |  |  661|  2.92k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (661:14): [Folded, False: 2.92k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  120|  2.92k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  603|  2.92k|    do { \
  |  |  |  |  |  |  604|  2.92k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  |  |  605|  2.92k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  |  |  606|  2.92k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  |  |  607|  2.92k|        if (0) { func(ptr); } \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (607:13): [Folded, False: 2.92k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  608|  2.92k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  |  |  609|  2.92k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (609:14): [Folded, False: 2.92k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (120:64): [Folded, False: 2.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   53|  2.92k|IGRAPH_VECTOR_INT_INIT_FINALLY(&degree, no_of_nodes);
  |  |  ------------------
  |  |  |  |  119|  2.92k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  656|  2.92k|    do { \
  |  |  |  |  |  |  657|  2.92k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  |  |  658|  2.92k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  612|  2.92k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.92k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  660|      0|        } \
  |  |  |  |  |  |  661|  2.92k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (661:14): [Folded, False: 2.92k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  120|  2.92k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  603|  2.92k|    do { \
  |  |  |  |  |  |  604|  2.92k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  |  |  605|  2.92k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  |  |  606|  2.92k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  |  |  607|  2.92k|        if (0) { func(ptr); } \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (607:13): [Folded, False: 2.92k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  608|  2.92k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  |  |  609|  2.92k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (609:14): [Folded, False: 2.92k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (120:64): [Folded, False: 2.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   54|       |
  |  |   55|  2.92k|IGRAPH_CHECK(igraph_adjlist_init(graph, &allneis, IGRAPH_ALL, IGRAPH_NO_LOOPS, IGRAPH_NO_MULTIPLE));
  |  |  ------------------
  |  |  |  |  656|  2.92k|    do { \
  |  |  |  |  657|  2.92k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.92k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.92k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.92k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.92k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|  2.92k|IGRAPH_FINALLY(igraph_adjlist_destroy, &allneis);
  |  |  ------------------
  |  |  |  |  603|  2.92k|    do { \
  |  |  |  |  604|  2.92k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.92k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.92k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.92k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.92k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.92k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.92k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   57|       |
  |  |   58|   128k|for (i = 0; i < no_of_nodes; i++) {
  |  |  ------------------
  |  |  |  Branch (58:13): [True: 125k, False: 2.92k]
  |  |  ------------------
  |  |   59|   125k|    VECTOR(degree)[i] = igraph_vector_int_size(igraph_adjlist_get(&allneis, i));
  |  |  ------------------
  |  |  |  |   60|   125k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |                   VECTOR(degree)[i] = igraph_vector_int_size(igraph_adjlist_get(&allneis, i));
  |  |  ------------------
  |  |  |  |   73|   125k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  |  |  ------------------
  |  |   60|   125k|}
  |  |   61|       |
  |  |   62|  2.92k|maxdegree = igraph_vector_int_max(&degree) + 1;
  |  |   63|  2.92k|IGRAPH_CHECK(igraph_i_vector_int_order(&degree, &order, maxdegree));
  |  |  ------------------
  |  |  |  |  656|  2.92k|    do { \
  |  |  |  |  657|  2.92k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.92k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.92k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.92k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.92k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   64|  2.92k|IGRAPH_VECTOR_INT_INIT_FINALLY(&rank, no_of_nodes);
  |  |  ------------------
  |  |  |  |  119|  2.92k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  656|  2.92k|    do { \
  |  |  |  |  |  |  657|  2.92k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  |  |  658|  2.92k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  612|  2.92k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.92k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  660|      0|        } \
  |  |  |  |  |  |  661|  2.92k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (661:14): [Folded, False: 2.92k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  120|  2.92k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  603|  2.92k|    do { \
  |  |  |  |  |  |  604|  2.92k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  |  |  605|  2.92k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  |  |  606|  2.92k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  |  |  607|  2.92k|        if (0) { func(ptr); } \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (607:13): [Folded, False: 2.92k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  608|  2.92k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  |  |  609|  2.92k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (609:14): [Folded, False: 2.92k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (120:64): [Folded, False: 2.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   65|   128k|for (i = 0; i < no_of_nodes; i++) {
  |  |  ------------------
  |  |  |  Branch (65:13): [True: 125k, False: 2.92k]
  |  |  ------------------
  |  |   66|   125k|    VECTOR(rank)[ VECTOR(order)[i] ] = no_of_nodes - i - 1;
  |  |  ------------------
  |  |  |  |   60|   125k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |                   VECTOR(rank)[ VECTOR(order)[i] ] = no_of_nodes - i - 1;
  |  |  ------------------
  |  |  |  |   60|   125k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |   67|   125k|}
  |  |   68|       |
  |  |   69|  2.92k|IGRAPH_CHECK(igraph_i_trans4_al_simplify(&allneis, &rank));
  |  |  ------------------
  |  |  |  |  656|  2.92k|    do { \
  |  |  |  |  657|  2.92k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.92k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.92k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.92k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.92k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   70|       |
  |  |   71|  2.92k|neis = IGRAPH_CALLOC(no_of_nodes, igraph_int_t);
  |  |  ------------------
  |  |  |  |   33|  2.92k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  5.85k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (31:12): [True: 2.92k, False: 0]
  |  |  |  |  |  |  |  Branch (31:24): [True: 2.92k, False: 0]
  |  |  |  |  |  |  |  Branch (31:66): [True: 2.92k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   72|  2.92k|IGRAPH_CHECK_OOM(neis, "Insufficient memory to count triangles.");
  |  |  ------------------
  |  |  |  |  709|  2.92k|    do { \
  |  |  |  |  710|  2.92k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.92k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.92k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  712|      0|        } \
  |  |  |  |  713|  2.92k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (713:14): [Folded, False: 2.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   73|  2.92k|IGRAPH_FINALLY(igraph_free, neis);
  |  |  ------------------
  |  |  |  |  603|  2.92k|    do { \
  |  |  |  |  604|  2.92k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  2.92k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  2.92k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  2.92k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 2.92k]
  |  |  |  |  ------------------
  |  |  |  |  608|  2.92k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  2.92k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 2.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   74|       |
  |  |   75|  2.92k|#ifndef TRIANGLES
  |  |   76|  2.92k|    IGRAPH_CHECK(igraph_vector_resize(res, no_of_nodes));
  |  |  ------------------
  |  |  |  |  656|  2.92k|    do { \
  |  |  |  |  657|  2.92k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  2.92k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  2.92k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 2.92k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  2.92k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 2.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   77|  2.92k|    igraph_vector_null(res);
  |  |   78|       |#else
  |  |   79|       |    igraph_vector_int_clear(res);
  |  |   80|       |#endif
  |  |   81|       |
  |  |   82|   128k|for (nn = no_of_nodes - 1; nn >= 0; nn--) {
  |  |  ------------------
  |  |  |  Branch (82:28): [True: 125k, False: 2.92k]
  |  |  ------------------
  |  |   83|   125k|    node = VECTOR(order)[nn];
  |  |  ------------------
  |  |  |  |   60|   125k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |   84|       |
  |  |   85|   125k|    IGRAPH_ALLOW_INTERRUPTION();
  |  |  ------------------
  |  |  |  |   46|   125k|    do { \
  |  |  |  |   47|   125k|        if (igraph_i_interruption_handler) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (47:13): [True: 0, False: 125k]
  |  |  |  |  ------------------
  |  |  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |  |  |   50|      0|            } \
  |  |  |  |   51|      0|        } \
  |  |  |  |   52|   125k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:14): [Folded, False: 125k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   86|       |
  |  |   87|   125k|    neis1 = igraph_adjlist_get(&allneis, node);
  |  |  ------------------
  |  |  |  |   73|   125k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  |  |  ------------------
  |  |   88|   125k|    neilen1 = igraph_vector_int_size(neis1);
  |  |   89|       |
  |  |   90|   125k|#ifdef TRANSIT_TRIEDGES
  |  |   91|   125k|    deg1 = VECTOR(degree)[node];
  |  |  ------------------
  |  |  |  |   60|   125k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |   92|   125k|#endif
  |  |   93|       |
  |  |   94|       |    /* Mark the neighbors of the node */
  |  |   95|   186k|    for (i = 0; i < neilen1; i++) {
  |  |  ------------------
  |  |  |  Branch (95:17): [True: 60.5k, False: 125k]
  |  |  ------------------
  |  |   96|  60.5k|        neis[ VECTOR(*neis1)[i] ] = node + 1;
  |  |  ------------------
  |  |  |  |   60|  60.5k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |   97|  60.5k|    }
  |  |   98|       |
  |  |   99|   186k|    for (i = 0; i < neilen1; i++) {
  |  |  ------------------
  |  |  |  Branch (99:17): [True: 60.5k, False: 125k]
  |  |  ------------------
  |  |  100|  60.5k|        igraph_int_t nei = VECTOR(*neis1)[i];
  |  |  ------------------
  |  |  |  |   60|  60.5k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  101|  60.5k|        neis2 = igraph_adjlist_get(&allneis, nei);
  |  |  ------------------
  |  |  |  |   73|  60.5k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  |  |  ------------------
  |  |  102|  60.5k|        neilen2 = igraph_vector_int_size(neis2);
  |  |  103|   139k|        for (j = 0; j < neilen2; j++) {
  |  |  ------------------
  |  |  |  Branch (103:21): [True: 78.8k, False: 60.5k]
  |  |  ------------------
  |  |  104|  78.8k|            igraph_int_t nei2 = VECTOR(*neis2)[j];
  |  |  ------------------
  |  |  |  |   60|  78.8k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  105|  78.8k|            if (neis[nei2] == node + 1) {
  |  |  ------------------
  |  |  |  Branch (105:17): [True: 43.3k, False: 35.4k]
  |  |  ------------------
  |  |  106|  43.3k|#ifndef TRIANGLES
  |  |  107|  43.3k|                VECTOR(*res)[nei2] += 1;
  |  |  ------------------
  |  |  |  |   60|  43.3k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  108|  43.3k|                VECTOR(*res)[nei] += 1;
  |  |  ------------------
  |  |  |  |   60|  43.3k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  109|  43.3k|                VECTOR(*res)[node] += 1;
  |  |  ------------------
  |  |  |  |   60|  43.3k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  110|       |#else
  |  |  111|       |                IGRAPH_CHECK(igraph_vector_int_push_back(res, node));
  |  |  112|       |                IGRAPH_CHECK(igraph_vector_int_push_back(res, nei));
  |  |  113|       |                IGRAPH_CHECK(igraph_vector_int_push_back(res, nei2));
  |  |  114|       |#endif
  |  |  115|  43.3k|            }
  |  |  116|  78.8k|        }
  |  |  117|  60.5k|    }
  |  |  118|       |
  |  |  119|   125k|#ifdef TRANSIT
  |  |  120|   125k|    if (mode == IGRAPH_TRANSITIVITY_ZERO && deg1 < 2) {
  |  |  ------------------
  |  |  |  Branch (120:9): [True: 62.7k, False: 62.7k]
  |  |  |  Branch (120:45): [True: 52.0k, False: 10.7k]
  |  |  ------------------
  |  |  121|  52.0k|        VECTOR(*res)[node] = 0.0;
  |  |  ------------------
  |  |  |  |   60|  52.0k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  122|  73.5k|    } else {
  |  |  123|  73.5k|        VECTOR(*res)[node] = VECTOR(*res)[node] / deg1 / (deg1 - 1) * 2.0;
  |  |  ------------------
  |  |  |  |   60|  73.5k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |                       VECTOR(*res)[node] = VECTOR(*res)[node] / deg1 / (deg1 - 1) * 2.0;
  |  |  ------------------
  |  |  |  |   60|  73.5k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  124|  73.5k|    }
  |  |  125|   125k|#endif
  |  |  126|   125k|}
  |  |  127|       |
  |  |  128|  2.92k|igraph_free(neis);
  |  |  129|  2.92k|igraph_adjlist_destroy(&allneis);
  |  |  130|  2.92k|igraph_vector_int_destroy(&rank);
  |  |  131|  2.92k|igraph_vector_int_destroy(&degree);
  |  |  132|  2.92k|igraph_vector_int_destroy(&order);
  |  |  133|  2.92k|IGRAPH_FINALLY_CLEAN(5);
  |  |  134|       |
  |  |  135|  2.92k|#ifdef TRANSIT_TRIEDGES
  |  |  136|  2.92k|#undef TRANSIT_TRIEDGES
  |  |  137|  2.92k|#endif
  ------------------
  324|  2.92k|#undef TRANSIT
  325|       |
  326|  2.92k|    return IGRAPH_SUCCESS;
  327|  26.3k|}
triangles.c:count_triangles_and_triples:
  407|  1.46k|{
  408|  1.46k|    const igraph_int_t vcount = igraph_vcount(graph);
  409|  1.46k|    igraph_vector_int_t mark;
  410|  1.46k|    igraph_adjlist_t al;
  411|       |
  412|  1.46k|    IGRAPH_CHECK(igraph_adjlist_init(graph, &al, IGRAPH_ALL, IGRAPH_NO_LOOPS, IGRAPH_NO_MULTIPLE));
  ------------------
  |  |  656|  1.46k|    do { \
  |  |  657|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
  413|  1.46k|    IGRAPH_FINALLY(igraph_adjlist_destroy, &al);
  ------------------
  |  |  603|  1.46k|    do { \
  |  |  604|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  605|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  606|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  607|  1.46k|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (607:13): [Folded, False: 1.46k]
  |  |  ------------------
  |  |  608|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  609|  1.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (609:14): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
  414|       |
  415|  1.46k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&mark, vcount);
  ------------------
  |  |  119|  1.46k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  656|  1.46k|    do { \
  |  |  |  |  657|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  1.46k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  603|  1.46k|    do { \
  |  |  |  |  604|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.46k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (120:64): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
  416|       |
  417|  1.46k|    *triangles = 0;
  418|  1.46k|    if (connected_triples) *connected_triples = 0;
  ------------------
  |  Branch (418:9): [True: 1.46k, False: 0]
  ------------------
  419|       |
  420|       |    /* In a simple graph we could loop through all edges and count how many common
  421|       |     * neighbours their endpoints have. However, we only need to consider each
  422|       |     * connected vertex pair once, even if there are multiple edges between them.
  423|       |     * The nested for loop below uses an adjlist that already has multi-edges and
  424|       |     * self-loops filtered, and solves this problem.
  425|       |     *
  426|       |     * Performance trick:
  427|       |     *
  428|       |     * We only consider connected u-v pairs when v < u to avoid triple-counting
  429|       |     * and speed up the procedure. This effectively orients an undirected graph
  430|       |     * as directed acyclic. In an arbitrary orientation, an originally undirected
  431|       |     * triangle may appear as one of these two directed patterns:
  432|       |     *  - A -> B -> C -> A. This is NOT acyclic, so we don't encounter it.
  433|       |     *  - A -> B -> C, A -> C. This is the only one we need to count.
  434|       |     * This is implemented through the `if (v >= u) break;` lines below.
  435|       |     *
  436|       |     * Some other functions achieve the same via igraph_i_trans4_al_simplify().
  437|       |     */
  438|  64.2k|    for (igraph_int_t v1 = 0; v1 < vcount; v1++) {
  ------------------
  |  Branch (438:31): [True: 62.7k, False: 1.46k]
  ------------------
  439|  62.7k|        const igraph_vector_int_t *nei1 = igraph_adjlist_get(&al, v1);
  ------------------
  |  |   73|  62.7k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  440|  62.7k|        const igraph_int_t d1 = igraph_vector_int_size(nei1);
  441|  62.7k|        if (d1 > 1) {
  ------------------
  |  Branch (441:13): [True: 10.7k, False: 52.0k]
  ------------------
  442|  10.7k|            if (connected_triples) {
  ------------------
  |  Branch (442:17): [True: 10.7k, False: 0]
  ------------------
  443|  10.7k|                *connected_triples += (igraph_real_t) d1 * (d1 - 1.0) / 2.0;
  444|  10.7k|            }
  445|       |
  446|  36.0k|            for (igraph_int_t i=0; i < d1; i++) {
  ------------------
  |  Branch (446:36): [True: 33.0k, False: 3.05k]
  ------------------
  447|  33.0k|                const igraph_int_t v2 = VECTOR(*nei1)[i];
  ------------------
  |  |   60|  33.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  448|  33.0k|                if (v2 >= v1) break;
  ------------------
  |  Branch (448:21): [True: 7.71k, False: 25.3k]
  ------------------
  449|       |
  450|  25.3k|                VECTOR(mark)[v2] = v1+1;
  ------------------
  |  |   60|  25.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  451|  25.3k|            }
  452|  36.0k|            for (igraph_int_t i=0; i < d1; i++) {
  ------------------
  |  Branch (452:36): [True: 33.0k, False: 3.05k]
  ------------------
  453|  33.0k|                const igraph_int_t v2 = VECTOR(*nei1)[i];
  ------------------
  |  |   60|  33.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  454|  33.0k|                if (v2 >= v1) break;
  ------------------
  |  Branch (454:21): [True: 7.71k, False: 25.3k]
  ------------------
  455|       |
  456|  25.3k|                const igraph_vector_int_t *nei2 = igraph_adjlist_get(&al, v2);
  ------------------
  |  |   73|  25.3k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  ------------------
  457|  25.3k|                const igraph_int_t d2 = igraph_vector_int_size(nei2);
  458|  66.3k|                for (igraph_int_t j=0; j < d2; j++) {
  ------------------
  |  Branch (458:40): [True: 66.3k, False: 0]
  ------------------
  459|  66.3k|                    const igraph_int_t v3 = VECTOR(*nei2)[j];
  ------------------
  |  |   60|  66.3k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  460|  66.3k|                    if (v3 >= v2) break;
  ------------------
  |  Branch (460:25): [True: 25.3k, False: 41.0k]
  ------------------
  461|       |
  462|  41.0k|                    if (VECTOR(mark)[v3] == v1+1) {
  ------------------
  |  |   60|  41.0k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (462:25): [True: 21.6k, False: 19.3k]
  ------------------
  463|  21.6k|                        *triangles += 1;
  464|  21.6k|                    }
  465|  41.0k|                }
  466|  25.3k|            }
  467|  10.7k|        }
  468|  62.7k|    }
  469|       |
  470|  1.46k|    igraph_vector_int_destroy(&mark);
  471|  1.46k|    igraph_adjlist_destroy(&al);
  472|  1.46k|    IGRAPH_FINALLY_CLEAN(2);
  473|       |
  474|  1.46k|    return IGRAPH_SUCCESS;
  475|  1.46k|}
triangles.c:adjacent_triangles4:
  400|  1.46k|                                      igraph_vector_t *res) {
  401|  1.46k|# include "properties/triangles_template.h"
  ------------------
  |  |    1|       |/*
  |  |    2|       |   igraph library.
  |  |    3|       |   Copyright (C) 2005-2012  Gabor Csardi <csardi.gabor@gmail.com>
  |  |    4|       |   334 Harvard street, Cambridge, MA 02139 USA
  |  |    5|       |
  |  |    6|       |   This program is free software; you can redistribute it and/or modify
  |  |    7|       |   it under the terms of the GNU General Public License as published by
  |  |    8|       |   the Free Software Foundation; either version 2 of the License, or
  |  |    9|       |   (at your option) any later version.
  |  |   10|       |
  |  |   11|       |   This program is distributed in the hope that it will be useful,
  |  |   12|       |   but WITHOUT ANY WARRANTY; without even the implied warranty of
  |  |   13|       |   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  |  |   14|       |   GNU General Public License for more details.
  |  |   15|       |
  |  |   16|       |   You should have received a copy of the GNU General Public License
  |  |   17|       |   along with this program; if not, write to the Free Software
  |  |   18|       |   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  |  |   19|       |   02110-1301 USA
  |  |   20|       |
  |  |   21|       |*/
  |  |   22|       |
  |  |   23|       |#ifdef TRANSIT
  |  |   24|       |#define TRANSIT_TRIEDGES
  |  |   25|       |#endif
  |  |   26|       |
  |  |   27|  1.46k|igraph_int_t no_of_nodes = igraph_vcount(graph);
  |  |   28|  1.46k|igraph_int_t node, i, j, nn;
  |  |   29|  1.46k|igraph_adjlist_t allneis;
  |  |   30|  1.46k|igraph_vector_int_t *neis1, *neis2;
  |  |   31|  1.46k|igraph_int_t neilen1, neilen2;
  |  |   32|  1.46k|igraph_int_t *neis;
  |  |   33|  1.46k|igraph_int_t maxdegree;
  |  |   34|       |
  |  |   35|       |#ifdef TRANSIT_TRIEDGES
  |  |   36|       |igraph_int_t deg1;
  |  |   37|       |#endif
  |  |   38|       |
  |  |   39|  1.46k|igraph_vector_int_t order;
  |  |   40|  1.46k|igraph_vector_int_t rank;
  |  |   41|  1.46k|igraph_vector_int_t degree;
  |  |   42|       |
  |  |   43|  1.46k|if (no_of_nodes == 0) {
  |  |  ------------------
  |  |  |  Branch (43:5): [True: 1, False: 1.46k]
  |  |  ------------------
  |  |   44|      1|#ifndef TRIANGLES
  |  |   45|      1|    igraph_vector_clear(res);
  |  |   46|       |#else
  |  |   47|       |    igraph_vector_int_clear(res);
  |  |   48|       |#endif
  |  |   49|      1|    return IGRAPH_SUCCESS;
  |  |   50|      1|}
  |  |   51|       |
  |  |   52|  1.46k|IGRAPH_VECTOR_INT_INIT_FINALLY(&order, no_of_nodes);
  |  |  ------------------
  |  |  |  |  119|  1.46k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  656|  1.46k|    do { \
  |  |  |  |  |  |  657|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  |  |  658|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  660|      0|        } \
  |  |  |  |  |  |  661|  1.46k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (661:14): [Folded, False: 1.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  120|  1.46k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  603|  1.46k|    do { \
  |  |  |  |  |  |  604|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  |  |  605|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  |  |  606|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  |  |  607|  1.46k|        if (0) { func(ptr); } \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (607:13): [Folded, False: 1.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  608|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  |  |  609|  1.46k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (609:14): [Folded, False: 1.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (120:64): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   53|  1.46k|IGRAPH_VECTOR_INT_INIT_FINALLY(&degree, no_of_nodes);
  |  |  ------------------
  |  |  |  |  119|  1.46k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  656|  1.46k|    do { \
  |  |  |  |  |  |  657|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  |  |  658|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  660|      0|        } \
  |  |  |  |  |  |  661|  1.46k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (661:14): [Folded, False: 1.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  120|  1.46k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  603|  1.46k|    do { \
  |  |  |  |  |  |  604|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  |  |  605|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  |  |  606|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  |  |  607|  1.46k|        if (0) { func(ptr); } \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (607:13): [Folded, False: 1.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  608|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  |  |  609|  1.46k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (609:14): [Folded, False: 1.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (120:64): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   54|       |
  |  |   55|  1.46k|IGRAPH_CHECK(igraph_adjlist_init(graph, &allneis, IGRAPH_ALL, IGRAPH_NO_LOOPS, IGRAPH_NO_MULTIPLE));
  |  |  ------------------
  |  |  |  |  656|  1.46k|    do { \
  |  |  |  |  657|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|  1.46k|IGRAPH_FINALLY(igraph_adjlist_destroy, &allneis);
  |  |  ------------------
  |  |  |  |  603|  1.46k|    do { \
  |  |  |  |  604|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.46k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   57|       |
  |  |   58|  64.2k|for (i = 0; i < no_of_nodes; i++) {
  |  |  ------------------
  |  |  |  Branch (58:13): [True: 62.7k, False: 1.46k]
  |  |  ------------------
  |  |   59|  62.7k|    VECTOR(degree)[i] = igraph_vector_int_size(igraph_adjlist_get(&allneis, i));
  |  |  ------------------
  |  |  |  |   60|  62.7k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |                   VECTOR(degree)[i] = igraph_vector_int_size(igraph_adjlist_get(&allneis, i));
  |  |  ------------------
  |  |  |  |   73|  62.7k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  |  |  ------------------
  |  |   60|  62.7k|}
  |  |   61|       |
  |  |   62|  1.46k|maxdegree = igraph_vector_int_max(&degree) + 1;
  |  |   63|  1.46k|IGRAPH_CHECK(igraph_i_vector_int_order(&degree, &order, maxdegree));
  |  |  ------------------
  |  |  |  |  656|  1.46k|    do { \
  |  |  |  |  657|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   64|  1.46k|IGRAPH_VECTOR_INT_INIT_FINALLY(&rank, no_of_nodes);
  |  |  ------------------
  |  |  |  |  119|  1.46k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  656|  1.46k|    do { \
  |  |  |  |  |  |  657|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  |  |  658|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  660|      0|        } \
  |  |  |  |  |  |  661|  1.46k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (661:14): [Folded, False: 1.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  120|  1.46k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  603|  1.46k|    do { \
  |  |  |  |  |  |  604|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  |  |  605|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  |  |  606|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  |  |  607|  1.46k|        if (0) { func(ptr); } \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (607:13): [Folded, False: 1.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  608|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  |  |  609|  1.46k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (609:14): [Folded, False: 1.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (120:64): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   65|  64.2k|for (i = 0; i < no_of_nodes; i++) {
  |  |  ------------------
  |  |  |  Branch (65:13): [True: 62.7k, False: 1.46k]
  |  |  ------------------
  |  |   66|  62.7k|    VECTOR(rank)[ VECTOR(order)[i] ] = no_of_nodes - i - 1;
  |  |  ------------------
  |  |  |  |   60|  62.7k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |                   VECTOR(rank)[ VECTOR(order)[i] ] = no_of_nodes - i - 1;
  |  |  ------------------
  |  |  |  |   60|  62.7k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |   67|  62.7k|}
  |  |   68|       |
  |  |   69|  1.46k|IGRAPH_CHECK(igraph_i_trans4_al_simplify(&allneis, &rank));
  |  |  ------------------
  |  |  |  |  656|  1.46k|    do { \
  |  |  |  |  657|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   70|       |
  |  |   71|  1.46k|neis = IGRAPH_CALLOC(no_of_nodes, igraph_int_t);
  |  |  ------------------
  |  |  |  |   33|  1.46k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  2.92k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (31:12): [True: 1.46k, False: 0]
  |  |  |  |  |  |  |  Branch (31:24): [True: 1.46k, False: 0]
  |  |  |  |  |  |  |  Branch (31:66): [True: 1.46k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   72|  1.46k|IGRAPH_CHECK_OOM(neis, "Insufficient memory to count triangles.");
  |  |  ------------------
  |  |  |  |  709|  1.46k|    do { \
  |  |  |  |  710|  1.46k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  711|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  712|      0|        } \
  |  |  |  |  713|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (713:14): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   73|  1.46k|IGRAPH_FINALLY(igraph_free, neis);
  |  |  ------------------
  |  |  |  |  603|  1.46k|    do { \
  |  |  |  |  604|  1.46k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  605|  1.46k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  606|  1.46k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  607|  1.46k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (607:13): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  |  |  608|  1.46k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  609|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (609:14): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   74|       |
  |  |   75|  1.46k|#ifndef TRIANGLES
  |  |   76|  1.46k|    IGRAPH_CHECK(igraph_vector_resize(res, no_of_nodes));
  |  |  ------------------
  |  |  |  |  656|  1.46k|    do { \
  |  |  |  |  657|  1.46k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  658|  1.46k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|  1.46k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  426|      0|    do { \
  |  |  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  660|      0|        } \
  |  |  |  |  661|  1.46k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (661:14): [Folded, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   77|  1.46k|    igraph_vector_null(res);
  |  |   78|       |#else
  |  |   79|       |    igraph_vector_int_clear(res);
  |  |   80|       |#endif
  |  |   81|       |
  |  |   82|  64.2k|for (nn = no_of_nodes - 1; nn >= 0; nn--) {
  |  |  ------------------
  |  |  |  Branch (82:28): [True: 62.7k, False: 1.46k]
  |  |  ------------------
  |  |   83|  62.7k|    node = VECTOR(order)[nn];
  |  |  ------------------
  |  |  |  |   60|  62.7k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |   84|       |
  |  |   85|  62.7k|    IGRAPH_ALLOW_INTERRUPTION();
  |  |  ------------------
  |  |  |  |   46|  62.7k|    do { \
  |  |  |  |   47|  62.7k|        if (igraph_i_interruption_handler) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (47:13): [True: 0, False: 62.7k]
  |  |  |  |  ------------------
  |  |  |  |   48|      0|            if (igraph_allow_interruption()) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (48:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   49|      0|                return IGRAPH_INTERRUPTED; \
  |  |  |  |   50|      0|            } \
  |  |  |  |   51|      0|        } \
  |  |  |  |   52|  62.7k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:14): [Folded, False: 62.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   86|       |
  |  |   87|  62.7k|    neis1 = igraph_adjlist_get(&allneis, node);
  |  |  ------------------
  |  |  |  |   73|  62.7k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  |  |  ------------------
  |  |   88|  62.7k|    neilen1 = igraph_vector_int_size(neis1);
  |  |   89|       |
  |  |   90|       |#ifdef TRANSIT_TRIEDGES
  |  |   91|       |    deg1 = VECTOR(degree)[node];
  |  |   92|       |#endif
  |  |   93|       |
  |  |   94|       |    /* Mark the neighbors of the node */
  |  |   95|  93.0k|    for (i = 0; i < neilen1; i++) {
  |  |  ------------------
  |  |  |  Branch (95:17): [True: 30.2k, False: 62.7k]
  |  |  ------------------
  |  |   96|  30.2k|        neis[ VECTOR(*neis1)[i] ] = node + 1;
  |  |  ------------------
  |  |  |  |   60|  30.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |   97|  30.2k|    }
  |  |   98|       |
  |  |   99|  93.0k|    for (i = 0; i < neilen1; i++) {
  |  |  ------------------
  |  |  |  Branch (99:17): [True: 30.2k, False: 62.7k]
  |  |  ------------------
  |  |  100|  30.2k|        igraph_int_t nei = VECTOR(*neis1)[i];
  |  |  ------------------
  |  |  |  |   60|  30.2k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  101|  30.2k|        neis2 = igraph_adjlist_get(&allneis, nei);
  |  |  ------------------
  |  |  |  |   73|  30.2k|#define igraph_adjlist_get(al,no) (&(al)->adjs[(igraph_int_t)(no)])
  |  |  ------------------
  |  |  102|  30.2k|        neilen2 = igraph_vector_int_size(neis2);
  |  |  103|  69.7k|        for (j = 0; j < neilen2; j++) {
  |  |  ------------------
  |  |  |  Branch (103:21): [True: 39.4k, False: 30.2k]
  |  |  ------------------
  |  |  104|  39.4k|            igraph_int_t nei2 = VECTOR(*neis2)[j];
  |  |  ------------------
  |  |  |  |   60|  39.4k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  105|  39.4k|            if (neis[nei2] == node + 1) {
  |  |  ------------------
  |  |  |  Branch (105:17): [True: 21.6k, False: 17.7k]
  |  |  ------------------
  |  |  106|  21.6k|#ifndef TRIANGLES
  |  |  107|  21.6k|                VECTOR(*res)[nei2] += 1;
  |  |  ------------------
  |  |  |  |   60|  21.6k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  108|  21.6k|                VECTOR(*res)[nei] += 1;
  |  |  ------------------
  |  |  |  |   60|  21.6k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  109|  21.6k|                VECTOR(*res)[node] += 1;
  |  |  ------------------
  |  |  |  |   60|  21.6k|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |  110|       |#else
  |  |  111|       |                IGRAPH_CHECK(igraph_vector_int_push_back(res, node));
  |  |  112|       |                IGRAPH_CHECK(igraph_vector_int_push_back(res, nei));
  |  |  113|       |                IGRAPH_CHECK(igraph_vector_int_push_back(res, nei2));
  |  |  114|       |#endif
  |  |  115|  21.6k|            }
  |  |  116|  39.4k|        }
  |  |  117|  30.2k|    }
  |  |  118|       |
  |  |  119|       |#ifdef TRANSIT
  |  |  120|       |    if (mode == IGRAPH_TRANSITIVITY_ZERO && deg1 < 2) {
  |  |  121|       |        VECTOR(*res)[node] = 0.0;
  |  |  122|       |    } else {
  |  |  123|       |        VECTOR(*res)[node] = VECTOR(*res)[node] / deg1 / (deg1 - 1) * 2.0;
  |  |  124|       |    }
  |  |  125|       |#endif
  |  |  126|  62.7k|}
  |  |  127|       |
  |  |  128|  1.46k|igraph_free(neis);
  |  |  129|  1.46k|igraph_adjlist_destroy(&allneis);
  |  |  130|  1.46k|igraph_vector_int_destroy(&rank);
  |  |  131|  1.46k|igraph_vector_int_destroy(&degree);
  |  |  132|  1.46k|igraph_vector_int_destroy(&order);
  |  |  133|  1.46k|IGRAPH_FINALLY_CLEAN(5);
  |  |  134|       |
  |  |  135|       |#ifdef TRANSIT_TRIEDGES
  |  |  136|       |#undef TRANSIT_TRIEDGES
  |  |  137|       |#endif
  ------------------
  402|  1.46k|    return IGRAPH_SUCCESS;
  403|  13.1k|}

igraph_rng_default:
  188|  64.2k|igraph_rng_t *igraph_rng_default(void) {
  189|  64.2k|    return igraph_i_rng_default_ptr;
  190|  64.2k|}
igraph_rng_seed:
  260|  1.50k|igraph_error_t igraph_rng_seed(igraph_rng_t *rng, igraph_uint_t seed) {
  261|  1.50k|    const igraph_rng_type_t *type = rng->type;
  262|  1.50k|    IGRAPH_CHECK(type->seed(rng->state, seed));
  ------------------
  |  |  656|  1.50k|    do { \
  |  |  657|  1.50k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  658|  1.50k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  612|  1.50k|    #define IGRAPH_UNLIKELY(a) __builtin_expect(!!(a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (612:32): [True: 0, False: 1.50k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  659|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  426|      0|    do { \
  |  |  |  |  427|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  428|      0|        return igraph_errno ; \
  |  |  |  |  429|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (429:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  660|      0|        } \
  |  |  661|  1.50k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (661:14): [Folded, False: 1.50k]
  |  |  ------------------
  ------------------
  263|  1.50k|    rng->is_seeded = true;
  264|  1.50k|    return IGRAPH_SUCCESS;
  265|  1.50k|}
igraph_rng_bits:
  277|  62.7k|igraph_int_t igraph_rng_bits(const igraph_rng_t* rng) {
  278|  62.7k|    return rng->type->bits;
  279|  62.7k|}
igraph_rng_get_unif01:
  698|  62.7k|igraph_real_t igraph_rng_get_unif01(igraph_rng_t *rng) {
  699|  62.7k|    const igraph_rng_type_t *type = rng->type;
  700|  62.7k|    if (type->get_real) {
  ------------------
  |  Branch (700:9): [True: 0, False: 62.7k]
  ------------------
  701|      0|        return type->get_real(rng->state);
  702|  62.7k|    } else {
  703|       |        /* We extract 52 random bits from a 64-bit uint and fill that directly
  704|       |         * into the mantissa of a double, bit-by-bit, clear the sign bit and
  705|       |         * set the exponent to 2^0. This way we get a 52-bit random double
  706|       |         * between 1 (inclusive) and 2 (exclusive), uniformly distributed.
  707|       |         * Then we subtract 1 to arrive at the [0; 1) interval. This is fast
  708|       |         * but we lose one bit of precision as there are 2^53 possible doubles
  709|       |         * between 0 and 1. */
  710|  62.7k|        union {
  711|  62.7k|            uint64_t as_uint64_t;
  712|  62.7k|            double as_double;
  713|  62.7k|        } value;
  714|  62.7k|        value.as_uint64_t =
  715|  62.7k|            (igraph_i_rng_get_random_bits_uint64(rng, 52) & 0xFFFFFFFFFFFFFull) | 0x3FF0000000000000ull;
  716|  62.7k|        return value.as_double - 1.0;
  717|  62.7k|    }
  718|  62.7k|}
random.c:igraph_i_rng_get_random_bits_uint64:
  375|  62.7k|static uint64_t igraph_i_rng_get_random_bits_uint64(igraph_rng_t *rng, uint8_t bits) {
  376|  62.7k|    const igraph_rng_type_t *type = rng->type;
  377|  62.7k|    igraph_int_t rng_bitwidth = igraph_rng_bits(rng);
  378|  62.7k|    uint64_t result;
  379|       |
  380|  62.7k|    if (rng_bitwidth >= bits) {
  ------------------
  |  Branch (380:9): [True: 0, False: 62.7k]
  ------------------
  381|       |        /* keep the high bits as RNGs sometimes tend to have lower entropy in
  382|       |         * low bits than in high bits */
  383|      0|        result = type->get(rng->state) >> (rng_bitwidth - bits);
  384|  62.7k|    } else {
  385|  62.7k|        result = 0;
  386|  62.7k|        do {
  387|  62.7k|            result = (result << rng_bitwidth) + type->get(rng->state);
  388|  62.7k|            bits -= rng_bitwidth;
  389|  62.7k|        } while (bits > rng_bitwidth);
  ------------------
  |  Branch (389:18): [True: 0, False: 62.7k]
  ------------------
  390|       |
  391|       |        /* and now the last piece */
  392|  62.7k|        result = (result << bits) + (type->get(rng->state) >> (rng_bitwidth - bits));
  393|  62.7k|    }
  394|       |
  395|  62.7k|    return result;
  396|  62.7k|}

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

