LLVMFuzzerTestOneInput:
   25|  1.79k|int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
   26|       |
   27|  1.79k|    igraph_set_error_handler(igraph_error_handler_ignore);
   28|  1.79k|    igraph_set_warning_handler(igraph_warning_handler_ignore);
   29|       |
   30|       |    // Turn on attribute handling
   31|  1.79k|    igraph_set_attribute_table(&igraph_cattribute_table);
   32|       |
   33|       |    // Read input file
   34|  1.79k|    FILE *ifile = fmemopen((void*) data, size, "r");
   35|  1.79k|    if (!ifile) {
  ------------------
  |  Branch (35:9): [True: 0, False: 1.79k]
  ------------------
   36|      0|        return 0;
   37|      0|    }
   38|       |
   39|  1.79k|    igraph_strvector_t problem;
   40|  1.79k|    IGRAPH_ASSERT(igraph_strvector_init(&problem, 0) == IGRAPH_SUCCESS);
  ------------------
  |  |  916|  1.79k|    do { \
  |  |  917|  1.79k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.79k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.79k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  ------------------
  |  |  |  |  406|      0|#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  919|      0|        } \
  |  |  920|  1.79k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   41|       |
   42|  1.79k|    igraph_vector_int_t label;
   43|  1.79k|    IGRAPH_ASSERT(igraph_vector_int_init(&label, 0) == IGRAPH_SUCCESS);
  ------------------
  |  |  916|  1.79k|    do { \
  |  |  917|  1.79k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.79k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.79k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  ------------------
  |  |  |  |  406|      0|#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  919|      0|        } \
  |  |  920|  1.79k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   44|       |
   45|  1.79k|    igraph_vector_t capacity;
   46|  1.79k|    IGRAPH_ASSERT(igraph_vector_init(&capacity, 0) == IGRAPH_SUCCESS);
  ------------------
  |  |  916|  1.79k|    do { \
  |  |  917|  1.79k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.79k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.79k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  ------------------
  |  |  |  |  406|      0|#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  919|      0|        } \
  |  |  920|  1.79k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   47|       |
   48|  1.79k|    igraph_integer_t source, target;
   49|       |
   50|       |    // Do the fuzzing
   51|  1.79k|    igraph_t g;
   52|  1.79k|    if (igraph_read_graph_dimacs_flow(&g, ifile, &problem, &label, &source, &target, &capacity, IGRAPH_DIRECTED) == IGRAPH_SUCCESS) {
  ------------------
  |  Branch (52:9): [True: 435, False: 1.35k]
  ------------------
   53|       |        // Clean up
   54|    435|        igraph_destroy(&g);
   55|    435|    }
   56|       |
   57|       |    // no need to call igraph_destroy() if igraph_read_graph_dl() returns an
   58|       |    // error code as we don't have a valid graph object in that case
   59|       |
   60|  1.79k|    igraph_vector_destroy(&capacity);
   61|  1.79k|    igraph_vector_int_destroy(&label);
   62|  1.79k|    igraph_strvector_destroy(&problem);
   63|       |
   64|  1.79k|    fclose(ifile);
   65|       |
   66|  1.79k|    IGRAPH_ASSERT(IGRAPH_FINALLY_STACK_EMPTY);
  ------------------
  |  |  916|  1.79k|    do { \
  |  |  917|  1.79k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.79k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.79k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  ------------------
  |  |  |  |  406|      0|#  define IGRAPH_FILE_BASENAME __FILE__
  |  |  ------------------
  |  |  919|      0|        } \
  |  |  920|  1.79k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   67|       |
   68|  1.79k|    return 0;
   69|  1.79k|}

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

igraph_error:
  211|  1.91k|                            igraph_error_t igraph_errno) {
  212|       |
  213|  1.91k|    if (igraph_i_error_handler) {
  ------------------
  |  Branch (213:9): [True: 1.91k, False: 0]
  ------------------
  214|  1.91k|        igraph_i_error_handler(reason, file, line, igraph_errno);
  215|  1.91k|#ifndef USING_R
  216|  1.91k|    }  else {
  217|      0|        igraph_error_handler_abort(reason, file, line, igraph_errno);
  218|      0|#endif
  219|      0|    }
  220|  1.91k|    return igraph_errno;
  221|  1.91k|}
igraph_errorf:
  240|    230|                             igraph_error_t igraph_errno, ...) {
  241|    230|    va_list ap;
  242|    230|    va_start(ap, igraph_errno);
  243|    230|    vsnprintf(igraph_i_errormsg_buffer,
  244|    230|              sizeof(igraph_i_errormsg_buffer) / sizeof(char), reason, ap);
  245|    230|    va_end(ap);
  246|    230|    return igraph_error(igraph_i_errormsg_buffer, file, line, igraph_errno);
  247|    230|}
igraph_error_handler_ignore:
  266|  1.91k|                                 int line, igraph_error_t igraph_errno) {
  267|  1.91k|    IGRAPH_UNUSED(reason);
  ------------------
  |  |   32|  1.91k|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
  268|  1.91k|    IGRAPH_UNUSED(file);
  ------------------
  |  |   32|  1.91k|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
  269|  1.91k|    IGRAPH_UNUSED(line);
  ------------------
  |  |   32|  1.91k|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
  270|  1.91k|    IGRAPH_UNUSED(igraph_errno);
  ------------------
  |  |   32|  1.91k|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
  271|       |
  272|  1.91k|    IGRAPH_FINALLY_FREE();
  273|  1.91k|}
igraph_set_error_handler:
  298|  1.79k|igraph_error_handler_t *igraph_set_error_handler(igraph_error_handler_t *new_handler) {
  299|  1.79k|    igraph_error_handler_t *previous_handler = igraph_i_error_handler;
  300|  1.79k|    igraph_i_error_handler = new_handler;
  301|  1.79k|    return previous_handler;
  302|  1.79k|}
IGRAPH_FINALLY_REAL:
  320|  9.50k|void IGRAPH_FINALLY_REAL(void (*func)(void*), void* ptr) {
  321|  9.50k|    int no = igraph_i_finally_stack_size;
  322|  9.50k|    if (no < 0) {
  ------------------
  |  Branch (322:9): [True: 0, False: 9.50k]
  ------------------
  323|       |        /* Reset finally stack in case fatal error handler does a longjmp instead of terminating the process: */
  324|      0|        igraph_i_reset_finally_stack();
  325|      0|        IGRAPH_FATALF("Corrupt finally stack: it contains %d elements.", no);
  ------------------
  |  |  867|      0|    do { \
  |  |  868|      0|        igraph_fatalf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  869|      0|                      __VA_ARGS__); \
  |  |  870|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (870:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  326|      0|    }
  327|  9.50k|    if (no >= (int) (sizeof(igraph_i_finally_stack) / sizeof(igraph_i_finally_stack[0]))) {
  ------------------
  |  Branch (327:9): [True: 0, False: 9.50k]
  ------------------
  328|       |        /* Reset finally stack in case fatal error handler does a longjmp instead of terminating the process: */
  329|      0|        igraph_i_reset_finally_stack();
  330|      0|        IGRAPH_FATALF("Finally stack too large: it contains %d elements.", no);
  ------------------
  |  |  867|      0|    do { \
  |  |  868|      0|        igraph_fatalf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  869|      0|                      __VA_ARGS__); \
  |  |  870|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (870:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  331|      0|    }
  332|  9.50k|    igraph_i_finally_stack[no].ptr = ptr;
  333|  9.50k|    igraph_i_finally_stack[no].func = func;
  334|  9.50k|    igraph_i_finally_stack[no].level = igraph_i_finally_stack_level;
  335|  9.50k|    igraph_i_finally_stack_size++;
  336|  9.50k|}
IGRAPH_FINALLY_CLEAN:
  338|  2.76k|void IGRAPH_FINALLY_CLEAN(int minus) {
  339|  2.76k|    igraph_i_finally_stack_size -= minus;
  340|  2.76k|    if (igraph_i_finally_stack_size < 0) {
  ------------------
  |  Branch (340:9): [True: 0, False: 2.76k]
  ------------------
  341|      0|        int left = igraph_i_finally_stack_size + minus;
  342|       |        /* Reset finally stack in case fatal error handler does a longjmp instead of terminating the process: */
  343|      0|        igraph_i_reset_finally_stack();
  344|      0|        IGRAPH_FATALF("Corrupt finally stack: trying to pop %d element(s) when only %d left.", minus, left);
  ------------------
  |  |  867|      0|    do { \
  |  |  868|      0|        igraph_fatalf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  869|      0|                      __VA_ARGS__); \
  |  |  870|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (870:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  345|      0|    }
  346|  2.76k|}
IGRAPH_FINALLY_FREE:
  348|  1.91k|void IGRAPH_FINALLY_FREE(void) {
  349|  3.27k|    for (; igraph_i_finally_stack_size > 0; igraph_i_finally_stack_size--) {
  ------------------
  |  Branch (349:12): [True: 1.35k, False: 1.91k]
  ------------------
  350|  1.35k|        int p = igraph_i_finally_stack_size - 1;
  351|       |        /* Call destructors only up to the current level */
  352|  1.35k|        if (igraph_i_finally_stack[p].level < igraph_i_finally_stack_level) {
  ------------------
  |  Branch (352:13): [True: 0, False: 1.35k]
  ------------------
  353|      0|            break;
  354|      0|        }
  355|  1.35k|        igraph_i_finally_stack[p].func(igraph_i_finally_stack[p].ptr);
  356|  1.35k|    }
  357|  1.91k|}
IGRAPH_FINALLY_STACK_SIZE:
  359|  1.79k|int IGRAPH_FINALLY_STACK_SIZE(void) {
  360|  1.79k|    return igraph_i_finally_stack_size;
  361|  1.79k|}
IGRAPH_FINALLY_ENTER:
  377|  1.08k|void IGRAPH_FINALLY_ENTER(void) {
  378|  1.08k|    int no = igraph_i_finally_stack_size;
  379|       |    /* Level indices must always be in increasing order in the finally stack */
  380|  1.08k|    if (no > 0 && igraph_i_finally_stack[no-1].level > igraph_i_finally_stack_level) {
  ------------------
  |  Branch (380:9): [True: 1.08k, False: 0]
  |  Branch (380:19): [True: 0, False: 1.08k]
  ------------------
  381|       |        /* Reset finally stack in case fatal error handler does a longjmp instead of terminating the process: */
  382|      0|        igraph_i_reset_finally_stack();
  383|      0|        IGRAPH_FATAL("Corrupt finally stack: cannot create new finally stack level before last one is freed.");
  ------------------
  |  |  887|      0|    do { \
  |  |  888|      0|        igraph_fatal(reason, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  889|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (889:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  384|      0|    }
  385|  1.08k|    igraph_i_finally_stack_level++;
  386|  1.08k|}
IGRAPH_FINALLY_EXIT:
  399|  1.08k|void IGRAPH_FINALLY_EXIT(void) {
  400|  1.08k|    igraph_i_finally_stack_level--;
  401|  1.08k|    if (igraph_i_finally_stack_level < 0) {
  ------------------
  |  Branch (401:9): [True: 0, False: 1.08k]
  ------------------
  402|       |        /* Reset finally stack in case fatal error handler does a longjmp instead of terminating the process: */
  403|      0|        igraph_i_reset_finally_stack();
  404|      0|        IGRAPH_FATAL("Corrupt finally stack: trying to exit outermost finally stack level.");
  ------------------
  |  |  887|      0|    do { \
  |  |  888|      0|        igraph_fatal(reason, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  889|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (889:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  405|      0|    }
  406|  1.08k|}
igraph_set_warning_handler:
  523|  1.79k|igraph_warning_handler_t *igraph_set_warning_handler(igraph_warning_handler_t *new_handler) {
  524|  1.79k|    igraph_warning_handler_t *previous_handler = igraph_i_warning_handler;
  525|  1.79k|    igraph_i_warning_handler = new_handler;
  526|  1.79k|    return previous_handler;
  527|  1.79k|}

igraph_strvector_init:
   72|  1.79k|igraph_error_t igraph_strvector_init(igraph_strvector_t *sv, igraph_integer_t size) {
   73|       |
   74|  1.79k|    sv->stor_begin = IGRAPH_CALLOC(size, const char *);
  ------------------
  |  |   38|  1.79k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  3.58k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 1.79k, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 1.79k, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 0, False: 1.79k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   75|  1.79k|    IGRAPH_CHECK_OOM(sv->stor_begin, "Cannot initialize string vector.");
  ------------------
  |  |  701|  1.79k|    do { \
  |  |  702|  1.79k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|  1.79k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.79k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|  1.79k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   76|       |
   77|  1.79k|    sv->stor_end = sv->stor_begin + size;
   78|  1.79k|    sv->end = sv->stor_end;
   79|       |
   80|  1.79k|    return IGRAPH_SUCCESS;
   81|  1.79k|}
igraph_strvector_destroy:
   96|  1.79k|void igraph_strvector_destroy(igraph_strvector_t *sv) {
   97|  1.79k|    IGRAPH_ASSERT(sv != NULL);
  ------------------
  |  |  916|  1.79k|    do { \
  |  |  917|  1.79k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.79k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.79k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.79k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   98|  1.79k|    IGRAPH_ASSERT(sv->stor_begin != NULL);
  ------------------
  |  |  916|  1.79k|    do { \
  |  |  917|  1.79k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.79k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.79k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.79k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   99|  3.05k|    for (const char **ptr = sv->stor_begin; ptr < sv->end; ptr++) {
  ------------------
  |  Branch (99:45): [True: 1.25k, False: 1.79k]
  ------------------
  100|  1.25k|        IGRAPH_FREE(*ptr);
  ------------------
  |  |   41|  1.25k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  101|  1.25k|    }
  102|  1.79k|    IGRAPH_FREE(sv->stor_begin);
  ------------------
  |  |   41|  1.79k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  103|  1.79k|}
igraph_strvector_clear:
  394|  1.25k|void igraph_strvector_clear(igraph_strvector_t *sv) {
  395|  1.25k|    igraph_integer_t n = igraph_strvector_size(sv);
  396|       |
  397|  1.25k|    for (igraph_integer_t i = 0; i < n; i++) {
  ------------------
  |  Branch (397:34): [True: 0, False: 1.25k]
  ------------------
  398|      0|        IGRAPH_FREE(sv->stor_begin[i]);
  ------------------
  |  |   41|      0|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  399|      0|    }
  400|  1.25k|    sv->end = sv->stor_begin;
  401|  1.25k|}
igraph_strvector_capacity:
  449|  1.25k|igraph_integer_t igraph_strvector_capacity(const igraph_strvector_t *sv) {
  450|  1.25k|    IGRAPH_ASSERT(sv != NULL);
  ------------------
  |  |  916|  1.25k|    do { \
  |  |  917|  1.25k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.25k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  451|  1.25k|    IGRAPH_ASSERT(sv->stor_begin != NULL);
  ------------------
  |  |  916|  1.25k|    do { \
  |  |  917|  1.25k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.25k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  452|  1.25k|    return sv->stor_end - sv->stor_begin;
  453|  1.25k|}
igraph_strvector_reserve:
  482|  1.25k|igraph_error_t igraph_strvector_reserve(igraph_strvector_t *sv, igraph_integer_t capacity) {
  483|  1.25k|    igraph_integer_t current_capacity = igraph_strvector_capacity(sv);
  484|       |
  485|  1.25k|    if (capacity <= current_capacity) {
  ------------------
  |  Branch (485:9): [True: 0, False: 1.25k]
  ------------------
  486|      0|        return IGRAPH_SUCCESS;
  487|      0|    }
  488|       |
  489|  1.25k|    const char **tmp = IGRAPH_REALLOC(sv->stor_begin, capacity, const char *);
  ------------------
  |  |   40|  1.25k|#define IGRAPH_REALLOC(p,n,t) IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, realloc((void*)(p), sizeof(t) * ((n) > 0 ? (n) : 1)))
  |  |  ------------------
  |  |  |  |   36|  2.51k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 1.25k, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 1.25k, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 1.25k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  490|  1.25k|    IGRAPH_CHECK_OOM(tmp, "Cannot reserve space for new items in string vector.");
  ------------------
  |  |  701|  1.25k|    do { \
  |  |  702|  1.25k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|  1.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|  1.25k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  491|       |
  492|  1.25k|    sv->end = tmp + (sv->end - sv->stor_begin);
  493|  1.25k|    sv->stor_begin = tmp;
  494|  1.25k|    sv->stor_end = sv->stor_begin + capacity;
  495|       |
  496|  1.25k|    return IGRAPH_SUCCESS;
  497|  1.25k|}
igraph_strvector_size:
  539|  2.51k|igraph_integer_t igraph_strvector_size(const igraph_strvector_t *sv) {
  540|  2.51k|    IGRAPH_ASSERT(sv != NULL);
  ------------------
  |  |  916|  2.51k|    do { \
  |  |  917|  2.51k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  2.51k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.51k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  2.51k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  541|  2.51k|    IGRAPH_ASSERT(sv->stor_begin != NULL);
  ------------------
  |  |  916|  2.51k|    do { \
  |  |  917|  2.51k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  2.51k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 2.51k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  2.51k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  542|  2.51k|    return sv->end - sv->stor_begin;
  543|  2.51k|}
igraph_strvector_push_back:
  581|  1.25k|igraph_error_t igraph_strvector_push_back(igraph_strvector_t *sv, const char *value) {
  582|  1.25k|    IGRAPH_CHECK(igraph_i_strvector_expand_if_full(sv));
  ------------------
  |  |  648|  1.25k|    do { \
  |  |  649|  1.25k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.25k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.25k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  583|  1.25k|    const char *tmp = strdup(value);
  584|  1.25k|    IGRAPH_CHECK_OOM(tmp, "Cannot push new string to string vector.");
  ------------------
  |  |  701|  1.25k|    do { \
  |  |  702|  1.25k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|  1.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|  1.25k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  585|  1.25k|    *sv->end = tmp;
  586|  1.25k|    sv->end++;
  587|       |
  588|  1.25k|    return IGRAPH_SUCCESS;
  589|  1.25k|}
strvector.c:igraph_i_strvector_expand_if_full:
  549|  1.25k|static igraph_error_t igraph_i_strvector_expand_if_full(igraph_strvector_t *sv) {
  550|  1.25k|    IGRAPH_ASSERT(sv != NULL);
  ------------------
  |  |  916|  1.25k|    do { \
  |  |  917|  1.25k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.25k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  551|  1.25k|    IGRAPH_ASSERT(sv->stor_begin != NULL);
  ------------------
  |  |  916|  1.25k|    do { \
  |  |  917|  1.25k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.25k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  552|       |
  553|  1.25k|    if (sv->stor_end == sv->end) {
  ------------------
  |  Branch (553:9): [True: 1.25k, False: 0]
  ------------------
  554|  1.25k|        igraph_integer_t old_size = igraph_strvector_size(sv);
  555|  1.25k|        igraph_integer_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   77|  1.25k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
                      igraph_integer_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   77|  1.25k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (555:37): [True: 1.25k, False: 0]
  ------------------
  556|  1.25k|        if (old_size == IGRAPH_INTEGER_MAX) {
  ------------------
  |  |   77|  1.25k|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (556:13): [True: 0, False: 1.25k]
  ------------------
  557|      0|            IGRAPH_ERROR("Cannot add new item to string vector, already at maximum size.", IGRAPH_EOVERFLOW);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  558|      0|        }
  559|  1.25k|        if (new_size == 0) {
  ------------------
  |  Branch (559:13): [True: 1.25k, False: 0]
  ------------------
  560|  1.25k|            new_size = 1;
  561|  1.25k|        }
  562|  1.25k|        IGRAPH_CHECK(igraph_strvector_reserve(sv, new_size));
  ------------------
  |  |  648|  1.25k|    do { \
  |  |  649|  1.25k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.25k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.25k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  563|  1.25k|    }
  564|       |
  565|  1.25k|    return IGRAPH_SUCCESS;
  566|  1.25k|}

igraph_attribute_record_list_init:
  110|  1.30k|igraph_error_t FUNCTION(init)(TYPE *v, igraph_integer_t size) {
  111|  1.30k|    igraph_integer_t alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (111:35): [True: 0, False: 1.30k]
  ------------------
  112|  1.30k|    IGRAPH_ASSERT(size >= 0);
  ------------------
  |  |  916|  1.30k|    do { \
  |  |  917|  1.30k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  113|  1.30k|    v->stor_begin = IGRAPH_CALLOC(alloc_size, ITEM_TYPE);
  ------------------
  |  |   38|  1.30k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  2.61k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 1.30k, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 1.30k, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 1.30k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  114|  1.30k|    if (v->stor_begin == 0) {
  ------------------
  |  Branch (114:9): [True: 0, False: 1.30k]
  ------------------
  115|      0|        IGRAPH_ERROR("Cannot initialize list.", IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  116|      0|    }
  117|  1.30k|    v->stor_end = v->stor_begin + alloc_size;
  118|  1.30k|    v->end = v->stor_begin + size;
  119|       |
  120|  1.30k|    IGRAPH_CHECK(INTERNAL_FUNCTION(init_slice)(v, v->stor_begin, v->end));
  ------------------
  |  |  648|  1.30k|    do { \
  |  |  649|  1.30k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.30k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  121|       |
  122|  1.30k|    return IGRAPH_SUCCESS;
  123|  1.30k|}
igraph_attribute_record_list_destroy:
  177|  1.30k|void FUNCTION(destroy)(TYPE *v) {
  178|  1.30k|    IGRAPH_ASSERT(v != 0);
  ------------------
  |  |  916|  1.30k|    do { \
  |  |  917|  1.30k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  179|       |
  180|  1.30k|    if (v->stor_begin != 0) {
  ------------------
  |  Branch (180:9): [True: 1.30k, False: 0]
  ------------------
  181|  1.30k|        FUNCTION(clear)(v);
  ------------------
  |  |  166|  1.30k|    #define FUNCTION(c) CONCAT2x(igraph_attribute_record_list,c)
  |  |  ------------------
  |  |  |  |   24|  1.30k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
  182|  1.30k|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   41|  1.30k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  183|  1.30k|        v->stor_begin = NULL;
  184|  1.30k|    }
  185|  1.30k|}
igraph_attribute_record_list_size:
  288|  1.08k|igraph_integer_t FUNCTION(size)(const TYPE *v) {
  289|  1.08k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  1.08k|    do { \
  |  |  917|  1.08k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.08k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.08k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.08k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  290|  1.08k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  1.08k|    do { \
  |  |  917|  1.08k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.08k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.08k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.08k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  291|  1.08k|    return v->end - v->stor_begin;
  292|  1.08k|}
igraph_attribute_record_list_clear:
  358|  1.30k|void FUNCTION(clear)(TYPE *v) {
  359|  1.30k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  1.30k|    do { \
  |  |  917|  1.30k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  360|  1.30k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  1.30k|    do { \
  |  |  917|  1.30k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  361|  1.30k|    INTERNAL_FUNCTION(destroy_slice)(v, v->stor_begin, v->end);
  ------------------
  |  |  167|  1.30k|    #define INTERNAL_FUNCTION(c) CONCAT2x(igraph_i_attribute_record_list,c)
  |  |  ------------------
  |  |  |  |   24|  1.30k|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
  362|  1.30k|    v->end = v->stor_begin;
  363|  1.30k|}
attributes.c:igraph_i_attribute_record_list_init_slice:
 1069|  1.30k|static igraph_error_t INTERNAL_FUNCTION(init_slice)(const TYPE *list, ITEM_TYPE *start, ITEM_TYPE *end) {
 1070|  1.30k|    ITEM_TYPE *current;
  ------------------
  |  |   62|  1.30k|    #define ITEM_TYPE BASE
  |  |  ------------------
  |  |  |  |  120|  1.30k|    #define BASE igraph_attribute_record_t
  |  |  ------------------
  ------------------
 1071|  1.30k|    igraph_error_t retval;
 1072|       |
 1073|  1.30k|    for (current = start; current < end; current++) {
  ------------------
  |  Branch (1073:27): [True: 0, False: 1.30k]
  ------------------
 1074|      0|        retval = INTERNAL_FUNCTION(init_item)(list, current);
  ------------------
  |  |  167|      0|    #define INTERNAL_FUNCTION(c) CONCAT2x(igraph_i_attribute_record_list,c)
  |  |  ------------------
  |  |  |  |   24|      0|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
 1075|      0|        if (retval) {
  ------------------
  |  Branch (1075:13): [True: 0, False: 0]
  ------------------
 1076|      0|            INTERNAL_FUNCTION(destroy_slice)(list, start, current);
  ------------------
  |  |  167|      0|    #define INTERNAL_FUNCTION(c) CONCAT2x(igraph_i_attribute_record_list,c)
  |  |  ------------------
  |  |  |  |   24|      0|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
 1077|      0|            IGRAPH_CHECK(retval);
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1078|      0|        }
 1079|      0|    }
 1080|       |
 1081|  1.30k|    return IGRAPH_SUCCESS;
 1082|  1.30k|}
attributes.c:igraph_i_attribute_record_list_destroy_slice:
 1084|  1.30k|static void INTERNAL_FUNCTION(destroy_slice)(const TYPE *list, ITEM_TYPE *start, ITEM_TYPE *end) {
 1085|  1.30k|    IGRAPH_UNUSED(list);
  ------------------
  |  |   32|  1.30k|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
 1086|  1.30k|    for (; start < end; start++) {
  ------------------
  |  Branch (1086:12): [True: 0, False: 1.30k]
  ------------------
 1087|      0|        INTERNAL_FUNCTION(destroy_item)(start);
  ------------------
  |  |  167|      0|    #define INTERNAL_FUNCTION(c) CONCAT2x(igraph_i_attribute_record_list,c)
  |  |  ------------------
  |  |  |  |   24|      0|#define CONCAT2x(a,b) a ## _ ## b
  |  |  ------------------
  ------------------
 1088|      0|    }
 1089|  1.30k|}

igraph_vector_int_pair_order:
  120|    684|                                       igraph_vector_int_t* res, igraph_integer_t nodes) {
  121|    684|    igraph_integer_t edges = igraph_vector_int_size(v);
  122|    684|    igraph_vector_int_t ptr;
  123|    684|    igraph_vector_int_t rad;
  124|    684|    igraph_integer_t i, j;
  125|       |
  126|    684|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|    684|    do { \
  |  |  917|    684|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|    684|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 684]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|    684|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  127|    684|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|    684|    do { \
  |  |  917|    684|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|    684|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 684]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|    684|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  128|       |
  129|    684|    IGRAPH_VECTOR_INT_INIT_FINALLY(&ptr, nodes + 1);
  ------------------
  |  |  124|    684|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|    684|    do { \
  |  |  |  |  649|    684|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|    684|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|    684|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 684]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|    684|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|    684|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|    684|    do { \
  |  |  |  |  592|    684|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|    684|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|    684|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|    684|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|    684|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|    684|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  130|    684|    IGRAPH_VECTOR_INT_INIT_FINALLY(&rad, edges);
  ------------------
  |  |  124|    684|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|    684|    do { \
  |  |  |  |  649|    684|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|    684|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|    684|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 684]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|    684|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|    684|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|    684|    do { \
  |  |  |  |  592|    684|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|    684|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|    684|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|    684|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|    684|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|    684|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  131|    684|    IGRAPH_CHECK(igraph_vector_int_resize(res, edges));
  ------------------
  |  |  648|    684|    do { \
  |  |  649|    684|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    684|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    684|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 684]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    684|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  132|       |
  133|  2.01M|    for (i = 0; i < edges; i++) {
  ------------------
  |  Branch (133:17): [True: 2.01M, False: 684]
  ------------------
  134|  2.01M|        igraph_integer_t radix = VECTOR(*v2)[i];
  ------------------
  |  |   65|  2.01M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  135|  2.01M|        if (VECTOR(ptr)[radix] != 0) {
  ------------------
  |  |   65|  2.01M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (135:13): [True: 2.00M, False: 2.30k]
  ------------------
  136|  2.00M|            VECTOR(rad)[i] = VECTOR(ptr)[radix];
  ------------------
  |  |   65|  2.00M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(rad)[i] = VECTOR(ptr)[radix];
  ------------------
  |  |   65|  2.00M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  137|  2.00M|        }
  138|  2.01M|        VECTOR(ptr)[radix] = i + 1;
  ------------------
  |  |   65|  2.01M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  139|  2.01M|    }
  140|       |
  141|    684|    j = 0;
  142|   165M|    for (i = 0; i < nodes + 1; i++) {
  ------------------
  |  Branch (142:17): [True: 165M, False: 684]
  ------------------
  143|   165M|        if (VECTOR(ptr)[i] != 0) {
  ------------------
  |  |   65|   165M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (143:13): [True: 2.30k, False: 165M]
  ------------------
  144|  2.30k|            igraph_integer_t next = VECTOR(ptr)[i] - 1;
  ------------------
  |  |   65|  2.30k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  145|  2.30k|            VECTOR(*res)[j++] = next;
  ------------------
  |  |   65|  2.30k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  146|  2.01M|            while (VECTOR(rad)[next] != 0) {
  ------------------
  |  |   65|  2.01M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (146:20): [True: 2.00M, False: 2.30k]
  ------------------
  147|  2.00M|                next = VECTOR(rad)[next] - 1;
  ------------------
  |  |   65|  2.00M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  148|  2.00M|                VECTOR(*res)[j++] = next;
  ------------------
  |  |   65|  2.00M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  149|  2.00M|            }
  150|  2.30k|        }
  151|   165M|    }
  152|       |
  153|    684|    igraph_vector_int_null(&ptr);
  154|    684|    igraph_vector_int_null(&rad);
  155|       |
  156|  2.01M|    for (i = 0; i < edges; i++) {
  ------------------
  |  Branch (156:17): [True: 2.01M, False: 684]
  ------------------
  157|  2.01M|        igraph_integer_t edge = VECTOR(*res)[edges - i - 1];
  ------------------
  |  |   65|  2.01M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  158|  2.01M|        igraph_integer_t radix = VECTOR(*v)[edge];
  ------------------
  |  |   65|  2.01M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  159|  2.01M|        if (VECTOR(ptr)[radix] != 0) {
  ------------------
  |  |   65|  2.01M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (159:13): [True: 2.00M, False: 2.30k]
  ------------------
  160|  2.00M|            VECTOR(rad)[edge] = VECTOR(ptr)[radix];
  ------------------
  |  |   65|  2.00M|#define VECTOR(v) ((v).stor_begin)
  ------------------
                          VECTOR(rad)[edge] = VECTOR(ptr)[radix];
  ------------------
  |  |   65|  2.00M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  161|  2.00M|        }
  162|  2.01M|        VECTOR(ptr)[radix] = edge + 1;
  ------------------
  |  |   65|  2.01M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  163|  2.01M|    }
  164|       |
  165|    684|    j = 0;
  166|   165M|    for (i = 0; i < nodes + 1; i++) {
  ------------------
  |  Branch (166:17): [True: 165M, False: 684]
  ------------------
  167|   165M|        if (VECTOR(ptr)[i] != 0) {
  ------------------
  |  |   65|   165M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (167:13): [True: 2.30k, False: 165M]
  ------------------
  168|  2.30k|            igraph_integer_t next = VECTOR(ptr)[i] - 1;
  ------------------
  |  |   65|  2.30k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  169|  2.30k|            VECTOR(*res)[j++] = next;
  ------------------
  |  |   65|  2.30k|#define VECTOR(v) ((v).stor_begin)
  ------------------
  170|  2.01M|            while (VECTOR(rad)[next] != 0) {
  ------------------
  |  |   65|  2.01M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (170:20): [True: 2.00M, False: 2.30k]
  ------------------
  171|  2.00M|                next = VECTOR(rad)[next] - 1;
  ------------------
  |  |   65|  2.00M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  172|  2.00M|                VECTOR(*res)[j++] = next;
  ------------------
  |  |   65|  2.00M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  173|  2.00M|            }
  174|  2.30k|        }
  175|   165M|    }
  176|       |
  177|    684|    igraph_vector_int_destroy(&ptr);
  178|    684|    igraph_vector_int_destroy(&rad);
  179|    684|    IGRAPH_FINALLY_CLEAN(2);
  180|       |
  181|    684|    return IGRAPH_SUCCESS;
  182|    684|}

igraph_vector_init:
  135|  1.79k|igraph_error_t FUNCTION(igraph_vector, init)(TYPE(igraph_vector) *v, igraph_integer_t size) {
  136|  1.79k|    igraph_integer_t alloc_size;
  137|  1.79k|    IGRAPH_ASSERT(size >= 0);
  ------------------
  |  |  916|  1.79k|    do { \
  |  |  917|  1.79k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.79k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.79k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.79k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  138|  1.79k|    alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (138:18): [True: 0, False: 1.79k]
  ------------------
  139|       |
  140|       |    /* When this function fails, it should leave stor_begin set to NULL,
  141|       |     * so that vector_destroy() is still safe to call on the vector.
  142|       |     * This simplifies freeing partially initialized data structures,
  143|       |     * such as adjacency lists, when an error occurs mid-initialization. */
  144|  1.79k|    v->stor_begin = IGRAPH_CALLOC(alloc_size, BASE);
  ------------------
  |  |   38|  1.79k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  3.58k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 1.79k, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 1.79k, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 1.79k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  145|  1.79k|    if (v->stor_begin == NULL) {
  ------------------
  |  Branch (145:9): [True: 0, False: 1.79k]
  ------------------
  146|      0|        IGRAPH_ERROR("Cannot initialize vector.", IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  147|      0|    }
  148|  1.79k|    v->stor_end = v->stor_begin + alloc_size;
  149|  1.79k|    v->end = v->stor_begin + size;
  150|       |
  151|  1.79k|    return IGRAPH_SUCCESS;
  152|  1.79k|}
igraph_vector_destroy:
  400|  1.79k|void FUNCTION(igraph_vector, destroy)(TYPE(igraph_vector) *v) {
  401|  1.79k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  1.79k|    do { \
  |  |  917|  1.79k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.79k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.79k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.79k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  402|       |    /* vector_init() will leave stor_begin set to NULL when it fails.
  403|       |     * We handle these cases gracefully. */
  404|  1.79k|    if (v->stor_begin != NULL) {
  ------------------
  |  Branch (404:9): [True: 1.79k, False: 0]
  ------------------
  405|  1.79k|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   41|  1.79k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  406|  1.79k|        v->stor_begin = NULL;
  407|  1.79k|    }
  408|  1.79k|}
igraph_vector_capacity:
  428|    709|igraph_integer_t FUNCTION(igraph_vector, capacity)(const TYPE(igraph_vector) *v) {
  429|    709|    return v->stor_end - v->stor_begin;
  430|    709|}
igraph_vector_reserve:
  460|    709|igraph_error_t FUNCTION(igraph_vector, reserve)(TYPE(igraph_vector) *v, igraph_integer_t capacity) {
  461|    709|    igraph_integer_t current_capacity;
  462|    709|    BASE *tmp;
  ------------------
  |  |   34|    709|    #define BASE igraph_real_t
  ------------------
  463|       |
  464|    709|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|    709|    do { \
  |  |  917|    709|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|    709|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 709]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|    709|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  465|    709|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|    709|    do { \
  |  |  917|    709|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|    709|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 709]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|    709|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  466|    709|    IGRAPH_ASSERT(capacity >= 0);
  ------------------
  |  |  916|    709|    do { \
  |  |  917|    709|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|    709|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 709]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|    709|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  467|       |
  468|    709|    current_capacity = FUNCTION(igraph_vector, capacity)(v);
  ------------------
  |  |  175|    709|        #define FUNCTION(a,c) CONCAT2(a,c)
  |  |  ------------------
  |  |  |  |   25|    709|#define CONCAT2(a,b) CONCAT2x(a,b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   24|    709|#define CONCAT2x(a,b) a ## _ ## b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  469|       |
  470|    709|    if (capacity <= current_capacity) {
  ------------------
  |  Branch (470:9): [True: 348, False: 361]
  ------------------
  471|    348|        return IGRAPH_SUCCESS;
  472|    348|    }
  473|       |
  474|    361|    tmp = IGRAPH_REALLOC(v->stor_begin, capacity, BASE);
  ------------------
  |  |   40|    361|#define IGRAPH_REALLOC(p,n,t) IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, realloc((void*)(p), sizeof(t) * ((n) > 0 ? (n) : 1)))
  |  |  ------------------
  |  |  |  |   36|    722|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 361, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 361, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 361, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  475|    361|    IGRAPH_CHECK_OOM(tmp, "Cannot reserve space for vector.");
  ------------------
  |  |  701|    361|    do { \
  |  |  702|    361|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|    361|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 361]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|    361|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  476|       |
  477|    361|    v->end = tmp + (v->end - v->stor_begin);
  478|    361|    v->stor_begin = tmp;
  479|    361|    v->stor_end = v->stor_begin + capacity;
  480|       |
  481|    361|    return IGRAPH_SUCCESS;
  482|    361|}
igraph_vector_size:
  514|    107|igraph_integer_t FUNCTION(igraph_vector, size)(const TYPE(igraph_vector) *v) {
  515|    107|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|    107|    do { \
  |  |  917|    107|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|    107|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 107]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|    107|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  516|    107|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|    107|    do { \
  |  |  917|    107|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|    107|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 107]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|    107|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  517|    107|    return v->end - v->stor_begin;
  518|    107|}
igraph_vector_clear:
  534|  1.79k|void FUNCTION(igraph_vector, clear)(TYPE(igraph_vector)* v) {
  535|  1.79k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  1.79k|    do { \
  |  |  917|  1.79k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.79k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.79k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.79k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  536|  1.79k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  1.79k|    do { \
  |  |  917|  1.79k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.79k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.79k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.79k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  537|  1.79k|    v->end = v->stor_begin;
  538|  1.79k|}
igraph_vector_push_back:
  565|  50.4k|igraph_error_t FUNCTION(igraph_vector, push_back)(TYPE(igraph_vector) *v, BASE e) {
  566|  50.4k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  50.4k|    do { \
  |  |  917|  50.4k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  50.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 50.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  50.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  567|  50.4k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  50.4k|    do { \
  |  |  917|  50.4k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  50.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 50.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  50.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  568|       |
  569|  50.4k|    if (v->stor_end == v->end) {
  ------------------
  |  Branch (569:9): [True: 107, False: 50.3k]
  ------------------
  570|       |        /* full, allocate more storage */
  571|    107|        igraph_integer_t old_size = FUNCTION(igraph_vector, size)(v);
  ------------------
  |  |  175|    107|        #define FUNCTION(a,c) CONCAT2(a,c)
  |  |  ------------------
  |  |  |  |   25|    107|#define CONCAT2(a,b) CONCAT2x(a,b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   24|    107|#define CONCAT2x(a,b) a ## _ ## b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  572|    107|        igraph_integer_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   77|    107|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
                      igraph_integer_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   77|    107|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (572:37): [True: 107, False: 0]
  ------------------
  573|    107|        if (old_size == IGRAPH_INTEGER_MAX) {
  ------------------
  |  |   77|    107|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (573:13): [True: 0, False: 107]
  ------------------
  574|      0|            IGRAPH_ERROR("Cannot push to vector, already at maximum size.", IGRAPH_EOVERFLOW);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  575|      0|        }
  576|    107|        if (new_size == 0) {
  ------------------
  |  Branch (576:13): [True: 0, False: 107]
  ------------------
  577|      0|            new_size = 1;
  578|      0|        }
  579|    107|        IGRAPH_CHECK(FUNCTION(igraph_vector, reserve)(v, new_size));
  ------------------
  |  |  648|    107|    do { \
  |  |  649|    107|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    107|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    107|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 107]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    107|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  580|    107|    }
  581|       |
  582|  50.4k|    *(v->end) = e;
  583|  50.4k|    v->end += 1;
  584|       |
  585|  50.4k|    return IGRAPH_SUCCESS;
  586|  50.4k|}
igraph_vector_int_init:
  135|  8.25k|igraph_error_t FUNCTION(igraph_vector, init)(TYPE(igraph_vector) *v, igraph_integer_t size) {
  136|  8.25k|    igraph_integer_t alloc_size;
  137|  8.25k|    IGRAPH_ASSERT(size >= 0);
  ------------------
  |  |  916|  8.25k|    do { \
  |  |  917|  8.25k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  8.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 8.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  8.25k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  138|  8.25k|    alloc_size = size > 0 ? size : 1;
  ------------------
  |  Branch (138:18): [True: 2.23k, False: 6.01k]
  ------------------
  139|       |
  140|       |    /* When this function fails, it should leave stor_begin set to NULL,
  141|       |     * so that vector_destroy() is still safe to call on the vector.
  142|       |     * This simplifies freeing partially initialized data structures,
  143|       |     * such as adjacency lists, when an error occurs mid-initialization. */
  144|  8.25k|    v->stor_begin = IGRAPH_CALLOC(alloc_size, BASE);
  ------------------
  |  |   38|  8.25k|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|  16.5k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 8.25k, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 8.25k, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 8.25k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  145|  8.25k|    if (v->stor_begin == NULL) {
  ------------------
  |  Branch (145:9): [True: 0, False: 8.25k]
  ------------------
  146|      0|        IGRAPH_ERROR("Cannot initialize vector.", IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  147|      0|    }
  148|  8.25k|    v->stor_end = v->stor_begin + alloc_size;
  149|  8.25k|    v->end = v->stor_begin + size;
  150|       |
  151|  8.25k|    return IGRAPH_SUCCESS;
  152|  8.25k|}
igraph_vector_int_destroy:
  400|  8.25k|void FUNCTION(igraph_vector, destroy)(TYPE(igraph_vector) *v) {
  401|  8.25k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  8.25k|    do { \
  |  |  917|  8.25k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  8.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 8.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  8.25k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  402|       |    /* vector_init() will leave stor_begin set to NULL when it fails.
  403|       |     * We handle these cases gracefully. */
  404|  8.25k|    if (v->stor_begin != NULL) {
  ------------------
  |  Branch (404:9): [True: 8.25k, False: 0]
  ------------------
  405|  8.25k|        IGRAPH_FREE(v->stor_begin);
  ------------------
  |  |   41|  8.25k|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  406|  8.25k|        v->stor_begin = NULL;
  407|  8.25k|    }
  408|  8.25k|}
igraph_vector_int_capacity:
  428|  7.84k|igraph_integer_t FUNCTION(igraph_vector, capacity)(const TYPE(igraph_vector) *v) {
  429|  7.84k|    return v->stor_end - v->stor_begin;
  430|  7.84k|}
igraph_vector_int_reserve:
  460|  7.84k|igraph_error_t FUNCTION(igraph_vector, reserve)(TYPE(igraph_vector) *v, igraph_integer_t capacity) {
  461|  7.84k|    igraph_integer_t current_capacity;
  462|  7.84k|    BASE *tmp;
  ------------------
  |  |   71|  7.84k|    #define BASE igraph_integer_t
  ------------------
  463|       |
  464|  7.84k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  7.84k|    do { \
  |  |  917|  7.84k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  7.84k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 7.84k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  7.84k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  465|  7.84k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  7.84k|    do { \
  |  |  917|  7.84k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  7.84k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 7.84k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  7.84k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  466|  7.84k|    IGRAPH_ASSERT(capacity >= 0);
  ------------------
  |  |  916|  7.84k|    do { \
  |  |  917|  7.84k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  7.84k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 7.84k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  7.84k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  467|       |
  468|  7.84k|    current_capacity = FUNCTION(igraph_vector, capacity)(v);
  ------------------
  |  |  183|  7.84k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   27|  7.84k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  7.84k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  469|       |
  470|  7.84k|    if (capacity <= current_capacity) {
  ------------------
  |  Branch (470:9): [True: 3.83k, False: 4.01k]
  ------------------
  471|  3.83k|        return IGRAPH_SUCCESS;
  472|  3.83k|    }
  473|       |
  474|  4.01k|    tmp = IGRAPH_REALLOC(v->stor_begin, capacity, BASE);
  ------------------
  |  |   40|  4.01k|#define IGRAPH_REALLOC(p,n,t) IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, realloc((void*)(p), sizeof(t) * ((n) > 0 ? (n) : 1)))
  |  |  ------------------
  |  |  |  |   36|  8.02k|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [True: 4.01k, False: 0]
  |  |  |  |  |  Branch (36:24): [True: 4.01k, False: 0]
  |  |  |  |  |  Branch (36:66): [True: 4.01k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  475|  4.01k|    IGRAPH_CHECK_OOM(tmp, "Cannot reserve space for vector.");
  ------------------
  |  |  701|  4.01k|    do { \
  |  |  702|  4.01k|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|  4.01k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 4.01k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|  4.01k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  476|       |
  477|  4.01k|    v->end = tmp + (v->end - v->stor_begin);
  478|  4.01k|    v->stor_begin = tmp;
  479|  4.01k|    v->stor_end = v->stor_begin + capacity;
  480|       |
  481|  4.01k|    return IGRAPH_SUCCESS;
  482|  4.01k|}
igraph_vector_int_empty:
  495|    342|igraph_bool_t FUNCTION(igraph_vector, empty)(const TYPE(igraph_vector) *v) {
  496|    342|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|    342|    do { \
  |  |  917|    342|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|    342|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 342]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|    342|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  497|    342|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|    342|    do { \
  |  |  917|    342|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|    342|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 342]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|    342|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  498|    342|    return v->stor_begin == v->end;
  499|    342|}
igraph_vector_int_size:
  514|  8.43k|igraph_integer_t FUNCTION(igraph_vector, size)(const TYPE(igraph_vector) *v) {
  515|  8.43k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  8.43k|    do { \
  |  |  917|  8.43k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  8.43k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 8.43k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  8.43k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  516|  8.43k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  8.43k|    do { \
  |  |  917|  8.43k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  8.43k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 8.43k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  8.43k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  517|  8.43k|    return v->end - v->stor_begin;
  518|  8.43k|}
igraph_vector_int_push_back:
  565|  4.16M|igraph_error_t FUNCTION(igraph_vector, push_back)(TYPE(igraph_vector) *v, BASE e) {
  566|  4.16M|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  4.16M|    do { \
  |  |  917|  4.16M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  4.16M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 4.16M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  4.16M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  567|  4.16M|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  4.16M|    do { \
  |  |  917|  4.16M|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  4.16M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 4.16M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  4.16M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  568|       |
  569|  4.16M|    if (v->stor_end == v->end) {
  ------------------
  |  Branch (569:9): [True: 927, False: 4.16M]
  ------------------
  570|       |        /* full, allocate more storage */
  571|    927|        igraph_integer_t old_size = FUNCTION(igraph_vector, size)(v);
  ------------------
  |  |  183|    927|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   27|    927|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|    927|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  572|    927|        igraph_integer_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   77|    927|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
                      igraph_integer_t new_size = old_size < IGRAPH_INTEGER_MAX/2 ? old_size * 2 : IGRAPH_INTEGER_MAX;
  ------------------
  |  |   77|    927|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (572:37): [True: 927, False: 0]
  ------------------
  573|    927|        if (old_size == IGRAPH_INTEGER_MAX) {
  ------------------
  |  |   77|    927|#  define IGRAPH_INTEGER_MAX INT64_MAX
  ------------------
  |  Branch (573:13): [True: 0, False: 927]
  ------------------
  574|      0|            IGRAPH_ERROR("Cannot push to vector, already at maximum size.", IGRAPH_EOVERFLOW);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  575|      0|        }
  576|    927|        if (new_size == 0) {
  ------------------
  |  Branch (576:13): [True: 0, False: 927]
  ------------------
  577|      0|            new_size = 1;
  578|      0|        }
  579|    927|        IGRAPH_CHECK(FUNCTION(igraph_vector, reserve)(v, new_size));
  ------------------
  |  |  648|    927|    do { \
  |  |  649|    927|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    927|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    927|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 927]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    927|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  580|    927|    }
  581|       |
  582|  4.16M|    *(v->end) = e;
  583|  4.16M|    v->end += 1;
  584|       |
  585|  4.16M|    return IGRAPH_SUCCESS;
  586|  4.16M|}
igraph_vector_int_null:
  717|  1.36k|void FUNCTION(igraph_vector, null)(TYPE(igraph_vector) *v) {
  718|  1.36k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  1.36k|    do { \
  |  |  917|  1.36k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.36k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.36k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  719|  1.36k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  1.36k|    do { \
  |  |  917|  1.36k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.36k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.36k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  720|  1.36k|    if (FUNCTION(igraph_vector, size)(v) > 0) {
  ------------------
  |  |  183|  1.36k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   27|  1.36k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  1.36k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (720:9): [True: 1.36k, False: 0]
  ------------------
  721|  1.36k|        memset(v->stor_begin, 0, sizeof(BASE) * FUNCTION(igraph_vector, size)(v));
  ------------------
  |  |  183|  1.36k|        #define FUNCTION(a,c) CONCAT3(a,SHORT,c)
  |  |  ------------------
  |  |  |  |   27|  1.36k|#define CONCAT3(a,b,c) CONCAT3x(a,b,c)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  1.36k|#define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  722|  1.36k|    }
  723|  1.36k|}
igraph_vector_int_range:
  766|    656|igraph_error_t FUNCTION(igraph_vector, range)(TYPE(igraph_vector) *v, BASE start, BASE end) {
  767|    656|    BASE *p;
  ------------------
  |  |   71|    656|    #define BASE igraph_integer_t
  ------------------
  768|    656|    IGRAPH_CHECK(FUNCTION(igraph_vector, resize)(v, (end - start)));
  ------------------
  |  |  648|    656|    do { \
  |  |  649|    656|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    656|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    656|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 656]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    656|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  769|       |
  770|  5.68M|    for (p = v->stor_begin; p < v->end; p++) {
  ------------------
  |  Branch (770:29): [True: 5.68M, False: 656]
  ------------------
  771|  5.68M|        *p = start;
  772|  5.68M|        start = start + ONE;
  ------------------
  |  |   77|  5.68M|    #define ONE 1
  ------------------
  773|  5.68M|    }
  774|       |
  775|    656|    return IGRAPH_SUCCESS;
  776|    656|}
igraph_vector_int_resize:
 1241|  3.50k|igraph_error_t FUNCTION(igraph_vector, resize)(TYPE(igraph_vector)* v, igraph_integer_t new_size) {
 1242|  3.50k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  3.50k|    do { \
  |  |  917|  3.50k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  3.50k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 3.50k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  3.50k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1243|  3.50k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  3.50k|    do { \
  |  |  917|  3.50k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  3.50k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 3.50k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  3.50k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1244|  3.50k|    IGRAPH_CHECK(FUNCTION(igraph_vector, reserve)(v, new_size));
  ------------------
  |  |  648|  3.50k|    do { \
  |  |  649|  3.50k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  3.50k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  3.50k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 3.50k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  3.50k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1245|  3.50k|    v->end = v->stor_begin + new_size;
 1246|  3.50k|    return IGRAPH_SUCCESS;
 1247|  3.50k|}
igraph_vector_int_max:
 1304|    342|BASE FUNCTION(igraph_vector, max)(const TYPE(igraph_vector) *v) {
 1305|    342|    BASE max;
  ------------------
  |  |   71|    342|    #define BASE igraph_integer_t
  ------------------
 1306|    342|    BASE *ptr;
  ------------------
  |  |   71|    342|    #define BASE igraph_integer_t
  ------------------
 1307|    342|    IGRAPH_ASSERT(!FUNCTION(igraph_vector, empty)(v));
  ------------------
  |  |  916|    342|    do { \
  |  |  917|    342|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|    342|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 342]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|    342|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1308|    342|    max = *(v->stor_begin);
 1309|       |#if defined(BASE_IGRAPH_REAL)
 1310|       |    if (isnan(max)) { return max; }; /* Result is NaN */
 1311|       |#endif
 1312|    342|    ptr = v->stor_begin + 1;
 1313|  2.01M|    while (ptr < v->end) {
  ------------------
  |  Branch (1313:12): [True: 2.00M, False: 342]
  ------------------
 1314|  2.00M|        if ((*ptr) > max) {
  ------------------
  |  Branch (1314:13): [True: 542, False: 2.00M]
  ------------------
 1315|    542|            max = *ptr;
 1316|    542|        }
 1317|       |#if defined(BASE_IGRAPH_REAL)
 1318|       |        else if (isnan(*ptr))
 1319|       |            return *ptr; /* Result is NaN */
 1320|       |#endif
 1321|  2.00M|        ptr++;
 1322|  2.00M|    }
 1323|    342|    return max;
 1324|    342|}
igraph_vector_int_isininterval:
 1809|  1.30k|        BASE high) {
 1810|  1.30k|    BASE *ptr;
  ------------------
  |  |   71|  1.30k|    #define BASE igraph_integer_t
  ------------------
 1811|  1.30k|    IGRAPH_ASSERT(v != NULL);
  ------------------
  |  |  916|  1.30k|    do { \
  |  |  917|  1.30k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1812|  1.30k|    IGRAPH_ASSERT(v->stor_begin != NULL);
  ------------------
  |  |  916|  1.30k|    do { \
  |  |  917|  1.30k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.30k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.30k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1813|  4.05M|    for (ptr = v->stor_begin; ptr < v->end; ptr++) {
  ------------------
  |  Branch (1813:31): [True: 4.05M, False: 807]
  ------------------
 1814|       |        /* Note that the following is not equivalent to *ptr < low || *ptr > high
 1815|       |         * when *ptr is NaN! */
 1816|  4.05M|        if (!(*ptr >= low && *ptr <= high)) {
  ------------------
  |  Branch (1816:15): [True: 4.05M, False: 492]
  |  Branch (1816:30): [True: 4.05M, False: 3]
  ------------------
 1817|    495|            return 0;
 1818|    495|        }
 1819|  4.05M|    }
 1820|    807|    return 1;
 1821|  1.30k|}

igraph_i_attribute_init:
  617|    435|) {
  618|    435|    graph->attr = NULL;
  619|    435|    if (igraph_i_attribute_table) {
  ------------------
  |  Branch (619:9): [True: 435, False: 0]
  ------------------
  620|    435|        IGRAPH_CHECK(igraph_i_attribute_table->init(graph, attr));
  ------------------
  |  |  648|    435|    do { \
  |  |  649|    435|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    435|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    435|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 435]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    435|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  621|    435|        if (graph->attr == NULL) {
  ------------------
  |  Branch (621:13): [True: 0, False: 435]
  ------------------
  622|      0|            IGRAPH_ERROR("Attribute handler did not initialize attr pointer", IGRAPH_FAILURE);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  623|      0|        }
  624|    435|    }
  625|    435|    return IGRAPH_SUCCESS;
  626|    435|}
igraph_i_attribute_destroy:
  628|    435|void igraph_i_attribute_destroy(igraph_t *graph) {
  629|    435|    if (graph->attr && igraph_i_attribute_table) {
  ------------------
  |  Branch (629:9): [True: 435, False: 0]
  |  Branch (629:24): [True: 435, False: 0]
  ------------------
  630|    435|        igraph_i_attribute_table->destroy(graph);
  631|    435|    }
  632|    435|    graph->attr = NULL;
  633|    435|}
igraph_i_attribute_add_vertices:
  649|    738|) {
  650|    738|    if (igraph_i_attribute_table) {
  ------------------
  |  Branch (650:9): [True: 738, False: 0]
  ------------------
  651|    738|        return igraph_i_attribute_table->add_vertices(graph, nv, attr);
  652|    738|    } else {
  653|      0|        return IGRAPH_SUCCESS;
  654|      0|    }
  655|    738|}
igraph_i_attribute_add_edges:
  690|    342|) {
  691|    342|    if (igraph_i_attribute_table) {
  ------------------
  |  Branch (691:9): [True: 342, False: 0]
  ------------------
  692|    342|        return igraph_i_attribute_table->add_edges(graph, edges, attr);
  693|    342|    } else {
  694|      0|        return IGRAPH_SUCCESS;
  695|      0|    }
  696|    342|}
igraph_set_attribute_table:
  886|  1.79k|igraph_set_attribute_table(const igraph_attribute_table_t * table) {
  887|  1.79k|    igraph_attribute_table_t *old = igraph_i_attribute_table;
  888|  1.79k|    igraph_i_attribute_table = (igraph_attribute_table_t*) table;
  889|  1.79k|    return old;
  890|  1.79k|}

igraph_i_property_cache_init:
   30|    435|igraph_error_t igraph_i_property_cache_init(igraph_i_property_cache_t *cache) {
   31|    435|    IGRAPH_STATIC_ASSERT(IGRAPH_PROP_I_SIZE <= 32);
  ------------------
  |  |   69|    435|#define IGRAPH_STATIC_ASSERT(condition) ((void)sizeof(char[1 - 2*!(condition)]))
  ------------------
   32|       |
   33|    435|    memset(cache->value, 0, sizeof(cache->value));
   34|    435|    cache->known = 0;
   35|    435|    return IGRAPH_SUCCESS;
   36|    435|}
igraph_i_property_cache_destroy:
   51|    435|void igraph_i_property_cache_destroy(igraph_i_property_cache_t *cache) {
   52|    435|    IGRAPH_UNUSED(cache);
  ------------------
  |  |   32|    435|#define IGRAPH_UNUSED(x) (void)(x)
  ------------------
   53|       |    /* Nothing to do */
   54|    435|}
igraph_i_property_cache_invalidate_conditionally:
  180|  1.08k|) {
  181|  1.08k|    uint32_t invalidate = ~keep_always;
  182|  1.08k|    uint32_t mask;
  183|  1.08k|    uint32_t maybe_keep;
  184|  1.08k|    igraph_bool_t cached_value;
  185|       |
  186|  1.08k|    assert(graph->cache != NULL);
  187|       |
  188|       |    /* The bits of maybe_keep are set to 1 for those properties that are:
  189|       |     *
  190|       |     * - currently cached
  191|       |     * - should _probably_ be invalidated
  192|       |     * - _but_ the current cached value of the property may change the decision
  193|       |     */
  194|  1.08k|    maybe_keep = graph->cache->known & invalidate & (keep_when_false | keep_when_true);
  195|       |
  196|  1.08k|    if (maybe_keep) {
  ------------------
  |  Branch (196:9): [True: 0, False: 1.08k]
  ------------------
  197|      0|        for (igraph_cached_property_t prop = (igraph_cached_property_t ) 0; prop < IGRAPH_PROP_I_SIZE; ++prop) {
  ------------------
  |  Branch (197:77): [True: 0, False: 0]
  ------------------
  198|      0|            mask = 1 << prop;
  199|      0|            if (maybe_keep & mask) {
  ------------------
  |  Branch (199:17): [True: 0, False: 0]
  ------------------
  200|       |                /* if we get here, we know that the property is cached; we have
  201|       |                 * masked maybe_keep with graph->cache->known */
  202|      0|                cached_value = igraph_i_property_cache_get_bool(graph, prop);
  203|      0|                if (
  204|      0|                    ((keep_when_false & mask) && !cached_value) ||
  ------------------
  |  Branch (204:22): [True: 0, False: 0]
  |  Branch (204:50): [True: 0, False: 0]
  ------------------
  205|      0|                    ((keep_when_true & mask) && cached_value)
  ------------------
  |  Branch (205:22): [True: 0, False: 0]
  |  Branch (205:49): [True: 0, False: 0]
  ------------------
  206|      0|                ) {
  207|      0|                    invalidate &= ~mask;
  208|      0|                }
  209|      0|            }
  210|      0|        }
  211|      0|    }
  212|       |
  213|  1.08k|    graph->cache->known &= ~invalidate;
  214|  1.08k|}

cattributes.c:igraph_i_cattribute_init:
  196|    435|) {
  197|    435|    igraph_i_cattributes_t *nattr;
  198|       |
  199|    435|    nattr = IGRAPH_CALLOC(1, igraph_i_cattributes_t);
  ------------------
  |  |   38|    435|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|    870|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [Folded - Ignored]
  |  |  |  |  |  Branch (36:24): [Folded - Ignored]
  |  |  |  |  |  Branch (36:66): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  200|    435|    IGRAPH_CHECK_OOM(nattr, "Insufficient memory to allocate attribute storage.");
  ------------------
  |  |  701|    435|    do { \
  |  |  702|    435|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|    435|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 435]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|    435|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  201|    435|    IGRAPH_FINALLY(igraph_free, nattr);
  ------------------
  |  |  591|    435|    do { \
  |  |  592|    435|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|    435|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|    435|         * incorrect destructor function with the pointer */ \
  |  |  595|    435|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|    435|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|    435|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  202|       |
  203|    435|    if (attr) {
  ------------------
  |  Branch (203:9): [True: 0, False: 435]
  ------------------
  204|      0|        IGRAPH_CHECK(igraph_attribute_record_list_init_copy(&nattr->gal, attr));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  205|    435|    } else {
  206|    435|        IGRAPH_CHECK(igraph_attribute_record_list_init(&nattr->gal, 0));
  ------------------
  |  |  648|    435|    do { \
  |  |  649|    435|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    435|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    435|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 435]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    435|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  207|    435|    }
  208|    435|    IGRAPH_FINALLY(igraph_attribute_record_list_destroy, &nattr->gal);
  ------------------
  |  |  591|    435|    do { \
  |  |  592|    435|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|    435|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|    435|         * incorrect destructor function with the pointer */ \
  |  |  595|    435|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|    435|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|    435|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  209|       |
  210|    435|    IGRAPH_CHECK(igraph_attribute_record_list_init(&nattr->val, 0));
  ------------------
  |  |  648|    435|    do { \
  |  |  649|    435|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    435|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    435|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 435]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    435|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  211|    435|    IGRAPH_FINALLY(igraph_attribute_record_list_destroy, &nattr->val);
  ------------------
  |  |  591|    435|    do { \
  |  |  592|    435|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|    435|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|    435|         * incorrect destructor function with the pointer */ \
  |  |  595|    435|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|    435|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|    435|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  212|       |
  213|    435|    IGRAPH_CHECK(igraph_attribute_record_list_init(&nattr->eal, 0));
  ------------------
  |  |  648|    435|    do { \
  |  |  649|    435|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    435|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    435|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 435]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    435|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  214|    435|    IGRAPH_FINALLY(igraph_attribute_record_list_destroy, &nattr->eal);
  ------------------
  |  |  591|    435|    do { \
  |  |  592|    435|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|    435|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|    435|         * incorrect destructor function with the pointer */ \
  |  |  595|    435|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|    435|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|    435|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  215|       |
  216|    435|    graph->attr = nattr;
  217|    435|    IGRAPH_FINALLY_CLEAN(4);
  218|       |
  219|    435|    return IGRAPH_SUCCESS;
  220|    435|}
cattributes.c:igraph_i_cattribute_destroy:
  222|    435|static void igraph_i_cattribute_destroy(igraph_t *graph) {
  223|    435|    igraph_i_cattributes_t *attr = graph->attr;
  224|    435|    igraph_attribute_record_list_destroy(&attr->eal);
  225|    435|    igraph_attribute_record_list_destroy(&attr->val);
  226|    435|    igraph_attribute_record_list_destroy(&attr->gal);
  227|    435|    IGRAPH_FREE(graph->attr); /* sets to NULL */
  ------------------
  |  |   41|    435|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  228|    435|}
cattributes.c:igraph_i_cattribute_add_vertices:
  374|    738|) {
  375|    738|    igraph_i_cattributes_t *attr = graph->attr;
  376|    738|    return igraph_i_cattribute_add_vertices_or_edges(&attr->val, igraph_vcount(graph), nv, nattr);
  377|    738|}
cattributes.c:igraph_i_cattribute_add_vertices_or_edges:
  345|  1.08k|) {
  346|  1.08k|    igraph_integer_t origlen = newlen - nv;
  347|  1.08k|    igraph_error_t err = igraph_i_cattribute_add_vertices_or_edges_inner(
  348|  1.08k|        val, newlen, nv, nattr
  349|  1.08k|    );
  350|       |
  351|  1.08k|    if (err != IGRAPH_SUCCESS) {
  ------------------
  |  Branch (351:9): [True: 0, False: 1.08k]
  ------------------
  352|       |        /* If unsuccessful, revert attribute vector sizes.
  353|       |         * The following function assumes that all attributes vectors that
  354|       |         * are present have a length at least as great as origlen.
  355|       |         * This is true at the moment because any new attributes that are
  356|       |         * added to the graph are created directly at 'origlen' instead of
  357|       |         * being created at smaller sizes and resized later.
  358|       |         *
  359|       |         * NOTE: While this ensures that all attribute vector lengths are
  360|       |         * correct, it does not ensure that no extra attributes have
  361|       |         * been added to the graph. However, the presence of extra
  362|       |         * attributes does not make the attribute table inconsistent
  363|       |         * like the incorrect attribute vector lengths would.
  364|       |         */
  365|      0|        igraph_i_cattribute_revert_attribute_vector_sizes(val, origlen);
  366|      0|    }
  367|       |
  368|  1.08k|    return err;
  369|  1.08k|}
cattributes.c:igraph_i_cattribute_add_vertices_or_edges_inner:
  270|  1.08k|) {
  271|  1.08k|    igraph_integer_t length;
  272|  1.08k|    igraph_integer_t nattrno = nattr == NULL ? 0 : igraph_attribute_record_list_size(nattr);
  ------------------
  |  Branch (272:32): [True: 1.08k, False: 0]
  ------------------
  273|  1.08k|    igraph_integer_t origlen = newlen - nv;
  274|       |
  275|  1.08k|    IGRAPH_ASSERT(origlen >= 0);
  ------------------
  |  |  916|  1.08k|    do { \
  |  |  917|  1.08k|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|  1.08k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.08k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|  1.08k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  276|       |
  277|       |    /* Find all the attributes that are newly added, and create new value vectors
  278|       |     * for them in the original graph */
  279|  1.08k|    for (igraph_integer_t i = 0; i < nattrno; i++) {
  ------------------
  |  Branch (279:34): [True: 0, False: 1.08k]
  ------------------
  280|      0|        const igraph_attribute_record_t *nattr_entry = igraph_attribute_record_list_get_ptr(nattr, i);
  281|      0|        const char *nname = nattr_entry->name;
  282|      0|        IGRAPH_CHECK(igraph_i_cattribute_find_or_create(val, nname, nattr_entry->type, origlen, NULL));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  283|      0|    }
  284|       |
  285|       |    /* Now append the new values */
  286|  1.08k|    length = igraph_attribute_record_list_size(val);
  287|  1.08k|    for (igraph_integer_t i = 0; i < length; i++) {
  ------------------
  |  Branch (287:34): [True: 0, False: 1.08k]
  ------------------
  288|      0|        igraph_attribute_record_t *oldrec = igraph_attribute_record_list_get_ptr(val, i);
  289|      0|        const igraph_attribute_record_t *newrec = nattr
  ------------------
  |  Branch (289:51): [True: 0, False: 0]
  ------------------
  290|      0|            ? igraph_i_cattribute_find_const(nattr, oldrec->name, oldrec->type)
  291|      0|            : NULL;
  292|       |
  293|      0|        IGRAPH_ASSERT(igraph_attribute_record_size(oldrec) == origlen);
  ------------------
  |  |  916|      0|    do { \
  |  |  917|      0|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  294|       |
  295|      0|        if (newrec) {
  ------------------
  |  Branch (295:13): [True: 0, False: 0]
  ------------------
  296|       |            /* This attribute is present in nattr */
  297|      0|            switch (oldrec->type) {
  298|      0|            case IGRAPH_ATTRIBUTE_NUMERIC:
  ------------------
  |  Branch (298:13): [True: 0, False: 0]
  ------------------
  299|      0|                if (nv != igraph_vector_size(newrec->value.as_vector)) {
  ------------------
  |  Branch (299:21): [True: 0, False: 0]
  ------------------
  300|      0|                    IGRAPH_ERROR("Invalid numeric attribute length.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  301|      0|                }
  302|      0|                IGRAPH_CHECK(igraph_vector_append(
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  303|      0|                    oldrec->value.as_vector, newrec->value.as_vector
  304|      0|                ));
  305|      0|                break;
  306|      0|            case IGRAPH_ATTRIBUTE_STRING:
  ------------------
  |  Branch (306:13): [True: 0, False: 0]
  ------------------
  307|      0|                if (nv != igraph_strvector_size(newrec->value.as_strvector)) {
  ------------------
  |  Branch (307:21): [True: 0, False: 0]
  ------------------
  308|      0|                    IGRAPH_ERROR("Invalid string attribute length.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  309|      0|                }
  310|      0|                IGRAPH_CHECK(igraph_strvector_append(
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  311|      0|                    oldrec->value.as_strvector, newrec->value.as_strvector
  312|      0|                ));
  313|      0|                break;
  314|      0|            case IGRAPH_ATTRIBUTE_BOOLEAN:
  ------------------
  |  Branch (314:13): [True: 0, False: 0]
  ------------------
  315|      0|                if (nv != igraph_vector_bool_size(newrec->value.as_vector_bool)) {
  ------------------
  |  Branch (315:21): [True: 0, False: 0]
  ------------------
  316|      0|                    IGRAPH_ERROR("Invalid boolean attribute length.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  317|      0|                }
  318|      0|                IGRAPH_CHECK(igraph_vector_bool_append(
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  319|      0|                    oldrec->value.as_vector_bool, newrec->value.as_vector_bool
  320|      0|                ));
  321|      0|                break;
  322|      0|            default:
  ------------------
  |  Branch (322:13): [True: 0, False: 0]
  ------------------
  323|      0|                IGRAPH_WARNINGF(
  ------------------
  |  |  769|      0|    do { \
  |  |  770|      0|        igraph_warningf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  771|      0|                        __VA_ARGS__); \
  |  |  772|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (772:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  324|      0|                    "Attribute '%s' with unknown type %d ignored",
  325|      0|                    oldrec->name, (int) oldrec->type
  326|      0|                );
  327|      0|                break;
  328|      0|            }
  329|      0|        } else {
  330|       |            /* No such attribute among the new ones so just extend the length
  331|       |             * of the current record */
  332|      0|            IGRAPH_CHECK(igraph_attribute_record_resize(oldrec, newlen));
  ------------------
  |  |  648|      0|    do { \
  |  |  649|      0|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|      0|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  333|      0|        }
  334|       |
  335|      0|        IGRAPH_ASSERT(igraph_attribute_record_size(oldrec) == newlen);
  ------------------
  |  |  916|      0|    do { \
  |  |  917|      0|        if (IGRAPH_UNLIKELY(!(condition))) { \
  |  |  ------------------
  |  |  |  |  604|      0|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  918|      0|            igraph_fatal("Assertion failed: " #condition, IGRAPH_FILE_BASENAME, __LINE__); \
  |  |  919|      0|        } \
  |  |  920|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (920:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  336|      0|    }
  337|       |
  338|  1.08k|    return IGRAPH_SUCCESS;
  339|  1.08k|}
cattributes.c:igraph_i_cattribute_add_edges:
 1480|    342|) {
 1481|    342|    igraph_integer_t ne = igraph_vector_int_size(edges) / 2;
 1482|    342|    igraph_i_cattributes_t *attr = graph->attr;
 1483|    342|    return igraph_i_cattribute_add_vertices_or_edges(&attr->eal, igraph_ecount(graph), ne, nattr);
 1484|    342|}

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

igraph_empty_attrs:
  101|    465|) {
  102|       |
  103|    465|    if (n < 0) {
  ------------------
  |  Branch (103:9): [True: 30, False: 435]
  ------------------
  104|     30|        IGRAPH_ERROR("Number of vertices must not be negative.", IGRAPH_EINVAL);
  ------------------
  |  |  431|     30|    do { \
  |  |  432|     30|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|     30|        return igraph_errno ; \
  |  |  434|     30|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  105|     30|    }
  106|       |
  107|    435|    memset(graph, 0, sizeof(igraph_t));
  108|       |
  109|    435|    graph->n = 0;
  110|    435|    graph->directed = directed;
  111|    435|    IGRAPH_VECTOR_INT_INIT_FINALLY(&graph->from, 0);
  ------------------
  |  |  124|    435|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|    435|    do { \
  |  |  |  |  649|    435|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|    435|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|    435|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 435]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|    435|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|    435|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|    435|    do { \
  |  |  |  |  592|    435|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|    435|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|    435|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|    435|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|    435|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|    435|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  112|    435|    IGRAPH_VECTOR_INT_INIT_FINALLY(&graph->to, 0);
  ------------------
  |  |  124|    435|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|    435|    do { \
  |  |  |  |  649|    435|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|    435|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|    435|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 435]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|    435|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|    435|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|    435|    do { \
  |  |  |  |  592|    435|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|    435|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|    435|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|    435|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|    435|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|    435|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  113|    435|    IGRAPH_VECTOR_INT_INIT_FINALLY(&graph->oi, 0);
  ------------------
  |  |  124|    435|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|    435|    do { \
  |  |  |  |  649|    435|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|    435|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|    435|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 435]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|    435|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|    435|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|    435|    do { \
  |  |  |  |  592|    435|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|    435|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|    435|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|    435|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|    435|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|    435|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  114|    435|    IGRAPH_VECTOR_INT_INIT_FINALLY(&graph->ii, 0);
  ------------------
  |  |  124|    435|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|    435|    do { \
  |  |  |  |  649|    435|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|    435|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|    435|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 435]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|    435|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|    435|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|    435|    do { \
  |  |  |  |  592|    435|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|    435|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|    435|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|    435|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|    435|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|    435|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  115|    435|    IGRAPH_VECTOR_INT_INIT_FINALLY(&graph->os, 1);
  ------------------
  |  |  124|    435|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|    435|    do { \
  |  |  |  |  649|    435|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|    435|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|    435|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 435]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|    435|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|    435|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|    435|    do { \
  |  |  |  |  592|    435|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|    435|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|    435|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|    435|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|    435|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|    435|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  116|    435|    IGRAPH_VECTOR_INT_INIT_FINALLY(&graph->is, 1);
  ------------------
  |  |  124|    435|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|    435|    do { \
  |  |  |  |  649|    435|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|    435|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|    435|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 435]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|    435|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|    435|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|    435|    do { \
  |  |  |  |  592|    435|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|    435|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|    435|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|    435|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|    435|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|    435|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  117|       |
  118|       |    /* init cache */
  119|    435|    graph->cache = IGRAPH_CALLOC(1, igraph_i_property_cache_t);
  ------------------
  |  |   38|    435|#define IGRAPH_CALLOC(n,t)    IGRAPH_I_ALLOC_CHECK_OVERFLOW(n, t, calloc(sizeof(t) * ((n) > 0 ? (n) : 1), 1))
  |  |  ------------------
  |  |  |  |   36|    870|    (t*) ((0 <= (n) && ((size_t)(n)) <= SIZE_MAX / sizeof(t)) ? (expr) : NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:12): [Folded - Ignored]
  |  |  |  |  |  Branch (36:24): [Folded - Ignored]
  |  |  |  |  |  Branch (36:66): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  120|    435|    IGRAPH_CHECK_OOM(graph->cache, "Cannot create graph.");
  ------------------
  |  |  701|    435|    do { \
  |  |  702|    435|        if (IGRAPH_UNLIKELY(!ptr)) { \
  |  |  ------------------
  |  |  |  |  604|    435|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 435]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  703|      0|            IGRAPH_ERROR(message, IGRAPH_ENOMEM); /* LCOV_EXCL_LINE */ \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  704|      0|        } \
  |  |  705|    435|    } while (0)
  |  |  ------------------
  |  |  |  Branch (705:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  121|    435|    IGRAPH_FINALLY(igraph_free, graph->cache);
  ------------------
  |  |  591|    435|    do { \
  |  |  592|    435|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|    435|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|    435|         * incorrect destructor function with the pointer */ \
  |  |  595|    435|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|    435|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|    435|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  122|    435|    IGRAPH_CHECK(igraph_i_property_cache_init(graph->cache));
  ------------------
  |  |  648|    435|    do { \
  |  |  649|    435|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    435|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    435|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 435]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    435|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  123|    435|    IGRAPH_FINALLY(igraph_i_property_cache_destroy, graph->cache);
  ------------------
  |  |  591|    435|    do { \
  |  |  592|    435|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|    435|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|    435|         * incorrect destructor function with the pointer */ \
  |  |  595|    435|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|    435|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|    435|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  124|       |
  125|    435|    VECTOR(graph->os)[0] = 0;
  ------------------
  |  |   65|    435|#define VECTOR(v) ((v).stor_begin)
  ------------------
  126|    435|    VECTOR(graph->is)[0] = 0;
  ------------------
  |  |   65|    435|#define VECTOR(v) ((v).stor_begin)
  ------------------
  127|       |
  128|       |    /* init attributes */
  129|    435|    IGRAPH_CHECK(igraph_i_attribute_init(graph, attr));
  ------------------
  |  |  648|    435|    do { \
  |  |  649|    435|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    435|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    435|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 435]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    435|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  130|       |
  131|       |    /* add the vertices */
  132|    435|    IGRAPH_CHECK(igraph_add_vertices(graph, n, 0));
  ------------------
  |  |  648|    435|    do { \
  |  |  649|    435|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    435|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    435|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 435]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    435|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  133|       |
  134|    435|    IGRAPH_FINALLY_CLEAN(8);
  135|    435|    return IGRAPH_SUCCESS;
  136|    435|}
igraph_destroy:
  154|    435|void igraph_destroy(igraph_t *graph) {
  155|    435|    igraph_i_attribute_destroy(graph);
  156|       |
  157|    435|    igraph_i_property_cache_destroy(graph->cache);
  158|    435|    IGRAPH_FREE(graph->cache);
  ------------------
  |  |   41|    435|#define IGRAPH_FREE(p)        (free( (void *)(p) ), (p) = NULL)
  ------------------
  159|       |
  160|    435|    igraph_vector_int_destroy(&graph->from);
  161|    435|    igraph_vector_int_destroy(&graph->to);
  162|    435|    igraph_vector_int_destroy(&graph->oi);
  163|    435|    igraph_vector_int_destroy(&graph->ii);
  164|    435|    igraph_vector_int_destroy(&graph->os);
  165|    435|    igraph_vector_int_destroy(&graph->is);
  166|    435|}
igraph_add_edges:
  256|    342|) {
  257|    342|    igraph_integer_t no_of_edges = igraph_vector_int_size(&graph->from);
  258|    342|    igraph_integer_t edges_to_add = igraph_vector_int_size(edges) / 2;
  259|    342|    igraph_integer_t new_no_of_edges;
  260|    342|    igraph_integer_t i = 0;
  261|    342|    igraph_vector_int_t newoi, newii;
  262|    342|    igraph_bool_t directed = igraph_is_directed(graph);
  263|       |
  264|    342|    if (igraph_vector_int_size(edges) % 2 != 0) {
  ------------------
  |  Branch (264:9): [True: 0, False: 342]
  ------------------
  265|      0|        IGRAPH_ERROR("Invalid (odd) length of edges vector.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  266|      0|    }
  267|    342|    if (!igraph_vector_int_isininterval(edges, 0, igraph_vcount(graph) - 1)) {
  ------------------
  |  Branch (267:9): [True: 0, False: 342]
  ------------------
  268|      0|        IGRAPH_ERROR("Out-of-range vertex IDs when adding edges.", IGRAPH_EINVVID);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  269|      0|    }
  270|       |
  271|       |    /* from & to */
  272|    342|    IGRAPH_SAFE_ADD(no_of_edges, edges_to_add, &new_no_of_edges);
  ------------------
  |  |   47|    342|    do { \
  |  |   48|    342|        igraph_integer_t _safe_a = (a), _safe_b = (b); \
  |  |   49|    342|        igraph_integer_t _safe_sum; \
  |  |   50|    342|        if (__builtin_add_overflow(_safe_a, _safe_b, &_safe_sum)) { \
  |  |  ------------------
  |  |  |  Branch (50:13): [True: 0, False: 342]
  |  |  ------------------
  |  |   51|      0|            IGRAPH_ERRORF("Overflow when adding %" IGRAPH_PRId " and %" IGRAPH_PRId ".", IGRAPH_EOVERFLOW, _safe_a, _safe_b); \
  |  |  ------------------
  |  |  |  |  469|      0|    do { \
  |  |  |  |  470|      0|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  |  |  471|      0|                      igraph_errno, __VA_ARGS__) ; \
  |  |  |  |  472|      0|        return igraph_errno; \
  |  |  |  |  473|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (473:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|        } \
  |  |   53|    342|        *(res) = _safe_sum; \
  |  |   54|    342|    } while (0)
  |  |  ------------------
  |  |  |  Branch (54:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  273|    342|    if (new_no_of_edges > IGRAPH_ECOUNT_MAX) {
  ------------------
  |  |  121|    342|#define IGRAPH_ECOUNT_MAX (IGRAPH_INTEGER_MAX/2)
  |  |  ------------------
  |  |  |  |   77|    342|#  define IGRAPH_INTEGER_MAX INT64_MAX
  |  |  ------------------
  ------------------
  |  Branch (273:9): [True: 0, False: 342]
  ------------------
  274|      0|        IGRAPH_ERRORF("Maximum edge count (%" IGRAPH_PRId ") exceeded.", IGRAPH_ERANGE,
  ------------------
  |  |  469|      0|    do { \
  |  |  470|      0|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  471|      0|                      igraph_errno, __VA_ARGS__) ; \
  |  |  472|      0|        return igraph_errno; \
  |  |  473|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (473:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  275|      0|                      IGRAPH_ECOUNT_MAX);
  276|      0|    }
  277|    342|    IGRAPH_CHECK(igraph_vector_int_reserve(&graph->from, no_of_edges + edges_to_add));
  ------------------
  |  |  648|    342|    do { \
  |  |  649|    342|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    342|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    342|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 342]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    342|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  278|    342|    IGRAPH_CHECK(igraph_vector_int_reserve(&graph->to, no_of_edges + edges_to_add));
  ------------------
  |  |  648|    342|    do { \
  |  |  649|    342|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    342|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    342|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 342]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    342|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  279|       |
  280|  1.00M|    while (i < edges_to_add * 2) {
  ------------------
  |  Branch (280:12): [True: 1.00M, False: 342]
  ------------------
  281|  1.00M|        if (directed || VECTOR(*edges)[i] > VECTOR(*edges)[i + 1]) {
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
                      if (directed || VECTOR(*edges)[i] > VECTOR(*edges)[i + 1]) {
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  |  Branch (281:13): [True: 1.00M, False: 0]
  |  Branch (281:25): [True: 0, False: 0]
  ------------------
  282|  1.00M|            igraph_vector_int_push_back(&graph->from, VECTOR(*edges)[i++]); /* reserved */
  ------------------
  |  |   65|  1.00M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  283|  1.00M|            igraph_vector_int_push_back(&graph->to,   VECTOR(*edges)[i++]); /* reserved */
  ------------------
  |  |   65|  1.00M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  284|  1.00M|        } else {
  285|      0|            igraph_vector_int_push_back(&graph->to,   VECTOR(*edges)[i++]); /* reserved */
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  286|      0|            igraph_vector_int_push_back(&graph->from, VECTOR(*edges)[i++]); /* reserved */
  ------------------
  |  |   65|      0|#define VECTOR(v) ((v).stor_begin)
  ------------------
  287|      0|        }
  288|  1.00M|    }
  289|       |
  290|       |    /* If an error occurs while the edges are being added, we make the necessary fixup
  291|       |     * to ensure that the graph is still in a consistent state when this function returns.
  292|       |     * The graph may already be on the finally stack when calling this function. We use
  293|       |     * a separate finally stack level to avoid its destructor from being called on error,
  294|       |     * so that the fixup can succeed.
  295|       |     */
  296|       |
  297|    342|#define CHECK_ERR(expr) \
  298|    342|    do { \
  299|    342|        igraph_error_t err = (expr); \
  300|    342|        if (err != IGRAPH_SUCCESS) { \
  301|    342|            igraph_vector_int_resize(&graph->from, no_of_edges); /* gets smaller, error safe */ \
  302|    342|            igraph_vector_int_resize(&graph->to, no_of_edges);   /* gets smaller, error safe */ \
  303|    342|            IGRAPH_FINALLY_EXIT(); \
  304|    342|            IGRAPH_ERROR("Cannot add edges.", err); \
  305|    342|        } \
  306|    342|    } while (0)
  307|       |
  308|       |    /* oi & ii */
  309|    342|    IGRAPH_FINALLY_ENTER();
  310|    342|    {
  311|    342|        CHECK_ERR(igraph_vector_int_init(&newoi, no_of_edges));
  ------------------
  |  |  298|    342|    do { \
  |  |  299|    342|        igraph_error_t err = (expr); \
  |  |  300|    342|        if (err != IGRAPH_SUCCESS) { \
  |  |  ------------------
  |  |  |  Branch (300:13): [True: 0, False: 342]
  |  |  ------------------
  |  |  301|      0|            igraph_vector_int_resize(&graph->from, no_of_edges); /* gets smaller, error safe */ \
  |  |  302|      0|            igraph_vector_int_resize(&graph->to, no_of_edges);   /* gets smaller, error safe */ \
  |  |  303|      0|            IGRAPH_FINALLY_EXIT(); \
  |  |  304|      0|            IGRAPH_ERROR("Cannot add edges.", err); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  305|      0|        } \
  |  |  306|    342|    } while (0)
  |  |  ------------------
  |  |  |  Branch (306:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  312|    342|        IGRAPH_FINALLY(igraph_vector_int_destroy, &newoi);
  ------------------
  |  |  591|    342|    do { \
  |  |  592|    342|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|    342|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|    342|         * incorrect destructor function with the pointer */ \
  |  |  595|    342|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|    342|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|    342|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  313|    342|        CHECK_ERR(igraph_vector_int_init(&newii, no_of_edges));
  ------------------
  |  |  298|    342|    do { \
  |  |  299|    342|        igraph_error_t err = (expr); \
  |  |  300|    342|        if (err != IGRAPH_SUCCESS) { \
  |  |  ------------------
  |  |  |  Branch (300:13): [True: 0, False: 342]
  |  |  ------------------
  |  |  301|      0|            igraph_vector_int_resize(&graph->from, no_of_edges); /* gets smaller, error safe */ \
  |  |  302|      0|            igraph_vector_int_resize(&graph->to, no_of_edges);   /* gets smaller, error safe */ \
  |  |  303|      0|            IGRAPH_FINALLY_EXIT(); \
  |  |  304|      0|            IGRAPH_ERROR("Cannot add edges.", err); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  305|      0|        } \
  |  |  306|    342|    } while (0)
  |  |  ------------------
  |  |  |  Branch (306:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  314|    342|        IGRAPH_FINALLY(igraph_vector_int_destroy, &newii);
  ------------------
  |  |  591|    342|    do { \
  |  |  592|    342|        /* the following branch makes the compiler check the compatibility of \
  |  |  593|    342|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  594|    342|         * incorrect destructor function with the pointer */ \
  |  |  595|    342|        if (0) { func(ptr); } \
  |  |  ------------------
  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  ------------------
  |  |  596|    342|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  597|    342|    } while (0)
  |  |  ------------------
  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  315|    342|        CHECK_ERR(igraph_vector_int_pair_order(&graph->from, &graph->to, &newoi, graph->n));
  ------------------
  |  |  298|    342|    do { \
  |  |  299|    342|        igraph_error_t err = (expr); \
  |  |  300|    342|        if (err != IGRAPH_SUCCESS) { \
  |  |  ------------------
  |  |  |  Branch (300:13): [True: 0, False: 342]
  |  |  ------------------
  |  |  301|      0|            igraph_vector_int_resize(&graph->from, no_of_edges); /* gets smaller, error safe */ \
  |  |  302|      0|            igraph_vector_int_resize(&graph->to, no_of_edges);   /* gets smaller, error safe */ \
  |  |  303|      0|            IGRAPH_FINALLY_EXIT(); \
  |  |  304|      0|            IGRAPH_ERROR("Cannot add edges.", err); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  305|      0|        } \
  |  |  306|    342|    } while (0)
  |  |  ------------------
  |  |  |  Branch (306:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  316|    342|        CHECK_ERR(igraph_vector_int_pair_order(&graph->to, &graph->from, &newii, graph->n));
  ------------------
  |  |  298|    342|    do { \
  |  |  299|    342|        igraph_error_t err = (expr); \
  |  |  300|    342|        if (err != IGRAPH_SUCCESS) { \
  |  |  ------------------
  |  |  |  Branch (300:13): [True: 0, False: 342]
  |  |  ------------------
  |  |  301|      0|            igraph_vector_int_resize(&graph->from, no_of_edges); /* gets smaller, error safe */ \
  |  |  302|      0|            igraph_vector_int_resize(&graph->to, no_of_edges);   /* gets smaller, error safe */ \
  |  |  303|      0|            IGRAPH_FINALLY_EXIT(); \
  |  |  304|      0|            IGRAPH_ERROR("Cannot add edges.", err); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  305|      0|        } \
  |  |  306|    342|    } while (0)
  |  |  ------------------
  |  |  |  Branch (306:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  317|       |
  318|       |        /* Attributes */
  319|    342|        if (graph->attr) {
  ------------------
  |  Branch (319:13): [True: 342, False: 0]
  ------------------
  320|       |            /* TODO: Does this keep the attribute table in a consistent state upon failure? */
  321|    342|            CHECK_ERR(igraph_i_attribute_add_edges(graph, edges, attr));
  ------------------
  |  |  298|    342|    do { \
  |  |  299|    342|        igraph_error_t err = (expr); \
  |  |  300|    342|        if (err != IGRAPH_SUCCESS) { \
  |  |  ------------------
  |  |  |  Branch (300:13): [True: 0, False: 342]
  |  |  ------------------
  |  |  301|      0|            igraph_vector_int_resize(&graph->from, no_of_edges); /* gets smaller, error safe */ \
  |  |  302|      0|            igraph_vector_int_resize(&graph->to, no_of_edges);   /* gets smaller, error safe */ \
  |  |  303|      0|            IGRAPH_FINALLY_EXIT(); \
  |  |  304|      0|            IGRAPH_ERROR("Cannot add edges.", err); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  305|      0|        } \
  |  |  306|    342|    } while (0)
  |  |  ------------------
  |  |  |  Branch (306:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  322|    342|        }
  323|       |
  324|       |        /* os & is, its length does not change, error safe */
  325|    342|        igraph_i_create_start_vectors(&graph->os, &graph->from, &newoi, graph->n);
  326|    342|        igraph_i_create_start_vectors(&graph->is, &graph->to, &newii, graph->n);
  327|       |
  328|       |        /* everything went fine */
  329|    342|        igraph_vector_int_destroy(&graph->oi);
  330|    342|        igraph_vector_int_destroy(&graph->ii);
  331|    342|        IGRAPH_FINALLY_CLEAN(2);
  332|       |
  333|    342|        graph->oi = newoi;
  334|    342|        graph->ii = newii;
  335|    342|    }
  336|      0|    IGRAPH_FINALLY_EXIT();
  337|       |
  338|    342|#undef CHECK_ERR
  339|       |
  340|       |    /* modification successful, clear the cached properties of the graph.
  341|       |     *
  342|       |     * Adding one or more edges cannot make a strongly or weakly connected
  343|       |     * graph disconnected, so we keep those flags if they are cached as true.
  344|       |     *
  345|       |     * Adding one or more edges may turn a DAG into a non-DAG or a forest into
  346|       |     * a non-forest, so we can keep those flags only if they are cached as
  347|       |     * false.
  348|       |     *
  349|       |     * Also, adding one or more edges does not change HAS_LOOP, HAS_MULTI and
  350|       |     * HAS_MUTUAL if they were already true.
  351|       |     */
  352|    342|    igraph_i_property_cache_invalidate_conditionally(
  353|    342|        graph,
  354|    342|        /* keep_always = */ 0,
  355|       |        /* keep_when_false = */
  356|    342|        (1 << IGRAPH_PROP_IS_DAG) | (1 << IGRAPH_PROP_IS_FOREST),
  357|       |        /* keep_when_true = */
  358|    342|        (1 << IGRAPH_PROP_IS_WEAKLY_CONNECTED) |
  359|    342|        (1 << IGRAPH_PROP_IS_STRONGLY_CONNECTED) |
  360|    342|        (1 << IGRAPH_PROP_HAS_LOOP) |
  361|    342|        (1 << IGRAPH_PROP_HAS_MULTI) |
  362|    342|        (1 << IGRAPH_PROP_HAS_MUTUAL)
  363|    342|    );
  364|       |
  365|    342|    return IGRAPH_SUCCESS;
  366|    342|}
igraph_add_vertices:
  390|    738|) {
  391|    738|    igraph_integer_t ec = igraph_ecount(graph);
  392|    738|    igraph_integer_t vc = igraph_vcount(graph);
  393|    738|    igraph_integer_t new_vc;
  394|    738|    igraph_integer_t i;
  395|       |
  396|    738|    if (nv < 0) {
  ------------------
  |  Branch (396:9): [True: 0, False: 738]
  ------------------
  397|      0|        IGRAPH_ERROR("Cannot add negative number of vertices.", IGRAPH_EINVAL);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  398|      0|    }
  399|       |
  400|    738|    IGRAPH_SAFE_ADD(graph->n, nv, &new_vc);
  ------------------
  |  |   47|    738|    do { \
  |  |   48|    738|        igraph_integer_t _safe_a = (a), _safe_b = (b); \
  |  |   49|    738|        igraph_integer_t _safe_sum; \
  |  |   50|    738|        if (__builtin_add_overflow(_safe_a, _safe_b, &_safe_sum)) { \
  |  |  ------------------
  |  |  |  Branch (50:13): [True: 0, False: 738]
  |  |  ------------------
  |  |   51|      0|            IGRAPH_ERRORF("Overflow when adding %" IGRAPH_PRId " and %" IGRAPH_PRId ".", IGRAPH_EOVERFLOW, _safe_a, _safe_b); \
  |  |  ------------------
  |  |  |  |  469|      0|    do { \
  |  |  |  |  470|      0|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  |  |  471|      0|                      igraph_errno, __VA_ARGS__) ; \
  |  |  |  |  472|      0|        return igraph_errno; \
  |  |  |  |  473|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (473:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|        } \
  |  |   53|    738|        *(res) = _safe_sum; \
  |  |   54|    738|    } while (0)
  |  |  ------------------
  |  |  |  Branch (54:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  401|    738|    if (new_vc > IGRAPH_VCOUNT_MAX) {
  ------------------
  |  |  105|    738|#define IGRAPH_VCOUNT_MAX (IGRAPH_INTEGER_MAX-1)
  |  |  ------------------
  |  |  |  |   77|    738|#  define IGRAPH_INTEGER_MAX INT64_MAX
  |  |  ------------------
  ------------------
  |  Branch (401:9): [True: 0, False: 738]
  ------------------
  402|      0|        IGRAPH_ERRORF("Maximum vertex count (%" IGRAPH_PRId ") exceeded.", IGRAPH_ERANGE,
  ------------------
  |  |  469|      0|    do { \
  |  |  470|      0|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  471|      0|                      igraph_errno, __VA_ARGS__) ; \
  |  |  472|      0|        return igraph_errno; \
  |  |  473|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (473:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  403|      0|                      IGRAPH_VCOUNT_MAX);
  404|      0|    }
  405|    738|    IGRAPH_CHECK(igraph_vector_int_reserve(&graph->os, new_vc + 1));
  ------------------
  |  |  648|    738|    do { \
  |  |  649|    738|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    738|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    738|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 738]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    738|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  406|    738|    IGRAPH_CHECK(igraph_vector_int_reserve(&graph->is, new_vc + 1));
  ------------------
  |  |  648|    738|    do { \
  |  |  649|    738|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    738|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    738|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 738]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    738|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  407|       |
  408|    738|    igraph_vector_int_resize(&graph->os, new_vc + 1); /* reserved */
  409|    738|    igraph_vector_int_resize(&graph->is, new_vc + 1); /* reserved */
  410|  87.9M|    for (i = graph->n + 1; i < new_vc + 1; i++) {
  ------------------
  |  Branch (410:28): [True: 87.9M, False: 738]
  ------------------
  411|  87.9M|        VECTOR(graph->os)[i] = ec;
  ------------------
  |  |   65|  87.9M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  412|  87.9M|        VECTOR(graph->is)[i] = ec;
  ------------------
  |  |   65|  87.9M|#define VECTOR(v) ((v).stor_begin)
  ------------------
  413|  87.9M|    }
  414|       |
  415|    738|    graph->n += nv;
  416|       |
  417|       |    /* Add attributes if necessary. This section is protected with
  418|       |     * FINALLY_ENTER/EXIT so that the graph would not be accidentally
  419|       |     * free upon error until it could be restored to a consistant state. */
  420|       |
  421|    738|    if (graph->attr) {
  ------------------
  |  Branch (421:9): [True: 738, False: 0]
  ------------------
  422|    738|        igraph_error_t err;
  423|    738|        IGRAPH_FINALLY_ENTER();
  424|    738|        err = igraph_i_attribute_add_vertices(graph, nv, attr);
  425|    738|        if (err != IGRAPH_SUCCESS) {
  ------------------
  |  Branch (425:13): [True: 0, False: 738]
  ------------------
  426|       |            /* Restore original vertex count on failure */
  427|      0|            graph->n = vc;
  428|      0|            igraph_vector_int_resize(&graph->os, vc + 1); /* shrinks */
  429|      0|            igraph_vector_int_resize(&graph->is, vc + 1); /* shrinks */
  430|      0|        }
  431|    738|        IGRAPH_FINALLY_EXIT();
  432|    738|        if (err != IGRAPH_SUCCESS) {
  ------------------
  |  Branch (432:13): [True: 0, False: 738]
  ------------------
  433|      0|            IGRAPH_ERROR("Cannot add vertices.", err);
  ------------------
  |  |  431|      0|    do { \
  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      0|        return igraph_errno ; \
  |  |  434|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  434|      0|        }
  435|    738|    }
  436|       |
  437|       |    /* modification successful, clear the cached properties of the graph.
  438|       |     *
  439|       |     * Adding one or more nodes does not change the following cached properties:
  440|       |     *
  441|       |     * - IGRAPH_PROP_HAS_LOOP
  442|       |     * - IGRAPH_PROP_HAS_MULTI
  443|       |     * - IGRAPH_PROP_HAS_MUTUAL
  444|       |     * - IGRAPH_PROP_IS_DAG (adding a node does not create/destroy cycles)
  445|       |     * - IGRAPH_PROP_IS_FOREST (same)
  446|       |     *
  447|       |     * Adding one or more nodes without any edges incident on them is sure to
  448|       |     * make the graph disconnected (weakly or strongly), so we can keep the
  449|       |     * connectivity-related properties if they are currently cached as false.
  450|       |     * (Actually, even if they weren't cached as false, we could still set them
  451|       |     * to false, but we don't have that functionality yet). The only exception
  452|       |     * is when the graph had zero vertices and gained only one vertex, because
  453|       |     * it then becomes connected. That's why we have the condition below in the
  454|       |     * keep_when_false section.
  455|       |     */
  456|    738|    igraph_i_property_cache_invalidate_conditionally(
  457|    738|        graph,
  458|       |        /* keep_always = */
  459|    738|        (1 << IGRAPH_PROP_HAS_LOOP) |
  460|    738|        (1 << IGRAPH_PROP_HAS_MULTI) |
  461|    738|        (1 << IGRAPH_PROP_HAS_MUTUAL) |
  462|    738|        (1 << IGRAPH_PROP_IS_DAG) |
  463|    738|        (1 << IGRAPH_PROP_IS_FOREST),
  464|       |        /* keep_when_false = */
  465|    738|        igraph_vcount(graph) >= 2 ? (
  ------------------
  |  Branch (465:9): [True: 582, False: 156]
  ------------------
  466|    582|            (1 << IGRAPH_PROP_IS_STRONGLY_CONNECTED) |
  467|    582|            (1 << IGRAPH_PROP_IS_WEAKLY_CONNECTED)
  468|    582|        ) : 0,
  469|       |        /* keep_when_true = */
  470|    738|        0
  471|    738|    );
  472|       |
  473|    738|    return IGRAPH_SUCCESS;
  474|    738|}
igraph_vcount:
  828|  2.89k|igraph_integer_t igraph_vcount(const igraph_t *graph) {
  829|  2.89k|    return graph->n;
  830|  2.89k|}
igraph_ecount:
  842|  1.08k|igraph_integer_t igraph_ecount(const igraph_t *graph) {
  843|  1.08k|    return igraph_vector_int_size(&graph->from);
  844|  1.08k|}
igraph_is_directed:
 1108|    342|igraph_bool_t igraph_is_directed(const igraph_t *graph) {
 1109|    342|    return graph->directed;
 1110|    342|}
type_indexededgelist.c:igraph_i_create_start_vectors:
 1051|    684|        igraph_vector_int_t *iindex, igraph_integer_t nodes) {
 1052|       |
 1053|    684|# define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
 1054|       |
 1055|    684|    igraph_integer_t no_of_nodes;
 1056|    684|    igraph_integer_t no_of_edges;
 1057|    684|    igraph_integer_t i, j, idx;
 1058|       |
 1059|    684|    no_of_nodes = nodes;
 1060|    684|    no_of_edges = igraph_vector_int_size(el);
 1061|       |
 1062|       |    /* result */
 1063|       |
 1064|    684|    IGRAPH_CHECK(igraph_vector_int_resize(res, nodes + 1));
  ------------------
  |  |  648|    684|    do { \
  |  |  649|    684|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    684|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    684|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 684]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    684|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1065|       |
 1066|       |    /* create the index */
 1067|       |
 1068|    684|    if (no_of_edges == 0) {
  ------------------
  |  Branch (1068:9): [True: 0, False: 684]
  ------------------
 1069|       |        /* empty graph */
 1070|      0|        igraph_vector_int_null(res);
 1071|    684|    } else {
 1072|    684|        idx = -1;
 1073|  76.6M|        for (i = 0; i <= EDGE(0); i++) {
  ------------------
  |  | 1053|  76.6M|# define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   65|  76.6M|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               # define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   65|  76.6M|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
  |  Branch (1073:21): [True: 76.6M, False: 684]
  ------------------
 1074|  76.6M|            idx++; VECTOR(*res)[idx] = 0;
  ------------------
  |  |   65|  76.6M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1075|  76.6M|        }
 1076|  2.01M|        for (i = 1; i < no_of_edges; i++) {
  ------------------
  |  Branch (1076:21): [True: 2.00M, False: 684]
  ------------------
 1077|  2.00M|            igraph_integer_t n = EDGE(i) - EDGE(VECTOR(*res)[idx]);
  ------------------
  |  | 1053|  2.00M|# define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   65|  2.00M|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               # define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   65|  2.00M|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
                          igraph_integer_t n = EDGE(i) - EDGE(VECTOR(*res)[idx]);
  ------------------
  |  | 1053|  2.00M|# define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   65|  2.00M|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               # define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   65|  2.00M|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1078|  6.81M|            for (j = 0; j < n; j++) {
  ------------------
  |  Branch (1078:25): [True: 4.80M, False: 2.00M]
  ------------------
 1079|  4.80M|                idx++; VECTOR(*res)[idx] = i;
  ------------------
  |  |   65|  4.80M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1080|  4.80M|            }
 1081|  2.00M|        }
 1082|    684|        j = EDGE(VECTOR(*res)[idx]);
  ------------------
  |  | 1053|    684|# define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   65|    684|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  |  |               # define EDGE(i) (VECTOR(*el)[ VECTOR(*iindex)[(i)] ])
  |  |  ------------------
  |  |  |  |   65|    684|#define VECTOR(v) ((v).stor_begin)
  |  |  ------------------
  ------------------
 1083|  83.9M|        for (i = 0; i < no_of_nodes - j; i++) {
  ------------------
  |  Branch (1083:21): [True: 83.9M, False: 684]
  ------------------
 1084|  83.9M|            idx++; VECTOR(*res)[idx] = no_of_edges;
  ------------------
  |  |   65|  83.9M|#define VECTOR(v) ((v).stor_begin)
  ------------------
 1085|  83.9M|        }
 1086|    684|    }
 1087|       |
 1088|       |    /* clean */
 1089|       |
 1090|    684|# undef EDGE
 1091|    684|    return IGRAPH_SUCCESS;
 1092|    684|}

igraph_read_graph_dimacs_flow:
  114|  1.79k|        igraph_bool_t directed) {
  115|       |
  116|  1.79k|    igraph_vector_int_t edges;
  117|  1.79k|    igraph_integer_t no_of_nodes = -1;
  118|  1.79k|    igraph_integer_t no_of_edges = -1;
  119|  1.79k|    igraph_integer_t tsource = -1;
  120|  1.79k|    igraph_integer_t ttarget = -1;
  121|  1.79k|    char prob[21];
  122|  1.79k|    enum {
  123|  1.79k|        PROBLEM_NONE,
  124|  1.79k|        PROBLEM_EDGE,
  125|  1.79k|        PROBLEM_MAX
  126|  1.79k|    } problem_type = PROBLEM_NONE;
  127|       |
  128|  1.79k|    IGRAPH_VECTOR_INT_INIT_FINALLY(&edges, 0);
  ------------------
  |  |  124|  1.79k|    do { IGRAPH_CHECK(igraph_vector_int_init(v, size)); \
  |  |  ------------------
  |  |  |  |  648|  1.79k|    do { \
  |  |  |  |  649|  1.79k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  |  |  650|  1.79k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|  1.79k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.79k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  431|      0|    do { \
  |  |  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  652|      0|        } \
  |  |  |  |  653|  1.79k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  1.79k|        IGRAPH_FINALLY(igraph_vector_int_destroy, v); } while (0)
  |  |  ------------------
  |  |  |  |  591|  1.79k|    do { \
  |  |  |  |  592|  1.79k|        /* the following branch makes the compiler check the compatibility of \
  |  |  |  |  593|  1.79k|         * func and ptr to detect cases when we are accidentally invoking an \
  |  |  |  |  594|  1.79k|         * incorrect destructor function with the pointer */ \
  |  |  |  |  595|  1.79k|        if (0) { func(ptr); } \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (595:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  596|  1.79k|        IGRAPH_FINALLY_REAL((igraph_finally_func_t*)(func), (ptr)); \
  |  |  |  |  597|  1.79k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (597:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (125:64): [Folded - Ignored]
  |  |  ------------------
  ------------------
  129|  1.79k|    if (capacity) {
  ------------------
  |  Branch (129:9): [True: 1.79k, False: 0]
  ------------------
  130|  1.79k|        igraph_vector_clear(capacity);
  131|  1.79k|    }
  132|       |
  133|  1.08M|    while (!feof(instream)) {
  ------------------
  |  Branch (133:12): [True: 1.08M, False: 939]
  ------------------
  134|  1.08M|        int read;
  135|  1.08M|        char str[2];
  136|       |
  137|  1.08M|        IGRAPH_ALLOW_INTERRUPTION();
  ------------------
  |  |   47|  1.08M|    do { \
  |  |   48|  1.08M|        if (igraph_i_interruption_handler) { \
  |  |  ------------------
  |  |  |  Branch (48:13): [True: 0, False: 1.08M]
  |  |  ------------------
  |  |   49|      0|            if (igraph_allow_interruption()) { \
  |  |  ------------------
  |  |  |  Branch (49:17): [True: 0, False: 0]
  |  |  ------------------
  |  |   50|      0|                return IGRAPH_INTERRUPTED; \
  |  |   51|      0|            } \
  |  |   52|      0|        } \
  |  |   53|  1.08M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (53:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  138|       |
  139|  1.08M|        read = fscanf(instream, "%2c", str);
  140|  1.08M|        if (feof(instream)) {
  ------------------
  |  Branch (140:13): [True: 21, False: 1.08M]
  ------------------
  141|     21|            break;
  142|     21|        }
  143|  1.08M|        EXPECT(read, 1);
  ------------------
  |  |   43|  1.08M|    do { \
  |  |   44|  1.08M|        if ((actual) != (expected)) { \
  |  |  ------------------
  |  |  |  Branch (44:13): [True: 0, False: 1.08M]
  |  |  ------------------
  |  |   45|      0|            IGRAPH_ERROR("Reading DIMACS flow problem file failed.", IGRAPH_PARSEERROR); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   46|      0|        } \
  |  |   47|  1.08M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (47:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  144|  1.08M|        switch (str[0]) {
  145|      0|            igraph_integer_t tmp, tmp2;
  146|      0|            igraph_integer_t from, to;
  147|      0|            igraph_real_t cap;
  148|       |
  149|    270|        case 'c':
  ------------------
  |  Branch (149:9): [True: 270, False: 1.08M]
  ------------------
  150|       |            /* comment */
  151|    270|            break;
  152|       |
  153|  1.60k|        case 'p':
  ------------------
  |  Branch (153:9): [True: 1.60k, False: 1.08M]
  ------------------
  154|  1.60k|            if (no_of_nodes != -1) {
  ------------------
  |  Branch (154:17): [True: 20, False: 1.58k]
  ------------------
  155|     20|                IGRAPH_ERROR("Reading DIMACS file failed, double 'p' line.",
  ------------------
  |  |  431|     20|    do { \
  |  |  432|     20|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|     20|        return igraph_errno ; \
  |  |  434|     20|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  156|     20|                             IGRAPH_PARSEERROR);
  157|     20|            }
  158|  1.58k|            read = fscanf(instream, "%20s %" IGRAPH_PRId " %" IGRAPH_PRId "", prob,
  159|  1.58k|                          &no_of_nodes, &no_of_edges);
  160|  1.58k|            EXPECT(read, 3);
  ------------------
  |  |   43|  1.58k|    do { \
  |  |   44|  1.58k|        if ((actual) != (expected)) { \
  |  |  ------------------
  |  |  |  Branch (44:13): [True: 3, False: 1.58k]
  |  |  ------------------
  |  |   45|      3|            IGRAPH_ERROR("Reading DIMACS flow problem file failed.", IGRAPH_PARSEERROR); \
  |  |  ------------------
  |  |  |  |  431|      3|    do { \
  |  |  |  |  432|      3|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      3|        return igraph_errno ; \
  |  |  |  |  434|      3|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   46|      3|        } \
  |  |   47|  1.58k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (47:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  161|  1.58k|            if (no_of_nodes > IGRAPH_DIMACS_MAX_VERTEX_COUNT) {
  ------------------
  |  |   35|  1.58k|#define IGRAPH_DIMACS_MAX_VERTEX_COUNT (1 << 20)
  ------------------
  |  Branch (161:17): [True: 12, False: 1.57k]
  ------------------
  162|     12|                IGRAPH_ERROR("Vertex count too large in DIMACS file.", IGRAPH_PARSEERROR);
  ------------------
  |  |  431|     12|    do { \
  |  |  432|     12|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|     12|        return igraph_errno ; \
  |  |  434|     12|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  163|     12|            }
  164|  1.57k|            if (no_of_nodes < 0) {
  ------------------
  |  Branch (164:17): [True: 89, False: 1.48k]
  ------------------
  165|     89|                IGRAPH_ERROR("Invalid (negative) vertex count in DIMACS file.", IGRAPH_PARSEERROR);
  ------------------
  |  |  431|     89|    do { \
  |  |  432|     89|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|     89|        return igraph_errno ; \
  |  |  434|     89|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  166|     89|            }
  167|  1.48k|            if (no_of_edges > IGRAPH_DIMACS_MAX_EDGE_COUNT) {
  ------------------
  |  |   36|  1.48k|#define IGRAPH_DIMACS_MAX_EDGE_COUNT   (1 << 20)
  ------------------
  |  Branch (167:17): [True: 11, False: 1.47k]
  ------------------
  168|     11|                IGRAPH_ERROR("Edge count too large in DIMACS file.", IGRAPH_PARSEERROR);
  ------------------
  |  |  431|     11|    do { \
  |  |  432|     11|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|     11|        return igraph_errno ; \
  |  |  434|     11|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  169|     11|            }
  170|  1.47k|            if (no_of_edges < 0) {
  ------------------
  |  Branch (170:17): [True: 88, False: 1.38k]
  ------------------
  171|     88|                IGRAPH_ERROR("Invalid (negative) edge count in DIMACS file.", IGRAPH_PARSEERROR);
  ------------------
  |  |  431|     88|    do { \
  |  |  432|     88|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|     88|        return igraph_errno ; \
  |  |  434|     88|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  172|     88|            }
  173|  1.38k|            if (!strcmp(prob, "edge")) {
  ------------------
  |  Branch (173:17): [True: 656, False: 727]
  ------------------
  174|       |                /* edge list */
  175|    656|                problem_type = PROBLEM_EDGE;
  176|    656|                if (label) {
  ------------------
  |  Branch (176:21): [True: 656, False: 0]
  ------------------
  177|    656|                    IGRAPH_CHECK(igraph_vector_int_range(label, 1, no_of_nodes+1));
  ------------------
  |  |  648|    656|    do { \
  |  |  649|    656|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    656|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    656|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 656]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    656|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  178|    656|                }
  179|    727|            } else if (!strcmp(prob, "max")) {
  ------------------
  |  Branch (179:24): [True: 602, False: 125]
  ------------------
  180|       |                /* maximum flow problem */
  181|    602|                problem_type = PROBLEM_MAX;
  182|    602|                if (capacity) {
  ------------------
  |  Branch (182:21): [True: 602, False: 0]
  ------------------
  183|    602|                    IGRAPH_CHECK(igraph_vector_reserve(capacity, no_of_edges));
  ------------------
  |  |  648|    602|    do { \
  |  |  649|    602|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    602|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    602|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 602]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|    602|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  184|    602|                }
  185|    602|            } else {
  186|    125|                IGRAPH_ERROR("Unknown problem type, should be 'edge' or 'max'.",
  ------------------
  |  |  431|    125|    do { \
  |  |  432|    125|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|    125|        return igraph_errno ; \
  |  |  434|    125|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  187|    125|                             IGRAPH_PARSEERROR);
  188|    125|            }
  189|  1.25k|            if (problem) {
  ------------------
  |  Branch (189:17): [True: 1.25k, False: 0]
  ------------------
  190|  1.25k|                igraph_strvector_clear(problem);
  191|  1.25k|                IGRAPH_CHECK(igraph_strvector_push_back(problem, prob));
  ------------------
  |  |  648|  1.25k|    do { \
  |  |  649|  1.25k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.25k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.25k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  192|  1.25k|            }
  193|  1.25k|            IGRAPH_CHECK(igraph_vector_int_reserve(&edges, no_of_edges * 2));
  ------------------
  |  |  648|  1.25k|    do { \
  |  |  649|  1.25k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.25k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.25k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.25k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  194|  1.25k|            break;
  195|       |
  196|  1.25k|        case 'n':
  ------------------
  |  Branch (196:9): [True: 1.24k, False: 1.08M]
  ------------------
  197|       |            /* for MAX this is either the source or target vertex,
  198|       |            for EDGE this is a vertex label */
  199|  1.24k|            if (problem_type == PROBLEM_MAX) {
  ------------------
  |  Branch (199:17): [True: 853, False: 387]
  ------------------
  200|    853|                str[0] = 'x';
  201|    853|                read = fscanf(instream, "%" IGRAPH_PRId " %1s", &tmp, str);
  202|    853|                EXPECT(read, 2);
  ------------------
  |  |   43|    853|    do { \
  |  |   44|    853|        if ((actual) != (expected)) { \
  |  |  ------------------
  |  |  |  Branch (44:13): [True: 3, False: 850]
  |  |  ------------------
  |  |   45|      3|            IGRAPH_ERROR("Reading DIMACS flow problem file failed.", IGRAPH_PARSEERROR); \
  |  |  ------------------
  |  |  |  |  431|      3|    do { \
  |  |  |  |  432|      3|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      3|        return igraph_errno ; \
  |  |  |  |  434|      3|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   46|      3|        } \
  |  |   47|    853|    } while (0)
  |  |  ------------------
  |  |  |  Branch (47:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  203|    850|                if (str[0] == 's') {
  ------------------
  |  Branch (203:21): [True: 414, False: 436]
  ------------------
  204|    414|                    if (tsource != -1) {
  ------------------
  |  Branch (204:25): [True: 110, False: 304]
  ------------------
  205|    110|                        IGRAPH_ERROR("Reading DIMACS file: multiple source vertex line.",
  ------------------
  |  |  431|    110|    do { \
  |  |  432|    110|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|    110|        return igraph_errno ; \
  |  |  434|    110|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  206|    110|                                     IGRAPH_PARSEERROR);
  207|    304|                    } else {
  208|    304|                        tsource = tmp;
  209|    304|                    }
  210|    436|                } else if (str[0] == 't') {
  ------------------
  |  Branch (210:28): [True: 422, False: 14]
  ------------------
  211|    422|                    if (ttarget != -1) {
  ------------------
  |  Branch (211:25): [True: 114, False: 308]
  ------------------
  212|    114|                        IGRAPH_ERROR("Reading DIMACS file: multiple target vertex line.",
  ------------------
  |  |  431|    114|    do { \
  |  |  432|    114|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|    114|        return igraph_errno ; \
  |  |  434|    114|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  213|    114|                                     IGRAPH_PARSEERROR);
  214|    308|                    } else {
  215|    308|                        ttarget = tmp;
  216|    308|                    }
  217|    422|                } else {
  218|     14|                    IGRAPH_ERROR("Invalid node descriptor line in DIMACS file.",
  ------------------
  |  |  431|     14|    do { \
  |  |  432|     14|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|     14|        return igraph_errno ; \
  |  |  434|     14|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  219|     14|                                 IGRAPH_PARSEERROR);
  220|     14|                }
  221|    850|            } else { /* PROBLEM_EDGE */
  222|    387|                read = fscanf(instream, "%" IGRAPH_PRId " %" IGRAPH_PRId "", &tmp, &tmp2);
  223|    387|                EXPECT(read, 1);
  ------------------
  |  |   43|    387|    do { \
  |  |   44|    387|        if ((actual) != (expected)) { \
  |  |  ------------------
  |  |  |  Branch (44:13): [True: 4, False: 383]
  |  |  ------------------
  |  |   45|      4|            IGRAPH_ERROR("Reading DIMACS flow problem file failed.", IGRAPH_PARSEERROR); \
  |  |  ------------------
  |  |  |  |  431|      4|    do { \
  |  |  |  |  432|      4|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      4|        return igraph_errno ; \
  |  |  |  |  434|      4|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   46|      4|        } \
  |  |   47|    387|    } while (0)
  |  |  ------------------
  |  |  |  Branch (47:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  224|    383|                if (label) {
  ------------------
  |  Branch (224:21): [True: 383, False: 0]
  ------------------
  225|    383|                    if (tmp < 0 || tmp >= no_of_nodes) {
  ------------------
  |  Branch (225:25): [True: 83, False: 300]
  |  Branch (225:36): [True: 101, False: 199]
  ------------------
  226|    184|                        IGRAPH_ERRORF("Invalid node index %" IGRAPH_PRId " in DIMACS file. "
  ------------------
  |  |  469|    184|    do { \
  |  |  470|    184|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  471|    184|                      igraph_errno, __VA_ARGS__) ; \
  |  |  472|    184|        return igraph_errno; \
  |  |  473|    184|    } while (0)
  |  |  ------------------
  |  |  |  Branch (473:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  227|    184|                                      "Number of nodes was given as %" IGRAPH_PRId".",
  228|    184|                                      IGRAPH_PARSEERROR, tmp, no_of_nodes);
  229|    184|                    }
  230|    199|                    VECTOR(*label)[tmp] = tmp2;
  ------------------
  |  |   65|    199|#define VECTOR(v) ((v).stor_begin)
  ------------------
  231|    199|                }
  232|    383|            }
  233|       |
  234|    811|            break;
  235|       |
  236|  50.4k|        case 'a':
  ------------------
  |  Branch (236:9): [True: 50.4k, False: 1.03M]
  ------------------
  237|       |            /* This is valid only for MAX, a weighted edge */
  238|  50.4k|            if (problem_type != PROBLEM_MAX) {
  ------------------
  |  Branch (238:17): [True: 2, False: 50.4k]
  ------------------
  239|      2|                IGRAPH_ERROR("'a' lines are allowed only in MAX problem files.",
  ------------------
  |  |  431|      2|    do { \
  |  |  432|      2|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      2|        return igraph_errno ; \
  |  |  434|      2|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  240|      2|                             IGRAPH_PARSEERROR);
  241|      2|            }
  242|  50.4k|            read = fscanf(instream, "%" IGRAPH_PRId " %" IGRAPH_PRId " %lf", &from, &to, &cap);
  243|  50.4k|            EXPECT(read, 3);
  ------------------
  |  |   43|  50.4k|    do { \
  |  |   44|  50.4k|        if ((actual) != (expected)) { \
  |  |  ------------------
  |  |  |  Branch (44:13): [True: 3, False: 50.4k]
  |  |  ------------------
  |  |   45|      3|            IGRAPH_ERROR("Reading DIMACS flow problem file failed.", IGRAPH_PARSEERROR); \
  |  |  ------------------
  |  |  |  |  431|      3|    do { \
  |  |  |  |  432|      3|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      3|        return igraph_errno ; \
  |  |  |  |  434|      3|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   46|      3|        } \
  |  |   47|  50.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (47:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  244|  50.4k|            CHECK_VID(from);
  ------------------
  |  |   50|  50.4k|    do { \
  |  |   51|  50.4k|        if (vid > IGRAPH_DIMACS_MAX_VERTEX_COUNT) { \
  |  |  ------------------
  |  |  |  |   35|   100k|#define IGRAPH_DIMACS_MAX_VERTEX_COUNT (1 << 20)
  |  |  ------------------
  |  |  |  Branch (51:13): [True: 12, False: 50.4k]
  |  |  ------------------
  |  |   52|     12|            IGRAPH_ERRORF("Vertex ID %" IGRAPH_PRId " too large in DIMACS file.", IGRAPH_PARSEERROR, vid); \
  |  |  ------------------
  |  |  |  |  469|     12|    do { \
  |  |  |  |  470|     12|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  |  |  471|     12|                      igraph_errno, __VA_ARGS__) ; \
  |  |  |  |  472|     12|        return igraph_errno; \
  |  |  |  |  473|     12|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (473:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   53|     12|        } \
  |  |   54|  50.4k|    } while(0)
  |  |  ------------------
  |  |  |  Branch (54:13): [Folded - Ignored]
  |  |  ------------------
  ------------------
  245|  50.4k|            CHECK_VID(to);
  ------------------
  |  |   50|  50.4k|    do { \
  |  |   51|  50.4k|        if (vid > IGRAPH_DIMACS_MAX_VERTEX_COUNT) { \
  |  |  ------------------
  |  |  |  |   35|   100k|#define IGRAPH_DIMACS_MAX_VERTEX_COUNT (1 << 20)
  |  |  ------------------
  |  |  |  Branch (51:13): [True: 11, False: 50.4k]
  |  |  ------------------
  |  |   52|     11|            IGRAPH_ERRORF("Vertex ID %" IGRAPH_PRId " too large in DIMACS file.", IGRAPH_PARSEERROR, vid); \
  |  |  ------------------
  |  |  |  |  469|     11|    do { \
  |  |  |  |  470|     11|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  |  |  471|     11|                      igraph_errno, __VA_ARGS__) ; \
  |  |  |  |  472|     11|        return igraph_errno; \
  |  |  |  |  473|     11|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (473:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   53|     11|        } \
  |  |   54|  50.4k|    } while(0)
  |  |  ------------------
  |  |  |  Branch (54:13): [Folded - Ignored]
  |  |  ------------------
  ------------------
  246|  50.4k|            IGRAPH_CHECK(igraph_vector_int_push_back(&edges, from - 1));
  ------------------
  |  |  648|  50.4k|    do { \
  |  |  649|  50.4k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  50.4k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  50.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 50.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  50.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  247|  50.4k|            IGRAPH_CHECK(igraph_vector_int_push_back(&edges, to - 1));
  ------------------
  |  |  648|  50.4k|    do { \
  |  |  649|  50.4k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  50.4k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  50.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 50.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  50.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  248|  50.4k|            if (capacity) {
  ------------------
  |  Branch (248:17): [True: 50.4k, False: 0]
  ------------------
  249|  50.4k|                IGRAPH_CHECK(igraph_vector_push_back(capacity, cap));
  ------------------
  |  |  648|  50.4k|    do { \
  |  |  649|  50.4k|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  50.4k|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  50.4k|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 50.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  50.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  250|  50.4k|            }
  251|  50.4k|            break;
  252|       |
  253|  1.02M|        case 'e':
  ------------------
  |  Branch (253:9): [True: 1.02M, False: 53.5k]
  ------------------
  254|       |            /* Edge line, only in EDGE */
  255|  1.02M|            if (problem_type != PROBLEM_EDGE) {
  ------------------
  |  Branch (255:17): [True: 2, False: 1.02M]
  ------------------
  256|      2|                IGRAPH_ERROR("'e' lines are allowed only in EDGE problem files.",
  ------------------
  |  |  431|      2|    do { \
  |  |  432|      2|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      2|        return igraph_errno ; \
  |  |  434|      2|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  257|      2|                             IGRAPH_PARSEERROR);
  258|      2|            }
  259|  1.02M|            read = fscanf(instream, "%" IGRAPH_PRId " %" IGRAPH_PRId "", &from, &to);
  260|  1.02M|            EXPECT(read, 2);
  ------------------
  |  |   43|  1.02M|    do { \
  |  |   44|  1.02M|        if ((actual) != (expected)) { \
  |  |  ------------------
  |  |  |  Branch (44:13): [True: 3, False: 1.02M]
  |  |  ------------------
  |  |   45|      3|            IGRAPH_ERROR("Reading DIMACS flow problem file failed.", IGRAPH_PARSEERROR); \
  |  |  ------------------
  |  |  |  |  431|      3|    do { \
  |  |  |  |  432|      3|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      3|        return igraph_errno ; \
  |  |  |  |  434|      3|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   46|      3|        } \
  |  |   47|  1.02M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (47:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  261|  1.02M|            CHECK_VID(from);
  ------------------
  |  |   50|  1.02M|    do { \
  |  |   51|  1.02M|        if (vid > IGRAPH_DIMACS_MAX_VERTEX_COUNT) { \
  |  |  ------------------
  |  |  |  |   35|  2.05M|#define IGRAPH_DIMACS_MAX_VERTEX_COUNT (1 << 20)
  |  |  ------------------
  |  |  |  Branch (51:13): [True: 12, False: 1.02M]
  |  |  ------------------
  |  |   52|     12|            IGRAPH_ERRORF("Vertex ID %" IGRAPH_PRId " too large in DIMACS file.", IGRAPH_PARSEERROR, vid); \
  |  |  ------------------
  |  |  |  |  469|     12|    do { \
  |  |  |  |  470|     12|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  |  |  471|     12|                      igraph_errno, __VA_ARGS__) ; \
  |  |  |  |  472|     12|        return igraph_errno; \
  |  |  |  |  473|     12|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (473:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   53|     12|        } \
  |  |   54|  1.02M|    } while(0)
  |  |  ------------------
  |  |  |  Branch (54:13): [Folded - Ignored]
  |  |  ------------------
  ------------------
  262|  1.02M|            CHECK_VID(to);
  ------------------
  |  |   50|  1.02M|    do { \
  |  |   51|  1.02M|        if (vid > IGRAPH_DIMACS_MAX_VERTEX_COUNT) { \
  |  |  ------------------
  |  |  |  |   35|  2.05M|#define IGRAPH_DIMACS_MAX_VERTEX_COUNT (1 << 20)
  |  |  ------------------
  |  |  |  Branch (51:13): [True: 11, False: 1.02M]
  |  |  ------------------
  |  |   52|     11|            IGRAPH_ERRORF("Vertex ID %" IGRAPH_PRId " too large in DIMACS file.", IGRAPH_PARSEERROR, vid); \
  |  |  ------------------
  |  |  |  |  469|     11|    do { \
  |  |  |  |  470|     11|        igraph_errorf(reason, IGRAPH_FILE_BASENAME, __LINE__, \
  |  |  |  |  471|     11|                      igraph_errno, __VA_ARGS__) ; \
  |  |  |  |  472|     11|        return igraph_errno; \
  |  |  |  |  473|     11|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (473:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   53|     11|        } \
  |  |   54|  1.02M|    } while(0)
  |  |  ------------------
  |  |  |  Branch (54:13): [Folded - Ignored]
  |  |  ------------------
  ------------------
  263|  1.02M|            IGRAPH_CHECK(igraph_vector_int_push_back(&edges, from - 1));
  ------------------
  |  |  648|  1.02M|    do { \
  |  |  649|  1.02M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.02M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.02M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.02M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.02M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  264|  1.02M|            IGRAPH_CHECK(igraph_vector_int_push_back(&edges, to - 1));
  ------------------
  |  |  648|  1.02M|    do { \
  |  |  649|  1.02M|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|  1.02M|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|  1.02M|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 0, False: 1.02M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|      0|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|      0|    do { \
  |  |  |  |  432|      0|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|      0|        return igraph_errno ; \
  |  |  |  |  434|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|      0|        } \
  |  |  653|  1.02M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  265|  1.02M|            break;
  266|       |
  267|  1.02M|        default:
  ------------------
  |  Branch (267:9): [True: 1, False: 1.08M]
  ------------------
  268|      1|            IGRAPH_ERROR("Unknown line type in DIMACS file.", IGRAPH_PARSEERROR);
  ------------------
  |  |  431|      1|    do { \
  |  |  432|      1|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  433|      1|        return igraph_errno ; \
  |  |  434|      1|    } while (0)
  |  |  ------------------
  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  269|  1.08M|        }
  270|       |
  271|       |        /* Go to next line */
  272|  1.08M|        while (!feof(instream) && getc(instream) != '\n') ;
  ------------------
  |  Branch (272:16): [True: 1.08M, False: 939]
  |  Branch (272:35): [True: 5.34k, False: 1.08M]
  ------------------
  273|  1.08M|    }
  274|       |
  275|    960|    if (source) {
  ------------------
  |  Branch (275:9): [True: 960, False: 0]
  ------------------
  276|    960|        *source = tsource - 1;
  277|    960|    }
  278|    960|    if (target) {
  ------------------
  |  Branch (278:9): [True: 960, False: 0]
  ------------------
  279|    960|        *target = ttarget - 1;
  280|    960|    }
  281|       |
  282|    960|    IGRAPH_CHECK(igraph_create(graph, &edges, no_of_nodes, directed));
  ------------------
  |  |  648|    960|    do { \
  |  |  649|    960|        igraph_error_t igraph_i_ret = (expr); \
  |  |  650|    960|        if (IGRAPH_UNLIKELY(igraph_i_ret != IGRAPH_SUCCESS)) {\
  |  |  ------------------
  |  |  |  |  604|    960|    #define IGRAPH_UNLIKELY(a) __builtin_expect((a), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (604:32): [True: 525, False: 435]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  651|    525|            IGRAPH_ERROR("", igraph_i_ret); \
  |  |  ------------------
  |  |  |  |  431|    525|    do { \
  |  |  |  |  432|    525|        igraph_error (reason, IGRAPH_FILE_BASENAME, __LINE__, igraph_errno) ; \
  |  |  |  |  433|    525|        return igraph_errno ; \
  |  |  |  |  434|    525|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (434:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  652|    525|        } \
  |  |  653|    960|    } while (0)
  |  |  ------------------
  |  |  |  Branch (653:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
  283|       |
  284|    435|    igraph_vector_int_destroy(&edges);
  285|    435|    IGRAPH_FINALLY_CLEAN(1);
  286|       |
  287|    435|    return IGRAPH_SUCCESS;
  288|    960|}

