janet_abstract_begin:
 1389|  22.5k|void *janet_abstract_begin(const JanetAbstractType *atype, size_t size) {
 1390|  22.5k|    JanetAbstractHead *header = janet_gcalloc(JANET_MEMORY_NONE,
 1391|  22.5k|        sizeof(JanetAbstractHead) + size);
 1392|  22.5k|    header->size = size;
 1393|  22.5k|    header->type = atype;
 1394|  22.5k|    return (void *) & (header->data);
 1395|  22.5k|}
janet_abstract_end:
 1397|  22.5k|void *janet_abstract_end(void *x) {
 1398|  22.5k|    janet_gc_settype((void *)(janet_abstract_head(x)), JANET_MEMORY_ABSTRACT);
  ------------------
  |  |  679|  22.5k|#define janet_gc_settype(m, t) ((janet_gc_header(m)->flags |= (0xFF & (t))))
  |  |  ------------------
  |  |  |  |  673|  22.5k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  ------------------
 1399|  22.5k|    return x;
 1400|  22.5k|}
janet_abstract:
 1402|  22.5k|void *janet_abstract(const JanetAbstractType *atype, size_t size) {
 1403|  22.5k|    return janet_abstract_end(janet_abstract_begin(atype, size));
 1404|  22.5k|}
janet_array:
 1621|  22.1k|JanetArray *janet_array(int32_t capacity) {
 1622|  22.1k|    JanetArray *array = janet_gcalloc(JANET_MEMORY_ARRAY, sizeof(JanetArray));
 1623|  22.1k|    janet_array_impl(array, capacity);
 1624|  22.1k|    return array;
 1625|  22.1k|}
janet_array_ensure:
 1648|  25.5M|void janet_array_ensure(JanetArray *array, int32_t capacity, int32_t growth) {
 1649|  25.5M|    Janet *newData;
 1650|  25.5M|    Janet *old = array->data;
 1651|  25.5M|    if (capacity <= array->capacity) return;
  ------------------
  |  Branch (1651:9): [True: 25.5M, False: 1.56k]
  ------------------
 1652|  1.56k|    int64_t new_capacity = ((int64_t) capacity) * growth;
 1653|  1.56k|    if (new_capacity > INT32_MAX) new_capacity = INT32_MAX;
  ------------------
  |  Branch (1653:9): [True: 0, False: 1.56k]
  ------------------
 1654|  1.56k|    capacity = (int32_t) new_capacity;
 1655|  1.56k|    newData = janet_realloc(old, capacity * sizeof(Janet));
  ------------------
  |  | 2409|  1.56k|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
 1656|  1.56k|    if (NULL == newData) {
  ------------------
  |  Branch (1656:9): [True: 0, False: 1.56k]
  ------------------
 1657|      0|        JANET_OUT_OF_MEMORY;
  ------------------
  |  |  419|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (419:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1658|      0|    }
 1659|  1.56k|    janet_vm.next_collection += (capacity - array->capacity) * sizeof(Janet);
 1660|  1.56k|    array->data = newData;
 1661|  1.56k|    array->capacity = capacity;
 1662|  1.56k|}
janet_array_push:
 1679|  25.5M|void janet_array_push(JanetArray *array, Janet x) {
 1680|  25.5M|    if (array->count == INT32_MAX) {
  ------------------
  |  Branch (1680:9): [True: 0, False: 25.5M]
  ------------------
 1681|      0|        janet_panic("array overflow");
 1682|      0|    }
 1683|  25.5M|    int32_t newcount = array->count + 1;
 1684|  25.5M|    janet_array_ensure(array, newcount, 2);
 1685|  25.5M|    array->data[array->count] = x;
 1686|  25.5M|    array->count = newcount;
 1687|  25.5M|}
janet_lib_array:
 1978|  6.20k|void janet_lib_array(JanetTable *env) {
 1979|  6.20k|    JanetRegExt array_cfuns[] = {
 1980|  6.20k|        JANET_CORE_REG("array/new", cfun_array_new),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1981|  6.20k|        JANET_CORE_REG("array/weak", cfun_array_weak),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1982|  6.20k|        JANET_CORE_REG("array/new-filled", cfun_array_new_filled),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1983|  6.20k|        JANET_CORE_REG("array/fill", cfun_array_fill),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1984|  6.20k|        JANET_CORE_REG("array/pop", cfun_array_pop),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1985|  6.20k|        JANET_CORE_REG("array/peek", cfun_array_peek),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1986|  6.20k|        JANET_CORE_REG("array/push", cfun_array_push),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1987|  6.20k|        JANET_CORE_REG("array/ensure", cfun_array_ensure),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1988|  6.20k|        JANET_CORE_REG("array/slice", cfun_array_slice),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1989|  6.20k|        JANET_CORE_REG("array/concat", cfun_array_concat),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1990|  6.20k|        JANET_CORE_REG("array/insert", cfun_array_insert),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1991|  6.20k|        JANET_CORE_REG("array/remove", cfun_array_remove),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1992|  6.20k|        JANET_CORE_REG("array/trim", cfun_array_trim),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1993|  6.20k|        JANET_CORE_REG("array/clear", cfun_array_clear),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1994|  6.20k|        JANET_CORE_REG("array/join", cfun_array_join),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1995|  6.20k|        JANET_REG_END
  ------------------
  |  | 2110|  6.20k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
 1996|  6.20k|    };
 1997|       |    janet_core_cfuns_ext(env, NULL, array_cfuns);
 1998|  6.20k|}
janet_lib_asm:
 3143|  6.20k|void janet_lib_asm(JanetTable *env) {
 3144|  6.20k|    JanetRegExt asm_cfuns[] = {
 3145|  6.20k|        JANET_CORE_REG("asm", cfun_asm),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3146|  6.20k|        JANET_CORE_REG("disasm", cfun_disasm),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3147|  6.20k|        JANET_REG_END
  ------------------
  |  | 2110|  6.20k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
 3148|  6.20k|    };
 3149|       |    janet_core_cfuns_ext(env, NULL, asm_cfuns);
 3150|  6.20k|}
janet_buffer_init:
 3211|   148k|JanetBuffer *janet_buffer_init(JanetBuffer *buffer, int32_t capacity) {
 3212|   148k|    janet_buffer_init_impl(buffer, capacity);
 3213|   148k|    buffer->gc.data.next = NULL;
 3214|   148k|    buffer->gc.flags = JANET_MEM_DISABLED;
  ------------------
  |  |  677|   148k|#define JANET_MEM_DISABLED 0x200
  ------------------
 3215|   148k|    return buffer;
 3216|   148k|}
janet_buffer_deinit:
 3231|   159k|void janet_buffer_deinit(JanetBuffer *buffer) {
 3232|   159k|    if (!(buffer->gc.flags & JANET_BUFFER_FLAG_NO_REALLOC)) {
  ------------------
  |  | 1780|   159k|#define JANET_BUFFER_FLAG_NO_REALLOC 0x10000
  ------------------
  |  Branch (3232:9): [True: 159k, False: 0]
  ------------------
 3233|   159k|        janet_free(buffer->data);
  ------------------
  |  | 2415|   159k|#define janet_free(X) free((X))
  ------------------
 3234|       |        buffer->data = NULL;
 3235|   159k|    }
 3236|   159k|}
janet_buffer:
 3239|  10.8k|JanetBuffer *janet_buffer(int32_t capacity) {
 3240|  10.8k|    JanetBuffer *buffer = janet_gcalloc(JANET_MEMORY_BUFFER, sizeof(JanetBuffer));
 3241|  10.8k|    return janet_buffer_init_impl(buffer, capacity);
 3242|  10.8k|}
janet_buffer_extra:
 3275|  2.43M|void janet_buffer_extra(JanetBuffer *buffer, int32_t n) {
 3276|       |    /* Check for buffer overflow */
 3277|  2.43M|    if ((int64_t)n + buffer->count > INT32_MAX) {
  ------------------
  |  Branch (3277:9): [True: 0, False: 2.43M]
  ------------------
 3278|      0|        janet_panic("buffer overflow");
 3279|      0|    }
 3280|  2.43M|    int32_t new_size = buffer->count + n;
 3281|  2.43M|    if (new_size > buffer->capacity) {
  ------------------
  |  Branch (3281:9): [True: 41.6k, False: 2.39M]
  ------------------
 3282|  41.6k|        janet_buffer_can_realloc(buffer);
 3283|  41.6k|        int32_t new_capacity = (new_size > (INT32_MAX / 2)) ? INT32_MAX : (new_size * 2);
  ------------------
  |  Branch (3283:32): [True: 0, False: 41.6k]
  ------------------
 3284|  41.6k|        uint8_t *new_data = janet_realloc(buffer->data, new_capacity * sizeof(uint8_t));
  ------------------
  |  | 2409|  41.6k|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
 3285|  41.6k|        janet_gcpressure(new_capacity - buffer->capacity);
 3286|  41.6k|        if (NULL == new_data) {
  ------------------
  |  Branch (3286:13): [True: 0, False: 41.6k]
  ------------------
 3287|      0|            JANET_OUT_OF_MEMORY;
  ------------------
  |  |  419|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (419:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3288|      0|        }
 3289|  41.6k|        buffer->data = new_data;
 3290|  41.6k|        buffer->capacity = new_capacity;
 3291|  41.6k|    }
 3292|  2.43M|}
janet_buffer_push_cstring:
 3295|  28.5k|void janet_buffer_push_cstring(JanetBuffer *buffer, const char *cstring) {
 3296|  28.5k|    int32_t len = (int32_t) strlen(cstring);
 3297|  28.5k|    janet_buffer_push_bytes(buffer, (const uint8_t *) cstring, len);
 3298|  28.5k|}
janet_buffer_push_bytes:
 3301|   224k|void janet_buffer_push_bytes(JanetBuffer *buffer, const uint8_t *string, int32_t length) {
 3302|   224k|    if (0 == length) return;
  ------------------
  |  Branch (3302:9): [True: 7.25k, False: 217k]
  ------------------
 3303|   217k|    janet_buffer_extra(buffer, length);
 3304|   217k|    memcpy(buffer->data + buffer->count, string, length);
 3305|   217k|    buffer->count += length;
 3306|   217k|}
janet_buffer_push_u8:
 3313|  2.21M|void janet_buffer_push_u8(JanetBuffer *buffer, uint8_t byte) {
 3314|  2.21M|    janet_buffer_extra(buffer, 1);
 3315|  2.21M|    buffer->data[buffer->count] = byte;
 3316|  2.21M|    buffer->count++;
 3317|  2.21M|}
janet_lib_buffer:
 3837|  6.20k|void janet_lib_buffer(JanetTable *env) {
 3838|  6.20k|    JanetRegExt buffer_cfuns[] = {
 3839|  6.20k|        JANET_CORE_REG("buffer/new", cfun_buffer_new),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3840|  6.20k|        JANET_CORE_REG("buffer/new-filled", cfun_buffer_new_filled),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3841|  6.20k|        JANET_CORE_REG("buffer/from-bytes", cfun_buffer_frombytes),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3842|  6.20k|        JANET_CORE_REG("buffer/fill", cfun_buffer_fill),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3843|  6.20k|        JANET_CORE_REG("buffer/trim", cfun_buffer_trim),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3844|  6.20k|        JANET_CORE_REG("buffer/push-byte", cfun_buffer_u8),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3845|  6.20k|        JANET_CORE_REG("buffer/push-word", cfun_buffer_word),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3846|  6.20k|        JANET_CORE_REG("buffer/push-string", cfun_buffer_chars),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3847|  6.20k|        JANET_CORE_REG("buffer/push-uint16", cfun_buffer_push_uint16),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3848|  6.20k|        JANET_CORE_REG("buffer/push-uint32", cfun_buffer_push_uint32),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3849|  6.20k|        JANET_CORE_REG("buffer/push-uint64", cfun_buffer_push_uint64),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3850|  6.20k|        JANET_CORE_REG("buffer/push-float32", cfun_buffer_push_float32),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3851|  6.20k|        JANET_CORE_REG("buffer/push-float64", cfun_buffer_push_float64),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3852|  6.20k|        JANET_CORE_REG("buffer/push", cfun_buffer_push),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3853|  6.20k|        JANET_CORE_REG("buffer/push-at", cfun_buffer_push_at),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3854|  6.20k|        JANET_CORE_REG("buffer/popn", cfun_buffer_popn),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3855|  6.20k|        JANET_CORE_REG("buffer/clear", cfun_buffer_clear),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3856|  6.20k|        JANET_CORE_REG("buffer/slice", cfun_buffer_slice),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3857|  6.20k|        JANET_CORE_REG("buffer/bit-set", cfun_buffer_bitset),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3858|  6.20k|        JANET_CORE_REG("buffer/bit-clear", cfun_buffer_bitclear),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3859|  6.20k|        JANET_CORE_REG("buffer/bit", cfun_buffer_bitget),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3860|  6.20k|        JANET_CORE_REG("buffer/bit-toggle", cfun_buffer_bittoggle),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3861|  6.20k|        JANET_CORE_REG("buffer/blit", cfun_buffer_blit),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3862|  6.20k|        JANET_CORE_REG("buffer/format", cfun_buffer_format),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3863|  6.20k|        JANET_CORE_REG("buffer/format-at", cfun_buffer_format_at),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3864|  6.20k|        JANET_REG_END
  ------------------
  |  | 2110|  6.20k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
 3865|  6.20k|    };
 3866|       |    janet_core_cfuns_ext(env, NULL, buffer_cfuns);
 3867|  6.20k|}
janet_verify:
 5644|  3.31M|int janet_verify(JanetFuncDef *def) {
 5645|  3.31M|    int vargs = !!(def->flags & JANET_FUNCDEF_FLAG_VARARG);
  ------------------
  |  | 1097|  3.31M|#define JANET_FUNCDEF_FLAG_VARARG 0x10000
  ------------------
 5646|  3.31M|    int32_t i;
 5647|  3.31M|    int32_t maxslot = def->arity + vargs;
 5648|  3.31M|    int32_t sc = def->slotcount;
 5649|       |
 5650|  3.31M|    if (def->environments_length > 256) return 15;
  ------------------
  |  Branch (5650:9): [True: 0, False: 3.31M]
  ------------------
 5651|  3.31M|    if (def->bytecode_length == 0) return 1;
  ------------------
  |  Branch (5651:9): [True: 0, False: 3.31M]
  ------------------
 5652|       |
 5653|  3.31M|    if (maxslot > sc) return 2;
  ------------------
  |  Branch (5653:9): [True: 0, False: 3.31M]
  ------------------
 5654|       |
 5655|       |    /* Verify each instruction */
 5656|  95.0M|    for (i = 0; i < def->bytecode_length; i++) {
  ------------------
  |  Branch (5656:17): [True: 91.7M, False: 3.31M]
  ------------------
 5657|  91.7M|        uint32_t instr = def->bytecode[i];
 5658|       |        /* Check for invalid instructions */
 5659|  91.7M|        if ((instr & 0x7F) >= JOP_INSTRUCTION_COUNT) {
  ------------------
  |  Branch (5659:13): [True: 0, False: 91.7M]
  ------------------
 5660|      0|            return 3;
 5661|      0|        }
 5662|  91.7M|        enum JanetInstructionType type = janet_instructions[instr & 0x7F];
 5663|  91.7M|        switch (type) {
  ------------------
  |  Branch (5663:17): [True: 91.7M, False: 0]
  ------------------
 5664|   477k|            case JINT_0:
  ------------------
  |  Branch (5664:13): [True: 477k, False: 91.2M]
  ------------------
 5665|   477k|                continue;
 5666|  17.6M|            case JINT_S: {
  ------------------
  |  Branch (5666:13): [True: 17.6M, False: 74.1M]
  ------------------
 5667|  17.6M|                if ((int32_t)(instr >> 8) >= sc) return 4;
  ------------------
  |  Branch (5667:21): [True: 0, False: 17.6M]
  ------------------
 5668|  17.6M|                continue;
 5669|  17.6M|            }
 5670|  17.6M|            case JINT_SI:
  ------------------
  |  Branch (5670:13): [True: 2.10M, False: 89.6M]
  ------------------
 5671|  2.10M|            case JINT_SU:
  ------------------
  |  Branch (5671:13): [True: 0, False: 91.7M]
  ------------------
 5672|  2.10M|            case JINT_ST: {
  ------------------
  |  Branch (5672:13): [True: 0, False: 91.7M]
  ------------------
 5673|  2.10M|                if ((int32_t)((instr >> 8) & 0xFF) >= sc) return 4;
  ------------------
  |  Branch (5673:21): [True: 0, False: 2.10M]
  ------------------
 5674|  2.10M|                continue;
 5675|  2.10M|            }
 5676|  3.86M|            case JINT_L: {
  ------------------
  |  Branch (5676:13): [True: 3.86M, False: 87.8M]
  ------------------
 5677|  3.86M|                int32_t jumpdest = i + (((int32_t)instr) >> 8);
 5678|  3.86M|                if (jumpdest < 0 || jumpdest >= def->bytecode_length) return 5;
  ------------------
  |  Branch (5678:21): [True: 0, False: 3.86M]
  |  Branch (5678:37): [True: 0, False: 3.86M]
  ------------------
 5679|  3.86M|                continue;
 5680|  3.86M|            }
 5681|  24.5M|            case JINT_SS: {
  ------------------
  |  Branch (5681:13): [True: 24.5M, False: 67.1M]
  ------------------
 5682|  24.5M|                if ((int32_t)((instr >> 8) & 0xFF) >= sc ||
  ------------------
  |  Branch (5682:21): [True: 0, False: 24.5M]
  ------------------
 5683|  24.5M|                        (int32_t)(instr >> 16) >= sc) return 4;
  ------------------
  |  Branch (5683:25): [True: 0, False: 24.5M]
  ------------------
 5684|  24.5M|                continue;
 5685|  24.5M|            }
 5686|  24.5M|            case JINT_SSI:
  ------------------
  |  Branch (5686:13): [True: 1.61M, False: 90.1M]
  ------------------
 5687|  2.58M|            case JINT_SSU: {
  ------------------
  |  Branch (5687:13): [True: 961k, False: 90.7M]
  ------------------
 5688|  2.58M|                if ((int32_t)((instr >> 8) & 0xFF) >= sc ||
  ------------------
  |  Branch (5688:21): [True: 0, False: 2.58M]
  ------------------
 5689|  2.58M|                        (int32_t)((instr >> 16) & 0xFF) >= sc) return 4;
  ------------------
  |  Branch (5689:25): [True: 0, False: 2.58M]
  ------------------
 5690|  2.58M|                continue;
 5691|  2.58M|            }
 5692|  6.70M|            case JINT_SL: {
  ------------------
  |  Branch (5692:13): [True: 6.70M, False: 85.0M]
  ------------------
 5693|  6.70M|                int32_t jumpdest = i + (((int32_t)instr) >> 16);
 5694|  6.70M|                if ((int32_t)((instr >> 8) & 0xFF) >= sc) return 4;
  ------------------
  |  Branch (5694:21): [True: 0, False: 6.70M]
  ------------------
 5695|  6.70M|                if (jumpdest < 0 || jumpdest >= def->bytecode_length) return 5;
  ------------------
  |  Branch (5695:21): [True: 0, False: 6.70M]
  |  Branch (5695:37): [True: 0, False: 6.70M]
  ------------------
 5696|  6.70M|                continue;
 5697|  6.70M|            }
 5698|  12.3M|            case JINT_SSS: {
  ------------------
  |  Branch (5698:13): [True: 12.3M, False: 79.3M]
  ------------------
 5699|  12.3M|                if (((int32_t)(instr >> 8) & 0xFF) >= sc ||
  ------------------
  |  Branch (5699:21): [True: 0, False: 12.3M]
  ------------------
 5700|  12.3M|                        ((int32_t)(instr >> 16) & 0xFF) >= sc ||
  ------------------
  |  Branch (5700:25): [True: 0, False: 12.3M]
  ------------------
 5701|  12.3M|                        ((int32_t)(instr >> 24) & 0xFF) >= sc) return 4;
  ------------------
  |  Branch (5701:25): [True: 0, False: 12.3M]
  ------------------
 5702|  12.3M|                continue;
 5703|  12.3M|            }
 5704|  12.3M|            case JINT_SD: {
  ------------------
  |  Branch (5704:13): [True: 967k, False: 90.7M]
  ------------------
 5705|   967k|                if ((int32_t)((instr >> 8) & 0xFF) >= sc) return 4;
  ------------------
  |  Branch (5705:21): [True: 0, False: 967k]
  ------------------
 5706|   967k|                if ((int32_t)(instr >> 16) >= def->defs_length) return 6;
  ------------------
  |  Branch (5706:21): [True: 0, False: 967k]
  ------------------
 5707|   967k|                continue;
 5708|   967k|            }
 5709|  16.7M|            case JINT_SC: {
  ------------------
  |  Branch (5709:13): [True: 16.7M, False: 74.9M]
  ------------------
 5710|  16.7M|                if ((int32_t)((instr >> 8) & 0xFF) >= sc) return 4;
  ------------------
  |  Branch (5710:21): [True: 0, False: 16.7M]
  ------------------
 5711|  16.7M|                if ((int32_t)(instr >> 16) >= def->constants_length) return 7;
  ------------------
  |  Branch (5711:21): [True: 0, False: 16.7M]
  ------------------
 5712|  16.7M|                continue;
 5713|  16.7M|            }
 5714|  16.7M|            case JINT_SES: {
  ------------------
  |  Branch (5714:13): [True: 3.78M, False: 87.9M]
  ------------------
 5715|       |                /* How can we check the last slot index? We need info parent funcdefs. Resort
 5716|       |                 * to runtime checks for now. Maybe invalid upvalue references could be defaulted
 5717|       |                 * to nil? (don't commit to this in the long term, though) */
 5718|  3.78M|                if ((int32_t)((instr >> 8) & 0xFF) >= sc) return 4;
  ------------------
  |  Branch (5718:21): [True: 0, False: 3.78M]
  ------------------
 5719|  3.78M|                if ((int32_t)((instr >> 16) & 0xFF) >= def->environments_length) return 8;
  ------------------
  |  Branch (5719:21): [True: 0, False: 3.78M]
  ------------------
 5720|  3.78M|                continue;
 5721|  3.78M|            }
 5722|  91.7M|        }
 5723|  91.7M|    }
 5724|       |
 5725|       |    /* Verify last instruction is either a jump, return, return-nil, or tailcall. Eventually,
 5726|       |     * some real flow analysis would be ideal, but this should be very effective. Will completely
 5727|       |     * prevent running over the end of bytecode. However, valid functions with dead code will
 5728|       |     * be rejected. */
 5729|  3.31M|    {
 5730|  3.31M|        uint32_t lastop = def->bytecode[def->bytecode_length - 1] & 0xFF;
 5731|  3.31M|        switch (lastop) {
 5732|      0|            default:
  ------------------
  |  Branch (5732:13): [True: 0, False: 3.31M]
  ------------------
 5733|      0|                return 9;
 5734|  1.95M|            case JOP_RETURN:
  ------------------
  |  Branch (5734:13): [True: 1.95M, False: 1.36M]
  ------------------
 5735|  2.20M|            case JOP_RETURN_NIL:
  ------------------
  |  Branch (5735:13): [True: 254k, False: 3.06M]
  ------------------
 5736|  2.21M|            case JOP_JUMP:
  ------------------
  |  Branch (5736:13): [True: 6.20k, False: 3.31M]
  ------------------
 5737|  2.25M|            case JOP_ERROR:
  ------------------
  |  Branch (5737:13): [True: 43.4k, False: 3.27M]
  ------------------
 5738|  3.31M|            case JOP_TAILCALL:
  ------------------
  |  Branch (5738:13): [True: 1.06M, False: 2.25M]
  ------------------
 5739|  3.31M|                break;
 5740|  3.31M|        }
 5741|  3.31M|    }
 5742|       |
 5743|       |    /* Verify debug info - slotmapping, etc. */
 5744|  34.8M|    for (int32_t i = def->symbolmap_length - 1; i >= 0; i--) {
  ------------------
  |  Branch (5744:49): [True: 31.5M, False: 3.31M]
  ------------------
 5745|  31.5M|        JanetSymbolMap jsm = def->symbolmap[i];
 5746|  31.5M|        if (jsm.birth_pc == UINT32_MAX) {
  ------------------
  |  Branch (5746:13): [True: 16.2M, False: 15.2M]
  ------------------
 5747|  16.2M|            if (jsm.death_pc >= (uint32_t) def->environments_length) {
  ------------------
  |  Branch (5747:17): [True: 0, False: 16.2M]
  ------------------
 5748|      0|                return 10;
 5749|       |                /* We should also check jsm.slot_index */
 5750|      0|            }
 5751|  16.2M|        } else {
 5752|  15.2M|            if (jsm.slot_index >= (uint32_t) def->slotcount) {
  ------------------
  |  Branch (5752:17): [True: 0, False: 15.2M]
  ------------------
 5753|      0|                return 11;
 5754|      0|            }
 5755|  15.2M|            if (jsm.birth_pc != UINT32_MAX && jsm.birth_pc >= (uint32_t) def->bytecode_length) {
  ------------------
  |  Branch (5755:17): [True: 15.2M, False: 0]
  |  Branch (5755:47): [True: 0, False: 15.2M]
  ------------------
 5756|      0|                return 12;
 5757|      0|            }
 5758|  15.2M|            if (jsm.death_pc != UINT32_MAX && jsm.death_pc > (uint32_t) def->bytecode_length) {
  ------------------
  |  Branch (5758:17): [True: 15.2M, False: 0]
  |  Branch (5758:47): [True: 0, False: 15.2M]
  ------------------
 5759|      0|                return 13;
 5760|      0|            }
 5761|  15.2M|        }
 5762|  31.5M|        if (jsm.symbol == NULL) {
  ------------------
  |  Branch (5762:13): [True: 0, False: 31.5M]
  ------------------
 5763|      0|            return 14;
 5764|      0|        }
 5765|  31.5M|    }
 5766|       |
 5767|  3.31M|    return 0;
 5768|  3.31M|}
janet_signalv:
 5878|  2.69k|void janet_signalv(JanetSignal sig, Janet message) {
 5879|  2.69k|    if (janet_vm.return_reg != NULL) {
  ------------------
  |  Branch (5879:9): [True: 2.69k, False: 0]
  ------------------
 5880|       |        /* Should match logic in janet_call for coercing everything not ok to an error (no awaits, yields, etc.) */
 5881|  2.69k|        if (janet_vm.coerce_error && sig != JANET_SIGNAL_OK) {
  ------------------
  |  Branch (5881:13): [True: 0, False: 2.69k]
  |  Branch (5881:38): [True: 0, False: 0]
  ------------------
 5882|      0|#ifdef JANET_EV
 5883|      0|            if (NULL != janet_vm.root_fiber && sig == JANET_SIGNAL_EVENT) {
  ------------------
  |  Branch (5883:17): [True: 0, False: 0]
  |  Branch (5883:48): [True: 0, False: 0]
  ------------------
 5884|      0|                janet_vm.root_fiber->sched_id++;
 5885|      0|            }
 5886|      0|#endif
 5887|      0|            if (sig != JANET_SIGNAL_ERROR) {
  ------------------
  |  Branch (5887:17): [True: 0, False: 0]
  ------------------
 5888|      0|                message = janet_wrap_string(janet_formatc("%v coerced from %s to error", message, janet_signal_names[sig]));
  ------------------
  |  |  848|      0|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|      0|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5889|      0|            }
 5890|      0|            sig = JANET_SIGNAL_ERROR;
 5891|      0|        }
 5892|  2.69k|        *janet_vm.return_reg = message;
 5893|  2.69k|        if (NULL != janet_vm.fiber) {
  ------------------
  |  Branch (5893:13): [True: 0, False: 2.69k]
  ------------------
 5894|      0|            janet_vm.fiber->flags |= JANET_FIBER_DID_LONGJUMP;
  ------------------
  |  |  837|      0|#define JANET_FIBER_DID_LONGJUMP     0x8000000
  ------------------
 5895|      0|        }
 5896|       |#if defined(JANET_BSD) || defined(JANET_APPLE)
 5897|       |        _longjmp(*janet_vm.signal_buf, sig);
 5898|       |#else
 5899|  2.69k|        longjmp(*janet_vm.signal_buf, sig);
 5900|  2.69k|#endif
 5901|  2.69k|    } else {
 5902|      0|        const char *str = (const char *)janet_formatc("janet top level signal - %v\n", message);
 5903|      0|        janet_top_level_signal(str);
 5904|      0|    }
 5905|  2.69k|}
janet_panicv:
 5907|  2.69k|void janet_panicv(Janet message) {
 5908|  2.69k|    janet_signalv(JANET_SIGNAL_ERROR, message);
 5909|  2.69k|}
janet_panicf:
 5911|  2.69k|void janet_panicf(const char *format, ...) {
 5912|  2.69k|    va_list args;
 5913|  2.69k|    const uint8_t *ret;
 5914|  2.69k|    JanetBuffer buffer;
 5915|  2.69k|    int32_t len = 0;
 5916|  64.8k|    while (format[len]) len++;
  ------------------
  |  Branch (5916:12): [True: 62.1k, False: 2.69k]
  ------------------
 5917|  2.69k|    janet_buffer_init(&buffer, len);
 5918|  2.69k|    va_start(args, format);
 5919|  2.69k|    janet_formatbv(&buffer, format, args);
 5920|       |    va_end(args);
 5921|  2.69k|    ret = janet_string(buffer.data, buffer.count);
 5922|  2.69k|    janet_buffer_deinit(&buffer);
 5923|  2.69k|    janet_panics(ret);
 5924|  2.69k|}
janet_panics:
 5930|  2.69k|void janet_panics(const uint8_t *message) {
 5931|  2.69k|    janet_panicv(janet_wrap_string(message));
  ------------------
  |  |  848|  2.69k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|  2.69k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.69k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.69k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5932|  2.69k|}
janet_arity:
 5947|  4.04k|void janet_arity(int32_t arity, int32_t min, int32_t max) {
 5948|  4.04k|    if (min >= 0 && arity < min)
  ------------------
  |  Branch (5948:9): [True: 4.04k, False: 0]
  |  Branch (5948:21): [True: 0, False: 4.04k]
  ------------------
 5949|      0|        janet_panicf("arity mismatch, expected at least %d, got %d", min, arity);
 5950|  4.04k|    if (max >= 0 && arity > max)
  ------------------
  |  Branch (5950:9): [True: 0, False: 4.04k]
  |  Branch (5950:21): [True: 0, False: 0]
  ------------------
 5951|      0|        janet_panicf("arity mismatch, expected at most %d, got %d", max, arity);
 5952|  4.04k|}
janet_getbytes:
 6246|  1.35k|JanetByteView janet_getbytes(const Janet *argv, int32_t n) {
 6247|  1.35k|    Janet x = argv[n];
 6248|  1.35k|    JanetByteView view;
 6249|  1.35k|    if (!janet_bytes_view(x, &view.bytes, &view.len)) {
  ------------------
  |  Branch (6249:9): [True: 0, False: 1.35k]
  ------------------
 6250|      0|        janet_panic_type(x, n, JANET_TFLAG_BYTES);
  ------------------
  |  |  612|      0|#define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  ------------------
  |  |  |  |  599|      0|#define JANET_TFLAG_STRING (1 << JANET_STRING)
  |  |  ------------------
  |  |               #define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  ------------------
  |  |  |  |  600|      0|#define JANET_TFLAG_SYMBOL (1 << JANET_SYMBOL)
  |  |  ------------------
  |  |               #define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  ------------------
  |  |  |  |  606|      0|#define JANET_TFLAG_BUFFER (1 << JANET_BUFFER)
  |  |  ------------------
  |  |               #define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  ------------------
  |  |  |  |  601|      0|#define JANET_TFLAG_KEYWORD (1 << JANET_KEYWORD)
  |  |  ------------------
  ------------------
 6251|      0|    }
 6252|  1.35k|    return view;
 6253|  1.35k|}
janet_dyn:
 6287|   153k|Janet janet_dyn(const char *name) {
 6288|   153k|    if (!janet_vm.fiber) {
  ------------------
  |  Branch (6288:9): [True: 153k, False: 0]
  ------------------
 6289|   153k|        if (!janet_vm.top_dyns) return janet_wrap_nil();
  ------------------
  |  |  831|   153k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   153k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   153k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   153k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (6289:13): [True: 153k, False: 0]
  ------------------
 6290|      0|        return janet_table_get(janet_vm.top_dyns, janet_ckeywordv(name));
  ------------------
  |  | 1843|      0|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|      0|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|      0|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6291|   153k|    }
 6292|      0|    if (janet_vm.fiber->env) {
  ------------------
  |  Branch (6292:9): [True: 0, False: 0]
  ------------------
 6293|      0|        return janet_table_get_keyword(janet_vm.fiber->env, name);
 6294|      0|    } else {
 6295|      0|        return janet_wrap_nil();
  ------------------
  |  |  831|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6296|      0|    }
 6297|      0|}
janet_lib_compile:
 8256|  6.20k|void janet_lib_compile(JanetTable *env) {
 8257|  6.20k|    JanetRegExt cfuns[] = {
 8258|  6.20k|        JANET_CORE_REG("compile", cfun_compile),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 8259|  6.20k|        JANET_REG_END
  ------------------
  |  | 2110|  6.20k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
 8260|  6.20k|    };
 8261|       |    janet_core_cfuns_ext(env, NULL, cfuns);
 8262|  6.20k|}
janet_core_env:
 9667|  6.20k|JanetTable *janet_core_env(JanetTable *replacements) {
 9668|       |    /* Memoize core env, ignoring replacements the second time around. */
 9669|  6.20k|    if (NULL != janet_vm.core_env) {
  ------------------
  |  Branch (9669:9): [True: 0, False: 6.20k]
  ------------------
 9670|      0|        return janet_vm.core_env;
 9671|      0|    }
 9672|       |
 9673|  6.20k|    JanetTable *dict = janet_core_lookup_table(replacements);
 9674|       |
 9675|       |    /* Unmarshal bytecode */
 9676|  6.20k|    Janet marsh_out = janet_unmarshal(
 9677|  6.20k|                          janet_core_image,
 9678|  6.20k|                          janet_core_image_size,
 9679|  6.20k|                          0,
 9680|  6.20k|                          dict,
 9681|  6.20k|                          NULL);
 9682|       |
 9683|       |    /* Memoize */
 9684|  6.20k|    janet_gcroot(marsh_out);
 9685|  6.20k|    JanetTable *env = janet_unwrap_table(marsh_out);
  ------------------
  |  |  861|  6.20k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
 9686|  6.20k|    janet_vm.core_env = env;
 9687|       |
 9688|       |    /* Invert image dict manually here. We can't do this in boot.janet as it
 9689|       |     * breaks deterministic builds */
 9690|  6.20k|    Janet lidv, midv;
 9691|  6.20k|    lidv = midv = janet_wrap_nil();
  ------------------
  |  |  831|  6.20k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  6.20k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  6.20k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  6.20k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 9692|  6.20k|    janet_resolve(env, janet_csymbol("load-image-dict"), &lidv);
 9693|  6.20k|    janet_resolve(env, janet_csymbol("make-image-dict"), &midv);
 9694|       |
 9695|       |    /* Check that we actually got tables - if we are using a smaller corelib, may not exist */
 9696|  6.20k|    if (janet_checktype(lidv, JANET_TABLE) && janet_checktype(midv, JANET_TABLE)) {
  ------------------
  |  |  806|  12.4k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 6.20k, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 6.20k]
  |  |  ------------------
  |  |  807|  12.4k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  12.4k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  6.20k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  6.20k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  6.20k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  6.20k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  if (janet_checktype(lidv, JANET_TABLE) && janet_checktype(midv, JANET_TABLE)) {
  ------------------
  |  |  806|  6.20k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 6.20k, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 6.20k]
  |  |  ------------------
  |  |  807|  6.20k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  6.20k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  6.20k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  6.20k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  6.20k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  6.20k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 9697|  6.20k|        JanetTable *lid = janet_unwrap_table(lidv);
  ------------------
  |  |  861|  6.20k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
 9698|  6.20k|        JanetTable *mid = janet_unwrap_table(midv);
  ------------------
  |  |  861|  6.20k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
 9699|  12.7M|        for (int32_t i = 0; i < lid->capacity; i++) {
  ------------------
  |  Branch (9699:29): [True: 12.7M, False: 6.20k]
  ------------------
 9700|  12.7M|            const JanetKV *kv = lid->data + i;
 9701|  12.7M|            if (!janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|  12.7M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 12.7M]
  |  |  ------------------
  |  |  807|  12.7M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  12.7M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  12.7M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  12.7M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  12.7M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  12.7M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (9701:17): [True: 4.08M, False: 8.61M]
  ------------------
 9702|  4.08M|                janet_table_put(mid, kv->value, kv->key);
 9703|  4.08M|            }
 9704|  12.7M|        }
 9705|  6.20k|    }
 9706|       |
 9707|  6.20k|    return env;
 9708|  6.20k|}
janet_core_lookup_table:
 9712|  6.20k|JanetTable *janet_core_lookup_table(JanetTable *replacements) {
 9713|  6.20k|    JanetTable *dict = janet_table(512);
 9714|  6.20k|    janet_load_libs(dict);
 9715|       |
 9716|       |    /* Add replacements */
 9717|  6.20k|    if (replacements != NULL) {
  ------------------
  |  Branch (9717:9): [True: 0, False: 6.20k]
  ------------------
 9718|      0|        for (int32_t i = 0; i < replacements->capacity; i++) {
  ------------------
  |  Branch (9718:29): [True: 0, False: 0]
  ------------------
 9719|      0|            JanetKV kv = replacements->data[i];
 9720|      0|            if (!janet_checktype(kv.key, JANET_NIL)) {
  ------------------
  |  |  806|      0|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 0]
  |  |  ------------------
  |  |  807|      0|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (9720:17): [True: 0, False: 0]
  ------------------
 9721|      0|                janet_table_put(dict, kv.key, kv.value);
 9722|       |                /* Add replacement functions to registry? */
 9723|      0|            }
 9724|      0|        }
 9725|      0|    }
 9726|       |
 9727|  6.20k|    return dict;
 9728|  6.20k|}
janet_lib_debug:
10180|  6.20k|void janet_lib_debug(JanetTable *env) {
10181|  6.20k|    JanetRegExt debug_cfuns[] = {
10182|  6.20k|        JANET_CORE_REG("debug/break", cfun_debug_break),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
10183|  6.20k|        JANET_CORE_REG("debug/unbreak", cfun_debug_unbreak),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
10184|  6.20k|        JANET_CORE_REG("debug/fbreak", cfun_debug_fbreak),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
10185|  6.20k|        JANET_CORE_REG("debug/unfbreak", cfun_debug_unfbreak),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
10186|  6.20k|        JANET_CORE_REG("debug/arg-stack", cfun_debug_argstack),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
10187|  6.20k|        JANET_CORE_REG("debug/stack", cfun_debug_stack),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
10188|  6.20k|        JANET_CORE_REG("debug/stacktrace", cfun_debug_stacktrace),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
10189|  6.20k|        JANET_CORE_REG("debug/lineage", cfun_debug_lineage),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
10190|  6.20k|        JANET_CORE_REG("debug/step", cfun_debug_step),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
10191|  6.20k|        JANET_REG_END
  ------------------
  |  | 2110|  6.20k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
10192|  6.20k|    };
10193|       |    janet_core_cfuns_ext(env, NULL, debug_cfuns);
10194|  6.20k|}
janet_ev_init_common:
11153|  6.20k|void janet_ev_init_common(void) {
11154|  6.20k|    janet_q_init(&janet_vm.spawn);
11155|  6.20k|    janet_vm.tq = NULL;
11156|  6.20k|    janet_vm.tq_count = 0;
11157|  6.20k|    janet_vm.tq_capacity = 0;
11158|  6.20k|    janet_table_init_raw(&janet_vm.threaded_abstracts, 0);
11159|  6.20k|    janet_table_init_raw(&janet_vm.active_tasks, 0);
11160|  6.20k|    janet_table_init_raw(&janet_vm.signal_handlers, 0);
11161|  6.20k|    janet_rng_seed(&janet_vm.ev_rng, 0);
11162|  6.20k|#ifndef JANET_WINDOWS
11163|  6.20k|    pthread_attr_init(&janet_vm.new_thread_attr);
11164|       |    pthread_attr_setdetachstate(&janet_vm.new_thread_attr, PTHREAD_CREATE_DETACHED);
11165|  6.20k|#endif
11166|  6.20k|}
janet_ev_deinit_common:
11199|  6.20k|void janet_ev_deinit_common(void) {
11200|  6.20k|    JanetTimeout to;
11201|  6.20k|    while (peek_timeout(&to)) {
  ------------------
  |  Branch (11201:12): [True: 0, False: 6.20k]
  ------------------
11202|      0|        handle_timeout_worker(to, 1);
11203|      0|        pop_timeout(0);
11204|      0|    }
11205|  6.20k|    janet_q_deinit(&janet_vm.spawn);
11206|  6.20k|    janet_free(janet_vm.tq);
  ------------------
  |  | 2415|  6.20k|#define janet_free(X) free((X))
  ------------------
11207|  6.20k|    janet_table_deinit(&janet_vm.threaded_abstracts);
11208|  6.20k|    janet_table_deinit(&janet_vm.active_tasks);
11209|  6.20k|    janet_table_deinit(&janet_vm.signal_handlers);
11210|  6.20k|#ifndef JANET_WINDOWS
11211|  6.20k|    pthread_attr_destroy(&janet_vm.new_thread_attr);
11212|  6.20k|#endif
11213|  6.20k|}
janet_ev_init:
12490|  6.20k|void janet_ev_init(void) {
12491|  6.20k|    janet_ev_init_common();
12492|  6.20k|    janet_ev_setup_selfpipe();
12493|  6.20k|    janet_vm.epoll = epoll_create1(EPOLL_CLOEXEC);
12494|  6.20k|    janet_vm.timerfd = timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC | TFD_NONBLOCK);
12495|  6.20k|    janet_vm.timer_enabled = 0;
12496|  6.20k|    if (janet_vm.epoll == -1 || janet_vm.timerfd == -1) goto error;
  ------------------
  |  Branch (12496:9): [True: 0, False: 6.20k]
  |  Branch (12496:33): [True: 0, False: 6.20k]
  ------------------
12497|  6.20k|    struct epoll_event ev;
12498|  6.20k|    ev.events = EPOLLIN | EPOLLET;
12499|  6.20k|    ev.data.ptr = &janet_vm.timerfd;
12500|  6.20k|    if (-1 == epoll_ctl(janet_vm.epoll, EPOLL_CTL_ADD, janet_vm.timerfd, &ev)) goto error;
  ------------------
  |  Branch (12500:9): [True: 0, False: 6.20k]
  ------------------
12501|  6.20k|    ev.events = EPOLLIN | EPOLLET;
12502|  6.20k|    ev.data.ptr = janet_vm.selfpipe;
12503|  6.20k|    if (-1 == epoll_ctl(janet_vm.epoll, EPOLL_CTL_ADD, janet_vm.selfpipe[0], &ev)) goto error;
  ------------------
  |  Branch (12503:9): [True: 0, False: 6.20k]
  ------------------
12504|  6.20k|    return;
12505|  6.20k|error:
12506|       |    JANET_EXIT("failed to initialize event loop");
  ------------------
  |  |  378|      0|#define JANET_EXIT(m) do { \
  |  |  379|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  380|      0|        __FILE__,\
  |  |  381|      0|        __LINE__,\
  |  |  382|      0|        (m));\
  |  |  383|      0|    abort();\
  |  |  384|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (384:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
12507|      0|}
janet_ev_deinit:
12509|  6.20k|void janet_ev_deinit(void) {
12510|  6.20k|    janet_ev_deinit_common();
12511|  6.20k|    close(janet_vm.epoll);
12512|  6.20k|    close(janet_vm.timerfd);
12513|  6.20k|    janet_ev_cleanup_selfpipe();
12514|  6.20k|    janet_vm.epoll = 0;
12515|  6.20k|}
janet_make_pipe:
13612|  6.20k|int janet_make_pipe(JanetHandle handles[2], int mode) {
13613|       |#ifdef JANET_WINDOWS
13614|       |    /*
13615|       |     * On windows, the built in CreatePipe function doesn't support overlapped IO
13616|       |     * so we lift from the windows source code and modify for our own version.
13617|       |     */
13618|       |    JanetHandle shandle, chandle;
13619|       |    CHAR PipeNameBuffer[MAX_PATH];
13620|       |    SECURITY_ATTRIBUTES saAttr;
13621|       |    memset(&saAttr, 0, sizeof(saAttr));
13622|       |    saAttr.nLength = sizeof(saAttr);
13623|       |    saAttr.bInheritHandle = TRUE;
13624|       |    if (mode == 3) {
13625|       |        /* No overlapped IO involved, just call CreatePipe */
13626|       |        if (!CreatePipe(handles, handles + 1, &saAttr, 0)) return -1;
13627|       |        return 0;
13628|       |    }
13629|       |    snprintf(PipeNameBuffer,
13630|       |             sizeof(PipeNameBuffer),
13631|       |             "\\\\.\\Pipe\\JanetPipeFile.%08x.%08x",
13632|       |             (unsigned int) GetCurrentProcessId(),
13633|       |             (unsigned int) InterlockedIncrement(&PipeSerialNumber));
13634|       |
13635|       |    /* server handle goes to subprocess */
13636|       |    shandle = CreateNamedPipeA(
13637|       |                  PipeNameBuffer,
13638|       |                  (mode == 2 ? PIPE_ACCESS_INBOUND : PIPE_ACCESS_OUTBOUND) | FILE_FLAG_OVERLAPPED,
13639|       |                  PIPE_TYPE_BYTE | PIPE_WAIT,
13640|       |                  255,           /* Max number of pipes for duplication. */
13641|       |                  4096,          /* Out buffer size */
13642|       |                  4096,          /* In buffer size */
13643|       |                  120 * 1000,    /* Timeout in ms */
13644|       |                  &saAttr);
13645|       |    if (shandle == INVALID_HANDLE_VALUE) {
13646|       |        return -1;
13647|       |    }
13648|       |
13649|       |    /* we keep client handle */
13650|       |    chandle = CreateFileA(
13651|       |                  PipeNameBuffer,
13652|       |                  (mode == 2 ? GENERIC_WRITE : GENERIC_READ),
13653|       |                  0,
13654|       |                  &saAttr,
13655|       |                  OPEN_EXISTING,
13656|       |                  FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED,
13657|       |                  NULL);
13658|       |
13659|       |    if (chandle == INVALID_HANDLE_VALUE) {
13660|       |        CloseHandle(shandle);
13661|       |        return -1;
13662|       |    }
13663|       |    if (mode == 2) {
13664|       |        handles[0] = shandle;
13665|       |        handles[1] = chandle;
13666|       |    } else {
13667|       |        handles[0] = chandle;
13668|       |        handles[1] = shandle;
13669|       |    }
13670|       |    return 0;
13671|       |#else
13672|  6.20k|    if (pipe(handles)) return -1;
  ------------------
  |  Branch (13672:9): [True: 0, False: 6.20k]
  ------------------
13673|  6.20k|    if (mode != 2 && fcntl(handles[0], F_SETFD, FD_CLOEXEC)) goto error;
  ------------------
  |  Branch (13673:9): [True: 6.20k, False: 0]
  |  Branch (13673:22): [True: 0, False: 6.20k]
  ------------------
13674|  6.20k|    if (mode != 1 && fcntl(handles[1], F_SETFD, FD_CLOEXEC)) goto error;
  ------------------
  |  Branch (13674:9): [True: 0, False: 6.20k]
  |  Branch (13674:22): [True: 0, False: 0]
  ------------------
13675|  6.20k|    if (mode != 2 && mode != 3 && fcntl(handles[0], F_SETFL, O_NONBLOCK)) goto error;
  ------------------
  |  Branch (13675:9): [True: 6.20k, False: 0]
  |  Branch (13675:22): [True: 6.20k, False: 0]
  |  Branch (13675:35): [True: 0, False: 6.20k]
  ------------------
13676|  6.20k|    if (mode != 1 && mode != 3 && fcntl(handles[1], F_SETFL, O_NONBLOCK)) goto error;
  ------------------
  |  Branch (13676:9): [True: 0, False: 6.20k]
  |  Branch (13676:22): [True: 0, False: 0]
  |  Branch (13676:35): [True: 0, False: 0]
  ------------------
13677|  6.20k|    return 0;
13678|      0|error:
13679|      0|    close(handles[0]);
13680|      0|    close(handles[1]);
13681|      0|    return -1;
13682|  6.20k|#endif
13683|  6.20k|}
janet_lib_ev:
14268|  6.20k|void janet_lib_ev(JanetTable *env) {
14269|  6.20k|    JanetRegExt ev_cfuns_ext[] = {
14270|  6.20k|        JANET_CORE_REG("ev/give", cfun_channel_push),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14271|  6.20k|        JANET_CORE_REG("ev/take", cfun_channel_pop),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14272|  6.20k|        JANET_CORE_REG("ev/full", cfun_channel_full),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14273|  6.20k|        JANET_CORE_REG("ev/capacity", cfun_channel_capacity),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14274|  6.20k|        JANET_CORE_REG("ev/count", cfun_channel_count),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14275|  6.20k|        JANET_CORE_REG("ev/select", cfun_channel_choice),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14276|  6.20k|        JANET_CORE_REG("ev/rselect", cfun_channel_rchoice),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14277|  6.20k|        JANET_CORE_REG("ev/chan", cfun_channel_new),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14278|  6.20k|        JANET_CORE_REG("ev/thread-chan", cfun_channel_new_threaded),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14279|  6.20k|        JANET_CORE_REG("ev/chan-close", cfun_channel_close),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14280|  6.20k|        JANET_CORE_REG("ev/go", cfun_ev_go),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14281|  6.20k|        JANET_CORE_REG("ev/thread", cfun_ev_thread),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14282|  6.20k|        JANET_CORE_REG("ev/give-supervisor", cfun_ev_give_supervisor),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14283|  6.20k|        JANET_CORE_REG("ev/sleep", cfun_ev_sleep),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14284|  6.20k|        JANET_CORE_REG("ev/deadline", cfun_ev_deadline),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14285|  6.20k|        JANET_CORE_REG("ev/cancel", cfun_ev_cancel),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14286|  6.20k|        JANET_CORE_REG("ev/close", janet_cfun_stream_close),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14287|  6.20k|        JANET_CORE_REG("ev/read", janet_cfun_stream_read),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14288|  6.20k|        JANET_CORE_REG("ev/chunk", janet_cfun_stream_chunk),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14289|  6.20k|        JANET_CORE_REG("ev/write", janet_cfun_stream_write),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14290|  6.20k|        JANET_CORE_REG("ev/lock", janet_cfun_mutex),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14291|  6.20k|        JANET_CORE_REG("ev/acquire-lock", janet_cfun_mutex_acquire),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14292|  6.20k|        JANET_CORE_REG("ev/release-lock", janet_cfun_mutex_release),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14293|  6.20k|        JANET_CORE_REG("ev/rwlock", janet_cfun_rwlock),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14294|  6.20k|        JANET_CORE_REG("ev/acquire-rlock", janet_cfun_rwlock_read_lock),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14295|  6.20k|        JANET_CORE_REG("ev/acquire-wlock", janet_cfun_rwlock_write_lock),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14296|  6.20k|        JANET_CORE_REG("ev/release-rlock", janet_cfun_rwlock_read_release),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14297|  6.20k|        JANET_CORE_REG("ev/release-wlock", janet_cfun_rwlock_write_release),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14298|  6.20k|        JANET_CORE_REG("ev/to-file", janet_cfun_to_file),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14299|  6.20k|        JANET_CORE_REG("ev/all-tasks", janet_cfun_ev_all_tasks),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14300|  6.20k|        JANET_REG_END
  ------------------
  |  | 2110|  6.20k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
14301|  6.20k|    };
14302|       |
14303|       |    janet_core_cfuns_ext(env, NULL, ev_cfuns_ext);
14304|  6.20k|    janet_register_abstract_type(&janet_stream_type);
14305|  6.20k|    janet_register_abstract_type(&janet_channel_type);
14306|  6.20k|    janet_register_abstract_type(&janet_mutex_type);
14307|  6.20k|    janet_register_abstract_type(&janet_rwlock_type);
14308|  6.20k|}
janet_lib_ffi:
16241|  6.20k|void janet_lib_ffi(JanetTable *env) {
16242|  6.20k|    JanetRegExt ffi_cfuns[] = {
16243|  6.20k|        JANET_CORE_REG("ffi/native", janet_core_raw_native),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16244|  6.20k|        JANET_CORE_REG("ffi/lookup", janet_core_native_lookup),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16245|  6.20k|        JANET_CORE_REG("ffi/close", janet_core_native_close),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16246|  6.20k|        JANET_CORE_REG("ffi/signature", cfun_ffi_signature),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16247|  6.20k|        JANET_CORE_REG("ffi/call", cfun_ffi_call),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16248|  6.20k|        JANET_CORE_REG("ffi/struct", cfun_ffi_struct),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16249|  6.20k|        JANET_CORE_REG("ffi/write", cfun_ffi_buffer_write),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16250|  6.20k|        JANET_CORE_REG("ffi/read", cfun_ffi_buffer_read),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16251|  6.20k|        JANET_CORE_REG("ffi/size", cfun_ffi_size),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16252|  6.20k|        JANET_CORE_REG("ffi/align", cfun_ffi_align),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16253|  6.20k|        JANET_CORE_REG("ffi/trampoline", cfun_ffi_get_callback_trampoline),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16254|  6.20k|        JANET_CORE_REG("ffi/jitfn", cfun_ffi_jitfn),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16255|  6.20k|        JANET_CORE_REG("ffi/malloc", cfun_ffi_malloc),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16256|  6.20k|        JANET_CORE_REG("ffi/free", cfun_ffi_free),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16257|  6.20k|        JANET_CORE_REG("ffi/pointer-buffer", cfun_ffi_pointer_buffer),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16258|  6.20k|        JANET_CORE_REG("ffi/pointer-cfunction", cfun_ffi_pointer_cfunction),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16259|  6.20k|        JANET_CORE_REG("ffi/calling-conventions", cfun_ffi_supported_calling_conventions),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16260|  6.20k|        JANET_REG_END
  ------------------
  |  | 2110|  6.20k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
16261|  6.20k|    };
16262|       |    janet_core_cfuns_ext(env, NULL, ffi_cfuns);
16263|  6.20k|}
janet_lib_fiber:
16943|  6.20k|void janet_lib_fiber(JanetTable *env) {
16944|  6.20k|    JanetRegExt fiber_cfuns[] = {
16945|  6.20k|        JANET_CORE_REG("fiber/new", cfun_fiber_new),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16946|  6.20k|        JANET_CORE_REG("fiber/status", cfun_fiber_status),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16947|  6.20k|        JANET_CORE_REG("fiber/root", cfun_fiber_root),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16948|  6.20k|        JANET_CORE_REG("fiber/current", cfun_fiber_current),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16949|  6.20k|        JANET_CORE_REG("fiber/maxstack", cfun_fiber_maxstack),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16950|  6.20k|        JANET_CORE_REG("fiber/setmaxstack", cfun_fiber_setmaxstack),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16951|  6.20k|        JANET_CORE_REG("fiber/getenv", cfun_fiber_getenv),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16952|  6.20k|        JANET_CORE_REG("fiber/setenv", cfun_fiber_setenv),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16953|  6.20k|        JANET_CORE_REG("fiber/can-resume?", cfun_fiber_can_resume),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16954|  6.20k|        JANET_CORE_REG("fiber/last-value", cfun_fiber_last_value),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16955|  6.20k|        JANET_REG_END
  ------------------
  |  | 2110|  6.20k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
16956|  6.20k|    };
16957|       |    janet_core_cfuns_ext(env, NULL, fiber_cfuns);
16958|  6.20k|}
janet_lib_filewatch:
17953|  6.20k|void janet_lib_filewatch(JanetTable *env) {
17954|  6.20k|    JanetRegExt cfuns[] = {
17955|  6.20k|        JANET_CORE_REG("filewatch/new", cfun_filewatch_make),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
17956|  6.20k|        JANET_CORE_REG("filewatch/add", cfun_filewatch_add),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
17957|  6.20k|        JANET_CORE_REG("filewatch/remove", cfun_filewatch_remove),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
17958|  6.20k|        JANET_CORE_REG("filewatch/listen", cfun_filewatch_listen),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
17959|  6.20k|        JANET_CORE_REG("filewatch/unlisten", cfun_filewatch_unlisten),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
17960|  6.20k|        JANET_REG_END
  ------------------
  |  | 2110|  6.20k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
17961|  6.20k|    };
17962|       |    janet_core_cfuns_ext(env, NULL, cfuns);
17963|  6.20k|}
janet_gcpressure:
18023|   201k|void janet_gcpressure(size_t s) {
18024|   201k|    janet_vm.next_collection += s;
18025|   201k|}
janet_gcalloc:
18497|  47.2M|void *janet_gcalloc(enum JanetMemoryType type, size_t size) {
18498|  47.2M|    JanetGCObject *mem;
18499|       |
18500|       |    /* Make sure everything is inited */
18501|  47.2M|    janet_assert(NULL != janet_vm.cache, "please initialize janet before use");
  ------------------
  |  |  389|  47.2M|#define janet_assert(c, m) do { \
  |  |  390|  47.2M|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  378|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  379|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  380|      0|        __FILE__,\
  |  |  |  |  381|      0|        __LINE__,\
  |  |  |  |  382|      0|        (m));\
  |  |  |  |  383|      0|    abort();\
  |  |  |  |  384|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (384:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (390:9): [True: 0, False: 47.2M]
  |  |  ------------------
  |  |  391|  47.2M|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 47.2M]
  |  |  ------------------
  ------------------
18502|  47.2M|    mem = janet_malloc(size);
  ------------------
  |  | 2406|  47.2M|#define janet_malloc(X) malloc((X))
  ------------------
18503|       |
18504|       |    /* Check for bad malloc */
18505|  47.2M|    if (NULL == mem) {
  ------------------
  |  Branch (18505:9): [True: 0, False: 47.2M]
  ------------------
18506|      0|        JANET_OUT_OF_MEMORY;
  ------------------
  |  |  419|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (419:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
18507|      0|    }
18508|       |
18509|       |    /* Configure block */
18510|  47.2M|    mem->flags = type;
18511|       |
18512|       |    /* Prepend block to heap list */
18513|  47.2M|    janet_vm.next_collection += size;
18514|  47.2M|    if (type < JANET_MEMORY_TABLE_WEAKK) {
  ------------------
  |  Branch (18514:9): [True: 47.2M, False: 0]
  ------------------
18515|       |        /* normal heap */
18516|  47.2M|        mem->data.next = janet_vm.blocks;
18517|  47.2M|        janet_vm.blocks = mem;
18518|  47.2M|    } else {
18519|       |        /* weak heap */
18520|      0|        mem->data.next = janet_vm.weak_blocks;
18521|      0|        janet_vm.weak_blocks = mem;
18522|      0|    }
18523|  47.2M|    janet_vm.block_count++;
18524|       |
18525|  47.2M|    return (void *)mem;
18526|  47.2M|}
janet_gcroot:
18587|  12.4k|void janet_gcroot(Janet root) {
18588|  12.4k|    size_t newcount = janet_vm.root_count + 1;
18589|  12.4k|    if (newcount > janet_vm.root_capacity) {
  ------------------
  |  Branch (18589:9): [True: 6.20k, False: 6.20k]
  ------------------
18590|  6.20k|        size_t newcap = 2 * newcount;
18591|  6.20k|        janet_vm.roots = janet_realloc(janet_vm.roots, sizeof(Janet) * newcap);
  ------------------
  |  | 2409|  6.20k|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
18592|  6.20k|        if (NULL == janet_vm.roots) {
  ------------------
  |  Branch (18592:13): [True: 0, False: 6.20k]
  ------------------
18593|      0|            JANET_OUT_OF_MEMORY;
  ------------------
  |  |  419|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (419:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
18594|      0|        }
18595|  6.20k|        janet_vm.root_capacity = newcap;
18596|  6.20k|    }
18597|  12.4k|    janet_vm.roots[janet_vm.root_count] = root;
18598|  12.4k|    janet_vm.root_count = newcount;
18599|  12.4k|}
janet_clear_memory:
18645|  6.20k|void janet_clear_memory(void) {
18646|  6.20k|#ifdef JANET_EV
18647|  6.20k|    JanetKV *items = janet_vm.threaded_abstracts.data;
18648|  12.4k|    for (int32_t i = 0; i < janet_vm.threaded_abstracts.capacity; i++) {
  ------------------
  |  Branch (18648:25): [True: 6.20k, False: 6.20k]
  ------------------
18649|  6.20k|        if (janet_checktype(items[i].key, JANET_ABSTRACT)) {
  ------------------
  |  |  806|  6.20k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 6.20k]
  |  |  |  Branch (806:6): [Folded, False: 6.20k]
  |  |  ------------------
  |  |  807|  6.20k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  6.20k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  6.20k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  6.20k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  6.20k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  6.20k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18650|      0|            void *abst = janet_unwrap_abstract(items[i].key);
  ------------------
  |  |  866|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
18651|      0|            JanetAbstractHead *head = janet_abstract_head(abst);
  ------------------
  |  | 1897|      0|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  ------------------
18652|      0|            if (head->type->gcperthread) {
  ------------------
  |  Branch (18652:17): [True: 0, False: 0]
  ------------------
18653|      0|                janet_assert(!head->type->gcperthread(head->data, head->size), "per-thread finalizer failed");
  ------------------
  |  |  389|      0|#define janet_assert(c, m) do { \
  |  |  390|      0|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  378|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  379|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  380|      0|        __FILE__,\
  |  |  |  |  381|      0|        __LINE__,\
  |  |  |  |  382|      0|        (m));\
  |  |  |  |  383|      0|    abort();\
  |  |  |  |  384|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (384:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (390:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  391|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
18654|      0|            }
18655|      0|            janet_abstract_decref_maybe_free(abst);
18656|      0|        }
18657|  6.20k|    }
18658|  6.20k|#endif
18659|  6.20k|    JanetGCObject *current = janet_vm.blocks;
18660|  47.2M|    while (NULL != current) {
  ------------------
  |  Branch (18660:12): [True: 47.2M, False: 6.20k]
  ------------------
18661|  47.2M|        janet_deinit_block(current);
18662|  47.2M|        JanetGCObject *next = current->data.next;
18663|  47.2M|        janet_free(current);
  ------------------
  |  | 2415|  47.2M|#define janet_free(X) free((X))
  ------------------
18664|  47.2M|        current = next;
18665|  47.2M|    }
18666|  6.20k|    janet_vm.blocks = NULL;
18667|  6.20k|    janet_free_all_scratch();
18668|  6.20k|    janet_free(janet_vm.scratch_mem);
  ------------------
  |  | 2415|  6.20k|#define janet_free(X) free((X))
  ------------------
18669|  6.20k|}
janet_smalloc:
18683|   165k|void *janet_smalloc(size_t size) {
18684|   165k|    JanetScratch *s = janet_malloc(sizeof(JanetScratch) + size);
  ------------------
  |  | 2406|   165k|#define janet_malloc(X) malloc((X))
  ------------------
18685|   165k|    if (NULL == s) {
  ------------------
  |  Branch (18685:9): [True: 0, False: 165k]
  ------------------
18686|      0|        JANET_OUT_OF_MEMORY;
  ------------------
  |  |  419|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (419:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
18687|      0|    }
18688|   165k|    s->finalize = NULL;
18689|   165k|    if (janet_vm.scratch_len == janet_vm.scratch_cap) {
  ------------------
  |  Branch (18689:9): [True: 12.4k, False: 152k]
  ------------------
18690|  12.4k|        size_t newcap = 2 * janet_vm.scratch_cap + 2;
18691|  12.4k|        JanetScratch **newmem = (JanetScratch **) janet_realloc(janet_vm.scratch_mem, newcap * sizeof(JanetScratch));
  ------------------
  |  | 2409|  12.4k|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
18692|  12.4k|        if (NULL == newmem) {
  ------------------
  |  Branch (18692:13): [True: 0, False: 12.4k]
  ------------------
18693|      0|            JANET_OUT_OF_MEMORY;
  ------------------
  |  |  419|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (419:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
18694|      0|        }
18695|  12.4k|        janet_vm.scratch_cap = newcap;
18696|  12.4k|        janet_vm.scratch_mem = newmem;
18697|  12.4k|    }
18698|   165k|    janet_vm.scratch_mem[janet_vm.scratch_len++] = s;
18699|   165k|    return (char *)(s->mem);
18700|   165k|}
janet_srealloc:
18712|   195k|void *janet_srealloc(void *mem, size_t size) {
18713|   195k|    if (NULL == mem) return janet_smalloc(size);
  ------------------
  |  Branch (18713:9): [True: 21.1k, False: 173k]
  ------------------
18714|   173k|    JanetScratch *s = janet_mem2scratch(mem);
18715|   173k|    if (janet_vm.scratch_len) {
  ------------------
  |  Branch (18715:9): [True: 173k, False: 0]
  ------------------
18716|   291k|        for (size_t i = janet_vm.scratch_len - 1; ; i--) {
18717|   291k|            if (janet_vm.scratch_mem[i] == s) {
  ------------------
  |  Branch (18717:17): [True: 173k, False: 117k]
  ------------------
18718|   173k|                JanetScratch *news = janet_realloc(s, size + sizeof(JanetScratch));
  ------------------
  |  | 2409|   173k|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
18719|   173k|                if (NULL == news) {
  ------------------
  |  Branch (18719:21): [True: 0, False: 173k]
  ------------------
18720|      0|                    JANET_OUT_OF_MEMORY;
  ------------------
  |  |  419|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (419:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
18721|      0|                }
18722|   173k|                janet_vm.scratch_mem[i] = news;
18723|   173k|                return (char *)(news->mem);
18724|   173k|            }
18725|   117k|            if (i == 0) break;
  ------------------
  |  Branch (18725:17): [True: 0, False: 117k]
  ------------------
18726|   117k|        }
18727|   173k|    }
18728|      0|    JANET_EXIT("invalid janet_srealloc");
  ------------------
  |  |  378|      0|#define JANET_EXIT(m) do { \
  |  |  379|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  380|      0|        __FILE__,\
  |  |  381|      0|        __LINE__,\
  |  |  382|      0|        (m));\
  |  |  383|      0|    abort();\
  |  |  384|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (384:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
18729|      0|}
janet_sfree:
18736|   164k|void janet_sfree(void *mem) {
18737|   164k|    if (NULL == mem) return;
  ------------------
  |  Branch (18737:9): [True: 0, False: 164k]
  ------------------
18738|   164k|    JanetScratch *s = janet_mem2scratch(mem);
18739|   164k|    if (janet_vm.scratch_len) {
  ------------------
  |  Branch (18739:9): [True: 164k, False: 0]
  ------------------
18740|   176k|        for (size_t i = janet_vm.scratch_len - 1; ; i--) {
18741|   176k|            if (janet_vm.scratch_mem[i] == s) {
  ------------------
  |  Branch (18741:17): [True: 164k, False: 11.6k]
  ------------------
18742|   164k|                janet_vm.scratch_mem[i] = janet_vm.scratch_mem[--janet_vm.scratch_len];
18743|   164k|                free_one_scratch(s);
18744|   164k|                return;
18745|   164k|            }
18746|  11.6k|            if (i == 0) break;
  ------------------
  |  Branch (18746:17): [True: 0, False: 11.6k]
  ------------------
18747|  11.6k|        }
18748|   164k|    }
18749|      0|    JANET_EXIT("invalid janet_sfree");
  ------------------
  |  |  378|      0|#define JANET_EXIT(m) do { \
  |  |  379|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  380|      0|        __FILE__,\
  |  |  381|      0|        __LINE__,\
  |  |  382|      0|        (m));\
  |  |  383|      0|    abort();\
  |  |  384|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (384:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
18750|      0|}
janet_wrap_s64:
18935|  1.86k|Janet janet_wrap_s64(int64_t x) {
18936|  1.86k|    int64_t *box = janet_abstract(&janet_s64_type, sizeof(int64_t));
18937|  1.86k|    *box = (int64_t)x;
18938|  1.86k|    return janet_wrap_abstract(box);
  ------------------
  |  |  851|  1.86k|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|  1.86k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.86k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.86k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18939|  1.86k|}
janet_wrap_u64:
18941|    756|Janet janet_wrap_u64(uint64_t x) {
18942|    756|    uint64_t *box = janet_abstract(&janet_u64_type, sizeof(uint64_t));
18943|    756|    *box = (uint64_t)x;
18944|    756|    return janet_wrap_abstract(box);
  ------------------
  |  |  851|    756|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|    756|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    756|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    756|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18945|    756|}
janet_lib_inttypes:
19427|  6.20k|void janet_lib_inttypes(JanetTable *env) {
19428|  6.20k|    JanetRegExt it_cfuns[] = {
19429|  6.20k|        JANET_CORE_REG("int/s64", cfun_it_s64_new),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
19430|  6.20k|        JANET_CORE_REG("int/u64", cfun_it_u64_new),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
19431|  6.20k|        JANET_CORE_REG("int/to-number", cfun_to_number),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
19432|  6.20k|        JANET_CORE_REG("int/to-bytes", cfun_to_bytes),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
19433|  6.20k|        JANET_REG_END
  ------------------
  |  | 2110|  6.20k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
19434|  6.20k|    };
19435|       |    janet_core_cfuns_ext(env, NULL, it_cfuns);
19436|  6.20k|    janet_register_abstract_type(&janet_s64_type);
19437|  6.20k|    janet_register_abstract_type(&janet_u64_type);
19438|  6.20k|}
janet_file_close:
19754|  18.6k|int janet_file_close(JanetFile *file) {
19755|  18.6k|    int ret = 0;
19756|  18.6k|    if (!(file->flags & (JANET_FILE_NOT_CLOSEABLE | JANET_FILE_CLOSED))) {
  ------------------
  |  | 2278|  18.6k|#define JANET_FILE_NOT_CLOSEABLE 16
  ------------------
                  if (!(file->flags & (JANET_FILE_NOT_CLOSEABLE | JANET_FILE_CLOSED))) {
  ------------------
  |  | 2279|  18.6k|#define JANET_FILE_CLOSED 32
  ------------------
  |  Branch (19756:9): [True: 0, False: 18.6k]
  ------------------
19757|      0|        ret = fclose(file->file);
19758|      0|        file->flags |= JANET_FILE_CLOSED;
  ------------------
  |  | 2279|      0|#define JANET_FILE_CLOSED 32
  ------------------
19759|      0|        file->file = NULL; /* NULL dereference is easier to debug then other problems */
19760|      0|        return ret;
19761|      0|    }
19762|  18.6k|    return 0;
19763|  18.6k|}
janet_dynprintf:
20192|   144k|void janet_dynprintf(const char *name, FILE *dflt_file, const char *format, ...) {
20193|   144k|    va_list args;
20194|   144k|    va_start(args, format);
20195|   144k|    JanetType xtype;
20196|   144k|    Janet x;
20197|   144k|    if (!name || name[0] == '\0') { /* Allow NULL or empty string to just use dflt_file directly */
  ------------------
  |  Branch (20197:9): [True: 0, False: 144k]
  |  Branch (20197:18): [True: 0, False: 144k]
  ------------------
20198|      0|        x = janet_wrap_nil();
  ------------------
  |  |  831|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20199|      0|        xtype = JANET_NIL;
20200|   144k|    } else {
20201|   144k|        x = janet_dyn(name);
20202|   144k|        xtype = janet_type(x);
  ------------------
  |  |  795|   144k|    (isnan((x).number) \
  |  |  796|   144k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|   144k|        : JANET_NUMBER)
  ------------------
  |  Branch (20202:17): [True: 144k, False: 0]
  ------------------
20203|   144k|    }
20204|   144k|    switch (xtype) {
20205|      0|        default:
  ------------------
  |  Branch (20205:9): [True: 0, False: 144k]
  ------------------
20206|       |            /* Other values simply do nothing */
20207|      0|            break;
20208|   144k|        case JANET_NIL:
  ------------------
  |  Branch (20208:9): [True: 144k, False: 0]
  ------------------
20209|   144k|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (20209:9): [True: 0, False: 144k]
  ------------------
20210|   144k|            FILE *f = dflt_file;
20211|   144k|            JanetBuffer buffer;
20212|   144k|            int32_t len = 0;
20213|  1.78M|            while (format[len]) len++;
  ------------------
  |  Branch (20213:20): [True: 1.64M, False: 144k]
  ------------------
20214|   144k|            janet_buffer_init(&buffer, len);
20215|   144k|            janet_formatbv(&buffer, format, args);
20216|   144k|            if (xtype == JANET_ABSTRACT) {
  ------------------
  |  Branch (20216:17): [True: 0, False: 144k]
  ------------------
20217|      0|                void *abstract = janet_unwrap_abstract(x);
  ------------------
  |  |  866|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
20218|      0|                if (janet_abstract_type(abstract) != &janet_file_type)
  ------------------
  |  | 1899|      0|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|      0|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (20218:21): [True: 0, False: 0]
  ------------------
20219|      0|                    break;
20220|      0|                JanetFile *iofile = abstract;
20221|      0|                io_assert_writeable(iofile);
20222|      0|                f = iofile->file;
20223|      0|            }
20224|   144k|            fwrite(buffer.data, buffer.count, 1, f);
20225|   144k|            janet_buffer_deinit(&buffer);
20226|   144k|            break;
20227|   144k|        }
20228|      0|        case JANET_FUNCTION: {
  ------------------
  |  Branch (20228:9): [True: 0, False: 144k]
  ------------------
20229|      0|            JanetFunction *fun = janet_unwrap_function(x);
  ------------------
  |  |  868|      0|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
20230|      0|            int32_t len = 0;
20231|      0|            while (format[len]) len++;
  ------------------
  |  Branch (20231:20): [True: 0, False: 0]
  ------------------
20232|      0|            JanetBuffer *buf = janet_buffer(len);
20233|      0|            janet_formatbv(buf, format, args);
20234|      0|            Janet args[1] = { janet_wrap_buffer(buf) };
  ------------------
  |  |  847|      0|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  825|      0|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20235|      0|            janet_call(fun, 1, args);
20236|      0|            break;
20237|   144k|        }
20238|      0|        case JANET_BUFFER:
  ------------------
  |  Branch (20238:9): [True: 0, False: 144k]
  ------------------
20239|      0|            janet_formatbv(janet_unwrap_buffer(x), format, args);
  ------------------
  |  |  862|      0|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
20240|      0|            break;
20241|   144k|    }
20242|   144k|    va_end(args);
20243|   144k|    return;
20244|   144k|}
janet_makefile:
20262|  18.6k|Janet janet_makefile(FILE *f, int32_t flags) {
20263|  18.6k|    return janet_wrap_abstract(makef(f, flags, BUFSIZ));
  ------------------
  |  |  851|  18.6k|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|  18.6k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  18.6k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  18.6k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20264|  18.6k|}
janet_lib_io:
20277|  6.20k|void janet_lib_io(JanetTable *env) {
20278|  6.20k|    JanetRegExt io_cfuns[] = {
20279|  6.20k|        JANET_CORE_REG("print", cfun_io_print),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20280|  6.20k|        JANET_CORE_REG("prin", cfun_io_prin),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20281|  6.20k|        JANET_CORE_REG("printf", cfun_io_printf),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20282|  6.20k|        JANET_CORE_REG("prinf", cfun_io_prinf),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20283|  6.20k|        JANET_CORE_REG("eprin", cfun_io_eprin),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20284|  6.20k|        JANET_CORE_REG("eprint", cfun_io_eprint),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20285|  6.20k|        JANET_CORE_REG("eprintf", cfun_io_eprintf),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20286|  6.20k|        JANET_CORE_REG("eprinf", cfun_io_eprinf),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20287|  6.20k|        JANET_CORE_REG("xprint", cfun_io_xprint),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20288|  6.20k|        JANET_CORE_REG("xprin", cfun_io_xprin),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20289|  6.20k|        JANET_CORE_REG("xprintf", cfun_io_xprintf),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20290|  6.20k|        JANET_CORE_REG("xprinf", cfun_io_xprinf),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20291|  6.20k|        JANET_CORE_REG("flush", cfun_io_flush),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20292|  6.20k|        JANET_CORE_REG("eflush", cfun_io_eflush),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20293|  6.20k|        JANET_CORE_REG("file/temp", cfun_io_temp),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20294|  6.20k|        JANET_CORE_REG("file/open", cfun_io_fopen),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20295|  6.20k|        JANET_CORE_REG("file/close", cfun_io_fclose),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20296|  6.20k|        JANET_CORE_REG("file/read", cfun_io_fread),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20297|  6.20k|        JANET_CORE_REG("file/write", cfun_io_fwrite),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20298|  6.20k|        JANET_CORE_REG("file/flush", cfun_io_fflush),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20299|  6.20k|        JANET_CORE_REG("file/seek", cfun_io_fseek),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20300|  6.20k|        JANET_CORE_REG("file/tell", cfun_io_ftell),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20301|  6.20k|        JANET_REG_END
  ------------------
  |  | 2110|  6.20k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
20302|  6.20k|    };
20303|  6.20k|    janet_core_cfuns_ext(env, NULL, io_cfuns);
20304|  6.20k|    janet_register_abstract_type(&janet_file_type);
20305|  6.20k|    int default_flags = JANET_FILE_NOT_CLOSEABLE | JANET_FILE_SERIALIZABLE;
  ------------------
  |  | 2278|  6.20k|#define JANET_FILE_NOT_CLOSEABLE 16
  ------------------
                  int default_flags = JANET_FILE_NOT_CLOSEABLE | JANET_FILE_SERIALIZABLE;
  ------------------
  |  | 2281|  6.20k|#define JANET_FILE_SERIALIZABLE 128
  ------------------
20306|       |    /* stdout */
20307|  6.20k|    JANET_CORE_DEF(env, "stdout",
  ------------------
  |  |  520|  6.20k|#define JANET_CORE_DEF(ENV, NAME, X, DOC) janet_core_def_sm(ENV, NAME, X, DOC, NULL, 0)
  ------------------
20308|  6.20k|                   janet_makefile(stdout, JANET_FILE_APPEND | default_flags),
20309|  6.20k|                   "The standard output file.");
20310|       |    /* stderr */
20311|  6.20k|    JANET_CORE_DEF(env, "stderr",
  ------------------
  |  |  520|  6.20k|#define JANET_CORE_DEF(ENV, NAME, X, DOC) janet_core_def_sm(ENV, NAME, X, DOC, NULL, 0)
  ------------------
20312|  6.20k|                   janet_makefile(stderr, JANET_FILE_APPEND | default_flags),
20313|  6.20k|                   "The standard error file.");
20314|       |    /* stdin */
20315|  6.20k|    JANET_CORE_DEF(env, "stdin",
  ------------------
  |  |  520|  6.20k|#define JANET_CORE_DEF(ENV, NAME, X, DOC) janet_core_def_sm(ENV, NAME, X, DOC, NULL, 0)
  ------------------
20316|  6.20k|                   janet_makefile(stdin, JANET_FILE_READ | default_flags),
20317|  6.20k|                   "The standard input file.");
20318|       |
20319|  6.20k|}
janet_unmarshal:
21978|  6.20k|    const uint8_t **next) {
21979|  6.20k|    UnmarshalState st;
21980|  6.20k|    st.start = bytes;
21981|  6.20k|    st.end = bytes + len;
21982|  6.20k|    st.lookup_defs = NULL;
21983|  6.20k|    st.lookup_envs = NULL;
21984|  6.20k|    st.lookup = NULL;
21985|  6.20k|    st.reg = reg;
21986|  6.20k|    Janet out;
21987|  6.20k|    const uint8_t *nextbytes = unmarshal_one(&st, bytes, &out, flags);
21988|  6.20k|    if (next) *next = nextbytes;
  ------------------
  |  Branch (21988:9): [True: 0, False: 6.20k]
  ------------------
21989|  6.20k|    janet_v_free(st.lookup_defs);
  ------------------
  |  |  756|  6.20k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  764|  6.20k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (756:34): [True: 6.20k, False: 0]
  |  |  ------------------
  ------------------
21990|  6.20k|    janet_v_free(st.lookup_envs);
  ------------------
  |  |  756|  6.20k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  764|  6.20k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (756:34): [True: 6.20k, False: 0]
  |  |  ------------------
  ------------------
21991|       |    janet_v_free(st.lookup);
  ------------------
  |  |  756|  6.20k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  764|  6.20k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (756:34): [True: 6.20k, False: 0]
  |  |  ------------------
  ------------------
21992|  6.20k|    return out;
21993|  6.20k|}
janet_lib_marsh:
22054|  6.20k|void janet_lib_marsh(JanetTable *env) {
22055|  6.20k|    JanetRegExt marsh_cfuns[] = {
22056|  6.20k|        JANET_CORE_REG("marshal", cfun_marshal),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22057|  6.20k|        JANET_CORE_REG("unmarshal", cfun_unmarshal),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22058|  6.20k|        JANET_CORE_REG("env-lookup", cfun_env_lookup),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22059|  6.20k|        JANET_REG_END
  ------------------
  |  | 2110|  6.20k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
22060|  6.20k|    };
22061|       |    janet_core_cfuns_ext(env, NULL, marsh_cfuns);
22062|  6.20k|}
janet_default_rng:
22137|  6.20k|JanetRNG *janet_default_rng(void) {
22138|  6.20k|    return &janet_vm.rng;
22139|  6.20k|}
janet_rng_seed:
22141|  12.4k|void janet_rng_seed(JanetRNG *rng, uint32_t seed) {
22142|  12.4k|    rng->a = seed;
22143|  12.4k|    rng->b = 0x97654321u;
22144|  12.4k|    rng->c = 123871873u;
22145|  12.4k|    rng->d = 0xf23f56c8u;
22146|  12.4k|    rng->counter = 0u;
22147|       |    /* First several numbers aren't that random. */
22148|   210k|    for (int i = 0; i < 16; i++) janet_rng_u32(rng);
  ------------------
  |  Branch (22148:21): [True: 198k, False: 12.4k]
  ------------------
22149|  12.4k|}
janet_rng_u32:
22165|   198k|uint32_t janet_rng_u32(JanetRNG *rng) {
22166|       |    /* Algorithm "xorwow" from p. 5 of Marsaglia, "Xorshift RNGs" */
22167|   198k|    uint32_t t = rng->d;
22168|   198k|    uint32_t const s = rng->a;
22169|   198k|    rng->d = rng->c;
22170|   198k|    rng->c = rng->b;
22171|   198k|    rng->b = s;
22172|   198k|    t ^= t >> 2;
22173|   198k|    t ^= t << 1;
22174|   198k|    t ^= s ^ (s << 4);
22175|   198k|    rng->a = t;
22176|   198k|    rng->counter += 362437;
22177|   198k|    return t + rng->counter;
22178|   198k|}
janet_lib_math:
22445|  6.20k|void janet_lib_math(JanetTable *env) {
22446|  6.20k|    JanetRegExt math_cfuns[] = {
22447|  6.20k|        JANET_CORE_REG("not", janet_not),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22448|  6.20k|        JANET_CORE_REG("math/random", janet_rand),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22449|  6.20k|        JANET_CORE_REG("math/seedrandom", janet_srand),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22450|  6.20k|        JANET_CORE_REG("math/cos", janet_cos),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22451|  6.20k|        JANET_CORE_REG("math/sin", janet_sin),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22452|  6.20k|        JANET_CORE_REG("math/tan", janet_tan),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22453|  6.20k|        JANET_CORE_REG("math/acos", janet_acos),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22454|  6.20k|        JANET_CORE_REG("math/asin", janet_asin),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22455|  6.20k|        JANET_CORE_REG("math/atan", janet_atan),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22456|  6.20k|        JANET_CORE_REG("math/exp", janet_exp),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22457|  6.20k|        JANET_CORE_REG("math/log", janet_log),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22458|  6.20k|        JANET_CORE_REG("math/log10", janet_log10),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22459|  6.20k|        JANET_CORE_REG("math/log2", janet_log2),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22460|  6.20k|        JANET_CORE_REG("math/sqrt", janet_sqrt),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22461|  6.20k|#ifndef JANET_PLAN9
22462|  6.20k|        JANET_CORE_REG("math/cbrt", janet_cbrt),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22463|  6.20k|        JANET_CORE_REG("math/gamma", janet_tgamma),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22464|  6.20k|        JANET_CORE_REG("math/log-gamma", janet_lgamma),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22465|  6.20k|        JANET_CORE_REG("math/erfc", janet_erfc),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22466|  6.20k|        JANET_CORE_REG("math/erf", janet_erf),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22467|  6.20k|        JANET_CORE_REG("math/expm1", janet_expm1),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22468|  6.20k|        JANET_CORE_REG("math/atanh", janet_atanh),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22469|  6.20k|        JANET_CORE_REG("math/asinh", janet_asinh),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22470|  6.20k|        JANET_CORE_REG("math/next", janet_nextafter),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22471|  6.20k|#endif
22472|  6.20k|        JANET_CORE_REG("math/floor", janet_floor),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22473|  6.20k|        JANET_CORE_REG("math/ceil", janet_ceil),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22474|  6.20k|        JANET_CORE_REG("math/pow", janet_pow),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22475|  6.20k|        JANET_CORE_REG("math/abs", janet_fabs),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22476|  6.20k|        JANET_CORE_REG("math/sinh", janet_sinh),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22477|  6.20k|        JANET_CORE_REG("math/cosh", janet_cosh),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22478|  6.20k|        JANET_CORE_REG("math/tanh", janet_tanh),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22479|  6.20k|        JANET_CORE_REG("math/acosh", janet_acosh),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22480|  6.20k|        JANET_CORE_REG("math/atan2", janet_atan2),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22481|  6.20k|        JANET_CORE_REG("math/rng", cfun_rng_make),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22482|  6.20k|        JANET_CORE_REG("math/rng-uniform", cfun_rng_uniform),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22483|  6.20k|        JANET_CORE_REG("math/rng-int", cfun_rng_int),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22484|  6.20k|        JANET_CORE_REG("math/rng-buffer", cfun_rng_buffer),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22485|  6.20k|        JANET_CORE_REG("math/hypot", janet_hypot),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22486|  6.20k|        JANET_CORE_REG("math/exp2", janet_exp2),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22487|  6.20k|        JANET_CORE_REG("math/log1p", janet_log1p),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22488|  6.20k|        JANET_CORE_REG("math/trunc", janet_trunc),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22489|  6.20k|        JANET_CORE_REG("math/round", janet_round),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22490|  6.20k|        JANET_CORE_REG("math/gcd", janet_cfun_gcd),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22491|  6.20k|        JANET_CORE_REG("math/lcm", janet_cfun_lcm),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22492|  6.20k|        JANET_CORE_REG("math/frexp", janet_cfun_frexp),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22493|  6.20k|        JANET_CORE_REG("math/ldexp", janet_cfun_ldexp),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22494|  6.20k|        JANET_REG_END
  ------------------
  |  | 2110|  6.20k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
22495|  6.20k|    };
22496|  6.20k|    janet_core_cfuns_ext(env, NULL, math_cfuns);
22497|  6.20k|    janet_register_abstract_type(&janet_rng_type);
22498|       |#ifdef JANET_BOOTSTRAP
22499|       |    JANET_CORE_DEF(env, "math/pi", janet_wrap_number(3.1415926535897931),
22500|       |                   "The value pi.");
22501|       |    JANET_CORE_DEF(env, "math/e", janet_wrap_number(2.7182818284590451),
22502|       |                   "The base of the natural log.");
22503|       |    JANET_CORE_DEF(env, "math/inf", janet_wrap_number(INFINITY),
22504|       |                   "The number representing positive infinity");
22505|       |    JANET_CORE_DEF(env, "math/-inf", janet_wrap_number(-INFINITY),
22506|       |                   "The number representing negative infinity");
22507|       |    JANET_CORE_DEF(env, "math/int32-min", janet_wrap_number(INT32_MIN),
22508|       |                   "The minimum contiguous integer representable by a 32 bit signed integer");
22509|       |    JANET_CORE_DEF(env, "math/int32-max", janet_wrap_number(INT32_MAX),
22510|       |                   "The maximum contiguous integer representable by a 32 bit signed integer");
22511|       |    JANET_CORE_DEF(env, "math/int-min", janet_wrap_number(JANET_INTMIN_DOUBLE),
22512|       |                   "The minimum contiguous integer representable by a double (-(2^53))");
22513|       |    JANET_CORE_DEF(env, "math/int-max", janet_wrap_number(JANET_INTMAX_DOUBLE),
22514|       |                   "The maximum contiguous integer representable by a double (2^53)");
22515|       |#ifdef NAN
22516|       |    JANET_CORE_DEF(env, "math/nan", janet_wrap_number(NAN), "Not a number (IEEE-754 NaN)");
22517|       |#else
22518|       |    JANET_CORE_DEF(env, "math/nan", janet_wrap_number(0.0 / 0.0), "Not a number (IEEE-754 NaN)");
22519|       |#endif
22520|       |#endif
22521|  6.20k|}
janet_lib_net:
23792|  6.20k|void janet_lib_net(JanetTable *env) {
23793|  6.20k|    JanetRegExt net_cfuns[] = {
23794|  6.20k|        JANET_CORE_REG("net/address", cfun_net_sockaddr),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23795|  6.20k|        JANET_CORE_REG("net/listen", cfun_net_listen),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23796|  6.20k|        JANET_CORE_REG("net/socket", cfun_net_socket),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23797|  6.20k|        JANET_CORE_REG("net/accept", cfun_stream_accept),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23798|  6.20k|        JANET_CORE_REG("net/accept-loop", cfun_stream_accept_loop),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23799|  6.20k|        JANET_CORE_REG("net/read", cfun_stream_read),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23800|  6.20k|        JANET_CORE_REG("net/chunk", cfun_stream_chunk),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23801|  6.20k|        JANET_CORE_REG("net/write", cfun_stream_write),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23802|  6.20k|        JANET_CORE_REG("net/send-to", cfun_stream_send_to),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23803|  6.20k|        JANET_CORE_REG("net/recv-from", cfun_stream_recv_from),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23804|  6.20k|        JANET_CORE_REG("net/flush", cfun_stream_flush),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23805|  6.20k|        JANET_CORE_REG("net/connect", cfun_net_connect),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23806|  6.20k|        JANET_CORE_REG("net/shutdown", cfun_net_shutdown),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23807|  6.20k|        JANET_CORE_REG("net/peername", cfun_net_getpeername),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23808|  6.20k|        JANET_CORE_REG("net/localname", cfun_net_getsockname),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23809|  6.20k|        JANET_CORE_REG("net/address-unpack", cfun_net_address_unpack),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23810|  6.20k|        JANET_CORE_REG("net/setsockopt", cfun_net_setsockopt),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23811|  6.20k|        JANET_REG_END
  ------------------
  |  | 2110|  6.20k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
23812|  6.20k|    };
23813|       |    janet_core_cfuns_ext(env, NULL, net_cfuns);
23814|  6.20k|}
janet_net_init:
23816|  6.20k|void janet_net_init(void) {
23817|       |#ifdef JANET_WINDOWS
23818|       |    WSADATA wsaData;
23819|       |    janet_assert(!WSAStartup(MAKEWORD(2, 2), &wsaData), "could not start winsock");
23820|       |    janet_vm.connect_ex_loaded = 0;
23821|       |    janet_vm.connect_ex = NULL;
23822|       |#endif
23823|  6.20k|}
janet_net_deinit:
23825|  6.20k|void janet_net_deinit(void) {
23826|       |#ifdef JANET_WINDOWS
23827|       |    WSACleanup();
23828|       |#endif
23829|  6.20k|}
janet_lib_os:
26841|  6.20k|void janet_lib_os(JanetTable *env) {
26842|       |#if !defined(JANET_REDUCED_OS) && defined(JANET_WINDOWS) && defined(JANET_THREADS)
26843|       |    /* During start up, the top-most abstract machine (thread)
26844|       |     * in the thread tree sets up the critical section. */
26845|       |    static volatile long env_lock_initializing = 0;
26846|       |    static volatile long env_lock_initialized = 0;
26847|       |    if (!InterlockedExchange(&env_lock_initializing, 1)) {
26848|       |        InitializeCriticalSection(&env_lock);
26849|       |        InterlockedOr(&env_lock_initialized, 1);
26850|       |    } else {
26851|       |        while (!InterlockedOr(&env_lock_initialized, 0)) {
26852|       |            Sleep(0);
26853|       |        }
26854|       |    }
26855|       |
26856|       |#endif
26857|  6.20k|#ifndef JANET_NO_PROCESSES
26858|  6.20k|#endif
26859|  6.20k|    JanetRegExt os_cfuns[] = {
26860|  6.20k|        JANET_CORE_REG("os/exit", os_exit),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26861|  6.20k|        JANET_CORE_REG("os/which", os_which),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26862|  6.20k|        JANET_CORE_REG("os/arch", os_arch),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26863|  6.20k|        JANET_CORE_REG("os/compiler", os_compiler),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26864|  6.20k|#ifndef JANET_REDUCED_OS
26865|       |
26866|       |        /* misc (un-sandboxed) */
26867|  6.20k|        JANET_CORE_REG("os/cpu-count", os_cpu_count),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26868|  6.20k|        JANET_CORE_REG("os/cwd", os_cwd),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26869|  6.20k|        JANET_CORE_REG("os/cryptorand", os_cryptorand),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26870|  6.20k|        JANET_CORE_REG("os/perm-string", os_permission_string),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26871|  6.20k|        JANET_CORE_REG("os/perm-int", os_permission_int),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26872|  6.20k|        JANET_CORE_REG("os/mktime", os_mktime),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26873|  6.20k|        JANET_CORE_REG("os/time", os_time), /* not high resolution */
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26874|  6.20k|        JANET_CORE_REG("os/date", os_date), /* not high resolution */
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26875|  6.20k|        JANET_CORE_REG("os/strftime", os_strftime),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26876|  6.20k|        JANET_CORE_REG("os/sleep", os_sleep),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26877|  6.20k|        JANET_CORE_REG("os/isatty", os_isatty),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26878|  6.20k|#ifndef JANET_NO_LOCALES
26879|  6.20k|        JANET_CORE_REG("os/setlocale", os_setlocale),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26880|  6.20k|#endif
26881|       |
26882|       |        /* env functions */
26883|  6.20k|#ifndef JANET_PLAN9
26884|  6.20k|        JANET_CORE_REG("os/environ", os_environ),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26885|  6.20k|#endif
26886|  6.20k|        JANET_CORE_REG("os/getenv", os_getenv),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26887|  6.20k|        JANET_CORE_REG("os/setenv", os_setenv),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26888|       |
26889|       |        /* fs read */
26890|  6.20k|        JANET_CORE_REG("os/dir", os_dir),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26891|  6.20k|        JANET_CORE_REG("os/stat", os_stat),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26892|  6.20k|        JANET_CORE_REG("os/lstat", os_lstat),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26893|  6.20k|        JANET_CORE_REG("os/realpath", os_realpath),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26894|  6.20k|        JANET_CORE_REG("os/cd", os_cd),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26895|  6.20k|#ifndef JANET_NO_UMASK
26896|  6.20k|        JANET_CORE_REG("os/umask", os_umask),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26897|  6.20k|#endif
26898|  6.20k|#ifndef JANET_NO_SYMLINKS
26899|  6.20k|        JANET_CORE_REG("os/readlink", os_readlink),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26900|  6.20k|#endif
26901|       |
26902|       |        /* fs write */
26903|  6.20k|        JANET_CORE_REG("os/mkdir", os_mkdir),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26904|  6.20k|        JANET_CORE_REG("os/rmdir", os_rmdir),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26905|  6.20k|        JANET_CORE_REG("os/rm", os_remove),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26906|  6.20k|        JANET_CORE_REG("os/link", os_link),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26907|  6.20k|        JANET_CORE_REG("os/rename", os_rename),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26908|  6.20k|        JANET_CORE_REG("os/chmod", os_chmod),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26909|  6.20k|        JANET_CORE_REG("os/touch", os_touch),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26910|  6.20k|#ifndef JANET_NO_SYMLINKS
26911|  6.20k|        JANET_CORE_REG("os/symlink", os_symlink),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26912|  6.20k|#endif
26913|       |
26914|       |        /* processes */
26915|  6.20k|#ifndef JANET_NO_PROCESSES
26916|  6.20k|        JANET_CORE_REG("os/execute", os_execute),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26917|  6.20k|        JANET_CORE_REG("os/spawn", os_spawn),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26918|  6.20k|        JANET_CORE_REG("os/shell", os_shell),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26919|  6.20k|        JANET_CORE_REG("os/posix-fork", os_posix_fork),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26920|  6.20k|        JANET_CORE_REG("os/posix-exec", os_posix_exec),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26921|  6.20k|        JANET_CORE_REG("os/posix-chroot", os_posix_chroot),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26922|       |        /* no need to sandbox process management if you can't create processes
26923|       |         * (allows for limited functionality if use exposes C-functions to create specific processes) */
26924|  6.20k|        JANET_CORE_REG("os/proc-wait", os_proc_wait),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26925|  6.20k|        JANET_CORE_REG("os/proc-kill", os_proc_kill),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26926|  6.20k|        JANET_CORE_REG("os/proc-close", os_proc_close),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26927|  6.20k|        JANET_CORE_REG("os/getpid", os_proc_getpid),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26928|  6.20k|#ifdef JANET_EV
26929|  6.20k|        JANET_CORE_REG("os/sigaction", os_sigaction),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26930|  6.20k|#endif
26931|  6.20k|#endif
26932|       |
26933|       |        /* high resolution timers */
26934|  6.20k|        JANET_CORE_REG("os/clock", os_clock),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26935|       |
26936|  6.20k|#ifdef JANET_EV
26937|  6.20k|        JANET_CORE_REG("os/open", os_open), /* fs read and write */
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26938|  6.20k|        JANET_CORE_REG("os/pipe", os_pipe),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26939|  6.20k|#endif
26940|  6.20k|#endif
26941|  6.20k|        JANET_REG_END
  ------------------
  |  | 2110|  6.20k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
26942|  6.20k|    };
26943|       |    janet_core_cfuns_ext(env, NULL, os_cfuns);
26944|  6.20k|}
janet_is_symbol_char:
27004|   161k|int janet_is_symbol_char(uint8_t c) {
27005|   161k|    return symchars[c >> 5] & ((uint32_t)1 << (c & 0x1F));
27006|   161k|}
janet_valid_utf8:
27011|    873|int janet_valid_utf8(const uint8_t *str, int32_t len) {
27012|    873|    int32_t i = 0;
27013|    873|    int32_t j;
27014|  3.99k|    while (i < len) {
  ------------------
  |  Branch (27014:12): [True: 3.52k, False: 474]
  ------------------
27015|  3.52k|        int32_t nexti;
27016|  3.52k|        uint8_t c = str[i];
27017|       |
27018|       |        /* Check the number of bytes in code point */
27019|  3.52k|        if (c < 0x80) nexti = i + 1;
  ------------------
  |  Branch (27019:13): [True: 2.29k, False: 1.22k]
  ------------------
27020|  1.22k|        else if ((c >> 5) == 0x06) nexti = i + 2;
  ------------------
  |  Branch (27020:18): [True: 402, False: 824]
  ------------------
27021|    824|        else if ((c >> 4) == 0x0E) nexti = i + 3;
  ------------------
  |  Branch (27021:18): [True: 299, False: 525]
  ------------------
27022|    525|        else if ((c >> 3) == 0x1E) nexti = i + 4;
  ------------------
  |  Branch (27022:18): [True: 336, False: 189]
  ------------------
27023|       |        /* Don't allow 5 or 6 byte code points */
27024|    189|        else return 0;
27025|       |
27026|       |        /* No overflow */
27027|  3.33k|        if (nexti > len) return 0;
  ------------------
  |  Branch (27027:13): [True: 107, False: 3.22k]
  ------------------
27028|       |
27029|       |        /* Ensure trailing bytes are well formed (10XX XXXX) */
27030|  4.95k|        for (j = i + 1; j < nexti; j++) {
  ------------------
  |  Branch (27030:25): [True: 1.80k, False: 3.14k]
  ------------------
27031|  1.80k|            if ((str[j] >> 6) != 2) return 0;
  ------------------
  |  Branch (27031:17): [True: 79, False: 1.72k]
  ------------------
27032|  1.80k|        }
27033|       |
27034|       |        /* Check for overlong encoding */
27035|  3.14k|        if ((nexti == i + 2) && str[i] < 0xC2) return 0;
  ------------------
  |  Branch (27035:13): [True: 291, False: 2.85k]
  |  Branch (27035:33): [True: 6, False: 285]
  ------------------
27036|  3.14k|        if ((str[i] == 0xE0) && str[i + 1] < 0xA0) return 0;
  ------------------
  |  Branch (27036:13): [True: 164, False: 2.97k]
  |  Branch (27036:33): [True: 12, False: 152]
  ------------------
27037|  3.12k|        if ((str[i] == 0xF0) && str[i + 1] < 0x90) return 0;
  ------------------
  |  Branch (27037:13): [True: 123, False: 3.00k]
  |  Branch (27037:33): [True: 6, False: 117]
  ------------------
27038|       |
27039|  3.12k|        i = nexti;
27040|  3.12k|    }
27041|    474|    return 1;
27042|    873|}
janet_parser_consume:
27646|   255k|void janet_parser_consume(JanetParser *parser, uint8_t c) {
27647|   255k|    int consumed = 0;
27648|   255k|    janet_parser_checkdead(parser);
27649|   255k|    if (c == '\r') {
  ------------------
  |  Branch (27649:9): [True: 3.14k, False: 252k]
  ------------------
27650|  3.14k|        parser->line++;
27651|  3.14k|        parser->column = 0;
27652|   252k|    } else if (c == '\n') {
  ------------------
  |  Branch (27652:16): [True: 9.33k, False: 242k]
  ------------------
27653|  9.33k|        parser->column = 0;
27654|  9.33k|        if (parser->lookback != '\r')
  ------------------
  |  Branch (27654:13): [True: 8.95k, False: 377]
  ------------------
27655|  8.95k|            parser->line++;
27656|   242k|    } else {
27657|   242k|        parser->column++;
27658|   242k|    }
27659|   572k|    while (!consumed && !parser->error) {
  ------------------
  |  Branch (27659:12): [True: 317k, False: 254k]
  |  Branch (27659:25): [True: 316k, False: 813]
  ------------------
27660|   316k|        JanetParseState *state = parser->states + parser->statecount - 1;
27661|   316k|        consumed = state->consumer(parser, state, c);
27662|   316k|    }
27663|   255k|    parser->lookback = c;
27664|   255k|}
janet_parser_eof:
27666|  5.52k|void janet_parser_eof(JanetParser *parser) {
27667|  5.52k|    janet_parser_checkdead(parser);
27668|  5.52k|    size_t oldcolumn = parser->column;
27669|  5.52k|    size_t oldline = parser->line;
27670|  5.52k|    janet_parser_consume(parser, '\n');
27671|  5.52k|    if (parser->statecount > 1) {
  ------------------
  |  Branch (27671:9): [True: 1.39k, False: 4.13k]
  ------------------
27672|  1.39k|        delim_error(parser, parser->statecount - 1, 0, "unexpected end of source");
27673|  1.39k|    }
27674|  5.52k|    parser->line = oldline;
27675|  5.52k|    parser->column = oldcolumn;
27676|  5.52k|    parser->flag |= JANET_PARSER_DEAD;
  ------------------
  |  |26978|  5.52k|#define JANET_PARSER_DEAD 0x1
  ------------------
27677|  5.52k|}
janet_parser_status:
27679|   262k|enum JanetParserStatus janet_parser_status(JanetParser *parser) {
27680|   262k|    if (parser->error) return JANET_PARSE_ERROR;
  ------------------
  |  Branch (27680:9): [True: 3.42k, False: 258k]
  ------------------
27681|   258k|    if (parser->flag) return JANET_PARSE_DEAD;
  ------------------
  |  Branch (27681:9): [True: 4.13k, False: 254k]
  ------------------
27682|   254k|    if (parser->statecount > 1) return JANET_PARSE_PENDING;
  ------------------
  |  Branch (27682:9): [True: 240k, False: 14.6k]
  ------------------
27683|  14.6k|    return JANET_PARSE_ROOT;
27684|   254k|}
janet_parser_produce:
27705|  4.04k|Janet janet_parser_produce(JanetParser *parser) {
27706|  4.04k|    Janet ret;
27707|  4.04k|    size_t i;
27708|  4.04k|    if (parser->pending == 0) return janet_wrap_nil();
  ------------------
  |  |  831|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (27708:9): [True: 0, False: 4.04k]
  ------------------
27709|  4.04k|    ret = janet_unwrap_tuple(parser->args[0])[0];
  ------------------
  |  |  858|  4.04k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
27710|  9.22k|    for (i = 1; i < parser->argcount; i++) {
  ------------------
  |  Branch (27710:17): [True: 5.18k, False: 4.04k]
  ------------------
27711|  5.18k|        parser->args[i - 1] = parser->args[i];
27712|  5.18k|    }
27713|  4.04k|    parser->pending--;
27714|  4.04k|    parser->argcount--;
27715|  4.04k|    parser->states[0].argn--;
27716|  4.04k|    return ret;
27717|  4.04k|}
janet_parser_init:
27733|  6.20k|void janet_parser_init(JanetParser *parser) {
27734|  6.20k|    parser->args = NULL;
27735|  6.20k|    parser->states = NULL;
27736|  6.20k|    parser->buf = NULL;
27737|  6.20k|    parser->argcount = 0;
27738|  6.20k|    parser->argcap = 0;
27739|  6.20k|    parser->bufcount = 0;
27740|  6.20k|    parser->bufcap = 0;
27741|  6.20k|    parser->statecount = 0;
27742|  6.20k|    parser->statecap = 0;
27743|  6.20k|    parser->error = NULL;
27744|  6.20k|    parser->lookback = -1;
27745|  6.20k|    parser->line = 1;
27746|  6.20k|    parser->column = 0;
27747|  6.20k|    parser->pending = 0;
27748|  6.20k|    parser->flag = 0;
27749|       |
27750|  6.20k|    pushstate(parser, root, PFLAG_CONTAINER);
  ------------------
  |  |27083|  6.20k|#define PFLAG_CONTAINER 0x100
  ------------------
27751|  6.20k|}
janet_parser_deinit:
27753|  6.20k|void janet_parser_deinit(JanetParser *parser) {
27754|  6.20k|    janet_free(parser->args);
  ------------------
  |  | 2415|  6.20k|#define janet_free(X) free((X))
  ------------------
27755|  6.20k|    janet_free(parser->buf);
  ------------------
  |  | 2415|  6.20k|#define janet_free(X) free((X))
  ------------------
27756|  6.20k|    janet_free(parser->states);
  ------------------
  |  | 2415|  6.20k|#define janet_free(X) free((X))
  ------------------
27757|  6.20k|}
janet_parser_has_more:
27804|  4.13k|int janet_parser_has_more(JanetParser *parser) {
27805|  4.13k|    return !!parser->pending;
27806|  4.13k|}
janet_lib_parse:
28258|  6.20k|void janet_lib_parse(JanetTable *env) {
28259|  6.20k|    JanetRegExt parse_cfuns[] = {
28260|  6.20k|        JANET_CORE_REG("parser/new", cfun_parse_parser),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28261|  6.20k|        JANET_CORE_REG("parser/clone", cfun_parse_clone),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28262|  6.20k|        JANET_CORE_REG("parser/has-more", cfun_parse_has_more),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28263|  6.20k|        JANET_CORE_REG("parser/produce", cfun_parse_produce),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28264|  6.20k|        JANET_CORE_REG("parser/consume", cfun_parse_consume),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28265|  6.20k|        JANET_CORE_REG("parser/byte", cfun_parse_byte),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28266|  6.20k|        JANET_CORE_REG("parser/error", cfun_parse_error),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28267|  6.20k|        JANET_CORE_REG("parser/status", cfun_parse_status),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28268|  6.20k|        JANET_CORE_REG("parser/flush", cfun_parse_flush),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28269|  6.20k|        JANET_CORE_REG("parser/state", cfun_parse_state),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28270|  6.20k|        JANET_CORE_REG("parser/where", cfun_parse_where),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28271|  6.20k|        JANET_CORE_REG("parser/eof", cfun_parse_eof),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28272|  6.20k|        JANET_CORE_REG("parser/insert", cfun_parse_insert),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28273|  6.20k|        JANET_REG_END
  ------------------
  |  | 2110|  6.20k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
28274|  6.20k|    };
28275|       |    janet_core_cfuns_ext(env, NULL, parse_cfuns);
28276|  6.20k|}
cfun_peg_match:
30275|  4.04k|              "Returns nil if text does not match the language defined by peg. The syntax of PEGs is documented on the Janet website.") {
30276|  4.04k|    PegCall c = peg_cfun_init(argc, argv, 0);
30277|  4.04k|    const uint8_t *result = peg_rule(&c.s, c.s.bytecode, c.bytes.bytes + c.start);
30278|  4.04k|    return result ? janet_wrap_array(c.s.captures) : janet_wrap_nil();
  ------------------
  |  |  845|    740|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  825|    740|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    740|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    740|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  return result ? janet_wrap_array(c.s.captures) : janet_wrap_nil();
  ------------------
  |  |  831|  3.30k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  3.30k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  3.30k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  3.30k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (30278:12): [True: 740, False: 3.30k]
  ------------------
30279|  4.04k|}
janet_lib_peg:
30376|  6.20k|void janet_lib_peg(JanetTable *env) {
30377|  6.20k|    JanetRegExt cfuns[] = {
30378|  6.20k|        JANET_CORE_REG("peg/compile", cfun_peg_compile),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
30379|  6.20k|        JANET_CORE_REG("peg/match", cfun_peg_match),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
30380|  6.20k|        JANET_CORE_REG("peg/find", cfun_peg_find),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
30381|  6.20k|        JANET_CORE_REG("peg/find-all", cfun_peg_find_all),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
30382|  6.20k|        JANET_CORE_REG("peg/replace", cfun_peg_replace),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
30383|  6.20k|        JANET_CORE_REG("peg/replace-all", cfun_peg_replace_all),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
30384|  6.20k|        JANET_REG_END
  ------------------
  |  | 2110|  6.20k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
30385|  6.20k|    };
30386|       |    janet_core_cfuns_ext(env, NULL, cfuns);
30387|  6.20k|    janet_register_abstract_type(&janet_peg_type);
30388|  6.20k|}
janet_to_string_b:
30618|  30.6k|void janet_to_string_b(JanetBuffer *buffer, Janet x) {
30619|  30.6k|    switch (janet_type(x)) {
  ------------------
  |  |  795|  30.6k|    (isnan((x).number) \
  |  |  796|  30.6k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  30.6k|        : JANET_NUMBER)
  ------------------
  |  Branch (30619:13): [True: 27.0k, False: 3.59k]
  ------------------
30620|      0|        case JANET_NIL:
  ------------------
  |  Branch (30620:9): [True: 0, False: 30.6k]
  ------------------
30621|      0|            janet_buffer_push_cstring(buffer, "");
30622|      0|            break;
30623|     73|        case JANET_BOOLEAN:
  ------------------
  |  Branch (30623:9): [True: 73, False: 30.5k]
  ------------------
30624|     73|            janet_buffer_push_cstring(buffer,
30625|     73|                                      janet_unwrap_boolean(x) ? "true" : "false");
  ------------------
  |  |  838|     73|#define janet_unwrap_boolean(x) ((x).u64 & 0x1)
  |  |  ------------------
  |  |  |  Branch (838:33): [True: 73, False: 0]
  |  |  ------------------
  ------------------
30626|     73|            break;
30627|  3.59k|        case JANET_NUMBER:
  ------------------
  |  Branch (30627:9): [True: 3.59k, False: 27.0k]
  ------------------
30628|  3.59k|            number_to_string_b(buffer, janet_unwrap_number(x));
  ------------------
  |  |  839|  3.59k|#define janet_unwrap_number(x) ((x).number)
  ------------------
30629|  3.59k|            break;
30630|  1.07k|        case JANET_STRING:
  ------------------
  |  Branch (30630:9): [True: 1.07k, False: 29.5k]
  ------------------
30631|  25.5k|        case JANET_SYMBOL:
  ------------------
  |  Branch (30631:9): [True: 24.4k, False: 6.11k]
  ------------------
30632|  26.7k|        case JANET_KEYWORD:
  ------------------
  |  Branch (30632:9): [True: 1.19k, False: 29.4k]
  ------------------
30633|  26.7k|            janet_buffer_push_bytes(buffer,
30634|  26.7k|                                    janet_unwrap_string(x),
  ------------------
  |  |  863|  26.7k|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
30635|  26.7k|                                    janet_string_length(janet_unwrap_string(x)));
  ------------------
  |  | 1813|  26.7k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|  26.7k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
30636|  26.7k|            break;
30637|      0|        case JANET_BUFFER: {
  ------------------
  |  Branch (30637:9): [True: 0, False: 30.6k]
  ------------------
30638|      0|            JanetBuffer *to = janet_unwrap_buffer(x);
  ------------------
  |  |  862|      0|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
30639|       |            /* Prevent resizing buffer while appending */
30640|      0|            if (buffer == to) janet_buffer_extra(buffer, to->count);
  ------------------
  |  Branch (30640:17): [True: 0, False: 0]
  ------------------
30641|      0|            janet_buffer_push_bytes(buffer, to->data, to->count);
30642|      0|            break;
30643|  25.5k|        }
30644|      0|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (30644:9): [True: 0, False: 30.6k]
  ------------------
30645|      0|            JanetAbstract p = janet_unwrap_abstract(x);
  ------------------
  |  |  866|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
30646|      0|            const JanetAbstractType *t = janet_abstract_type(p);
  ------------------
  |  | 1899|      0|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|      0|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
30647|      0|            if (t->tostring != NULL) {
  ------------------
  |  Branch (30647:17): [True: 0, False: 0]
  ------------------
30648|      0|                t->tostring(p, buffer);
30649|      0|            } else {
30650|      0|                string_description_b(buffer, t->name, p);
30651|      0|            }
30652|      0|        }
30653|      0|        return;
30654|      0|        case JANET_CFUNCTION: {
  ------------------
  |  Branch (30654:9): [True: 0, False: 30.6k]
  ------------------
30655|      0|            JanetCFunRegistry *reg = janet_registry_get(janet_unwrap_cfunction(x));
  ------------------
  |  |  869|      0|#define janet_unwrap_cfunction(x) ((JanetCFunction)janet_nanbox_to_pointer(x))
  ------------------
30656|      0|            if (NULL != reg) {
  ------------------
  |  Branch (30656:17): [True: 0, False: 0]
  ------------------
30657|      0|                janet_buffer_push_cstring(buffer, "<cfunction ");
30658|      0|                if (NULL != reg->name_prefix) {
  ------------------
  |  Branch (30658:21): [True: 0, False: 0]
  ------------------
30659|      0|                    janet_buffer_push_cstring(buffer, reg->name_prefix);
30660|      0|                    janet_buffer_push_u8(buffer, '/');
30661|      0|                }
30662|      0|                janet_buffer_push_cstring(buffer, reg->name);
30663|      0|                janet_buffer_push_u8(buffer, '>');
30664|      0|                break;
30665|      0|            }
30666|      0|            goto fallthrough;
30667|      0|        }
30668|      0|        case JANET_FUNCTION: {
  ------------------
  |  Branch (30668:9): [True: 0, False: 30.6k]
  ------------------
30669|      0|            JanetFunction *fun = janet_unwrap_function(x);
  ------------------
  |  |  868|      0|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
30670|      0|            JanetFuncDef *def = fun->def;
30671|      0|            if (def == NULL) {
  ------------------
  |  Branch (30671:17): [True: 0, False: 0]
  ------------------
30672|      0|                janet_buffer_push_cstring(buffer, "<incomplete function>");
30673|      0|                break;
30674|      0|            }
30675|      0|            if (def->name) {
  ------------------
  |  Branch (30675:17): [True: 0, False: 0]
  ------------------
30676|      0|                const uint8_t *n = def->name;
30677|      0|                janet_buffer_push_cstring(buffer, "<function ");
30678|      0|                janet_buffer_push_bytes(buffer, n, janet_string_length(n));
  ------------------
  |  | 1813|      0|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|      0|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
30679|      0|                janet_buffer_push_u8(buffer, '>');
30680|      0|                break;
30681|      0|            }
30682|      0|            goto fallthrough;
30683|      0|        }
30684|      0|    fallthrough:
30685|    170|        default:
  ------------------
  |  Branch (30685:9): [True: 170, False: 30.4k]
  ------------------
30686|    170|            string_description_b(buffer, janet_type_names[janet_type(x)], janet_unwrap_pointer(x));
  ------------------
  |  |  795|    170|    (isnan((x).number) \
  |  |  796|    170|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|    170|        : JANET_NUMBER)
  ------------------
                          string_description_b(buffer, janet_type_names[janet_type(x)], janet_unwrap_pointer(x));
  ------------------
  |  |  867|    170|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (30686:59): [True: 170, False: 0]
  ------------------
30687|    170|            break;
30688|  30.6k|    }
30689|  30.6k|}
janet_description_b:
30704|   170k|void janet_description_b(JanetBuffer *buffer, Janet x) {
30705|   170k|    switch (janet_type(x)) {
  ------------------
  |  |  795|   170k|    (isnan((x).number) \
  |  |  796|   170k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|   170k|        : JANET_NUMBER)
  ------------------
  |  Branch (30705:13): [True: 166k, False: 3.59k]
  ------------------
30706|  28.2k|        default:
  ------------------
  |  Branch (30706:9): [True: 28.2k, False: 141k]
  ------------------
30707|  28.2k|            break;
30708|  28.2k|        case JANET_NIL:
  ------------------
  |  Branch (30708:9): [True: 45, False: 170k]
  ------------------
30709|     45|            janet_buffer_push_cstring(buffer, "nil");
30710|     45|            return;
30711|  1.19k|        case JANET_KEYWORD:
  ------------------
  |  Branch (30711:9): [True: 1.19k, False: 169k]
  ------------------
30712|  1.19k|            janet_buffer_push_u8(buffer, ':');
30713|  1.19k|            break;
30714|   139k|        case JANET_STRING:
  ------------------
  |  Branch (30714:9): [True: 139k, False: 30.5k]
  ------------------
30715|   139k|            janet_escape_string_b(buffer, janet_unwrap_string(x));
  ------------------
  |  |  863|   139k|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
30716|   139k|            return;
30717|    149|        case JANET_BUFFER: {
  ------------------
  |  Branch (30717:9): [True: 149, False: 170k]
  ------------------
30718|    149|            JanetBuffer *b = janet_unwrap_buffer(x);
  ------------------
  |  |  862|    149|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
30719|    149|            janet_escape_buffer_b(buffer, b);
30720|    149|            return;
30721|      0|        }
30722|    949|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (30722:9): [True: 949, False: 169k]
  ------------------
30723|    949|            JanetAbstract p = janet_unwrap_abstract(x);
  ------------------
  |  |  866|    949|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
30724|    949|            const JanetAbstractType *t = janet_abstract_type(p);
  ------------------
  |  | 1899|    949|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|    949|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
30725|    949|            if (t->tostring != NULL) {
  ------------------
  |  Branch (30725:17): [True: 949, False: 0]
  ------------------
30726|    949|                janet_buffer_push_cstring(buffer, "<");
30727|    949|                janet_buffer_push_cstring(buffer, t->name);
30728|    949|                janet_buffer_push_cstring(buffer, " ");
30729|    949|                t->tostring(p, buffer);
30730|    949|                janet_buffer_push_cstring(buffer, ">");
30731|    949|            } else {
30732|      0|                string_description_b(buffer, t->name, p);
30733|      0|            }
30734|    949|            return;
30735|      0|        }
30736|   170k|    }
30737|  29.4k|    janet_to_string_b(buffer, x);
30738|  29.4k|}
janet_formatbv:
31391|   150k|void janet_formatbv(JanetBuffer *b, const char *format, va_list args) {
31392|   150k|    const char *format_end = format + strlen(format);
31393|   150k|    const char *c = format;
31394|   150k|    int32_t startlen = b->count;
31395|  1.63M|    while (c < format_end) {
  ------------------
  |  Branch (31395:12): [True: 1.48M, False: 150k]
  ------------------
31396|  1.48M|        if (*c != '%') {
  ------------------
  |  Branch (31396:13): [True: 1.18M, False: 296k]
  ------------------
31397|  1.18M|            janet_buffer_push_u8(b, (uint8_t) *c++);
31398|  1.18M|        } else if (*++c == '%') {
  ------------------
  |  Branch (31398:20): [True: 0, False: 296k]
  ------------------
31399|      0|            janet_buffer_push_u8(b, (uint8_t) *c++);
31400|   296k|        } else {
31401|   296k|            char form[MAX_FORMAT], item[MAX_ITEM];
31402|   296k|            char width[3], precision[3];
31403|   296k|            int nb = 0; /* number of bytes in added item */
31404|   296k|            c = scanformat(c, form, width, precision);
31405|   296k|            switch (*c++) {
31406|      0|                case 'c': {
  ------------------
  |  Branch (31406:17): [True: 0, False: 296k]
  ------------------
31407|      0|                    int n = va_arg(args, int);
31408|      0|                    nb = snprintf(item, MAX_ITEM, form, n);
  ------------------
  |  |31314|      0|#define MAX_ITEM  256
  ------------------
31409|      0|                    break;
31410|      0|                }
31411|   147k|                case 'd':
  ------------------
  |  Branch (31411:17): [True: 147k, False: 149k]
  ------------------
31412|   147k|                case 'i': {
  ------------------
  |  Branch (31412:17): [True: 0, False: 296k]
  ------------------
31413|   147k|                    int64_t n = (int64_t) va_arg(args, int32_t);
31414|   147k|                    nb = snprintf(item, MAX_ITEM, form, n);
  ------------------
  |  |31314|   147k|#define MAX_ITEM  256
  ------------------
31415|   147k|                    break;
31416|   147k|                }
31417|      0|                case 'D':
  ------------------
  |  Branch (31417:17): [True: 0, False: 296k]
  ------------------
31418|      0|                case 'I': {
  ------------------
  |  Branch (31418:17): [True: 0, False: 296k]
  ------------------
31419|      0|                    int64_t n = va_arg(args, int64_t);
31420|      0|                    nb = snprintf(item, MAX_ITEM, form, n);
  ------------------
  |  |31314|      0|#define MAX_ITEM  256
  ------------------
31421|      0|                    break;
31422|      0|                }
31423|      0|                case 'x':
  ------------------
  |  Branch (31423:17): [True: 0, False: 296k]
  ------------------
31424|      0|                case 'X':
  ------------------
  |  Branch (31424:17): [True: 0, False: 296k]
  ------------------
31425|      0|                case 'o':
  ------------------
  |  Branch (31425:17): [True: 0, False: 296k]
  ------------------
31426|      0|                case 'u': {
  ------------------
  |  Branch (31426:17): [True: 0, False: 296k]
  ------------------
31427|      0|                    uint64_t n = va_arg(args, uint64_t);
31428|      0|                    nb = snprintf(item, MAX_ITEM, form, n);
  ------------------
  |  |31314|      0|#define MAX_ITEM  256
  ------------------
31429|      0|                    break;
31430|      0|                }
31431|      0|                case 'a':
  ------------------
  |  Branch (31431:17): [True: 0, False: 296k]
  ------------------
31432|      0|                case 'A':
  ------------------
  |  Branch (31432:17): [True: 0, False: 296k]
  ------------------
31433|      0|                case 'e':
  ------------------
  |  Branch (31433:17): [True: 0, False: 296k]
  ------------------
31434|      0|                case 'E':
  ------------------
  |  Branch (31434:17): [True: 0, False: 296k]
  ------------------
31435|      0|                case 'f':
  ------------------
  |  Branch (31435:17): [True: 0, False: 296k]
  ------------------
31436|      0|                case 'g':
  ------------------
  |  Branch (31436:17): [True: 0, False: 296k]
  ------------------
31437|      0|                case 'G': {
  ------------------
  |  Branch (31437:17): [True: 0, False: 296k]
  ------------------
31438|      0|                    double d = va_arg(args, double);
31439|      0|                    nb = snprintf(item, MAX_ITEM, form, d);
  ------------------
  |  |31314|      0|#define MAX_ITEM  256
  ------------------
31440|      0|                    break;
31441|      0|                }
31442|  7.33k|                case 's':
  ------------------
  |  Branch (31442:17): [True: 7.33k, False: 289k]
  ------------------
31443|  7.85k|                case 'S': {
  ------------------
  |  Branch (31443:17): [True: 517, False: 296k]
  ------------------
31444|  7.85k|                    const char *str = va_arg(args, const char *);
31445|  7.85k|                    int32_t len = (c[-1] == 's')
  ------------------
  |  Branch (31445:35): [True: 7.33k, False: 517]
  ------------------
31446|  7.85k|                                  ? (int32_t) strlen(str)
31447|  7.85k|                                  : janet_string_length((JanetString) str);
  ------------------
  |  | 1813|    517|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|    517|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
31448|  7.85k|                    if (form[2] == '\0')
  ------------------
  |  Branch (31448:25): [True: 7.85k, False: 0]
  ------------------
31449|  7.85k|                        janet_buffer_push_bytes(b, (const uint8_t *) str, len);
31450|      0|                    else {
31451|      0|                        if (len != (int32_t) strlen((const char *) str))
  ------------------
  |  Branch (31451:29): [True: 0, False: 0]
  ------------------
31452|      0|                            janet_panic("string contains zeros");
31453|      0|                        if (!strchr(form, '.') && len >= 100) {
  ------------------
  |  Branch (31453:29): [True: 0, False: 0]
  |  Branch (31453:51): [True: 0, False: 0]
  ------------------
31454|      0|                            janet_panic("no precision and string is too long to be formatted");
31455|      0|                        } else {
31456|      0|                            nb = snprintf(item, MAX_ITEM, form, str);
  ------------------
  |  |31314|      0|#define MAX_ITEM  256
  ------------------
31457|      0|                        }
31458|      0|                    }
31459|  7.85k|                    break;
31460|  7.85k|                }
31461|  7.85k|                case 'V':
  ------------------
  |  Branch (31461:17): [True: 0, False: 296k]
  ------------------
31462|      0|                    janet_to_string_b(b, va_arg(args, Janet));
31463|      0|                    break;
31464|    715|                case 'v':
  ------------------
  |  Branch (31464:17): [True: 715, False: 296k]
  ------------------
31465|    715|                    janet_description_b(b, va_arg(args, Janet));
31466|    715|                    break;
31467|      0|                case 't':
  ------------------
  |  Branch (31467:17): [True: 0, False: 296k]
  ------------------
31468|      0|                    janet_buffer_push_cstring(b, typestr(va_arg(args, Janet)));
31469|      0|                    break;
31470|      0|                case 'T': {
  ------------------
  |  Branch (31470:17): [True: 0, False: 296k]
  ------------------
31471|      0|                    int types = va_arg(args, int);
31472|      0|                    pushtypes(b, types);
31473|      0|                    break;
31474|  7.85k|                }
31475|      0|                case 'M':
  ------------------
  |  Branch (31475:17): [True: 0, False: 296k]
  ------------------
31476|   137k|                case 'm':
  ------------------
  |  Branch (31476:17): [True: 137k, False: 159k]
  ------------------
31477|   137k|                case 'N':
  ------------------
  |  Branch (31477:17): [True: 0, False: 296k]
  ------------------
31478|   137k|                case 'n':
  ------------------
  |  Branch (31478:17): [True: 0, False: 296k]
  ------------------
31479|   137k|                case 'Q':
  ------------------
  |  Branch (31479:17): [True: 0, False: 296k]
  ------------------
31480|   137k|                case 'q':
  ------------------
  |  Branch (31480:17): [True: 0, False: 296k]
  ------------------
31481|   137k|                case 'P':
  ------------------
  |  Branch (31481:17): [True: 0, False: 296k]
  ------------------
31482|   140k|                case 'p': { /* janet pretty , precision = depth */
  ------------------
  |  Branch (31482:17): [True: 2.68k, False: 294k]
  ------------------
31483|   140k|                    int depth = atoi(precision);
31484|   140k|                    if (depth < 1) depth = JANET_RECURSION_GUARD;
  ------------------
  |  |  296|   140k|#define JANET_RECURSION_GUARD 1024
  ------------------
  |  Branch (31484:25): [True: 140k, False: 0]
  ------------------
31485|   140k|                    char d = c[-1];
31486|   140k|                    int has_color = (d == 'P') || (d == 'Q') || (d == 'M') || (d == 'N');
  ------------------
  |  Branch (31486:37): [True: 0, False: 140k]
  |  Branch (31486:51): [True: 0, False: 140k]
  |  Branch (31486:65): [True: 0, False: 140k]
  |  Branch (31486:79): [True: 0, False: 140k]
  ------------------
31487|   140k|                    int has_oneline = (d == 'Q') || (d == 'q') || (d == 'N') || (d == 'n');
  ------------------
  |  Branch (31487:39): [True: 0, False: 140k]
  |  Branch (31487:53): [True: 0, False: 140k]
  |  Branch (31487:67): [True: 0, False: 140k]
  |  Branch (31487:81): [True: 0, False: 140k]
  ------------------
31488|   140k|                    int has_notrunc = (d == 'M') || (d == 'm') || (d == 'N') || (d == 'n');
  ------------------
  |  Branch (31488:39): [True: 0, False: 140k]
  |  Branch (31488:53): [True: 137k, False: 2.68k]
  |  Branch (31488:67): [True: 0, False: 2.68k]
  |  Branch (31488:81): [True: 0, False: 2.68k]
  ------------------
31489|   140k|                    int columns = atoi(width);
31490|   140k|                    if (columns == 0) {
  ------------------
  |  Branch (31490:25): [True: 140k, False: 0]
  ------------------
31491|   140k|                        columns = JANET_COLUMNS;
  ------------------
  |  |31227|   140k|#define JANET_COLUMNS 80
  ------------------
31492|   140k|                    } else if (columns < 0) {
  ------------------
  |  Branch (31492:32): [True: 0, False: 0]
  ------------------
31493|      0|                        has_oneline = 1;
31494|      0|                    }
31495|   140k|                    int flags = 0;
31496|   140k|                    flags |= has_color ? JANET_PRETTY_COLOR : 0;
  ------------------
  |  | 1967|      0|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (31496:30): [True: 0, False: 140k]
  ------------------
31497|   140k|                    flags |= has_oneline ? JANET_PRETTY_ONELINE : 0;
  ------------------
  |  | 1968|      0|#define JANET_PRETTY_ONELINE 2
  ------------------
  |  Branch (31497:30): [True: 0, False: 140k]
  ------------------
31498|   140k|                    flags |= has_notrunc ? JANET_PRETTY_NOTRUNC : 0;
  ------------------
  |  | 1969|   137k|#define JANET_PRETTY_NOTRUNC 4
  ------------------
  |  Branch (31498:30): [True: 137k, False: 2.68k]
  ------------------
31499|   140k|                    janet_pretty_(b, depth, columns, flags,
31500|   140k|                                  va_arg(args, Janet), startlen, b->count);
31501|   140k|                    break;
31502|   137k|                }
31503|      0|                case 'j': {
  ------------------
  |  Branch (31503:17): [True: 0, False: 296k]
  ------------------
31504|      0|                    int depth = atoi(precision);
31505|      0|                    if (depth < 1) {
  ------------------
  |  Branch (31505:25): [True: 0, False: 0]
  ------------------
31506|      0|                        depth = JANET_RECURSION_GUARD;
  ------------------
  |  |  296|      0|#define JANET_RECURSION_GUARD 1024
  ------------------
31507|      0|                    }
31508|      0|                    janet_jdn_(b, depth, va_arg(args, Janet), startlen, b->count);
31509|      0|                    break;
31510|   137k|                }
31511|      0|                default: {
  ------------------
  |  Branch (31511:17): [True: 0, False: 296k]
  ------------------
31512|       |                    /* also treat cases 'nLlh' */
31513|      0|                    janet_panicf("invalid conversion '%s' to 'format'",
31514|      0|                                 form);
31515|   137k|                }
31516|   296k|            }
31517|   296k|            if (nb >= MAX_ITEM)
  ------------------
  |  |31314|   296k|#define MAX_ITEM  256
  ------------------
  |  Branch (31517:17): [True: 0, False: 296k]
  ------------------
31518|      0|                janet_panic("format buffer overflow");
31519|   296k|            if (nb > 0)
  ------------------
  |  Branch (31519:17): [True: 147k, False: 149k]
  ------------------
31520|   147k|                janet_buffer_push_bytes(b, (uint8_t *) item, nb);
31521|   296k|        }
31522|       |
31523|  1.48M|    }
31524|   150k|}
janet_formatc:
31528|  1.38k|const uint8_t *janet_formatc(const char *format, ...) {
31529|  1.38k|    va_list args;
31530|  1.38k|    const uint8_t *ret;
31531|  1.38k|    JanetBuffer buffer;
31532|  1.38k|    int32_t len = 0;
31533|       |
31534|       |    /* Calculate length, init buffer and args */
31535|  36.5k|    while (format[len]) len++;
  ------------------
  |  Branch (31535:12): [True: 35.1k, False: 1.38k]
  ------------------
31536|  1.38k|    janet_buffer_init(&buffer, len);
31537|  1.38k|    va_start(args, format);
31538|       |
31539|       |    /* Run format */
31540|  1.38k|    janet_formatbv(&buffer, format, args);
31541|       |
31542|       |    /* Iterate length */
31543|  1.38k|    va_end(args);
31544|       |
31545|  1.38k|    ret = janet_string(buffer.data, buffer.count);
31546|  1.38k|    janet_buffer_deinit(&buffer);
31547|  1.38k|    return ret;
31548|  1.38k|}
janet_formatb:
31550|  1.41k|JanetBuffer *janet_formatb(JanetBuffer *buffer, const char *format, ...) {
31551|  1.41k|    va_list args;
31552|  1.41k|    va_start(args, format);
31553|  1.41k|    janet_formatbv(buffer, format, args);
31554|       |    va_end(args);
31555|  1.41k|    return buffer;
31556|  1.41k|}
janet_string:
33459|  19.7M|const uint8_t *janet_string(const uint8_t *buf, int32_t len) {
33460|  19.7M|    JanetStringHead *head = janet_gcalloc(JANET_MEMORY_STRING, sizeof(JanetStringHead) + (size_t) len + 1);
33461|  19.7M|    head->length = len;
33462|  19.7M|    head->hash = janet_string_calchash(buf, len);
33463|  19.7M|    uint8_t *data = (uint8_t *)head->data;
33464|  19.7M|    safe_memcpy(data, buf, len);
33465|  19.7M|    data[len] = 0;
33466|  19.7M|    return data;
33467|  19.7M|}
janet_string_compare:
33470|  4.47k|int janet_string_compare(const uint8_t *lhs, const uint8_t *rhs) {
33471|  4.47k|    int32_t xlen = janet_string_length(lhs);
  ------------------
  |  | 1813|  4.47k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|  4.47k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
33472|  4.47k|    int32_t ylen = janet_string_length(rhs);
  ------------------
  |  | 1813|  4.47k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|  4.47k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
33473|  4.47k|    int32_t len = xlen > ylen ? ylen : xlen;
  ------------------
  |  Branch (33473:19): [True: 1.01k, False: 3.46k]
  ------------------
33474|  4.47k|    int res = memcmp(lhs, rhs, len);
33475|  4.47k|    if (res) return res > 0 ? 1 : -1;
  ------------------
  |  Branch (33475:9): [True: 1.83k, False: 2.64k]
  |  Branch (33475:21): [True: 355, False: 1.48k]
  ------------------
33476|  2.64k|    if (xlen == ylen) return 0;
  ------------------
  |  Branch (33476:9): [True: 2.50k, False: 140]
  ------------------
33477|    140|    return xlen < ylen ? -1 : 1;
  ------------------
  |  Branch (33477:12): [True: 63, False: 77]
  ------------------
33478|  2.64k|}
janet_string_equalconst:
33481|  39.5M|int janet_string_equalconst(const uint8_t *lhs, const uint8_t *rhs, int32_t rlen, int32_t rhash) {
33482|  39.5M|    int32_t lhash = janet_string_hash(lhs);
  ------------------
  |  | 1814|  39.5M|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  ------------------
  |  |  |  | 1812|  39.5M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
33483|  39.5M|    int32_t llen = janet_string_length(lhs);
  ------------------
  |  | 1813|  39.5M|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|  39.5M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
33484|  39.5M|    if (lhash != rhash || llen != rlen)
  ------------------
  |  Branch (33484:9): [True: 17.6M, False: 21.8M]
  |  Branch (33484:27): [True: 18, False: 21.8M]
  ------------------
33485|  17.6M|        return 0;
33486|  21.8M|    if (lhs == rhs)
  ------------------
  |  Branch (33486:9): [True: 12.4M, False: 9.47M]
  ------------------
33487|  12.4M|        return 1;
33488|  9.47M|    return !memcmp(lhs, rhs, rlen);
33489|  21.8M|}
janet_string_equal:
33492|  2.09k|int janet_string_equal(const uint8_t *lhs, const uint8_t *rhs) {
33493|  2.09k|    return janet_string_equalconst(lhs, rhs,
33494|  2.09k|                                   janet_string_length(rhs), janet_string_hash(rhs));
  ------------------
  |  | 1813|  2.09k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|  2.09k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
                                                 janet_string_length(rhs), janet_string_hash(rhs));
  ------------------
  |  | 1814|  2.09k|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  ------------------
  |  |  |  | 1812|  2.09k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
33495|  2.09k|}
janet_lib_string:
34067|  6.20k|void janet_lib_string(JanetTable *env) {
34068|  6.20k|    JanetRegExt string_cfuns[] = {
34069|  6.20k|        JANET_CORE_REG("string/slice", cfun_string_slice),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34070|  6.20k|        JANET_CORE_REG("keyword/slice", cfun_keyword_slice),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34071|  6.20k|        JANET_CORE_REG("symbol/slice", cfun_symbol_slice),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34072|  6.20k|        JANET_CORE_REG("string/repeat", cfun_string_repeat),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34073|  6.20k|        JANET_CORE_REG("string/bytes", cfun_string_bytes),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34074|  6.20k|        JANET_CORE_REG("string/from-bytes", cfun_string_frombytes),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34075|  6.20k|        JANET_CORE_REG("string/ascii-lower", cfun_string_asciilower),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34076|  6.20k|        JANET_CORE_REG("string/ascii-upper", cfun_string_asciiupper),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34077|  6.20k|        JANET_CORE_REG("string/reverse", cfun_string_reverse),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34078|  6.20k|        JANET_CORE_REG("string/find", cfun_string_find),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34079|  6.20k|        JANET_CORE_REG("string/find-all", cfun_string_findall),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34080|  6.20k|        JANET_CORE_REG("string/has-prefix?", cfun_string_hasprefix),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34081|  6.20k|        JANET_CORE_REG("string/has-suffix?", cfun_string_hassuffix),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34082|  6.20k|        JANET_CORE_REG("string/replace", cfun_string_replace),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34083|  6.20k|        JANET_CORE_REG("string/replace-all", cfun_string_replaceall),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34084|  6.20k|        JANET_CORE_REG("string/split", cfun_string_split),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34085|  6.20k|        JANET_CORE_REG("string/check-set", cfun_string_checkset),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34086|  6.20k|        JANET_CORE_REG("string/join", cfun_string_join),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34087|  6.20k|        JANET_CORE_REG("string/format", cfun_string_format),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34088|  6.20k|        JANET_CORE_REG("string/trim", cfun_string_trim),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34089|  6.20k|        JANET_CORE_REG("string/triml", cfun_string_triml),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34090|  6.20k|        JANET_CORE_REG("string/trimr", cfun_string_trimr),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34091|  6.20k|        JANET_REG_END
  ------------------
  |  | 2110|  6.20k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
34092|  6.20k|    };
34093|       |    janet_core_cfuns_ext(env, NULL, string_cfuns);
34094|  6.20k|}
janet_scan_number_base:
34355|  13.4k|    double *out) {
34356|  13.4k|    const uint8_t *end = str + len;
34357|  13.4k|    int seenadigit = 0;
34358|  13.4k|    int ex = 0;
34359|  13.4k|    int seenpoint = 0;
34360|  13.4k|    int foundexp = 0;
34361|  13.4k|    int neg = 0;
34362|  13.4k|    struct BigNat mant;
34363|  13.4k|    bignat_zero(&mant);
34364|       |
34365|       |    /* Prevent some kinds of overflow bugs relating to the exponent
34366|       |     * overflowing.  For example, if a string was passed 2GB worth of 0s after
34367|       |     * the decimal point, exponent could wrap around and become positive. It's
34368|       |     * easier to reject ridiculously large inputs than to check for overflows.
34369|       |     * */
34370|  13.4k|    if (len > JANET_NUMBER_LENGTH_RIDICULOUS) goto error;
  ------------------
  |  |34151|  13.4k|#define JANET_NUMBER_LENGTH_RIDICULOUS 0xFFFF
  ------------------
  |  Branch (34370:9): [True: 0, False: 13.4k]
  ------------------
34371|       |
34372|       |    /* Get sign */
34373|  13.4k|    if (str >= end) goto error;
  ------------------
  |  Branch (34373:9): [True: 0, False: 13.4k]
  ------------------
34374|  13.4k|    if (*str == '-') {
  ------------------
  |  Branch (34374:9): [True: 1.65k, False: 11.7k]
  ------------------
34375|  1.65k|        neg = 1;
34376|  1.65k|        str++;
34377|  11.7k|    } else if (*str == '+') {
  ------------------
  |  Branch (34377:16): [True: 884, False: 10.9k]
  ------------------
34378|    884|        str++;
34379|    884|    }
34380|       |
34381|       |    /* Check for leading 0x or digit digit r */
34382|  13.4k|    if (base == 0) {
  ------------------
  |  Branch (34382:9): [True: 13.4k, False: 0]
  ------------------
34383|  13.4k|        if (str + 1 < end && str[0] == '0' && str[1] == 'x') {
  ------------------
  |  Branch (34383:13): [True: 6.43k, False: 7.02k]
  |  Branch (34383:30): [True: 1.24k, False: 5.18k]
  |  Branch (34383:47): [True: 111, False: 1.13k]
  ------------------
34384|    111|            base = 16;
34385|    111|            str += 2;
34386|  13.3k|        } else if (str + 1 < end  &&
  ------------------
  |  Branch (34386:20): [True: 6.32k, False: 7.02k]
  ------------------
34387|  6.32k|                   str[0] >= '0' && str[0] <= '9' &&
  ------------------
  |  Branch (34387:20): [True: 4.75k, False: 1.57k]
  |  Branch (34387:37): [True: 4.57k, False: 179]
  ------------------
34388|  4.57k|                   str[1] == 'r') {
  ------------------
  |  Branch (34388:20): [True: 87, False: 4.48k]
  ------------------
34389|     87|            base = str[0] - '0';
34390|     87|            str += 2;
34391|  13.2k|        } else if (str + 2 < end  &&
  ------------------
  |  Branch (34391:20): [True: 4.43k, False: 8.82k]
  ------------------
34392|  4.43k|                   str[0] >= '0' && str[0] <= '9' &&
  ------------------
  |  Branch (34392:20): [True: 3.51k, False: 926]
  |  Branch (34392:37): [True: 3.37k, False: 135]
  ------------------
34393|  3.37k|                   str[1] >= '0' && str[1] <= '9' &&
  ------------------
  |  Branch (34393:20): [True: 2.52k, False: 848]
  |  Branch (34393:37): [True: 1.91k, False: 617]
  ------------------
34394|  1.91k|                   str[2] == 'r') {
  ------------------
  |  Branch (34394:20): [True: 145, False: 1.76k]
  ------------------
34395|    145|            base = 10 * (str[0] - '0') + (str[1] - '0');
34396|    145|            if (base < 2 || base > 36) goto error;
  ------------------
  |  Branch (34396:17): [True: 11, False: 134]
  |  Branch (34396:29): [True: 48, False: 86]
  ------------------
34397|     86|            str += 3;
34398|     86|        }
34399|  13.4k|    }
34400|       |
34401|       |    /* If still base is 0, set to default (10) */
34402|  13.3k|    if (base == 0) {
  ------------------
  |  Branch (34402:9): [True: 13.1k, False: 280]
  ------------------
34403|  13.1k|        base = 10;
34404|  13.1k|    }
34405|  13.3k|    int exp_base = base;
34406|       |
34407|       |    /* Skip leading zeros */
34408|  20.4k|    while (str < end && (*str == '0' || *str == '.')) {
  ------------------
  |  Branch (34408:12): [True: 16.3k, False: 4.11k]
  |  Branch (34408:26): [True: 4.86k, False: 11.4k]
  |  Branch (34408:41): [True: 2.37k, False: 9.09k]
  ------------------
34409|  7.24k|        if (seenpoint) ex--;
  ------------------
  |  Branch (34409:13): [True: 676, False: 6.56k]
  ------------------
34410|  7.24k|        if (*str == '.') {
  ------------------
  |  Branch (34410:13): [True: 2.37k, False: 4.86k]
  ------------------
34411|  2.37k|            if (seenpoint) goto error;
  ------------------
  |  Branch (34411:17): [True: 189, False: 2.19k]
  ------------------
34412|  2.19k|            seenpoint = 1;
34413|  4.86k|        } else {
34414|  4.86k|            seenadigit = 1;
34415|  4.86k|        }
34416|  7.05k|        str++;
34417|  7.05k|    }
34418|       |
34419|       |    /* Parse significant digits */
34420|  35.8k|    while (str < end) {
  ------------------
  |  Branch (34420:12): [True: 25.5k, False: 10.3k]
  ------------------
34421|  25.5k|        if (*str == '.') {
  ------------------
  |  Branch (34421:13): [True: 316, False: 25.2k]
  ------------------
34422|    316|            if (seenpoint) goto error;
  ------------------
  |  Branch (34422:17): [True: 47, False: 269]
  ------------------
34423|    269|            seenpoint = 1;
34424|  25.2k|        } else if (*str == '&') {
  ------------------
  |  Branch (34424:20): [True: 1.08k, False: 24.1k]
  ------------------
34425|  1.08k|            foundexp = 1;
34426|  1.08k|            break;
34427|  24.1k|        } else if (base == 16 && (*str == 'P' || *str == 'p')) { /* IEEE hex float */
  ------------------
  |  Branch (34427:20): [True: 501, False: 23.6k]
  |  Branch (34427:35): [True: 10, False: 491]
  |  Branch (34427:50): [True: 36, False: 455]
  ------------------
34428|     46|            foundexp = 1;
34429|     46|            exp_base = 10;
34430|     46|            base = 2;
34431|     46|            ex *= 4; /* We need to correct the current exponent after we change the base */
34432|     46|            break;
34433|  24.0k|        } else if (base == 10 && (*str == 'E' || *str == 'e')) {
  ------------------
  |  Branch (34433:20): [True: 21.5k, False: 2.55k]
  |  Branch (34433:35): [True: 504, False: 21.0k]
  |  Branch (34433:50): [True: 238, False: 20.7k]
  ------------------
34434|    742|            foundexp = 1;
34435|    742|            break;
34436|  23.3k|        } else if (*str == '_') {
  ------------------
  |  Branch (34436:20): [True: 874, False: 22.4k]
  ------------------
34437|    874|            if (!seenadigit) goto error;
  ------------------
  |  Branch (34437:17): [True: 143, False: 731]
  ------------------
34438|  22.4k|        } else {
34439|  22.4k|            int digit = digit_lookup[*str & 0x7F];
34440|  22.4k|            if (*str > 127 || digit >= base) goto error;
  ------------------
  |  Branch (34440:17): [True: 142, False: 22.3k]
  |  Branch (34440:31): [True: 666, False: 21.6k]
  ------------------
34441|  21.6k|            if (seenpoint) ex--;
  ------------------
  |  Branch (34441:17): [True: 4.60k, False: 17.0k]
  ------------------
34442|  21.6k|            bignat_muladd(&mant, base, digit);
34443|  21.6k|            seenadigit = 1;
34444|  21.6k|        }
34445|  22.6k|        str++;
34446|  22.6k|    }
34447|       |
34448|  12.2k|    if (!seenadigit)
  ------------------
  |  Branch (34448:9): [True: 1.71k, False: 10.4k]
  ------------------
34449|  1.71k|        goto error;
34450|       |
34451|       |    /* Read exponent */
34452|  10.4k|    if (str < end && foundexp) {
  ------------------
  |  Branch (34452:9): [True: 1.72k, False: 8.76k]
  |  Branch (34452:22): [True: 1.72k, False: 0]
  ------------------
34453|  1.72k|        int eneg = 0;
34454|  1.72k|        int32_t ee = 0;
34455|  1.72k|        seenadigit = 0;
34456|  1.72k|        str++;
34457|  1.72k|        if (str >= end) goto error;
  ------------------
  |  Branch (34457:13): [True: 52, False: 1.67k]
  ------------------
34458|  1.67k|        if (*str == '-') {
  ------------------
  |  Branch (34458:13): [True: 261, False: 1.41k]
  ------------------
34459|    261|            eneg = 1;
34460|    261|            str++;
34461|  1.41k|        } else if (*str == '+') {
  ------------------
  |  Branch (34461:20): [True: 39, False: 1.37k]
  ------------------
34462|     39|            str++;
34463|     39|        }
34464|       |        /* Skip leading 0s in exponent */
34465|  2.23k|        while (str < end && *str == '0') {
  ------------------
  |  Branch (34465:16): [True: 2.12k, False: 109]
  |  Branch (34465:29): [True: 564, False: 1.56k]
  ------------------
34466|    564|            str++;
34467|    564|            seenadigit = 1;
34468|    564|        }
34469|  5.63k|        while (str < end) {
  ------------------
  |  Branch (34469:16): [True: 4.06k, False: 1.57k]
  ------------------
34470|  4.06k|            int digit = digit_lookup[*str & 0x7F];
34471|  4.06k|            if (*str > 127 || digit >= exp_base) goto error;
  ------------------
  |  Branch (34471:17): [True: 31, False: 4.03k]
  |  Branch (34471:31): [True: 67, False: 3.96k]
  ------------------
34472|  3.96k|            if (ee < (INT32_MAX / 40)) {
  ------------------
  |  Branch (34472:17): [True: 3.58k, False: 377]
  ------------------
34473|  3.58k|                ee = exp_base * ee + digit;
34474|  3.58k|            }
34475|  3.96k|            str++;
34476|  3.96k|            seenadigit = 1;
34477|  3.96k|        }
34478|  1.57k|        if (eneg) ex -= ee;
  ------------------
  |  Branch (34478:13): [True: 255, False: 1.32k]
  ------------------
34479|  1.32k|        else ex += ee;
34480|  1.57k|    }
34481|       |
34482|  10.3k|    if (!seenadigit)
  ------------------
  |  Branch (34482:9): [True: 22, False: 10.3k]
  ------------------
34483|     22|        goto error;
34484|       |
34485|  10.3k|    *out = convert(neg, &mant, base, ex);
34486|  10.3k|    janet_free(mant.digits);
  ------------------
  |  | 2415|  10.3k|#define janet_free(X) free((X))
  ------------------
34487|  10.3k|    return 0;
34488|       |
34489|  3.13k|error:
34490|  3.13k|    janet_free(mant.digits);
  ------------------
  |  | 2415|  3.13k|#define janet_free(X) free((X))
  ------------------
34491|  3.13k|    return 1;
34492|  10.3k|}
janet_scan_int64:
34565|  1.85k|int janet_scan_int64(const uint8_t *str, int32_t len, int64_t *out) {
34566|  1.85k|    int neg;
34567|  1.85k|    uint64_t bi;
34568|  1.85k|    if (scan_uint64(str, len, &bi, &neg)) {
  ------------------
  |  Branch (34568:9): [True: 1.41k, False: 445]
  ------------------
34569|  1.41k|        if (neg && bi <= ((UINT64_MAX / 2) + 1)) {
  ------------------
  |  Branch (34569:13): [True: 331, False: 1.08k]
  |  Branch (34569:20): [True: 309, False: 22]
  ------------------
34570|    309|            if (bi > INT64_MAX) {
  ------------------
  |  Branch (34570:17): [True: 12, False: 297]
  ------------------
34571|     12|                *out = INT64_MIN;
34572|    297|            } else {
34573|    297|                *out = -((int64_t) bi);
34574|    297|            }
34575|    309|            return 1;
34576|    309|        }
34577|  1.10k|        if (!neg && bi <= INT64_MAX) {
  ------------------
  |  Branch (34577:13): [True: 1.08k, False: 22]
  |  Branch (34577:21): [True: 1.01k, False: 69]
  ------------------
34578|  1.01k|            *out = (int64_t) bi;
34579|  1.01k|            return 1;
34580|  1.01k|        }
34581|  1.10k|    }
34582|    536|    return 0;
34583|  1.85k|}
janet_scan_uint64:
34585|    755|int janet_scan_uint64(const uint8_t *str, int32_t len, uint64_t *out) {
34586|    755|    int neg;
34587|    755|    uint64_t bi;
34588|    755|    if (scan_uint64(str, len, &bi, &neg)) {
  ------------------
  |  Branch (34588:9): [True: 571, False: 184]
  ------------------
34589|    571|        if (!neg) {
  ------------------
  |  Branch (34589:13): [True: 526, False: 45]
  ------------------
34590|    526|            *out = bi;
34591|    526|            return 1;
34592|    526|        }
34593|    571|    }
34594|    229|    return 0;
34595|    755|}
janet_scan_numeric:
34602|  16.1k|    Janet *out) {
34603|  16.1k|    int result;
34604|  16.1k|    double num;
34605|  16.1k|    int64_t i64 = 0;
34606|  16.1k|    uint64_t u64 = 0;
34607|  16.1k|    if (len < 2 || str[len - 2] != ':') {
  ------------------
  |  Branch (34607:9): [True: 6.51k, False: 9.59k]
  |  Branch (34607:20): [True: 6.90k, False: 2.69k]
  ------------------
34608|  13.4k|        result = janet_scan_number_base(str, len, 0, &num);
34609|  13.4k|        *out = janet_wrap_number(num);
  ------------------
  |  |  835|  13.4k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
34610|  13.4k|        return result;
34611|  13.4k|    }
34612|  2.69k|    switch (str[len - 1]) {
34613|     42|        default:
  ------------------
  |  Branch (34613:9): [True: 42, False: 2.65k]
  ------------------
34614|     42|            return 1;
34615|     36|        case 'n':
  ------------------
  |  Branch (34615:9): [True: 36, False: 2.65k]
  ------------------
34616|     36|            result = janet_scan_number_base(str, len - 2, 0, &num);
34617|     36|            *out = janet_wrap_number(num);
  ------------------
  |  |  835|     36|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
34618|     36|            return result;
34619|       |        /* Condition is inverted janet_scan_int64 and janet_scan_uint64 */
34620|  1.85k|        case 's':
  ------------------
  |  Branch (34620:9): [True: 1.85k, False: 833]
  ------------------
34621|  1.85k|            result = !janet_scan_int64(str, len - 2, &i64);
34622|  1.85k|            *out = janet_wrap_s64(i64);
34623|  1.85k|            return result;
34624|    755|        case 'u':
  ------------------
  |  Branch (34624:9): [True: 755, False: 1.93k]
  ------------------
34625|    755|            result = !janet_scan_uint64(str, len - 2, &u64);
34626|    755|            *out = janet_wrap_u64(u64);
34627|    755|            return result;
34628|  2.69k|    }
34629|  2.69k|}
janet_struct_begin:
34683|  47.7k|JanetKV *janet_struct_begin(int32_t count) {
34684|       |    /* Calculate capacity as power of 2 after 2 * count. */
34685|  47.7k|    int32_t capacity = janet_tablen(2 * count);
34686|  47.7k|    if (capacity < 0) capacity = janet_tablen(count + 1);
  ------------------
  |  Branch (34686:9): [True: 0, False: 47.7k]
  ------------------
34687|       |
34688|  47.7k|    size_t size = sizeof(JanetStructHead) + (size_t) capacity * sizeof(JanetKV);
34689|  47.7k|    JanetStructHead *head = janet_gcalloc(JANET_MEMORY_STRUCT, size);
34690|  47.7k|    head->length = count;
34691|  47.7k|    head->capacity = capacity;
34692|  47.7k|    head->hash = 0;
34693|  47.7k|    head->proto = NULL;
34694|       |
34695|  47.7k|    JanetKV *st = (JanetKV *)(head->data);
34696|  47.7k|    janet_memempty(st, capacity);
34697|  47.7k|    return st;
34698|  47.7k|}
janet_struct_find:
34701|      1|const JanetKV *janet_struct_find(const JanetKV *st, Janet key) {
34702|       |    return janet_dict_find(st, janet_struct_capacity(st), key);
  ------------------
  |  | 1849|      1|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1846|      1|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
34703|      1|}
janet_struct_put_ext:
34713|   298k|void janet_struct_put_ext(JanetKV *st, Janet key, Janet value, int replace) {
34714|   298k|    int32_t cap = janet_struct_capacity(st);
  ------------------
  |  | 1849|   298k|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1846|   298k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
34715|   298k|    int32_t hash = janet_hash(key);
34716|   298k|    int32_t index = janet_maphash(cap, hash);
  ------------------
  |  |  396|   298k|#define janet_maphash(cap, hash) ((uint32_t)(hash) & (cap - 1))
  ------------------
34717|   298k|    int32_t i, j, dist;
34718|   298k|    int32_t bounds[4] = {index, cap, 0, index};
34719|   298k|    if (janet_checktype(key, JANET_NIL) || janet_checktype(value, JANET_NIL)) return;
  ------------------
  |  |  806|   597k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 46, False: 298k]
  |  |  |  Branch (806:6): [Folded, False: 298k]
  |  |  ------------------
  |  |  807|   597k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   597k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   298k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   298k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   298k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   298k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  if (janet_checktype(key, JANET_NIL) || janet_checktype(value, JANET_NIL)) return;
  ------------------
  |  |  806|   298k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 28, False: 298k]
  |  |  |  Branch (806:6): [Folded, False: 298k]
  |  |  ------------------
  |  |  807|   298k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   298k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   298k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   298k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   298k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   298k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34720|   298k|    if (janet_checktype(key, JANET_NUMBER) && isnan(janet_unwrap_number(key))) return;
  ------------------
  |  |  806|   597k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 1.16k, False: 297k]
  |  |  |  Branch (806:6): [True: 298k, Folded]
  |  |  ------------------
  |  |  807|   597k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|   298k|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 1.16k, False: 297k]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 297k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   597k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (34720:47): [True: 0, False: 1.16k]
  ------------------
34721|       |    /* Avoid extra items */
34722|   298k|    if (janet_struct_hash(st) == janet_struct_length(st)) return;
  ------------------
  |  | 1850|   298k|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1846|   298k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                  if (janet_struct_hash(st) == janet_struct_length(st)) return;
  ------------------
  |  | 1848|   298k|#define janet_struct_length(t) (janet_struct_head(t)->length)
  |  |  ------------------
  |  |  |  | 1846|   298k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (34722:9): [True: 0, False: 298k]
  ------------------
34723|   298k|    for (dist = 0, j = 0; j < 4; j += 2)
  ------------------
  |  Branch (34723:27): [True: 298k, False: 0]
  ------------------
34724|   424k|        for (i = bounds[j]; i < bounds[j + 1]; i++, dist++) {
  ------------------
  |  Branch (34724:29): [True: 424k, False: 94]
  ------------------
34725|   424k|            int status;
34726|   424k|            int32_t otherhash;
34727|   424k|            int32_t otherindex, otherdist;
34728|   424k|            JanetKV *kv = st + i;
34729|       |            /* We found an empty slot, so just add key and value */
34730|   424k|            if (janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|   424k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 297k, False: 127k]
  |  |  |  Branch (806:6): [Folded, False: 424k]
  |  |  ------------------
  |  |  807|   424k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   424k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   424k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   424k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   424k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   424k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34731|   297k|                kv->key = key;
34732|   297k|                kv->value = value;
34733|       |                /* Update the temporary count */
34734|   297k|                janet_struct_hash(st)++;
  ------------------
  |  | 1850|   297k|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1846|   297k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
34735|   297k|                return;
34736|   297k|            }
34737|       |            /* Robinhood hashing - check if colliding kv pair
34738|       |             * is closer to their source than current. We use robinhood
34739|       |             * hashing to ensure that equivalent structs that are constructed
34740|       |             * with different order have the same internal layout, and therefor
34741|       |             * will compare properly - i.e., {1 2 3 4} should equal {3 4 1 2}.
34742|       |             * Collisions are resolved via an insertion sort insertion. */
34743|   127k|            otherhash = janet_hash(kv->key);
34744|   127k|            otherindex = janet_maphash(cap, otherhash);
  ------------------
  |  |  396|   127k|#define janet_maphash(cap, hash) ((uint32_t)(hash) & (cap - 1))
  ------------------
34745|   127k|            otherdist = (i + cap - otherindex) & (cap - 1);
34746|   127k|            if (dist < otherdist)
  ------------------
  |  Branch (34746:17): [True: 62.3k, False: 64.8k]
  ------------------
34747|  62.3k|                status = -1;
34748|  64.8k|            else if (otherdist < dist)
  ------------------
  |  Branch (34748:22): [True: 189, False: 64.6k]
  ------------------
34749|    189|                status = 1;
34750|  64.6k|            else if (hash < otherhash)
  ------------------
  |  Branch (34750:22): [True: 62.5k, False: 2.04k]
  ------------------
34751|  62.5k|                status = -1;
34752|  2.04k|            else if (otherhash < hash)
  ------------------
  |  Branch (34752:22): [True: 354, False: 1.69k]
  ------------------
34753|    354|                status = 1;
34754|  1.69k|            else
34755|  1.69k|                status = janet_compare(key, kv->key);
34756|       |            /* If other is closer to their ideal slot */
34757|   127k|            if (status == 1) {
  ------------------
  |  Branch (34757:17): [True: 636, False: 126k]
  ------------------
34758|       |                /* Swap current kv pair with pair in slot */
34759|    636|                JanetKV temp = *kv;
34760|    636|                kv->key = key;
34761|    636|                kv->value = value;
34762|    636|                key = temp.key;
34763|    636|                value = temp.value;
34764|       |                /* Save dist and hash of new kv pair */
34765|    636|                dist = otherdist;
34766|    636|                hash = otherhash;
34767|   126k|            } else if (status == 0) {
  ------------------
  |  Branch (34767:24): [True: 1.35k, False: 125k]
  ------------------
34768|  1.35k|                if (replace) {
  ------------------
  |  Branch (34768:21): [True: 1.35k, False: 0]
  ------------------
34769|       |                    /* A key was added to the struct more than once - replace old value */
34770|  1.35k|                    kv->value = value;
34771|  1.35k|                }
34772|  1.35k|                return;
34773|  1.35k|            }
34774|   127k|        }
34775|   298k|}
janet_struct_put:
34777|   298k|void janet_struct_put(JanetKV *st, Janet key, Janet value) {
34778|   298k|    janet_struct_put_ext(st, key, value, 1);
34779|   298k|}
janet_struct_end:
34782|  47.3k|const JanetKV *janet_struct_end(JanetKV *st) {
34783|  47.3k|    if (janet_struct_hash(st) != janet_struct_length(st)) {
  ------------------
  |  | 1850|  47.3k|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1846|  47.3k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                  if (janet_struct_hash(st) != janet_struct_length(st)) {
  ------------------
  |  | 1848|  47.3k|#define janet_struct_length(t) (janet_struct_head(t)->length)
  |  |  ------------------
  |  |  |  | 1846|  47.3k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (34783:9): [True: 392, False: 46.9k]
  ------------------
34784|       |        /* Error building struct, probably duplicate values. We need to rebuild
34785|       |         * the struct using only the values that went in. The second creation should always
34786|       |         * succeed. */
34787|    392|        JanetKV *newst = janet_struct_begin(janet_struct_hash(st));
  ------------------
  |  | 1850|    392|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1846|    392|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
34788|  10.4k|        for (int32_t i = 0; i < janet_struct_capacity(st); i++) {
  ------------------
  |  | 1849|  10.4k|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1846|  10.4k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (34788:29): [True: 10.0k, False: 392]
  ------------------
34789|  10.0k|            JanetKV *kv = st + i;
34790|  10.0k|            if (!janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|  10.0k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 10.0k]
  |  |  ------------------
  |  |  807|  10.0k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  10.0k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  10.0k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  10.0k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  10.0k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  10.0k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (34790:17): [True: 1.81k, False: 8.27k]
  ------------------
34791|  1.81k|                janet_struct_put(newst, kv->key, kv->value);
34792|  1.81k|            }
34793|  10.0k|        }
34794|    392|        janet_struct_proto(newst) = janet_struct_proto(st);
  ------------------
  |  | 1851|    392|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1846|    392|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                      janet_struct_proto(newst) = janet_struct_proto(st);
  ------------------
  |  | 1851|    392|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1846|    392|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
34795|    392|        st = newst;
34796|    392|    }
34797|  47.3k|    janet_struct_hash(st) = janet_kv_calchash(st, janet_struct_capacity(st));
  ------------------
  |  | 1850|  47.3k|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1846|  47.3k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                  janet_struct_hash(st) = janet_kv_calchash(st, janet_struct_capacity(st));
  ------------------
  |  | 1849|  47.3k|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1846|  47.3k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
34798|  47.3k|    if (janet_struct_proto(st)) {
  ------------------
  |  | 1851|  47.3k|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1846|  47.3k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  |  |  |  Branch (1851:31): [True: 0, False: 47.3k]
  |  |  ------------------
  ------------------
34799|      0|        janet_struct_hash(st) += 2654435761u * janet_struct_hash(janet_struct_proto(st));
  ------------------
  |  | 1850|      0|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1846|      0|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                      janet_struct_hash(st) += 2654435761u * janet_struct_hash(janet_struct_proto(st));
  ------------------
  |  | 1850|      0|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1846|      0|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
34800|      0|    }
34801|  47.3k|    return (const JanetKV *)st;
34802|  47.3k|}
janet_struct_get:
34811|      1|Janet janet_struct_get(const JanetKV *st, Janet key) {
34812|      2|    for (int i = JANET_MAX_PROTO_DEPTH; st && i; --i, st = janet_struct_proto(st)) {
  ------------------
  |  |  299|      1|#define JANET_MAX_PROTO_DEPTH 200
  ------------------
                  for (int i = JANET_MAX_PROTO_DEPTH; st && i; --i, st = janet_struct_proto(st)) {
  ------------------
  |  | 1851|      1|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1846|      1|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (34812:41): [True: 1, False: 1]
  |  Branch (34812:47): [True: 1, False: 0]
  ------------------
34813|      1|        const JanetKV *kv = janet_struct_find(st, key);
34814|      1|        if (NULL != kv && !janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|      1|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 1]
  |  |  ------------------
  |  |  807|      1|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|      1|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|      1|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      1|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (34814:13): [True: 1, False: 0]
  |  Branch (34814:27): [True: 0, False: 1]
  ------------------
34815|      0|            return kv->value;
34816|      0|        }
34817|      1|    }
34818|      1|    return janet_wrap_nil();
  ------------------
  |  |  831|      1|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|      1|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34819|      1|}
janet_lib_struct:
34949|  6.20k|void janet_lib_struct(JanetTable *env) {
34950|  6.20k|    JanetRegExt struct_cfuns[] = {
34951|  6.20k|        JANET_CORE_REG("struct/with-proto", cfun_struct_with_proto),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34952|  6.20k|        JANET_CORE_REG("struct/getproto", cfun_struct_getproto),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34953|  6.20k|        JANET_CORE_REG("struct/proto-flatten", cfun_struct_flatten),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34954|  6.20k|        JANET_CORE_REG("struct/to-table", cfun_struct_to_table),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34955|  6.20k|        JANET_CORE_REG("struct/rawget", cfun_struct_rawget),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34956|  6.20k|        JANET_REG_END
  ------------------
  |  | 2110|  6.20k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
34957|  6.20k|    };
34958|       |    janet_core_cfuns_ext(env, NULL, struct_cfuns);
34959|  6.20k|}
janet_symcache_init:
35004|  6.20k|void janet_symcache_init() {
35005|  6.20k|    janet_vm.cache_capacity = 1024;
35006|  6.20k|    janet_vm.cache = janet_calloc(1, (size_t) janet_vm.cache_capacity * sizeof(const uint8_t *));
  ------------------
  |  | 2412|  6.20k|#define janet_calloc(X, Y) calloc((X), (Y))
  ------------------
35007|  6.20k|    if (NULL == janet_vm.cache) {
  ------------------
  |  Branch (35007:9): [True: 0, False: 6.20k]
  ------------------
35008|      0|        JANET_OUT_OF_MEMORY;
  ------------------
  |  |  419|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (419:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
35009|      0|    }
35010|  6.20k|    memset(&janet_vm.gensym_counter, '0', sizeof(janet_vm.gensym_counter));
35011|  6.20k|    janet_vm.gensym_counter[0] = '_';
35012|  6.20k|    janet_vm.cache_count = 0;
35013|  6.20k|    janet_vm.cache_deleted = 0;
35014|  6.20k|}
janet_symcache_deinit:
35017|  6.20k|void janet_symcache_deinit() {
35018|  6.20k|    janet_free((void *)janet_vm.cache);
  ------------------
  |  | 2415|  6.20k|#define janet_free(X) free((X))
  ------------------
35019|       |    janet_vm.cache = NULL;
35020|  6.20k|    janet_vm.cache_capacity = 0;
35021|  6.20k|    janet_vm.cache_count = 0;
35022|  6.20k|    janet_vm.cache_deleted = 0;
35023|  6.20k|}
janet_symbol_deinit:
35125|  12.4M|void janet_symbol_deinit(const uint8_t *sym) {
35126|  12.4M|    int status = 0;
35127|  12.4M|    const uint8_t **bucket = janet_symcache_find(sym, &status);
  ------------------
  |  |35080|  12.4M|    janet_symcache_findmem((str), janet_string_length(str), janet_string_hash(str), (success))
  |  |  ------------------
  |  |  |  | 1813|  12.4M|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1812|  12.4M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   janet_symcache_findmem((str), janet_string_length(str), janet_string_hash(str), (success))
  |  |  ------------------
  |  |  |  | 1814|  12.4M|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1812|  12.4M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35128|  12.4M|    if (status) {
  ------------------
  |  Branch (35128:9): [True: 12.4M, False: 0]
  ------------------
35129|  12.4M|        janet_vm.cache_count--;
35130|  12.4M|        janet_vm.cache_deleted++;
35131|  12.4M|        *bucket = JANET_SYMCACHE_DELETED;
35132|  12.4M|    }
35133|  12.4M|}
janet_symbol:
35136|  17.6M|const uint8_t *janet_symbol(const uint8_t *str, int32_t len) {
35137|  17.6M|    int32_t hash = janet_string_calchash(str, len);
35138|  17.6M|    uint8_t *newstr;
35139|  17.6M|    int success = 0;
35140|  17.6M|    const uint8_t **bucket = janet_symcache_findmem(str, len, hash, &success);
35141|  17.6M|    if (success)
  ------------------
  |  Branch (35141:9): [True: 5.19M, False: 12.4M]
  ------------------
35142|  5.19M|        return *bucket;
35143|  12.4M|    JanetStringHead *head = janet_gcalloc(JANET_MEMORY_SYMBOL, sizeof(JanetStringHead) + (size_t) len + 1);
35144|  12.4M|    head->hash = hash;
35145|  12.4M|    head->length = len;
35146|  12.4M|    newstr = (uint8_t *)(head->data);
35147|  12.4M|    safe_memcpy(newstr, str, len);
35148|  12.4M|    newstr[len] = 0;
35149|  12.4M|    janet_symcache_put((const uint8_t *)newstr, bucket);
35150|  12.4M|    return newstr;
35151|  17.6M|}
janet_csymbol:
35154|  2.32M|const uint8_t *janet_csymbol(const char *cstr) {
35155|  2.32M|    return janet_symbol((const uint8_t *)cstr, (int32_t) strlen(cstr));
35156|  2.32M|}
janet_table_init:
35280|   140k|JanetTable *janet_table_init(JanetTable *table, int32_t capacity) {
35281|   140k|    return janet_table_init_impl(table, capacity, 1);
35282|   140k|}
janet_table_init_raw:
35285|  18.6k|JanetTable *janet_table_init_raw(JanetTable *table, int32_t capacity) {
35286|  18.6k|    return janet_table_init_impl(table, capacity, 0);
35287|  18.6k|}
janet_table_deinit:
35290|   159k|void janet_table_deinit(JanetTable *table) {
35291|   159k|    if (table->gc.flags & JANET_TABLE_FLAG_STACK) {
  ------------------
  |  |35240|   159k|#define JANET_TABLE_FLAG_STACK 0x10000
  ------------------
  |  Branch (35291:9): [True: 140k, False: 18.6k]
  ------------------
35292|   140k|        janet_sfree(table->data);
35293|   140k|    } else {
35294|  18.6k|        janet_free(table->data);
  ------------------
  |  | 2415|  18.6k|#define janet_free(X) free((X))
  ------------------
35295|  18.6k|    }
35296|   159k|}
janet_table:
35300|  4.55M|JanetTable *janet_table(int32_t capacity) {
35301|  4.55M|    JanetTable *table = janet_gcalloc(JANET_MEMORY_TABLE, sizeof(JanetTable));
35302|  4.55M|    return janet_table_init_impl(table, capacity, 0);
35303|  4.55M|}
janet_table_find:
35322|  56.0M|JanetKV *janet_table_find(JanetTable *t, Janet key) {
35323|  56.0M|    return (JanetKV *) janet_dict_find(t->data, t->capacity, key);
35324|  56.0M|}
janet_table_get:
35358|  2.44M|Janet janet_table_get(JanetTable *t, Janet key) {
35359|  2.67M|    for (int i = JANET_MAX_PROTO_DEPTH; t && i; t = t->proto, --i) {
  ------------------
  |  |  299|  2.44M|#define JANET_MAX_PROTO_DEPTH 200
  ------------------
  |  Branch (35359:41): [True: 2.44M, False: 223k]
  |  Branch (35359:46): [True: 2.44M, False: 0]
  ------------------
35360|  2.44M|        JanetKV *bucket = janet_table_find(t, key);
35361|  2.44M|        if (NULL != bucket && !janet_checktype(bucket->key, JANET_NIL))
  ------------------
  |  |  806|  2.44M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 2.44M]
  |  |  ------------------
  |  |  807|  2.44M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  2.44M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  2.44M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  2.44M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.44M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.44M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35361:13): [True: 2.44M, False: 0]
  |  Branch (35361:31): [True: 2.22M, False: 223k]
  ------------------
35362|  2.22M|            return bucket->value;
35363|  2.44M|    }
35364|   223k|    return janet_wrap_nil();
  ------------------
  |  |  831|   223k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   223k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   223k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   223k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35365|  2.44M|}
janet_table_get_keyword:
35368|  74.4k|Janet janet_table_get_keyword(JanetTable *t, const char *keyword) {
35369|  74.4k|    int32_t keyword_len = (int32_t) strlen(keyword);
35370|   130k|    for (int i = JANET_MAX_PROTO_DEPTH; t && i; t = t->proto, --i) {
  ------------------
  |  |  299|  74.4k|#define JANET_MAX_PROTO_DEPTH 200
  ------------------
  |  Branch (35370:41): [True: 74.4k, False: 55.8k]
  |  Branch (35370:46): [True: 74.4k, False: 0]
  ------------------
35371|  74.4k|        JanetKV *bucket = (JanetKV *) janet_dict_find_keyword(t->data, t->capacity, (const uint8_t *) keyword, keyword_len);
35372|  74.4k|        if (NULL != bucket && !janet_checktype(bucket->key, JANET_NIL))
  ------------------
  |  |  806|  74.4k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 74.4k]
  |  |  ------------------
  |  |  807|  74.4k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  74.4k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  74.4k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  74.4k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  74.4k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  74.4k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35372:13): [True: 74.4k, False: 0]
  |  Branch (35372:31): [True: 18.6k, False: 55.8k]
  ------------------
35373|  18.6k|            return bucket->value;
35374|  74.4k|    }
35375|  55.8k|    return janet_wrap_nil();
  ------------------
  |  |  831|  55.8k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  55.8k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  55.8k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  55.8k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35376|  74.4k|}
janet_table_get_ex:
35379|     45|Janet janet_table_get_ex(JanetTable *t, Janet key, JanetTable **which) {
35380|     90|    for (int i = JANET_MAX_PROTO_DEPTH; t && i; t = t->proto, --i) {
  ------------------
  |  |  299|     45|#define JANET_MAX_PROTO_DEPTH 200
  ------------------
  |  Branch (35380:41): [True: 45, False: 45]
  |  Branch (35380:46): [True: 45, False: 0]
  ------------------
35381|     45|        JanetKV *bucket = janet_table_find(t, key);
35382|     45|        if (NULL != bucket && !janet_checktype(bucket->key, JANET_NIL)) {
  ------------------
  |  |  806|     45|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 45]
  |  |  ------------------
  |  |  807|     45|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|     45|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|     45|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|     45|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     45|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     45|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35382:13): [True: 45, False: 0]
  |  Branch (35382:31): [True: 0, False: 45]
  ------------------
35383|      0|            *which = t;
35384|      0|            return bucket->value;
35385|      0|        }
35386|     45|    }
35387|     45|    return janet_wrap_nil();
  ------------------
  |  |  831|     45|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|     45|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     45|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     45|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35388|     45|}
janet_table_rawget:
35391|  13.5k|Janet janet_table_rawget(JanetTable *t, Janet key) {
35392|  13.5k|    JanetKV *bucket = janet_table_find(t, key);
35393|  13.5k|    if (NULL != bucket && !janet_checktype(bucket->key, JANET_NIL))
  ------------------
  |  |  806|  13.5k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 13.5k]
  |  |  ------------------
  |  |  807|  13.5k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  13.5k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  13.5k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  13.5k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  13.5k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  13.5k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35393:9): [True: 13.5k, False: 0]
  |  Branch (35393:27): [True: 125, False: 13.4k]
  ------------------
35394|    125|        return bucket->value;
35395|  13.4k|    else
35396|  13.4k|        return janet_wrap_nil();
  ------------------
  |  |  831|  13.4k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  13.4k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  13.4k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  13.4k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35397|  13.5k|}
janet_table_remove:
35401|   191k|Janet janet_table_remove(JanetTable *t, Janet key) {
35402|   191k|    JanetKV *bucket = janet_table_find(t, key);
35403|   191k|    if (NULL != bucket && !janet_checktype(bucket->key, JANET_NIL)) {
  ------------------
  |  |  806|   191k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 191k]
  |  |  ------------------
  |  |  807|   191k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   191k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   191k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   191k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   191k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   191k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35403:9): [True: 191k, False: 0]
  |  Branch (35403:27): [True: 164k, False: 27.6k]
  ------------------
35404|   164k|        Janet ret = bucket->value;
35405|   164k|        t->count--;
35406|   164k|        t->deleted++;
35407|   164k|        bucket->key = janet_wrap_nil();
  ------------------
  |  |  831|   164k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   164k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   164k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   164k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35408|   164k|        bucket->value = janet_wrap_false();
  ------------------
  |  |  833|   164k|#define janet_wrap_false() janet_nanbox_from_payload(JANET_BOOLEAN, 0)
  |  |  ------------------
  |  |  |  |  822|   164k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   164k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   164k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35409|   164k|        return ret;
35410|   164k|    } else {
35411|  27.6k|        return janet_wrap_nil();
  ------------------
  |  |  831|  27.6k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  27.6k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  27.6k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  27.6k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35412|  27.6k|    }
35413|   191k|}
janet_table_put:
35416|  29.3M|void janet_table_put(JanetTable *t, Janet key, Janet value) {
35417|  29.3M|    if (janet_checktype(key, JANET_NIL)) return;
  ------------------
  |  |  806|  29.3M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 40, False: 29.3M]
  |  |  |  Branch (806:6): [Folded, False: 29.3M]
  |  |  ------------------
  |  |  807|  29.3M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  29.3M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  29.3M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  29.3M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  29.3M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  29.3M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35418|  29.3M|    if (janet_checktype(key, JANET_NUMBER) && isnan(janet_unwrap_number(key))) return;
  ------------------
  |  |  806|  58.7M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 1.83k, False: 29.3M]
  |  |  |  Branch (806:6): [True: 29.3M, Folded]
  |  |  ------------------
  |  |  807|  58.7M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|  29.3M|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 1.83k, False: 29.3M]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 29.3M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  58.7M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35418:47): [True: 0, False: 1.83k]
  ------------------
35419|  29.3M|    if (janet_checktype(value, JANET_NIL)) {
  ------------------
  |  |  806|  29.3M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 40, False: 29.3M]
  |  |  |  Branch (806:6): [Folded, False: 29.3M]
  |  |  ------------------
  |  |  807|  29.3M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  29.3M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  29.3M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  29.3M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  29.3M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  29.3M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35420|     40|        janet_table_remove(t, key);
35421|  29.3M|    } else {
35422|  29.3M|        JanetKV *bucket = janet_table_find(t, key);
35423|  29.3M|        if (NULL != bucket && !janet_checktype(bucket->key, JANET_NIL)) {
  ------------------
  |  |  806|  29.3M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 29.3M]
  |  |  ------------------
  |  |  807|  29.3M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  29.3M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  29.3M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  29.3M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  29.3M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  29.3M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35423:13): [True: 29.3M, False: 0]
  |  Branch (35423:31): [True: 363, False: 29.3M]
  ------------------
35424|    363|            bucket->value = value;
35425|  29.3M|        } else {
35426|  29.3M|            if (NULL == bucket || 2 * (t->count + t->deleted + 1) > t->capacity) {
  ------------------
  |  Branch (35426:17): [True: 0, False: 29.3M]
  |  Branch (35426:35): [True: 3.68M, False: 25.6M]
  ------------------
35427|  3.68M|                janet_table_rehash(t, janet_tablen(2 * t->count + 2));
35428|  3.68M|                bucket = janet_table_find(t, key);
35429|  3.68M|            }
35430|  29.3M|            if (janet_checktype(bucket->value, JANET_BOOLEAN))
  ------------------
  |  |  806|  29.3M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 29.3M]
  |  |  |  Branch (806:6): [Folded, False: 29.3M]
  |  |  ------------------
  |  |  807|  29.3M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  29.3M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  29.3M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  29.3M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  29.3M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  29.3M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35431|      0|                --t->deleted;
35432|  29.3M|            bucket->key = key;
35433|  29.3M|            bucket->value = value;
35434|  29.3M|            ++t->count;
35435|  29.3M|        }
35436|  29.3M|    }
35437|  29.3M|}
janet_table_clone:
35466|     77|JanetTable *janet_table_clone(JanetTable *table) {
35467|     77|    JanetTable *newTable = janet_gcalloc(JANET_MEMORY_TABLE, sizeof(JanetTable));
35468|     77|    newTable->count = table->count;
35469|     77|    newTable->capacity = table->capacity;
35470|     77|    newTable->deleted = table->deleted;
35471|     77|    newTable->proto = table->proto;
35472|     77|    newTable->data = array_allocate(sizeof(JanetKV), newTable->capacity);
35473|     77|    if (NULL == newTable->data) {
  ------------------
  |  Branch (35473:9): [True: 0, False: 77]
  ------------------
35474|      0|        JANET_OUT_OF_MEMORY;
  ------------------
  |  |  419|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (419:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
35475|      0|    }
35476|     77|    memcpy(newTable->data, table->data, (size_t) table->capacity * sizeof(JanetKV));
35477|     77|    return newTable;
35478|     77|}
janet_lib_table:
35646|  6.20k|void janet_lib_table(JanetTable *env) {
35647|  6.20k|    JanetRegExt table_cfuns[] = {
35648|  6.20k|        JANET_CORE_REG("table/new", cfun_table_new),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35649|  6.20k|        JANET_CORE_REG("table/weak", cfun_table_weak),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35650|  6.20k|        JANET_CORE_REG("table/weak-keys", cfun_table_weak_keys),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35651|  6.20k|        JANET_CORE_REG("table/weak-values", cfun_table_weak_values),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35652|  6.20k|        JANET_CORE_REG("table/to-struct", cfun_table_tostruct),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35653|  6.20k|        JANET_CORE_REG("table/getproto", cfun_table_getproto),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35654|  6.20k|        JANET_CORE_REG("table/setproto", cfun_table_setproto),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35655|  6.20k|        JANET_CORE_REG("table/rawget", cfun_table_rawget),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35656|  6.20k|        JANET_CORE_REG("table/clone", cfun_table_clone),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35657|  6.20k|        JANET_CORE_REG("table/clear", cfun_table_clear),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35658|  6.20k|        JANET_CORE_REG("table/proto-flatten", cfun_table_proto_flatten),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35659|  6.20k|        JANET_REG_END
  ------------------
  |  | 2110|  6.20k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
35660|  6.20k|    };
35661|       |    janet_core_cfuns_ext(env, NULL, table_cfuns);
35662|  6.20k|}
janet_tuple_begin:
35701|  4.72M|Janet *janet_tuple_begin(int32_t length) {
35702|  4.72M|    size_t size = sizeof(JanetTupleHead) + ((size_t) length * sizeof(Janet));
35703|  4.72M|    JanetTupleHead *head = janet_gcalloc(JANET_MEMORY_TUPLE, size);
35704|  4.72M|    head->sm_line = -1;
35705|  4.72M|    head->sm_column = -1;
35706|  4.72M|    head->length = length;
35707|  4.72M|    return (Janet *)(head->data);
35708|  4.72M|}
janet_tuple_end:
35711|  4.72M|const Janet *janet_tuple_end(Janet *tuple) {
35712|  4.72M|    janet_tuple_hash(tuple) = janet_array_calchash(tuple, janet_tuple_length(tuple));
  ------------------
  |  | 1803|  4.72M|#define janet_tuple_hash(t) (janet_tuple_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1800|  4.72M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                  janet_tuple_hash(tuple) = janet_array_calchash(tuple, janet_tuple_length(tuple));
  ------------------
  |  | 1802|  4.72M|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1800|  4.72M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
35713|  4.72M|    return (const Janet *)tuple;
35714|  4.72M|}
janet_tuple_n:
35717|  13.3k|const Janet *janet_tuple_n(const Janet *values, int32_t n) {
35718|  13.3k|    Janet *t = janet_tuple_begin(n);
35719|  13.3k|    safe_memcpy(t, values, sizeof(Janet) * n);
35720|  13.3k|    return janet_tuple_end(t);
35721|  13.3k|}
janet_lib_tuple:
35821|  6.20k|void janet_lib_tuple(JanetTable *env) {
35822|  6.20k|    JanetRegExt tuple_cfuns[] = {
35823|  6.20k|        JANET_CORE_REG("tuple/brackets", cfun_tuple_brackets),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35824|  6.20k|        JANET_CORE_REG("tuple/slice", cfun_tuple_slice),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35825|  6.20k|        JANET_CORE_REG("tuple/type", cfun_tuple_type),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35826|  6.20k|        JANET_CORE_REG("tuple/sourcemap", cfun_tuple_sourcemap),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35827|  6.20k|        JANET_CORE_REG("tuple/setmap", cfun_tuple_setmap),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35828|  6.20k|        JANET_CORE_REG("tuple/join", cfun_tuple_join),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35829|  6.20k|        JANET_REG_END
  ------------------
  |  | 2110|  6.20k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
35830|  6.20k|    };
35831|       |    janet_core_cfuns_ext(env, NULL, tuple_cfuns);
35832|  6.20k|}
janet_hash_mix:
35958|  42.3M|uint32_t janet_hash_mix(uint32_t input, uint32_t more) {
35959|  42.3M|    uint32_t mix1 = (more + 0x9e3779b9 + (input << 6) + (input >> 2));
35960|  42.3M|    return input ^ (0x9e3779b9 + (mix1 << 6) + (mix1 >> 2));
35961|  42.3M|}
janet_string_calchash:
35965|  37.4M|int32_t janet_string_calchash(const uint8_t *str, int32_t len) {
35966|  37.4M|    if (NULL == str || len == 0) return 5381;
  ------------------
  |  Branch (35966:9): [True: 289, False: 37.4M]
  |  Branch (35966:24): [True: 10.5M, False: 26.8M]
  ------------------
35967|  26.8M|    const uint8_t *end = str + len;
35968|  26.8M|    uint32_t hash = 5381;
35969|  1.11G|    while (str < end)
  ------------------
  |  Branch (35969:12): [True: 1.08G, False: 26.8M]
  ------------------
35970|  1.08G|        hash = (hash << 5) + hash + *str++;
35971|  26.8M|    hash = janet_hash_mix(hash, (uint32_t) len);
35972|  26.8M|    return (int32_t) hash;
35973|  37.4M|}
janet_array_calchash:
36088|  4.72M|int32_t janet_array_calchash(const Janet *array, int32_t len) {
36089|  4.72M|    const Janet *end = array + len;
36090|  4.72M|    uint32_t hash = 33;
36091|  18.6M|    while (array < end) {
  ------------------
  |  Branch (36091:12): [True: 13.9M, False: 4.72M]
  ------------------
36092|  13.9M|        hash = janet_hash_mix(hash, janet_hash(*array++));
36093|  13.9M|    }
36094|  4.72M|    return (int32_t) hash;
36095|  4.72M|}
janet_kv_calchash:
36098|  47.3k|int32_t janet_kv_calchash(const JanetKV *kvs, int32_t len) {
36099|  47.3k|    const JanetKV *end = kvs + len;
36100|  47.3k|    uint32_t hash = 33;
36101|   814k|    while (kvs < end) {
  ------------------
  |  Branch (36101:12): [True: 766k, False: 47.3k]
  ------------------
36102|   766k|        hash = janet_hash_mix(hash, janet_hash(kvs->key));
36103|   766k|        hash = janet_hash_mix(hash, janet_hash(kvs->value));
36104|   766k|        kvs++;
36105|   766k|    }
36106|  47.3k|    return (int32_t) hash;
36107|  47.3k|}
janet_tablen:
36111|  8.46M|int32_t janet_tablen(int32_t n) {
36112|  8.46M|    if (n < 0) return 0;
  ------------------
  |  Branch (36112:9): [True: 0, False: 8.46M]
  ------------------
36113|  8.46M|    n |= n >> 1;
36114|  8.46M|    n |= n >> 2;
36115|  8.46M|    n |= n >> 4;
36116|  8.46M|    n |= n >> 8;
36117|  8.46M|    n |= n >> 16;
36118|  8.46M|    return n == INT32_MAX ? INT32_MAX : n + 1;
  ------------------
  |  Branch (36118:12): [True: 0, False: 8.46M]
  ------------------
36119|  8.46M|}
safe_memcpy:
36122|  32.1M|void safe_memcpy(void *dest, const void *src, size_t len) {
36123|  32.1M|    if (!len) return;
  ------------------
  |  Branch (36123:9): [True: 10.5M, False: 21.6M]
  ------------------
36124|  21.6M|    memcpy(dest, src, len);
36125|  21.6M|}
janet_dict_find_deep:
36129|   599k|const JanetKV *janet_dict_find_deep(const JanetKV *buckets, int32_t cap, Janet key) {
36130|   599k|    int32_t index = janet_maphash(cap, janet_hash(key));
  ------------------
  |  |  396|   599k|#define janet_maphash(cap, hash) ((uint32_t)(hash) & (cap - 1))
  ------------------
36131|   599k|    int32_t i;
36132|   599k|    const JanetKV *first_bucket = NULL;
36133|       |    /* Higher half */
36134|   692k|    for (i = index; i < cap; i++) {
  ------------------
  |  Branch (36134:21): [True: 687k, False: 4.83k]
  ------------------
36135|   687k|        const JanetKV *kv = buckets + i;
36136|   687k|        if (janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|   687k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 454k, False: 232k]
  |  |  |  Branch (806:6): [Folded, False: 687k]
  |  |  ------------------
  |  |  807|   687k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   687k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   687k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   687k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   687k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   687k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36137|   454k|            if (janet_checktype(kv->value, JANET_NIL)) {
  ------------------
  |  |  806|   454k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 431k, False: 23.3k]
  |  |  |  Branch (806:6): [Folded, False: 454k]
  |  |  ------------------
  |  |  807|   454k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   454k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   454k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   454k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   454k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   454k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36138|   431k|                return kv;
36139|   431k|            } else if (NULL == first_bucket) {
  ------------------
  |  Branch (36139:24): [True: 12.5k, False: 10.7k]
  ------------------
36140|  12.5k|                first_bucket = kv;
36141|  12.5k|            }
36142|   454k|        } else if (janet_bitwise_same(kv->key, key) || janet_equals(kv->key, key)) {
  ------------------
  |  |  401|   465k|#define janet_bitwise_same(x, y) (janet_u64(x) == janet_u64(y))
  |  |  ------------------
  |  |  |  |  788|   232k|#define janet_u64(x) ((x).u64)
  |  |  ------------------
  |  |               #define janet_bitwise_same(x, y) (janet_u64(x) == janet_u64(y))
  |  |  ------------------
  |  |  |  |  788|   232k|#define janet_u64(x) ((x).u64)
  |  |  ------------------
  |  |  |  Branch (401:34): [True: 161k, False: 71.2k]
  |  |  ------------------
  ------------------
  |  Branch (36142:56): [True: 1.59k, False: 69.6k]
  ------------------
36143|   163k|            return buckets + i;
36144|   163k|        }
36145|   687k|    }
36146|       |    /* Lower half */
36147|  8.23k|    for (i = 0; i < index; i++) {
  ------------------
  |  Branch (36147:17): [True: 8.23k, False: 0]
  ------------------
36148|  8.23k|        const JanetKV *kv = buckets + i;
36149|  8.23k|        if (janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|  8.23k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 5.32k, False: 2.91k]
  |  |  |  Branch (806:6): [Folded, False: 8.23k]
  |  |  ------------------
  |  |  807|  8.23k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  8.23k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  8.23k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  8.23k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  8.23k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  8.23k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36150|  5.32k|            if (janet_checktype(kv->value, JANET_NIL)) {
  ------------------
  |  |  806|  5.32k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 4.25k, False: 1.06k]
  |  |  |  Branch (806:6): [Folded, False: 5.32k]
  |  |  ------------------
  |  |  807|  5.32k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  5.32k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  5.32k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  5.32k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  5.32k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  5.32k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36151|  4.25k|                return kv;
36152|  4.25k|            } else if (NULL == first_bucket) {
  ------------------
  |  Branch (36152:24): [True: 266, False: 803]
  ------------------
36153|    266|                first_bucket = kv;
36154|    266|            }
36155|  5.32k|        } else if (janet_bitwise_same(kv->key, key) || janet_equals(kv->key, key)) {
  ------------------
  |  |  401|  5.82k|#define janet_bitwise_same(x, y) (janet_u64(x) == janet_u64(y))
  |  |  ------------------
  |  |  |  |  788|  2.91k|#define janet_u64(x) ((x).u64)
  |  |  ------------------
  |  |               #define janet_bitwise_same(x, y) (janet_u64(x) == janet_u64(y))
  |  |  ------------------
  |  |  |  |  788|  2.91k|#define janet_u64(x) ((x).u64)
  |  |  ------------------
  |  |  |  Branch (401:34): [True: 498, False: 2.41k]
  |  |  ------------------
  ------------------
  |  Branch (36155:56): [True: 79, False: 2.33k]
  ------------------
36156|    577|            return buckets + i;
36157|    577|        }
36158|  8.23k|    }
36159|      0|    return first_bucket;
36160|  4.83k|}
janet_dict_find_keyword:
36166|  74.4k|    const uint8_t *cstr, int32_t cstr_len) {
36167|  74.4k|    int32_t hash = janet_string_calchash(cstr, cstr_len);
36168|  74.4k|    int32_t index = janet_maphash(cap, hash);
  ------------------
  |  |  396|  74.4k|#define janet_maphash(cap, hash) ((uint32_t)(hash) & (cap - 1))
  ------------------
36169|  74.4k|    int32_t i;
36170|  74.4k|    const JanetKV *first_bucket = NULL;
36171|       |    /* Higher half */
36172|   111k|    for (i = index; i < cap; i++) {
  ------------------
  |  Branch (36172:21): [True: 111k, False: 0]
  ------------------
36173|   111k|        const JanetKV *kv = buckets + i;
36174|   111k|        if (janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|   111k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 55.8k, False: 55.8k]
  |  |  |  Branch (806:6): [Folded, False: 111k]
  |  |  ------------------
  |  |  807|   111k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   111k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   111k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   111k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   111k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   111k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36175|  55.8k|            if (janet_checktype(kv->value, JANET_NIL)) {
  ------------------
  |  |  806|  55.8k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 55.8k, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 55.8k]
  |  |  ------------------
  |  |  807|  55.8k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  55.8k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  55.8k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  55.8k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  55.8k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  55.8k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36176|  55.8k|                return kv;
36177|  55.8k|            } else if (NULL == first_bucket) {
  ------------------
  |  Branch (36177:24): [True: 0, False: 0]
  ------------------
36178|      0|                first_bucket = kv;
36179|      0|            }
36180|  55.8k|        } else if (janet_checktype(kv->key, JANET_KEYWORD)) {
  ------------------
  |  |  806|  55.8k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 55.8k, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 55.8k]
  |  |  ------------------
  |  |  807|  55.8k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  55.8k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  55.8k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  55.8k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  55.8k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  55.8k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36181|       |            /* Works for symbol and keyword, too */
36182|  55.8k|            JanetString str = janet_unwrap_string(kv->key);
  ------------------
  |  |  863|  55.8k|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
36183|  55.8k|            int32_t len = janet_string_length(str);
  ------------------
  |  | 1813|  55.8k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|  55.8k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
36184|  55.8k|            if (hash == janet_string_hash(str) && len == cstr_len && !memcmp(str, cstr, len)) {
  ------------------
  |  | 1814|   111k|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  ------------------
  |  |  |  | 1812|  55.8k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (36184:17): [True: 18.6k, False: 37.2k]
  |  Branch (36184:51): [True: 18.6k, False: 0]
  |  Branch (36184:70): [True: 18.6k, False: 0]
  ------------------
36185|  18.6k|                return buckets + i;
36186|  18.6k|            }
36187|  55.8k|        }
36188|   111k|    }
36189|       |    /* Lower half */
36190|      0|    for (i = 0; i < index; i++) {
  ------------------
  |  Branch (36190:17): [True: 0, False: 0]
  ------------------
36191|      0|        const JanetKV *kv = buckets + i;
36192|      0|        if (janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|      0|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 0]
  |  |  ------------------
  |  |  807|      0|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36193|      0|            if (janet_checktype(kv->value, JANET_NIL)) {
  ------------------
  |  |  806|      0|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 0]
  |  |  ------------------
  |  |  807|      0|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36194|      0|                return kv;
36195|      0|            } else if (NULL == first_bucket) {
  ------------------
  |  Branch (36195:24): [True: 0, False: 0]
  ------------------
36196|      0|                first_bucket = kv;
36197|      0|            }
36198|      0|        } else if (janet_checktype(kv->key, JANET_KEYWORD)) {
  ------------------
  |  |  806|      0|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 0]
  |  |  ------------------
  |  |  807|      0|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36199|       |            /* Works for symbol and keyword, too */
36200|      0|            JanetString str = janet_unwrap_string(kv->key);
  ------------------
  |  |  863|      0|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
36201|      0|            int32_t len = janet_string_length(str);
  ------------------
  |  | 1813|      0|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|      0|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
36202|      0|            if (hash == janet_string_hash(str) && len == cstr_len && !memcmp(str, cstr, len)) {
  ------------------
  |  | 1814|      0|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  ------------------
  |  |  |  | 1812|      0|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (36202:17): [True: 0, False: 0]
  |  Branch (36202:51): [True: 0, False: 0]
  |  Branch (36202:70): [True: 0, False: 0]
  ------------------
36203|      0|                return buckets + i;
36204|      0|            }
36205|      0|        }
36206|      0|    }
36207|      0|    return first_bucket;
36208|      0|}
janet_cstrcmp:
36233|  61.4k|int janet_cstrcmp(const uint8_t *str, const char *other) {
36234|  61.4k|    int32_t len = janet_string_length(str);
  ------------------
  |  | 1813|  61.4k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|  61.4k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
36235|  61.4k|    int32_t index;
36236|   117k|    for (index = 0; index < len; index++) {
  ------------------
  |  Branch (36236:21): [True: 105k, False: 11.7k]
  ------------------
36237|   105k|        uint8_t c = str[index];
36238|   105k|        uint8_t k = ((const uint8_t *)other)[index];
36239|   105k|        if (c < k) return -1;
  ------------------
  |  Branch (36239:13): [True: 15.7k, False: 90.0k]
  ------------------
36240|  90.0k|        if (c > k) return 1;
  ------------------
  |  Branch (36240:13): [True: 33.9k, False: 56.0k]
  ------------------
36241|  56.0k|        if (k == '\0') break;
  ------------------
  |  Branch (36241:13): [True: 0, False: 56.0k]
  ------------------
36242|  56.0k|    }
36243|  11.7k|    return (other[index] == '\0') ? 0 : -1;
  ------------------
  |  Branch (36243:12): [True: 11.5k, False: 126]
  ------------------
36244|  61.4k|}
janet_strbinsearch:
36253|  12.1k|    const uint8_t *key) {
36254|  12.1k|    size_t low = 0;
36255|  12.1k|    size_t hi = tabcount;
36256|  12.1k|    const char *t = (const char *)tab;
36257|  61.9k|    while (low < hi) {
  ------------------
  |  Branch (36257:12): [True: 61.4k, False: 517]
  ------------------
36258|  61.4k|        size_t mid = low + ((hi - low) / 2);
36259|  61.4k|        const char **item = (const char **)(t + mid * itemsize);
36260|  61.4k|        const char *name = *item;
36261|  61.4k|        int comp = janet_cstrcmp(key, name);
36262|  61.4k|        if (comp < 0) {
  ------------------
  |  Branch (36262:13): [True: 15.8k, False: 45.5k]
  ------------------
36263|  15.8k|            hi = mid;
36264|  45.5k|        } else if (comp > 0) {
  ------------------
  |  Branch (36264:20): [True: 33.9k, False: 11.5k]
  ------------------
36265|  33.9k|            low = mid + 1;
36266|  33.9k|        } else {
36267|  11.5k|            return (const void *)item;
36268|  11.5k|        }
36269|  61.4k|    }
36270|    517|    return NULL;
36271|  12.1k|}
janet_registry_put:
36333|  2.18M|    int32_t source_line) {
36334|  2.18M|    if (janet_vm.registry_count == janet_vm.registry_cap) {
  ------------------
  |  Branch (36334:9): [True: 6.20k, False: 2.17M]
  ------------------
36335|  6.20k|        size_t newcap = (janet_vm.registry_count + 1) * 2;
36336|       |        /* Size it nicely with core by default */
36337|  6.20k|        if (newcap < 512) {
  ------------------
  |  Branch (36337:13): [True: 6.20k, False: 0]
  ------------------
36338|  6.20k|            newcap = 512;
36339|  6.20k|        }
36340|  6.20k|        void *newmem = janet_realloc(janet_vm.registry, newcap * sizeof(JanetCFunRegistry));
  ------------------
  |  | 2409|  6.20k|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
36341|  6.20k|        if (NULL == newmem) {
  ------------------
  |  Branch (36341:13): [True: 0, False: 6.20k]
  ------------------
36342|      0|            JANET_OUT_OF_MEMORY;
  ------------------
  |  |  419|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (419:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
36343|      0|        }
36344|  6.20k|        janet_vm.registry = newmem;
36345|  6.20k|        janet_vm.registry_cap = newcap;
36346|  6.20k|    }
36347|  2.18M|    JanetCFunRegistry value = {
36348|  2.18M|        key,
36349|  2.18M|        name,
36350|  2.18M|        name_prefix,
36351|  2.18M|        source_file,
36352|  2.18M|        source_line
36353|  2.18M|    };
36354|  2.18M|    janet_vm.registry[janet_vm.registry_count++] = value;
36355|  2.18M|    janet_vm.registry_dirty = 1;
36356|  2.18M|}
janet_register_abstract_type:
36482|  55.8k|void janet_register_abstract_type(const JanetAbstractType *at) {
36483|  55.8k|    janet_check_pointer_align((void *) at);
36484|  55.8k|    Janet sym = janet_csymbolv(at->name);
  ------------------
  |  | 1837|  55.8k|#define janet_csymbolv(cstr) janet_wrap_symbol(janet_csymbol(cstr))
  |  |  ------------------
  |  |  |  |  849|  55.8k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  55.8k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  55.8k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  55.8k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36485|  55.8k|    Janet check = janet_table_get(janet_vm.abstract_registry, sym);
36486|  55.8k|    if (!janet_checktype(check, JANET_NIL) && at != janet_unwrap_pointer(check)) {
  ------------------
  |  |  806|   111k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 55.8k]
  |  |  ------------------
  |  |  807|   111k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   111k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  55.8k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  55.8k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  55.8k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  55.8k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  if (!janet_checktype(check, JANET_NIL) && at != janet_unwrap_pointer(check)) {
  ------------------
  |  |  867|      0|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (36486:9): [True: 0, False: 55.8k]
  |  Branch (36486:47): [True: 0, False: 0]
  ------------------
36487|      0|        janet_panicf("cannot register abstract type %s, "
36488|      0|                     "a type with the same name exists", at->name);
36489|      0|    }
36490|  55.8k|    janet_table_put(janet_vm.abstract_registry, sym, janet_wrap_pointer((void *) at));
  ------------------
  |  |  854|  55.8k|#define janet_wrap_pointer(s) janet_nanbox_wrap_((s), JANET_POINTER)
  |  |  ------------------
  |  |  |  |  825|  55.8k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  55.8k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  55.8k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36491|  55.8k|}
janet_core_def_sm:
36502|  18.6k|void janet_core_def_sm(JanetTable *env, const char *name, Janet x, const void *p, const void *sf, int32_t sl) {
36503|  18.6k|    (void) sf;
36504|  18.6k|    (void) sl;
36505|  18.6k|    (void) p;
36506|  18.6k|    Janet key = janet_csymbolv(name);
  ------------------
  |  | 1837|  18.6k|#define janet_csymbolv(cstr) janet_wrap_symbol(janet_csymbol(cstr))
  |  |  ------------------
  |  |  |  |  849|  18.6k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  18.6k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  18.6k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  18.6k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36507|  18.6k|    janet_table_put(env, key, x);
36508|  18.6k|    if (janet_checktype(x, JANET_CFUNCTION)) {
  ------------------
  |  |  806|  18.6k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 18.6k]
  |  |  |  Branch (806:6): [Folded, False: 18.6k]
  |  |  ------------------
  |  |  807|  18.6k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  18.6k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  18.6k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  18.6k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  18.6k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  18.6k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36509|      0|        janet_registry_put(janet_unwrap_cfunction(x), name, NULL, NULL, 0);
  ------------------
  |  |  869|      0|#define janet_unwrap_cfunction(x) ((JanetCFunction)janet_nanbox_to_pointer(x))
  ------------------
36510|      0|    }
36511|  18.6k|}
janet_core_cfuns_ext:
36513|   136k|void janet_core_cfuns_ext(JanetTable *env, const char *regprefix, const JanetRegExt *cfuns) {
36514|   136k|    (void) regprefix;
36515|  2.32M|    while (cfuns->name) {
  ------------------
  |  Branch (36515:12): [True: 2.18M, False: 136k]
  ------------------
36516|  2.18M|        janet_check_pointer_align(cfuns->cfun);
36517|  2.18M|        Janet fun = janet_wrap_cfunction(cfuns->cfun);
  ------------------
  |  |  853|  2.18M|#define janet_wrap_cfunction(s) janet_nanbox_wrap_((s), JANET_CFUNCTION)
  |  |  ------------------
  |  |  |  |  825|  2.18M|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.18M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.18M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36518|  2.18M|        janet_table_put(env, janet_csymbolv(cfuns->name), fun);
  ------------------
  |  | 1837|  2.18M|#define janet_csymbolv(cstr) janet_wrap_symbol(janet_csymbol(cstr))
  |  |  ------------------
  |  |  |  |  849|  2.18M|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  2.18M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  2.18M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  2.18M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36519|  2.18M|        janet_registry_put(cfuns->cfun, cfuns->name, regprefix, cfuns->source_file, cfuns->source_line);
36520|  2.18M|        cfuns++;
36521|  2.18M|    }
36522|   136k|}
janet_binding_from_entry:
36525|  18.6k|JanetBinding janet_binding_from_entry(Janet entry) {
36526|  18.6k|    JanetTable *entry_table;
36527|  18.6k|    JanetBinding binding = {
36528|  18.6k|        JANET_BINDING_NONE,
36529|  18.6k|        janet_wrap_nil(),
  ------------------
  |  |  831|  18.6k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  18.6k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  18.6k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  18.6k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36530|  18.6k|        JANET_BINDING_DEP_NONE
36531|  18.6k|    };
36532|       |
36533|       |    /* Check environment for entry */
36534|  18.6k|    if (!janet_checktype(entry, JANET_TABLE))
  ------------------
  |  |  806|  18.6k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 18.6k]
  |  |  ------------------
  |  |  807|  18.6k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  18.6k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  18.6k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  18.6k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  18.6k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  18.6k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (36534:9): [True: 0, False: 18.6k]
  ------------------
36535|      0|        return binding;
36536|  18.6k|    entry_table = janet_unwrap_table(entry);
  ------------------
  |  |  861|  18.6k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
36537|       |
36538|  18.6k|    Janet deprecate = janet_table_get_keyword(entry_table, "deprecated");
36539|  18.6k|    int macro = janet_truthy(janet_table_get_keyword(entry_table, "macro"));
  ------------------
  |  |  818|  18.6k|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  806|  37.2k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 18.6k]
  |  |  |  |  ------------------
  |  |  |  |  807|  37.2k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|  37.2k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|  18.6k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|  18.6k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  18.6k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  18.6k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (818:6): [True: 0, False: 18.6k]
  |  |  ------------------
  |  |  819|  18.6k|     (!janet_checktype((x), JANET_BOOLEAN) || ((x).u64 & 0x1)))
  |  |  ------------------
  |  |  |  |  806|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  807|      0|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (819:7): [True: 0, False: 0]
  |  |  |  Branch (819:47): [True: 0, False: 0]
  |  |  ------------------
  ------------------
36540|  18.6k|    Janet value = janet_table_get_keyword(entry_table, "value");
36541|  18.6k|    Janet ref = janet_table_get_keyword(entry_table, "ref");
36542|       |
36543|  18.6k|    if (janet_checktype(deprecate, JANET_KEYWORD)) {
  ------------------
  |  |  806|  18.6k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 18.6k]
  |  |  |  Branch (806:6): [Folded, False: 18.6k]
  |  |  ------------------
  |  |  807|  18.6k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  18.6k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  18.6k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  18.6k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  18.6k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  18.6k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36544|      0|        JanetKeyword depkw = janet_unwrap_keyword(deprecate);
  ------------------
  |  |  865|      0|#define janet_unwrap_keyword(x) ((const uint8_t *)janet_nanbox_to_pointer(x))
  ------------------
36545|      0|        if (!janet_cstrcmp(depkw, "relaxed")) {
  ------------------
  |  Branch (36545:13): [True: 0, False: 0]
  ------------------
36546|      0|            binding.deprecation = JANET_BINDING_DEP_RELAXED;
36547|      0|        } else if (!janet_cstrcmp(depkw, "normal")) {
  ------------------
  |  Branch (36547:20): [True: 0, False: 0]
  ------------------
36548|      0|            binding.deprecation = JANET_BINDING_DEP_NORMAL;
36549|      0|        } else if (!janet_cstrcmp(depkw, "strict")) {
  ------------------
  |  Branch (36549:20): [True: 0, False: 0]
  ------------------
36550|      0|            binding.deprecation = JANET_BINDING_DEP_STRICT;
36551|      0|        }
36552|  18.6k|    } else if (!janet_checktype(deprecate, JANET_NIL)) {
  ------------------
  |  |  806|  18.6k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 18.6k]
  |  |  ------------------
  |  |  807|  18.6k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  18.6k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  18.6k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  18.6k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  18.6k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  18.6k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (36552:16): [True: 0, False: 18.6k]
  ------------------
36553|      0|        binding.deprecation = JANET_BINDING_DEP_NORMAL;
36554|      0|    }
36555|       |
36556|  18.6k|    int ref_is_valid = janet_checktype(ref, JANET_ARRAY);
  ------------------
  |  |  806|  18.6k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 18.6k]
  |  |  ------------------
  |  |  807|  18.6k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  18.6k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  18.6k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  18.6k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  18.6k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  18.6k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36557|  18.6k|    int redef = ref_is_valid && janet_truthy(janet_table_get_keyword(entry_table, "redef"));
  ------------------
  |  |  818|  18.6k|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  806|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  807|      0|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (818:6): [True: 0, False: 0]
  |  |  ------------------
  |  |  819|  18.6k|     (!janet_checktype((x), JANET_BOOLEAN) || ((x).u64 & 0x1)))
  |  |  ------------------
  |  |  |  |  806|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  807|      0|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (819:7): [True: 0, False: 0]
  |  |  |  Branch (819:47): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (36557:17): [True: 0, False: 18.6k]
  ------------------
36558|       |
36559|  18.6k|    if (macro) {
  ------------------
  |  Branch (36559:9): [True: 0, False: 18.6k]
  ------------------
36560|      0|        binding.value = redef ? ref : value;
  ------------------
  |  Branch (36560:25): [True: 0, False: 0]
  ------------------
36561|      0|        binding.type = redef ? JANET_BINDING_DYNAMIC_MACRO : JANET_BINDING_MACRO;
  ------------------
  |  Branch (36561:24): [True: 0, False: 0]
  ------------------
36562|      0|        return binding;
36563|      0|    }
36564|       |
36565|  18.6k|    if (ref_is_valid) {
  ------------------
  |  Branch (36565:9): [True: 0, False: 18.6k]
  ------------------
36566|      0|        binding.value = ref;
36567|      0|        binding.type = redef ? JANET_BINDING_DYNAMIC_DEF : JANET_BINDING_VAR;
  ------------------
  |  Branch (36567:24): [True: 0, False: 0]
  ------------------
36568|  18.6k|    } else {
36569|  18.6k|        binding.value = value;
36570|  18.6k|        binding.type = JANET_BINDING_DEF;
36571|  18.6k|    }
36572|       |
36573|  18.6k|    return binding;
36574|  18.6k|}
janet_resolve_ext:
36629|  18.6k|JanetBinding janet_resolve_ext(JanetTable *env, const uint8_t *sym) {
36630|  18.6k|    Janet entry = janet_table_get(env, janet_wrap_symbol(sym));
  ------------------
  |  |  849|  18.6k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  ------------------
  |  |  |  |  828|  18.6k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  18.6k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  18.6k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36631|  18.6k|    return janet_binding_from_entry(entry);
36632|  18.6k|}
janet_resolve:
36634|  18.6k|JanetBindingType janet_resolve(JanetTable *env, const uint8_t *sym, Janet *out) {
36635|  18.6k|    JanetBinding binding = janet_resolve_ext(env, sym);
36636|  18.6k|    if (binding.type == JANET_BINDING_DYNAMIC_DEF || binding.type == JANET_BINDING_DYNAMIC_MACRO) {
  ------------------
  |  Branch (36636:9): [True: 0, False: 18.6k]
  |  Branch (36636:54): [True: 0, False: 18.6k]
  ------------------
36637|      0|        *out = janet_array_peek(janet_unwrap_array(binding.value));
  ------------------
  |  |  860|      0|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
36638|  18.6k|    } else {
36639|  18.6k|        *out = binding.value;
36640|  18.6k|    }
36641|  18.6k|    return binding.type;
36642|  18.6k|}
janet_resolve_core:
36645|  6.20k|Janet janet_resolve_core(const char *name) {
36646|  6.20k|    JanetTable *env = janet_core_env(NULL);
36647|  6.20k|    Janet out = janet_wrap_nil();
  ------------------
  |  |  831|  6.20k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  6.20k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  6.20k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  6.20k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36648|  6.20k|    janet_resolve(env, janet_csymbol(name), &out);
36649|  6.20k|    return out;
36650|  6.20k|}
janet_indexed_view:
36654|  20.4k|int janet_indexed_view(Janet seq, const Janet **data, int32_t *len) {
36655|  20.4k|    if (janet_checktype(seq, JANET_ARRAY)) {
  ------------------
  |  |  806|  20.4k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 600, False: 19.8k]
  |  |  |  Branch (806:6): [Folded, False: 20.4k]
  |  |  ------------------
  |  |  807|  20.4k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  20.4k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  20.4k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  20.4k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  20.4k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  20.4k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36656|    600|        *data = janet_unwrap_array(seq)->data;
  ------------------
  |  |  860|    600|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
36657|    600|        *len = janet_unwrap_array(seq)->count;
  ------------------
  |  |  860|    600|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
36658|    600|        return 1;
36659|  19.8k|    } else if (janet_checktype(seq, JANET_TUPLE)) {
  ------------------
  |  |  806|  19.8k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 19.8k, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 19.8k]
  |  |  ------------------
  |  |  807|  19.8k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  19.8k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  19.8k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  19.8k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  19.8k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  19.8k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36660|  19.8k|        *data = janet_unwrap_tuple(seq);
  ------------------
  |  |  858|  19.8k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
36661|  19.8k|        *len = janet_tuple_length(janet_unwrap_tuple(seq));
  ------------------
  |  | 1802|  19.8k|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1800|  19.8k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
36662|  19.8k|        return 1;
36663|  19.8k|    }
36664|      0|    return 0;
36665|  20.4k|}
janet_bytes_view:
36669|  1.35k|int janet_bytes_view(Janet str, const uint8_t **data, int32_t *len) {
36670|  1.35k|    JanetType t = janet_type(str);
  ------------------
  |  |  795|  1.35k|    (isnan((x).number) \
  |  |  796|  1.35k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  1.35k|        : JANET_NUMBER)
  ------------------
  |  Branch (36670:19): [True: 1.35k, False: 0]
  ------------------
36671|  1.35k|    if (t == JANET_STRING || t == JANET_SYMBOL || t == JANET_KEYWORD) {
  ------------------
  |  Branch (36671:9): [True: 1.35k, False: 0]
  |  Branch (36671:30): [True: 0, False: 0]
  |  Branch (36671:51): [True: 0, False: 0]
  ------------------
36672|  1.35k|        *data = janet_unwrap_string(str);
  ------------------
  |  |  863|  1.35k|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
36673|  1.35k|        *len = janet_string_length(janet_unwrap_string(str));
  ------------------
  |  | 1813|  1.35k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|  1.35k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
36674|  1.35k|        return 1;
36675|  1.35k|    } else if (t == JANET_BUFFER) {
  ------------------
  |  Branch (36675:16): [True: 0, False: 0]
  ------------------
36676|      0|        *data = janet_unwrap_buffer(str)->data;
  ------------------
  |  |  862|      0|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
36677|      0|        *len = janet_unwrap_buffer(str)->count;
  ------------------
  |  |  862|      0|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
36678|      0|        return 1;
36679|      0|    } else if (t == JANET_ABSTRACT) {
  ------------------
  |  Branch (36679:16): [True: 0, False: 0]
  ------------------
36680|      0|        void *abst = janet_unwrap_abstract(str);
  ------------------
  |  |  866|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
36681|      0|        const JanetAbstractType *atype = janet_abstract_type(abst);
  ------------------
  |  | 1899|      0|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|      0|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
36682|      0|        if (NULL == atype->bytes) {
  ------------------
  |  Branch (36682:13): [True: 0, False: 0]
  ------------------
36683|      0|            return 0;
36684|      0|        }
36685|      0|        JanetByteView view = atype->bytes(abst, janet_abstract_size(abst));
  ------------------
  |  | 1900|      0|#define janet_abstract_size(u) (janet_abstract_head(u)->size)
  |  |  ------------------
  |  |  |  | 1897|      0|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
36686|      0|        *data = view.bytes;
36687|      0|        *len = view.len;
36688|      0|        return 1;
36689|      0|    }
36690|      0|    return 0;
36691|  1.35k|}
janet_dictionary_view:
36696|  1.90k|int janet_dictionary_view(Janet tab, const JanetKV **data, int32_t *len, int32_t *cap) {
36697|  1.90k|    if (janet_checktype(tab, JANET_TABLE)) {
  ------------------
  |  |  806|  1.90k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 368, False: 1.53k]
  |  |  |  Branch (806:6): [Folded, False: 1.90k]
  |  |  ------------------
  |  |  807|  1.90k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  1.90k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  1.90k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  1.90k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.90k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.90k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36698|    368|        *data = janet_unwrap_table(tab)->data;
  ------------------
  |  |  861|    368|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
36699|    368|        *cap = janet_unwrap_table(tab)->capacity;
  ------------------
  |  |  861|    368|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
36700|    368|        *len = janet_unwrap_table(tab)->count;
  ------------------
  |  |  861|    368|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
36701|    368|        return 1;
36702|  1.53k|    } else if (janet_checktype(tab, JANET_STRUCT)) {
  ------------------
  |  |  806|  1.53k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 1.53k, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 1.53k]
  |  |  ------------------
  |  |  807|  1.53k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  1.53k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  1.53k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  1.53k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.53k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.53k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36703|  1.53k|        *data = janet_unwrap_struct(tab);
  ------------------
  |  |  857|  1.53k|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
36704|  1.53k|        *cap = janet_struct_capacity(janet_unwrap_struct(tab));
  ------------------
  |  | 1849|  1.53k|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1846|  1.53k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
36705|  1.53k|        *len = janet_struct_length(janet_unwrap_struct(tab));
  ------------------
  |  | 1848|  1.53k|#define janet_struct_length(t) (janet_struct_head(t)->length)
  |  |  ------------------
  |  |  |  | 1846|  1.53k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
36706|  1.53k|        return 1;
36707|  1.53k|    }
36708|      0|    return 0;
36709|  1.90k|}
janet_checkint:
36711|  15.0k|int janet_checkint(Janet x) {
36712|  15.0k|    if (!janet_checktype(x, JANET_NUMBER))
  ------------------
  |  |  806|  15.0k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [True: 15.0k, Folded]
  |  |  ------------------
  |  |  807|  15.0k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|  15.0k|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 2.83k, False: 12.2k]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 12.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  15.0k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (36712:9): [True: 12.2k, False: 2.83k]
  ------------------
36713|  12.2k|        return 0;
36714|  2.83k|    double dval = janet_unwrap_number(x);
  ------------------
  |  |  839|  2.83k|#define janet_unwrap_number(x) ((x).number)
  ------------------
36715|       |    return janet_checkintrange(dval);
  ------------------
  |  |  962|  2.83k|#define janet_checkintrange(x) ((x) >= INT32_MIN && (x) <= INT32_MAX && (x) == (int32_t)(x))
  |  |  ------------------
  |  |  |  Branch (962:33): [True: 2.77k, False: 53]
  |  |  |  Branch (962:53): [True: 2.57k, False: 203]
  |  |  |  Branch (962:73): [True: 2.37k, False: 204]
  |  |  ------------------
  ------------------
36716|  15.0k|}
janet_sorted_keys:
36793|  1.90k|int32_t janet_sorted_keys(const JanetKV *dict, int32_t cap, int32_t *index_buffer) {
36794|       |
36795|       |    /* First, put populated indices into index_buffer */
36796|  1.90k|    int32_t next_index = 0;
36797|  14.3k|    for (int32_t i = 0; i < cap; i++) {
  ------------------
  |  Branch (36797:25): [True: 12.4k, False: 1.90k]
  ------------------
36798|  12.4k|        if (!janet_checktype(dict[i].key, JANET_NIL)) {
  ------------------
  |  |  806|  12.4k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 12.4k]
  |  |  ------------------
  |  |  807|  12.4k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  12.4k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  12.4k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  12.4k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  12.4k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  12.4k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (36798:13): [True: 3.60k, False: 8.88k]
  ------------------
36799|  3.60k|            index_buffer[next_index++] = i;
36800|  3.60k|        }
36801|  12.4k|    }
36802|       |
36803|       |    /* Next, sort those (simple insertion sort here for now) */
36804|  4.51k|    for (int32_t i = 1; i < next_index; i++) {
  ------------------
  |  Branch (36804:25): [True: 2.61k, False: 1.90k]
  ------------------
36805|  2.61k|        int32_t index_to_insert = index_buffer[i];
36806|  2.61k|        Janet lhs = dict[index_to_insert].key;
36807|  8.33k|        for (int32_t j = i - 1; j >= 0; j--) {
  ------------------
  |  Branch (36807:33): [True: 7.59k, False: 737]
  ------------------
36808|  7.59k|            index_buffer[j + 1] = index_buffer[j];
36809|  7.59k|            Janet rhs = dict[index_buffer[j]].key;
36810|  7.59k|            if (janet_compare(lhs, rhs) >= 0) {
  ------------------
  |  Branch (36810:17): [True: 1.87k, False: 5.72k]
  ------------------
36811|  1.87k|                index_buffer[j + 1] = index_to_insert;
36812|  1.87k|                break;
36813|  5.72k|            } else if (j == 0) {
  ------------------
  |  Branch (36813:24): [True: 737, False: 4.98k]
  ------------------
36814|    737|                index_buffer[0] = index_to_insert;
36815|    737|            }
36816|  7.59k|        }
36817|  2.61k|    }
36818|       |
36819|       |    /* Return number of indices found */
36820|  1.90k|    return next_index;
36821|       |
36822|  1.90k|}
array_allocate:
37055|  20.8M|void *array_allocate(size_t element_size, int32_t count) {
37056|  20.8M|    if (count < 0) return NULL;
  ------------------
  |  Branch (37056:9): [True: 0, False: 20.8M]
  ------------------
37057|  20.8M|    if ((size_t) count > (SIZE_MAX / element_size)) return NULL;
  ------------------
  |  Branch (37057:9): [True: 0, False: 20.8M]
  ------------------
37058|  20.8M|    return janet_malloc(element_size * count);
  ------------------
  |  | 2406|  20.8M|#define janet_malloc(X) malloc((X))
  ------------------
37059|  20.8M|}
janet_equals:
37361|  73.6k|int janet_equals(Janet x, Janet y) {
37362|  73.6k|    if (janet_type(x) != janet_type(y)) return 0;
  ------------------
  |  |  795|  73.6k|    (isnan((x).number) \
  |  |  796|  73.6k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  73.6k|        : JANET_NUMBER)
  ------------------
                  if (janet_type(x) != janet_type(y)) return 0;
  ------------------
  |  |  795|  73.6k|    (isnan((x).number) \
  |  |  796|  73.6k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  73.6k|        : JANET_NUMBER)
  ------------------
  |  Branch (37362:9): [True: 73.1k, False: 540]
  |  Branch (37362:9): [True: 23.2k, False: 50.4k]
  |  Branch (37362:26): [True: 72.9k, False: 747]
  ------------------
37363|  50.4k|    if (janet_checktypes(x, JANET_TFLAG_TUPLE | JANET_TFLAG_STRUCT)) return janet_equals_containers(x, y);
  ------------------
  |  |  969|  50.4k|#define janet_checktypes(x, tps) ((1 << janet_type(x)) & (tps))
  |  |  ------------------
  |  |  |  |  795|  50.4k|    (isnan((x).number) \
  |  |  |  |  796|  50.4k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  |  |  797|  50.4k|        : JANET_NUMBER)
  |  |  ------------------
  |  |  |  Branch (969:34): [True: 48.0k, False: 2.37k]
  |  |  ------------------
  ------------------
  |  Branch (37363:9): [True: 50.3k, False: 152]
  ------------------
37364|  2.37k|    return janet_equals_leaf(x, y);
37365|  50.4k|}
janet_hash:
37377|  26.9M|int32_t janet_hash(Janet x) {
37378|  26.9M|    int32_t hash = 0;
37379|  26.9M|    switch (janet_type(x)) {
  ------------------
  |  |  795|  26.9M|    (isnan((x).number) \
  |  |  796|  26.9M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  26.9M|        : JANET_NUMBER)
  ------------------
  |  Branch (37379:13): [True: 18.3M, False: 8.59M]
  ------------------
37380|   954k|        case JANET_NIL:
  ------------------
  |  Branch (37380:9): [True: 954k, False: 25.9M]
  ------------------
37381|   954k|            hash = 0;
37382|   954k|            break;
37383|  37.5k|        case JANET_BOOLEAN:
  ------------------
  |  Branch (37383:9): [True: 37.5k, False: 26.8M]
  ------------------
37384|  37.5k|            hash = janet_unwrap_boolean(x);
  ------------------
  |  |  838|  37.5k|#define janet_unwrap_boolean(x) ((x).u64 & 0x1)
  ------------------
37385|  37.5k|            break;
37386|  5.57M|        case JANET_STRING:
  ------------------
  |  Branch (37386:9): [True: 5.57M, False: 21.3M]
  ------------------
37387|  5.89M|        case JANET_SYMBOL:
  ------------------
  |  Branch (37387:9): [True: 324k, False: 26.6M]
  ------------------
37388|  6.46M|        case JANET_KEYWORD:
  ------------------
  |  Branch (37388:9): [True: 566k, False: 26.3M]
  ------------------
37389|  6.46M|            hash = janet_string_hash(janet_unwrap_string(x));
  ------------------
  |  | 1814|  6.46M|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  ------------------
  |  |  |  | 1812|  6.46M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
37390|  6.46M|            break;
37391|   215k|        case JANET_TUPLE:
  ------------------
  |  Branch (37391:9): [True: 215k, False: 26.7M]
  ------------------
37392|   215k|            hash = janet_tuple_hash(janet_unwrap_tuple(x));
  ------------------
  |  | 1803|   215k|#define janet_tuple_hash(t) (janet_tuple_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1800|   215k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
37393|   215k|            uint32_t inc = (janet_tuple_flag(janet_unwrap_tuple(x)) & JANET_TUPLE_FLAG_BRACKETCTOR) ? 1 : 0;
  ------------------
  |  | 1806|   215k|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1800|   215k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                          uint32_t inc = (janet_tuple_flag(janet_unwrap_tuple(x)) & JANET_TUPLE_FLAG_BRACKETCTOR) ? 1 : 0;
  ------------------
  |  | 1798|   215k|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
  |  Branch (37393:28): [True: 2.61k, False: 212k]
  ------------------
37394|   215k|            hash = (int32_t)((uint32_t)hash + inc); /* avoid overflow undefined behavior */
37395|   215k|            break;
37396|  10.5k|        case JANET_STRUCT:
  ------------------
  |  Branch (37396:9): [True: 10.5k, False: 26.9M]
  ------------------
37397|  10.5k|            hash = janet_struct_hash(janet_unwrap_struct(x));
  ------------------
  |  | 1850|  10.5k|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1846|  10.5k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
37398|  10.5k|            break;
37399|  8.59M|        case JANET_NUMBER: {
  ------------------
  |  Branch (37399:9): [True: 8.59M, False: 18.3M]
  ------------------
37400|  8.59M|            union {
37401|  8.59M|                double d;
37402|  8.59M|                uint64_t u;
37403|  8.59M|            } as;
37404|  8.59M|            as.d = janet_unwrap_number(x);
  ------------------
  |  |  839|  8.59M|#define janet_unwrap_number(x) ((x).number)
  ------------------
37405|  8.59M|            as.d += 0.0; /* normalize negative 0 */
37406|  8.59M|            as.u = murmur64(as.u);
37407|  8.59M|            uint32_t hi = (uint32_t)(as.u >> 32);
37408|  8.59M|            hash = (int32_t)hi;
37409|  8.59M|            break;
37410|  5.89M|        }
37411|  44.1k|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (37411:9): [True: 44.1k, False: 26.8M]
  ------------------
37412|  44.1k|            JanetAbstract xx = janet_unwrap_abstract(x);
  ------------------
  |  |  866|  44.1k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
37413|  44.1k|            const JanetAbstractType *at = janet_abstract_type(xx);
  ------------------
  |  | 1899|  44.1k|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|  44.1k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
37414|  44.1k|            if (at->hash != NULL) {
  ------------------
  |  Branch (37414:17): [True: 6.87k, False: 37.2k]
  ------------------
37415|  6.87k|                hash = at->hash(xx, janet_abstract_size(xx));
  ------------------
  |  | 1900|  6.87k|#define janet_abstract_size(u) (janet_abstract_head(u)->size)
  |  |  ------------------
  |  |  |  | 1897|  6.87k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
37416|  6.87k|                break;
37417|  6.87k|            }
37418|  44.1k|        }
37419|       |        /* fallthrough */
37420|  10.6M|        default:
  ------------------
  |  Branch (37420:9): [True: 10.6M, False: 16.3M]
  ------------------
37421|  10.6M|            if (sizeof(double) == sizeof(void *)) {
  ------------------
  |  Branch (37421:17): [True: 10.6M, Folded]
  ------------------
37422|       |                /* Assuming 8 byte pointer (8 byte aligned) */
37423|  10.6M|                uint64_t i = murmur64(janet_u64(x));
  ------------------
  |  |  788|  10.6M|#define janet_u64(x) ((x).u64)
  ------------------
37424|  10.6M|                hash = (int32_t)(i >> 32);
37425|  10.6M|            } else {
37426|       |                /* Assuming 4 byte pointer (or smaller) */
37427|      0|                uintptr_t diff = (uintptr_t) janet_unwrap_pointer(x);
  ------------------
  |  |  867|      0|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
37428|      0|                uint32_t hilo = (uint32_t) diff * 2654435769u;
37429|      0|                hash = (int32_t)((hilo << 16) | (hilo >> 16));
37430|      0|            }
37431|  10.6M|            break;
37432|  26.9M|    }
37433|  26.9M|    return hash;
37434|  26.9M|}
janet_compare:
37439|  9.28k|int janet_compare(Janet x, Janet y) {
37440|  9.28k|    janet_vm.traversal = janet_vm.traversal_base;
37441|  9.28k|    int status;
37442|  16.0k|    do {
37443|  16.0k|        JanetType tx = janet_type(x);
  ------------------
  |  |  795|  16.0k|    (isnan((x).number) \
  |  |  796|  16.0k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  16.0k|        : JANET_NUMBER)
  ------------------
  |  Branch (37443:24): [True: 14.2k, False: 1.82k]
  ------------------
37444|  16.0k|        JanetType ty = janet_type(y);
  ------------------
  |  |  795|  16.0k|    (isnan((x).number) \
  |  |  796|  16.0k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  16.0k|        : JANET_NUMBER)
  ------------------
  |  Branch (37444:24): [True: 15.1k, False: 965]
  ------------------
37445|  16.0k|        if (tx != ty) return tx < ty ? -1 : 1;
  ------------------
  |  Branch (37445:13): [True: 4.09k, False: 11.9k]
  |  Branch (37445:30): [True: 3.37k, False: 720]
  ------------------
37446|  11.9k|        switch (tx) {
37447|  1.22k|            case JANET_NIL:
  ------------------
  |  Branch (37447:13): [True: 1.22k, False: 10.7k]
  ------------------
37448|  1.22k|                break;
37449|     18|            case JANET_BOOLEAN: {
  ------------------
  |  Branch (37449:13): [True: 18, False: 11.9k]
  ------------------
37450|     18|                int diff = janet_unwrap_boolean(x) - janet_unwrap_boolean(y);
  ------------------
  |  |  838|     18|#define janet_unwrap_boolean(x) ((x).u64 & 0x1)
  ------------------
                              int diff = janet_unwrap_boolean(x) - janet_unwrap_boolean(y);
  ------------------
  |  |  838|     18|#define janet_unwrap_boolean(x) ((x).u64 & 0x1)
  ------------------
37451|     18|                if (diff) return diff;
  ------------------
  |  Branch (37451:21): [True: 0, False: 18]
  ------------------
37452|     18|                break;
37453|     18|            }
37454|    734|            case JANET_NUMBER: {
  ------------------
  |  Branch (37454:13): [True: 734, False: 11.2k]
  ------------------
37455|    734|                double xx = janet_unwrap_number(x);
  ------------------
  |  |  839|    734|#define janet_unwrap_number(x) ((x).number)
  ------------------
37456|    734|                double yy = janet_unwrap_number(y);
  ------------------
  |  |  839|    734|#define janet_unwrap_number(x) ((x).number)
  ------------------
37457|    734|                if (xx == yy) {
  ------------------
  |  Branch (37457:21): [True: 471, False: 263]
  ------------------
37458|    471|                    break;
37459|    471|                } else {
37460|    263|                    return (xx < yy) ? -1 : 1;
  ------------------
  |  Branch (37460:28): [True: 148, False: 115]
  ------------------
37461|    263|                }
37462|    734|            }
37463|    340|            case JANET_STRING:
  ------------------
  |  Branch (37463:13): [True: 340, False: 11.6k]
  ------------------
37464|  4.30k|            case JANET_SYMBOL:
  ------------------
  |  Branch (37464:13): [True: 3.96k, False: 8.03k]
  ------------------
37465|  4.47k|            case JANET_KEYWORD: {
  ------------------
  |  Branch (37465:13): [True: 174, False: 11.8k]
  ------------------
37466|  4.47k|                int diff = janet_string_compare(janet_unwrap_string(x), janet_unwrap_string(y));
  ------------------
  |  |  863|  4.47k|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
                              int diff = janet_string_compare(janet_unwrap_string(x), janet_unwrap_string(y));
  ------------------
  |  |  863|  4.47k|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
37467|  4.47k|                if (diff) return diff;
  ------------------
  |  Branch (37467:21): [True: 1.97k, False: 2.50k]
  ------------------
37468|  2.50k|                break;
37469|  4.47k|            }
37470|  2.50k|            case JANET_ABSTRACT: {
  ------------------
  |  Branch (37470:13): [True: 1.00k, False: 10.9k]
  ------------------
37471|  1.00k|                int diff = janet_compare_abstract(janet_unwrap_abstract(x), janet_unwrap_abstract(y));
  ------------------
  |  |  866|  1.00k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
                              int diff = janet_compare_abstract(janet_unwrap_abstract(x), janet_unwrap_abstract(y));
  ------------------
  |  |  866|  1.00k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
37472|  1.00k|                if (diff) return diff;
  ------------------
  |  Branch (37472:21): [True: 804, False: 204]
  ------------------
37473|    204|                break;
37474|  1.00k|            }
37475|    322|            default: {
  ------------------
  |  Branch (37475:13): [True: 322, False: 11.6k]
  ------------------
37476|    322|                if (janet_unwrap_pointer(x) == janet_unwrap_pointer(y)) {
  ------------------
  |  |  867|    322|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
                              if (janet_unwrap_pointer(x) == janet_unwrap_pointer(y)) {
  ------------------
  |  |  867|    322|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (37476:21): [True: 0, False: 322]
  ------------------
37477|      0|                    break;
37478|    322|                } else {
37479|    322|                    return janet_unwrap_pointer(x) > janet_unwrap_pointer(y) ? 1 : -1;
  ------------------
  |  |  867|    322|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
                                  return janet_unwrap_pointer(x) > janet_unwrap_pointer(y) ? 1 : -1;
  ------------------
  |  |  867|    322|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (37479:28): [True: 96, False: 226]
  ------------------
37480|    322|                }
37481|    322|            }
37482|  3.40k|            case JANET_TUPLE: {
  ------------------
  |  Branch (37482:13): [True: 3.40k, False: 8.59k]
  ------------------
37483|  3.40k|                const Janet *lhs = janet_unwrap_tuple(x);
  ------------------
  |  |  858|  3.40k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
37484|  3.40k|                const Janet *rhs = janet_unwrap_tuple(y);
  ------------------
  |  |  858|  3.40k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
37485|  3.40k|                if (JANET_TUPLE_FLAG_BRACKETCTOR & (janet_tuple_flag(lhs) ^ janet_tuple_flag(rhs))) {
  ------------------
  |  | 1798|  3.40k|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
                              if (JANET_TUPLE_FLAG_BRACKETCTOR & (janet_tuple_flag(lhs) ^ janet_tuple_flag(rhs))) {
  ------------------
  |  | 1806|  3.40k|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1800|  3.40k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                              if (JANET_TUPLE_FLAG_BRACKETCTOR & (janet_tuple_flag(lhs) ^ janet_tuple_flag(rhs))) {
  ------------------
  |  | 1806|  3.40k|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1800|  3.40k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (37485:21): [True: 91, False: 3.31k]
  ------------------
37486|     91|                    return (janet_tuple_flag(lhs) & JANET_TUPLE_FLAG_BRACKETCTOR) ? 1 : -1;
  ------------------
  |  | 1806|     91|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1800|     91|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                                  return (janet_tuple_flag(lhs) & JANET_TUPLE_FLAG_BRACKETCTOR) ? 1 : -1;
  ------------------
  |  | 1798|     91|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
  |  Branch (37486:28): [True: 12, False: 79]
  ------------------
37487|     91|                }
37488|  3.31k|                push_traversal_node(janet_tuple_head(lhs), janet_tuple_head(rhs), 1);
  ------------------
  |  | 1800|  3.31k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  ------------------
                              push_traversal_node(janet_tuple_head(lhs), janet_tuple_head(rhs), 1);
  ------------------
  |  | 1800|  3.31k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  ------------------
37489|  3.31k|                break;
37490|  3.40k|            }
37491|    814|            case JANET_STRUCT: {
  ------------------
  |  Branch (37491:13): [True: 814, False: 11.1k]
  ------------------
37492|    814|                const JanetKV *lhs = janet_unwrap_struct(x);
  ------------------
  |  |  857|    814|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
37493|    814|                const JanetKV *rhs = janet_unwrap_struct(y);
  ------------------
  |  |  857|    814|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
37494|    814|                int32_t llen = janet_struct_capacity(lhs);
  ------------------
  |  | 1849|    814|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1846|    814|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
37495|    814|                int32_t rlen = janet_struct_capacity(rhs);
  ------------------
  |  | 1849|    814|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1846|    814|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
37496|    814|                int32_t lhash = janet_struct_hash(lhs);
  ------------------
  |  | 1850|    814|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1846|    814|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
37497|    814|                int32_t rhash = janet_struct_hash(rhs);
  ------------------
  |  | 1850|    814|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1846|    814|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
37498|    814|                if (llen < rlen) return -1;
  ------------------
  |  Branch (37498:21): [True: 101, False: 713]
  ------------------
37499|    713|                if (llen > rlen) return 1;
  ------------------
  |  Branch (37499:21): [True: 64, False: 649]
  ------------------
37500|    649|                if (lhash < rhash) return -1;
  ------------------
  |  Branch (37500:21): [True: 79, False: 570]
  ------------------
37501|    570|                if (lhash > rhash) return 1;
  ------------------
  |  Branch (37501:21): [True: 75, False: 495]
  ------------------
37502|    495|                push_traversal_node(janet_struct_head(lhs), janet_struct_head(rhs), 0);
  ------------------
  |  | 1846|    495|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  ------------------
                              push_traversal_node(janet_struct_head(lhs), janet_struct_head(rhs), 0);
  ------------------
  |  | 1846|    495|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  ------------------
37503|    495|                break;
37504|    570|            }
37505|  11.9k|        }
37506|  11.9k|    } while (!(status = traversal_next(&x, &y)));
  ------------------
  |  Branch (37506:14): [True: 6.80k, False: 1.42k]
  ------------------
37507|  1.42k|    return status - 2;
37508|  9.28k|}
janet_v_grow:
37912|   194k|void *janet_v_grow(void *v, int32_t increment, int32_t itemsize) {
37913|   194k|    int32_t dbl_cur = (NULL != v) ? 2 * janet_v__cap(v) : 0;
  ------------------
  |  |  765|   173k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  ------------------
  |  |  |  |  764|   173k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  ------------------
  |  Branch (37913:23): [True: 173k, False: 20.5k]
  ------------------
37914|   194k|    int32_t min_needed = janet_v_count(v) + increment;
  ------------------
  |  |  759|   194k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  766|   173k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|   173k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (759:34): [True: 173k, False: 20.5k]
  |  |  ------------------
  ------------------
37915|   194k|    int32_t m = dbl_cur > min_needed ? dbl_cur : min_needed;
  ------------------
  |  Branch (37915:17): [True: 153k, False: 41.0k]
  ------------------
37916|   194k|    size_t newsize = ((size_t) itemsize) * m + sizeof(int32_t) * 2;
37917|   194k|    int32_t *p = (int32_t *) janet_srealloc(v ? janet_v__raw(v) : 0, newsize);
  ------------------
  |  |  764|   173k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  ------------------
  |  Branch (37917:45): [True: 173k, False: 20.5k]
  ------------------
37918|   194k|    if (!v) p[1] = 0;
  ------------------
  |  Branch (37918:9): [True: 20.5k, False: 173k]
  ------------------
37919|   194k|    p[0] = m;
37920|   194k|    return p + 2;
37921|   194k|}
janet_try_init:
39428|  4.04k|void janet_try_init(JanetTryState *state) {
39429|  4.04k|    state->stackn = janet_vm.stackn++;
39430|  4.04k|    state->gc_handle = janet_vm.gc_suspend;
39431|  4.04k|    state->vm_fiber = janet_vm.fiber;
39432|  4.04k|    state->vm_jmp_buf = janet_vm.signal_buf;
39433|  4.04k|    state->vm_return_reg = janet_vm.return_reg;
39434|  4.04k|    state->coerce_error = janet_vm.coerce_error;
39435|  4.04k|    janet_vm.return_reg = &(state->payload);
39436|  4.04k|    janet_vm.signal_buf = &(state->buf);
39437|  4.04k|    janet_vm.coerce_error = 0;
39438|  4.04k|}
janet_restore:
39440|  4.04k|void janet_restore(JanetTryState *state) {
39441|  4.04k|    janet_vm.stackn = state->stackn;
39442|  4.04k|    janet_vm.gc_suspend = state->gc_handle;
39443|  4.04k|    janet_vm.fiber = state->vm_fiber;
39444|  4.04k|    janet_vm.signal_buf = state->vm_jmp_buf;
39445|  4.04k|    janet_vm.return_reg = state->vm_return_reg;
39446|  4.04k|    janet_vm.coerce_error = state->coerce_error;
39447|  4.04k|}
janet_init:
39602|  6.20k|int janet_init(void) {
39603|       |
39604|       |    /* Garbage collection */
39605|  6.20k|    janet_vm.blocks = NULL;
39606|  6.20k|    janet_vm.weak_blocks = NULL;
39607|  6.20k|    janet_vm.next_collection = 0;
39608|  6.20k|    janet_vm.gc_interval = 0x400000;
39609|  6.20k|    janet_vm.block_count = 0;
39610|  6.20k|    janet_vm.gc_mark_phase = 0;
39611|       |
39612|  6.20k|    janet_symcache_init();
39613|       |
39614|       |    /* Initialize gc roots */
39615|  6.20k|    janet_vm.roots = NULL;
39616|  6.20k|    janet_vm.root_count = 0;
39617|  6.20k|    janet_vm.root_capacity = 0;
39618|       |
39619|       |    /* Scratch memory */
39620|  6.20k|    janet_vm.user = NULL;
39621|  6.20k|    janet_vm.scratch_mem = NULL;
39622|  6.20k|    janet_vm.scratch_len = 0;
39623|  6.20k|    janet_vm.scratch_cap = 0;
39624|       |
39625|       |    /* Sandbox flags */
39626|  6.20k|    janet_vm.sandbox_flags = 0;
39627|       |
39628|       |    /* Initialize registry */
39629|  6.20k|    janet_vm.registry = NULL;
39630|  6.20k|    janet_vm.registry_cap = 0;
39631|  6.20k|    janet_vm.registry_count = 0;
39632|  6.20k|    janet_vm.registry_dirty = 0;
39633|       |
39634|       |    /* Initialize abstract registry */
39635|  6.20k|    janet_vm.abstract_registry = janet_table(0);
39636|  6.20k|    janet_gcroot(janet_wrap_table(janet_vm.abstract_registry));
  ------------------
  |  |  846|  6.20k|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  825|  6.20k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  6.20k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  6.20k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39637|       |
39638|       |    /* Traversal */
39639|  6.20k|    janet_vm.traversal = NULL;
39640|  6.20k|    janet_vm.traversal_base = NULL;
39641|  6.20k|    janet_vm.traversal_top = NULL;
39642|       |
39643|       |    /* Core env */
39644|  6.20k|    janet_vm.core_env = NULL;
39645|       |
39646|       |    /* Auto suspension */
39647|  6.20k|    janet_vm.auto_suspend = 0;
39648|       |
39649|       |    /* Dynamic bindings */
39650|  6.20k|    janet_vm.top_dyns = NULL;
39651|       |
39652|       |    /* Seed RNG */
39653|  6.20k|    janet_rng_seed(janet_default_rng(), 0);
39654|       |
39655|       |    /* Fibers */
39656|  6.20k|    janet_vm.fiber = NULL;
39657|  6.20k|    janet_vm.root_fiber = NULL;
39658|  6.20k|    janet_vm.stackn = 0;
39659|       |
39660|  6.20k|#ifdef JANET_EV
39661|  6.20k|    janet_ev_init();
39662|  6.20k|#endif
39663|  6.20k|#ifdef JANET_NET
39664|  6.20k|    janet_net_init();
39665|  6.20k|#endif
39666|  6.20k|    return 0;
39667|  6.20k|}
janet_deinit:
39682|  6.20k|void janet_deinit(void) {
39683|  6.20k|    janet_clear_memory();
39684|  6.20k|    janet_symcache_deinit();
39685|  6.20k|    janet_free(janet_vm.roots);
  ------------------
  |  | 2415|  6.20k|#define janet_free(X) free((X))
  ------------------
39686|  6.20k|    janet_vm.roots = NULL;
39687|  6.20k|    janet_vm.root_count = 0;
39688|  6.20k|    janet_vm.root_capacity = 0;
39689|  6.20k|    janet_vm.abstract_registry = NULL;
39690|  6.20k|    janet_vm.core_env = NULL;
39691|  6.20k|    janet_vm.top_dyns = NULL;
39692|  6.20k|    janet_vm.user = NULL;
39693|  6.20k|    janet_free(janet_vm.traversal_base);
  ------------------
  |  | 2415|  6.20k|#define janet_free(X) free((X))
  ------------------
39694|  6.20k|    janet_vm.fiber = NULL;
39695|  6.20k|    janet_vm.root_fiber = NULL;
39696|  6.20k|    janet_free(janet_vm.registry);
  ------------------
  |  | 2415|  6.20k|#define janet_free(X) free((X))
  ------------------
39697|       |    janet_vm.registry = NULL;
39698|  6.20k|#ifdef JANET_EV
39699|  6.20k|    janet_ev_deinit();
39700|  6.20k|#endif
39701|  6.20k|#ifdef JANET_NET
39702|  6.20k|    janet_net_deinit();
39703|  6.20k|#endif
39704|  6.20k|}
janet_memalloc_empty:
39872|  8.26M|void *janet_memalloc_empty(int32_t count) {
39873|  8.26M|    int32_t i;
39874|  8.26M|    void *mem = array_allocate(sizeof(JanetKV), count);
39875|  8.26M|    janet_vm.next_collection += (size_t) count * sizeof(JanetKV);
39876|  8.26M|    if (NULL == mem) {
  ------------------
  |  Branch (39876:9): [True: 0, False: 8.26M]
  ------------------
39877|      0|        JANET_OUT_OF_MEMORY;
  ------------------
  |  |  419|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (419:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
39878|      0|    }
39879|  8.26M|    JanetKV *mmem = (JanetKV *)mem;
39880|   130M|    for (i = 0; i < count; i++) {
  ------------------
  |  Branch (39880:17): [True: 121M, False: 8.26M]
  ------------------
39881|   121M|        JanetKV *kv = mmem + i;
39882|   121M|        kv->key = janet_wrap_nil();
  ------------------
  |  |  831|   121M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   121M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   121M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   121M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39883|   121M|        kv->value = janet_wrap_nil();
  ------------------
  |  |  831|   121M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   121M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   121M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   121M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39884|   121M|    }
39885|  8.26M|    return mem;
39886|  8.26M|}
janet_memempty:
39888|  47.7k|void janet_memempty(JanetKV *mem, int32_t count) {
39889|  47.7k|    int32_t i;
39890|   824k|    for (i = 0; i < count; i++) {
  ------------------
  |  Branch (39890:17): [True: 776k, False: 47.7k]
  ------------------
39891|   776k|        mem[i].key = janet_wrap_nil();
  ------------------
  |  |  831|   776k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   776k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   776k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   776k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39892|   776k|        mem[i].value = janet_wrap_nil();
  ------------------
  |  |  831|   776k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   776k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   776k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   776k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39893|   776k|    }
39894|  47.7k|}
janet_wrap_number_safe:
39898|  43.4k|Janet janet_wrap_number_safe(double d) {
39899|  43.4k|    Janet ret;
39900|  43.4k|    ret.number = isnan(d) ? NAN : d;
  ------------------
  |  Branch (39900:18): [True: 6.20k, False: 37.2k]
  ------------------
39901|  43.4k|    return ret;
39902|  43.4k|}
janet_nanbox_to_pointer:
39904|  90.3M|void *janet_nanbox_to_pointer(Janet x) {
39905|  90.3M|    x.i64 &= JANET_NANBOX_PAYLOADBITS;
  ------------------
  |  |  791|  90.3M|#define JANET_NANBOX_PAYLOADBITS 0x00007FFFFFFFFFFFllu
  ------------------
39906|  90.3M|    x.u64 <<= JANET_NANBOX_64_POINTER_SHIFT; /* Alignment, usually 0 */
  ------------------
  |  |  341|  90.3M|#define JANET_NANBOX_64_POINTER_SHIFT 0
  ------------------
39907|  90.3M|    return x.pointer;
39908|  90.3M|}
janet_nanbox_from_pointer:
39910|  9.20M|Janet janet_nanbox_from_pointer(void *p, uint64_t tagmask) {
39911|  9.20M|    Janet ret;
39912|  9.20M|    ret.pointer = p;
39913|       |    /* Should be noop when pointer shift is 0 */
39914|       |    /*
39915|       |    janet_assert(!(ret.u64 & (uint64_t) ((1 << JANET_NANBOX_64_POINTER_SHIFT) - 1)), "unaligned pointer wrap");
39916|       |    */
39917|  9.20M|    ret.u64 >>= JANET_NANBOX_64_POINTER_SHIFT; /* Alignment, usually 0 */
  ------------------
  |  |  341|  9.20M|#define JANET_NANBOX_64_POINTER_SHIFT 0
  ------------------
39918|  9.20M|    ret.u64 |= tagmask;
39919|  9.20M|    return ret;
39920|  9.20M|}
janet_nanbox_from_cpointer:
39922|  42.1M|Janet janet_nanbox_from_cpointer(const void *p, uint64_t tagmask) {
39923|  42.1M|    Janet ret;
39924|  42.1M|    ret.pointer = (void *)p;
39925|       |    /* Should be noop when pointer shift is 0 */
39926|       |    /*
39927|       |    janet_assert(!(ret.u64 & (uint64_t) ((1 << JANET_NANBOX_64_POINTER_SHIFT) - 1)), "unaligned pointer wrap");
39928|       |    */
39929|  42.1M|    ret.u64 >>= JANET_NANBOX_64_POINTER_SHIFT; /* Alignment, usually 0 */
  ------------------
  |  |  341|  42.1M|#define JANET_NANBOX_64_POINTER_SHIFT 0
  ------------------
39930|  42.1M|    ret.u64 |= tagmask;
39931|  42.1M|    return ret;
39932|  42.1M|}
janet_nanbox_from_double:
39934|  23.7M|Janet janet_nanbox_from_double(double d) {
39935|  23.7M|    Janet ret;
39936|  23.7M|    ret.number = d;
39937|  23.7M|    return ret;
39938|  23.7M|}
janet_nanbox_from_bits:
39940|   251M|Janet janet_nanbox_from_bits(uint64_t bits) {
39941|   251M|    Janet ret;
39942|   251M|    ret.u64 = bits;
39943|   251M|    return ret;
39944|   251M|}
janet.c:janet_array_impl:
 1606|  22.1k|static void janet_array_impl(JanetArray *array, int32_t capacity) {
 1607|  22.1k|    Janet *data = NULL;
 1608|  22.1k|    if (capacity > 0) {
  ------------------
  |  Branch (1608:9): [True: 19.0k, False: 3.11k]
  ------------------
 1609|  19.0k|        janet_vm.next_collection += capacity * sizeof(Janet);
 1610|  19.0k|        data = (Janet *) array_allocate(sizeof(Janet), capacity);
 1611|  19.0k|        if (NULL == data) {
  ------------------
  |  Branch (1611:13): [True: 0, False: 19.0k]
  ------------------
 1612|      0|            JANET_OUT_OF_MEMORY;
  ------------------
  |  |  419|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (419:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1613|      0|        }
 1614|  19.0k|    }
 1615|  22.1k|    array->count = 0;
 1616|  22.1k|    array->capacity = capacity;
 1617|  22.1k|    array->data = data;
 1618|  22.1k|}
janet.c:janet_buffer_init_impl:
 3196|   159k|static JanetBuffer *janet_buffer_init_impl(JanetBuffer *buffer, int32_t capacity) {
 3197|   159k|    uint8_t *data = NULL;
 3198|   159k|    if (capacity < 4) capacity = 4;
  ------------------
  |  Branch (3198:9): [True: 6.57k, False: 152k]
  ------------------
 3199|   159k|    janet_gcpressure(capacity);
 3200|   159k|    data = array_allocate(sizeof(uint8_t), capacity);
 3201|   159k|    if (NULL == data) {
  ------------------
  |  Branch (3201:9): [True: 0, False: 159k]
  ------------------
 3202|      0|        JANET_OUT_OF_MEMORY;
  ------------------
  |  |  419|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (419:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3203|      0|    }
 3204|   159k|    buffer->count = 0;
 3205|   159k|    buffer->capacity = capacity;
 3206|   159k|    buffer->data = data;
 3207|   159k|    return buffer;
 3208|   159k|}
janet.c:janet_buffer_can_realloc:
 3189|  41.6k|static void janet_buffer_can_realloc(JanetBuffer *buffer) {
 3190|  41.6k|    if (buffer->gc.flags & JANET_BUFFER_FLAG_NO_REALLOC) {
  ------------------
  |  | 1780|  41.6k|#define JANET_BUFFER_FLAG_NO_REALLOC 0x10000
  ------------------
  |  Branch (3190:9): [True: 0, False: 41.6k]
  ------------------
 3191|      0|        janet_panic("buffer cannot reallocate foreign memory");
 3192|      0|    }
 3193|  41.6k|}
janet.c:janet_load_libs:
 9373|  6.20k|static void janet_load_libs(JanetTable *env) {
 9374|  6.20k|    JanetRegExt corelib_cfuns[] = {
 9375|  6.20k|        JANET_CORE_REG("native", janet_core_native),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9376|  6.20k|        JANET_CORE_REG("describe", janet_core_describe),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9377|  6.20k|        JANET_CORE_REG("string", janet_core_string),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9378|  6.20k|        JANET_CORE_REG("symbol", janet_core_symbol),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9379|  6.20k|        JANET_CORE_REG("keyword", janet_core_keyword),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9380|  6.20k|        JANET_CORE_REG("buffer", janet_core_buffer),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9381|  6.20k|        JANET_CORE_REG("abstract?", janet_core_is_abstract),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9382|  6.20k|        JANET_CORE_REG("table", janet_core_table),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9383|  6.20k|        JANET_CORE_REG("array", janet_core_array),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9384|  6.20k|        JANET_CORE_REG("scan-number", janet_core_scannumber),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9385|  6.20k|        JANET_CORE_REG("tuple", janet_core_tuple),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9386|  6.20k|        JANET_CORE_REG("struct", janet_core_struct),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9387|  6.20k|        JANET_CORE_REG("gensym", janet_core_gensym),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9388|  6.20k|        JANET_CORE_REG("gccollect", janet_core_gccollect),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9389|  6.20k|        JANET_CORE_REG("gcsetinterval", janet_core_gcsetinterval),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9390|  6.20k|        JANET_CORE_REG("gcinterval", janet_core_gcinterval),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9391|  6.20k|        JANET_CORE_REG("type", janet_core_type),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9392|  6.20k|        JANET_CORE_REG("hash", janet_core_hash),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9393|  6.20k|        JANET_CORE_REG("getline", janet_core_getline),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9394|  6.20k|        JANET_CORE_REG("dyn", janet_core_dyn),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9395|  6.20k|        JANET_CORE_REG("setdyn", janet_core_setdyn),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9396|  6.20k|        JANET_CORE_REG("trace", janet_core_trace),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9397|  6.20k|        JANET_CORE_REG("untrace", janet_core_untrace),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9398|  6.20k|        JANET_CORE_REG("module/expand-path", janet_core_expand_path),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9399|  6.20k|        JANET_CORE_REG("int?", janet_core_check_int),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9400|  6.20k|        JANET_CORE_REG("nat?", janet_core_check_nat),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9401|  6.20k|        JANET_CORE_REG("bytes?", janet_core_is_bytes),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9402|  6.20k|        JANET_CORE_REG("indexed?", janet_core_is_indexed),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9403|  6.20k|        JANET_CORE_REG("dictionary?", janet_core_is_dictionary),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9404|  6.20k|        JANET_CORE_REG("lengthable?", janet_core_is_lengthable),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9405|  6.20k|        JANET_CORE_REG("slice", janet_core_slice),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9406|  6.20k|        JANET_CORE_REG("range", janet_core_range),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9407|  6.20k|        JANET_CORE_REG("signal", janet_core_signal),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9408|  6.20k|        JANET_CORE_REG("memcmp", janet_core_memcmp),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9409|  6.20k|        JANET_CORE_REG("getproto", janet_core_getproto),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9410|  6.20k|        JANET_CORE_REG("sandbox", janet_core_sandbox),
  ------------------
  |  |  518|  6.20k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.20k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9411|  6.20k|        JANET_REG_END
  ------------------
  |  | 2110|  6.20k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
 9412|  6.20k|    };
 9413|       |    janet_core_cfuns_ext(env, NULL, corelib_cfuns);
 9414|  6.20k|    janet_lib_io(env);
 9415|  6.20k|    janet_lib_math(env);
 9416|  6.20k|    janet_lib_array(env);
 9417|  6.20k|    janet_lib_tuple(env);
 9418|  6.20k|    janet_lib_buffer(env);
 9419|  6.20k|    janet_lib_table(env);
 9420|  6.20k|    janet_lib_struct(env);
 9421|  6.20k|    janet_lib_fiber(env);
 9422|  6.20k|    janet_lib_os(env);
 9423|  6.20k|    janet_lib_parse(env);
 9424|  6.20k|    janet_lib_compile(env);
 9425|  6.20k|    janet_lib_debug(env);
 9426|  6.20k|    janet_lib_string(env);
 9427|  6.20k|    janet_lib_marsh(env);
 9428|  6.20k|#ifdef JANET_PEG
 9429|  6.20k|    janet_lib_peg(env);
 9430|  6.20k|#endif
 9431|  6.20k|#ifdef JANET_ASSEMBLER
 9432|  6.20k|    janet_lib_asm(env);
 9433|  6.20k|#endif
 9434|  6.20k|#ifdef JANET_INT_TYPES
 9435|  6.20k|    janet_lib_inttypes(env);
 9436|  6.20k|#endif
 9437|  6.20k|#ifdef JANET_EV
 9438|  6.20k|    janet_lib_ev(env);
 9439|  6.20k|#ifdef JANET_FILEWATCH
 9440|  6.20k|    janet_lib_filewatch(env);
 9441|  6.20k|#endif
 9442|  6.20k|#endif
 9443|  6.20k|#ifdef JANET_NET
 9444|  6.20k|    janet_lib_net(env);
 9445|  6.20k|#endif
 9446|  6.20k|#ifdef JANET_FFI
 9447|  6.20k|    janet_lib_ffi(env);
 9448|  6.20k|#endif
 9449|  6.20k|}
janet.c:janet_q_init:
10684|  6.20k|static void janet_q_init(JanetQueue *q) {
10685|       |    q->data = NULL;
10686|  6.20k|    q->head = 0;
10687|  6.20k|    q->tail = 0;
10688|  6.20k|    q->capacity = 0;
10689|  6.20k|}
janet.c:peek_timeout:
10766|  6.20k|static int peek_timeout(JanetTimeout *out) {
10767|  6.20k|    if (janet_vm.tq_count == 0) return 0;
  ------------------
  |  Branch (10767:9): [True: 6.20k, False: 0]
  ------------------
10768|      0|    *out = janet_vm.tq[0];
10769|      0|    return 1;
10770|  6.20k|}
janet.c:janet_q_deinit:
10691|  6.20k|static void janet_q_deinit(JanetQueue *q) {
10692|  6.20k|    janet_free(q->data);
  ------------------
  |  | 2415|  6.20k|#define janet_free(X) free((X))
  ------------------
10693|  6.20k|}
janet.c:janet_ev_setup_selfpipe:
12253|  6.20k|static void janet_ev_setup_selfpipe(void) {
12254|  6.20k|    if (janet_make_pipe(janet_vm.selfpipe, 1)) {
  ------------------
  |  Branch (12254:9): [True: 0, False: 6.20k]
  ------------------
12255|       |        JANET_EXIT("failed to initialize self pipe in event loop");
  ------------------
  |  |  378|      0|#define JANET_EXIT(m) do { \
  |  |  379|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  380|      0|        __FILE__,\
  |  |  381|      0|        __LINE__,\
  |  |  382|      0|        (m));\
  |  |  383|      0|    abort();\
  |  |  384|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (384:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
12256|      0|    }
12257|  6.20k|}
janet.c:janet_ev_cleanup_selfpipe:
12276|  6.20k|static void janet_ev_cleanup_selfpipe(void) {
12277|  6.20k|    close(janet_vm.selfpipe[0]);
12278|  6.20k|    close(janet_vm.selfpipe[1]);
12279|  6.20k|}
janet.c:janet_deinit_block:
18286|  47.2M|static void janet_deinit_block(JanetGCObject *mem) {
18287|  47.2M|    switch (mem->flags & JANET_MEM_TYPEBITS) {
  ------------------
  |  |  675|  47.2M|#define JANET_MEM_TYPEBITS 0xFF
  ------------------
18288|  24.5M|        default:
  ------------------
  |  Branch (18288:9): [True: 24.5M, False: 22.7M]
  ------------------
18289|  26.8M|        case JANET_MEMORY_FUNCTION:
  ------------------
  |  Branch (18289:9): [True: 2.37M, False: 44.8M]
  ------------------
18290|  26.8M|            break; /* Do nothing for non gc types */
18291|  12.4M|        case JANET_MEMORY_SYMBOL:
  ------------------
  |  Branch (18291:9): [True: 12.4M, False: 34.8M]
  ------------------
18292|  12.4M|            janet_symbol_deinit(((JanetStringHead *) mem)->data);
18293|  12.4M|            break;
18294|  22.1k|        case JANET_MEMORY_ARRAY:
  ------------------
  |  Branch (18294:9): [True: 22.1k, False: 47.2M]
  ------------------
18295|  22.1k|        case JANET_MEMORY_ARRAY_WEAK:
  ------------------
  |  Branch (18295:9): [True: 0, False: 47.2M]
  ------------------
18296|  22.1k|            janet_free(((JanetArray *) mem)->data);
  ------------------
  |  | 2415|  22.1k|#define janet_free(X) free((X))
  ------------------
18297|  22.1k|            break;
18298|  4.55M|        case JANET_MEMORY_TABLE:
  ------------------
  |  Branch (18298:9): [True: 4.55M, False: 42.7M]
  ------------------
18299|  4.55M|        case JANET_MEMORY_TABLE_WEAKK:
  ------------------
  |  Branch (18299:9): [True: 0, False: 47.2M]
  ------------------
18300|  4.55M|        case JANET_MEMORY_TABLE_WEAKV:
  ------------------
  |  Branch (18300:9): [True: 0, False: 47.2M]
  ------------------
18301|  4.55M|        case JANET_MEMORY_TABLE_WEAKKV:
  ------------------
  |  Branch (18301:9): [True: 0, False: 47.2M]
  ------------------
18302|  4.55M|            janet_free(((JanetTable *) mem)->data);
  ------------------
  |  | 2415|  4.55M|#define janet_free(X) free((X))
  ------------------
18303|  4.55M|            break;
18304|      0|        case JANET_MEMORY_FIBER: {
  ------------------
  |  Branch (18304:9): [True: 0, False: 47.2M]
  ------------------
18305|      0|            JanetFiber *f = (JanetFiber *)mem;
18306|      0|#ifdef JANET_EV
18307|      0|            if (f->ev_state && !(f->flags & JANET_FIBER_EV_FLAG_IN_FLIGHT)) {
  ------------------
  |  |  847|      0|#define JANET_FIBER_EV_FLAG_IN_FLIGHT 0x1
  ------------------
  |  Branch (18307:17): [True: 0, False: 0]
  |  Branch (18307:32): [True: 0, False: 0]
  ------------------
18308|      0|                janet_ev_dec_refcount();
18309|      0|                janet_free(f->ev_state);
  ------------------
  |  | 2415|      0|#define janet_free(X) free((X))
  ------------------
18310|      0|            } else if (f->gc.flags & JANET_FIBER_EV_GCFLAG_SUSPENDED) {
  ------------------
  |  |  843|      0|#define JANET_FIBER_EV_GCFLAG_SUSPENDED 0x2000000
  ------------------
  |  Branch (18310:24): [True: 0, False: 0]
  ------------------
18311|      0|                janet_ev_dec_refcount();
18312|      0|            }
18313|      0|#endif
18314|      0|            janet_free(f->data);
  ------------------
  |  | 2415|      0|#define janet_free(X) free((X))
  ------------------
18315|      0|        }
18316|      0|        break;
18317|  10.8k|        case JANET_MEMORY_BUFFER:
  ------------------
  |  Branch (18317:9): [True: 10.8k, False: 47.2M]
  ------------------
18318|  10.8k|            janet_buffer_deinit((JanetBuffer *) mem);
18319|  10.8k|            break;
18320|  22.5k|        case JANET_MEMORY_ABSTRACT: {
  ------------------
  |  Branch (18320:9): [True: 22.5k, False: 47.2M]
  ------------------
18321|  22.5k|            JanetAbstractHead *head = (JanetAbstractHead *)mem;
18322|  22.5k|            if (head->type->gcperthread) {
  ------------------
  |  Branch (18322:17): [True: 0, False: 22.5k]
  ------------------
18323|      0|                janet_assert(!head->type->gcperthread(head->data, head->size), "per-thread finalizer failed");
  ------------------
  |  |  389|      0|#define janet_assert(c, m) do { \
  |  |  390|      0|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  378|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  379|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  380|      0|        __FILE__,\
  |  |  |  |  381|      0|        __LINE__,\
  |  |  |  |  382|      0|        (m));\
  |  |  |  |  383|      0|    abort();\
  |  |  |  |  384|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (384:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (390:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  391|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
18324|      0|            }
18325|  22.5k|            if (head->type->gc) {
  ------------------
  |  Branch (18325:17): [True: 18.6k, False: 3.97k]
  ------------------
18326|  18.6k|                janet_assert(!head->type->gc(head->data, head->size), "finalizer failed");
  ------------------
  |  |  389|  18.6k|#define janet_assert(c, m) do { \
  |  |  390|  18.6k|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  378|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  379|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  380|      0|        __FILE__,\
  |  |  |  |  381|      0|        __LINE__,\
  |  |  |  |  382|      0|        (m));\
  |  |  |  |  383|      0|    abort();\
  |  |  |  |  384|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (384:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (390:9): [True: 0, False: 18.6k]
  |  |  ------------------
  |  |  391|  18.6k|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 18.6k]
  |  |  ------------------
  ------------------
18327|  18.6k|            }
18328|  22.5k|        }
18329|  22.5k|        break;
18330|  49.6k|        case JANET_MEMORY_FUNCENV: {
  ------------------
  |  Branch (18330:9): [True: 49.6k, False: 47.2M]
  ------------------
18331|  49.6k|            JanetFuncEnv *env = (JanetFuncEnv *)mem;
18332|  49.6k|            if (0 == env->offset)
  ------------------
  |  Branch (18332:17): [True: 49.6k, False: 0]
  ------------------
18333|  49.6k|                janet_free(env->as.values);
  ------------------
  |  | 2415|  49.6k|#define janet_free(X) free((X))
  ------------------
18334|  49.6k|        }
18335|  49.6k|        break;
18336|  3.31M|        case JANET_MEMORY_FUNCDEF: {
  ------------------
  |  Branch (18336:9): [True: 3.31M, False: 43.9M]
  ------------------
18337|  3.31M|            JanetFuncDef *def = (JanetFuncDef *)mem;
18338|       |            /* TODO - get this all with one alloc and one free */
18339|  3.31M|            janet_free(def->defs);
  ------------------
  |  | 2415|  3.31M|#define janet_free(X) free((X))
  ------------------
18340|  3.31M|            janet_free(def->environments);
  ------------------
  |  | 2415|  3.31M|#define janet_free(X) free((X))
  ------------------
18341|  3.31M|            janet_free(def->constants);
  ------------------
  |  | 2415|  3.31M|#define janet_free(X) free((X))
  ------------------
18342|  3.31M|            janet_free(def->bytecode);
  ------------------
  |  | 2415|  3.31M|#define janet_free(X) free((X))
  ------------------
18343|  3.31M|            janet_free(def->sourcemap);
  ------------------
  |  | 2415|  3.31M|#define janet_free(X) free((X))
  ------------------
18344|  3.31M|            janet_free(def->closure_bitset);
  ------------------
  |  | 2415|  3.31M|#define janet_free(X) free((X))
  ------------------
18345|  3.31M|            janet_free(def->symbolmap);
  ------------------
  |  | 2415|  3.31M|#define janet_free(X) free((X))
  ------------------
18346|  3.31M|        }
18347|  3.31M|        break;
18348|  47.2M|    }
18349|  47.2M|}
janet.c:janet_free_all_scratch:
18536|  6.20k|static void janet_free_all_scratch(void) {
18537|  6.95k|    for (size_t i = 0; i < janet_vm.scratch_len; i++) {
  ------------------
  |  Branch (18537:24): [True: 753, False: 6.20k]
  ------------------
18538|    753|        free_one_scratch(janet_vm.scratch_mem[i]);
18539|    753|    }
18540|  6.20k|    janet_vm.scratch_len = 0;
18541|  6.20k|}
janet.c:janet_mem2scratch:
18543|   338k|static JanetScratch *janet_mem2scratch(void *mem) {
18544|   338k|    JanetScratch *s = (JanetScratch *)mem;
18545|   338k|    return s - 1;
18546|   338k|}
janet.c:free_one_scratch:
18528|   165k|static void free_one_scratch(JanetScratch *s) {
18529|   165k|    if (NULL != s->finalize) {
  ------------------
  |  Branch (18529:9): [True: 0, False: 165k]
  ------------------
18530|      0|        s->finalize((char *) s->mem);
18531|      0|    }
18532|   165k|    janet_free(s);
  ------------------
  |  | 2415|   165k|#define janet_free(X) free((X))
  ------------------
18533|   165k|}
janet.c:it_s64_tostring:
18829|    641|static void it_s64_tostring(void *p, JanetBuffer *buffer) {
18830|    641|    char str[32];
18831|       |    snprintf(str, sizeof(str), "%" PRId64, *((int64_t *)p));
18832|    641|    janet_buffer_push_cstring(buffer, str);
18833|    641|}
janet.c:janet_int64_compare:
18806|    470|static int janet_int64_compare(void *p1, void *p2) {
18807|    470|    int64_t x = *((int64_t *)p1);
18808|    470|    int64_t y = *((int64_t *)p2);
18809|    470|    return x == y ? 0 : x < y ? -1 : 1;
  ------------------
  |  Branch (18809:12): [True: 158, False: 312]
  |  Branch (18809:25): [True: 99, False: 213]
  ------------------
18810|    470|}
janet.c:janet_int64_hash:
18800|  6.87k|static int32_t janet_int64_hash(void *p1, size_t size) {
18801|  6.87k|    (void) size;
18802|  6.87k|    int32_t *words = p1;
18803|  6.87k|    return words[0] ^ words[1];
18804|  6.87k|}
janet.c:it_u64_tostring:
18835|    308|static void it_u64_tostring(void *p, JanetBuffer *buffer) {
18836|    308|    char str[32];
18837|       |    snprintf(str, sizeof(str), "%" PRIu64, *((uint64_t *)p));
18838|    308|    janet_buffer_push_cstring(buffer, str);
18839|    308|}
janet.c:janet_uint64_compare:
18812|    316|static int janet_uint64_compare(void *p1, void *p2) {
18813|    316|    uint64_t x = *((uint64_t *)p1);
18814|    316|    uint64_t y = *((uint64_t *)p2);
18815|    316|    return x == y ? 0 : x < y ? -1 : 1;
  ------------------
  |  Branch (18815:12): [True: 97, False: 219]
  |  Branch (18815:25): [True: 62, False: 157]
  ------------------
18816|    316|}
janet.c:makef:
19558|  18.6k|static void *makef(FILE *f, int32_t flags, size_t bufsize) {
19559|  18.6k|    JanetFile *iof = (JanetFile *) janet_abstract(&janet_file_type, sizeof(JanetFile));
19560|  18.6k|    iof->file = f;
19561|  18.6k|    iof->flags = flags;
19562|  18.6k|    iof->vbufsize = bufsize;
19563|  18.6k|#if !(defined(JANET_WINDOWS) || defined(JANET_PLAN9))
19564|       |    /* While we would like fopen to set cloexec by default (like O_CLOEXEC) with the e flag, that is
19565|       |     * not standard. */
19566|  18.6k|    if (!(flags & JANET_FILE_NOT_CLOSEABLE))
  ------------------
  |  | 2278|  18.6k|#define JANET_FILE_NOT_CLOSEABLE 16
  ------------------
  |  Branch (19566:9): [True: 0, False: 18.6k]
  ------------------
19567|      0|        fcntl(fileno(f), F_SETFD, FD_CLOEXEC);
19568|  18.6k|#endif
19569|  18.6k|    return iof;
19570|  18.6k|}
janet.c:cfun_io_gc:
19766|  18.6k|static int cfun_io_gc(void *p, size_t len) {
19767|  18.6k|    (void) len;
19768|  18.6k|    JanetFile *iof = (JanetFile *)p;
19769|  18.6k|    janet_file_close(iof);
19770|  18.6k|    return 0;
19771|  18.6k|}
janet.c:readint:
21050|   420M|static int32_t readint(UnmarshalState *st, const uint8_t **atdata) {
21051|   420M|    const uint8_t *data = *atdata;
21052|   420M|    int32_t ret;
21053|   420M|    MARSH_EOS(st, data);
  ------------------
  |  |21045|   420M|#define MARSH_EOS(st, data) do { \
  |  |21046|   420M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21046:9): [True: 0, False: 420M]
  |  |  ------------------
  |  |21047|   420M|} while (0)
  |  |  ------------------
  |  |  |  Branch (21047:10): [Folded, False: 420M]
  |  |  ------------------
  ------------------
21054|   420M|    if (*data < 128) {
  ------------------
  |  Branch (21054:9): [True: 342M, False: 78.0M]
  ------------------
21055|   342M|        ret = *data++;
21056|   342M|    } else if (*data < 192) {
  ------------------
  |  Branch (21056:16): [True: 73.6M, False: 4.37M]
  ------------------
21057|  73.6M|        MARSH_EOS(st, data + 1);
  ------------------
  |  |21045|  73.6M|#define MARSH_EOS(st, data) do { \
  |  |21046|  73.6M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21046:9): [True: 0, False: 73.6M]
  |  |  ------------------
  |  |21047|  73.6M|} while (0)
  |  |  ------------------
  |  |  |  Branch (21047:10): [Folded, False: 73.6M]
  |  |  ------------------
  ------------------
21058|  73.6M|        uint32_t uret = ((data[0] & 0x3F) << 8) + data[1];
21059|       |        /* Sign extend 18 MSBs */
21060|  73.6M|        uret |= (uret >> 13) ? 0xFFFFC000 : 0;
  ------------------
  |  Branch (21060:17): [True: 20.6M, False: 53.0M]
  ------------------
21061|  73.6M|        ret = (int32_t)uret;
21062|  73.6M|        data += 2;
21063|  73.6M|    } else if (*data == LB_INTEGER) {
  ------------------
  |  Branch (21063:16): [True: 4.37M, False: 0]
  ------------------
21064|  4.37M|        MARSH_EOS(st, data + 4);
  ------------------
  |  |21045|  4.37M|#define MARSH_EOS(st, data) do { \
  |  |21046|  4.37M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21046:9): [True: 0, False: 4.37M]
  |  |  ------------------
  |  |21047|  4.37M|} while (0)
  |  |  ------------------
  |  |  |  Branch (21047:10): [Folded, False: 4.37M]
  |  |  ------------------
  ------------------
21065|  4.37M|        uint32_t ui = ((uint32_t)(data[1]) << 24) |
21066|  4.37M|                      ((uint32_t)(data[2]) << 16) |
21067|  4.37M|                      ((uint32_t)(data[3]) << 8) |
21068|  4.37M|                      (uint32_t)(data[4]);
21069|  4.37M|        ret = (int32_t)ui;
21070|  4.37M|        data += 5;
21071|  4.37M|    } else {
21072|      0|        janet_panicf("expected integer, got byte %x at index %d",
21073|      0|                     *data,
21074|      0|                     data - st->start);
21075|      0|        ret = 0;
21076|      0|    }
21077|   420M|    *atdata = data;
21078|   420M|    return ret;
21079|   420M|}
janet.c:unmarshal_one:
21659|   112M|    int flags) {
21660|   112M|    uint8_t lead;
21661|   112M|    MARSH_STACKCHECK;
  ------------------
  |  |20517|   112M|#define MARSH_STACKCHECK if ((flags & 0xFFFF) > JANET_RECURSION_GUARD) janet_panic("stack overflow")
  |  |  ------------------
  |  |  |  |  296|   112M|#define JANET_RECURSION_GUARD 1024
  |  |  ------------------
  |  |  |  Branch (20517:30): [True: 0, False: 112M]
  |  |  ------------------
  ------------------
21662|   112M|    MARSH_EOS(st, data);
  ------------------
  |  |21045|   112M|#define MARSH_EOS(st, data) do { \
  |  |21046|   112M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21046:9): [True: 0, False: 112M]
  |  |  ------------------
  |  |21047|   112M|} while (0)
  |  |  ------------------
  |  |  |  Branch (21047:10): [Folded, False: 112M]
  |  |  ------------------
  ------------------
21663|   112M|    lead = data[0];
21664|   112M|    if (lead < LB_REAL) {
  ------------------
  |  Branch (21664:9): [True: 8.57M, False: 104M]
  ------------------
21665|  8.57M|        *out = janet_wrap_integer(readint(st, &data));
  ------------------
  |  |  967|  8.57M|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|  8.57M|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
21666|  8.57M|        return data;
21667|  8.57M|    }
21668|   104M|    switch (lead) {
21669|   341k|        case LB_NIL:
  ------------------
  |  Branch (21669:9): [True: 341k, False: 103M]
  ------------------
21670|   341k|            *out = janet_wrap_nil();
  ------------------
  |  |  831|   341k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   341k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   341k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   341k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21671|   341k|            return data + 1;
21672|      0|        case LB_FALSE:
  ------------------
  |  Branch (21672:9): [True: 0, False: 104M]
  ------------------
21673|      0|            *out = janet_wrap_false();
  ------------------
  |  |  833|      0|#define janet_wrap_false() janet_nanbox_from_payload(JANET_BOOLEAN, 0)
  |  |  ------------------
  |  |  |  |  822|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21674|      0|            return data + 1;
21675|   825k|        case LB_TRUE:
  ------------------
  |  Branch (21675:9): [True: 825k, False: 103M]
  ------------------
21676|   825k|            *out = janet_wrap_true();
  ------------------
  |  |  832|   825k|#define janet_wrap_true() janet_nanbox_from_payload(JANET_BOOLEAN, 1)
  |  |  ------------------
  |  |  |  |  822|   825k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   825k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   825k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21677|   825k|            return data + 1;
21678|  18.6k|        case LB_INTEGER:
  ------------------
  |  Branch (21678:9): [True: 18.6k, False: 104M]
  ------------------
21679|       |            /* Long integer */
21680|  18.6k|            MARSH_EOS(st, data + 4);
  ------------------
  |  |21045|  18.6k|#define MARSH_EOS(st, data) do { \
  |  |21046|  18.6k|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21046:9): [True: 0, False: 18.6k]
  |  |  ------------------
  |  |21047|  18.6k|} while (0)
  |  |  ------------------
  |  |  |  Branch (21047:10): [Folded, False: 18.6k]
  |  |  ------------------
  ------------------
21681|  18.6k|            uint32_t ui = ((uint32_t)(data[4])) |
21682|  18.6k|                          ((uint32_t)(data[3]) << 8) |
21683|  18.6k|                          ((uint32_t)(data[2]) << 16) |
21684|  18.6k|                          ((uint32_t)(data[1]) << 24);
21685|  18.6k|            int32_t si = (int32_t)ui;
21686|  18.6k|            *out = janet_wrap_integer(si);
  ------------------
  |  |  967|  18.6k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|  18.6k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
21687|  18.6k|            return data + 5;
21688|  43.4k|        case LB_REAL:
  ------------------
  |  Branch (21688:9): [True: 43.4k, False: 104M]
  ------------------
21689|       |            /* Real */
21690|  43.4k|        {
21691|  43.4k|            union {
21692|  43.4k|                double d;
21693|  43.4k|                uint8_t bytes[8];
21694|  43.4k|            } u;
21695|  43.4k|            MARSH_EOS(st, data + 8);
  ------------------
  |  |21045|  43.4k|#define MARSH_EOS(st, data) do { \
  |  |21046|  43.4k|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21046:9): [True: 0, False: 43.4k]
  |  |  ------------------
  |  |21047|  43.4k|} while (0)
  |  |  ------------------
  |  |  |  Branch (21047:10): [Folded, False: 43.4k]
  |  |  ------------------
  ------------------
21696|       |#ifdef JANET_BIG_ENDIAN
21697|       |            u.bytes[0] = data[8];
21698|       |            u.bytes[1] = data[7];
21699|       |            u.bytes[2] = data[6];
21700|       |            u.bytes[3] = data[5];
21701|       |            u.bytes[4] = data[4];
21702|       |            u.bytes[5] = data[3];
21703|       |            u.bytes[6] = data[2];
21704|       |            u.bytes[7] = data[1];
21705|       |#else
21706|  43.4k|            memcpy(&u.bytes, data + 1, sizeof(double));
21707|  43.4k|#endif
21708|  43.4k|            *out = janet_wrap_number_safe(u.d);
21709|  43.4k|            janet_v_push(st->lookup, *out);
  ------------------
  |  |  757|  43.4k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|  43.4k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|  43.4k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|  43.4k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  43.4k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  765|  43.4k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  43.4k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 0, False: 43.4k]
  |  |  |  |  |  |  |  Branch (768:50): [True: 0, False: 43.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  770|      0|#define janet_v__grow(v, n)      ((v) = janet_v_grow((v), (n), sizeof(*(v))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  766|  43.4k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  43.4k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21710|  43.4k|            return data + 9;
21711|  43.4k|        }
21712|  9.17M|        case LB_STRING:
  ------------------
  |  Branch (21712:9): [True: 9.17M, False: 94.9M]
  ------------------
21713|  20.7M|        case LB_SYMBOL:
  ------------------
  |  Branch (21713:9): [True: 11.5M, False: 92.5M]
  ------------------
21714|  20.7M|        case LB_BUFFER:
  ------------------
  |  Branch (21714:9): [True: 6.20k, False: 104M]
  ------------------
21715|  22.2M|        case LB_KEYWORD:
  ------------------
  |  Branch (21715:9): [True: 1.47M, False: 102M]
  ------------------
21716|  24.4M|        case LB_REGISTRY: {
  ------------------
  |  Branch (21716:9): [True: 2.20M, False: 101M]
  ------------------
21717|  24.4M|            data++;
21718|  24.4M|            int32_t len = readnat(st, &data);
21719|  24.4M|            MARSH_EOS(st, data - 1 + len);
  ------------------
  |  |21045|  24.4M|#define MARSH_EOS(st, data) do { \
  |  |21046|  24.4M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21046:9): [True: 0, False: 24.4M]
  |  |  ------------------
  |  |21047|  24.4M|} while (0)
  |  |  ------------------
  |  |  |  Branch (21047:10): [Folded, False: 24.4M]
  |  |  ------------------
  ------------------
21720|  24.4M|            if (lead == LB_STRING) {
  ------------------
  |  Branch (21720:17): [True: 9.17M, False: 15.2M]
  ------------------
21721|  9.17M|                const uint8_t *str = janet_string(data, len);
21722|  9.17M|                *out = janet_wrap_string(str);
  ------------------
  |  |  848|  9.17M|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|  9.17M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  9.17M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  9.17M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21723|  15.2M|            } else if (lead == LB_SYMBOL) {
  ------------------
  |  Branch (21723:24): [True: 11.5M, False: 3.68M]
  ------------------
21724|  11.5M|                const uint8_t *str = janet_symbol(data, len);
21725|  11.5M|                *out = janet_wrap_symbol(str);
  ------------------
  |  |  849|  11.5M|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  ------------------
  |  |  |  |  828|  11.5M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  11.5M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  11.5M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21726|  11.5M|            } else if (lead == LB_KEYWORD) {
  ------------------
  |  Branch (21726:24): [True: 1.47M, False: 2.20M]
  ------------------
21727|  1.47M|                const uint8_t *str = janet_keyword(data, len);
  ------------------
  |  | 1840|  1.47M|#define janet_keyword janet_symbol
  ------------------
21728|  1.47M|                *out = janet_wrap_keyword(str);
  ------------------
  |  |  850|  1.47M|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  ------------------
  |  |  |  |  828|  1.47M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.47M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.47M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21729|  2.20M|            } else if (lead == LB_REGISTRY) {
  ------------------
  |  Branch (21729:24): [True: 2.20M, False: 6.20k]
  ------------------
21730|  2.20M|                if (st->reg) {
  ------------------
  |  Branch (21730:21): [True: 2.20M, False: 0]
  ------------------
21731|  2.20M|                    Janet regkey = janet_symbolv(data, len);
  ------------------
  |  | 1836|  2.20M|#define janet_symbolv(str, len) janet_wrap_symbol(janet_symbol((str), (len)))
  |  |  ------------------
  |  |  |  |  849|  2.20M|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  2.20M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  2.20M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  2.20M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21732|  2.20M|                    *out = janet_table_get(st->reg, regkey);
21733|  2.20M|                } else {
21734|      0|                    *out = janet_wrap_nil();
  ------------------
  |  |  831|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21735|      0|                }
21736|  2.20M|            } else { /* (lead == LB_BUFFER) */
21737|  6.20k|                JanetBuffer *buffer = janet_buffer(len);
21738|  6.20k|                buffer->count = len;
21739|  6.20k|                safe_memcpy(buffer->data, data, len);
21740|  6.20k|                *out = janet_wrap_buffer(buffer);
  ------------------
  |  |  847|  6.20k|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  825|  6.20k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  6.20k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  6.20k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21741|  6.20k|            }
21742|  24.4M|            janet_v_push(st->lookup, *out);
  ------------------
  |  |  757|  24.4M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|  24.4M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|  24.4M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|  24.4M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  24.4M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  765|  24.4M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  24.4M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 0, False: 24.4M]
  |  |  |  |  |  |  |  Branch (768:50): [True: 74.4k, False: 24.3M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  770|  74.4k|#define janet_v__grow(v, n)      ((v) = janet_v_grow((v), (n), sizeof(*(v))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  766|  24.4M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  24.4M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21743|  24.4M|            return data + len;
21744|  24.4M|        }
21745|      0|        case LB_FIBER: {
  ------------------
  |  Branch (21745:9): [True: 0, False: 104M]
  ------------------
21746|      0|            JanetFiber *fiber;
21747|      0|            data = unmarshal_one_fiber(st, data + 1, &fiber, flags + 1);
21748|      0|            *out = janet_wrap_fiber(fiber);
  ------------------
  |  |  844|      0|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  825|      0|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21749|      0|            return data;
21750|  24.4M|        }
21751|  2.37M|        case LB_FUNCTION: {
  ------------------
  |  Branch (21751:9): [True: 2.37M, False: 101M]
  ------------------
21752|  2.37M|            JanetFunction *func;
21753|  2.37M|            JanetFuncDef *def;
21754|  2.37M|            data++;
21755|  2.37M|            int32_t len = readnat(st, &data);
21756|  2.37M|            if (len > 255) {
  ------------------
  |  Branch (21756:17): [True: 0, False: 2.37M]
  ------------------
21757|      0|                janet_panicf("invalid function - too many environments (%d)", len);
21758|      0|            }
21759|  2.37M|            func = janet_gcalloc(JANET_MEMORY_FUNCTION, sizeof(JanetFunction) +
21760|  2.37M|                                 len * sizeof(JanetFuncEnv));
21761|  2.37M|            func->def = NULL;
21762|  2.64M|            for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (21762:33): [True: 266k, False: 2.37M]
  ------------------
21763|   266k|                func->envs[i] = NULL;
21764|   266k|            }
21765|  2.37M|            *out = janet_wrap_function(func);
  ------------------
  |  |  852|  2.37M|#define janet_wrap_function(s) janet_nanbox_wrap_((s), JANET_FUNCTION)
  |  |  ------------------
  |  |  |  |  825|  2.37M|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.37M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.37M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21766|  2.37M|            janet_v_push(st->lookup, *out);
  ------------------
  |  |  757|  2.37M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|  2.37M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|  2.37M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|  2.37M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  2.37M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  765|  2.37M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  2.37M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 0, False: 2.37M]
  |  |  |  |  |  |  |  Branch (768:50): [True: 0, False: 2.37M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  770|      0|#define janet_v__grow(v, n)      ((v) = janet_v_grow((v), (n), sizeof(*(v))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  766|  2.37M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  2.37M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21767|  2.37M|            data = unmarshal_one_def(st, data, &def, flags + 1);
21768|  2.37M|            func->def = def;
21769|  2.64M|            for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (21769:33): [True: 266k, False: 2.37M]
  ------------------
21770|   266k|                data = unmarshal_one_env(st, data, &(func->envs[i]), flags + 1);
21771|   266k|            }
21772|  2.37M|            return data;
21773|  2.37M|        }
21774|      0|        case LB_ABSTRACT: {
  ------------------
  |  Branch (21774:9): [True: 0, False: 104M]
  ------------------
21775|      0|            data++;
21776|      0|            return unmarshal_one_abstract(st, data, out, flags);
21777|  2.37M|        }
21778|  66.8M|        case LB_REFERENCE:
  ------------------
  |  Branch (21778:9): [True: 66.8M, False: 37.3M]
  ------------------
21779|  66.8M|        case LB_ARRAY:
  ------------------
  |  Branch (21779:9): [True: 18.6k, False: 104M]
  ------------------
21780|  66.8M|        case LB_ARRAY_WEAK:
  ------------------
  |  Branch (21780:9): [True: 0, False: 104M]
  ------------------
21781|  71.5M|        case LB_TUPLE:
  ------------------
  |  Branch (21781:9): [True: 4.66M, False: 99.4M]
  ------------------
21782|  71.5M|        case LB_STRUCT:
  ------------------
  |  Branch (21782:9): [True: 43.4k, False: 104M]
  ------------------
21783|  71.5M|        case LB_STRUCT_PROTO:
  ------------------
  |  Branch (21783:9): [True: 0, False: 104M]
  ------------------
21784|  76.0M|        case LB_TABLE:
  ------------------
  |  Branch (21784:9): [True: 4.53M, False: 99.5M]
  ------------------
21785|  76.0M|        case LB_TABLE_PROTO:
  ------------------
  |  Branch (21785:9): [True: 0, False: 104M]
  ------------------
21786|  76.0M|        case LB_TABLE_WEAKK:
  ------------------
  |  Branch (21786:9): [True: 0, False: 104M]
  ------------------
21787|  76.0M|        case LB_TABLE_WEAKV:
  ------------------
  |  Branch (21787:9): [True: 0, False: 104M]
  ------------------
21788|  76.0M|        case LB_TABLE_WEAKKV:
  ------------------
  |  Branch (21788:9): [True: 0, False: 104M]
  ------------------
21789|  76.0M|        case LB_TABLE_WEAKK_PROTO:
  ------------------
  |  Branch (21789:9): [True: 0, False: 104M]
  ------------------
21790|  76.0M|        case LB_TABLE_WEAKV_PROTO:
  ------------------
  |  Branch (21790:9): [True: 0, False: 104M]
  ------------------
21791|  76.0M|        case LB_TABLE_WEAKKV_PROTO:
  ------------------
  |  Branch (21791:9): [True: 0, False: 104M]
  ------------------
21792|       |            /* Things that open with integers */
21793|  76.0M|        {
21794|  76.0M|            data++;
21795|  76.0M|            int32_t len = readnat(st, &data);
21796|       |            /* DOS check */
21797|  76.0M|            if (lead != LB_REFERENCE) {
  ------------------
  |  Branch (21797:17): [True: 9.26M, False: 66.8M]
  ------------------
21798|  9.26M|                MARSH_EOS(st, data - 1 + len);
  ------------------
  |  |21045|  9.26M|#define MARSH_EOS(st, data) do { \
  |  |21046|  9.26M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21046:9): [True: 0, False: 9.26M]
  |  |  ------------------
  |  |21047|  9.26M|} while (0)
  |  |  ------------------
  |  |  |  Branch (21047:10): [Folded, False: 9.26M]
  |  |  ------------------
  ------------------
21799|  9.26M|            }
21800|  76.0M|            if (lead == LB_ARRAY || lead == LB_ARRAY_WEAK) {
  ------------------
  |  Branch (21800:17): [True: 18.6k, False: 76.0M]
  |  Branch (21800:37): [True: 0, False: 76.0M]
  ------------------
21801|       |                /* Array */
21802|  18.6k|                JanetArray *array = (lead == LB_ARRAY_WEAK) ? janet_array_weak(len) : janet_array(len);
  ------------------
  |  Branch (21802:37): [True: 0, False: 18.6k]
  ------------------
21803|  18.6k|                array->count = len;
21804|  18.6k|                *out = janet_wrap_array(array);
  ------------------
  |  |  845|  18.6k|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  825|  18.6k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  18.6k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  18.6k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21805|  18.6k|                janet_v_push(st->lookup, *out);
  ------------------
  |  |  757|  18.6k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|  18.6k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|  18.6k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|  18.6k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  18.6k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  765|  18.6k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  18.6k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 0, False: 18.6k]
  |  |  |  |  |  |  |  Branch (768:50): [True: 0, False: 18.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  770|      0|#define janet_v__grow(v, n)      ((v) = janet_v_grow((v), (n), sizeof(*(v))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  766|  18.6k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  18.6k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21806|   161k|                for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (21806:37): [True: 142k, False: 18.6k]
  ------------------
21807|   142k|                    data = unmarshal_one(st, data, array->data + i, flags + 1);
21808|   142k|                }
21809|  76.0M|            } else if (lead == LB_TUPLE) {
  ------------------
  |  Branch (21809:24): [True: 4.66M, False: 71.3M]
  ------------------
21810|       |                /* Tuple */
21811|  4.66M|                Janet *tup = janet_tuple_begin(len);
21812|  4.66M|                int32_t flag = readint(st, &data);
21813|  4.66M|                janet_tuple_flag(tup) |= (int32_t)(((uint32_t) flag) << 16);  /* Avoid left shift of negative value */
  ------------------
  |  | 1806|  4.66M|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1800|  4.66M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
21814|  18.4M|                for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (21814:37): [True: 13.7M, False: 4.66M]
  ------------------
21815|  13.7M|                    data = unmarshal_one(st, data, tup + i, flags + 1);
21816|  13.7M|                }
21817|  4.66M|                *out = janet_wrap_tuple(janet_tuple_end(tup));
  ------------------
  |  |  843|  4.66M|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|  4.66M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  4.66M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  4.66M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21818|  4.66M|                janet_v_push(st->lookup, *out);
  ------------------
  |  |  757|  4.66M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|  4.66M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|  4.66M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|  4.66M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  4.66M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  765|  4.66M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  4.66M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 0, False: 4.66M]
  |  |  |  |  |  |  |  Branch (768:50): [True: 0, False: 4.66M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  770|      0|#define janet_v__grow(v, n)      ((v) = janet_v_grow((v), (n), sizeof(*(v))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  766|  4.66M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  4.66M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21819|  71.3M|            } else if (lead == LB_STRUCT || lead == LB_STRUCT_PROTO) {
  ------------------
  |  Branch (21819:24): [True: 43.4k, False: 71.3M]
  |  Branch (21819:45): [True: 0, False: 71.3M]
  ------------------
21820|       |                /* Struct */
21821|  43.4k|                JanetKV *struct_ = janet_struct_begin(len);
21822|  43.4k|                if (lead == LB_STRUCT_PROTO) {
  ------------------
  |  Branch (21822:21): [True: 0, False: 43.4k]
  ------------------
21823|      0|                    Janet proto;
21824|      0|                    data = unmarshal_one(st, data, &proto, flags + 1);
21825|      0|                    janet_asserttype(proto, JANET_STRUCT, st);
21826|      0|                    janet_struct_proto(struct_) = janet_unwrap_struct(proto);
  ------------------
  |  | 1851|      0|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1846|      0|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                                  janet_struct_proto(struct_) = janet_unwrap_struct(proto);
  ------------------
  |  |  857|      0|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
21827|      0|                }
21828|   335k|                for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (21828:37): [True: 291k, False: 43.4k]
  ------------------
21829|   291k|                    Janet key, value;
21830|   291k|                    data = unmarshal_one(st, data, &key, flags + 1);
21831|   291k|                    data = unmarshal_one(st, data, &value, flags + 1);
21832|   291k|                    janet_struct_put(struct_, key, value);
21833|   291k|                }
21834|  43.4k|                *out = janet_wrap_struct(janet_struct_end(struct_));
  ------------------
  |  |  842|  43.4k|#define janet_wrap_struct(s) janet_nanbox_wrap_c((s), JANET_STRUCT)
  |  |  ------------------
  |  |  |  |  828|  43.4k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  43.4k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  43.4k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21835|  43.4k|                janet_v_push(st->lookup, *out);
  ------------------
  |  |  757|  43.4k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|  43.4k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|  43.4k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|  43.4k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  43.4k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  765|  43.4k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  43.4k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 0, False: 43.4k]
  |  |  |  |  |  |  |  Branch (768:50): [True: 0, False: 43.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  770|      0|#define janet_v__grow(v, n)      ((v) = janet_v_grow((v), (n), sizeof(*(v))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  766|  43.4k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  43.4k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21836|  71.3M|            } else if (lead == LB_REFERENCE) {
  ------------------
  |  Branch (21836:24): [True: 66.8M, False: 4.53M]
  ------------------
21837|  66.8M|                if (len >= janet_v_count(st->lookup))
  ------------------
  |  |  759|  66.8M|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  766|  66.8M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  66.8M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (759:34): [True: 66.8M, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (21837:21): [True: 0, False: 66.8M]
  ------------------
21838|      0|                    janet_panicf("invalid reference %d", len);
21839|  66.8M|                *out = st->lookup[len];
21840|  66.8M|            } else {
21841|       |                /* Table */
21842|  4.53M|                JanetTable *t;
21843|  4.53M|                if (lead == LB_TABLE_WEAKK_PROTO || lead == LB_TABLE_WEAKK) {
  ------------------
  |  Branch (21843:21): [True: 0, False: 4.53M]
  |  Branch (21843:53): [True: 0, False: 4.53M]
  ------------------
21844|      0|                    t = janet_table_weakk(len);
21845|  4.53M|                } else if (lead == LB_TABLE_WEAKV_PROTO || lead == LB_TABLE_WEAKV) {
  ------------------
  |  Branch (21845:28): [True: 0, False: 4.53M]
  |  Branch (21845:60): [True: 0, False: 4.53M]
  ------------------
21846|      0|                    t = janet_table_weakv(len);
21847|  4.53M|                } else if (lead == LB_TABLE_WEAKKV_PROTO || lead == LB_TABLE_WEAKKV) {
  ------------------
  |  Branch (21847:28): [True: 0, False: 4.53M]
  |  Branch (21847:61): [True: 0, False: 4.53M]
  ------------------
21848|      0|                    t = janet_table_weakkv(len);
21849|  4.53M|                } else {
21850|  4.53M|                    t = janet_table(len);
21851|  4.53M|                }
21852|  4.53M|                *out = janet_wrap_table(t);
  ------------------
  |  |  846|  4.53M|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  825|  4.53M|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  4.53M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  4.53M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21853|  4.53M|                janet_v_push(st->lookup, *out);
  ------------------
  |  |  757|  4.53M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|  4.53M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|  4.53M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|  4.52M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  4.52M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  765|  4.52M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  4.52M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 6.20k, False: 4.52M]
  |  |  |  |  |  |  |  Branch (768:50): [True: 6.20k, False: 4.52M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  770|  12.4k|#define janet_v__grow(v, n)      ((v) = janet_v_grow((v), (n), sizeof(*(v))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  766|  4.53M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  4.53M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21854|  4.53M|                if (lead == LB_TABLE_PROTO || lead == LB_TABLE_WEAKK_PROTO || lead == LB_TABLE_WEAKV_PROTO || lead == LB_TABLE_WEAKKV_PROTO) {
  ------------------
  |  Branch (21854:21): [True: 0, False: 4.53M]
  |  Branch (21854:47): [True: 0, False: 4.53M]
  |  Branch (21854:79): [True: 0, False: 4.53M]
  |  Branch (21854:111): [True: 0, False: 4.53M]
  ------------------
21855|      0|                    Janet proto;
21856|      0|                    data = unmarshal_one(st, data, &proto, flags + 1);
21857|      0|                    janet_asserttype(proto, JANET_TABLE, st);
21858|      0|                    t->proto = janet_unwrap_table(proto);
  ------------------
  |  |  861|      0|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
21859|      0|                }
21860|  27.3M|                for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (21860:37): [True: 22.8M, False: 4.53M]
  ------------------
21861|  22.8M|                    Janet key, value;
21862|  22.8M|                    data = unmarshal_one(st, data, &key, flags + 1);
21863|  22.8M|                    data = unmarshal_one(st, data, &value, flags + 1);
21864|  22.8M|                    janet_table_put(t, key, value);
21865|  22.8M|                }
21866|  4.53M|            }
21867|  76.0M|            return data;
21868|  76.0M|        }
21869|      0|        case LB_UNSAFE_POINTER: {
  ------------------
  |  Branch (21869:9): [True: 0, False: 104M]
  ------------------
21870|      0|            MARSH_EOS(st, data + sizeof(void *));
  ------------------
  |  |21045|      0|#define MARSH_EOS(st, data) do { \
  |  |21046|      0|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21046:9): [True: 0, False: 0]
  |  |  ------------------
  |  |21047|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (21047:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
21871|      0|            data++;
21872|      0|            if (!(flags & JANET_MARSHAL_UNSAFE)) {
  ------------------
  |  | 1911|      0|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (21872:17): [True: 0, False: 0]
  ------------------
21873|      0|                janet_panicf("unsafe flag not given, "
21874|      0|                             "will not unmarshal raw pointer at index %d",
21875|      0|                             (int)(data - st->start));
21876|      0|            }
21877|      0|            union {
21878|      0|                void *ptr;
21879|      0|                uint8_t bytes[sizeof(void *)];
21880|      0|            } u;
21881|      0|            memcpy(u.bytes, data, sizeof(void *));
21882|      0|            data += sizeof(void *);
21883|      0|            *out = janet_wrap_pointer(u.ptr);
  ------------------
  |  |  854|      0|#define janet_wrap_pointer(s) janet_nanbox_wrap_((s), JANET_POINTER)
  |  |  ------------------
  |  |  |  |  825|      0|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21884|      0|            janet_v_push(st->lookup, *out);
  ------------------
  |  |  757|      0|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|      0|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|      0|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|      0|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  765|      0|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (768:50): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  770|      0|#define janet_v__grow(v, n)      ((v) = janet_v_grow((v), (n), sizeof(*(v))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  766|      0|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21885|      0|            return data;
21886|      0|        }
21887|      0|#ifdef JANET_EV
21888|      0|        case LB_POINTER_BUFFER: {
  ------------------
  |  Branch (21888:9): [True: 0, False: 104M]
  ------------------
21889|      0|            data++;
21890|      0|            int32_t count = readnat(st, &data);
21891|      0|            int32_t capacity = readnat(st, &data);
21892|      0|            MARSH_EOS(st, data + sizeof(void *));
  ------------------
  |  |21045|      0|#define MARSH_EOS(st, data) do { \
  |  |21046|      0|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21046:9): [True: 0, False: 0]
  |  |  ------------------
  |  |21047|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (21047:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
21893|      0|            union {
21894|      0|                void *ptr;
21895|      0|                uint8_t bytes[sizeof(void *)];
21896|      0|            } u;
21897|      0|            if (!(flags & JANET_MARSHAL_UNSAFE)) {
  ------------------
  |  | 1911|      0|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (21897:17): [True: 0, False: 0]
  ------------------
21898|      0|                janet_panicf("unsafe flag not given, "
21899|      0|                             "will not unmarshal raw pointer at index %d",
21900|      0|                             (int)(data - st->start));
21901|      0|            }
21902|      0|            memcpy(u.bytes, data, sizeof(void *));
21903|      0|            data += sizeof(void *);
21904|      0|            JanetBuffer *buffer = janet_pointer_buffer_unsafe(u.ptr, capacity, count);
21905|      0|            *out = janet_wrap_buffer(buffer);
  ------------------
  |  |  847|      0|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  825|      0|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21906|      0|            janet_v_push(st->lookup, *out);
  ------------------
  |  |  757|      0|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|      0|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|      0|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|      0|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  765|      0|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (768:50): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  770|      0|#define janet_v__grow(v, n)      ((v) = janet_v_grow((v), (n), sizeof(*(v))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  766|      0|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21907|      0|            return data;
21908|      0|        }
21909|      0|#endif
21910|      0|        case LB_UNSAFE_CFUNCTION: {
  ------------------
  |  Branch (21910:9): [True: 0, False: 104M]
  ------------------
21911|      0|            MARSH_EOS(st, data + sizeof(JanetCFunction));
  ------------------
  |  |21045|      0|#define MARSH_EOS(st, data) do { \
  |  |21046|      0|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21046:9): [True: 0, False: 0]
  |  |  ------------------
  |  |21047|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (21047:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
21912|      0|            data++;
21913|      0|            if (!(flags & JANET_MARSHAL_UNSAFE)) {
  ------------------
  |  | 1911|      0|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (21913:17): [True: 0, False: 0]
  ------------------
21914|      0|                janet_panicf("unsafe flag not given, "
21915|      0|                             "will not unmarshal function pointer at index %d",
21916|      0|                             (int)(data - st->start));
21917|      0|            }
21918|      0|            union {
21919|      0|                JanetCFunction ptr;
21920|      0|                uint8_t bytes[sizeof(JanetCFunction)];
21921|      0|            } u;
21922|      0|            memcpy(u.bytes, data, sizeof(JanetCFunction));
21923|      0|            data += sizeof(JanetCFunction);
21924|      0|            *out = janet_wrap_cfunction(u.ptr);
  ------------------
  |  |  853|      0|#define janet_wrap_cfunction(s) janet_nanbox_wrap_((s), JANET_CFUNCTION)
  |  |  ------------------
  |  |  |  |  825|      0|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21925|      0|            janet_v_push(st->lookup, *out);
  ------------------
  |  |  757|      0|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|      0|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|      0|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|      0|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  765|      0|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (768:50): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  770|      0|#define janet_v__grow(v, n)      ((v) = janet_v_grow((v), (n), sizeof(*(v))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  766|      0|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21926|      0|            return data;
21927|      0|        }
21928|      0|#ifdef JANET_EV
21929|      0|        case LB_THREADED_ABSTRACT: {
  ------------------
  |  Branch (21929:9): [True: 0, False: 104M]
  ------------------
21930|      0|            MARSH_EOS(st, data + sizeof(void *));
  ------------------
  |  |21045|      0|#define MARSH_EOS(st, data) do { \
  |  |21046|      0|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21046:9): [True: 0, False: 0]
  |  |  ------------------
  |  |21047|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (21047:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
21931|      0|            data++;
21932|      0|            if (!(flags & JANET_MARSHAL_UNSAFE)) {
  ------------------
  |  | 1911|      0|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (21932:17): [True: 0, False: 0]
  ------------------
21933|      0|                janet_panicf("unsafe flag not given, "
21934|      0|                             "will not unmarshal threaded abstract pointer at index %d",
21935|      0|                             (int)(data - st->start));
21936|      0|            }
21937|      0|            union {
21938|      0|                void *ptr;
21939|      0|                uint8_t bytes[sizeof(void *)];
21940|      0|            } u;
21941|      0|            memcpy(u.bytes, data, sizeof(void *));
21942|      0|            data += sizeof(void *);
21943|       |
21944|      0|            if (flags & JANET_MARSHAL_DECREF) {
  ------------------
  |  |  387|      0|#define JANET_MARSHAL_DECREF 0x40000
  ------------------
  |  Branch (21944:17): [True: 0, False: 0]
  ------------------
21945|       |                /* Decrement immediately and don't bother putting into heap */
21946|      0|                janet_abstract_decref(u.ptr);
21947|      0|                *out = janet_wrap_nil();
  ------------------
  |  |  831|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21948|      0|            } else {
21949|      0|                *out = janet_wrap_abstract(u.ptr);
  ------------------
  |  |  851|      0|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|      0|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21950|      0|                Janet check = janet_table_get(&janet_vm.threaded_abstracts, *out);
21951|      0|                if (janet_checktype(check, JANET_NIL)) {
  ------------------
  |  |  806|      0|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 0]
  |  |  ------------------
  |  |  807|      0|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21952|       |                    /* Transfers reference from threaded channel buffer to current heap */
21953|      0|                    janet_table_put(&janet_vm.threaded_abstracts, *out, janet_wrap_false());
  ------------------
  |  |  833|      0|#define janet_wrap_false() janet_nanbox_from_payload(JANET_BOOLEAN, 0)
  |  |  ------------------
  |  |  |  |  822|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21954|      0|                } else {
21955|       |                    /* Heap reference already accounted for, remove threaded channel reference. */
21956|      0|                    janet_abstract_decref(u.ptr);
21957|      0|                }
21958|      0|            }
21959|       |
21960|      0|            janet_v_push(st->lookup, *out);
  ------------------
  |  |  757|      0|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|      0|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|      0|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|      0|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  765|      0|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (768:50): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  770|      0|#define janet_v__grow(v, n)      ((v) = janet_v_grow((v), (n), sizeof(*(v))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  766|      0|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21961|      0|            return data;
21962|      0|        }
21963|      0|#endif
21964|      0|        default: {
  ------------------
  |  Branch (21964:9): [True: 0, False: 104M]
  ------------------
21965|      0|            janet_panicf("unknown byte %x at index %d",
21966|      0|                         *data,
21967|      0|                         (int)(data - st->start));
21968|      0|            return NULL;
21969|      0|        }
21970|   104M|    }
21971|   104M|}
janet.c:readnat:
21082|   129M|static int32_t readnat(UnmarshalState *st, const uint8_t **atdata) {
21083|   129M|    int32_t ret = readint(st, atdata);
21084|   129M|    if (ret < 0) {
  ------------------
  |  Branch (21084:9): [True: 0, False: 129M]
  ------------------
21085|      0|        janet_panicf("expected integer >= 0, got %d", ret);
21086|      0|    }
21087|   129M|    return ret;
21088|   129M|}
janet.c:unmarshal_one_def:
21221|  3.34M|    int flags) {
21222|  3.34M|    MARSH_EOS(st, data);
  ------------------
  |  |21045|  3.34M|#define MARSH_EOS(st, data) do { \
  |  |21046|  3.34M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21046:9): [True: 0, False: 3.34M]
  |  |  ------------------
  |  |21047|  3.34M|} while (0)
  |  |  ------------------
  |  |  |  Branch (21047:10): [Folded, False: 3.34M]
  |  |  ------------------
  ------------------
21223|  3.34M|    if (*data == LB_FUNCDEF_REF) {
  ------------------
  |  Branch (21223:9): [True: 24.8k, False: 3.31M]
  ------------------
21224|  24.8k|        data++;
21225|  24.8k|        int32_t index = readint(st, &data);
21226|  24.8k|        if (index < 0 || index >= janet_v_count(st->lookup_defs))
  ------------------
  |  |  759|  24.8k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  766|  24.8k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  24.8k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (759:34): [True: 24.8k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (21226:13): [True: 0, False: 24.8k]
  |  Branch (21226:26): [True: 0, False: 24.8k]
  ------------------
21227|      0|            janet_panicf("invalid funcdef reference %d", index);
21228|  24.8k|        *out = st->lookup_defs[index];
21229|  3.31M|    } else {
21230|       |        /* Initialize with values that will not break garbage collection
21231|       |         * if unmarshalling fails. */
21232|  3.31M|        JanetFuncDef *def = janet_gcalloc(JANET_MEMORY_FUNCDEF, sizeof(JanetFuncDef));
21233|  3.31M|        def->environments_length = 0;
21234|  3.31M|        def->defs_length = 0;
21235|  3.31M|        def->constants_length = 0;
21236|  3.31M|        def->bytecode_length = 0;
21237|  3.31M|        def->name = NULL;
21238|  3.31M|        def->source = NULL;
21239|  3.31M|        def->closure_bitset = NULL;
21240|  3.31M|        def->defs = NULL;
21241|  3.31M|        def->environments = NULL;
21242|  3.31M|        def->constants = NULL;
21243|  3.31M|        def->bytecode = NULL;
21244|  3.31M|        def->sourcemap = NULL;
21245|  3.31M|        def->symbolmap = NULL;
21246|  3.31M|        def->symbolmap_length = 0;
21247|  3.31M|        def->named_args_count = 0;
21248|  3.31M|        janet_v_push(st->lookup_defs, def);
  ------------------
  |  |  757|  3.31M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|  3.31M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|  3.31M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|  3.31M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  3.31M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  765|  3.31M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  3.31M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 6.20k, False: 3.31M]
  |  |  |  |  |  |  |  Branch (768:50): [True: 62.0k, False: 3.25M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  770|  68.2k|#define janet_v__grow(v, n)      ((v) = janet_v_grow((v), (n), sizeof(*(v))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  766|  3.31M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  3.31M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21249|       |
21250|       |        /* Set default lengths to zero */
21251|  3.31M|        int32_t bytecode_length = 0;
21252|  3.31M|        int32_t constants_length = 0;
21253|  3.31M|        int32_t environments_length = 0;
21254|  3.31M|        int32_t defs_length = 0;
21255|  3.31M|        int32_t symbolmap_length = 0;
21256|       |
21257|       |        /* Read flags and other fixed values */
21258|  3.31M|        def->flags = readint(st, &data);
21259|  3.31M|        def->slotcount = readnat(st, &data);
21260|  3.31M|        def->arity = readnat(st, &data);
21261|  3.31M|        def->min_arity = readnat(st, &data);
21262|  3.31M|        def->max_arity = readnat(st, &data);
21263|       |
21264|       |        /* Read some lengths */
21265|  3.31M|        constants_length = readnat(st, &data);
21266|  3.31M|        bytecode_length = readnat(st, &data);
21267|  3.31M|        if (def->flags & JANET_FUNCDEF_FLAG_NAMEDARGS)
  ------------------
  |  | 1107|  3.31M|#define JANET_FUNCDEF_FLAG_NAMEDARGS 0x4000000
  ------------------
  |  Branch (21267:13): [True: 12.4k, False: 3.30M]
  ------------------
21268|  12.4k|            def->named_args_count = readnat(st, &data);
21269|  3.31M|        if (def->flags & JANET_FUNCDEF_FLAG_HASENVS)
  ------------------
  |  | 1103|  3.31M|#define JANET_FUNCDEF_FLAG_HASENVS 0x400000
  ------------------
  |  Branch (21269:13): [True: 3.11M, False: 204k]
  ------------------
21270|  3.11M|            environments_length = readnat(st, &data);
21271|  3.31M|        if (def->flags & JANET_FUNCDEF_FLAG_HASDEFS)
  ------------------
  |  | 1102|  3.31M|#define JANET_FUNCDEF_FLAG_HASDEFS 0x200000
  ------------------
  |  Branch (21271:13): [True: 434k, False: 2.88M]
  ------------------
21272|   434k|            defs_length = readnat(st, &data);
21273|  3.31M|        if (def->flags & JANET_FUNCDEF_FLAG_HASSYMBOLMAP)
  ------------------
  |  | 1099|  3.31M|#define JANET_FUNCDEF_FLAG_HASSYMBOLMAP 0x40000
  ------------------
  |  Branch (21273:13): [True: 3.07M, False: 248k]
  ------------------
21274|  3.07M|            symbolmap_length = readnat(st, &data);
21275|       |
21276|       |        /* Check name and source (optional) */
21277|  3.31M|        if (def->flags & JANET_FUNCDEF_FLAG_HASNAME) {
  ------------------
  |  | 1100|  3.31M|#define JANET_FUNCDEF_FLAG_HASNAME 0x80000
  ------------------
  |  Branch (21277:13): [True: 3.10M, False: 210k]
  ------------------
21278|  3.10M|            Janet x;
21279|  3.10M|            data = unmarshal_one(st, data, &x, flags + 1);
21280|  3.10M|            janet_asserttype(x, JANET_STRING, st);
21281|  3.10M|            def->name = janet_unwrap_string(x);
  ------------------
  |  |  863|  3.10M|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
21282|  3.10M|        }
21283|  3.31M|        if (def->flags & JANET_FUNCDEF_FLAG_HASSOURCE) {
  ------------------
  |  | 1101|  3.31M|#define JANET_FUNCDEF_FLAG_HASSOURCE 0x100000
  ------------------
  |  Branch (21283:13): [True: 3.11M, False: 204k]
  ------------------
21284|  3.11M|            Janet x;
21285|  3.11M|            data = unmarshal_one(st, data, &x, flags + 1);
21286|  3.11M|            janet_asserttype(x, JANET_STRING, st);
21287|  3.11M|            def->source = janet_unwrap_string(x);
  ------------------
  |  |  863|  3.11M|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
21288|  3.11M|        }
21289|       |
21290|       |        /* Unmarshal constants */
21291|  3.31M|        if (constants_length) {
  ------------------
  |  Branch (21291:13): [True: 2.53M, False: 788k]
  ------------------
21292|  2.53M|            def->constants = array_allocate(sizeof(Janet), constants_length);
21293|  2.53M|            if (!def->constants) {
  ------------------
  |  Branch (21293:17): [True: 0, False: 2.53M]
  ------------------
21294|      0|                JANET_OUT_OF_MEMORY;
  ------------------
  |  |  419|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (419:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
21295|      0|            }
21296|  16.6M|            for (int32_t i = 0; i < constants_length; i++)
  ------------------
  |  Branch (21296:33): [True: 14.0M, False: 2.53M]
  ------------------
21297|  14.0M|                data = unmarshal_one(st, data, def->constants + i, flags + 1);
21298|  2.53M|        } else {
21299|   788k|            def->constants = NULL;
21300|   788k|        }
21301|  3.31M|        def->constants_length = constants_length;
21302|       |
21303|       |        /* Unmarshal symbol map, if needed */
21304|  3.31M|        if (def->flags & JANET_FUNCDEF_FLAG_HASSYMBOLMAP) {
  ------------------
  |  | 1099|  3.31M|#define JANET_FUNCDEF_FLAG_HASSYMBOLMAP 0x40000
  ------------------
  |  Branch (21304:13): [True: 3.07M, False: 248k]
  ------------------
21305|  3.07M|            def->symbolmap = array_allocate(sizeof(JanetSymbolMap), symbolmap_length);
21306|  3.07M|            if (def->symbolmap == NULL) {
  ------------------
  |  Branch (21306:17): [True: 0, False: 3.07M]
  ------------------
21307|      0|                JANET_OUT_OF_MEMORY;
  ------------------
  |  |  419|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (419:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
21308|      0|            }
21309|  34.6M|            for (int32_t i = 0; i < symbolmap_length; i++) {
  ------------------
  |  Branch (21309:33): [True: 31.5M, False: 3.07M]
  ------------------
21310|  31.5M|                def->symbolmap[i].birth_pc = (uint32_t) readint(st, &data);
21311|  31.5M|                def->symbolmap[i].death_pc = (uint32_t) readint(st, &data);
21312|  31.5M|                def->symbolmap[i].slot_index = (uint32_t) readint(st, &data);
21313|  31.5M|                Janet value;
21314|  31.5M|                data = unmarshal_one(st, data, &value, flags + 1);
21315|  31.5M|                if (!janet_checktype(value, JANET_SYMBOL)) {
  ------------------
  |  |  806|  31.5M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 31.5M]
  |  |  ------------------
  |  |  807|  31.5M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  31.5M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  31.5M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  31.5M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  31.5M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  31.5M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (21315:21): [True: 0, False: 31.5M]
  ------------------
21316|      0|                    janet_panicf("corrupted symbolmap when unmarshalling debug info, got %v", value);
21317|      0|                }
21318|  31.5M|                def->symbolmap[i].symbol = janet_unwrap_symbol(value);
  ------------------
  |  |  864|  31.5M|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
21319|  31.5M|            }
21320|  3.07M|            def->symbolmap_length = (uint32_t) symbolmap_length;
21321|  3.07M|        }
21322|       |
21323|       |        /* Unmarshal bytecode */
21324|  3.31M|        def->bytecode = array_allocate(sizeof(uint32_t), bytecode_length);
21325|  3.31M|        if (!def->bytecode) {
  ------------------
  |  Branch (21325:13): [True: 0, False: 3.31M]
  ------------------
21326|      0|            JANET_OUT_OF_MEMORY;
  ------------------
  |  |  419|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (419:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
21327|      0|        }
21328|  3.31M|        data = janet_unmarshal_u32s(st, data, def->bytecode, bytecode_length);
21329|  3.31M|        def->bytecode_length = bytecode_length;
21330|       |
21331|       |        /* Unmarshal environments */
21332|  3.31M|        if (def->flags & JANET_FUNCDEF_FLAG_HASENVS) {
  ------------------
  |  | 1103|  3.31M|#define JANET_FUNCDEF_FLAG_HASENVS 0x400000
  ------------------
  |  Branch (21332:13): [True: 3.11M, False: 204k]
  ------------------
21333|  3.11M|            def->environments = janet_calloc(1, sizeof(int32_t) * (size_t) environments_length);
  ------------------
  |  | 2412|  3.11M|#define janet_calloc(X, Y) calloc((X), (Y))
  ------------------
21334|  3.11M|            if (!def->environments) {
  ------------------
  |  Branch (21334:17): [True: 0, False: 3.11M]
  ------------------
21335|      0|                JANET_OUT_OF_MEMORY;
  ------------------
  |  |  419|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (419:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
21336|      0|            }
21337|  4.33M|            for (int32_t i = 0; i < environments_length; i++) {
  ------------------
  |  Branch (21337:33): [True: 1.22M, False: 3.11M]
  ------------------
21338|  1.22M|                def->environments[i] = readint(st, &data);
21339|  1.22M|            }
21340|  3.11M|        } else {
21341|   204k|            def->environments = NULL;
21342|   204k|        }
21343|  3.31M|        def->environments_length = environments_length;
21344|       |
21345|       |        /* Unmarshal sub funcdefs */
21346|  3.31M|        if (def->flags & JANET_FUNCDEF_FLAG_HASDEFS) {
  ------------------
  |  | 1102|  3.31M|#define JANET_FUNCDEF_FLAG_HASDEFS 0x200000
  ------------------
  |  Branch (21346:13): [True: 434k, False: 2.88M]
  ------------------
21347|   434k|            def->defs = janet_calloc(1, sizeof(JanetFuncDef *) * (size_t) defs_length);
  ------------------
  |  | 2412|   434k|#define janet_calloc(X, Y) calloc((X), (Y))
  ------------------
21348|   434k|            if (!def->defs) {
  ------------------
  |  Branch (21348:17): [True: 0, False: 434k]
  ------------------
21349|      0|                JANET_OUT_OF_MEMORY;
  ------------------
  |  |  419|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (419:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
21350|      0|            }
21351|  1.40M|            for (int32_t i = 0; i < defs_length; i++) {
  ------------------
  |  Branch (21351:33): [True: 967k, False: 434k]
  ------------------
21352|   967k|                data = unmarshal_one_def(st, data, def->defs + i, flags + 1);
21353|   967k|            }
21354|  2.88M|        } else {
21355|  2.88M|            def->defs = NULL;
21356|  2.88M|        }
21357|  3.31M|        def->defs_length = defs_length;
21358|       |
21359|       |        /* Unmarshal source maps if needed */
21360|  3.31M|        if (def->flags & JANET_FUNCDEF_FLAG_HASSOURCEMAP) {
  ------------------
  |  | 1104|  3.31M|#define JANET_FUNCDEF_FLAG_HASSOURCEMAP 0x800000
  ------------------
  |  Branch (21360:13): [True: 3.11M, False: 204k]
  ------------------
21361|  3.11M|            int32_t current = 0;
21362|  3.11M|            def->sourcemap = array_allocate(sizeof(JanetSourceMapping), bytecode_length);
21363|  3.11M|            if (!def->sourcemap) {
  ------------------
  |  Branch (21363:17): [True: 0, False: 3.11M]
  ------------------
21364|      0|                JANET_OUT_OF_MEMORY;
  ------------------
  |  |  419|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (419:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
21365|      0|            }
21366|  92.4M|            for (int32_t i = 0; i < bytecode_length; i++) {
  ------------------
  |  Branch (21366:33): [True: 89.3M, False: 3.11M]
  ------------------
21367|  89.3M|                current += readint(st, &data);
21368|  89.3M|                def->sourcemap[i].line = current;
21369|  89.3M|                def->sourcemap[i].column = readint(st, &data);
21370|  89.3M|            }
21371|  3.11M|        } else {
21372|   204k|            def->sourcemap = NULL;
21373|   204k|        }
21374|       |
21375|       |        /* Unmarshal closure bitset if needed */
21376|  3.31M|        if (def->flags & JANET_FUNCDEF_FLAG_HASCLOBITSET) {
  ------------------
  |  | 1106|  3.31M|#define JANET_FUNCDEF_FLAG_HASCLOBITSET 0x2000000
  ------------------
  |  Branch (21376:13): [True: 366k, False: 2.95M]
  ------------------
21377|   366k|            int32_t n = ((def->slotcount - 1) >> 5) + 1;
21378|   366k|            def->closure_bitset = array_allocate(sizeof(uint32_t), n);
21379|   366k|            if (NULL == def->closure_bitset) {
  ------------------
  |  Branch (21379:17): [True: 0, False: 366k]
  ------------------
21380|      0|                JANET_OUT_OF_MEMORY;
  ------------------
  |  |  419|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (419:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
21381|      0|            }
21382|   366k|            data = janet_unmarshal_u32s(st, data, def->closure_bitset, n);
21383|   366k|        }
21384|       |
21385|       |        /* Validate */
21386|  3.31M|        int status;
21387|  3.31M|        if ((status = janet_verify(def))) {
  ------------------
  |  Branch (21387:13): [True: 0, False: 3.31M]
  ------------------
21388|      0|            janet_panicf("funcdef has invalid bytecode: %d", status);
21389|      0|        }
21390|       |
21391|       |        /* Set def */
21392|  3.31M|        *out = def;
21393|  3.31M|    }
21394|  3.34M|    return data;
21395|  3.34M|}
janet.c:janet_unmarshal_u32s:
21203|  3.68M|static const uint8_t *janet_unmarshal_u32s(UnmarshalState *st, const uint8_t *data, uint32_t *into, int32_t n) {
21204|  95.8M|    for (int32_t i = 0; i < n; i++) {
  ------------------
  |  Branch (21204:25): [True: 92.1M, False: 3.68M]
  ------------------
21205|  92.1M|        MARSH_EOS(st, data + 3);
  ------------------
  |  |21045|  92.1M|#define MARSH_EOS(st, data) do { \
  |  |21046|  92.1M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21046:9): [True: 0, False: 92.1M]
  |  |  ------------------
  |  |21047|  92.1M|} while (0)
  |  |  ------------------
  |  |  |  Branch (21047:10): [Folded, False: 92.1M]
  |  |  ------------------
  ------------------
21206|  92.1M|        into[i] =
21207|  92.1M|            (uint32_t)(data[0]) |
21208|  92.1M|            ((uint32_t)(data[1]) << 8) |
21209|  92.1M|            ((uint32_t)(data[2]) << 16) |
21210|  92.1M|            ((uint32_t)(data[3]) << 24);
21211|  92.1M|        data += 4;
21212|  92.1M|    }
21213|  3.68M|    return data;
21214|  3.68M|}
janet.c:unmarshal_one_env:
21159|   266k|    int flags) {
21160|   266k|    MARSH_EOS(st, data);
  ------------------
  |  |21045|   266k|#define MARSH_EOS(st, data) do { \
  |  |21046|   266k|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21046:9): [True: 0, False: 266k]
  |  |  ------------------
  |  |21047|   266k|} while (0)
  |  |  ------------------
  |  |  |  Branch (21047:10): [Folded, False: 266k]
  |  |  ------------------
  ------------------
21161|   266k|    if (*data == LB_FUNCENV_REF) {
  ------------------
  |  Branch (21161:9): [True: 217k, False: 49.6k]
  ------------------
21162|   217k|        data++;
21163|   217k|        int32_t index = readint(st, &data);
21164|   217k|        if (index < 0 || index >= janet_v_count(st->lookup_envs))
  ------------------
  |  |  759|   217k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  766|   217k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|   217k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (759:34): [True: 217k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (21164:13): [True: 0, False: 217k]
  |  Branch (21164:26): [True: 0, False: 217k]
  ------------------
21165|      0|            janet_panicf("invalid funcenv reference %d", index);
21166|   217k|        *out = st->lookup_envs[index];
21167|   217k|    } else {
21168|  49.6k|        JanetFuncEnv *env = janet_gcalloc(JANET_MEMORY_FUNCENV, sizeof(JanetFuncEnv));
21169|  49.6k|        env->length = 0;
21170|  49.6k|        env->offset = 0;
21171|  49.6k|        env->as.values = NULL;
21172|  49.6k|        janet_v_push(st->lookup_envs, env);
  ------------------
  |  |  757|  49.6k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|  49.6k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|  49.6k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|  43.4k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  43.4k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  765|  43.4k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  43.4k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 6.20k, False: 43.4k]
  |  |  |  |  |  |  |  Branch (768:50): [True: 24.8k, False: 18.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  770|  31.0k|#define janet_v__grow(v, n)      ((v) = janet_v_grow((v), (n), sizeof(*(v))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  766|  49.6k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  49.6k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21173|  49.6k|        int32_t offset = readnat(st, &data);
21174|  49.6k|        int32_t length = readnat(st, &data);
21175|  49.6k|        if (offset > 0) {
  ------------------
  |  Branch (21175:13): [True: 0, False: 49.6k]
  ------------------
21176|      0|            Janet fiberv;
21177|       |            /* On stack variant */
21178|      0|            data = unmarshal_one(st, data, &fiberv, flags);
21179|      0|            janet_asserttype(fiberv, JANET_FIBER, st);
21180|      0|            env->as.fiber = janet_unwrap_fiber(fiberv);
  ------------------
  |  |  859|      0|#define janet_unwrap_fiber(x) ((JanetFiber *)janet_nanbox_to_pointer(x))
  ------------------
21181|       |            /* Negative offset indicates untrusted input */
21182|      0|            env->offset = -offset;
21183|  49.6k|        } else {
21184|       |            /* Off stack variant */
21185|  49.6k|            if (length == 0) {
  ------------------
  |  Branch (21185:17): [True: 0, False: 49.6k]
  ------------------
21186|      0|                janet_panic("invalid funcenv length");
21187|      0|            }
21188|  49.6k|            env->as.values = array_allocate(sizeof(Janet), length);
21189|  49.6k|            if (!env->as.values) {
  ------------------
  |  Branch (21189:17): [True: 0, False: 49.6k]
  ------------------
21190|      0|                JANET_OUT_OF_MEMORY;
  ------------------
  |  |  419|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (419:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
21191|      0|            }
21192|  49.6k|            env->offset = 0;
21193|   614k|            for (int32_t i = 0; i < length; i++)
  ------------------
  |  Branch (21193:33): [True: 564k, False: 49.6k]
  ------------------
21194|   564k|                data = unmarshal_one(st, data, env->as.values + i, flags);
21195|  49.6k|        }
21196|  49.6k|        env->length = length;
21197|  49.6k|        *out = env;
21198|  49.6k|    }
21199|   266k|    return data;
21200|   266k|}
janet.c:janet_asserttype:
21121|  6.22M|static void janet_asserttype(Janet x, JanetType t, UnmarshalState *st) {
21122|  6.22M|    if (!janet_checktype(x, t)) {
  ------------------
  |  |  806|  6.22M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [True: 0, False: 6.22M]
  |  |  ------------------
  |  |  807|  6.22M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  6.22M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  6.22M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  6.22M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  6.22M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  6.22M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (21122:9): [True: 0, False: 6.22M]
  ------------------
21123|       |#ifdef JANET_MARSHAL_DEBUG
21124|       |        dump_reference_table(st);
21125|       |#else
21126|      0|        (void) st;
21127|      0|#endif
21128|      0|        janet_panicf("expected type %T, got %v", 1 << t, x);
21129|      0|    }
21130|  6.22M|}
janet.c:janet_parser_checkdead:
27639|   260k|static void janet_parser_checkdead(JanetParser *parser) {
27640|   260k|    if (parser->flag) janet_panic("parser is dead, cannot consume");
  ------------------
  |  Branch (27640:9): [True: 0, False: 260k]
  ------------------
27641|   260k|    if (parser->error) janet_panic("parser has unchecked error, cannot consume");
  ------------------
  |  Branch (27641:9): [True: 0, False: 260k]
  ------------------
27642|   260k|}
janet.c:delim_error:
27149|  1.47k|static void delim_error(JanetParser *parser, size_t stack_index, char c, const char *msg) {
27150|  1.47k|    JanetParseState *s = parser->states + stack_index;
27151|  1.47k|    JanetBuffer *buffer = janet_buffer(40);
27152|  1.47k|    if (msg) {
  ------------------
  |  Branch (27152:9): [True: 1.47k, False: 0]
  ------------------
27153|  1.47k|        janet_buffer_push_cstring(buffer, msg);
27154|  1.47k|    }
27155|  1.47k|    if (c) {
  ------------------
  |  Branch (27155:9): [True: 80, False: 1.39k]
  ------------------
27156|     80|        janet_buffer_push_u8(buffer, c);
27157|     80|    }
27158|  1.47k|    if (stack_index > 0) {
  ------------------
  |  Branch (27158:9): [True: 1.41k, False: 60]
  ------------------
27159|  1.41k|        janet_buffer_push_cstring(buffer, ", ");
27160|  1.41k|        if (s->flags & PFLAG_PARENS) {
  ------------------
  |  |27085|  1.41k|#define PFLAG_PARENS 0x400
  ------------------
  |  Branch (27160:13): [True: 120, False: 1.29k]
  ------------------
27161|    120|            janet_buffer_push_u8(buffer, '(');
27162|  1.29k|        } else if (s->flags & PFLAG_SQRBRACKETS) {
  ------------------
  |  |27086|  1.29k|#define PFLAG_SQRBRACKETS 0x800
  ------------------
  |  Branch (27162:20): [True: 64, False: 1.23k]
  ------------------
27163|     64|            janet_buffer_push_u8(buffer, '[');
27164|  1.23k|        } else if (s->flags & PFLAG_CURLYBRACKETS) {
  ------------------
  |  |27087|  1.23k|#define PFLAG_CURLYBRACKETS 0x1000
  ------------------
  |  Branch (27164:20): [True: 112, False: 1.12k]
  ------------------
27165|    112|            janet_buffer_push_u8(buffer, '{');
27166|  1.12k|        } else if (s->flags & PFLAG_STRING) {
  ------------------
  |  |27088|  1.12k|#define PFLAG_STRING 0x2000
  ------------------
  |  Branch (27166:20): [True: 347, False: 775]
  ------------------
27167|    347|            janet_buffer_push_u8(buffer, '"');
27168|    775|        } else if (s->flags & PFLAG_LONGSTRING) {
  ------------------
  |  |27089|    775|#define PFLAG_LONGSTRING 0x4000
  ------------------
  |  Branch (27168:20): [True: 159, False: 616]
  ------------------
27169|    159|            int32_t i;
27170|  2.47k|            for (i = 0; i < s->argn; i++) {
  ------------------
  |  Branch (27170:25): [True: 2.31k, False: 159]
  ------------------
27171|  2.31k|                janet_buffer_push_u8(buffer, '`');
27172|  2.31k|            }
27173|    159|        }
27174|  1.41k|        janet_formatb(buffer, " opened at line %d, column %d", (int32_t) s->line, (int32_t) s->column);
27175|  1.41k|    }
27176|  1.47k|    parser->error = (const char *) janet_string(buffer->data, buffer->count);
27177|  1.47k|    parser->flag |= JANET_PARSER_GENERATED_ERROR;
  ------------------
  |  |26979|  1.47k|#define JANET_PARSER_GENERATED_ERROR 0x2
  ------------------
27178|  1.47k|}
janet.c:pushstate:
27095|   104k|static void pushstate(JanetParser *p, Consumer consumer, int flags) {
27096|   104k|    JanetParseState s;
27097|   104k|    s.counter = 0;
27098|   104k|    s.argn = 0;
27099|   104k|    s.flags = flags;
27100|   104k|    s.consumer = consumer;
27101|   104k|    s.line = p->line;
27102|   104k|    s.column = p->column;
27103|   104k|    _pushstate(p, s);
27104|   104k|}
janet.c:root:
27566|   131k|static int root(JanetParser *p, JanetParseState *state, uint8_t c) {
27567|   131k|    switch (c) {
27568|  57.7k|        default:
  ------------------
  |  Branch (27568:9): [True: 57.7k, False: 74.1k]
  ------------------
27569|  57.7k|            if (is_whitespace(c)) return 1;
  ------------------
  |  Branch (27569:17): [True: 27.9k, False: 29.7k]
  ------------------
27570|  29.7k|            if (!janet_is_symbol_char(c)) {
  ------------------
  |  Branch (27570:17): [True: 139, False: 29.6k]
  ------------------
27571|    139|                p->error = "unexpected character";
27572|    139|                return 1;
27573|    139|            }
27574|  29.6k|            pushstate(p, tokenchar, PFLAG_TOKEN);
  ------------------
  |  |27093|  29.6k|#define PFLAG_TOKEN 0x40000
  ------------------
27575|  29.6k|            return 0;
27576|  19.9k|        case '\'':
  ------------------
  |  Branch (27576:9): [True: 19.9k, False: 111k]
  ------------------
27577|  24.9k|        case ',':
  ------------------
  |  Branch (27577:9): [True: 5.00k, False: 126k]
  ------------------
27578|  30.8k|        case ';':
  ------------------
  |  Branch (27578:9): [True: 5.93k, False: 125k]
  ------------------
27579|  36.0k|        case '~':
  ------------------
  |  Branch (27579:9): [True: 5.16k, False: 126k]
  ------------------
27580|  44.5k|        case '|':
  ------------------
  |  Branch (27580:9): [True: 8.55k, False: 123k]
  ------------------
27581|  44.5k|            pushstate(p, root, PFLAG_READERMAC | c);
  ------------------
  |  |27090|  44.5k|#define PFLAG_READERMAC 0x8000
  ------------------
27582|  44.5k|            return 1;
27583|  5.09k|        case '"':
  ------------------
  |  Branch (27583:9): [True: 5.09k, False: 126k]
  ------------------
27584|  5.09k|            pushstate(p, stringchar, PFLAG_STRING);
  ------------------
  |  |27088|  5.09k|#define PFLAG_STRING 0x2000
  ------------------
27585|  5.09k|            return 1;
27586|    400|        case '#':
  ------------------
  |  Branch (27586:9): [True: 400, False: 131k]
  ------------------
27587|    400|            pushstate(p, comment, PFLAG_COMMENT);
  ------------------
  |  |27092|    400|#define PFLAG_COMMENT 0x20000
  ------------------
27588|    400|            return 1;
27589|  3.13k|        case '@':
  ------------------
  |  Branch (27589:9): [True: 3.13k, False: 128k]
  ------------------
27590|  3.13k|            pushstate(p, atsign, PFLAG_ATSYM);
  ------------------
  |  |27091|  3.13k|#define PFLAG_ATSYM 0x10000
  ------------------
27591|  3.13k|            return 1;
27592|  1.43k|        case '`':
  ------------------
  |  Branch (27592:9): [True: 1.43k, False: 130k]
  ------------------
27593|  1.43k|            pushstate(p, longstring, PFLAG_LONGSTRING);
  ------------------
  |  |27089|  1.43k|#define PFLAG_LONGSTRING 0x4000
  ------------------
27594|  1.43k|            return 1;
27595|  2.81k|        case ')':
  ------------------
  |  Branch (27595:9): [True: 2.81k, False: 129k]
  ------------------
27596|  4.16k|        case ']':
  ------------------
  |  Branch (27596:9): [True: 1.34k, False: 130k]
  ------------------
27597|  8.84k|        case '}': {
  ------------------
  |  Branch (27597:9): [True: 4.67k, False: 127k]
  ------------------
27598|  8.84k|            Janet ds;
27599|  8.84k|            if (p->statecount == 1) {
  ------------------
  |  Branch (27599:17): [True: 60, False: 8.78k]
  ------------------
27600|     60|                delim_error(p, 0, c, "unexpected closing delimiter ");
27601|     60|                return 1;
27602|     60|            }
27603|  8.78k|            if ((c == ')' && (state->flags & PFLAG_PARENS)) ||
  ------------------
  |  |27085|  2.79k|#define PFLAG_PARENS 0x400
  ------------------
  |  Branch (27603:18): [True: 2.79k, False: 5.98k]
  |  Branch (27603:30): [True: 2.79k, False: 6]
  ------------------
27604|  5.98k|                    (c == ']' && (state->flags & PFLAG_SQRBRACKETS))) {
  ------------------
  |  |27086|  1.33k|#define PFLAG_SQRBRACKETS 0x800
  ------------------
  |  Branch (27604:22): [True: 1.33k, False: 4.65k]
  |  Branch (27604:34): [True: 1.33k, False: 3]
  ------------------
27605|  4.12k|                if (state->flags & PFLAG_ATSYM) {
  ------------------
  |  |27091|  4.12k|#define PFLAG_ATSYM 0x10000
  ------------------
  |  Branch (27605:21): [True: 851, False: 3.27k]
  ------------------
27606|    851|                    ds = close_array(p, state);
27607|  3.27k|                } else {
27608|  3.27k|                    ds = close_tuple(p, state, c == ']' ? JANET_TUPLE_FLAG_BRACKETCTOR : 0);
  ------------------
  |  | 1798|    623|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
  |  Branch (27608:48): [True: 623, False: 2.65k]
  ------------------
27609|  3.27k|                }
27610|  4.65k|            } else if (c == '}' && (state->flags & PFLAG_CURLYBRACKETS)) {
  ------------------
  |  |27087|  4.64k|#define PFLAG_CURLYBRACKETS 0x1000
  ------------------
  |  Branch (27610:24): [True: 4.64k, False: 9]
  |  Branch (27610:36): [True: 4.63k, False: 11]
  ------------------
27611|  4.63k|                if (state->argn & 1) {
  ------------------
  |  Branch (27611:21): [True: 41, False: 4.59k]
  ------------------
27612|     41|                    p->error = "struct and table literals expect even number of arguments";
27613|     41|                    return 1;
27614|     41|                }
27615|  4.59k|                if (state->flags & PFLAG_ATSYM) {
  ------------------
  |  |27091|  4.59k|#define PFLAG_ATSYM 0x10000
  ------------------
  |  Branch (27615:21): [True: 709, False: 3.88k]
  ------------------
27616|    709|                    ds = close_table(p, state);
27617|  3.88k|                } else {
27618|  3.88k|                    ds = close_struct(p, state);
27619|  3.88k|                }
27620|  4.59k|            } else {
27621|     20|                delim_error(p, p->statecount - 1, c, "mismatched delimiter ");
27622|     20|                return 1;
27623|     20|            }
27624|  8.71k|            popstate(p, ds);
27625|  8.71k|        }
27626|      0|        return 1;
27627|  4.04k|        case '(':
  ------------------
  |  Branch (27627:9): [True: 4.04k, False: 127k]
  ------------------
27628|  4.04k|            pushstate(p, root, PFLAG_CONTAINER | PFLAG_PARENS);
  ------------------
  |  |27083|  4.04k|#define PFLAG_CONTAINER 0x100
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_PARENS);
  ------------------
  |  |27085|  4.04k|#define PFLAG_PARENS 0x400
  ------------------
27629|  4.04k|            return 1;
27630|  1.28k|        case '[':
  ------------------
  |  Branch (27630:9): [True: 1.28k, False: 130k]
  ------------------
27631|  1.28k|            pushstate(p, root, PFLAG_CONTAINER | PFLAG_SQRBRACKETS);
  ------------------
  |  |27083|  1.28k|#define PFLAG_CONTAINER 0x100
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_SQRBRACKETS);
  ------------------
  |  |27086|  1.28k|#define PFLAG_SQRBRACKETS 0x800
  ------------------
27632|  1.28k|            return 1;
27633|  5.33k|        case '{':
  ------------------
  |  Branch (27633:9): [True: 5.33k, False: 126k]
  ------------------
27634|  5.33k|            pushstate(p, root, PFLAG_CONTAINER | PFLAG_CURLYBRACKETS);
  ------------------
  |  |27083|  5.33k|#define PFLAG_CONTAINER 0x100
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_CURLYBRACKETS);
  ------------------
  |  |27087|  5.33k|#define PFLAG_CURLYBRACKETS 0x1000
  ------------------
27635|  5.33k|            return 1;
27636|   131k|    }
27637|   131k|}
janet.c:is_whitespace:
26982|  57.7k|static int is_whitespace(uint8_t c) {
26983|  57.7k|    return c == ' '
  ------------------
  |  Branch (26983:12): [True: 1.15k, False: 56.5k]
  ------------------
26984|  56.5k|           || c == '\t'
  ------------------
  |  Branch (26984:15): [True: 2.00k, False: 54.5k]
  ------------------
26985|  54.5k|           || c == '\n'
  ------------------
  |  Branch (26985:15): [True: 6.09k, False: 48.4k]
  ------------------
26986|  48.4k|           || c == '\r'
  ------------------
  |  Branch (26986:15): [True: 2.09k, False: 46.3k]
  ------------------
26987|  46.3k|           || c == '\0'
  ------------------
  |  Branch (26987:15): [True: 14.4k, False: 31.9k]
  ------------------
26988|  31.9k|           || c == '\v'
  ------------------
  |  Branch (26988:15): [True: 1.41k, False: 30.4k]
  ------------------
26989|  30.4k|           || c == '\f';
  ------------------
  |  Branch (26989:15): [True: 735, False: 29.7k]
  ------------------
26990|  57.7k|}
janet.c:stringchar:
27361|  23.4k|static int stringchar(JanetParser *p, JanetParseState *state, uint8_t c) {
27362|       |    /* Enter escape */
27363|  23.4k|    if (c == '\\') {
  ------------------
  |  Branch (27363:9): [True: 1.99k, False: 21.4k]
  ------------------
27364|  1.99k|        state->consumer = escape1;
27365|  1.99k|        return 1;
27366|  1.99k|    }
27367|       |    /* String end */
27368|  21.4k|    if (c == '"') {
  ------------------
  |  Branch (27368:9): [True: 4.97k, False: 16.4k]
  ------------------
27369|  4.97k|        return stringend(p, state);
27370|  4.97k|    }
27371|       |    /* normal char */
27372|  16.4k|    if (c != '\n' && c != '\r')
  ------------------
  |  Branch (27372:9): [True: 15.8k, False: 638]
  |  Branch (27372:22): [True: 15.4k, False: 316]
  ------------------
27373|  15.4k|        push_buf(p, c);
27374|  16.4k|    return 1;
27375|  21.4k|}
janet.c:escape1:
27276|  1.99k|static int escape1(JanetParser *p, JanetParseState *state, uint8_t c) {
27277|  1.99k|    int e = checkescape(c);
27278|  1.99k|    if (e < 0) {
  ------------------
  |  Branch (27278:9): [True: 42, False: 1.95k]
  ------------------
27279|     42|        p->error = "invalid string escape sequence";
27280|     42|        return 1;
27281|     42|    }
27282|  1.95k|    if (c == 'x') {
  ------------------
  |  Branch (27282:9): [True: 188, False: 1.76k]
  ------------------
27283|    188|        state->counter = 2;
27284|    188|        state->argn = 0;
27285|    188|        state->consumer = escapeh;
27286|  1.76k|    } else if (c == 'u' || c == 'U') {
  ------------------
  |  Branch (27286:16): [True: 473, False: 1.29k]
  |  Branch (27286:28): [True: 170, False: 1.12k]
  ------------------
27287|    643|        state->counter = c == 'u' ? 4 : 6;
  ------------------
  |  Branch (27287:26): [True: 473, False: 170]
  ------------------
27288|    643|        state->argn = 0;
27289|    643|        state->consumer = escapeu;
27290|  1.12k|    } else {
27291|  1.12k|        push_buf(p, (uint8_t) e);
27292|  1.12k|        state->consumer = stringchar;
27293|  1.12k|    }
27294|  1.95k|    return 1;
27295|  1.99k|}
janet.c:checkescape:
27180|  1.99k|static int checkescape(uint8_t c) {
27181|  1.99k|    switch (c) {
27182|     42|        default:
  ------------------
  |  Branch (27182:9): [True: 42, False: 1.95k]
  ------------------
27183|     42|            return -1;
27184|    188|        case 'x':
  ------------------
  |  Branch (27184:9): [True: 188, False: 1.80k]
  ------------------
27185|    661|        case 'u':
  ------------------
  |  Branch (27185:9): [True: 473, False: 1.52k]
  ------------------
27186|    831|        case 'U':
  ------------------
  |  Branch (27186:9): [True: 170, False: 1.82k]
  ------------------
27187|    831|            return 1;
27188|     35|        case 'n':
  ------------------
  |  Branch (27188:9): [True: 35, False: 1.96k]
  ------------------
27189|     35|            return '\n';
27190|     36|        case 't':
  ------------------
  |  Branch (27190:9): [True: 36, False: 1.95k]
  ------------------
27191|     36|            return '\t';
27192|     75|        case 'r':
  ------------------
  |  Branch (27192:9): [True: 75, False: 1.92k]
  ------------------
27193|     75|            return '\r';
27194|     77|        case '0':
  ------------------
  |  Branch (27194:9): [True: 77, False: 1.91k]
  ------------------
27195|     77|            return '\0';
27196|     86|        case 'z':
  ------------------
  |  Branch (27196:9): [True: 86, False: 1.90k]
  ------------------
27197|     86|            return '\0';
27198|     84|        case 'f':
  ------------------
  |  Branch (27198:9): [True: 84, False: 1.91k]
  ------------------
27199|     84|            return '\f';
27200|     79|        case 'v':
  ------------------
  |  Branch (27200:9): [True: 79, False: 1.91k]
  ------------------
27201|     79|            return '\v';
27202|     82|        case 'a':
  ------------------
  |  Branch (27202:9): [True: 82, False: 1.91k]
  ------------------
27203|     82|            return '\a';
27204|     69|        case 'b':
  ------------------
  |  Branch (27204:9): [True: 69, False: 1.92k]
  ------------------
27205|     69|            return '\b';
27206|     77|        case '\'':
  ------------------
  |  Branch (27206:9): [True: 77, False: 1.91k]
  ------------------
27207|     77|            return '\'';
27208|     74|        case '?':
  ------------------
  |  Branch (27208:9): [True: 74, False: 1.92k]
  ------------------
27209|     74|            return '?';
27210|     47|        case 'e':
  ------------------
  |  Branch (27210:9): [True: 47, False: 1.94k]
  ------------------
27211|     47|            return 27;
27212|     96|        case '"':
  ------------------
  |  Branch (27212:9): [True: 96, False: 1.89k]
  ------------------
27213|     96|            return '"';
27214|    205|        case '\\':
  ------------------
  |  Branch (27214:9): [True: 205, False: 1.79k]
  ------------------
27215|    205|            return '\\';
27216|  1.99k|    }
27217|  1.99k|}
janet.c:escapeh:
27240|    353|static int escapeh(JanetParser *p, JanetParseState *state, uint8_t c) {
27241|    353|    int digit = to_hex(c);
27242|    353|    if (digit < 0) {
  ------------------
  |  Branch (27242:9): [True: 38, False: 315]
  ------------------
27243|     38|        p->error = "invalid hex digit in hex escape";
27244|     38|        return 1;
27245|     38|    }
27246|    315|    state->argn = (state->argn << 4) + digit;
27247|    315|    state->counter--;
27248|    315|    if (!state->counter) {
  ------------------
  |  Branch (27248:9): [True: 150, False: 165]
  ------------------
27249|    150|        push_buf(p, (uint8_t)(state->argn & 0xFF));
27250|    150|        state->argn = 0;
27251|    150|        state->consumer = stringchar;
27252|    150|    }
27253|    315|    return 1;
27254|    353|}
janet.c:to_hex:
27045|  3.09k|static int to_hex(uint8_t c) {
27046|  3.09k|    if (c >= '0' && c <= '9') {
  ------------------
  |  Branch (27046:9): [True: 3.05k, False: 45]
  |  Branch (27046:21): [True: 1.86k, False: 1.18k]
  ------------------
27047|  1.86k|        return c - '0';
27048|  1.86k|    } else if (c >= 'A' && c <= 'F') {
  ------------------
  |  Branch (27048:16): [True: 1.17k, False: 52]
  |  Branch (27048:28): [True: 388, False: 790]
  ------------------
27049|    388|        return 10 + c - 'A';
27050|    842|    } else if (c >= 'a' && c <= 'f') {
  ------------------
  |  Branch (27050:16): [True: 771, False: 71]
  |  Branch (27050:28): [True: 733, False: 38]
  ------------------
27051|    733|        return 10 + c - 'a';
27052|    733|    } else {
27053|    109|        return -1;
27054|    109|    }
27055|  3.09k|}
janet.c:escapeu:
27256|  2.74k|static int escapeu(JanetParser *p, JanetParseState *state, uint8_t c) {
27257|  2.74k|    int digit = to_hex(c);
27258|  2.74k|    if (digit < 0) {
  ------------------
  |  Branch (27258:9): [True: 71, False: 2.67k]
  ------------------
27259|     71|        p->error = "invalid hex digit in unicode escape";
27260|     71|        return 1;
27261|     71|    }
27262|  2.67k|    state->argn = (state->argn << 4) + digit;
27263|  2.67k|    state->counter--;
27264|  2.67k|    if (!state->counter) {
  ------------------
  |  Branch (27264:9): [True: 572, False: 2.09k]
  ------------------
27265|    572|        if (state->argn > 0x10FFFF) {
  ------------------
  |  Branch (27265:13): [True: 4, False: 568]
  ------------------
27266|      4|            p->error = "invalid unicode codepoint";
27267|      4|            return 1;
27268|      4|        }
27269|    568|        write_codepoint(p, state->argn);
27270|    568|        state->argn = 0;
27271|    568|        state->consumer = stringchar;
27272|    568|    }
27273|  2.66k|    return 1;
27274|  2.67k|}
janet.c:write_codepoint:
27222|    568|static void write_codepoint(JanetParser *p, int32_t codepoint) {
27223|    568|    if (codepoint <= 0x7F) {
  ------------------
  |  Branch (27223:9): [True: 53, False: 515]
  ------------------
27224|     53|        push_buf(p, (uint8_t) codepoint);
27225|    515|    } else if (codepoint <= 0x7FF) {
  ------------------
  |  Branch (27225:16): [True: 111, False: 404]
  ------------------
27226|    111|        push_buf(p, (uint8_t)((codepoint >>  6) & 0x1F) | 0xC0);
27227|    111|        push_buf(p, (uint8_t)((codepoint >>  0) & 0x3F) | 0x80);
27228|    404|    } else if (codepoint <= 0xFFFF) {
  ------------------
  |  Branch (27228:16): [True: 270, False: 134]
  ------------------
27229|    270|        push_buf(p, (uint8_t)((codepoint >> 12) & 0x0F) | 0xE0);
27230|    270|        push_buf(p, (uint8_t)((codepoint >>  6) & 0x3F) | 0x80);
27231|    270|        push_buf(p, (uint8_t)((codepoint >>  0) & 0x3F) | 0x80);
27232|    270|    } else {
27233|    134|        push_buf(p, (uint8_t)((codepoint >> 18) & 0x07) | 0xF0);
27234|    134|        push_buf(p, (uint8_t)((codepoint >> 12) & 0x3F) | 0x80);
27235|    134|        push_buf(p, (uint8_t)((codepoint >>  6) & 0x3F) | 0x80);
27236|    134|        push_buf(p, (uint8_t)((codepoint >>  0) & 0x3F) | 0x80);
27237|    134|    }
27238|    568|}
janet.c:stringend:
27297|  6.38k|static int stringend(JanetParser *p, JanetParseState *state) {
27298|  6.38k|    Janet ret;
27299|  6.38k|    uint8_t *bufstart = p->buf;
27300|  6.38k|    int32_t buflen = (int32_t) p->bufcount;
27301|  6.38k|    if (state->flags & PFLAG_LONGSTRING) {
  ------------------
  |  |27089|  6.38k|#define PFLAG_LONGSTRING 0x4000
  ------------------
  |  Branch (27301:9): [True: 1.40k, False: 4.97k]
  ------------------
27302|       |        /* Post process to remove leading whitespace */
27303|  1.40k|        JanetParseState top = p->states[p->statecount - 1];
27304|  1.40k|        int32_t indent_col = (int32_t) top.column - 1;
27305|  1.40k|        uint8_t *r = bufstart, *end = r + buflen;
27306|       |        /* Unless there are only spaces before EOLs, disable reindenting */
27307|  1.40k|        int reindent = 1;
27308|  10.0k|        while (reindent && (r < end)) {
  ------------------
  |  Branch (27308:16): [True: 9.96k, False: 128]
  |  Branch (27308:28): [True: 8.68k, False: 1.27k]
  ------------------
27309|  8.68k|            if (*r++ == '\n') {
  ------------------
  |  Branch (27309:17): [True: 1.21k, False: 7.47k]
  ------------------
27310|  1.29k|                for (int32_t j = 0; (r < end) && (*r != '\n') && (j < indent_col); j++, r++) {
  ------------------
  |  Branch (27310:37): [True: 1.01k, False: 286]
  |  Branch (27310:50): [True: 522, False: 491]
  |  Branch (27310:66): [True: 260, False: 262]
  ------------------
27311|    260|                    if (*r != ' ') {
  ------------------
  |  Branch (27311:25): [True: 171, False: 89]
  ------------------
27312|    171|                        reindent = 0;
27313|    171|                        break;
27314|    171|                    }
27315|    260|                }
27316|  1.21k|                if ((r + 1) < end && *r == '\r' && *(r + 1) == '\n') reindent = 1;
  ------------------
  |  Branch (27316:21): [True: 790, False: 420]
  |  Branch (27316:38): [True: 183, False: 607]
  |  Branch (27316:52): [True: 125, False: 58]
  ------------------
27317|  1.21k|            }
27318|  8.68k|        }
27319|       |        /* Now reindent if able */
27320|  1.40k|        if (reindent) {
  ------------------
  |  Branch (27320:13): [True: 1.27k, False: 128]
  ------------------
27321|  1.27k|            uint8_t *w = bufstart;
27322|  1.27k|            r = bufstart;
27323|  9.31k|            while (r < end) {
  ------------------
  |  Branch (27323:20): [True: 8.03k, False: 1.27k]
  ------------------
27324|  8.03k|                if (*r == '\n') {
  ------------------
  |  Branch (27324:21): [True: 948, False: 7.08k]
  ------------------
27325|    948|                    *w++ = *r++;
27326|  1.07k|                    for (int32_t j = 0; (r < end) && (*r != '\n') && (j < indent_col); j++, r++);
  ------------------
  |  Branch (27326:41): [True: 784, False: 286]
  |  Branch (27326:54): [True: 384, False: 400]
  |  Branch (27326:70): [True: 122, False: 262]
  ------------------
27327|    948|                    if ((r + 1) < end && *r == '\r' && *(r + 1) == '\n') *w++ = *r++;
  ------------------
  |  Branch (27327:25): [True: 594, False: 354]
  |  Branch (27327:42): [True: 138, False: 456]
  |  Branch (27327:56): [True: 82, False: 56]
  ------------------
27328|  7.08k|                } else {
27329|  7.08k|                    *w++ = *r++;
27330|  7.08k|                }
27331|  8.03k|            }
27332|  1.27k|            buflen = (int32_t)(w - bufstart);
27333|  1.27k|        }
27334|       |        /* Check for leading EOL so we can remove it */
27335|  1.40k|        if (buflen > 1 && bufstart[0] == '\r' && bufstart[1] == '\n') { /* Windows EOL */
  ------------------
  |  Branch (27335:13): [True: 877, False: 530]
  |  Branch (27335:27): [True: 144, False: 733]
  |  Branch (27335:50): [True: 48, False: 96]
  ------------------
27336|     48|            buflen = buflen - 2;
27337|     48|            bufstart = bufstart + 2;
27338|  1.35k|        } else if (buflen > 0 && bufstart[0] == '\n') { /* Unix EOL */
  ------------------
  |  Branch (27338:20): [True: 1.35k, False: 0]
  |  Branch (27338:34): [True: 312, False: 1.04k]
  ------------------
27339|    312|            buflen--;
27340|    312|            bufstart++;
27341|    312|        }
27342|       |        /* Check for trailing EOL so we can remove it */
27343|  1.40k|        if (buflen > 1 && bufstart[buflen - 2] == '\r' && bufstart[buflen - 1] == '\n') { /* Windows EOL */
  ------------------
  |  Branch (27343:13): [True: 731, False: 676]
  |  Branch (27343:27): [True: 134, False: 597]
  |  Branch (27343:59): [True: 34, False: 100]
  ------------------
27344|     34|            buflen = buflen - 2;
27345|  1.37k|        } else if (buflen > 0 && bufstart[buflen - 1] == '\n') { /* Unix EOL */
  ------------------
  |  Branch (27345:20): [True: 1.20k, False: 166]
  |  Branch (27345:34): [True: 94, False: 1.11k]
  ------------------
27346|     94|            buflen--;
27347|     94|        }
27348|  1.40k|    }
27349|  6.38k|    if (state->flags & PFLAG_BUFFER) {
  ------------------
  |  |27084|  6.38k|#define PFLAG_BUFFER 0x200
  ------------------
  |  Branch (27349:9): [True: 443, False: 5.93k]
  ------------------
27350|    443|        JanetBuffer *b = janet_buffer(buflen);
27351|    443|        janet_buffer_push_bytes(b, bufstart, buflen);
27352|    443|        ret = janet_wrap_buffer(b);
  ------------------
  |  |  847|    443|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  825|    443|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    443|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    443|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27353|  5.93k|    } else {
27354|  5.93k|        ret = janet_wrap_string(janet_string(bufstart, buflen));
  ------------------
  |  |  848|  5.93k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|  5.93k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  5.93k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  5.93k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27355|  5.93k|    }
27356|  6.38k|    p->bufcount = 0;
27357|  6.38k|    popstate(p, ret);
27358|  6.38k|    return 1;
27359|  6.38k|}
janet.c:comment:
27443|  4.76k|static int comment(JanetParser *p, JanetParseState *state, uint8_t c) {
27444|  4.76k|    (void) state;
27445|  4.76k|    if (c == '\n') {
  ------------------
  |  Branch (27445:9): [True: 400, False: 4.36k]
  ------------------
27446|    400|        p->statecount--;
27447|    400|        p->bufcount = 0;
27448|  4.36k|    } else {
27449|  4.36k|        push_buf(p, c);
27450|  4.36k|    }
27451|  4.76k|    return 1;
27452|  4.76k|}
janet.c:atsign:
27538|  3.13k|static int atsign(JanetParser *p, JanetParseState *state, uint8_t c) {
27539|  3.13k|    (void) state;
27540|  3.13k|    p->statecount--;
27541|  3.13k|    switch (c) {
27542|    820|        case '{':
  ------------------
  |  Branch (27542:9): [True: 820, False: 2.31k]
  ------------------
27543|    820|            pushstate(p, root, PFLAG_CONTAINER | PFLAG_CURLYBRACKETS | PFLAG_ATSYM);
  ------------------
  |  |27083|    820|#define PFLAG_CONTAINER 0x100
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_CURLYBRACKETS | PFLAG_ATSYM);
  ------------------
  |  |27087|    820|#define PFLAG_CURLYBRACKETS 0x1000
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_CURLYBRACKETS | PFLAG_ATSYM);
  ------------------
  |  |27091|    820|#define PFLAG_ATSYM 0x10000
  ------------------
27544|    820|            return 1;
27545|    324|        case '"':
  ------------------
  |  Branch (27545:9): [True: 324, False: 2.80k]
  ------------------
27546|    324|            pushstate(p, stringchar, PFLAG_BUFFER | PFLAG_STRING);
  ------------------
  |  |27084|    324|#define PFLAG_BUFFER 0x200
  ------------------
                          pushstate(p, stringchar, PFLAG_BUFFER | PFLAG_STRING);
  ------------------
  |  |27088|    324|#define PFLAG_STRING 0x2000
  ------------------
27547|    324|            return 1;
27548|    127|        case '`':
  ------------------
  |  Branch (27548:9): [True: 127, False: 3.00k]
  ------------------
27549|    127|            pushstate(p, longstring, PFLAG_BUFFER | PFLAG_LONGSTRING);
  ------------------
  |  |27084|    127|#define PFLAG_BUFFER 0x200
  ------------------
                          pushstate(p, longstring, PFLAG_BUFFER | PFLAG_LONGSTRING);
  ------------------
  |  |27089|    127|#define PFLAG_LONGSTRING 0x4000
  ------------------
27550|    127|            return 1;
27551|    744|        case '[':
  ------------------
  |  Branch (27551:9): [True: 744, False: 2.38k]
  ------------------
27552|    744|            pushstate(p, root, PFLAG_CONTAINER | PFLAG_SQRBRACKETS | PFLAG_ATSYM);
  ------------------
  |  |27083|    744|#define PFLAG_CONTAINER 0x100
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_SQRBRACKETS | PFLAG_ATSYM);
  ------------------
  |  |27086|    744|#define PFLAG_SQRBRACKETS 0x800
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_SQRBRACKETS | PFLAG_ATSYM);
  ------------------
  |  |27091|    744|#define PFLAG_ATSYM 0x10000
  ------------------
27553|    744|            return 1;
27554|    290|        case '(':
  ------------------
  |  Branch (27554:9): [True: 290, False: 2.84k]
  ------------------
27555|    290|            pushstate(p, root, PFLAG_CONTAINER | PFLAG_PARENS | PFLAG_ATSYM);
  ------------------
  |  |27083|    290|#define PFLAG_CONTAINER 0x100
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_PARENS | PFLAG_ATSYM);
  ------------------
  |  |27085|    290|#define PFLAG_PARENS 0x400
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_PARENS | PFLAG_ATSYM);
  ------------------
  |  |27091|    290|#define PFLAG_ATSYM 0x10000
  ------------------
27556|    290|            return 1;
27557|    826|        default:
  ------------------
  |  Branch (27557:9): [True: 826, False: 2.30k]
  ------------------
27558|    826|            break;
27559|  3.13k|    }
27560|    826|    pushstate(p, tokenchar, PFLAG_TOKEN);
  ------------------
  |  |27093|    826|#define PFLAG_TOKEN 0x40000
  ------------------
27561|    826|    push_buf(p, '@'); /* Push the leading at-sign that was dropped */
27562|    826|    return 0;
27563|  3.13k|}
janet.c:longstring:
27494|  16.8k|static int longstring(JanetParser *p, JanetParseState *state, uint8_t c) {
27495|  16.8k|    if (state->flags & PFLAG_INSTRING) {
  ------------------
  |  |27492|  16.8k|#define PFLAG_INSTRING 0x100000
  ------------------
  |  Branch (27495:9): [True: 10.5k, False: 6.21k]
  ------------------
27496|       |        /* We are inside the long string */
27497|  10.5k|        if (c == '`') {
  ------------------
  |  Branch (27497:13): [True: 1.65k, False: 8.94k]
  ------------------
27498|  1.65k|            state->flags |= PFLAG_END_CANDIDATE;
  ------------------
  |  |27493|  1.65k|#define PFLAG_END_CANDIDATE 0x200000
  ------------------
27499|  1.65k|            state->flags &= ~PFLAG_INSTRING;
  ------------------
  |  |27492|  1.65k|#define PFLAG_INSTRING 0x100000
  ------------------
27500|  1.65k|            state->counter = 1; /* Use counter to keep track of number of '=' seen */
27501|  1.65k|            return 1;
27502|  1.65k|        }
27503|  8.94k|        push_buf(p, c);
27504|  8.94k|        return 1;
27505|  10.5k|    } else if (state->flags & PFLAG_END_CANDIDATE) {
  ------------------
  |  |27493|  6.21k|#define PFLAG_END_CANDIDATE 0x200000
  ------------------
  |  Branch (27505:16): [True: 2.32k, False: 3.88k]
  ------------------
27506|  2.32k|        int i;
27507|       |        /* We are checking a potential end of the string */
27508|  2.32k|        if (state->counter == state->argn) {
  ------------------
  |  Branch (27508:13): [True: 1.40k, False: 917]
  ------------------
27509|  1.40k|            stringend(p, state);
27510|  1.40k|            return 0;
27511|  1.40k|        }
27512|    917|        if (c == '`' && state->counter < state->argn) {
  ------------------
  |  Branch (27512:13): [True: 673, False: 244]
  |  Branch (27512:25): [True: 673, False: 0]
  ------------------
27513|    673|            state->counter++;
27514|    673|            return 1;
27515|    673|        }
27516|       |        /* Failed end candidate */
27517|    992|        for (i = 0; i < state->counter; i++) {
  ------------------
  |  Branch (27517:21): [True: 748, False: 244]
  ------------------
27518|    748|            push_buf(p, '`');
27519|    748|        }
27520|    244|        push_buf(p, c);
27521|    244|        state->counter = 0;
27522|    244|        state->flags &= ~PFLAG_END_CANDIDATE;
  ------------------
  |  |27493|    244|#define PFLAG_END_CANDIDATE 0x200000
  ------------------
27523|    244|        state->flags |= PFLAG_INSTRING;
  ------------------
  |  |27492|    244|#define PFLAG_INSTRING 0x100000
  ------------------
27524|    244|        return 1;
27525|  3.88k|    } else {
27526|       |        /* We are at beginning of string */
27527|  3.88k|        state->argn++;
27528|  3.88k|        if (c != '`') {
  ------------------
  |  Branch (27528:13): [True: 1.56k, False: 2.32k]
  ------------------
27529|  1.56k|            state->flags |= PFLAG_INSTRING;
  ------------------
  |  |27492|  1.56k|#define PFLAG_INSTRING 0x100000
  ------------------
27530|  1.56k|            push_buf(p, c);
27531|  1.56k|        }
27532|  3.88k|        return 1;
27533|  3.88k|    }
27534|  16.8k|}
janet.c:close_array:
27462|    851|static Janet close_array(JanetParser *p, JanetParseState *state) {
27463|    851|    JanetArray *array = janet_array(state->argn);
27464|  3.48k|    for (int32_t i = state->argn - 1; i >= 0; i--)
  ------------------
  |  Branch (27464:39): [True: 2.62k, False: 851]
  ------------------
27465|  2.62k|        array->data[i] = p->args[--p->argcount];
27466|    851|    array->count = state->argn;
27467|    851|    return janet_wrap_array(array);
  ------------------
  |  |  845|    851|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  825|    851|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    851|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    851|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27468|    851|}
janet.c:close_tuple:
27454|  3.27k|static Janet close_tuple(JanetParser *p, JanetParseState *state, int32_t flag) {
27455|  3.27k|    Janet *ret = janet_tuple_begin(state->argn);
27456|  3.27k|    janet_tuple_flag(ret) |= flag;
  ------------------
  |  | 1806|  3.27k|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1800|  3.27k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
27457|  14.3k|    for (int32_t i = state->argn - 1; i >= 0; i--)
  ------------------
  |  Branch (27457:39): [True: 11.0k, False: 3.27k]
  ------------------
27458|  11.0k|        ret[i] = p->args[--p->argcount];
27459|  3.27k|    return janet_wrap_tuple(janet_tuple_end(ret));
  ------------------
  |  |  843|  3.27k|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|  3.27k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  3.27k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  3.27k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27460|  3.27k|}
janet.c:close_table:
27481|    709|static Janet close_table(JanetParser *p, JanetParseState *state) {
27482|    709|    JanetTable *table = janet_table(state->argn >> 1);
27483|  2.07k|    for (size_t i = p->argcount - state->argn; i < p->argcount; i += 2) {
  ------------------
  |  Branch (27483:48): [True: 1.36k, False: 709]
  ------------------
27484|  1.36k|        Janet key = p->args[i];
27485|  1.36k|        Janet value = p->args[i + 1];
27486|  1.36k|        janet_table_put(table, key, value);
27487|  1.36k|    }
27488|    709|    p->argcount -= state->argn;
27489|    709|    return janet_wrap_table(table);
  ------------------
  |  |  846|    709|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  825|    709|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    709|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    709|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27490|    709|}
janet.c:close_struct:
27470|  3.88k|static Janet close_struct(JanetParser *p, JanetParseState *state) {
27471|  3.88k|    JanetKV *st = janet_struct_begin(state->argn >> 1);
27472|  9.38k|    for (size_t i = p->argcount - state->argn; i < p->argcount; i += 2) {
  ------------------
  |  Branch (27472:48): [True: 5.49k, False: 3.88k]
  ------------------
27473|  5.49k|        Janet key = p->args[i];
27474|  5.49k|        Janet value = p->args[i + 1];
27475|  5.49k|        janet_struct_put(st, key, value);
27476|  5.49k|    }
27477|  3.88k|    p->argcount -= state->argn;
27478|  3.88k|    return janet_wrap_struct(janet_struct_end(st));
  ------------------
  |  |  842|  3.88k|#define janet_wrap_struct(s) janet_nanbox_wrap_c((s), JANET_STRUCT)
  |  |  ------------------
  |  |  |  |  828|  3.88k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  3.88k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  3.88k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27479|  3.88k|}
janet.c:popstate:
27106|  44.7k|static void popstate(JanetParser *p, Janet val) {
27107|  87.7k|    for (;;) {
27108|  87.7k|        JanetParseState top = p->states[--p->statecount];
27109|  87.7k|        JanetParseState *newtop = p->states + p->statecount - 1;
27110|       |        /* Source mapping info */
27111|  87.7k|        if (janet_checktype(val, JANET_TUPLE)) {
  ------------------
  |  |  806|  87.7k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 46.2k, False: 41.4k]
  |  |  |  Branch (806:6): [Folded, False: 87.7k]
  |  |  ------------------
  |  |  807|  87.7k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  87.7k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  87.7k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  87.7k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  87.7k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  87.7k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27112|  46.2k|            janet_tuple_sm_line(janet_unwrap_tuple(val)) = (int32_t) top.line;
  ------------------
  |  | 1804|  46.2k|#define janet_tuple_sm_line(t) (janet_tuple_head(t)->sm_line)
  |  |  ------------------
  |  |  |  | 1800|  46.2k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
27113|  46.2k|            janet_tuple_sm_column(janet_unwrap_tuple(val)) = (int32_t) top.column;
  ------------------
  |  | 1805|  46.2k|#define janet_tuple_sm_column(t) (janet_tuple_head(t)->sm_column)
  |  |  ------------------
  |  |  |  | 1800|  46.2k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
27114|  46.2k|        }
27115|  87.7k|        if (newtop->flags & PFLAG_CONTAINER) {
  ------------------
  |  |27083|  87.7k|#define PFLAG_CONTAINER 0x100
  ------------------
  |  Branch (27115:13): [True: 44.7k, False: 43.0k]
  ------------------
27116|  44.7k|            newtop->argn++;
27117|       |            /* Keep track of number of values in the root state */
27118|  44.7k|            if (p->statecount == 1) {
  ------------------
  |  Branch (27118:17): [True: 13.3k, False: 31.3k]
  ------------------
27119|  13.3k|                p->pending++;
27120|       |                /* Root items are always wrapped in a tuple for source map info. */
27121|  13.3k|                const Janet *tup = janet_tuple_n(&val, 1);
27122|  13.3k|                janet_tuple_sm_line(tup) = (int32_t) top.line;
  ------------------
  |  | 1804|  13.3k|#define janet_tuple_sm_line(t) (janet_tuple_head(t)->sm_line)
  |  |  ------------------
  |  |  |  | 1800|  13.3k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
27123|  13.3k|                janet_tuple_sm_column(tup) = (int32_t) top.column;
  ------------------
  |  | 1805|  13.3k|#define janet_tuple_sm_column(t) (janet_tuple_head(t)->sm_column)
  |  |  ------------------
  |  |  |  | 1800|  13.3k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
27124|  13.3k|                val = janet_wrap_tuple(tup);
  ------------------
  |  |  843|  13.3k|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|  13.3k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  13.3k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  13.3k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27125|  13.3k|            }
27126|  44.7k|            push_arg(p, val);
27127|  44.7k|            return;
27128|  44.7k|        } else if (newtop->flags & PFLAG_READERMAC) {
  ------------------
  |  |27090|  43.0k|#define PFLAG_READERMAC 0x8000
  ------------------
  |  Branch (27128:20): [True: 43.0k, False: 0]
  ------------------
27129|  43.0k|            Janet *t = janet_tuple_begin(2);
27130|  43.0k|            int c = newtop->flags & 0xFF;
27131|  43.0k|            const char *which =
27132|  43.0k|                (c == '\'') ? "quote" :
  ------------------
  |  Branch (27132:17): [True: 19.2k, False: 23.8k]
  ------------------
27133|  43.0k|                (c == ',') ? "unquote" :
  ------------------
  |  Branch (27133:17): [True: 4.78k, False: 19.0k]
  ------------------
27134|  23.8k|                (c == ';') ? "splice" :
  ------------------
  |  Branch (27134:17): [True: 5.70k, False: 13.3k]
  ------------------
27135|  19.0k|                (c == '|') ? "short-fn" :
  ------------------
  |  Branch (27135:17): [True: 8.38k, False: 4.92k]
  ------------------
27136|  13.3k|                (c == '~') ? "quasiquote" : "<unknown>";
  ------------------
  |  Branch (27136:17): [True: 4.92k, False: 0]
  ------------------
27137|  43.0k|            t[0] = janet_csymbolv(which);
  ------------------
  |  | 1837|  43.0k|#define janet_csymbolv(cstr) janet_wrap_symbol(janet_csymbol(cstr))
  |  |  ------------------
  |  |  |  |  849|  43.0k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  43.0k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  43.0k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  43.0k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27138|  43.0k|            t[1] = val;
27139|       |            /* Quote source mapping info */
27140|  43.0k|            janet_tuple_sm_line(t) = (int32_t) newtop->line;
  ------------------
  |  | 1804|  43.0k|#define janet_tuple_sm_line(t) (janet_tuple_head(t)->sm_line)
  |  |  ------------------
  |  |  |  | 1800|  43.0k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
27141|  43.0k|            janet_tuple_sm_column(t) = (int32_t) newtop->column;
  ------------------
  |  | 1805|  43.0k|#define janet_tuple_sm_column(t) (janet_tuple_head(t)->sm_column)
  |  |  ------------------
  |  |  |  | 1800|  43.0k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
27142|  43.0k|            val = janet_wrap_tuple(janet_tuple_end(t));
  ------------------
  |  |  843|  43.0k|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|  43.0k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  43.0k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  43.0k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27143|  43.0k|        } else {
27144|      0|            return;
27145|      0|        }
27146|  87.7k|    }
27147|  44.7k|}
janet.c:tokenchar:
27390|   131k|static int tokenchar(JanetParser *p, JanetParseState *state, uint8_t c) {
27391|   131k|    Janet ret;
27392|   131k|    double numval;
27393|   131k|    int32_t blen;
27394|   131k|    if (janet_is_symbol_char(c)) {
  ------------------
  |  Branch (27394:9): [True: 101k, False: 30.4k]
  ------------------
27395|   101k|        push_buf(p, (uint8_t) c);
27396|   101k|        if (c > 127) state->argn = 1; /* Use to indicate non ascii */
  ------------------
  |  Branch (27396:13): [True: 4.29k, False: 97.0k]
  ------------------
27397|   101k|        return 1;
27398|   101k|    }
27399|       |    /* Token finished */
27400|  30.4k|    blen = (int32_t) p->bufcount;
27401|  30.4k|    int start_dig = p->buf[0] >= '0' && p->buf[0] <= '9';
  ------------------
  |  Branch (27401:21): [True: 22.1k, False: 8.28k]
  |  Branch (27401:41): [True: 10.6k, False: 11.5k]
  ------------------
27402|  30.4k|    int start_num = start_dig || p->buf[0] == '-' || p->buf[0] == '+' || p->buf[0] == '.';
  ------------------
  |  Branch (27402:21): [True: 10.6k, False: 19.7k]
  |  Branch (27402:34): [True: 2.50k, False: 17.2k]
  |  Branch (27402:54): [True: 949, False: 16.3k]
  |  Branch (27402:74): [True: 2.00k, False: 14.3k]
  ------------------
27403|  30.4k|    if (p->buf[0] == ':') {
  ------------------
  |  Branch (27403:9): [True: 2.02k, False: 28.4k]
  ------------------
27404|       |        /* Don't do full utf-8 check unless we have seen non ascii characters. */
27405|  2.02k|        int valid = (!state->argn) || janet_valid_utf8(p->buf + 1, blen - 1);
  ------------------
  |  Branch (27405:21): [True: 1.87k, False: 145]
  |  Branch (27405:39): [True: 89, False: 56]
  ------------------
27406|  2.02k|        if (!valid) {
  ------------------
  |  Branch (27406:13): [True: 56, False: 1.96k]
  ------------------
27407|     56|            p->error = "invalid utf-8 in keyword";
27408|     56|            return 0;
27409|     56|        }
27410|  1.96k|        ret = janet_keywordv(p->buf + 1, blen - 1);
  ------------------
  |  | 1842|  1.96k|#define janet_keywordv(str, len) janet_wrap_keyword(janet_keyword((str), (len)))
  |  |  ------------------
  |  |  |  |  850|  1.96k|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  1.96k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  1.96k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  1.96k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27411|  1.96k|#ifdef JANET_INT_TYPES
27412|  28.4k|    } else if (start_num && !janet_scan_numeric(p->buf, blen, &ret)) {
  ------------------
  |  Branch (27412:16): [True: 16.1k, False: 12.3k]
  |  Branch (27412:29): [True: 12.1k, False: 3.94k]
  ------------------
27413|  12.1k|        (void) numval;
27414|       |#else
27415|       |    } else if (start_num && !janet_scan_number(p->buf, blen, &numval)) {
27416|       |        ret = janet_wrap_number(numval);
27417|       |#endif
27418|  16.2k|    } else if (!check_str_const("nil", p->buf, blen)) {
  ------------------
  |  Branch (27418:16): [True: 297, False: 15.9k]
  ------------------
27419|    297|        ret = janet_wrap_nil();
  ------------------
  |  |  831|    297|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|    297|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    297|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    297|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27420|  15.9k|    } else if (!check_str_const("false", p->buf, blen)) {
  ------------------
  |  Branch (27420:16): [True: 19, False: 15.9k]
  ------------------
27421|     19|        ret = janet_wrap_false();
  ------------------
  |  |  833|     19|#define janet_wrap_false() janet_nanbox_from_payload(JANET_BOOLEAN, 0)
  |  |  ------------------
  |  |  |  |  822|     19|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     19|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     19|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27422|  15.9k|    } else if (!check_str_const("true", p->buf, blen)) {
  ------------------
  |  Branch (27422:16): [True: 186, False: 15.7k]
  ------------------
27423|    186|        ret = janet_wrap_true();
  ------------------
  |  |  832|    186|#define janet_wrap_true() janet_nanbox_from_payload(JANET_BOOLEAN, 1)
  |  |  ------------------
  |  |  |  |  822|    186|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    186|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    186|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27424|  15.7k|    } else {
27425|  15.7k|        if (start_dig) {
  ------------------
  |  Branch (27425:13): [True: 414, False: 15.3k]
  ------------------
27426|    414|            p->error = "symbol literal cannot start with a digit";
27427|    414|            return 0;
27428|  15.3k|        } else {
27429|       |            /* Don't do full utf-8 check unless we have seen non ascii characters. */
27430|  15.3k|            int valid = (!state->argn) || janet_valid_utf8(p->buf, blen);
  ------------------
  |  Branch (27430:25): [True: 14.6k, False: 728]
  |  Branch (27430:43): [True: 385, False: 343]
  ------------------
27431|  15.3k|            if (!valid) {
  ------------------
  |  Branch (27431:17): [True: 343, False: 14.9k]
  ------------------
27432|    343|                p->error = "invalid utf-8 in symbol";
27433|    343|                return 0;
27434|    343|            }
27435|  14.9k|            ret = janet_symbolv(p->buf, blen);
  ------------------
  |  | 1836|  14.9k|#define janet_symbolv(str, len) janet_wrap_symbol(janet_symbol((str), (len)))
  |  |  ------------------
  |  |  |  |  849|  14.9k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  14.9k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  14.9k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  14.9k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27436|  14.9k|        }
27437|  15.7k|    }
27438|  29.6k|    p->bufcount = 0;
27439|  29.6k|    popstate(p, ret);
27440|  29.6k|    return 0;
27441|  30.4k|}
janet.c:check_str_const:
27378|  48.1k|static int check_str_const(const char *cstr, const uint8_t *str, int32_t len) {
27379|  48.1k|    int32_t index;
27380|  51.1k|    for (index = 0; index < len; index++) {
  ------------------
  |  Branch (27380:21): [True: 50.0k, False: 1.14k]
  ------------------
27381|  50.0k|        uint8_t c = str[index];
27382|  50.0k|        uint8_t k = ((const uint8_t *)cstr)[index];
27383|  50.0k|        if (c < k) return -1;
  ------------------
  |  Branch (27383:13): [True: 39.1k, False: 10.9k]
  ------------------
27384|  10.9k|        if (c > k) return 1;
  ------------------
  |  Branch (27384:13): [True: 7.91k, False: 3.00k]
  ------------------
27385|  3.00k|        if (k == '\0') break;
  ------------------
  |  Branch (27385:13): [True: 0, False: 3.00k]
  ------------------
27386|  3.00k|    }
27387|  1.14k|    return (cstr[index] == '\0') ? 0 : -1;
  ------------------
  |  Branch (27387:12): [True: 502, False: 639]
  ------------------
27388|  48.1k|}
janet.c:size_padded:
29909|  2.71k|static size_t size_padded(size_t offset, size_t size) {
29910|  2.71k|    size_t x = size + offset - 1;
29911|  2.71k|    return x - (x % size);
29912|  2.71k|}
janet.c:compile_peg:
30175|  4.04k|static JanetPeg *compile_peg(Janet x) {
30176|  4.04k|    Builder builder;
30177|  4.04k|    builder.grammar = janet_table(0);
30178|  4.04k|    builder.default_grammar = NULL;
30179|  4.04k|    {
30180|  4.04k|        Janet default_grammarv = janet_dyn("peg-grammar");
30181|  4.04k|        if (janet_checktype(default_grammarv, JANET_TABLE)) {
  ------------------
  |  |  806|  4.04k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 4.04k]
  |  |  |  Branch (806:6): [Folded, False: 4.04k]
  |  |  ------------------
  |  |  807|  4.04k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  4.04k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  4.04k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  4.04k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  4.04k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  4.04k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30182|      0|            builder.default_grammar = janet_unwrap_table(default_grammarv);
  ------------------
  |  |  861|      0|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
30183|      0|        }
30184|  4.04k|    }
30185|  4.04k|    builder.tags = janet_table(0);
30186|  4.04k|    builder.constants = NULL;
30187|  4.04k|    builder.bytecode = NULL;
30188|  4.04k|    builder.nexttag = 1;
30189|  4.04k|    builder.form = x;
30190|  4.04k|    builder.depth = JANET_RECURSION_GUARD;
  ------------------
  |  |  296|  4.04k|#define JANET_RECURSION_GUARD 1024
  ------------------
30191|  4.04k|    builder.has_backref = 0;
30192|  4.04k|    peg_compile1(&builder, x);
30193|  4.04k|    JanetPeg *peg = make_peg(&builder);
30194|  4.04k|    builder_cleanup(&builder);
30195|  4.04k|    return peg;
30196|  4.04k|}
janet.c:peg_compile1:
29726|  18.1k|static uint32_t peg_compile1(Builder *b, Janet peg) {
29727|       |
29728|       |    /* Keep track of the form being compiled for error purposes */
29729|  18.1k|    Janet old_form = b->form;
29730|  18.1k|    JanetTable *old_grammar = b->grammar;
29731|  18.1k|    b->form = peg;
29732|       |
29733|       |    /* Resolve keyword references */
29734|  18.1k|    int i = JANET_RECURSION_GUARD;
  ------------------
  |  |  296|  18.1k|#define JANET_RECURSION_GUARD 1024
  ------------------
29735|  18.1k|    JanetTable *grammar = old_grammar;
29736|  18.1k|    for (; i > 0 && janet_checktype(peg, JANET_KEYWORD); --i) {
  ------------------
  |  |  806|  18.1k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 45, False: 18.1k]
  |  |  |  Branch (806:6): [Folded, False: 18.1k]
  |  |  ------------------
  |  |  807|  18.1k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  18.1k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  18.1k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  18.1k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  18.1k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  18.1k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (29736:12): [True: 18.1k, False: 0]
  ------------------
29737|     45|        Janet nextPeg = janet_table_get_ex(grammar, peg, &grammar);
29738|     45|        if (!grammar || janet_checktype(nextPeg, JANET_NIL)) {
  ------------------
  |  |  806|     45|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 45, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 45]
  |  |  ------------------
  |  |  807|     45|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|     45|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|     45|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|     45|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     45|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     45|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (29738:13): [True: 0, False: 45]
  ------------------
29739|     45|            nextPeg = (b->default_grammar == NULL)
  ------------------
  |  Branch (29739:23): [True: 45, False: 0]
  ------------------
29740|     45|                      ? janet_wrap_nil()
  ------------------
  |  |  831|     45|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|     45|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     45|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     45|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29741|     45|                      : janet_table_get(b->default_grammar, peg);
29742|     45|            if (janet_checktype(nextPeg, JANET_NIL)) {
  ------------------
  |  |  806|     45|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 45, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 45]
  |  |  ------------------
  |  |  807|     45|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|     45|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|     45|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|     45|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     45|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     45|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29743|     45|                peg_panic(b, "unknown rule");
29744|     45|            }
29745|     45|        }
29746|      0|        peg = nextPeg;
29747|      0|        b->form = peg;
29748|      0|        b->grammar = grammar;
29749|      0|    }
29750|  18.1k|    if (i == 0)
  ------------------
  |  Branch (29750:9): [True: 0, False: 18.1k]
  ------------------
29751|      0|        peg_panic(b, "reference chain too deep");
29752|       |
29753|       |    /* Check cache - for tuples we check only the local cache, as
29754|       |     * in a different grammar, the same tuple can compile to a different
29755|       |     * rule - for example, (+ :a :b) depends on whatever :a and :b are bound to. */
29756|  18.1k|    Janet check = janet_checktype(peg, JANET_TUPLE)
  ------------------
  |  |  806|  18.1k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 12.9k, False: 5.18k]
  |  |  |  Branch (806:6): [Folded, False: 18.1k]
  |  |  ------------------
  |  |  807|  18.1k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  18.1k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  18.1k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  18.1k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  18.1k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  18.1k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29757|  18.1k|                  ? janet_table_rawget(grammar, peg)
29758|  18.1k|                  : janet_table_get(grammar, peg);
29759|  18.1k|    if (!janet_checktype(check, JANET_NIL)) {
  ------------------
  |  |  806|  18.1k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 18.1k]
  |  |  ------------------
  |  |  807|  18.1k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  18.1k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  18.1k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  18.1k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  18.1k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  18.1k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (29759:9): [True: 1.54k, False: 16.5k]
  ------------------
29760|  1.54k|        b->form = old_form;
29761|  1.54k|        b->grammar = old_grammar;
29762|  1.54k|        return (uint32_t) janet_unwrap_number(check);
  ------------------
  |  |  839|  1.54k|#define janet_unwrap_number(x) ((x).number)
  ------------------
29763|  1.54k|    }
29764|       |
29765|       |    /* Check depth */
29766|  16.5k|    if (b->depth-- == 0)
  ------------------
  |  Branch (29766:9): [True: 0, False: 16.5k]
  ------------------
29767|      0|        peg_panic(b, "peg grammar recursed too deeply");
29768|       |
29769|       |    /* The final rule to return */
29770|  16.5k|    uint32_t rule = janet_v_count(b->bytecode);
  ------------------
  |  |  759|  16.5k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  766|  12.5k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  12.5k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (759:34): [True: 12.5k, False: 4.01k]
  |  |  ------------------
  ------------------
29771|       |
29772|       |    /* Add to cache. Do not cache structs, as we don't yet know
29773|       |     * what rule they will return! We can just as effectively cache
29774|       |     * the structs main rule. */
29775|  16.5k|    if (!janet_checktype(peg, JANET_STRUCT)) {
  ------------------
  |  |  806|  16.5k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 16.5k]
  |  |  ------------------
  |  |  807|  16.5k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  16.5k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  16.5k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  16.5k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  16.5k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  16.5k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (29775:9): [True: 16.0k, False: 538]
  ------------------
29776|  16.0k|        JanetTable *which_grammar = grammar;
29777|       |        /* If we are a primitive pattern, add to the global cache (root grammar table) */
29778|  16.0k|        if (!janet_checktype(peg, JANET_TUPLE)) {
  ------------------
  |  |  806|  16.0k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 16.0k]
  |  |  ------------------
  |  |  807|  16.0k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  16.0k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  16.0k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  16.0k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  16.0k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  16.0k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (29778:13): [True: 3.22k, False: 12.8k]
  ------------------
29779|  3.22k|            while (which_grammar->proto)
  ------------------
  |  Branch (29779:20): [True: 0, False: 3.22k]
  ------------------
29780|      0|                which_grammar = which_grammar->proto;
29781|  3.22k|        }
29782|  16.0k|        janet_table_put(which_grammar, peg, janet_wrap_number(rule));
  ------------------
  |  |  835|  16.0k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
29783|  16.0k|    }
29784|       |
29785|  16.5k|    switch (janet_type(peg)) {
  ------------------
  |  |  795|  16.5k|    (isnan((x).number) \
  |  |  796|  16.5k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  16.5k|        : JANET_NUMBER)
  ------------------
  |  Branch (29785:13): [True: 14.9k, False: 1.67k]
  ------------------
29786|    589|        default:
  ------------------
  |  Branch (29786:9): [True: 589, False: 16.0k]
  ------------------
29787|    589|            peg_panic(b, "unexpected peg source");
29788|      0|            return 0;
29789|       |
29790|      9|        case JANET_BOOLEAN: {
  ------------------
  |  Branch (29790:9): [True: 9, False: 16.5k]
  ------------------
29791|      9|            int n = janet_unwrap_boolean(peg);
  ------------------
  |  |  838|      9|#define janet_unwrap_boolean(x) ((x).u64 & 0x1)
  ------------------
29792|      9|            Reserve r = reserve(b, 2);
29793|      9|            emit_1(r, n ? RULE_NCHAR : RULE_NOTNCHAR, 0);
  ------------------
  |  Branch (29793:23): [True: 8, False: 1]
  ------------------
29794|      9|            break;
29795|      0|        }
29796|  1.67k|        case JANET_NUMBER: {
  ------------------
  |  Branch (29796:9): [True: 1.67k, False: 14.9k]
  ------------------
29797|  1.67k|            int32_t n = peg_getinteger(b, peg);
29798|  1.67k|            Reserve r = reserve(b, 2);
29799|  1.67k|            if (n < 0) {
  ------------------
  |  Branch (29799:17): [True: 84, False: 1.59k]
  ------------------
29800|     84|                emit_1(r, RULE_NOTNCHAR, -n);
29801|  1.59k|            } else {
29802|  1.59k|                emit_1(r, RULE_NCHAR, n);
29803|  1.59k|            }
29804|  1.67k|            break;
29805|      0|        }
29806|    774|        case JANET_STRING: {
  ------------------
  |  Branch (29806:9): [True: 774, False: 15.8k]
  ------------------
29807|    774|            const uint8_t *str = janet_unwrap_string(peg);
  ------------------
  |  |  863|    774|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
29808|    774|            int32_t len = janet_string_length(str);
  ------------------
  |  | 1813|    774|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|    774|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
29809|    774|            emit_bytes(b, RULE_LITERAL, len, str);
29810|    774|            break;
29811|      0|        }
29812|    100|        case JANET_BUFFER: {
  ------------------
  |  Branch (29812:9): [True: 100, False: 16.4k]
  ------------------
29813|    100|            const JanetBuffer *buf = janet_unwrap_buffer(peg);
  ------------------
  |  |  862|    100|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
29814|    100|            emit_bytes(b, RULE_LITERAL, buf->count, buf->data);
29815|    100|            break;
29816|      0|        }
29817|     77|        case JANET_TABLE: {
  ------------------
  |  Branch (29817:9): [True: 77, False: 16.5k]
  ------------------
29818|       |            /* Build grammar table */
29819|     77|            JanetTable *new_grammar = janet_table_clone(janet_unwrap_table(peg));
  ------------------
  |  |  861|     77|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
29820|     77|            new_grammar->proto = grammar;
29821|     77|            b->grammar = grammar = new_grammar;
29822|       |            /* Run the main rule */
29823|     77|            Janet main_rule = janet_table_rawget(grammar, janet_ckeywordv("main"));
  ------------------
  |  | 1843|     77|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|     77|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|     77|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|     77|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|     77|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29824|     77|            if (janet_checktype(main_rule, JANET_NIL))
  ------------------
  |  |  806|     77|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 77, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 77]
  |  |  ------------------
  |  |  807|     77|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|     77|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|     77|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|     77|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     77|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     77|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29825|     77|                peg_panic(b, "grammar requires :main rule");
29826|      0|            rule = peg_compile1(b, main_rule);
29827|      0|            break;
29828|     77|        }
29829|    538|        case JANET_STRUCT: {
  ------------------
  |  Branch (29829:9): [True: 538, False: 16.0k]
  ------------------
29830|       |            /* Build grammar table */
29831|    538|            const JanetKV *st = janet_unwrap_struct(peg);
  ------------------
  |  |  857|    538|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
29832|    538|            JanetTable *new_grammar = janet_table(2 * janet_struct_capacity(st));
  ------------------
  |  | 1849|    538|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1846|    538|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
29833|  7.44k|            for (int32_t i = 0; i < janet_struct_capacity(st); i++) {
  ------------------
  |  | 1849|  7.44k|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1846|  7.44k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (29833:33): [True: 6.90k, False: 538]
  ------------------
29834|  6.90k|                if (janet_checktype(st[i].key, JANET_KEYWORD)) {
  ------------------
  |  |  806|  6.90k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 50, False: 6.85k]
  |  |  |  Branch (806:6): [Folded, False: 6.90k]
  |  |  ------------------
  |  |  807|  6.90k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  6.90k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  6.90k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  6.90k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  6.90k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  6.90k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29835|     50|                    janet_table_put(new_grammar, st[i].key, st[i].value);
29836|     50|                }
29837|  6.90k|            }
29838|    538|            new_grammar->proto = grammar;
29839|    538|            b->grammar = grammar = new_grammar;
29840|       |            /* Run the main rule */
29841|    538|            Janet main_rule = janet_table_rawget(grammar, janet_ckeywordv("main"));
  ------------------
  |  | 1843|    538|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|    538|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|    538|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|    538|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|    538|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29842|    538|            if (janet_checktype(main_rule, JANET_NIL))
  ------------------
  |  |  806|    538|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 538, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 538]
  |  |  ------------------
  |  |  807|    538|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|    538|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|    538|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|    538|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    538|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    538|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29843|    538|                peg_panic(b, "grammar requires :main rule");
29844|      0|            rule = peg_compile1(b, main_rule);
29845|      0|            break;
29846|    538|        }
29847|  12.8k|        case JANET_TUPLE: {
  ------------------
  |  Branch (29847:9): [True: 12.8k, False: 3.76k]
  ------------------
29848|  12.8k|            const Janet *tup = janet_unwrap_tuple(peg);
  ------------------
  |  |  858|  12.8k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
29849|  12.8k|            int32_t len = janet_tuple_length(tup);
  ------------------
  |  | 1802|  12.8k|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1800|  12.8k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
29850|  12.8k|            if (len == 0) peg_panic(b, "tuple in grammar must have non-zero length");
  ------------------
  |  Branch (29850:17): [True: 13, False: 12.8k]
  ------------------
29851|  12.8k|            if (janet_checkint(tup[0])) {
  ------------------
  |  Branch (29851:17): [True: 531, False: 12.2k]
  ------------------
29852|    531|                int32_t n = janet_unwrap_integer(tup[0]);
  ------------------
  |  |  966|    531|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  839|    531|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
29853|    531|                if (n < 0) {
  ------------------
  |  Branch (29853:21): [True: 36, False: 495]
  ------------------
29854|     36|                    peg_panicf(b, "expected non-negative integer, got %d", n);
  ------------------
  |  |29167|     36|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29855|     36|                }
29856|    495|                spec_repeat(b, len, tup);
29857|    495|                break;
29858|    531|            }
29859|  12.2k|            if (!janet_checktype(tup[0], JANET_SYMBOL))
  ------------------
  |  |  806|  12.2k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 12.2k]
  |  |  ------------------
  |  |  807|  12.2k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  12.2k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  12.2k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  12.2k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  12.2k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  12.2k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (29859:17): [True: 187, False: 12.1k]
  ------------------
29860|    187|                peg_panicf(b, "expected grammar command, found %v", tup[0]);
  ------------------
  |  |29167|    187|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29861|  12.1k|            const uint8_t *sym = janet_unwrap_symbol(tup[0]);
  ------------------
  |  |  864|  12.1k|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
29862|  12.1k|            const SpecialPair *sp = janet_strbinsearch(
29863|  12.1k|                                        &peg_specials,
29864|  12.1k|                                        sizeof(peg_specials) / sizeof(SpecialPair),
29865|  12.1k|                                        sizeof(SpecialPair),
29866|  12.1k|                                        sym);
29867|  12.1k|            if (sp) {
  ------------------
  |  Branch (29867:17): [True: 11.5k, False: 517]
  ------------------
29868|  11.5k|                sp->special(b, len - 1, tup + 1);
29869|  11.5k|            } else {
29870|    517|                peg_panicf(b, "unknown special %S", sym);
  ------------------
  |  |29167|    517|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29871|    517|            }
29872|  11.5k|            break;
29873|  12.1k|        }
29874|  16.5k|    }
29875|       |
29876|       |    /* Increase depth again */
29877|  10.6k|    b->depth++;
29878|  10.6k|    b->form = old_form;
29879|  10.6k|    b->grammar = old_grammar;
29880|  10.6k|    return rule;
29881|  16.5k|}
janet.c:peg_panic:
29162|  2.68k|JANET_NO_RETURN static void peg_panic(Builder *b, const char *msg) {
29163|  2.68k|    builder_cleanup(b);
29164|  2.68k|    janet_panicf("grammar error in %p, %s", b->form, msg);
29165|  2.68k|}
janet.c:reserve:
29253|  12.6k|static Reserve reserve(Builder *b, int32_t size) {
29254|  12.6k|    Reserve r;
29255|  12.6k|    r.index = janet_v_count(b->bytecode);
  ------------------
  |  |  759|  12.6k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  766|  11.1k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  11.1k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (759:34): [True: 11.1k, False: 1.48k]
  |  |  ------------------
  ------------------
29256|  12.6k|    r.builder = b;
29257|  12.6k|    r.size = size;
29258|  49.6k|    for (int32_t i = 0; i < size; i++)
  ------------------
  |  Branch (29258:25): [True: 37.0k, False: 12.6k]
  ------------------
29259|       |        janet_v_push(b->bytecode, 0);
  ------------------
  |  |  757|  37.0k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|  37.0k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|  37.0k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|  35.5k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  35.5k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  765|  35.5k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  35.5k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 1.48k, False: 35.5k]
  |  |  |  |  |  |  |  Branch (768:50): [True: 4.82k, False: 30.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  770|  6.30k|#define janet_v__grow(v, n)      ((v) = janet_v_grow((v), (n), sizeof(*(v))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  766|  37.0k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  37.0k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29260|  12.6k|    return r;
29261|  12.6k|}
janet.c:emit_1:
29282|  1.46k|static void emit_1(Reserve r, uint32_t op, uint32_t arg) {
29283|  1.46k|    emit_rule(r, op, 1, &arg);
29284|  1.46k|}
janet.c:emit_rule:
29264|  9.27k|static void emit_rule(Reserve r, int32_t op, int32_t n, const uint32_t *body) {
29265|  9.27k|    janet_assert(r.size == n + 1, "bad reserve");
  ------------------
  |  |  389|  9.27k|#define janet_assert(c, m) do { \
  |  |  390|  9.27k|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  378|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  379|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  380|      0|        __FILE__,\
  |  |  |  |  381|      0|        __LINE__,\
  |  |  |  |  382|      0|        (m));\
  |  |  |  |  383|      0|    abort();\
  |  |  |  |  384|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (384:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (390:9): [True: 0, False: 9.27k]
  |  |  ------------------
  |  |  391|  9.27k|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 9.27k]
  |  |  ------------------
  ------------------
29266|  9.27k|    r.builder->bytecode[r.index] = op;
29267|  9.27k|    memcpy(r.builder->bytecode + r.index + 1, body, n * sizeof(uint32_t));
29268|  9.27k|}
janet.c:peg_getinteger:
29203|  2.27k|static int32_t peg_getinteger(Builder *b, Janet x) {
29204|  2.27k|    if (!janet_checkint(x))
  ------------------
  |  Branch (29204:9): [True: 439, False: 1.83k]
  ------------------
29205|    439|        peg_panicf(b, "expected integer, got %v", x);
  ------------------
  |  |29167|    439|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29206|  1.83k|    return janet_unwrap_integer(x);
  ------------------
  |  |  966|  1.83k|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  839|  1.83k|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
29207|  2.27k|}
janet.c:emit_bytes:
29271|    874|static void emit_bytes(Builder *b, uint32_t op, int32_t len, const uint8_t *bytes) {
29272|    874|    uint32_t next_rule = janet_v_count(b->bytecode);
  ------------------
  |  |  759|    874|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  766|    676|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|    676|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (759:34): [True: 676, False: 198]
  |  |  ------------------
  ------------------
29273|    874|    janet_v_push(b->bytecode, op);
  ------------------
  |  |  757|    874|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|    874|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|    874|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|    676|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|    676|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  765|    676|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|    676|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 198, False: 676]
  |  |  |  |  |  |  |  Branch (768:50): [True: 71, False: 605]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  770|    269|#define janet_v__grow(v, n)      ((v) = janet_v_grow((v), (n), sizeof(*(v))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  766|    874|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|    874|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29274|    874|    janet_v_push(b->bytecode, len);
  ------------------
  |  |  757|    874|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|    874|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|    874|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|    874|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|    874|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  765|    874|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|    874|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 0, False: 874]
  |  |  |  |  |  |  |  Branch (768:50): [True: 230, False: 644]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  770|    230|#define janet_v__grow(v, n)      ((v) = janet_v_grow((v), (n), sizeof(*(v))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  766|    874|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|    874|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29275|    874|    int32_t words = ((len + 3) >> 2);
29276|  2.40k|    for (int32_t i = 0; i < words; i++)
  ------------------
  |  Branch (29276:25): [True: 1.53k, False: 874]
  ------------------
29277|       |        janet_v_push(b->bytecode, 0);
  ------------------
  |  |  757|  1.53k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|  1.53k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|  1.53k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|  1.53k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  1.53k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  765|  1.53k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  1.53k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 0, False: 1.53k]
  |  |  |  |  |  |  |  Branch (768:50): [True: 334, False: 1.19k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  770|    334|#define janet_v__grow(v, n)      ((v) = janet_v_grow((v), (n), sizeof(*(v))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  766|  1.53k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  1.53k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29278|    874|    memcpy(b->bytecode + next_rule + 2, bytes, len);
29279|    874|}
janet.c:spec_repeat:
29426|    540|static void spec_repeat(Builder *b, int32_t argc, const Janet *argv) {
29427|    540|    peg_fixarity(b, argc, 2);
29428|    540|    Reserve r = reserve(b, 4);
29429|    540|    int32_t n = peg_getnat(b, argv[0]);
29430|    540|    uint32_t subrule = peg_compile1(b, argv[1]);
29431|    540|    emit_3(r, RULE_BETWEEN, n, n, subrule);
29432|    540|}
janet.c:peg_fixarity:
29169|    711|static void peg_fixarity(Builder *b, int32_t argc, int32_t arity) {
29170|    711|    if (argc != arity) {
  ------------------
  |  Branch (29170:9): [True: 54, False: 657]
  ------------------
29171|     54|        peg_panicf(b, "expected %d argument%s, got %d",
  ------------------
  |  |29167|    108|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  |  |  ------------------
  |  |  |  Branch (29167:71): [True: 20, False: 34]
  |  |  ------------------
  ------------------
29172|     54|                   arity,
29173|     54|                   arity == 1 ? "" : "s",
29174|     54|                   argc);
29175|     54|    }
29176|    711|}
janet.c:peg_getnat:
29209|    588|static int32_t peg_getnat(Builder *b, Janet x) {
29210|    588|    int32_t i = peg_getinteger(b, x);
29211|    588|    if (i < 0)
  ------------------
  |  Branch (29211:9): [True: 53, False: 535]
  ------------------
29212|     53|        peg_panicf(b, "expected non-negative integer, got %v", x);
  ------------------
  |  |29167|     53|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29213|    535|    return i;
29214|    588|}
janet.c:emit_3:
29289|    561|static void emit_3(Reserve r, uint32_t op, uint32_t arg1, uint32_t arg2, uint32_t arg3) {
29290|    561|    uint32_t arr[3] = {arg1, arg2, arg3};
29291|    561|    emit_rule(r, op, 3, arr);
29292|    561|}
janet.c:spec_not:
29442|     56|static void spec_not(Builder *b, int32_t argc, const Janet *argv) {
29443|     56|    spec_onerule(b, argc, argv, RULE_NOT);
29444|     56|}
janet.c:spec_onerule:
29435|     95|static void spec_onerule(Builder *b, int32_t argc, const Janet *argv, uint32_t op) {
29436|     95|    peg_fixarity(b, argc, 1);
29437|     95|    Reserve r = reserve(b, 2);
29438|     95|    uint32_t rule = peg_compile1(b, argv[0]);
29439|     95|    emit_1(r, op, rule);
29440|     95|}
janet.c:spec_position:
29534|     38|static void spec_position(Builder *b, int32_t argc, const Janet *argv) {
29535|     38|    spec_tag1(b, argc, argv, RULE_POSITION);
29536|     38|}
janet.c:spec_tag1:
29526|    126|static void spec_tag1(Builder *b, int32_t argc, const Janet *argv, uint32_t op) {
29527|    126|    peg_arity(b, argc, 0, 1);
29528|    126|    Reserve r = reserve(b, 2);
29529|    126|    uint32_t tag = (argc) ? emit_tag(b, argv[0]) : 0;
  ------------------
  |  Branch (29529:20): [True: 12, False: 114]
  ------------------
29530|    126|    (void) argv;
29531|    126|    emit_1(r, op, tag);
29532|    126|}
janet.c:peg_arity:
29178|  10.7k|static void peg_arity(Builder *b, int32_t arity, int32_t min, int32_t max) {
29179|  10.7k|    if (min >= 0 && arity < min)
  ------------------
  |  Branch (29179:9): [True: 10.7k, False: 0]
  |  Branch (29179:21): [True: 15, False: 10.7k]
  ------------------
29180|     15|        peg_panicf(b, "arity mismatch, expected at least %d, got %d", min, arity);
  ------------------
  |  |29167|     15|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29181|  10.7k|    if (max >= 0 && arity > max)
  ------------------
  |  Branch (29181:9): [True: 10.6k, False: 74]
  |  Branch (29181:21): [True: 21, False: 10.6k]
  ------------------
29182|     21|        peg_panicf(b, "arity mismatch, expected at most %d, got %d", max, arity);
  ------------------
  |  |29167|     21|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29183|  10.7k|}
janet.c:emit_tag:
29226|     46|static uint32_t emit_tag(Builder *b, Janet t) {
29227|     46|    if (!janet_checktype(t, JANET_KEYWORD))
  ------------------
  |  |  806|     46|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 46]
  |  |  ------------------
  |  |  807|     46|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|     46|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|     46|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|     46|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     46|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     46|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (29227:9): [True: 22, False: 24]
  ------------------
29228|     22|        peg_panicf(b, "expected keyword for capture tag, got %v", t);
  ------------------
  |  |29167|     22|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29229|     24|    Janet check = janet_table_get(b->tags, t);
29230|     24|    if (janet_checktype(check, JANET_NIL)) {
  ------------------
  |  |  806|     24|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 23, False: 1]
  |  |  |  Branch (806:6): [Folded, False: 24]
  |  |  ------------------
  |  |  807|     24|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|     24|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|     24|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|     24|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     24|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     24|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29231|     23|        uint32_t tag = b->nexttag++;
29232|     23|        if (tag > 255) {
  ------------------
  |  Branch (29232:13): [True: 0, False: 23]
  ------------------
29233|      0|            peg_panic(b, "too many tags - up to 255 tags are supported per peg");
29234|      0|        }
29235|     23|        Janet val = janet_wrap_number(tag);
  ------------------
  |  |  835|     23|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
29236|     23|        janet_table_put(b->tags, t, val);
29237|     23|        return tag;
29238|     23|    } else {
29239|      1|        return (uint32_t) janet_unwrap_number(check);
  ------------------
  |  |  839|      1|#define janet_unwrap_number(x) ((x).number)
  ------------------
29240|      1|    }
29241|     24|}
janet.c:spec_accumulate:
29479|     84|static void spec_accumulate(Builder *b, int32_t argc, const Janet *argv) {
29480|     84|    spec_cap1(b, argc, argv, RULE_ACCUMULATE);
29481|     84|}
janet.c:spec_cap1:
29468|  10.1k|static void spec_cap1(Builder *b, int32_t argc, const Janet *argv, uint32_t op) {
29469|  10.1k|    peg_arity(b, argc, 1, 2);
29470|  10.1k|    Reserve r = reserve(b, 3);
29471|  10.1k|    uint32_t tag = (argc == 2) ? emit_tag(b, argv[1]) : 0;
  ------------------
  |  Branch (29471:20): [True: 9, False: 10.1k]
  ------------------
29472|  10.1k|    uint32_t rule = peg_compile1(b, argv[0]);
29473|  10.1k|    emit_2(r, op, rule, tag);
29474|  10.1k|}
janet.c:emit_2:
29285|  7.16k|static void emit_2(Reserve r, uint32_t op, uint32_t arg1, uint32_t arg2) {
29286|  7.16k|    uint32_t arr[2] = {arg1, arg2};
29287|  7.16k|    emit_rule(r, op, 2, arr);
29288|  7.16k|}
janet.c:spec_sequence:
29357|    282|static void spec_sequence(Builder *b, int32_t argc, const Janet *argv) {
29358|    282|    spec_variadic(b, argc, argv, RULE_SEQUENCE);
29359|    282|}
janet.c:spec_variadic:
29342|    631|static void spec_variadic(Builder *b, int32_t argc, const Janet *argv, uint32_t op) {
29343|    631|    uint32_t rule = janet_v_count(b->bytecode);
  ------------------
  |  |  759|    631|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  766|    444|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|    444|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (759:34): [True: 444, False: 187]
  |  |  ------------------
  ------------------
29344|    631|    janet_v_push(b->bytecode, op);
  ------------------
  |  |  757|    631|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|    631|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|    631|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|    444|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|    444|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  765|    444|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|    444|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 187, False: 444]
  |  |  |  |  |  |  |  Branch (768:50): [True: 65, False: 379]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  770|    252|#define janet_v__grow(v, n)      ((v) = janet_v_grow((v), (n), sizeof(*(v))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  766|    631|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|    631|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29345|    631|    janet_v_push(b->bytecode, argc);
  ------------------
  |  |  757|    631|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|    631|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|    631|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|    631|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|    631|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  765|    631|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|    631|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 0, False: 631]
  |  |  |  |  |  |  |  Branch (768:50): [True: 232, False: 399]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  770|    232|#define janet_v__grow(v, n)      ((v) = janet_v_grow((v), (n), sizeof(*(v))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  766|    631|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|    631|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29346|  3.98k|    for (int32_t i = 0; i < argc; i++)
  ------------------
  |  Branch (29346:25): [True: 3.35k, False: 631]
  ------------------
29347|  3.35k|        janet_v_push(b->bytecode, 0);
  ------------------
  |  |  757|  3.35k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|  3.35k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|  3.35k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|  3.35k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  3.35k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  765|  3.35k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  3.35k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 0, False: 3.35k]
  |  |  |  |  |  |  |  Branch (768:50): [True: 567, False: 2.78k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  770|    567|#define janet_v__grow(v, n)      ((v) = janet_v_grow((v), (n), sizeof(*(v))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  766|  3.35k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  3.35k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29348|  3.78k|    for (int32_t i = 0; i < argc; i++) {
  ------------------
  |  Branch (29348:25): [True: 3.15k, False: 631]
  ------------------
29349|  3.15k|        uint32_t rulei = peg_compile1(b, argv[i]);
29350|  3.15k|        b->bytecode[rule + 2 + i] = rulei;
29351|  3.15k|    }
29352|    631|}
janet.c:spec_choice:
29354|    349|static void spec_choice(Builder *b, int32_t argc, const Janet *argv) {
29355|    349|    spec_variadic(b, argc, argv, RULE_CHOICE);
29356|    349|}
janet.c:spec_reference:
29517|      9|static void spec_reference(Builder *b, int32_t argc, const Janet *argv) {
29518|      9|    peg_arity(b, argc, 1, 2);
29519|      9|    Reserve r = reserve(b, 3);
29520|      9|    uint32_t search = emit_tag(b, argv[0]);
29521|      9|    uint32_t tag = (argc == 2) ? emit_tag(b, argv[1]) : 0;
  ------------------
  |  Branch (29521:20): [True: 2, False: 7]
  ------------------
29522|      9|    b->has_backref = 1;
29523|      9|    emit_2(r, RULE_GETTAG, search, tag);
29524|      9|}
janet.c:spec_replace:
29572|    126|static void spec_replace(Builder *b, int32_t argc, const Janet *argv) {
29573|    126|    peg_arity(b, argc, 2, 3);
29574|    126|    Reserve r = reserve(b, 4);
29575|    126|    uint32_t subrule = peg_compile1(b, argv[0]);
29576|    126|    uint32_t constant = emit_constant(b, argv[1]);
29577|    126|    uint32_t tag = (argc == 3) ? emit_tag(b, argv[2]) : 0;
  ------------------
  |  Branch (29577:20): [True: 8, False: 118]
  ------------------
29578|    126|    emit_3(r, RULE_REPLACE, subrule, constant, tag);
29579|    126|}
janet.c:emit_constant:
29220|     88|static uint32_t emit_constant(Builder *b, Janet c) {
29221|     88|    uint32_t cindex = (uint32_t) janet_v_count(b->constants);
  ------------------
  |  |  759|     88|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  766|     28|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|     28|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (759:34): [True: 28, False: 60]
  |  |  ------------------
  ------------------
29222|       |    janet_v_push(b->constants, c);
  ------------------
  |  |  757|     88|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|     88|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|     88|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|     28|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|     28|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  765|     28|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|     28|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 60, False: 28]
  |  |  |  |  |  |  |  Branch (768:50): [True: 20, False: 8]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  770|     80|#define janet_v__grow(v, n)      ((v) = janet_v_grow((v), (n), sizeof(*(v))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  766|     88|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|     88|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29223|     88|    return cindex;
29224|     88|}
janet.c:spec_capture:
29476|  10.0k|static void spec_capture(Builder *b, int32_t argc, const Janet *argv) {
29477|  10.0k|    spec_cap1(b, argc, argv, RULE_CAPTURE);
29478|  10.0k|}
janet.c:spec_look:
29332|     68|static void spec_look(Builder *b, int32_t argc, const Janet *argv) {
29333|     68|    peg_arity(b, argc, 1, 2);
29334|     68|    Reserve r = reserve(b, 3);
29335|     68|    int32_t rulearg = argc == 2 ? 1 : 0;
  ------------------
  |  Branch (29335:23): [True: 15, False: 53]
  ------------------
29336|     68|    int32_t offset = argc == 2 ? peg_getinteger(b, argv[0]) : 0;
  ------------------
  |  Branch (29336:22): [True: 15, False: 53]
  ------------------
29337|     68|    uint32_t subrule = peg_compile1(b, argv[rulearg]);
29338|     68|    emit_2(r, RULE_LOOK, (uint32_t) offset, subrule);
29339|     68|}
janet.c:spec_opt:
29419|     46|static void spec_opt(Builder *b, int32_t argc, const Janet *argv) {
29420|     46|    peg_fixarity(b, argc, 1);
29421|     46|    Reserve r = reserve(b, 4);
29422|     46|    uint32_t subrule = peg_compile1(b, argv[0]);
29423|     46|    emit_3(r, RULE_BETWEEN, 0, 1, subrule);
29424|     46|}
janet.c:spec_debug:
29564|     87|static void spec_debug(Builder *b, int32_t argc, const Janet *argv) {
29565|     87|    peg_arity(b, argc, 0, 0);
29566|     87|    Reserve r = reserve(b, 1);
29567|     87|    uint32_t empty = 0;
29568|     87|    (void) argv;
29569|     87|    emit_rule(r, RULE_DEBUG, 0, &empty);
29570|     87|}
janet.c:spec_matchtime_impl:
29581|      1|static void spec_matchtime_impl(Builder *b, int32_t argc, const Janet *argv, uint32_t op) {
29582|      1|    peg_arity(b, argc, 2, 3);
29583|      1|    Reserve r = reserve(b, 4);
29584|      1|    uint32_t subrule = peg_compile1(b, argv[0]);
29585|      1|    Janet fun = argv[1];
29586|      1|    if (!janet_checktype(fun, JANET_FUNCTION) &&
  ------------------
  |  |  806|      2|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 1]
  |  |  ------------------
  |  |  807|      2|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|      2|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|      1|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      1|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (29586:9): [True: 0, False: 1]
  ------------------
29587|      0|            !janet_checktype(fun, JANET_CFUNCTION)) {
  ------------------
  |  |  806|      0|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 0]
  |  |  ------------------
  |  |  807|      0|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (29587:13): [True: 0, False: 0]
  ------------------
29588|      0|        peg_panicf(b, "expected function or cfunction, got %v", fun);
  ------------------
  |  |29167|      0|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29589|      0|    }
29590|      1|    uint32_t tag = (argc == 3) ? emit_tag(b, argv[2]) : 0;
  ------------------
  |  Branch (29590:20): [True: 0, False: 1]
  ------------------
29591|      1|    uint32_t cindex = emit_constant(b, fun);
29592|      1|    emit_3(r, op, subrule, cindex, tag);
29593|      1|}
janet.c:spec_matchtime:
29595|      1|static void spec_matchtime(Builder *b, int32_t argc, const Janet *argv) {
29596|      1|    spec_matchtime_impl(b, argc, argv, RULE_MATCHTIME);
29597|      1|}
janet.c:spec_error:
29445|     25|static void spec_error(Builder *b, int32_t argc, const Janet *argv) {
29446|     25|    if (argc == 0) {
  ------------------
  |  Branch (29446:9): [True: 11, False: 14]
  ------------------
29447|     11|        Reserve r = reserve(b, 2);
29448|     11|        uint32_t rule = peg_compile1(b, janet_wrap_number(0));
  ------------------
  |  |  835|     11|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
29449|     11|        emit_1(r, RULE_ERROR, rule);
29450|     14|    } else {
29451|     14|        spec_onerule(b, argc, argv, RULE_ERROR);
29452|     14|    }
29453|     25|}
janet.c:spec_if:
29370|     26|static void spec_if(Builder *b, int32_t argc, const Janet *argv) {
29371|     26|    spec_branch(b, argc, argv, RULE_IF);
29372|     26|}
janet.c:spec_branch:
29362|     26|static void spec_branch(Builder *b, int32_t argc, const Janet *argv, uint32_t rule) {
29363|     26|    peg_fixarity(b, argc, 2);
29364|     26|    Reserve r = reserve(b, 3);
29365|     26|    uint32_t rule_a = peg_compile1(b, argv[0]);
29366|     26|    uint32_t rule_b = peg_compile1(b, argv[1]);
29367|     26|    emit_2(r, rule, rule_a, rule_b);
29368|     26|}
janet.c:spec_int_le:
29647|     80|static void spec_int_le(Builder *b, int32_t argc, const Janet *argv) {
29648|     80|    spec_readint(b, argc, argv, 0x10u);
29649|     80|}
janet.c:spec_readint:
29633|     83|static void spec_readint(Builder *b, int32_t argc, const Janet *argv, uint32_t mask) {
29634|     83|    peg_arity(b, argc, 1, 2);
29635|     83|    Reserve r = reserve(b, 3);
29636|     83|    uint32_t tag = (argc == 2) ? emit_tag(b, argv[1]) : 0;
  ------------------
  |  Branch (29636:20): [True: 9, False: 74]
  ------------------
29637|     83|    int32_t width = peg_getnat(b, argv[0]);
29638|     83|    if ((width < 0) || (width > JANET_MAX_READINT_WIDTH)) {
  ------------------
  |  |29628|     43|#define JANET_MAX_READINT_WIDTH 8
  ------------------
  |  Branch (29638:9): [True: 40, False: 43]
  |  Branch (29638:24): [True: 31, False: 12]
  ------------------
29639|     31|        peg_panicf(b, "width must be between 0 and %d, got %d", JANET_MAX_READINT_WIDTH, width);
  ------------------
  |  |29167|     31|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29640|     31|    }
29641|     52|    emit_2(r, RULE_READINT, mask | ((uint32_t) width), tag);
29642|     52|}
janet.c:spec_line:
29537|     88|static void spec_line(Builder *b, int32_t argc, const Janet *argv) {
29538|     88|    spec_tag1(b, argc, argv, RULE_LINE);
29539|     88|}
janet.c:spec_range:
29302|     75|static void spec_range(Builder *b, int32_t argc, const Janet *argv) {
29303|     75|    peg_arity(b, argc, 1, -1);
29304|     75|    if (argc == 1) {
  ------------------
  |  Branch (29304:9): [True: 38, False: 37]
  ------------------
29305|     38|        Reserve r = reserve(b, 2);
29306|     38|        const uint8_t *str = peg_getrange(b, argv[0]);
29307|     38|        uint32_t arg = str[0] | (str[1] << 16);
29308|     38|        emit_1(r, RULE_RANGE, arg);
29309|     38|    } else {
29310|       |        /* Compile as a set */
29311|     37|        Reserve r = reserve(b, 9);
29312|     37|        uint32_t bitmap[8] = {0};
29313|     95|        for (int32_t i = 0; i < argc; i++) {
  ------------------
  |  Branch (29313:29): [True: 58, False: 37]
  ------------------
29314|     58|            const uint8_t *str = peg_getrange(b, argv[i]);
29315|  1.70k|            for (uint32_t c = str[0]; c <= str[1]; c++)
  ------------------
  |  Branch (29315:39): [True: 1.64k, False: 58]
  ------------------
29316|  1.64k|                bitmap_set(bitmap, c);
29317|     58|        }
29318|     37|        emit_rule(r, RULE_SET, 8, bitmap);
29319|     37|    }
29320|     75|}
janet.c:peg_getrange:
29192|     96|static const uint8_t *peg_getrange(Builder *b, Janet x) {
29193|     96|    if (!janet_checktype(x, JANET_STRING))
  ------------------
  |  |  806|     96|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 96]
  |  |  ------------------
  |  |  807|     96|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|     96|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|     96|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|     96|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     96|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     96|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (29193:9): [True: 36, False: 60]
  ------------------
29194|     36|        peg_panic(b, "expected string for character range");
29195|     60|    const uint8_t *str = janet_unwrap_string(x);
  ------------------
  |  |  863|     60|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
29196|     60|    if (janet_string_length(str) != 2)
  ------------------
  |  | 1813|     60|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|     60|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (29196:9): [True: 9, False: 51]
  ------------------
29197|      9|        peg_panicf(b, "expected string to have length 2, got %v", x);
  ------------------
  |  |29167|      9|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29198|     51|    if (str[1] < str[0])
  ------------------
  |  Branch (29198:9): [True: 5, False: 46]
  ------------------
29199|      5|        peg_panicf(b, "range %v is empty", x);
  ------------------
  |  |29167|      5|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29200|     46|    return str;
29201|     51|}
janet.c:bitmap_set:
29298|  1.64k|static void bitmap_set(uint32_t *bitmap, uint8_t c) {
29299|  1.64k|    bitmap[c >> 5] |= ((uint32_t)1) << (c & 0x1F);
29300|  1.64k|}
janet.c:spec_til:
29611|      4|static void spec_til(Builder *b, int32_t argc, const Janet *argv) {
29612|      4|    peg_fixarity(b, argc, 2);
29613|      4|    Reserve r = reserve(b, 3);
29614|      4|    uint32_t subrule1 = peg_compile1(b, argv[0]);
29615|      4|    uint32_t subrule2 = peg_compile1(b, argv[1]);
29616|      4|    emit_2(r, RULE_TIL, subrule1, subrule2);
29617|      4|}
janet.c:spec_to:
29454|     25|static void spec_to(Builder *b, int32_t argc, const Janet *argv) {
29455|     25|    spec_onerule(b, argc, argv, RULE_TO);
29456|     25|}
janet.c:spec_uint_le:
29644|      3|static void spec_uint_le(Builder *b, int32_t argc, const Janet *argv) {
29645|      3|    spec_readint(b, argc, argv, 0x0u);
29646|      3|}
janet.c:make_peg:
30156|  1.35k|static JanetPeg *make_peg(Builder *b) {
30157|  1.35k|    size_t bytecode_start = size_padded(sizeof(JanetPeg), sizeof(uint32_t));
30158|  1.35k|    size_t bytecode_size = janet_v_count(b->bytecode) * sizeof(uint32_t);
  ------------------
  |  |  759|  1.35k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  766|  1.35k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  1.35k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (759:34): [True: 1.35k, False: 0]
  |  |  ------------------
  ------------------
30159|  1.35k|    size_t constants_start = size_padded(bytecode_start + bytecode_size, sizeof(Janet));
30160|  1.35k|    size_t constants_size = janet_v_count(b->constants) * sizeof(Janet);
  ------------------
  |  |  759|  1.35k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  766|     55|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|     55|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (759:34): [True: 55, False: 1.30k]
  |  |  ------------------
  ------------------
30161|  1.35k|    size_t total_size = constants_start + constants_size;
30162|  1.35k|    char *mem = janet_abstract(&janet_peg_type, total_size);
30163|  1.35k|    JanetPeg *peg = (JanetPeg *)mem;
30164|  1.35k|    peg->bytecode = (uint32_t *)(mem + bytecode_start);
30165|  1.35k|    peg->constants = (Janet *)(mem + constants_start);
30166|  1.35k|    peg->num_constants = janet_v_count(b->constants);
  ------------------
  |  |  759|  1.35k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  766|     55|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|     55|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (759:34): [True: 55, False: 1.30k]
  |  |  ------------------
  ------------------
30167|  1.35k|    safe_memcpy(peg->bytecode, b->bytecode, bytecode_size);
30168|  1.35k|    safe_memcpy(peg->constants, b->constants, constants_size);
30169|       |    peg->bytecode_len = janet_v_count(b->bytecode);
  ------------------
  |  |  759|  1.35k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  766|  1.35k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  1.35k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (759:34): [True: 1.35k, False: 0]
  |  |  ------------------
  ------------------
30170|  1.35k|    peg->has_backref = b->has_backref;
30171|  1.35k|    return peg;
30172|  1.35k|}
janet.c:builder_cleanup:
29157|  4.04k|static void builder_cleanup(Builder *b) {
29158|  4.04k|    janet_v_free(b->constants);
  ------------------
  |  |  756|  4.04k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  764|     60|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (756:34): [True: 60, False: 3.98k]
  |  |  ------------------
  ------------------
29159|       |    janet_v_free(b->bytecode);
  ------------------
  |  |  756|  4.04k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  764|  1.86k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (756:34): [True: 1.86k, False: 2.17k]
  |  |  ------------------
  ------------------
29160|  4.04k|}
janet.c:peg_cfun_init:
30222|  4.04k|static PegCall peg_cfun_init(int32_t argc, Janet *argv, int get_replace) {
30223|  4.04k|    PegCall ret;
30224|  4.04k|    int32_t min = get_replace ? 3 : 2;
  ------------------
  |  Branch (30224:19): [True: 0, False: 4.04k]
  ------------------
30225|  4.04k|    janet_arity(argc, min, -1);
30226|  4.04k|    if (janet_checktype(argv[0], JANET_ABSTRACT) &&
  ------------------
  |  |  806|  8.08k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 147, False: 3.89k]
  |  |  |  Branch (806:6): [Folded, False: 4.04k]
  |  |  ------------------
  |  |  807|  8.08k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  8.08k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  4.04k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  4.04k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  4.04k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  4.04k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30227|    147|            janet_abstract_type(janet_unwrap_abstract(argv[0])) == &janet_peg_type) {
  ------------------
  |  | 1899|    147|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|    147|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (30227:13): [True: 0, False: 147]
  ------------------
30228|      0|        ret.peg = janet_unwrap_abstract(argv[0]);
  ------------------
  |  |  866|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
30229|  4.04k|    } else {
30230|  4.04k|        ret.peg = compile_peg(argv[0]);
30231|  4.04k|    }
30232|  4.04k|    if (get_replace) {
  ------------------
  |  Branch (30232:9): [True: 0, False: 4.04k]
  ------------------
30233|      0|        ret.subst = argv[1];
30234|      0|        ret.bytes = janet_getbytes(argv, 2);
30235|  4.04k|    } else {
30236|  4.04k|        ret.bytes = janet_getbytes(argv, 1);
30237|  4.04k|    }
30238|  4.04k|    if (argc > min) {
  ------------------
  |  Branch (30238:9): [True: 0, False: 4.04k]
  ------------------
30239|      0|        ret.start = janet_gethalfrange(argv, min, ret.bytes.len, "offset");
30240|      0|        ret.s.extrac = argc - min - 1;
30241|      0|        ret.s.extrav = janet_tuple_n(argv + min + 1, argc - min - 1);
30242|  4.04k|    } else {
30243|  4.04k|        ret.start = 0;
30244|  4.04k|        ret.s.extrac = 0;
30245|  4.04k|        ret.s.extrav = NULL;
30246|  4.04k|    }
30247|  4.04k|    ret.s.mode = PEG_MODE_NORMAL;
30248|  4.04k|    ret.s.text_start = ret.bytes.bytes;
30249|  4.04k|    ret.s.text_end = ret.bytes.bytes + ret.bytes.len;
30250|  4.04k|    ret.s.outer_text_end = ret.s.text_end;
30251|  4.04k|    ret.s.depth = JANET_RECURSION_GUARD;
  ------------------
  |  |  296|  4.04k|#define JANET_RECURSION_GUARD 1024
  ------------------
30252|  4.04k|    ret.s.captures = janet_array(0);
30253|  4.04k|    ret.s.tagged_captures = janet_array(0);
30254|  4.04k|    ret.s.scratch = janet_buffer(10);
30255|  4.04k|    ret.s.tags = janet_buffer(10);
30256|  4.04k|    ret.s.constants = ret.peg->constants;
30257|  4.04k|    ret.s.bytecode = ret.peg->bytecode;
30258|       |    ret.s.linemap = NULL;
30259|  4.04k|    ret.s.linemaplen = -1;
30260|  4.04k|    ret.s.has_backref = ret.peg->has_backref;
30261|  4.04k|    return ret;
30262|  4.04k|}
janet.c:peg_rule:
28465|   177M|    const uint8_t *text) {
28466|   178M|tail:
28467|   178M|    switch (*rule) {
28468|      0|        default:
  ------------------
  |  Branch (28468:9): [True: 0, False: 178M]
  ------------------
28469|      0|            janet_panic("unexpected opcode");
28470|      0|            return NULL;
28471|       |
28472|  8.14k|        case RULE_LITERAL: {
  ------------------
  |  Branch (28472:9): [True: 8.14k, False: 178M]
  ------------------
28473|  8.14k|            uint32_t len = rule[1];
28474|  8.14k|            if (text + len > s->text_end) return NULL;
  ------------------
  |  Branch (28474:17): [True: 426, False: 7.72k]
  ------------------
28475|  7.72k|            return memcmp(text, rule + 2, len) ? NULL : text + len;
  ------------------
  |  Branch (28475:20): [True: 529, False: 7.19k]
  ------------------
28476|  8.14k|        }
28477|       |
28478|  4.59k|        case RULE_DEBUG: {
  ------------------
  |  Branch (28478:9): [True: 4.59k, False: 178M]
  ------------------
28479|  4.59k|            char buffer[32] = {0};
28480|  4.59k|            size_t len = (size_t)(s->outer_text_end - text);
28481|  4.59k|            memcpy(buffer, text, (len > 31 ? 31 : len));
  ------------------
  |  Branch (28481:35): [True: 327, False: 4.27k]
  ------------------
28482|  4.59k|            janet_eprintf("?? at [%s] (index %d)\n", buffer, (int32_t)(text - s->text_start));
  ------------------
  |  | 2195|  4.59k|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
28483|  4.59k|            int has_color = janet_truthy(janet_dyn("err-color"));
  ------------------
  |  |  818|  4.59k|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  806|  9.19k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 4.59k]
  |  |  |  |  ------------------
  |  |  |  |  807|  9.19k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|  9.19k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|  4.59k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|  4.59k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  4.59k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  4.59k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (818:6): [True: 0, False: 4.59k]
  |  |  ------------------
  |  |  819|  4.59k|     (!janet_checktype((x), JANET_BOOLEAN) || ((x).u64 & 0x1)))
  |  |  ------------------
  |  |  |  |  806|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  807|      0|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (819:7): [True: 0, False: 0]
  |  |  |  Branch (819:47): [True: 0, False: 0]
  |  |  ------------------
  ------------------
28484|       |            /* Accumulate buffer */
28485|  4.59k|            if (s->scratch->count) {
  ------------------
  |  Branch (28485:17): [True: 0, False: 4.59k]
  ------------------
28486|      0|                janet_eprintf("accumulate buffer: %v\n", janet_wrap_buffer(s->scratch));
  ------------------
  |  | 2195|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
28487|      0|            }
28488|       |            /* Normal captures */
28489|  4.59k|            if (s->captures->count) {
  ------------------
  |  Branch (28489:17): [True: 2.23k, False: 2.36k]
  ------------------
28490|  2.23k|                janet_eprintf("stack [%d]:\n", s->captures->count);
  ------------------
  |  | 2195|  2.23k|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
28491|   140k|                for (int32_t i = 0; i < s->captures->count; i++) {
  ------------------
  |  Branch (28491:37): [True: 137k, False: 2.23k]
  ------------------
28492|   137k|                    if (has_color) {
  ------------------
  |  Branch (28492:25): [True: 0, False: 137k]
  ------------------
28493|      0|                        janet_eprintf("  [%d]: %M\n", i, s->captures->data[i]);
  ------------------
  |  | 2195|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
28494|   137k|                    } else {
28495|   137k|                        janet_eprintf("  [%d]: %m\n", i, s->captures->data[i]);
  ------------------
  |  | 2195|   137k|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
28496|   137k|                    }
28497|   137k|                }
28498|  2.23k|            }
28499|       |            /* Tagged captures */
28500|  4.59k|            if (s->tagged_captures->count) {
  ------------------
  |  Branch (28500:17): [True: 0, False: 4.59k]
  ------------------
28501|      0|                janet_eprintf("tag stack [%d]:\n", s->tagged_captures->count);
  ------------------
  |  | 2195|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
28502|      0|                for (int32_t i = 0; i < s->tagged_captures->count; i++) {
  ------------------
  |  Branch (28502:37): [True: 0, False: 0]
  ------------------
28503|      0|                    if (has_color) {
  ------------------
  |  Branch (28503:25): [True: 0, False: 0]
  ------------------
28504|      0|                        janet_eprintf("  [%d] tag=%d: %M\n", i, (int32_t) s->tags->data[i], s->tagged_captures->data[i]);
  ------------------
  |  | 2195|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
28505|      0|                    } else {
28506|      0|                        janet_eprintf("  [%d] tag=%d: %m\n", i, (int32_t) s->tags->data[i], s->tagged_captures->data[i]);
  ------------------
  |  | 2195|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
28507|      0|                    }
28508|      0|                }
28509|      0|            }
28510|  4.59k|            return text;
28511|  8.14k|        }
28512|       |
28513|   150M|        case RULE_NCHAR: {
  ------------------
  |  Branch (28513:9): [True: 150M, False: 28.0M]
  ------------------
28514|   150M|            uint32_t n = rule[1];
28515|   150M|            return (text + n > s->text_end) ? NULL : text + n;
  ------------------
  |  Branch (28515:20): [True: 17.2k, False: 150M]
  ------------------
28516|  8.14k|        }
28517|       |
28518|  1.32k|        case RULE_NOTNCHAR: {
  ------------------
  |  Branch (28518:9): [True: 1.32k, False: 178M]
  ------------------
28519|  1.32k|            uint32_t n = rule[1];
28520|  1.32k|            return (text + n > s->text_end) ? text : NULL;
  ------------------
  |  Branch (28520:20): [True: 438, False: 882]
  ------------------
28521|  8.14k|        }
28522|       |
28523|     22|        case RULE_RANGE: {
  ------------------
  |  Branch (28523:9): [True: 22, False: 178M]
  ------------------
28524|     22|            uint8_t lo = rule[1] & 0xFF;
28525|     22|            uint8_t hi = (rule[1] >> 16) & 0xFF;
28526|     22|            return (text < s->text_end &&
  ------------------
  |  Branch (28526:21): [True: 22, False: 0]
  ------------------
28527|     22|                    text[0] >= lo &&
  ------------------
  |  Branch (28527:21): [True: 9, False: 13]
  ------------------
28528|      9|                    text[0] <= hi)
  ------------------
  |  Branch (28528:21): [True: 4, False: 5]
  ------------------
28529|     22|                   ? text + 1
28530|     22|                   : NULL;
28531|  8.14k|        }
28532|       |
28533|      2|        case RULE_SET: {
  ------------------
  |  Branch (28533:9): [True: 2, False: 178M]
  ------------------
28534|      2|            if (text >= s->text_end) return NULL;
  ------------------
  |  Branch (28534:17): [True: 0, False: 2]
  ------------------
28535|      2|            uint32_t word = rule[1 + (text[0] >> 5)];
28536|      2|            uint32_t mask = (uint32_t)1 << (text[0] & 0x1F);
28537|      2|            return (word & mask)
  ------------------
  |  Branch (28537:20): [True: 1, False: 1]
  ------------------
28538|      2|                   ? text + 1
28539|      2|                   : NULL;
28540|      2|        }
28541|       |
28542|  11.5k|        case RULE_LOOK: {
  ------------------
  |  Branch (28542:9): [True: 11.5k, False: 178M]
  ------------------
28543|  11.5k|            text += ((int32_t *)rule)[1];
28544|  11.5k|            if (text < s->text_start || text > s->text_end) return NULL;
  ------------------
  |  Branch (28544:17): [True: 1, False: 11.5k]
  |  Branch (28544:41): [True: 98, False: 11.4k]
  ------------------
28545|  11.4k|            down1(s);
  ------------------
  |  |28450|  11.4k|#define down1(s) do { \
  |  |28451|  11.4k|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28451:9): [True: 0, False: 11.4k]
  |  |  ------------------
  |  |28452|  11.4k|} while (0)
  |  |  ------------------
  |  |  |  Branch (28452:10): [Folded, False: 11.4k]
  |  |  ------------------
  ------------------
28546|  11.4k|            const uint8_t *result = peg_rule(s, s->bytecode + rule[2], text);
28547|  11.4k|            up1(s);
  ------------------
  |  |28453|  11.4k|#define up1(s) ((s)->depth++)
  ------------------
28548|  11.4k|            text -= ((int32_t *)rule)[1];
28549|  11.4k|            return result ? text : NULL;
  ------------------
  |  Branch (28549:20): [True: 10.9k, False: 477]
  ------------------
28550|  11.4k|        }
28551|       |
28552|  13.9k|        case RULE_CHOICE: {
  ------------------
  |  Branch (28552:9): [True: 13.9k, False: 178M]
  ------------------
28553|  13.9k|            uint32_t len = rule[1];
28554|  13.9k|            const uint32_t *args = rule + 2;
28555|  13.9k|            if (len == 0) return NULL;
  ------------------
  |  Branch (28555:17): [True: 1.75k, False: 12.1k]
  ------------------
28556|  12.1k|            down1(s);
  ------------------
  |  |28450|  12.1k|#define down1(s) do { \
  |  |28451|  12.1k|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28451:9): [True: 0, False: 12.1k]
  |  |  ------------------
  |  |28452|  12.1k|} while (0)
  |  |  ------------------
  |  |  |  Branch (28452:10): [Folded, False: 12.1k]
  |  |  ------------------
  ------------------
28557|  12.1k|            CapState cs = cap_save(s);
28558|  22.1k|            for (uint32_t i = 0; i < len - 1; i++) {
  ------------------
  |  Branch (28558:34): [True: 14.7k, False: 7.37k]
  ------------------
28559|  14.7k|                const uint8_t *result = peg_rule(s, s->bytecode + args[i], text);
28560|  14.7k|                if (result) {
  ------------------
  |  Branch (28560:21): [True: 4.78k, False: 10.0k]
  ------------------
28561|  4.78k|                    up1(s);
  ------------------
  |  |28453|  4.78k|#define up1(s) ((s)->depth++)
  ------------------
28562|  4.78k|                    return result;
28563|  4.78k|                }
28564|  10.0k|                cap_load(s, cs);
28565|  10.0k|            }
28566|  7.37k|            up1(s);
  ------------------
  |  |28453|  7.37k|#define up1(s) ((s)->depth++)
  ------------------
28567|  7.37k|            rule = s->bytecode + args[len - 1];
28568|  7.37k|            goto tail;
28569|  12.1k|        }
28570|       |
28571|  1.40M|        case RULE_SEQUENCE: {
  ------------------
  |  Branch (28571:9): [True: 1.40M, False: 177M]
  ------------------
28572|  1.40M|            uint32_t len = rule[1];
28573|  1.40M|            const uint32_t *args = rule + 2;
28574|  1.40M|            if (len == 0) return text;
  ------------------
  |  Branch (28574:17): [True: 344, False: 1.40M]
  ------------------
28575|  1.40M|            down1(s);
  ------------------
  |  |28450|  1.40M|#define down1(s) do { \
  |  |28451|  1.40M|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28451:9): [True: 0, False: 1.40M]
  |  |  ------------------
  |  |28452|  1.40M|} while (0)
  |  |  ------------------
  |  |  |  Branch (28452:10): [Folded, False: 1.40M]
  |  |  ------------------
  ------------------
28576|  1.40M|            for (uint32_t i = 0; text && i < len - 1; i++)
  ------------------
  |  Branch (28576:34): [True: 1.40M, False: 947]
  |  Branch (28576:42): [True: 3.06k, False: 1.40M]
  ------------------
28577|  3.06k|                text = peg_rule(s, s->bytecode + args[i], text);
28578|  1.40M|            up1(s);
  ------------------
  |  |28453|  1.40M|#define up1(s) ((s)->depth++)
  ------------------
28579|  1.40M|            if (!text) return NULL;
  ------------------
  |  Branch (28579:17): [True: 947, False: 1.40M]
  ------------------
28580|  1.40M|            rule = s->bytecode + args[len - 1];
28581|  1.40M|            goto tail;
28582|  1.40M|        }
28583|       |
28584|    338|        case RULE_IF: {
  ------------------
  |  Branch (28584:9): [True: 338, False: 178M]
  ------------------
28585|    338|            const uint32_t *rule_a = s->bytecode + rule[1];
28586|    338|            const uint32_t *rule_b = s->bytecode + rule[2];
28587|    338|            down1(s);
  ------------------
  |  |28450|    338|#define down1(s) do { \
  |  |28451|    338|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28451:9): [True: 0, False: 338]
  |  |  ------------------
  |  |28452|    338|} while (0)
  |  |  ------------------
  |  |  |  Branch (28452:10): [Folded, False: 338]
  |  |  ------------------
  ------------------
28588|    338|            const uint8_t *result = peg_rule(s, rule_a, text);
28589|    338|            up1(s);
  ------------------
  |  |28453|    338|#define up1(s) ((s)->depth++)
  ------------------
28590|    338|            if (!result) return NULL;
  ------------------
  |  Branch (28590:17): [True: 8, False: 330]
  ------------------
28591|    330|            rule = rule_b;
28592|    330|            goto tail;
28593|    338|        }
28594|      0|        case RULE_IFNOT: {
  ------------------
  |  Branch (28594:9): [True: 0, False: 178M]
  ------------------
28595|      0|            const uint32_t *rule_a = s->bytecode + rule[1];
28596|      0|            const uint32_t *rule_b = s->bytecode + rule[2];
28597|      0|            down1(s);
  ------------------
  |  |28450|      0|#define down1(s) do { \
  |  |28451|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28451:9): [True: 0, False: 0]
  |  |  ------------------
  |  |28452|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (28452:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
28598|      0|            CapState cs = cap_save(s);
28599|      0|            const uint8_t *result = peg_rule(s, rule_a, text);
28600|      0|            if (!!result) {
  ------------------
  |  Branch (28600:17): [True: 0, False: 0]
  ------------------
28601|      0|                up1(s);
  ------------------
  |  |28453|      0|#define up1(s) ((s)->depth++)
  ------------------
28602|      0|                return NULL;
28603|      0|            } else {
28604|      0|                cap_load(s, cs);
28605|      0|                up1(s);
  ------------------
  |  |28453|      0|#define up1(s) ((s)->depth++)
  ------------------
28606|      0|                rule = rule_b;
28607|      0|                goto tail;
28608|      0|            }
28609|      0|        }
28610|       |
28611|  10.5k|        case RULE_NOT: {
  ------------------
  |  Branch (28611:9): [True: 10.5k, False: 178M]
  ------------------
28612|  10.5k|            const uint32_t *rule_a = s->bytecode + rule[1];
28613|  10.5k|            down1(s);
  ------------------
  |  |28450|  10.5k|#define down1(s) do { \
  |  |28451|  10.5k|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28451:9): [True: 0, False: 10.5k]
  |  |  ------------------
  |  |28452|  10.5k|} while (0)
  |  |  ------------------
  |  |  |  Branch (28452:10): [Folded, False: 10.5k]
  |  |  ------------------
  ------------------
28614|  10.5k|            CapState cs = cap_save(s);
28615|  10.5k|            const uint8_t *result = peg_rule(s, rule_a, text);
28616|  10.5k|            if (result) {
  ------------------
  |  Branch (28616:17): [True: 871, False: 9.66k]
  ------------------
28617|    871|                up1(s);
  ------------------
  |  |28453|    871|#define up1(s) ((s)->depth++)
  ------------------
28618|    871|                return NULL;
28619|  9.66k|            } else {
28620|  9.66k|                cap_load(s, cs);
28621|  9.66k|                up1(s);
  ------------------
  |  |28453|  9.66k|#define up1(s) ((s)->depth++)
  ------------------
28622|  9.66k|                return text;
28623|  9.66k|            }
28624|  10.5k|        }
28625|       |
28626|      0|        case RULE_THRU:
  ------------------
  |  Branch (28626:9): [True: 0, False: 178M]
  ------------------
28627|     19|        case RULE_TO: {
  ------------------
  |  Branch (28627:9): [True: 19, False: 178M]
  ------------------
28628|     19|            const uint32_t *rule_a = s->bytecode + rule[1];
28629|     19|            const uint8_t *next_text = NULL;
28630|     19|            CapState cs = cap_save(s);
28631|     19|            down1(s);
  ------------------
  |  |28450|     19|#define down1(s) do { \
  |  |28451|     19|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28451:9): [True: 0, False: 19]
  |  |  ------------------
  |  |28452|     19|} while (0)
  |  |  ------------------
  |  |  |  Branch (28452:10): [Folded, False: 19]
  |  |  ------------------
  ------------------
28632|    436|            while (text <= s->text_end) {
  ------------------
  |  Branch (28632:20): [True: 427, False: 9]
  ------------------
28633|    427|                CapState cs2 = cap_save(s);
28634|    427|                next_text = peg_rule(s, rule_a, text);
28635|    427|                if (next_text) {
  ------------------
  |  Branch (28635:21): [True: 10, False: 417]
  ------------------
28636|     10|                    if (rule[0] == RULE_TO) cap_load(s, cs2);
  ------------------
  |  Branch (28636:25): [True: 10, False: 0]
  ------------------
28637|     10|                    break;
28638|     10|                }
28639|    417|                cap_load(s, cs2);
28640|    417|                text++;
28641|    417|            }
28642|     19|            up1(s);
  ------------------
  |  |28453|     19|#define up1(s) ((s)->depth++)
  ------------------
28643|     19|            if (text > s->text_end) {
  ------------------
  |  Branch (28643:17): [True: 9, False: 10]
  ------------------
28644|      9|                cap_load(s, cs);
28645|      9|                return NULL;
28646|      9|            }
28647|     10|            return rule[0] == RULE_TO ? text : next_text;
  ------------------
  |  Branch (28647:20): [True: 10, False: 0]
  ------------------
28648|     19|        }
28649|       |
28650|  1.01M|        case RULE_BETWEEN: {
  ------------------
  |  Branch (28650:9): [True: 1.01M, False: 177M]
  ------------------
28651|  1.01M|            uint32_t lo = rule[1];
28652|  1.01M|            uint32_t hi = rule[2];
28653|  1.01M|            const uint32_t *rule_a = s->bytecode + rule[3];
28654|  1.01M|            uint32_t captured = 0;
28655|  1.01M|            const uint8_t *next_text;
28656|  1.01M|            CapState cs = cap_save(s);
28657|  1.01M|            down1(s);
  ------------------
  |  |28450|  1.01M|#define down1(s) do { \
  |  |28451|  1.01M|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28451:9): [True: 0, False: 1.01M]
  |  |  ------------------
  |  |28452|  1.01M|} while (0)
  |  |  ------------------
  |  |  |  Branch (28452:10): [Folded, False: 1.01M]
  |  |  ------------------
  ------------------
28658|   167M|            while (captured < hi) {
  ------------------
  |  Branch (28658:20): [True: 166M, False: 1.01M]
  ------------------
28659|   166M|                CapState cs2 = cap_save(s);
28660|   166M|                next_text = peg_rule(s, rule_a, text);
28661|   166M|                if (!next_text || ((next_text == text) && (hi == UINT32_MAX))) {
  ------------------
  |  Branch (28661:21): [True: 2.87k, False: 166M]
  |  Branch (28661:36): [True: 166M, False: 2.57k]
  |  Branch (28661:59): [True: 0, False: 166M]
  ------------------
28662|  2.87k|                    cap_load(s, cs2);
28663|  2.87k|                    break;
28664|  2.87k|                }
28665|   166M|                captured++;
28666|   166M|                text = next_text;
28667|   166M|            }
28668|  1.01M|            up1(s);
  ------------------
  |  |28453|  1.01M|#define up1(s) ((s)->depth++)
  ------------------
28669|  1.01M|            if (captured < lo) {
  ------------------
  |  Branch (28669:17): [True: 1.69k, False: 1.01M]
  ------------------
28670|  1.69k|                cap_load(s, cs);
28671|  1.69k|                return NULL;
28672|  1.69k|            }
28673|  1.01M|            return text;
28674|  1.01M|        }
28675|       |
28676|       |        /* Capturing rules */
28677|       |
28678|      5|        case RULE_GETTAG: {
  ------------------
  |  Branch (28678:9): [True: 5, False: 178M]
  ------------------
28679|      5|            uint32_t search = rule[1];
28680|      5|            uint32_t tag = rule[2];
28681|      5|            for (int32_t i = s->tags->count - 1; i >= 0; i--) {
  ------------------
  |  Branch (28681:50): [True: 0, False: 5]
  ------------------
28682|      0|                if (s->tags->data[i] == search) {
  ------------------
  |  Branch (28682:21): [True: 0, False: 0]
  ------------------
28683|      0|                    pushcap(s, s->tagged_captures->data[i], tag);
28684|      0|                    return text;
28685|      0|                }
28686|      0|            }
28687|      5|            return NULL;
28688|      5|        }
28689|       |
28690|  15.0M|        case RULE_POSITION: {
  ------------------
  |  Branch (28690:9): [True: 15.0M, False: 163M]
  ------------------
28691|  15.0M|            pushcap(s, janet_wrap_number((double)(text - s->text_start)), rule[1]);
  ------------------
  |  |  835|  15.0M|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
28692|  15.0M|            return text;
28693|      5|        }
28694|       |
28695|     89|        case RULE_LINE: {
  ------------------
  |  Branch (28695:9): [True: 89, False: 178M]
  ------------------
28696|     89|            LineCol lc = get_linecol_from_position(s, (int32_t)(text - s->text_start));
28697|     89|            pushcap(s, janet_wrap_number((double)(lc.line)), rule[1]);
  ------------------
  |  |  835|     89|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
28698|     89|            return text;
28699|      5|        }
28700|       |
28701|      0|        case RULE_COLUMN: {
  ------------------
  |  Branch (28701:9): [True: 0, False: 178M]
  ------------------
28702|      0|            LineCol lc = get_linecol_from_position(s, (int32_t)(text - s->text_start));
28703|      0|            pushcap(s, janet_wrap_number((double)(lc.col)), rule[1]);
  ------------------
  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
28704|      0|            return text;
28705|      5|        }
28706|       |
28707|      0|        case RULE_ARGUMENT: {
  ------------------
  |  Branch (28707:9): [True: 0, False: 178M]
  ------------------
28708|      0|            int32_t index = ((int32_t *)rule)[1];
28709|      0|            Janet capture = (index >= s->extrac) ? janet_wrap_nil() : s->extrav[index];
  ------------------
  |  |  831|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (28709:29): [True: 0, False: 0]
  ------------------
28710|      0|            pushcap(s, capture, rule[2]);
28711|      0|            return text;
28712|      5|        }
28713|       |
28714|      0|        case RULE_CONSTANT: {
  ------------------
  |  Branch (28714:9): [True: 0, False: 178M]
  ------------------
28715|      0|            pushcap(s, s->constants[rule[1]], rule[2]);
28716|      0|            return text;
28717|      5|        }
28718|       |
28719|  10.5M|        case RULE_CAPTURE: {
  ------------------
  |  Branch (28719:9): [True: 10.5M, False: 168M]
  ------------------
28720|  10.5M|            down1(s);
  ------------------
  |  |28450|  10.5M|#define down1(s) do { \
  |  |28451|  10.5M|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28451:9): [True: 0, False: 10.5M]
  |  |  ------------------
  |  |28452|  10.5M|} while (0)
  |  |  ------------------
  |  |  |  Branch (28452:10): [Folded, False: 10.5M]
  |  |  ------------------
  ------------------
28721|  10.5M|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
28722|  10.5M|            up1(s);
  ------------------
  |  |28453|  10.5M|#define up1(s) ((s)->depth++)
  ------------------
28723|  10.5M|            if (!result) return NULL;
  ------------------
  |  Branch (28723:17): [True: 23.1k, False: 10.5M]
  ------------------
28724|       |            /* Specialized pushcap - avoid intermediate string creation */
28725|  10.5M|            if (!s->has_backref && s->mode == PEG_MODE_ACCUMULATE) {
  ------------------
  |  Branch (28725:17): [True: 10.5M, False: 27]
  |  Branch (28725:36): [True: 5.44k, False: 10.5M]
  ------------------
28726|  5.44k|                janet_buffer_push_bytes(s->scratch, text, (int32_t)(result - text));
28727|  10.5M|            } else {
28728|  10.5M|                uint32_t tag = rule[2];
28729|  10.5M|                pushcap(s, janet_stringv(text, (int32_t)(result - text)), tag);
  ------------------
  |  | 1827|  10.5M|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  848|  10.5M|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  10.5M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  10.5M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  10.5M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28730|  10.5M|            }
28731|  10.5M|            return result;
28732|  10.5M|        }
28733|       |
28734|      0|        case RULE_CAPTURE_NUM: {
  ------------------
  |  Branch (28734:9): [True: 0, False: 178M]
  ------------------
28735|      0|            down1(s);
  ------------------
  |  |28450|      0|#define down1(s) do { \
  |  |28451|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28451:9): [True: 0, False: 0]
  |  |  ------------------
  |  |28452|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (28452:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
28736|      0|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
28737|      0|            up1(s);
  ------------------
  |  |28453|      0|#define up1(s) ((s)->depth++)
  ------------------
28738|      0|            if (!result) return NULL;
  ------------------
  |  Branch (28738:17): [True: 0, False: 0]
  ------------------
28739|       |            /* check number parsing */
28740|      0|            double x = 0.0;
28741|      0|            int32_t base = (int32_t) rule[2];
28742|      0|            if (janet_scan_number_base(text, (int32_t)(result - text), base, &x)) return NULL;
  ------------------
  |  Branch (28742:17): [True: 0, False: 0]
  ------------------
28743|       |            /* Specialized pushcap - avoid intermediate string creation */
28744|      0|            if (!s->has_backref && s->mode == PEG_MODE_ACCUMULATE) {
  ------------------
  |  Branch (28744:17): [True: 0, False: 0]
  |  Branch (28744:36): [True: 0, False: 0]
  ------------------
28745|      0|                janet_buffer_push_bytes(s->scratch, text, (int32_t)(result - text));
28746|      0|            } else {
28747|      0|                uint32_t tag = rule[3];
28748|      0|                pushcap(s, janet_wrap_number(x), tag);
  ------------------
  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
28749|      0|            }
28750|      0|            return result;
28751|      0|        }
28752|       |
28753|  1.05k|        case RULE_ACCUMULATE: {
  ------------------
  |  Branch (28753:9): [True: 1.05k, False: 178M]
  ------------------
28754|  1.05k|            uint32_t tag = rule[2];
28755|  1.05k|            int oldmode = s->mode;
28756|  1.05k|            if (!tag && oldmode == PEG_MODE_ACCUMULATE) {
  ------------------
  |  Branch (28756:17): [True: 1.03k, False: 19]
  |  Branch (28756:25): [True: 1, False: 1.03k]
  ------------------
28757|      1|                rule = s->bytecode + rule[1];
28758|      1|                goto tail;
28759|      1|            }
28760|  1.05k|            CapState cs = cap_save(s);
28761|  1.05k|            s->mode = PEG_MODE_ACCUMULATE;
28762|  1.05k|            down1(s);
  ------------------
  |  |28450|  1.05k|#define down1(s) do { \
  |  |28451|  1.05k|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28451:9): [True: 0, False: 1.05k]
  |  |  ------------------
  |  |28452|  1.05k|} while (0)
  |  |  ------------------
  |  |  |  Branch (28452:10): [Folded, False: 1.05k]
  |  |  ------------------
  ------------------
28763|  1.05k|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
28764|  1.05k|            up1(s);
  ------------------
  |  |28453|  1.05k|#define up1(s) ((s)->depth++)
  ------------------
28765|  1.05k|            s->mode = oldmode;
28766|  1.05k|            if (!result) return NULL;
  ------------------
  |  Branch (28766:17): [True: 403, False: 647]
  ------------------
28767|    647|            Janet cap = janet_stringv(s->scratch->data + cs.scratch,
  ------------------
  |  | 1827|    647|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  848|    647|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|    647|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|    647|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|    647|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28768|    647|                                      s->scratch->count - cs.scratch);
28769|    647|            cap_load_keept(s, cs);
28770|    647|            pushcap(s, cap, tag);
28771|    647|            return result;
28772|  1.05k|        }
28773|       |
28774|      0|        case RULE_DROP: {
  ------------------
  |  Branch (28774:9): [True: 0, False: 178M]
  ------------------
28775|      0|            CapState cs = cap_save(s);
28776|      0|            down1(s);
  ------------------
  |  |28450|      0|#define down1(s) do { \
  |  |28451|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28451:9): [True: 0, False: 0]
  |  |  ------------------
  |  |28452|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (28452:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
28777|      0|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
28778|      0|            up1(s);
  ------------------
  |  |28453|      0|#define up1(s) ((s)->depth++)
  ------------------
28779|      0|            if (!result) return NULL;
  ------------------
  |  Branch (28779:17): [True: 0, False: 0]
  ------------------
28780|      0|            cap_load(s, cs);
28781|      0|            return result;
28782|      0|        }
28783|       |
28784|      0|        case RULE_ONLY_TAGS: {
  ------------------
  |  Branch (28784:9): [True: 0, False: 178M]
  ------------------
28785|      0|            CapState cs = cap_save(s);
28786|      0|            down1(s);
  ------------------
  |  |28450|      0|#define down1(s) do { \
  |  |28451|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28451:9): [True: 0, False: 0]
  |  |  ------------------
  |  |28452|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (28452:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
28787|      0|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
28788|      0|            up1(s);
  ------------------
  |  |28453|      0|#define up1(s) ((s)->depth++)
  ------------------
28789|      0|            if (!result) return NULL;
  ------------------
  |  Branch (28789:17): [True: 0, False: 0]
  ------------------
28790|      0|            cap_load_keept(s, cs);
28791|      0|            return result;
28792|      0|        }
28793|       |
28794|      0|        case RULE_GROUP: {
  ------------------
  |  Branch (28794:9): [True: 0, False: 178M]
  ------------------
28795|      0|            uint32_t tag = rule[2];
28796|      0|            int oldmode = s->mode;
28797|      0|            CapState cs = cap_save(s);
28798|      0|            s->mode = PEG_MODE_NORMAL;
28799|      0|            down1(s);
  ------------------
  |  |28450|      0|#define down1(s) do { \
  |  |28451|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28451:9): [True: 0, False: 0]
  |  |  ------------------
  |  |28452|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (28452:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
28800|      0|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
28801|      0|            up1(s);
  ------------------
  |  |28453|      0|#define up1(s) ((s)->depth++)
  ------------------
28802|      0|            s->mode = oldmode;
28803|      0|            if (!result) return NULL;
  ------------------
  |  Branch (28803:17): [True: 0, False: 0]
  ------------------
28804|      0|            int32_t num_sub_captures = s->captures->count - cs.cap;
28805|      0|            JanetArray *sub_captures = janet_array(num_sub_captures);
28806|      0|            safe_memcpy(sub_captures->data,
28807|      0|                        s->captures->data + cs.cap,
28808|      0|                        sizeof(Janet) * num_sub_captures);
28809|      0|            sub_captures->count = num_sub_captures;
28810|      0|            cap_load_keept(s, cs);
28811|      0|            pushcap(s, janet_wrap_array(sub_captures), tag);
  ------------------
  |  |  845|      0|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  825|      0|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28812|      0|            return result;
28813|      0|        }
28814|       |
28815|      0|        case RULE_NTH: {
  ------------------
  |  Branch (28815:9): [True: 0, False: 178M]
  ------------------
28816|      0|            uint32_t nth = rule[1];
28817|      0|            if (nth > INT32_MAX) nth = INT32_MAX;
  ------------------
  |  Branch (28817:17): [True: 0, False: 0]
  ------------------
28818|      0|            uint32_t tag = rule[3];
28819|      0|            int oldmode = s->mode;
28820|      0|            CapState cs = cap_save(s);
28821|      0|            s->mode = PEG_MODE_NORMAL;
28822|      0|            down1(s);
  ------------------
  |  |28450|      0|#define down1(s) do { \
  |  |28451|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28451:9): [True: 0, False: 0]
  |  |  ------------------
  |  |28452|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (28452:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
28823|      0|            const uint8_t *result = peg_rule(s, s->bytecode + rule[2], text);
28824|      0|            up1(s);
  ------------------
  |  |28453|      0|#define up1(s) ((s)->depth++)
  ------------------
28825|      0|            s->mode = oldmode;
28826|      0|            if (!result) return NULL;
  ------------------
  |  Branch (28826:17): [True: 0, False: 0]
  ------------------
28827|      0|            int32_t num_sub_captures = s->captures->count - cs.cap;
28828|      0|            Janet cap;
28829|      0|            if (num_sub_captures > (int32_t) nth) {
  ------------------
  |  Branch (28829:17): [True: 0, False: 0]
  ------------------
28830|      0|                cap = s->captures->data[cs.cap + nth];
28831|      0|            } else {
28832|      0|                return NULL;
28833|      0|            }
28834|      0|            cap_load_keept(s, cs);
28835|      0|            pushcap(s, cap, tag);
28836|      0|            return result;
28837|      0|        }
28838|       |
28839|      0|        case RULE_SUB: {
  ------------------
  |  Branch (28839:9): [True: 0, False: 178M]
  ------------------
28840|      0|            const uint8_t *text_start = text;
28841|      0|            const uint32_t *rule_window = s->bytecode + rule[1];
28842|      0|            const uint32_t *rule_subpattern = s->bytecode + rule[2];
28843|      0|            down1(s);
  ------------------
  |  |28450|      0|#define down1(s) do { \
  |  |28451|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28451:9): [True: 0, False: 0]
  |  |  ------------------
  |  |28452|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (28452:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
28844|      0|            const uint8_t *window_end = peg_rule(s, rule_window, text);
28845|      0|            up1(s);
  ------------------
  |  |28453|      0|#define up1(s) ((s)->depth++)
  ------------------
28846|      0|            if (!window_end) {
  ------------------
  |  Branch (28846:17): [True: 0, False: 0]
  ------------------
28847|      0|                return NULL;
28848|      0|            }
28849|      0|            const uint8_t *saved_end = s->text_end;
28850|      0|            s->text_end = window_end;
28851|      0|            down1(s);
  ------------------
  |  |28450|      0|#define down1(s) do { \
  |  |28451|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28451:9): [True: 0, False: 0]
  |  |  ------------------
  |  |28452|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (28452:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
28852|      0|            const uint8_t *next_text = peg_rule(s, rule_subpattern, text_start);
28853|      0|            up1(s);
  ------------------
  |  |28453|      0|#define up1(s) ((s)->depth++)
  ------------------
28854|      0|            s->text_end = saved_end;
28855|       |
28856|      0|            if (!next_text) {
  ------------------
  |  Branch (28856:17): [True: 0, False: 0]
  ------------------
28857|      0|                return NULL;
28858|      0|            }
28859|       |
28860|      0|            return window_end;
28861|      0|        }
28862|       |
28863|      0|        case RULE_TIL: {
  ------------------
  |  Branch (28863:9): [True: 0, False: 178M]
  ------------------
28864|      0|            const uint32_t *rule_terminus = s->bytecode + rule[1];
28865|      0|            const uint32_t *rule_subpattern = s->bytecode + rule[2];
28866|       |
28867|      0|            const uint8_t *terminus_start = text;
28868|      0|            const uint8_t *terminus_end = NULL;
28869|      0|            down1(s);
  ------------------
  |  |28450|      0|#define down1(s) do { \
  |  |28451|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28451:9): [True: 0, False: 0]
  |  |  ------------------
  |  |28452|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (28452:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
28870|      0|            while (terminus_start <= s->text_end) {
  ------------------
  |  Branch (28870:20): [True: 0, False: 0]
  ------------------
28871|      0|                CapState cs2 = cap_save(s);
28872|      0|                terminus_end = peg_rule(s, rule_terminus, terminus_start);
28873|      0|                cap_load(s, cs2);
28874|      0|                if (terminus_end) {
  ------------------
  |  Branch (28874:21): [True: 0, False: 0]
  ------------------
28875|      0|                    break;
28876|      0|                }
28877|      0|                terminus_start++;
28878|      0|            }
28879|      0|            up1(s);
  ------------------
  |  |28453|      0|#define up1(s) ((s)->depth++)
  ------------------
28880|       |
28881|      0|            if (!terminus_end) {
  ------------------
  |  Branch (28881:17): [True: 0, False: 0]
  ------------------
28882|      0|                return NULL;
28883|      0|            }
28884|       |
28885|      0|            const uint8_t *saved_end = s->text_end;
28886|      0|            s->text_end = terminus_start;
28887|      0|            down1(s);
  ------------------
  |  |28450|      0|#define down1(s) do { \
  |  |28451|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28451:9): [True: 0, False: 0]
  |  |  ------------------
  |  |28452|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (28452:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
28888|      0|            const uint8_t *matched = peg_rule(s, rule_subpattern, text);
28889|      0|            up1(s);
  ------------------
  |  |28453|      0|#define up1(s) ((s)->depth++)
  ------------------
28890|      0|            s->text_end = saved_end;
28891|       |
28892|      0|            if (!matched) {
  ------------------
  |  Branch (28892:17): [True: 0, False: 0]
  ------------------
28893|      0|                return NULL;
28894|      0|            }
28895|       |
28896|      0|            return terminus_end;
28897|      0|        }
28898|       |
28899|      0|        case RULE_SPLIT: {
  ------------------
  |  Branch (28899:9): [True: 0, False: 178M]
  ------------------
28900|      0|            const uint8_t *saved_end = s->text_end;
28901|      0|            const uint32_t *rule_separator = s->bytecode + rule[1];
28902|      0|            const uint32_t *rule_subpattern = s->bytecode + rule[2];
28903|       |
28904|      0|            const uint8_t *chunk_start = text;
28905|      0|            const uint8_t *chunk_end = NULL;
28906|       |
28907|      0|            while (text <= saved_end) {
  ------------------
  |  Branch (28907:20): [True: 0, False: 0]
  ------------------
28908|       |                /* Find next split (or end of text) */
28909|      0|                CapState cs = cap_save(s);
28910|      0|                down1(s);
  ------------------
  |  |28450|      0|#define down1(s) do { \
  |  |28451|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28451:9): [True: 0, False: 0]
  |  |  ------------------
  |  |28452|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (28452:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
28911|      0|                while (text <= saved_end) {
  ------------------
  |  Branch (28911:24): [True: 0, False: 0]
  ------------------
28912|      0|                    chunk_end = text;
28913|      0|                    const uint8_t *check = peg_rule(s, rule_separator, text);
28914|      0|                    cap_load(s, cs);
28915|      0|                    if (check) {
  ------------------
  |  Branch (28915:25): [True: 0, False: 0]
  ------------------
28916|      0|                        text = check;
28917|      0|                        break;
28918|      0|                    }
28919|      0|                    text++;
28920|      0|                }
28921|      0|                up1(s);
  ------------------
  |  |28453|      0|#define up1(s) ((s)->depth++)
  ------------------
28922|       |
28923|       |                /* Match between splits */
28924|      0|                s->text_end = chunk_end;
28925|      0|                down1(s);
  ------------------
  |  |28450|      0|#define down1(s) do { \
  |  |28451|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28451:9): [True: 0, False: 0]
  |  |  ------------------
  |  |28452|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (28452:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
28926|      0|                const uint8_t *subpattern_end = peg_rule(s, rule_subpattern, chunk_start);
28927|      0|                up1(s);
  ------------------
  |  |28453|      0|#define up1(s) ((s)->depth++)
  ------------------
28928|      0|                s->text_end = saved_end;
28929|      0|                if (!subpattern_end) return NULL; /* Don't match anything */
  ------------------
  |  Branch (28929:21): [True: 0, False: 0]
  ------------------
28930|       |
28931|       |                /* Ensure forward progress */
28932|      0|                if (text == chunk_start) return NULL;
  ------------------
  |  Branch (28932:21): [True: 0, False: 0]
  ------------------
28933|      0|                chunk_start = text;
28934|      0|            }
28935|       |
28936|      0|            s->text_end = saved_end;
28937|      0|            return s->text_end;
28938|      0|        }
28939|       |
28940|  1.96k|        case RULE_REPLACE:
  ------------------
  |  Branch (28940:9): [True: 1.96k, False: 178M]
  ------------------
28941|  1.96k|        case RULE_MATCHSPLICE:
  ------------------
  |  Branch (28941:9): [True: 0, False: 178M]
  ------------------
28942|  1.96k|        case RULE_MATCHTIME: {
  ------------------
  |  Branch (28942:9): [True: 0, False: 178M]
  ------------------
28943|  1.96k|            uint32_t tag = rule[3];
28944|  1.96k|            int oldmode = s->mode;
28945|  1.96k|            CapState cs = cap_save(s);
28946|  1.96k|            s->mode = PEG_MODE_NORMAL;
28947|  1.96k|            down1(s);
  ------------------
  |  |28450|  1.96k|#define down1(s) do { \
  |  |28451|  1.96k|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28451:9): [True: 0, False: 1.96k]
  |  |  ------------------
  |  |28452|  1.96k|} while (0)
  |  |  ------------------
  |  |  |  Branch (28452:10): [Folded, False: 1.96k]
  |  |  ------------------
  ------------------
28948|  1.96k|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
28949|  1.96k|            up1(s);
  ------------------
  |  |28453|  1.96k|#define up1(s) ((s)->depth++)
  ------------------
28950|  1.96k|            s->mode = oldmode;
28951|  1.96k|            if (!result) return NULL;
  ------------------
  |  Branch (28951:17): [True: 275, False: 1.68k]
  ------------------
28952|       |
28953|  1.68k|            Janet cap = janet_wrap_nil();
  ------------------
  |  |  831|  1.68k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  1.68k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.68k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.68k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28954|  1.68k|            Janet constant = s->constants[rule[2]];
28955|  1.68k|            switch (janet_type(constant)) {
  ------------------
  |  |  795|  1.68k|    (isnan((x).number) \
  |  |  796|  1.68k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  1.68k|        : JANET_NUMBER)
  ------------------
  |  Branch (28955:21): [True: 1.34k, False: 340]
  ------------------
28956|  1.68k|                default:
  ------------------
  |  Branch (28956:17): [True: 1.68k, False: 2]
  ------------------
28957|  1.68k|                    cap = constant;
28958|  1.68k|                    break;
28959|      2|                case JANET_STRUCT:
  ------------------
  |  Branch (28959:17): [True: 2, False: 1.68k]
  ------------------
28960|      2|                    if (s->captures->count) {
  ------------------
  |  Branch (28960:25): [True: 1, False: 1]
  ------------------
28961|      1|                        cap = janet_struct_get(janet_unwrap_struct(constant),
  ------------------
  |  |  857|      1|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
28962|      1|                                               s->captures->data[s->captures->count - 1]);
28963|      1|                    }
28964|      2|                    break;
28965|      0|                case JANET_TABLE:
  ------------------
  |  Branch (28965:17): [True: 0, False: 1.68k]
  ------------------
28966|      0|                    if (s->captures->count) {
  ------------------
  |  Branch (28966:25): [True: 0, False: 0]
  ------------------
28967|      0|                        cap = janet_table_get(janet_unwrap_table(constant),
  ------------------
  |  |  861|      0|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
28968|      0|                                              s->captures->data[s->captures->count - 1]);
28969|      0|                    }
28970|      0|                    break;
28971|      0|                case JANET_CFUNCTION:
  ------------------
  |  Branch (28971:17): [True: 0, False: 1.68k]
  ------------------
28972|      0|                    cap = janet_unwrap_cfunction(constant)(s->captures->count - cs.cap,
  ------------------
  |  |  869|      0|#define janet_unwrap_cfunction(x) ((JanetCFunction)janet_nanbox_to_pointer(x))
  ------------------
28973|      0|                                                           s->captures->data + cs.cap);
28974|      0|                    break;
28975|      0|                case JANET_FUNCTION:
  ------------------
  |  Branch (28975:17): [True: 0, False: 1.68k]
  ------------------
28976|      0|                    cap = janet_call(janet_unwrap_function(constant),
  ------------------
  |  |  868|      0|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
28977|      0|                                     s->captures->count - cs.cap,
28978|      0|                                     s->captures->data + cs.cap);
28979|      0|                    break;
28980|  1.68k|            }
28981|  1.68k|            cap_load_keept(s, cs);
28982|  1.68k|            if (rule[0] != RULE_REPLACE && !janet_truthy(cap)) return NULL; /* matchtime or matchtime flatten */
  ------------------
  |  |  818|      0|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  806|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  807|      0|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (818:6): [True: 0, False: 0]
  |  |  ------------------
  |  |  819|      0|     (!janet_checktype((x), JANET_BOOLEAN) || ((x).u64 & 0x1)))
  |  |  ------------------
  |  |  |  |  806|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  807|      0|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (819:7): [True: 0, False: 0]
  |  |  |  Branch (819:47): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (28982:17): [True: 0, False: 1.68k]
  ------------------
28983|  1.68k|            const Janet *elements = NULL;
28984|  1.68k|            int32_t len = 0;
28985|  1.68k|            if ((rule[0] == RULE_MATCHSPLICE) && janet_indexed_view(cap, &elements, &len)) {
  ------------------
  |  Branch (28985:17): [True: 0, False: 1.68k]
  |  Branch (28985:50): [True: 0, False: 0]
  ------------------
28986|       |                /* unpack and flatten capture */
28987|      0|                for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (28987:37): [True: 0, False: 0]
  ------------------
28988|      0|                    pushcap(s, elements[i], tag);
28989|      0|                }
28990|  1.68k|            } else {
28991|  1.68k|                pushcap(s, cap, tag);
28992|  1.68k|            }
28993|  1.68k|            return result;
28994|  1.68k|        }
28995|       |
28996|     18|        case RULE_ERROR: {
  ------------------
  |  Branch (28996:9): [True: 18, False: 178M]
  ------------------
28997|     18|            int oldmode = s->mode;
28998|     18|            s->mode = PEG_MODE_NORMAL;
28999|     18|            int32_t old_cap = s->captures->count;
29000|     18|            down1(s);
  ------------------
  |  |28450|     18|#define down1(s) do { \
  |  |28451|     18|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28451:9): [True: 0, False: 18]
  |  |  ------------------
  |  |28452|     18|} while (0)
  |  |  ------------------
  |  |  |  Branch (28452:10): [Folded, False: 18]
  |  |  ------------------
  ------------------
29001|     18|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
29002|     18|            up1(s);
  ------------------
  |  |28453|     18|#define up1(s) ((s)->depth++)
  ------------------
29003|     18|            s->mode = oldmode;
29004|     18|            if (!result) return NULL;
  ------------------
  |  Branch (29004:17): [True: 3, False: 15]
  ------------------
29005|     15|            if (s->captures->count > old_cap) {
  ------------------
  |  Branch (29005:17): [True: 1, False: 14]
  ------------------
29006|       |                /* Throw last capture */
29007|      1|                janet_panicv(s->captures->data[s->captures->count - 1]);
29008|     14|            } else {
29009|       |                /* Throw generic error */
29010|     14|                int32_t start = (int32_t)(text - s->text_start);
29011|     14|                LineCol lc = get_linecol_from_position(s, start);
29012|     14|                janet_panicf("match error at line %d, column %d", lc.line, lc.col);
29013|     14|            }
29014|      0|            return NULL;
29015|     15|        }
29016|       |
29017|      0|        case RULE_BACKMATCH: {
  ------------------
  |  Branch (29017:9): [True: 0, False: 178M]
  ------------------
29018|      0|            uint32_t search = rule[1];
29019|      0|            for (int32_t i = s->tags->count - 1; i >= 0; i--) {
  ------------------
  |  Branch (29019:50): [True: 0, False: 0]
  ------------------
29020|      0|                if (s->tags->data[i] == search) {
  ------------------
  |  Branch (29020:21): [True: 0, False: 0]
  ------------------
29021|      0|                    Janet capture = s->tagged_captures->data[i];
29022|      0|                    if (!janet_checktype(capture, JANET_STRING))
  ------------------
  |  |  806|      0|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 0]
  |  |  ------------------
  |  |  807|      0|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (29022:25): [True: 0, False: 0]
  ------------------
29023|      0|                        return NULL;
29024|      0|                    const uint8_t *bytes = janet_unwrap_string(capture);
  ------------------
  |  |  863|      0|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
29025|      0|                    int32_t len = janet_string_length(bytes);
  ------------------
  |  | 1813|      0|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|      0|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
29026|      0|                    if (text + len > s->text_end)
  ------------------
  |  Branch (29026:25): [True: 0, False: 0]
  ------------------
29027|      0|                        return NULL;
29028|      0|                    return memcmp(text, bytes, len) ? NULL : text + len;
  ------------------
  |  Branch (29028:28): [True: 0, False: 0]
  ------------------
29029|      0|                }
29030|      0|            }
29031|      0|            return NULL;
29032|      0|        }
29033|       |
29034|      0|        case RULE_LENPREFIX: {
  ------------------
  |  Branch (29034:9): [True: 0, False: 178M]
  ------------------
29035|      0|            int oldmode = s->mode;
29036|      0|            s->mode = PEG_MODE_NORMAL;
29037|      0|            const uint8_t *next_text;
29038|      0|            CapState cs = cap_save(s);
29039|      0|            down1(s);
  ------------------
  |  |28450|      0|#define down1(s) do { \
  |  |28451|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28451:9): [True: 0, False: 0]
  |  |  ------------------
  |  |28452|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (28452:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
29040|      0|            next_text = peg_rule(s, s->bytecode + rule[1], text);
29041|      0|            up1(s);
  ------------------
  |  |28453|      0|#define up1(s) ((s)->depth++)
  ------------------
29042|      0|            if (NULL == next_text) return NULL;
  ------------------
  |  Branch (29042:17): [True: 0, False: 0]
  ------------------
29043|      0|            s->mode = oldmode;
29044|      0|            int32_t num_sub_captures = s->captures->count - cs.cap;
29045|      0|            Janet lencap;
29046|      0|            if (num_sub_captures <= 0 ||
  ------------------
  |  Branch (29046:17): [True: 0, False: 0]
  ------------------
29047|      0|                    (lencap = s->captures->data[cs.cap], !janet_checkint(lencap))) {
  ------------------
  |  Branch (29047:21): [True: 0, False: 0]
  ------------------
29048|      0|                cap_load(s, cs);
29049|      0|                return NULL;
29050|      0|            }
29051|      0|            int32_t nrep = janet_unwrap_integer(lencap);
  ------------------
  |  |  966|      0|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  839|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
29052|       |            /* drop captures from len pattern */
29053|      0|            cap_load(s, cs);
29054|      0|            for (int32_t i = 0; i < nrep; i++) {
  ------------------
  |  Branch (29054:33): [True: 0, False: 0]
  ------------------
29055|      0|                down1(s);
  ------------------
  |  |28450|      0|#define down1(s) do { \
  |  |28451|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28451:9): [True: 0, False: 0]
  |  |  ------------------
  |  |28452|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (28452:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
29056|      0|                next_text = peg_rule(s, s->bytecode + rule[2], next_text);
29057|      0|                up1(s);
  ------------------
  |  |28453|      0|#define up1(s) ((s)->depth++)
  ------------------
29058|      0|                if (NULL == next_text) {
  ------------------
  |  Branch (29058:21): [True: 0, False: 0]
  ------------------
29059|      0|                    cap_load(s, cs);
29060|      0|                    return NULL;
29061|      0|                }
29062|      0|            }
29063|      0|            return next_text;
29064|      0|        }
29065|       |
29066|     12|        case RULE_READINT: {
  ------------------
  |  Branch (29066:9): [True: 12, False: 178M]
  ------------------
29067|     12|            uint32_t tag = rule[2];
29068|     12|            uint32_t signedness = rule[1] & 0x10;
29069|     12|            uint32_t endianness = rule[1] & 0x20;
29070|     12|            int width = (int)(rule[1] & 0xF);
29071|     12|            if (text + width > s->text_end) return NULL;
  ------------------
  |  Branch (29071:17): [True: 3, False: 9]
  ------------------
29072|      9|            uint64_t accum = 0;
29073|      9|            if (endianness) {
  ------------------
  |  Branch (29073:17): [True: 0, False: 9]
  ------------------
29074|       |                /* BE */
29075|      0|                for (int i = 0; i < width; i++) accum = (accum << 8) | text[i];
  ------------------
  |  Branch (29075:33): [True: 0, False: 0]
  ------------------
29076|      9|            } else {
29077|       |                /* LE */
29078|     41|                for (int i = width - 1; i >= 0; i--) accum = (accum << 8) | text[i];
  ------------------
  |  Branch (29078:41): [True: 32, False: 9]
  ------------------
29079|      9|            }
29080|       |
29081|      9|            Janet capture_value;
29082|       |            /* We can only parse integeres of greater than 6 bytes reliable if int-types are enabled.
29083|       |             * Otherwise, we may lose precision, so 6 is the maximum size when int-types are disabled. */
29084|      9|#ifdef JANET_INT_TYPES
29085|      9|            if (width > 6) {
  ------------------
  |  Branch (29085:17): [True: 2, False: 7]
  ------------------
29086|      2|                if (signedness) {
  ------------------
  |  Branch (29086:21): [True: 1, False: 1]
  ------------------
29087|      1|                    capture_value = janet_wrap_s64(peg_convert_u64_s64(accum, width));
29088|      1|                } else {
29089|      1|                    capture_value = janet_wrap_u64(accum);
29090|      1|                }
29091|      2|            } else
29092|      7|#endif
29093|      7|            {
29094|      7|                double double_value;
29095|      7|                if (signedness) {
  ------------------
  |  Branch (29095:21): [True: 6, False: 1]
  ------------------
29096|      6|                    double_value = (double)(peg_convert_u64_s64(accum, width));
29097|      6|                } else {
29098|      1|                    double_value = (double)accum;
29099|      1|                }
29100|      7|                capture_value = janet_wrap_number(double_value);
  ------------------
  |  |  835|      7|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
29101|      7|            }
29102|       |
29103|      9|            pushcap(s, capture_value, tag);
29104|      9|            return text + width;
29105|     12|        }
29106|       |
29107|      0|        case RULE_UNREF: {
  ------------------
  |  Branch (29107:9): [True: 0, False: 178M]
  ------------------
29108|      0|            int32_t tcap = s->tags->count;
29109|      0|            down1(s);
  ------------------
  |  |28450|      0|#define down1(s) do { \
  |  |28451|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28451:9): [True: 0, False: 0]
  |  |  ------------------
  |  |28452|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (28452:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
29110|      0|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
29111|      0|            up1(s);
  ------------------
  |  |28453|      0|#define up1(s) ((s)->depth++)
  ------------------
29112|      0|            if (!result) return NULL;
  ------------------
  |  Branch (29112:17): [True: 0, False: 0]
  ------------------
29113|      0|            int32_t final_tcap = s->tags->count;
29114|       |            /* Truncate tagged captures to not include items of the given tag */
29115|      0|            int32_t w = tcap;
29116|       |            /* If no tag is given, drop ALL tagged captures */
29117|      0|            if (rule[2]) {
  ------------------
  |  Branch (29117:17): [True: 0, False: 0]
  ------------------
29118|      0|                for (int32_t i = tcap; i < final_tcap; i++) {
  ------------------
  |  Branch (29118:40): [True: 0, False: 0]
  ------------------
29119|      0|                    if (s->tags->data[i] != (0xFF & rule[2])) {
  ------------------
  |  Branch (29119:25): [True: 0, False: 0]
  ------------------
29120|      0|                        s->tags->data[w] = s->tags->data[i];
29121|      0|                        s->tagged_captures->data[w] = s->tagged_captures->data[i];
29122|      0|                        w++;
29123|      0|                    }
29124|      0|                }
29125|      0|            }
29126|      0|            s->tags->count = w;
29127|      0|            s->tagged_captures->count = w;
29128|      0|            return result;
29129|      0|        }
29130|       |
29131|   178M|    }
29132|   178M|}
janet.c:cap_save:
28355|   167M|static CapState cap_save(PegState *s) {
28356|   167M|    CapState cs;
28357|   167M|    cs.scratch = s->scratch->count;
28358|   167M|    cs.cap = s->captures->count;
28359|   167M|    cs.tcap = s->tagged_captures->count;
28360|   167M|    return cs;
28361|   167M|}
janet.c:cap_load:
28364|  24.6k|static void cap_load(PegState *s, CapState cs) {
28365|  24.6k|    s->scratch->count = cs.scratch;
28366|  24.6k|    s->captures->count = cs.cap;
28367|  24.6k|    s->tags->count = cs.tcap;
28368|  24.6k|    s->tagged_captures->count = cs.tcap;
28369|  24.6k|}
janet.c:pushcap:
28379|  25.5M|static void pushcap(PegState *s, Janet capture, uint32_t tag) {
28380|  25.5M|    if (s->mode == PEG_MODE_ACCUMULATE) {
  ------------------
  |  Branch (28380:9): [True: 1.15k, False: 25.5M]
  ------------------
28381|  1.15k|        janet_to_string_b(s->scratch, capture);
28382|  1.15k|    }
28383|  25.5M|    if (s->mode == PEG_MODE_NORMAL) {
  ------------------
  |  Branch (28383:9): [True: 25.5M, False: 1.15k]
  ------------------
28384|  25.5M|        janet_array_push(s->captures, capture);
28385|  25.5M|    }
28386|  25.5M|    if (s->has_backref) {
  ------------------
  |  Branch (28386:9): [True: 0, False: 25.5M]
  ------------------
28387|      0|        janet_array_push(s->tagged_captures, capture);
28388|      0|        janet_buffer_push_u8(s->tags, tag);
28389|      0|    }
28390|  25.5M|}
janet.c:get_linecol_from_position:
28398|    100|static LineCol get_linecol_from_position(PegState *s, int32_t position) {
28399|       |    /* Generate if not made yet */
28400|    100|    if (s->linemaplen < 0) {
  ------------------
  |  Branch (28400:9): [True: 99, False: 1]
  ------------------
28401|     99|        int32_t newline_count = 0;
28402|  4.93M|        for (const uint8_t *c = s->text_start; c < s->outer_text_end; c++) {
  ------------------
  |  Branch (28402:48): [True: 4.92M, False: 99]
  ------------------
28403|  4.92M|            if (*c == '\n') newline_count++;
  ------------------
  |  Branch (28403:17): [True: 1.18M, False: 3.74M]
  ------------------
28404|  4.92M|        }
28405|     99|        int32_t *mem = janet_smalloc(sizeof(int32_t) * newline_count);
28406|     99|        size_t index = 0;
28407|  4.93M|        for (const uint8_t *c = s->text_start; c < s->outer_text_end; c++) {
  ------------------
  |  Branch (28407:48): [True: 4.92M, False: 99]
  ------------------
28408|  4.92M|            if (*c == '\n') mem[index++] = (int32_t)(c - s->text_start);
  ------------------
  |  Branch (28408:17): [True: 1.18M, False: 3.74M]
  ------------------
28409|  4.92M|        }
28410|     99|        s->linemaplen = newline_count;
28411|     99|        s->linemap = mem;
28412|     99|    }
28413|       |    /* Do binary search for line. Slightly modified from classic binary search:
28414|       |     * - if we find that our current character is a line break, just return immediately.
28415|       |     *   a newline character is consider to be on the same line as the character before
28416|       |     *   (\n is line terminator, not line separator).
28417|       |     * - in the not-found case, we still want to find the greatest-indexed newline that
28418|       |     *   is before position. we use that to calculate the line and column.
28419|       |     * - in the case that lo = 0 and s->linemap[0] is still greater than position, we
28420|       |     *   are on the first line and our column is position + 1. */
28421|    100|    int32_t hi = s->linemaplen; /* hi is greater than the actual line */
28422|    100|    int32_t lo = 0; /* lo is less than or equal to the actual line */
28423|    100|    LineCol ret;
28424|    432|    while (lo + 1 < hi) {
  ------------------
  |  Branch (28424:12): [True: 332, False: 100]
  ------------------
28425|    332|        int32_t mid = lo + (hi - lo) / 2;
28426|    332|        if (s->linemap[mid] >= position) {
  ------------------
  |  Branch (28426:13): [True: 332, False: 0]
  ------------------
28427|    332|            hi = mid;
28428|    332|        } else {
28429|      0|            lo = mid;
28430|      0|        }
28431|    332|    }
28432|       |    /* first line case */
28433|    100|    if (s->linemaplen == 0 || (lo == 0 && s->linemap[0] >= position)) {
  ------------------
  |  Branch (28433:9): [True: 17, False: 83]
  |  Branch (28433:32): [True: 83, False: 0]
  |  Branch (28433:43): [True: 83, False: 0]
  ------------------
28434|    100|        ret.line = 1;
28435|    100|        ret.col = position + 1;
28436|    100|    } else {
28437|      0|        ret.line = lo + 2;
28438|      0|        ret.col = position - s->linemap[lo];
28439|      0|    }
28440|    100|    return ret;
28441|    100|}
janet.c:cap_load_keept:
28373|  2.33k|static void cap_load_keept(PegState *s, CapState cs) {
28374|  2.33k|    s->scratch->count = cs.scratch;
28375|  2.33k|    s->captures->count = cs.cap;
28376|  2.33k|}
janet.c:peg_convert_u64_s64:
28444|      7|static int64_t peg_convert_u64_s64(uint64_t from, int width) {
28445|      7|    int shift = 8 * (8 - width);
28446|      7|    return ((int64_t)(from << shift)) >> shift;
28447|      7|}
janet.c:number_to_string_b:
30441|  3.59k|static void number_to_string_b(JanetBuffer *buffer, double x) {
30442|  3.59k|    janet_buffer_extra(buffer, BUFSIZE);
  ------------------
  |  |30435|  3.59k|#define BUFSIZE 64
  ------------------
30443|  3.59k|    const char *fmt = (x == floor(x) &&
  ------------------
  |  Branch (30443:24): [True: 2.98k, False: 611]
  ------------------
30444|  2.98k|                       x <= JANET_INTMAX_DOUBLE &&
  ------------------
  |  |  165|  6.58k|#define JANET_INTMAX_DOUBLE 9007199254740992.0
  ------------------
  |  Branch (30444:24): [True: 2.59k, False: 395]
  ------------------
30445|  2.59k|                       x >= JANET_INTMIN_DOUBLE) ? "%.0f" : ("%." STR(DBL_DIG) "g");
  ------------------
  |  |  166|  2.59k|#define JANET_INTMIN_DOUBLE (-9007199254740992.0)
  ------------------
  |  Branch (30445:24): [True: 2.50k, False: 85]
  ------------------
30446|  3.59k|    int count;
30447|  3.59k|    if (x == 0.0) {
  ------------------
  |  Branch (30447:9): [True: 493, False: 3.10k]
  ------------------
30448|       |        /* Prevent printing of '-0' */
30449|    493|        count = 1;
30450|    493|        buffer->data[buffer->count] = '0';
30451|  3.10k|    } else {
30452|  3.10k|        count = snprintf((char *) buffer->data + buffer->count, BUFSIZE, fmt, x);
  ------------------
  |  |30435|  3.10k|#define BUFSIZE 64
  ------------------
30453|  3.10k|    }
30454|  3.59k|    buffer->count += count;
30455|  3.59k|}
janet.c:string_description_b:
30501|    170|static void string_description_b(JanetBuffer *buffer, const char *title, void *pointer) {
30502|    170|    janet_buffer_extra(buffer, BUFSIZE);
  ------------------
  |  |30435|    170|#define BUFSIZE 64
  ------------------
30503|    170|    uint8_t *c = buffer->data + buffer->count;
30504|    170|    int32_t i;
30505|    170|    union {
30506|    170|        uint8_t bytes[sizeof(void *)];
30507|    170|        void *p;
30508|    170|    } pbuf;
30509|       |
30510|    170|    pbuf.p = pointer;
30511|    170|    *c++ = '<';
30512|       |    /* Maximum of 32 bytes for abstract type name */
30513|  1.02k|    for (i = 0; i < 32 && title[i]; ++i)
  ------------------
  |  Branch (30513:17): [True: 1.02k, False: 0]
  |  Branch (30513:27): [True: 853, False: 170]
  ------------------
30514|    853|        *c++ = ((uint8_t *)title) [i];
30515|    170|    *c++ = ' ';
30516|    170|    *c++ = '0';
30517|    170|    *c++ = 'x';
30518|    170|#if defined(JANET_NANBOX_64)
30519|    170|#define POINTSIZE 6
30520|       |#else
30521|       |#define POINTSIZE (sizeof(void *))
30522|       |#endif
30523|  1.19k|    for (i = POINTSIZE; i > 0; --i) {
  ------------------
  |  |30519|    170|#define POINTSIZE 6
  ------------------
  |  Branch (30523:25): [True: 1.02k, False: 170]
  ------------------
30524|  1.02k|        uint8_t byte = pbuf.bytes[i - 1];
30525|  1.02k|        *c++ = HEX(byte >> 4);
  ------------------
  |  |30497|  1.02k|#define HEX(i) (((uint8_t *) janet_base64)[(i)])
  ------------------
30526|  1.02k|        *c++ = HEX(byte & 0xF);
  ------------------
  |  |30497|  1.02k|#define HEX(i) (((uint8_t *) janet_base64)[(i)])
  ------------------
30527|  1.02k|    }
30528|    170|    *c++ = '>';
30529|    170|    buffer->count = (int32_t)(c - buffer->data);
30530|    170|#undef POINTSIZE
30531|    170|}
janet.c:janet_escape_string_b:
30603|   139k|static void janet_escape_string_b(JanetBuffer *buffer, const uint8_t *str) {
30604|       |    janet_escape_string_impl(buffer, str, janet_string_length(str));
  ------------------
  |  | 1813|   139k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|   139k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
30605|   139k|}
janet.c:janet_escape_string_impl:
30533|   139k|static int janet_escape_string_impl(JanetBuffer *buffer, const uint8_t *str, int32_t len) {
30534|   139k|    janet_buffer_push_u8(buffer, '"');
30535|   139k|    int align = 1;
30536|   150k|    for (int32_t i = 0; i < len; ++i) {
  ------------------
  |  Branch (30536:25): [True: 11.0k, False: 139k]
  ------------------
30537|  11.0k|        uint8_t c = str[i];
30538|  11.0k|        switch (c) {
30539|    318|            case '"':
  ------------------
  |  Branch (30539:13): [True: 318, False: 10.7k]
  ------------------
30540|    318|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\\"", 2);
30541|    318|                align += 2;
30542|    318|                break;
30543|    328|            case '\n':
  ------------------
  |  Branch (30543:13): [True: 328, False: 10.7k]
  ------------------
30544|    328|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\n", 2);
30545|    328|                align += 2;
30546|    328|                break;
30547|    337|            case '\r':
  ------------------
  |  Branch (30547:13): [True: 337, False: 10.7k]
  ------------------
30548|    337|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\r", 2);
30549|    337|                align += 2;
30550|    337|                break;
30551|  1.25k|            case '\0':
  ------------------
  |  Branch (30551:13): [True: 1.25k, False: 9.83k]
  ------------------
30552|  1.25k|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\0", 2);
30553|  1.25k|                align += 2;
30554|  1.25k|                break;
30555|    295|            case '\f':
  ------------------
  |  Branch (30555:13): [True: 295, False: 10.7k]
  ------------------
30556|    295|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\f", 2);
30557|    295|                align += 2;
30558|    295|                break;
30559|    221|            case '\v':
  ------------------
  |  Branch (30559:13): [True: 221, False: 10.8k]
  ------------------
30560|    221|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\v", 2);
30561|    221|                align += 2;
30562|    221|                break;
30563|    326|            case '\a':
  ------------------
  |  Branch (30563:13): [True: 326, False: 10.7k]
  ------------------
30564|    326|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\a", 2);
30565|    326|                align += 2;
30566|    326|                break;
30567|    242|            case '\b':
  ------------------
  |  Branch (30567:13): [True: 242, False: 10.8k]
  ------------------
30568|    242|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\b", 2);
30569|    242|                align += 2;
30570|    242|                break;
30571|    286|            case 27:
  ------------------
  |  Branch (30571:13): [True: 286, False: 10.8k]
  ------------------
30572|    286|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\e", 2);
30573|    286|                align += 2;
30574|    286|                break;
30575|    291|            case '\\':
  ------------------
  |  Branch (30575:13): [True: 291, False: 10.8k]
  ------------------
30576|    291|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\\\", 2);
30577|    291|                align += 2;
30578|    291|                break;
30579|    317|            case '\t':
  ------------------
  |  Branch (30579:13): [True: 317, False: 10.7k]
  ------------------
30580|    317|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\t", 2);
30581|    317|                align += 2;
30582|    317|                break;
30583|  6.87k|            default:
  ------------------
  |  Branch (30583:13): [True: 6.87k, False: 4.21k]
  ------------------
30584|  6.87k|                if (c < 32 || c > 126) {
  ------------------
  |  Branch (30584:21): [True: 892, False: 5.98k]
  |  Branch (30584:31): [True: 2.73k, False: 3.24k]
  ------------------
30585|  3.62k|                    uint8_t buf[4];
30586|  3.62k|                    buf[0] = '\\';
30587|  3.62k|                    buf[1] = 'x';
30588|  3.62k|                    buf[2] = janet_base64[(c >> 4) & 0xF];
30589|  3.62k|                    buf[3] = janet_base64[c & 0xF];
30590|  3.62k|                    janet_buffer_push_bytes(buffer, buf, 4);
30591|  3.62k|                    align += 4;
30592|  3.62k|                } else {
30593|  3.24k|                    janet_buffer_push_u8(buffer, c);
30594|  3.24k|                    align++;
30595|  3.24k|                }
30596|  6.87k|                break;
30597|  11.0k|        }
30598|  11.0k|    }
30599|   139k|    janet_buffer_push_u8(buffer, '"');
30600|   139k|    return align + 1;
30601|   139k|}
janet.c:janet_escape_buffer_b:
30607|    149|static void janet_escape_buffer_b(JanetBuffer *buffer, JanetBuffer *bx) {
30608|    149|    if (bx == buffer) {
  ------------------
  |  Branch (30608:9): [True: 0, False: 149]
  ------------------
30609|       |        /* Ensures buffer won't resize while escaping */
30610|      0|        int64_t new_size = 6 * (int64_t) bx->count + 3;
30611|      0|        if (new_size > INT32_MAX) janet_panic("buffer overflow");
  ------------------
  |  Branch (30611:13): [True: 0, False: 0]
  ------------------
30612|      0|        janet_buffer_ensure(bx, (int32_t) new_size, 1);
30613|      0|    }
30614|    149|    janet_buffer_push_u8(buffer, '@');
30615|    149|    janet_escape_string_impl(buffer, bx->data, bx->count);
30616|    149|}
janet.c:janet_pretty_:
31230|   140k|                                  int flags, Janet x, int32_t startlen, int32_t lookback_barrier) {
31231|   140k|    struct pretty S;
31232|   140k|    if (NULL == buffer) {
  ------------------
  |  Branch (31232:9): [True: 0, False: 140k]
  ------------------
31233|      0|        buffer = janet_buffer(0);
31234|      0|    }
31235|   140k|    S.buffer = buffer;
31236|   140k|    S.depth = depth;
31237|   140k|    S.width = width;
31238|   140k|    S.align = 0;
31239|   140k|    S.flags = flags;
31240|   140k|    S.bufstartlen = startlen;
31241|   140k|    S.lookback_barrier = lookback_barrier;
31242|   140k|    S.keysort_capacity = 0;
31243|       |    S.keysort_buffer = NULL;
31244|   140k|    S.keysort_start = 0;
31245|   140k|    janet_table_init(&S.seen, 10);
31246|   140k|    janet_pretty_one(&S, x);
31247|   140k|    backtrack_newlines(&S);
31248|   140k|    janet_table_deinit(&S.seen);
31249|   140k|    return S.buffer;
31250|   140k|}
janet.c:janet_pretty_one:
30997|   191k|static void janet_pretty_one(struct pretty *S, Janet x) {
30998|       |    /* Add to seen */
30999|   191k|    switch (janet_type(x)) {
  ------------------
  |  |  795|   191k|    (isnan((x).number) \
  |  |  796|   191k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|   191k|        : JANET_NUMBER)
  ------------------
  |  Branch (30999:13): [True: 188k, False: 3.07k]
  ------------------
31000|     42|        case JANET_NIL:
  ------------------
  |  Branch (31000:9): [True: 42, False: 191k]
  ------------------
31001|  3.11k|        case JANET_NUMBER:
  ------------------
  |  Branch (31001:9): [True: 3.07k, False: 188k]
  ------------------
31002|  27.6k|        case JANET_SYMBOL:
  ------------------
  |  Branch (31002:9): [True: 24.4k, False: 167k]
  ------------------
31003|  27.6k|        case JANET_BOOLEAN:
  ------------------
  |  Branch (31003:9): [True: 70, False: 191k]
  ------------------
31004|  27.6k|            break;
31005|   164k|        default: {
  ------------------
  |  Branch (31005:9): [True: 164k, False: 27.6k]
  ------------------
31006|   164k|            Janet seenid = janet_table_get(&S->seen, x);
31007|   164k|            if (janet_checktype(seenid, JANET_NUMBER)) {
  ------------------
  |  |  806|   164k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 164k]
  |  |  |  Branch (806:6): [True: 164k, Folded]
  |  |  ------------------
  |  |  807|   164k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|   164k|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 164k]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 164k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   164k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31008|      0|                if (S->flags & JANET_PRETTY_COLOR) {
  ------------------
  |  | 1967|      0|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (31008:21): [True: 0, False: 0]
  ------------------
31009|      0|                    janet_buffer_push_cstring(S->buffer, janet_cycle_color);
31010|      0|                }
31011|      0|                janet_buffer_push_cstring(S->buffer, "<cycle ");
31012|      0|                S->align += 8 + integer_to_string_b(S->buffer, janet_unwrap_integer(seenid));
  ------------------
  |  |  966|      0|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  839|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
31013|      0|                janet_buffer_push_u8(S->buffer, '>');
31014|      0|                if (S->flags & JANET_PRETTY_COLOR) {
  ------------------
  |  | 1967|      0|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (31014:21): [True: 0, False: 0]
  ------------------
31015|      0|                    janet_buffer_push_cstring(S->buffer, "\x1B[0m");
31016|      0|                }
31017|      0|                return;
31018|   164k|            } else {
31019|   164k|                janet_table_put(&S->seen, x, janet_wrap_integer(S->seen.count));
  ------------------
  |  |  967|   164k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|   164k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
31020|   164k|                break;
31021|   164k|            }
31022|   164k|        }
31023|   191k|    }
31024|       |
31025|   191k|    switch (janet_type(x)) {
  ------------------
  |  |  795|   191k|    (isnan((x).number) \
  |  |  796|   191k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|   191k|        : JANET_NUMBER)
  ------------------
  |  Branch (31025:13): [True: 188k, False: 3.07k]
  ------------------
31026|   169k|        default: {
  ------------------
  |  Branch (31026:9): [True: 169k, False: 22.3k]
  ------------------
31027|   169k|            const char *color = janet_pretty_colors[janet_type(x)];
  ------------------
  |  |  795|   169k|    (isnan((x).number) \
  |  |  796|   169k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|   169k|        : JANET_NUMBER)
  ------------------
  |  Branch (31027:53): [True: 166k, False: 3.07k]
  ------------------
31028|   169k|            if (color && (S->flags & JANET_PRETTY_COLOR)) {
  ------------------
  |  | 1967|   169k|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (31028:17): [True: 169k, False: 0]
  |  Branch (31028:26): [True: 0, False: 169k]
  ------------------
31029|      0|                janet_buffer_push_cstring(S->buffer, color);
31030|      0|            }
31031|   169k|            if (janet_checktype(x, JANET_BUFFER) && janet_unwrap_buffer(x) == S->buffer) {
  ------------------
  |  |  806|   338k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 140, False: 169k]
  |  |  |  Branch (806:6): [Folded, False: 169k]
  |  |  ------------------
  |  |  807|   338k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   338k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   169k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   169k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   169k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   169k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                          if (janet_checktype(x, JANET_BUFFER) && janet_unwrap_buffer(x) == S->buffer) {
  ------------------
  |  |  862|    140|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (31031:53): [True: 0, False: 140]
  ------------------
31032|      0|                int64_t new_size = (int64_t) S->buffer->count + S->bufstartlen * 4 + 3;
31033|      0|                if (new_size > INT32_MAX) janet_panic("buffer overflow");
  ------------------
  |  Branch (31033:21): [True: 0, False: 0]
  ------------------
31034|      0|                janet_buffer_ensure(S->buffer, (int32_t) new_size, 1);
31035|      0|                janet_buffer_push_u8(S->buffer, '@');
31036|       |                /* Use start len to print to self better */
31037|      0|                S->align += 1 + janet_escape_string_impl(S->buffer, S->buffer->data, S->bufstartlen);
31038|   169k|            } else {
31039|   169k|                S->align -= S->buffer->count;
31040|   169k|                janet_description_b(S->buffer, x);
31041|   169k|                S->align += S->buffer->count;
31042|   169k|            }
31043|   169k|            if (color && (S->flags & JANET_PRETTY_COLOR)) {
  ------------------
  |  | 1967|   169k|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (31043:17): [True: 169k, False: 0]
  |  Branch (31043:26): [True: 0, False: 169k]
  ------------------
31044|      0|                janet_buffer_push_cstring(S->buffer, "\x1B[0m");
31045|      0|            }
31046|   169k|            break;
31047|   169k|        }
31048|    600|        case JANET_ARRAY:
  ------------------
  |  Branch (31048:9): [True: 600, False: 191k]
  ------------------
31049|  20.4k|        case JANET_TUPLE: {
  ------------------
  |  Branch (31049:9): [True: 19.8k, False: 171k]
  ------------------
31050|  20.4k|            int32_t i = 0, len = 0;
31051|  20.4k|            const Janet *arr = NULL;
31052|  20.4k|            int isarray = janet_checktype(x, JANET_ARRAY);
  ------------------
  |  |  806|  20.4k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 20.4k]
  |  |  ------------------
  |  |  807|  20.4k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  20.4k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  20.4k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  20.4k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  20.4k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  20.4k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31053|  20.4k|            janet_indexed_view(x, &arr, &len);
31054|  20.4k|            int hasbrackets = !isarray && (janet_tuple_flag(arr) & JANET_TUPLE_FLAG_BRACKETCTOR);
  ------------------
  |  | 1806|  19.8k|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1800|  19.8k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                          int hasbrackets = !isarray && (janet_tuple_flag(arr) & JANET_TUPLE_FLAG_BRACKETCTOR);
  ------------------
  |  | 1798|  19.8k|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
  |  Branch (31054:31): [True: 19.8k, False: 600]
  |  Branch (31054:43): [True: 418, False: 19.4k]
  ------------------
31055|  20.4k|            const char *startstr = isarray ? "@[" : hasbrackets ? "[" : "(";
  ------------------
  |  Branch (31055:36): [True: 600, False: 19.8k]
  |  Branch (31055:53): [True: 418, False: 19.4k]
  ------------------
31056|  20.4k|            const char endchar = isarray ? ']' : hasbrackets ? ']' : ')';
  ------------------
  |  Branch (31056:34): [True: 600, False: 19.8k]
  |  Branch (31056:50): [True: 418, False: 19.4k]
  ------------------
31057|  20.4k|            janet_buffer_push_cstring(S->buffer, startstr);
31058|  20.4k|            S->align += (int32_t) strlen(startstr);
31059|  20.4k|            const int align = S->leaf_align = S->align;
31060|  20.4k|            S->depth--;
31061|  20.4k|            if (S->depth == 0) {
  ------------------
  |  Branch (31061:17): [True: 0, False: 20.4k]
  ------------------
31062|      0|                janet_buffer_push_cstring(S->buffer, "...");
31063|      0|                S->align += 3;
31064|  20.4k|            } else {
31065|  20.4k|                if (len > JANET_PRETTY_ARRAY_LIMIT && !(S->flags & JANET_PRETTY_NOTRUNC)) {
  ------------------
  |  |30994|  40.9k|#define JANET_PRETTY_ARRAY_LIMIT 160
  ------------------
                              if (len > JANET_PRETTY_ARRAY_LIMIT && !(S->flags & JANET_PRETTY_NOTRUNC)) {
  ------------------
  |  | 1969|      0|#define JANET_PRETTY_NOTRUNC 4
  ------------------
  |  Branch (31065:21): [True: 0, False: 20.4k]
  |  Branch (31065:55): [True: 0, False: 0]
  ------------------
31066|      0|                    for (i = 0; i < 3; i++) {
  ------------------
  |  Branch (31066:33): [True: 0, False: 0]
  ------------------
31067|      0|                        if (i) print_newline(S, align);
  ------------------
  |  Branch (31067:29): [True: 0, False: 0]
  ------------------
31068|      0|                        janet_pretty_one(S, arr[i]);
31069|      0|                    }
31070|      0|                    print_newline(S, align);
31071|      0|                    janet_buffer_push_cstring(S->buffer, "...");
31072|      0|                    S->align += 3;
31073|      0|                    for (i = len - 3; i < len; i++) {
  ------------------
  |  Branch (31073:39): [True: 0, False: 0]
  ------------------
31074|      0|                        print_newline(S, align);
31075|      0|                        janet_pretty_one(S, arr[i]);
31076|      0|                    }
31077|  20.4k|                } else {
31078|  64.6k|                    for (i = 0; i < len; i++) {
  ------------------
  |  Branch (31078:33): [True: 44.1k, False: 20.4k]
  ------------------
31079|  44.1k|                        if (i) print_newline(S, align);
  ------------------
  |  Branch (31079:29): [True: 24.2k, False: 19.9k]
  ------------------
31080|  44.1k|                        janet_pretty_one(S, arr[i]);
31081|  44.1k|                    }
31082|  20.4k|                }
31083|  20.4k|            }
31084|  20.4k|            S->depth++;
31085|  20.4k|            janet_buffer_push_u8(S->buffer, endchar);
31086|  20.4k|            S->align++;
31087|  20.4k|            break;
31088|    600|        }
31089|  1.53k|        case JANET_STRUCT:
  ------------------
  |  Branch (31089:9): [True: 1.53k, False: 190k]
  ------------------
31090|  1.90k|        case JANET_TABLE: {
  ------------------
  |  Branch (31090:9): [True: 368, False: 191k]
  ------------------
31091|  1.90k|            int istable = janet_checktype(x, JANET_TABLE);
  ------------------
  |  |  806|  1.90k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 1.90k]
  |  |  ------------------
  |  |  807|  1.90k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  1.90k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  1.90k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  1.90k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.90k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.90k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31092|       |
31093|       |            /* For object-like tables, print class name */
31094|  1.90k|            if (istable) {
  ------------------
  |  Branch (31094:17): [True: 368, False: 1.53k]
  ------------------
31095|    368|                JanetTable *t = janet_unwrap_table(x);
  ------------------
  |  |  861|    368|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
31096|    368|                JanetTable *proto = t->proto;
31097|    368|                S->align++;
31098|    368|                janet_buffer_push_cstring(S->buffer, "@");
31099|    368|                if (NULL != proto) {
  ------------------
  |  Branch (31099:21): [True: 0, False: 368]
  ------------------
31100|      0|                    Janet name = janet_table_get(proto, janet_ckeywordv("_name"));
  ------------------
  |  | 1843|      0|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|      0|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|      0|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31101|      0|                    const uint8_t *n;
31102|      0|                    int32_t len;
31103|      0|                    if (janet_bytes_view(name, &n, &len)) {
  ------------------
  |  Branch (31103:25): [True: 0, False: 0]
  ------------------
31104|      0|                        if (S->flags & JANET_PRETTY_COLOR) {
  ------------------
  |  | 1967|      0|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (31104:29): [True: 0, False: 0]
  ------------------
31105|      0|                            janet_buffer_push_cstring(S->buffer, janet_class_color);
31106|      0|                        }
31107|      0|                        janet_buffer_push_bytes(S->buffer, n, len);
31108|      0|                        S->align += len;
31109|      0|                        if (S->flags & JANET_PRETTY_COLOR) {
  ------------------
  |  | 1967|      0|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (31109:29): [True: 0, False: 0]
  ------------------
31110|      0|                            janet_buffer_push_cstring(S->buffer, "\x1B[0m");
31111|      0|                        }
31112|      0|                    }
31113|      0|                }
31114|  1.53k|            } else {
31115|  1.53k|                JanetStruct st = janet_unwrap_struct(x);
  ------------------
  |  |  857|  1.53k|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
31116|  1.53k|                JanetStruct proto = janet_struct_proto(st);
  ------------------
  |  | 1851|  1.53k|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1846|  1.53k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
31117|  1.53k|                if (NULL != proto) {
  ------------------
  |  Branch (31117:21): [True: 0, False: 1.53k]
  ------------------
31118|      0|                    Janet name = janet_struct_get(proto, janet_ckeywordv("_name"));
  ------------------
  |  | 1843|      0|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|      0|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|      0|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31119|      0|                    const uint8_t *n;
31120|      0|                    int32_t len;
31121|      0|                    if (janet_bytes_view(name, &n, &len)) {
  ------------------
  |  Branch (31121:25): [True: 0, False: 0]
  ------------------
31122|      0|                        if (S->flags & JANET_PRETTY_COLOR) {
  ------------------
  |  | 1967|      0|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (31122:29): [True: 0, False: 0]
  ------------------
31123|      0|                            janet_buffer_push_cstring(S->buffer, janet_class_color);
31124|      0|                        }
31125|      0|                        janet_buffer_push_bytes(S->buffer, n, len);
31126|      0|                        S->align += len;
31127|      0|                        if (S->flags & JANET_PRETTY_COLOR) {
  ------------------
  |  | 1967|      0|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (31127:29): [True: 0, False: 0]
  ------------------
31128|      0|                            janet_buffer_push_cstring(S->buffer, "\x1B[0m");
31129|      0|                        }
31130|      0|                    }
31131|      0|                }
31132|  1.53k|            }
31133|  1.90k|            janet_buffer_push_u8(S->buffer, '{');
31134|  1.90k|            const int align = S->leaf_align = ++S->align;
31135|       |
31136|  1.90k|            S->depth--;
31137|  1.90k|            if (S->depth == 0) {
  ------------------
  |  Branch (31137:17): [True: 0, False: 1.90k]
  ------------------
31138|      0|                janet_buffer_push_cstring(S->buffer, "...");
31139|      0|                S->align += 3;
31140|  1.90k|            } else {
31141|  1.90k|                int32_t len = 0, cap = 0;
31142|  1.90k|                const JanetKV *kvs = NULL;
31143|  1.90k|                janet_dictionary_view(x, &kvs, &len, &cap);
31144|  1.90k|                int32_t ks_start = S->keysort_start;
31145|  1.90k|                int truncated = 0;
31146|       |
31147|       |                /* Shortcut for huge dictionaries, don't bother sorting keys */
31148|  1.90k|                if (len > JANET_PRETTY_DICT_KEYSORT_LIMIT) {
  ------------------
  |  |30993|  1.90k|#define JANET_PRETTY_DICT_KEYSORT_LIMIT 2000
  ------------------
  |  Branch (31148:21): [True: 0, False: 1.90k]
  ------------------
31149|      0|                    if (!(S->flags & JANET_PRETTY_NOTRUNC)) {
  ------------------
  |  | 1969|      0|#define JANET_PRETTY_NOTRUNC 4
  ------------------
  |  Branch (31149:25): [True: 0, False: 0]
  ------------------
31150|      0|                        len = JANET_PRETTY_DICT_LIMIT;
  ------------------
  |  |30992|      0|#define JANET_PRETTY_DICT_LIMIT 30
  ------------------
31151|      0|                        truncated = 1;
31152|      0|                    }
31153|      0|                    int32_t j = 0;
31154|      0|                    for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (31154:41): [True: 0, False: 0]
  ------------------
31155|      0|                        while (janet_checktype(kvs[j].key, JANET_NIL)) j++;
  ------------------
  |  |  806|      0|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 0]
  |  |  ------------------
  |  |  807|      0|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31156|      0|                        if (i) print_newline(S, align);
  ------------------
  |  Branch (31156:29): [True: 0, False: 0]
  ------------------
31157|      0|                        janet_pretty_one(S, kvs[j].key);
31158|      0|                        janet_buffer_push_u8(S->buffer, ' ');
31159|      0|                        S->align++;
31160|      0|                        janet_pretty_one(S, kvs[j].value);
31161|      0|                        j++;
31162|      0|                    }
31163|      0|                    if (truncated) {
  ------------------
  |  Branch (31163:25): [True: 0, False: 0]
  ------------------
31164|      0|                        print_newline(S, align);
31165|      0|                        janet_buffer_push_cstring(S->buffer, "...");
31166|      0|                        S->align += 3;
31167|      0|                    }
31168|  1.90k|                } else {
31169|       |                    /* Sorted keys dictionaries */
31170|       |
31171|       |                    /* Ensure buffer is large enough to sort keys. */
31172|  1.90k|                    int64_t mincap = (int64_t) len + (int64_t) ks_start;
31173|  1.90k|                    if (mincap > INT32_MAX) {
  ------------------
  |  Branch (31173:25): [True: 0, False: 1.90k]
  ------------------
31174|      0|                        truncated = 1;
31175|      0|                        len = 0;
31176|      0|                        mincap = ks_start;
31177|      0|                    }
31178|       |
31179|  1.90k|                    if (S->keysort_capacity < mincap) {
  ------------------
  |  Branch (31179:25): [True: 715, False: 1.18k]
  ------------------
31180|    715|                        if (mincap >= INT32_MAX / 2) {
  ------------------
  |  Branch (31180:29): [True: 0, False: 715]
  ------------------
31181|      0|                            S->keysort_capacity = INT32_MAX;
31182|    715|                        } else {
31183|    715|                            S->keysort_capacity = (int32_t)(mincap * 2);
31184|    715|                        }
31185|    715|                        S->keysort_buffer = janet_srealloc(S->keysort_buffer, sizeof(int32_t) * S->keysort_capacity);
31186|    715|                        if (NULL == S->keysort_buffer) {
  ------------------
  |  Branch (31186:29): [True: 0, False: 715]
  ------------------
31187|      0|                            JANET_OUT_OF_MEMORY;
  ------------------
  |  |  419|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (419:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
31188|      0|                        }
31189|    715|                    }
31190|       |
31191|  1.90k|                    janet_sorted_keys(kvs, cap, S->keysort_buffer == NULL ? NULL : S->keysort_buffer + ks_start);
  ------------------
  |  Branch (31191:49): [True: 142, False: 1.76k]
  ------------------
31192|  1.90k|                    S->keysort_start += len;
31193|  1.90k|                    if (!(S->flags & JANET_PRETTY_NOTRUNC) && (len > JANET_PRETTY_DICT_LIMIT)) {
  ------------------
  |  | 1969|  1.90k|#define JANET_PRETTY_NOTRUNC 4
  ------------------
                                  if (!(S->flags & JANET_PRETTY_NOTRUNC) && (len > JANET_PRETTY_DICT_LIMIT)) {
  ------------------
  |  |30992|  1.90k|#define JANET_PRETTY_DICT_LIMIT 30
  ------------------
  |  Branch (31193:25): [True: 1.90k, False: 0]
  |  Branch (31193:63): [True: 0, False: 1.90k]
  ------------------
31194|      0|                        len = JANET_PRETTY_DICT_LIMIT;
  ------------------
  |  |30992|      0|#define JANET_PRETTY_DICT_LIMIT 30
  ------------------
31195|      0|                        truncated = 1;
31196|      0|                    }
31197|       |
31198|  5.50k|                    for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (31198:41): [True: 3.60k, False: 1.90k]
  ------------------
31199|  3.60k|                        if (i) print_newline(S, align);
  ------------------
  |  Branch (31199:29): [True: 2.61k, False: 989]
  ------------------
31200|  3.60k|                        int32_t j = S->keysort_buffer[i + ks_start];
31201|  3.60k|                        janet_pretty_one(S, kvs[j].key);
31202|  3.60k|                        janet_buffer_push_u8(S->buffer, ' ');
31203|  3.60k|                        S->align++;
31204|  3.60k|                        janet_pretty_one(S, kvs[j].value);
31205|  3.60k|                    }
31206|       |
31207|  1.90k|                    if (truncated) {
  ------------------
  |  Branch (31207:25): [True: 0, False: 1.90k]
  ------------------
31208|      0|                        print_newline(S, align);
31209|      0|                        janet_buffer_push_cstring(S->buffer, "...");
31210|      0|                        S->align += 3;
31211|      0|                    }
31212|       |
31213|  1.90k|                }
31214|  1.90k|                S->keysort_start = ks_start;
31215|  1.90k|            }
31216|  1.90k|            S->depth++;
31217|  1.90k|            janet_buffer_push_u8(S->buffer, '}');
31218|  1.90k|            S->align++;
31219|  1.90k|            break;
31220|  1.90k|        }
31221|   191k|    }
31222|       |    /* Remove from seen */
31223|   191k|    janet_table_remove(&S->seen, x);
31224|   191k|    return;
31225|   191k|}
janet.c:print_newline:
30956|  26.8k|static void print_newline(struct pretty *S, int align) {
30957|  26.8k|    int i;
30958|  26.8k|    if (S->flags & JANET_PRETTY_ONELINE) {
  ------------------
  |  | 1968|  26.8k|#define JANET_PRETTY_ONELINE 2
  ------------------
  |  Branch (30958:9): [True: 0, False: 26.8k]
  ------------------
30959|      0|        janet_buffer_push_u8(S->buffer, ' ');
30960|      0|        return;
30961|      0|    }
30962|  26.8k|    backtrack_newlines(S);
30963|  26.8k|    janet_buffer_push_u8(S->buffer, '\n');
30964|  26.8k|    S->leaf_align = S->align = align;
30965|   709k|    for (i = 0; i < S->align; i++) {
  ------------------
  |  Branch (30965:17): [True: 682k, False: 26.8k]
  ------------------
30966|   682k|        janet_buffer_push_u8(S->buffer, ' ');
30967|   682k|    }
30968|  26.8k|}
janet.c:backtrack_newlines:
30896|   167k|static void backtrack_newlines(const struct pretty *S) {
30897|   167k|    if (S->flags & JANET_PRETTY_ONELINE || S->buffer->count <= 0)
  ------------------
  |  | 1968|   334k|#define JANET_PRETTY_ONELINE 2
  ------------------
  |  Branch (30897:9): [True: 0, False: 167k]
  |  Branch (30897:44): [True: 0, False: 167k]
  ------------------
30898|      0|        return;
30899|   167k|    switch (S->buffer->data[S->buffer->count - 1]) {
30900|  4.42k|        case ')':
  ------------------
  |  Branch (30900:9): [True: 4.42k, False: 162k]
  ------------------
30901|  5.26k|        case '}':
  ------------------
  |  Branch (30901:9): [True: 834, False: 166k]
  ------------------
30902|  5.91k|        case ']':
  ------------------
  |  Branch (30902:9): [True: 648, False: 166k]
  ------------------
30903|  5.91k|            break;
30904|   161k|        default:
  ------------------
  |  Branch (30904:9): [True: 161k, False: 5.91k]
  ------------------
30905|   161k|            return;
30906|   167k|    }
30907|  5.91k|    int32_t removed = 0;
30908|  5.91k|    int32_t old_count = S->buffer->count;
30909|  5.91k|    int32_t offset = old_count;
30910|  5.91k|    int32_t b0 = S->lookback_barrier;
30911|  5.91k|    int32_t columns = S->width;
30912|  5.91k|    int32_t align = 0;
30913|   178k|    while (--offset >= b0) {
  ------------------
  |  Branch (30913:12): [True: 177k, False: 1.09k]
  ------------------
30914|   177k|        const char *s = (const char *)S->buffer->data + offset;
30915|   177k|        if (*s == '\n') {
  ------------------
  |  Branch (30915:13): [True: 10.9k, False: 166k]
  ------------------
30916|  10.9k|            if (align < S->leaf_align) {
  ------------------
  |  Branch (30916:17): [True: 4.36k, False: 6.56k]
  ------------------
30917|  4.36k|                break;
30918|  4.36k|            }
30919|  6.56k|            columns += align;
30920|  6.56k|            removed += align;
30921|  6.56k|            align = 0;
30922|   166k|        } else if (*s == ' ') {
  ------------------
  |  Branch (30922:20): [True: 69.8k, False: 96.3k]
  ------------------
30923|  69.8k|            align++;
30924|  96.3k|        } else {
30925|  96.3k|            align = 0;
30926|       |            /* Don't count color sequences: \x1B(0|3\d)m */
30927|  96.3k|            if (S->flags & JANET_PRETTY_COLOR && *s == 'm') {
  ------------------
  |  | 1967|   192k|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (30927:17): [True: 0, False: 96.3k]
  |  Branch (30927:50): [True: 0, False: 0]
  ------------------
30928|      0|                if (offset >= (3 + b0) && strncmp("\x1B[0m", s - 3, 4) == 0) {
  ------------------
  |  Branch (30928:21): [True: 0, False: 0]
  |  Branch (30928:43): [True: 0, False: 0]
  ------------------
30929|      0|                    offset -= 3;
30930|      0|                    columns++;
30931|      0|                } else if (offset >= (4 + b0) && strncmp("\x1B[3", s - 4, 3) == 0) {
  ------------------
  |  Branch (30931:28): [True: 0, False: 0]
  |  Branch (30931:50): [True: 0, False: 0]
  ------------------
30932|      0|                    offset -= 4;
30933|      0|                    columns++;
30934|      0|                }
30935|      0|            }
30936|  96.3k|        }
30937|   172k|        if (--columns <= 0) {
  ------------------
  |  Branch (30937:13): [True: 456, False: 172k]
  ------------------
30938|    456|            return;
30939|    456|        }
30940|   172k|    }
30941|  5.45k|    offset++; /* Don't mess with the last newline we found */
30942|  5.45k|    janet_assert(offset >= b0, "bad buffer index");
  ------------------
  |  |  389|  5.45k|#define janet_assert(c, m) do { \
  |  |  390|  5.45k|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  378|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  379|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  380|      0|        __FILE__,\
  |  |  |  |  381|      0|        __LINE__,\
  |  |  |  |  382|      0|        (m));\
  |  |  |  |  383|      0|    abort();\
  |  |  |  |  384|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (384:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (390:9): [True: 0, False: 5.45k]
  |  |  ------------------
  |  |  391|  5.45k|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 5.45k]
  |  |  ------------------
  ------------------
30943|  5.45k|    S->buffer->count -= removed;
30944|   105k|    for (int32_t i = offset; i < S->buffer->count; i++) {
  ------------------
  |  Branch (30944:30): [True: 100k, False: 5.45k]
  ------------------
30945|   100k|        if (S->buffer->data[offset] == '\n') {
  ------------------
  |  Branch (30945:13): [True: 5.04k, False: 95.4k]
  ------------------
30946|  5.04k|            S->buffer->data[i] = ' ';
30947|  33.9k|            while (S->buffer->data[++offset] == ' ') {
  ------------------
  |  Branch (30947:20): [True: 28.8k, False: 5.04k]
  ------------------
30948|  28.8k|                janet_assert(offset < old_count, "bad replacement of newline");
  ------------------
  |  |  389|  28.8k|#define janet_assert(c, m) do { \
  |  |  390|  28.8k|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  378|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  379|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  380|      0|        __FILE__,\
  |  |  |  |  381|      0|        __LINE__,\
  |  |  |  |  382|      0|        (m));\
  |  |  |  |  383|      0|    abort();\
  |  |  |  |  384|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (384:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (390:9): [True: 0, False: 28.8k]
  |  |  ------------------
  |  |  391|  28.8k|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 28.8k]
  |  |  ------------------
  ------------------
30949|  28.8k|            }
30950|  95.4k|        } else {
30951|  95.4k|            S->buffer->data[i] = S->buffer->data[offset++];
30952|  95.4k|        }
30953|   100k|    }
30954|  5.45k|}
janet.c:scanformat:
31349|   296k|    char precision[3]) {
31350|   296k|    const char *p = strfrmt;
31351|       |
31352|       |    /* Parse strfrmt */
31353|   296k|    memset(width, '\0', 3);
31354|   296k|    memset(precision, '\0', 3);
31355|   296k|    while (*p != '\0' && strchr(FMT_FLAGS, *p) != NULL)
  ------------------
  |  |31315|   296k|#define FMT_FLAGS "-+ #0"
  ------------------
  |  Branch (31355:12): [True: 296k, False: 0]
  |  Branch (31355:26): [True: 0, False: 296k]
  ------------------
31356|      0|        p++; /* skip flags */
31357|   296k|    if ((size_t)(p - strfrmt) >= sizeof(FMT_FLAGS)) janet_panic("invalid format (repeated flags)");
  ------------------
  |  |31315|   296k|#define FMT_FLAGS "-+ #0"
  ------------------
  |  Branch (31357:9): [True: 0, False: 296k]
  ------------------
31358|   296k|    if (isdigit((int)(*p)))
  ------------------
  |  Branch (31358:9): [True: 0, False: 296k]
  ------------------
31359|      0|        width[0] = *p++; /* skip width */
31360|   296k|    if (isdigit((int)(*p)))
  ------------------
  |  Branch (31360:9): [True: 0, False: 296k]
  ------------------
31361|      0|        width[1] = *p++; /* (2 digits at most) */
31362|   296k|    if (*p == '.') {
  ------------------
  |  Branch (31362:9): [True: 0, False: 296k]
  ------------------
31363|      0|        p++;
31364|      0|        if (isdigit((int)(*p)))
  ------------------
  |  Branch (31364:13): [True: 0, False: 0]
  ------------------
31365|      0|            precision[0] = *p++; /* skip precision */
31366|      0|        if (isdigit((int)(*p)))
  ------------------
  |  Branch (31366:13): [True: 0, False: 0]
  ------------------
31367|      0|            precision[1] = *p++; /* (2 digits at most) */
31368|      0|    }
31369|   296k|    if (isdigit((int)(*p)))
  ------------------
  |  Branch (31369:9): [True: 0, False: 296k]
  ------------------
31370|      0|        janet_panic("invalid format (width or precision too long)");
31371|       |
31372|       |    /* Write to form - replace characters with fixed size stuff */
31373|   296k|    *(form++) = '%';
31374|   296k|    const char *p2 = strfrmt;
31375|   593k|    while (p2 <= p) {
  ------------------
  |  Branch (31375:12): [True: 296k, False: 296k]
  ------------------
31376|   296k|        char *loc = strchr(FMT_REPLACE_INTTYPES, *p2);
  ------------------
  |  |31316|   296k|#define FMT_REPLACE_INTTYPES "diouxX"
  ------------------
31377|   296k|        if (loc != NULL && *loc != '\0') {
  ------------------
  |  Branch (31377:13): [True: 147k, False: 149k]
  |  Branch (31377:28): [True: 147k, False: 0]
  ------------------
31378|   147k|            const char *mapping = get_fmt_mapping(*p2++);
31379|   147k|            size_t len = strlen(mapping);
31380|   147k|            memcpy(form, mapping, len);
31381|   147k|            form += len;
31382|   149k|        } else {
31383|   149k|            *(form++) = *(p2++);
31384|   149k|        }
31385|   296k|    }
31386|   296k|    *form = '\0';
31387|       |
31388|   296k|    return p;
31389|   296k|}
janet.c:get_fmt_mapping:
31337|   147k|static const char *get_fmt_mapping(char c) {
31338|   443k|    for (size_t i = 0; i < (sizeof(format_mappings) / sizeof(struct FmtMapping)); i++) {
  ------------------
  |  Branch (31338:24): [True: 443k, False: 0]
  ------------------
31339|   443k|        if (format_mappings[i].c == c)
  ------------------
  |  Branch (31339:13): [True: 147k, False: 295k]
  ------------------
31340|   147k|            return format_mappings[i].mapping;
31341|   443k|    }
31342|      0|    janet_assert(0, "bad format mapping");
  ------------------
  |  |  389|      0|#define janet_assert(c, m) do { \
  |  |  390|      0|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  378|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  379|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  380|      0|        __FILE__,\
  |  |  |  |  381|      0|        __LINE__,\
  |  |  |  |  382|      0|        (m));\
  |  |  |  |  383|      0|    abort();\
  |  |  |  |  384|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (384:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (390:9): [True: 0, Folded]
  |  |  ------------------
  |  |  391|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
31343|      0|}
janet.c:bignat_zero:
34178|  13.4k|static void bignat_zero(struct BigNat *x) {
34179|  13.4k|    x->first_digit = 0;
34180|  13.4k|    x->n = 0;
34181|  13.4k|    x->cap = 0;
34182|       |    x->digits = NULL;
34183|  13.4k|}
janet.c:bignat_muladd:
34210|  34.1k|static void bignat_muladd(struct BigNat *mant, uint32_t factor, uint32_t term) {
34211|  34.1k|    int32_t i;
34212|  34.1k|    uint64_t carry = ((uint64_t) mant->first_digit) * factor + term;
34213|  34.1k|    mant->first_digit = carry % BIGNAT_BASE;
  ------------------
  |  |34167|  34.1k|#define BIGNAT_BASE 0x80000000U
  ------------------
34214|  34.1k|    carry /= BIGNAT_BASE;
  ------------------
  |  |34167|  34.1k|#define BIGNAT_BASE 0x80000000U
  ------------------
34215|   170k|    for (i = 0; i < mant->n; i++) {
  ------------------
  |  Branch (34215:17): [True: 136k, False: 34.1k]
  ------------------
34216|   136k|        carry += ((uint64_t) mant->digits[i]) * factor;
34217|   136k|        mant->digits[i] = carry % BIGNAT_BASE;
  ------------------
  |  |34167|   136k|#define BIGNAT_BASE 0x80000000U
  ------------------
34218|   136k|        carry /= BIGNAT_BASE;
  ------------------
  |  |34167|   136k|#define BIGNAT_BASE 0x80000000U
  ------------------
34219|   136k|    }
34220|  34.1k|    if (carry) bignat_append(mant, (uint32_t) carry);
  ------------------
  |  Branch (34220:9): [True: 5.41k, False: 28.7k]
  ------------------
34221|  34.1k|}
janet.c:bignat_append:
34203|  5.41k|static void bignat_append(struct BigNat *mant, uint32_t dig) {
34204|  5.41k|    bignat_extra(mant, 1)[0] = dig;
34205|  5.41k|}
janet.c:bignat_extra:
34186|  6.57k|static uint32_t *bignat_extra(struct BigNat *mant, int32_t n) {
34187|  6.57k|    int32_t oldn = mant->n;
34188|  6.57k|    int32_t newn = oldn + n;
34189|  6.57k|    if (mant->cap < newn) {
  ------------------
  |  Branch (34189:9): [True: 2.88k, False: 3.69k]
  ------------------
34190|  2.88k|        int32_t newcap = 2 * newn;
34191|  2.88k|        uint32_t *mem = janet_realloc(mant->digits, (size_t) newcap * sizeof(uint32_t));
  ------------------
  |  | 2409|  2.88k|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
34192|  2.88k|        if (NULL == mem) {
  ------------------
  |  Branch (34192:13): [True: 0, False: 2.88k]
  ------------------
34193|      0|            JANET_OUT_OF_MEMORY;
  ------------------
  |  |  419|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (419:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
34194|      0|        }
34195|  2.88k|        mant->cap = newcap;
34196|  2.88k|        mant->digits = mem;
34197|  2.88k|    }
34198|  6.57k|    mant->n = newn;
34199|  6.57k|    return mant->digits + oldn;
34200|  6.57k|}
janet.c:convert:
34306|  10.3k|    int32_t exponent) {
34307|       |
34308|  10.3k|    int32_t exponent2 = 0;
34309|       |
34310|       |    /* Approximate exponent in base 2 of mant and exponent. This should get us a good estimate of the final size of the
34311|       |     * number, within * 2^32 or so. */
34312|  10.3k|    int64_t mant_exp2_approx = mant->n * 32 + 16;
34313|  10.3k|    int64_t exp_exp2_approx = (int64_t)(floor(log2(base) * exponent));
34314|  10.3k|    int64_t exp2_approx = mant_exp2_approx + exp_exp2_approx;
34315|       |
34316|       |    /* Short circuit zero, huge, and small numbers. We use the exponent range of valid IEEE754 doubles (-1022, 1023)
34317|       |     * with a healthy buffer to allow for inaccuracies in the approximation and denormailzed numbers. */
34318|  10.3k|    if (mant->n == 0 && mant->first_digit == 0)
  ------------------
  |  Branch (34318:9): [True: 10.0k, False: 272]
  |  Branch (34318:25): [True: 2.66k, False: 7.39k]
  ------------------
34319|  2.66k|        return negative ? -0.0 : 0.0;
  ------------------
  |  Branch (34319:16): [True: 51, False: 2.60k]
  ------------------
34320|  7.66k|    if (exp2_approx > 1176)
  ------------------
  |  Branch (34320:9): [True: 93, False: 7.56k]
  ------------------
34321|     93|        return negative ? -INFINITY : INFINITY;
  ------------------
  |  Branch (34321:16): [True: 19, False: 74]
  ------------------
34322|  7.56k|    if (exp2_approx < -1175)
  ------------------
  |  Branch (34322:9): [True: 104, False: 7.46k]
  ------------------
34323|    104|        return negative ? -0.0 : 0.0;
  ------------------
  |  Branch (34323:16): [True: 13, False: 91]
  ------------------
34324|       |
34325|       |    /* Final value is X = mant * base ^ exponent * 2 ^ exponent2
34326|       |     * Get exponent to zero while holding X constant. */
34327|       |
34328|       |    /* Positive exponents are simple */
34329|  18.7k|    for (; exponent > 3; exponent -= 4) bignat_muladd(mant, base * base * base * base, 0);
  ------------------
  |  Branch (34329:12): [True: 11.2k, False: 7.46k]
  ------------------
34330|  8.14k|    for (; exponent > 1; exponent -= 2) bignat_muladd(mant, base * base, 0);
  ------------------
  |  Branch (34330:12): [True: 679, False: 7.46k]
  ------------------
34331|  7.99k|    for (; exponent > 0; exponent -= 1) bignat_muladd(mant, base, 0);
  ------------------
  |  Branch (34331:12): [True: 533, False: 7.46k]
  ------------------
34332|       |
34333|       |    /* Negative exponents are tricky - we don't want to loose bits
34334|       |     * from integer division, so we need to premultiply. */
34335|  7.46k|    if (exponent < 0) {
  ------------------
  |  Branch (34335:9): [True: 1.16k, False: 6.30k]
  ------------------
34336|  1.16k|        int32_t shamt = 5 - exponent / 4;
34337|  1.16k|        bignat_lshift_n(mant, shamt);
34338|  1.16k|        exponent2 -= shamt * BIGNAT_NBIT;
  ------------------
  |  |34166|  1.16k|#define BIGNAT_NBIT 31
  ------------------
34339|  6.47k|        for (; exponent < -3; exponent += 4) bignat_div(mant, base * base * base * base);
  ------------------
  |  Branch (34339:16): [True: 5.31k, False: 1.16k]
  ------------------
34340|  1.75k|        for (; exponent < -1; exponent += 2) bignat_div(mant, base * base);
  ------------------
  |  Branch (34340:16): [True: 589, False: 1.16k]
  ------------------
34341|  1.81k|        for (; exponent <  0; exponent += 1) bignat_div(mant, base);
  ------------------
  |  Branch (34341:16): [True: 657, False: 1.16k]
  ------------------
34342|  1.16k|    }
34343|       |
34344|  7.46k|    return negative
  ------------------
  |  Branch (34344:12): [True: 811, False: 6.65k]
  ------------------
34345|  7.46k|           ? -bignat_extract(mant, exponent2)
34346|  7.46k|           : bignat_extract(mant, exponent2);
34347|  7.56k|}
janet.c:bignat_lshift_n:
34242|  1.16k|static void bignat_lshift_n(struct BigNat *mant, int n) {
34243|  1.16k|    if (!n) return;
  ------------------
  |  Branch (34243:9): [True: 0, False: 1.16k]
  ------------------
34244|  1.16k|    int32_t oldn = mant->n;
34245|  1.16k|    bignat_extra(mant, n);
34246|  1.16k|    memmove(mant->digits + n, mant->digits, sizeof(uint32_t) * oldn);
34247|  1.16k|    memset(mant->digits, 0, sizeof(uint32_t) * (n - 1));
34248|  1.16k|    mant->digits[n - 1] = mant->first_digit;
34249|  1.16k|    mant->first_digit = 0;
34250|  1.16k|}
janet.c:bignat_div:
34224|  6.56k|static void bignat_div(struct BigNat *mant, uint32_t divisor) {
34225|  6.56k|    int32_t i;
34226|  6.56k|    uint32_t quotient, remainder;
34227|  6.56k|    uint64_t dividend;
34228|  6.56k|    remainder = 0, quotient = 0;
34229|   300k|    for (i = mant->n - 1; i >= 0; i--) {
  ------------------
  |  Branch (34229:27): [True: 294k, False: 6.56k]
  ------------------
34230|   294k|        dividend = ((uint64_t)remainder * BIGNAT_BASE) + mant->digits[i];
  ------------------
  |  |34167|   294k|#define BIGNAT_BASE 0x80000000U
  ------------------
34231|   294k|        if (i < mant->n - 1) mant->digits[i + 1] = quotient;
  ------------------
  |  Branch (34231:13): [True: 287k, False: 6.56k]
  ------------------
34232|   294k|        quotient = (uint32_t)(dividend / divisor);
34233|   294k|        remainder = (uint32_t)(dividend % divisor);
34234|   294k|        mant->digits[i] = remainder;
34235|   294k|    }
34236|  6.56k|    dividend = ((uint64_t)remainder * BIGNAT_BASE) + mant->first_digit;
  ------------------
  |  |34167|  6.56k|#define BIGNAT_BASE 0x80000000U
  ------------------
34237|  6.56k|    if (mant->n && mant->digits[mant->n - 1] == 0) mant->n--;
  ------------------
  |  Branch (34237:9): [True: 6.56k, False: 0]
  |  Branch (34237:20): [True: 2.97k, False: 3.58k]
  ------------------
34238|  6.56k|    mant->first_digit = (uint32_t)(dividend / divisor);
34239|  6.56k|}
janet.c:bignat_extract:
34267|  7.46k|static double bignat_extract(struct BigNat *mant, int32_t exponent2) {
34268|  7.46k|    uint64_t top53;
34269|  7.46k|    int32_t n = mant->n;
34270|       |    /* Get most significant 53 bits from mant. Bit 52 (0 indexed) should
34271|       |     * always be 1. This is essentially a large right shift on mant.*/
34272|  7.46k|    if (n) {
  ------------------
  |  Branch (34272:9): [True: 2.12k, False: 5.33k]
  ------------------
34273|       |        /* Two or more digits */
34274|  2.12k|        uint64_t d1 = mant->digits[n - 1]; /* MSD (non-zero) */
34275|  2.12k|        uint64_t d2 = (n == 1) ? mant->first_digit : mant->digits[n - 2];
  ------------------
  |  Branch (34275:23): [True: 264, False: 1.86k]
  ------------------
34276|  2.12k|        uint64_t d3 = (n > 2) ? mant->digits[n - 3] : (n == 2) ? mant->first_digit : 0;
  ------------------
  |  Branch (34276:23): [True: 1.42k, False: 706]
  |  Branch (34276:55): [True: 442, False: 264]
  ------------------
34277|  2.12k|        int lz = clz((uint32_t) d1);
  ------------------
  |  |34253|  2.12k|#define clz(x) __builtin_clz(x)
  ------------------
34278|  2.12k|        int nbits = 32 - lz;
34279|       |        /* First get 54 bits */
34280|  2.12k|        top53 = (d2 << (54 - BIGNAT_NBIT)) + (d3 >> (2 * BIGNAT_NBIT - 54));
  ------------------
  |  |34166|  2.12k|#define BIGNAT_NBIT 31
  ------------------
                      top53 = (d2 << (54 - BIGNAT_NBIT)) + (d3 >> (2 * BIGNAT_NBIT - 54));
  ------------------
  |  |34166|  2.12k|#define BIGNAT_NBIT 31
  ------------------
34281|  2.12k|        top53 >>= nbits;
34282|  2.12k|        top53 |= (d1 << (54 - nbits));
34283|       |        /* Rounding based on lowest bit of 54 */
34284|  2.12k|        if (top53 & 1) top53++;
  ------------------
  |  Branch (34284:13): [True: 954, False: 1.17k]
  ------------------
34285|  2.12k|        top53 >>= 1;
34286|  2.12k|        if (top53 > 0x1FffffFFFFffffUL) {
  ------------------
  |  Branch (34286:13): [True: 31, False: 2.09k]
  ------------------
34287|     31|            top53 >>= 1;
34288|     31|            exponent2++;
34289|     31|        }
34290|       |        /* Correct exponent - to correct for large right shift to mantissa. */
34291|  2.12k|        exponent2 += (nbits - 53) + BIGNAT_NBIT * n;
  ------------------
  |  |34166|  2.12k|#define BIGNAT_NBIT 31
  ------------------
34292|  5.33k|    } else {
34293|       |        /* One digit */
34294|  5.33k|        top53 = mant->first_digit;
34295|  5.33k|    }
34296|  7.46k|    return ldexp((double)top53, exponent2);
34297|  7.46k|}
janet.c:scan_uint64:
34507|  2.61k|    int *neg) {
34508|  2.61k|    const uint8_t *end = str + len;
34509|  2.61k|    int seenadigit = 0;
34510|  2.61k|    int base = 10;
34511|  2.61k|    *neg = 0;
34512|  2.61k|    *out = 0;
34513|  2.61k|    uint64_t accum = 0;
34514|  2.61k|    if (len > JANET_NUMBER_LENGTH_RIDICULOUS) return 0;
  ------------------
  |  |34151|  2.61k|#define JANET_NUMBER_LENGTH_RIDICULOUS 0xFFFF
  ------------------
  |  Branch (34514:9): [True: 0, False: 2.61k]
  ------------------
34515|       |    /* Get sign */
34516|  2.61k|    if (str >= end) return 0;
  ------------------
  |  Branch (34516:9): [True: 0, False: 2.61k]
  ------------------
34517|  2.61k|    if (*str == '-') {
  ------------------
  |  Branch (34517:9): [True: 816, False: 1.79k]
  ------------------
34518|    816|        *neg = 1;
34519|    816|        str++;
34520|  1.79k|    } else if (*str == '+') {
  ------------------
  |  Branch (34520:16): [True: 65, False: 1.73k]
  ------------------
34521|     65|        str++;
34522|     65|    }
34523|       |    /* Check for leading 0x or digit digit r */
34524|  2.61k|    if (str + 1 < end && str[0] == '0' && str[1] == 'x') {
  ------------------
  |  Branch (34524:9): [True: 1.36k, False: 1.24k]
  |  Branch (34524:26): [True: 387, False: 981]
  |  Branch (34524:43): [True: 20, False: 367]
  ------------------
34525|     20|        base = 16;
34526|     20|        str += 2;
34527|  2.59k|    } else if (str + 1 < end  &&
  ------------------
  |  Branch (34527:16): [True: 1.34k, False: 1.24k]
  ------------------
34528|  1.34k|               str[0] >= '0' && str[0] <= '9' &&
  ------------------
  |  Branch (34528:16): [True: 1.26k, False: 80]
  |  Branch (34528:33): [True: 1.18k, False: 81]
  ------------------
34529|  1.18k|               str[1] == 'r') {
  ------------------
  |  Branch (34529:16): [True: 41, False: 1.14k]
  ------------------
34530|     41|        base = str[0] - '0';
34531|     41|        str += 2;
34532|  2.55k|    } else if (str + 2 < end  &&
  ------------------
  |  Branch (34532:16): [True: 1.00k, False: 1.55k]
  ------------------
34533|  1.00k|               str[0] >= '0' && str[0] <= '9' &&
  ------------------
  |  Branch (34533:16): [True: 949, False: 52]
  |  Branch (34533:33): [True: 896, False: 53]
  ------------------
34534|    896|               str[1] >= '0' && str[1] <= '9' &&
  ------------------
  |  Branch (34534:16): [True: 872, False: 24]
  |  Branch (34534:33): [True: 806, False: 66]
  ------------------
34535|    806|               str[2] == 'r') {
  ------------------
  |  Branch (34535:16): [True: 59, False: 747]
  ------------------
34536|     59|        base = 10 * (str[0] - '0') + (str[1] - '0');
34537|     59|        if (base < 2 || base > 36) return 0;
  ------------------
  |  Branch (34537:13): [True: 4, False: 55]
  |  Branch (34537:25): [True: 21, False: 34]
  ------------------
34538|     34|        str += 3;
34539|     34|    }
34540|       |
34541|       |    /* Skip leading zeros */
34542|  4.65k|    while (str < end && *str == '0') {
  ------------------
  |  Branch (34542:12): [True: 3.77k, False: 875]
  |  Branch (34542:25): [True: 2.06k, False: 1.71k]
  ------------------
34543|  2.06k|        seenadigit = 1;
34544|  2.06k|        str++;
34545|  2.06k|    }
34546|       |    /* Parse significant digits */
34547|  13.1k|    while (str < end) {
  ------------------
  |  Branch (34547:12): [True: 11.0k, False: 2.16k]
  ------------------
34548|  11.0k|        if (*str == '_') {
  ------------------
  |  Branch (34548:13): [True: 659, False: 10.3k]
  ------------------
34549|    659|            if (!seenadigit) return 0;
  ------------------
  |  Branch (34549:17): [True: 54, False: 605]
  ------------------
34550|  10.3k|        } else {
34551|  10.3k|            int digit = digit_lookup[*str & 0x7F];
34552|  10.3k|            if (*str > 127 || digit >= base) return 0;
  ------------------
  |  Branch (34552:17): [True: 53, False: 10.3k]
  |  Branch (34552:31): [True: 243, False: 10.0k]
  ------------------
34553|  10.0k|            if (accum > (UINT64_MAX - digit) / base) return 0;
  ------------------
  |  Branch (34553:17): [True: 75, False: 9.99k]
  ------------------
34554|  9.99k|            accum = accum * base + digit;
34555|  9.99k|            seenadigit = 1;
34556|  9.99k|        }
34557|  10.6k|        str++;
34558|  10.6k|    }
34559|       |
34560|  2.16k|    if (!seenadigit) return 0;
  ------------------
  |  Branch (34560:9): [True: 179, False: 1.98k]
  ------------------
34561|  1.98k|    *out = accum;
34562|  1.98k|    return 1;
34563|  2.16k|}
janet.c:janet_dict_find:
  433|  56.0M|static inline const JanetKV *janet_dict_find(const JanetKV *buckets, int32_t cap, Janet key) {
  434|  56.0M|    int32_t hash;
  435|  56.0M|    if (janet_checktype(key, JANET_KEYWORD) || janet_checktype(key, JANET_SYMBOL)) {
  ------------------
  |  |  806|   112M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 25.2M, False: 30.7M]
  |  |  |  Branch (806:6): [Folded, False: 56.0M]
  |  |  ------------------
  |  |  807|   112M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   112M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  56.0M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  56.0M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  56.0M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  56.0M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  if (janet_checktype(key, JANET_KEYWORD) || janet_checktype(key, JANET_SYMBOL)) {
  ------------------
  |  |  806|  30.7M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 19.7M, False: 11.0M]
  |  |  |  Branch (806:6): [Folded, False: 30.7M]
  |  |  ------------------
  |  |  807|  30.7M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  30.7M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  30.7M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  30.7M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  30.7M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  30.7M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  436|  44.9M|        hash = janet_string_hash(janet_unwrap_string(key));
  ------------------
  |  | 1814|  44.9M|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  ------------------
  |  |  |  | 1812|  44.9M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
  437|  44.9M|    } else if (janet_checktypes(key, JANET_TFLAG_NIL | JANET_TFLAG_STRING | JANET_TFLAG_TUPLE | JANET_TFLAG_STRUCT | JANET_TFLAG_ABSTRACT) ||
  ------------------
  |  |  969|  22.1M|#define janet_checktypes(x, tps) ((1 << janet_type(x)) & (tps))
  |  |  ------------------
  |  |  |  |  795|  11.0M|    (isnan((x).number) \
  |  |  |  |  796|  11.0M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  |  |  797|  11.0M|        : JANET_NUMBER)
  |  |  ------------------
  |  |  |  Branch (969:34): [True: 597k, False: 10.4M]
  |  |  ------------------
  ------------------
  |  Branch (437:16): [True: 11.0M, False: 8.14k]
  ------------------
  438|  10.4M|               (janet_checktype(key, JANET_NUMBER) && janet_unwrap_number(key) == 0)) {
  ------------------
  |  |  806|  20.9M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 8.14k, False: 10.4M]
  |  |  |  Branch (806:6): [True: 10.4M, Folded]
  |  |  ------------------
  |  |  807|  20.9M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|  10.4M|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 8.14k, False: 10.4M]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 10.4M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  20.9M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                             (janet_checktype(key, JANET_NUMBER) && janet_unwrap_number(key) == 0)) {
  ------------------
  |  |  839|  8.14k|#define janet_unwrap_number(x) ((x).number)
  ------------------
  |  Branch (438:55): [True: 1.57k, False: 6.56k]
  ------------------
  439|   599k|        return janet_dict_find_deep(buckets, cap, key);
  440|  10.4M|    } else {
  441|  10.4M|        hash = janet_hash(key);
  442|  10.4M|    }
  443|  55.4M|    uint32_t mask = (uint32_t) cap - 1;
  444|  55.4M|    uint32_t i = (uint32_t) hash & mask;
  445|  55.4M|    const JanetKV *first_bucket = NULL;
  446|  71.6M|    for (int32_t n = 0; n < cap; n++, i = (i + 1) & mask) {
  ------------------
  |  Branch (446:25): [True: 71.6M, False: 0]
  ------------------
  447|  71.6M|        const JanetKV *kv = buckets + i;
  448|  71.6M|        if (janet_bitwise_same(kv->key, key)) return kv;
  ------------------
  |  |  401|  71.6M|#define janet_bitwise_same(x, y) (janet_u64(x) == janet_u64(y))
  |  |  ------------------
  |  |  |  |  788|  71.6M|#define janet_u64(x) ((x).u64)
  |  |  ------------------
  |  |               #define janet_bitwise_same(x, y) (janet_u64(x) == janet_u64(y))
  |  |  ------------------
  |  |  |  |  788|  71.6M|#define janet_u64(x) ((x).u64)
  |  |  ------------------
  |  |  |  Branch (401:34): [True: 2.22M, False: 69.4M]
  |  |  ------------------
  ------------------
  449|  69.4M|        if (janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|  69.4M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 53.2M, False: 16.2M]
  |  |  |  Branch (806:6): [Folded, False: 69.4M]
  |  |  ------------------
  |  |  807|  69.4M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  69.4M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  69.4M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  69.4M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  69.4M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  69.4M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  450|  53.2M|            if (janet_checktype(kv->value, JANET_NIL)) return kv;
  ------------------
  |  |  806|  53.2M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 53.2M, False: 6.64k]
  |  |  |  Branch (806:6): [Folded, False: 53.2M]
  |  |  ------------------
  |  |  807|  53.2M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  53.2M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  53.2M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  53.2M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  53.2M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  53.2M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  451|  6.64k|            if (NULL == first_bucket) first_bucket = kv;
  ------------------
  |  Branch (451:17): [True: 4.09k, False: 2.54k]
  ------------------
  452|  6.64k|        }
  453|  69.4M|    }
  454|      0|    return first_bucket;
  455|  55.4M|}
janet.c:janet_symcache_findmem:
35035|  39.5M|    int *success) {
35036|  39.5M|    uint32_t bounds[4];
35037|  39.5M|    uint32_t i, j, index;
35038|  39.5M|    const uint8_t **firstEmpty = NULL;
35039|       |
35040|       |    /* We will search two ranges - index to the end,
35041|       |     * and 0 to the index. */
35042|  39.5M|    index = (uint32_t)hash & (janet_vm.cache_capacity - 1);
35043|  39.5M|    bounds[0] = index;
35044|  39.5M|    bounds[1] = janet_vm.cache_capacity;
35045|  39.5M|    bounds[2] = 0;
35046|  39.5M|    bounds[3] = index;
35047|  39.5M|    for (j = 0; j < 4; j += 2)
  ------------------
  |  Branch (35047:17): [True: 39.5M, False: 0]
  ------------------
35048|  61.5M|        for (i = bounds[j]; i < bounds[j + 1]; ++i) {
  ------------------
  |  Branch (35048:29): [True: 61.5M, False: 12.4k]
  ------------------
35049|  61.5M|            const uint8_t *test = janet_vm.cache[i];
35050|       |            /* Check empty spots */
35051|  61.5M|            if (NULL == test) {
  ------------------
  |  Branch (35051:17): [True: 21.9M, False: 39.5M]
  ------------------
35052|  21.9M|                if (NULL == firstEmpty)
  ------------------
  |  Branch (35052:21): [True: 21.9M, False: 0]
  ------------------
35053|  21.9M|                    firstEmpty = janet_vm.cache + i;
35054|  21.9M|                goto notfound;
35055|  21.9M|            }
35056|       |            /* Check for marked deleted */
35057|  39.5M|            if (JANET_SYMCACHE_DELETED == test) {
  ------------------
  |  Branch (35057:17): [True: 6.20k, False: 39.5M]
  ------------------
35058|  6.20k|                if (firstEmpty == NULL)
  ------------------
  |  Branch (35058:21): [True: 6.20k, False: 0]
  ------------------
35059|  6.20k|                    firstEmpty = janet_vm.cache + i;
35060|  6.20k|                continue;
35061|  6.20k|            }
35062|  39.5M|            if (janet_string_equalconst(test, str, len, hash)) {
  ------------------
  |  Branch (35062:17): [True: 17.6M, False: 21.9M]
  ------------------
35063|       |                /* Replace first deleted */
35064|  17.6M|                *success = 1;
35065|  17.6M|                if (firstEmpty != NULL) {
  ------------------
  |  Branch (35065:21): [True: 6.20k, False: 17.5M]
  ------------------
35066|  6.20k|                    *firstEmpty = test;
35067|  6.20k|                    janet_vm.cache[i] = JANET_SYMCACHE_DELETED;
35068|  6.20k|                    return firstEmpty;
35069|  6.20k|                }
35070|  17.5M|                return janet_vm.cache + i;
35071|  17.6M|            }
35072|  39.5M|        }
35073|  21.9M|notfound:
35074|  21.9M|    *success = 0;
35075|  21.9M|    janet_assert(firstEmpty != NULL, "symcache failed to get memory");
  ------------------
  |  |  389|  21.9M|#define janet_assert(c, m) do { \
  |  |  390|  21.9M|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  378|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  379|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  380|      0|        __FILE__,\
  |  |  |  |  381|      0|        __LINE__,\
  |  |  |  |  382|      0|        (m));\
  |  |  |  |  383|      0|    abort();\
  |  |  |  |  384|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (384:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (390:9): [True: 0, False: 21.9M]
  |  |  ------------------
  |  |  391|  21.9M|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 21.9M]
  |  |  ------------------
  ------------------
35076|  21.9M|    return firstEmpty;
35077|  21.9M|}
janet.c:janet_symcache_put:
35113|  12.4M|static void janet_symcache_put(const uint8_t *x, const uint8_t **bucket) {
35114|  12.4M|    if ((janet_vm.cache_count + janet_vm.cache_deleted) * 2 > janet_vm.cache_capacity) {
  ------------------
  |  Branch (35114:9): [True: 12.4k, False: 12.3M]
  ------------------
35115|  12.4k|        int status;
35116|  12.4k|        janet_cache_resize(janet_tablen((2 * janet_vm.cache_count + 1)));
35117|  12.4k|        bucket = janet_symcache_find(x, &status);
  ------------------
  |  |35080|  12.4k|    janet_symcache_findmem((str), janet_string_length(str), janet_string_hash(str), (success))
  |  |  ------------------
  |  |  |  | 1813|  12.4k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1812|  12.4k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   janet_symcache_findmem((str), janet_string_length(str), janet_string_hash(str), (success))
  |  |  ------------------
  |  |  |  | 1814|  12.4k|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1812|  12.4k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35118|  12.4k|    }
35119|       |    /* Add x to the cache */
35120|  12.4M|    janet_vm.cache_count++;
35121|  12.4M|    *bucket = x;
35122|  12.4M|}
janet.c:janet_cache_resize:
35083|  12.4k|static void janet_cache_resize(uint32_t newCapacity) {
35084|  12.4k|    uint32_t i, oldCapacity;
35085|  12.4k|    const uint8_t **oldCache = janet_vm.cache;
35086|  12.4k|    const uint8_t **newCache = janet_calloc(1, (size_t) newCapacity * sizeof(const uint8_t *));
  ------------------
  |  | 2412|  12.4k|#define janet_calloc(X, Y) calloc((X), (Y))
  ------------------
35087|  12.4k|    if (newCache == NULL) {
  ------------------
  |  Branch (35087:9): [True: 0, False: 12.4k]
  ------------------
35088|      0|        JANET_OUT_OF_MEMORY;
  ------------------
  |  |  419|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (419:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
35089|      0|    }
35090|  12.4k|    oldCapacity = janet_vm.cache_capacity;
35091|  12.4k|    janet_vm.cache = newCache;
35092|  12.4k|    janet_vm.cache_capacity = newCapacity;
35093|  12.4k|    janet_vm.cache_deleted = 0;
35094|       |    /* Add all of the old cache entries back */
35095|  19.0M|    for (i = 0; i < oldCapacity; ++i) {
  ------------------
  |  Branch (35095:17): [True: 19.0M, False: 12.4k]
  ------------------
35096|  19.0M|        int status;
35097|  19.0M|        const uint8_t **bucket;
35098|  19.0M|        const uint8_t *x = oldCache[i];
35099|  19.0M|        if (x != NULL && x != JANET_SYMCACHE_DELETED) {
  ------------------
  |  Branch (35099:13): [True: 9.54M, False: 9.51M]
  |  Branch (35099:26): [True: 9.54M, False: 0]
  ------------------
35100|  9.54M|            bucket = janet_symcache_find(x, &status);
  ------------------
  |  |35080|  9.54M|    janet_symcache_findmem((str), janet_string_length(str), janet_string_hash(str), (success))
  |  |  ------------------
  |  |  |  | 1813|  9.54M|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1812|  9.54M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   janet_symcache_findmem((str), janet_string_length(str), janet_string_hash(str), (success))
  |  |  ------------------
  |  |  |  | 1814|  9.54M|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1812|  9.54M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35101|  9.54M|            if (status || bucket == NULL) {
  ------------------
  |  Branch (35101:17): [True: 0, False: 9.54M]
  |  Branch (35101:27): [True: 0, False: 9.54M]
  ------------------
35102|       |                /* there was a problem with the algorithm. */
35103|      0|                break;
35104|      0|            }
35105|  9.54M|            *bucket = x;
35106|  9.54M|        }
35107|  19.0M|    }
35108|       |    /* Free the old cache */
35109|  12.4k|    janet_free((void *)oldCache);
  ------------------
  |  | 2415|  12.4k|#define janet_free(X) free((X))
  ------------------
35110|  12.4k|}
janet.c:janet_table_init_impl:
35254|  4.71M|static JanetTable *janet_table_init_impl(JanetTable *table, int32_t capacity, int stackalloc) {
35255|  4.71M|    JanetKV *data;
35256|  4.71M|    capacity = janet_tablen(capacity);
35257|  4.71M|    if (stackalloc) table->gc.flags = JANET_TABLE_FLAG_STACK;
  ------------------
  |  |35240|   140k|#define JANET_TABLE_FLAG_STACK 0x10000
  ------------------
  |  Branch (35257:9): [True: 140k, False: 4.57M]
  ------------------
35258|  4.71M|    if (capacity) {
  ------------------
  |  Branch (35258:9): [True: 4.71M, False: 0]
  ------------------
35259|  4.71M|        if (stackalloc) {
  ------------------
  |  Branch (35259:13): [True: 140k, False: 4.57M]
  ------------------
35260|   140k|            data = janet_memalloc_empty_local(capacity);
35261|  4.57M|        } else {
35262|  4.57M|            data = (JanetKV *) janet_memalloc_empty(capacity);
35263|  4.57M|            if (NULL == data) {
  ------------------
  |  Branch (35263:17): [True: 0, False: 4.57M]
  ------------------
35264|      0|                JANET_OUT_OF_MEMORY;
  ------------------
  |  |  419|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (419:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
35265|      0|            }
35266|  4.57M|        }
35267|  4.71M|        table->data = data;
35268|  4.71M|        table->capacity = capacity;
35269|  4.71M|    } else {
35270|      0|        table->data = NULL;
35271|      0|        table->capacity = 0;
35272|      0|    }
35273|  4.71M|    table->count = 0;
35274|  4.71M|    table->deleted = 0;
35275|       |    table->proto = NULL;
35276|  4.71M|    return table;
35277|  4.71M|}
janet.c:janet_memalloc_empty_local:
35242|   143k|static void *janet_memalloc_empty_local(int32_t count) {
35243|   143k|    int32_t i;
35244|   143k|    void *mem = janet_smalloc((size_t) count * sizeof(JanetKV));
35245|   143k|    JanetKV *mmem = (JanetKV *)mem;
35246|  2.48M|    for (i = 0; i < count; i++) {
  ------------------
  |  Branch (35246:17): [True: 2.33M, False: 143k]
  ------------------
35247|  2.33M|        JanetKV *kv = mmem + i;
35248|  2.33M|        kv->key = janet_wrap_nil();
  ------------------
  |  |  831|  2.33M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  2.33M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.33M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.33M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35249|  2.33M|        kv->value = janet_wrap_nil();
  ------------------
  |  |  831|  2.33M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  2.33M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.33M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.33M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35250|  2.33M|    }
35251|   143k|    return mem;
35252|   143k|}
janet.c:janet_table_rehash:
35327|  3.68M|static void janet_table_rehash(JanetTable *t, int32_t size) {
35328|  3.68M|    JanetKV *olddata = t->data;
35329|  3.68M|    JanetKV *newdata;
35330|  3.68M|    int islocal = t->gc.flags & JANET_TABLE_FLAG_STACK;
  ------------------
  |  |35240|  3.68M|#define JANET_TABLE_FLAG_STACK 0x10000
  ------------------
35331|  3.68M|    if (islocal) {
  ------------------
  |  Branch (35331:9): [True: 3.51k, False: 3.68M]
  ------------------
35332|  3.51k|        newdata = (JanetKV *) janet_memalloc_empty_local(size);
35333|  3.68M|    } else {
35334|  3.68M|        newdata = (JanetKV *) janet_memalloc_empty(size);
35335|  3.68M|        if (NULL == newdata) {
  ------------------
  |  Branch (35335:13): [True: 0, False: 3.68M]
  ------------------
35336|      0|            JANET_OUT_OF_MEMORY;
  ------------------
  |  |  419|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (419:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
35337|      0|        }
35338|  3.68M|    }
35339|  3.68M|    int32_t oldcapacity = t->capacity;
35340|  3.68M|    t->data = newdata;
35341|  3.68M|    t->capacity = size;
35342|  3.68M|    t->deleted = 0;
35343|  44.3M|    for (int32_t i = 0; i < oldcapacity; i++) {
  ------------------
  |  Branch (35343:25): [True: 40.6M, False: 3.68M]
  ------------------
35344|  40.6M|        JanetKV *kv = olddata + i;
35345|  40.6M|        if (!janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|  40.6M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 40.6M]
  |  |  ------------------
  |  |  807|  40.6M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  40.6M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  40.6M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  40.6M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  40.6M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  40.6M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35345:13): [True: 20.3M, False: 20.3M]
  ------------------
35346|  20.3M|            JanetKV *newkv = janet_table_find(t, kv->key);
35347|  20.3M|            *newkv = *kv;
35348|  20.3M|        }
35349|  40.6M|    }
35350|  3.68M|    if (islocal) {
  ------------------
  |  Branch (35350:9): [True: 3.51k, False: 3.68M]
  ------------------
35351|  3.51k|        janet_sfree(olddata);
35352|  3.68M|    } else {
35353|  3.68M|        janet_free(olddata);
  ------------------
  |  | 2415|  3.68M|#define janet_free(X) free((X))
  ------------------
35354|  3.68M|    }
35355|  3.68M|}
janet.c:janet_check_pointer_align:
36416|  2.24M|static void janet_check_pointer_align(void *p) {
36417|  2.24M|    (void) p;
36418|       |#if defined(JANET_NANBOX_64) && JANET_NANBOX_64_POINTER_SHIFT != 0
36419|       |    union {
36420|       |        void *p;
36421|       |        uintptr_t u;
36422|       |    } un;
36423|       |    un.p = p;
36424|       |    janet_assert(!(un.u & (uintptr_t)((1 << JANET_NANBOX_64_POINTER_SHIFT) - 1)),
36425|       |                 "unaligned pointer wrap - cfunction pointers and abstract types must be aligned with this nanboxing configuration.");
36426|       |#endif
36427|  2.24M|}
janet.c:janet_equals_containers:
37327|  48.0k|static int janet_equals_containers(Janet x, Janet y) {
37328|  48.0k|    janet_vm.traversal = janet_vm.traversal_base;
37329|  50.1k|    do {
37330|  50.1k|        if (janet_type(x) != janet_type(y)) return 0;
  ------------------
  |  |  795|  50.1k|    (isnan((x).number) \
  |  |  796|  50.1k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  50.1k|        : JANET_NUMBER)
  ------------------
                      if (janet_type(x) != janet_type(y)) return 0;
  ------------------
  |  |  795|  50.1k|    (isnan((x).number) \
  |  |  796|  50.1k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  50.1k|        : JANET_NUMBER)
  ------------------
  |  Branch (37330:13): [True: 50.0k, False: 117]
  |  Branch (37330:13): [True: 42, False: 50.1k]
  |  Branch (37330:30): [True: 50.0k, False: 117]
  ------------------
37331|  50.1k|        switch (janet_type(x)) {
  ------------------
  |  |  795|  50.1k|    (isnan((x).number) \
  |  |  796|  50.1k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  50.1k|        : JANET_NUMBER)
  ------------------
  |  Branch (37331:17): [True: 49.9k, False: 115]
  ------------------
37332|  1.52k|            default:
  ------------------
  |  Branch (37332:13): [True: 1.52k, False: 48.5k]
  ------------------
37333|  1.52k|                if (!janet_equals_leaf(x, y)) return 0;
  ------------------
  |  Branch (37333:21): [True: 43, False: 1.48k]
  ------------------
37334|  1.48k|                break;
37335|  47.5k|            case JANET_TUPLE: {
  ------------------
  |  Branch (37335:13): [True: 47.5k, False: 2.53k]
  ------------------
37336|  47.5k|                const Janet *t1 = janet_unwrap_tuple(x);
  ------------------
  |  |  858|  47.5k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
37337|  47.5k|                const Janet *t2 = janet_unwrap_tuple(y);
  ------------------
  |  |  858|  47.5k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
37338|  47.5k|                if (t1 == t2) break;
  ------------------
  |  Branch (37338:21): [True: 0, False: 47.5k]
  ------------------
37339|  47.5k|                if (JANET_TUPLE_FLAG_BRACKETCTOR & (janet_tuple_flag(t1) ^ janet_tuple_flag(t2))) return 0;
  ------------------
  |  | 1798|  47.5k|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
                              if (JANET_TUPLE_FLAG_BRACKETCTOR & (janet_tuple_flag(t1) ^ janet_tuple_flag(t2))) return 0;
  ------------------
  |  | 1806|  47.5k|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1800|  47.5k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                              if (JANET_TUPLE_FLAG_BRACKETCTOR & (janet_tuple_flag(t1) ^ janet_tuple_flag(t2))) return 0;
  ------------------
  |  | 1806|  47.5k|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1800|  47.5k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (37339:21): [True: 857, False: 46.7k]
  ------------------
37340|  46.7k|                if (janet_tuple_hash(t1) != janet_tuple_hash(t2)) return 0;
  ------------------
  |  | 1803|  46.7k|#define janet_tuple_hash(t) (janet_tuple_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1800|  46.7k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                              if (janet_tuple_hash(t1) != janet_tuple_hash(t2)) return 0;
  ------------------
  |  | 1803|  46.7k|#define janet_tuple_hash(t) (janet_tuple_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1800|  46.7k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (37340:21): [True: 45.9k, False: 770]
  ------------------
37341|    770|                if (janet_tuple_length(t1) != janet_tuple_length(t2)) return 0;
  ------------------
  |  | 1802|    770|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1800|    770|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                              if (janet_tuple_length(t1) != janet_tuple_length(t2)) return 0;
  ------------------
  |  | 1802|    770|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1800|    770|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (37341:21): [True: 0, False: 770]
  ------------------
37342|    770|                push_traversal_node(janet_tuple_head(t1), janet_tuple_head(t2), 0);
  ------------------
  |  | 1800|    770|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  ------------------
                              push_traversal_node(janet_tuple_head(t1), janet_tuple_head(t2), 0);
  ------------------
  |  | 1800|    770|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  ------------------
37343|    770|                break;
37344|    770|            }
37345|  1.00k|            case JANET_STRUCT: {
  ------------------
  |  Branch (37345:13): [True: 1.00k, False: 49.1k]
  ------------------
37346|  1.00k|                const JanetKV *s1 = janet_unwrap_struct(x);
  ------------------
  |  |  857|  1.00k|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
37347|  1.00k|                const JanetKV *s2 = janet_unwrap_struct(y);
  ------------------
  |  |  857|  1.00k|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
37348|  1.00k|                if (s1 == s2) break;
  ------------------
  |  Branch (37348:21): [True: 0, False: 1.00k]
  ------------------
37349|  1.00k|                if (janet_struct_hash(s1) != janet_struct_hash(s2)) return 0;
  ------------------
  |  | 1850|  1.00k|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1846|  1.00k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                              if (janet_struct_hash(s1) != janet_struct_hash(s2)) return 0;
  ------------------
  |  | 1850|  1.00k|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1846|  1.00k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (37349:21): [True: 838, False: 167]
  ------------------
37350|    167|                if (janet_struct_length(s1) != janet_struct_length(s2)) return 0;
  ------------------
  |  | 1848|    167|#define janet_struct_length(t) (janet_struct_head(t)->length)
  |  |  ------------------
  |  |  |  | 1846|    167|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                              if (janet_struct_length(s1) != janet_struct_length(s2)) return 0;
  ------------------
  |  | 1848|    167|#define janet_struct_length(t) (janet_struct_head(t)->length)
  |  |  ------------------
  |  |  |  | 1846|    167|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (37350:21): [True: 0, False: 167]
  ------------------
37351|    167|                if (janet_struct_proto(s1) && !janet_struct_proto(s2)) return 0;
  ------------------
  |  | 1851|    334|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1846|    167|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  |  |  |  Branch (1851:31): [True: 0, False: 167]
  |  |  ------------------
  ------------------
                              if (janet_struct_proto(s1) && !janet_struct_proto(s2)) return 0;
  ------------------
  |  | 1851|      0|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1846|      0|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (37351:47): [True: 0, False: 0]
  ------------------
37352|    167|                if (!janet_struct_proto(s1) && janet_struct_proto(s2)) return 0;
  ------------------
  |  | 1851|    334|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1846|    167|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                              if (!janet_struct_proto(s1) && janet_struct_proto(s2)) return 0;
  ------------------
  |  | 1851|    167|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1846|    167|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  |  |  |  Branch (1851:31): [True: 0, False: 167]
  |  |  ------------------
  ------------------
  |  Branch (37352:21): [True: 167, False: 0]
  ------------------
37353|    167|                push_traversal_node(janet_struct_head(s1), janet_struct_head(s2), 0);
  ------------------
  |  | 1846|    167|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  ------------------
                              push_traversal_node(janet_struct_head(s1), janet_struct_head(s2), 0);
  ------------------
  |  | 1846|    167|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  ------------------
37354|    167|                break;
37355|    167|            }
37356|  50.1k|        }
37357|  50.1k|    } while (!traversal_next(&x, &y));
  ------------------
  |  Branch (37357:14): [True: 2.06k, False: 355]
  ------------------
37358|    355|    return 1;
37359|  48.0k|}
janet.c:janet_equals_leaf:
37314|  3.90k|static int janet_equals_leaf(Janet x, Janet y) {
37315|  3.90k|    switch (janet_type(x)) {
  ------------------
  |  |  795|  3.90k|    (isnan((x).number) \
  |  |  796|  3.90k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  3.90k|        : JANET_NUMBER)
  ------------------
  |  Branch (37315:13): [True: 3.63k, False: 267]
  ------------------
37316|    267|        case JANET_NUMBER:
  ------------------
  |  Branch (37316:9): [True: 267, False: 3.63k]
  ------------------
37317|    267|            return janet_unwrap_number(x) == janet_unwrap_number(y);
  ------------------
  |  |  839|    267|#define janet_unwrap_number(x) ((x).number)
  ------------------
                          return janet_unwrap_number(x) == janet_unwrap_number(y);
  ------------------
  |  |  839|    267|#define janet_unwrap_number(x) ((x).number)
  ------------------
37318|  2.09k|        case JANET_STRING:
  ------------------
  |  Branch (37318:9): [True: 2.09k, False: 1.81k]
  ------------------
37319|  2.09k|            return janet_string_equal(janet_unwrap_string(x), janet_unwrap_string(y));
  ------------------
  |  |  863|  2.09k|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
                          return janet_string_equal(janet_unwrap_string(x), janet_unwrap_string(y));
  ------------------
  |  |  863|  2.09k|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
37320|    272|        case JANET_ABSTRACT:
  ------------------
  |  Branch (37320:9): [True: 272, False: 3.62k]
  ------------------
37321|    272|            return !janet_compare_abstract(janet_unwrap_abstract(x), janet_unwrap_abstract(y));
  ------------------
  |  |  866|    272|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
                          return !janet_compare_abstract(janet_unwrap_abstract(x), janet_unwrap_abstract(y));
  ------------------
  |  |  866|    272|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
37322|  1.27k|        default:
  ------------------
  |  Branch (37322:9): [True: 1.27k, False: 2.62k]
  ------------------
37323|  1.27k|            return janet_bitwise_same(x, y);
  ------------------
  |  |  401|  1.27k|#define janet_bitwise_same(x, y) (janet_u64(x) == janet_u64(y))
  |  |  ------------------
  |  |  |  |  788|  1.27k|#define janet_u64(x) ((x).u64)
  |  |  ------------------
  |  |               #define janet_bitwise_same(x, y) (janet_u64(x) == janet_u64(y))
  |  |  ------------------
  |  |  |  |  788|  1.27k|#define janet_u64(x) ((x).u64)
  |  |  ------------------
  ------------------
37324|  3.90k|    }
37325|  3.90k|}
janet.c:murmur64:
37367|  19.2M|static uint64_t murmur64(uint64_t h) {
37368|  19.2M|    h ^= h >> 33;
37369|  19.2M|    h *= 0xff51afd7ed558ccdUL;
37370|  19.2M|    h ^= h >> 33;
37371|  19.2M|    h *= 0xc4ceb9fe1a85ec53UL;
37372|  19.2M|    h ^= h >> 33;
37373|  19.2M|    return h;
37374|  19.2M|}
janet.c:janet_compare_abstract:
37300|  1.28k|static int janet_compare_abstract(JanetAbstract xx, JanetAbstract yy) {
37301|  1.28k|    if (xx == yy) return 0;
  ------------------
  |  Branch (37301:9): [True: 0, False: 1.28k]
  ------------------
37302|  1.28k|    const JanetAbstractType *xt = janet_abstract_type(xx);
  ------------------
  |  | 1899|  1.28k|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|  1.28k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
37303|  1.28k|    const JanetAbstractType *yt = janet_abstract_type(yy);
  ------------------
  |  | 1899|  1.28k|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|  1.28k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
37304|  1.28k|    if (xt != yt) {
  ------------------
  |  Branch (37304:9): [True: 439, False: 841]
  ------------------
37305|    439|        return xt > yt ? 1 : -1;
  ------------------
  |  Branch (37305:16): [True: 139, False: 300]
  ------------------
37306|    439|    }
37307|    841|    if (xt->compare == NULL) {
  ------------------
  |  Branch (37307:9): [True: 55, False: 786]
  ------------------
37308|     55|        return xx > yy ? 1 : -1;
  ------------------
  |  Branch (37308:16): [True: 13, False: 42]
  ------------------
37309|     55|    }
37310|    786|    return xt->compare(xx, yy);
37311|    841|}
janet.c:push_traversal_node:
37098|  4.74k|static void push_traversal_node(void *lhs, void *rhs, int32_t index2) {
37099|  4.74k|    JanetTraversalNode node;
37100|  4.74k|    node.self = (JanetGCObject *) lhs;
37101|  4.74k|    node.other = (JanetGCObject *) rhs;
37102|  4.74k|    node.index = 0;
37103|  4.74k|    node.index2 = index2;
37104|  4.74k|    int is_new = janet_vm.traversal_base == NULL;
37105|  4.74k|    if (is_new || (janet_vm.traversal + 1 >= janet_vm.traversal_top)) {
  ------------------
  |  Branch (37105:9): [True: 372, False: 4.37k]
  |  Branch (37105:19): [True: 0, False: 4.37k]
  ------------------
37106|    372|        size_t oldsize = is_new ? 0 : (janet_vm.traversal - janet_vm.traversal_base);
  ------------------
  |  Branch (37106:26): [True: 372, False: 0]
  ------------------
37107|    372|        size_t newsize = 2 * oldsize + 1;
37108|    372|        if (newsize < 128) {
  ------------------
  |  Branch (37108:13): [True: 372, False: 0]
  ------------------
37109|    372|            newsize = 128;
37110|    372|        }
37111|    372|        JanetTraversalNode *tn = janet_realloc(janet_vm.traversal_base, newsize * sizeof(JanetTraversalNode));
  ------------------
  |  | 2409|    372|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
37112|    372|        if (tn == NULL) {
  ------------------
  |  Branch (37112:13): [True: 0, False: 372]
  ------------------
37113|      0|            JANET_OUT_OF_MEMORY;
  ------------------
  |  |  419|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (419:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
37114|      0|        }
37115|    372|        janet_vm.traversal_base = tn;
37116|    372|        janet_vm.traversal_top = janet_vm.traversal_base + newsize;
37117|    372|        janet_vm.traversal = janet_vm.traversal_base + oldsize;
37118|    372|    }
37119|  4.74k|    *(++janet_vm.traversal) = node;
37120|  4.74k|}
janet.c:traversal_next:
37130|  10.6k|static int traversal_next(Janet *x, Janet *y) {
37131|  10.6k|    JanetTraversalNode *t = janet_vm.traversal;
37132|  12.2k|    while (t && t > janet_vm.traversal_base) {
  ------------------
  |  Branch (37132:12): [True: 11.6k, False: 635]
  |  Branch (37132:17): [True: 10.5k, False: 1.07k]
  ------------------
37133|  10.5k|        JanetGCObject *self = t->self;
37134|  10.5k|        JanetTupleHead *tself = (JanetTupleHead *)self;
37135|  10.5k|        JanetStructHead *sself = (JanetStructHead *)self;
37136|  10.5k|        JanetGCObject *other = t->other;
37137|  10.5k|        JanetTupleHead *tother = (JanetTupleHead *)other;
37138|  10.5k|        JanetStructHead *sother = (JanetStructHead *)other;
37139|  10.5k|        if ((self->flags & JANET_MEM_TYPEBITS) == JANET_MEMORY_TUPLE) {
  ------------------
  |  |  675|  10.5k|#define JANET_MEM_TYPEBITS 0xFF
  ------------------
  |  Branch (37139:13): [True: 8.07k, False: 2.50k]
  ------------------
37140|       |            /* Node is a tuple at index t->index */
37141|  8.07k|            if (t->index < tself->length && t->index < tother->length) {
  ------------------
  |  Branch (37141:17): [True: 6.98k, False: 1.08k]
  |  Branch (37141:45): [True: 6.94k, False: 42]
  ------------------
37142|  6.94k|                int32_t index = t->index++;
37143|  6.94k|                *x = tself->data[index];
37144|  6.94k|                *y = tother->data[index];
37145|  6.94k|                janet_vm.traversal = t;
37146|  6.94k|                return 0;
37147|  6.94k|            }
37148|  1.12k|            if (t->index2 && tself->length != tother->length) {
  ------------------
  |  Branch (37148:17): [True: 421, False: 706]
  |  Branch (37148:30): [True: 72, False: 349]
  ------------------
37149|     72|                return tself->length > tother->length ? 3 : 1;
  ------------------
  |  Branch (37149:24): [True: 42, False: 30]
  ------------------
37150|     72|            }
37151|  2.50k|        } else {
37152|       |            /* Node is a struct at index t->index: if t->index2 is true, we should return the values. */
37153|  2.50k|            if (t->index2) {
  ------------------
  |  Branch (37153:17): [True: 959, False: 1.54k]
  ------------------
37154|    959|                t->index2 = 0;
37155|    959|                int32_t index = t->index++;
37156|    959|                *x = sself->data[index].value;
37157|    959|                *y = sother->data[index].value;
37158|    959|                janet_vm.traversal = t;
37159|    959|                return 0;
37160|    959|            }
37161|  1.54k|            for (int32_t i = t->index; i < sself->capacity; i++) {
  ------------------
  |  Branch (37161:40): [True: 959, False: 587]
  ------------------
37162|    959|                t->index2 = 1;
37163|    959|                *x = sself->data[t->index].key;
37164|    959|                *y = sother->data[t->index].key;
37165|    959|                janet_vm.traversal = t;
37166|    959|                return 0;
37167|    959|            }
37168|       |            /* Traverse prototype */
37169|    587|            JanetStruct sproto = sself->proto;
37170|    587|            JanetStruct oproto = sother->proto;
37171|    587|            if (sproto && !oproto) return 3;
  ------------------
  |  Branch (37171:17): [True: 0, False: 587]
  |  Branch (37171:27): [True: 0, False: 0]
  ------------------
37172|    587|            if (!sproto && oproto) return 1;
  ------------------
  |  Branch (37172:17): [True: 587, False: 0]
  |  Branch (37172:28): [True: 0, False: 587]
  ------------------
37173|    587|            if (oproto && sproto) {
  ------------------
  |  Branch (37173:17): [True: 0, False: 587]
  |  Branch (37173:27): [True: 0, False: 0]
  ------------------
37174|      0|                *x = janet_wrap_struct(sproto);
  ------------------
  |  |  842|      0|#define janet_wrap_struct(s) janet_nanbox_wrap_c((s), JANET_STRUCT)
  |  |  ------------------
  |  |  |  |  828|      0|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37175|      0|                *y = janet_wrap_struct(oproto);
  ------------------
  |  |  842|      0|#define janet_wrap_struct(s) janet_nanbox_wrap_c((s), JANET_STRUCT)
  |  |  ------------------
  |  |  |  |  828|      0|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37176|      0|                janet_vm.traversal = t - 1;
37177|      0|                return 0;
37178|      0|            }
37179|    587|        }
37180|  1.64k|        t--;
37181|  1.64k|    }
37182|  1.70k|    janet_vm.traversal = t;
37183|  1.70k|    return 2;
37184|  10.6k|}

LLVMFuzzerTestOneInput:
    7|  6.20k|int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
    8|  6.20k|    if (size < 2 || size > JANET_PEG_FUZZ_MAX_INPUT)
  ------------------
  |  |    5|  6.20k|#define JANET_PEG_FUZZ_MAX_INPUT (1U << 20)
  ------------------
  |  Branch (8:9): [True: 1, False: 6.20k]
  |  Branch (8:21): [True: 0, False: 6.20k]
  ------------------
    9|      1|        return 0;
   10|       |
   11|       |    /* Byte 0 selects the split point for a Janet PEG pattern and subject. */
   12|  6.20k|    size_t patlen = (size_t)data[0] % (size - 1);
   13|  6.20k|    const uint8_t *patsrc = data + 1;
   14|  6.20k|    const uint8_t *text = data + 1 + patlen;
   15|  6.20k|    size_t textlen = size - 1 - patlen;
   16|       |
   17|  6.20k|    janet_init();
   18|       |
   19|  6.20k|    JanetParser parser;
   20|  6.20k|    janet_parser_init(&parser);
   21|  6.20k|    Janet matchfn = janet_resolve_core("peg/match");
   22|  6.20k|    if (janet_checktype(matchfn, JANET_CFUNCTION)) {
  ------------------
  |  |  806|  6.20k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 6.20k, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 6.20k]
  |  |  ------------------
  |  |  807|  6.20k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  6.20k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  6.20k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  6.20k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  6.20k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  6.20k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   23|  6.20k|        JanetCFunction cfun = janet_unwrap_cfunction(matchfn);
  ------------------
  |  |  869|  6.20k|#define janet_unwrap_cfunction(x) ((JanetCFunction)janet_nanbox_to_pointer(x))
  ------------------
   24|       |
   25|       |        /* Stop after parser errors: consuming again would panic. */
   26|   255k|        for (size_t i = 0; i < patlen; i++) {
  ------------------
  |  Branch (26:28): [True: 249k, False: 5.52k]
  ------------------
   27|   249k|            janet_parser_consume(&parser, patsrc[i]);
   28|   249k|            if (janet_parser_status(&parser) == JANET_PARSE_ERROR)
  ------------------
  |  Branch (28:17): [True: 677, False: 249k]
  ------------------
   29|    677|                break;
   30|   249k|        }
   31|  6.20k|        if (janet_parser_status(&parser) != JANET_PARSE_ERROR)
  ------------------
  |  Branch (31:13): [True: 5.52k, False: 677]
  ------------------
   32|  5.52k|            janet_parser_eof(&parser);
   33|       |
   34|  6.20k|        if (janet_parser_status(&parser) != JANET_PARSE_ERROR &&
  ------------------
  |  Branch (34:13): [True: 4.13k, False: 2.07k]
  ------------------
   35|  4.13k|                janet_parser_has_more(&parser)) {
  ------------------
  |  Branch (35:17): [True: 4.04k, False: 86]
  ------------------
   36|  4.04k|            Janet pattern = janet_parser_produce(&parser);
   37|  4.04k|            JanetTryState tstate;
   38|  4.04k|            if (janet_try(&tstate) == JANET_SIGNAL_OK) {
  ------------------
  |  | 1981|  4.04k|#define janet_try(state) (janet_try_init(state), (JanetSignal) setjmp((state)->buf))
  ------------------
  |  Branch (38:17): [True: 4.04k, False: 0]
  ------------------
   39|  4.04k|                Janet argv[2];
   40|  4.04k|                argv[0] = pattern;
   41|  4.04k|                argv[1] = janet_stringv(text, (int32_t)textlen);
  ------------------
  |  | 1827|  4.04k|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  848|  4.04k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  4.04k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  4.04k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  4.04k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   42|  4.04k|                cfun(2, argv);
   43|  4.04k|            }
   44|  4.04k|            janet_restore(&tstate);
   45|  4.04k|        }
   46|  6.20k|    }
   47|       |
   48|  6.20k|    janet_parser_deinit(&parser);
   49|  6.20k|    janet_deinit();
   50|  6.20k|    return 0;
   51|  6.20k|}

