janet_abstract_begin:
 1389|  26.0k|void *janet_abstract_begin(const JanetAbstractType *atype, size_t size) {
 1390|  26.0k|    JanetAbstractHead *header = janet_gcalloc(JANET_MEMORY_NONE,
 1391|  26.0k|        sizeof(JanetAbstractHead) + size);
 1392|  26.0k|    header->size = size;
 1393|  26.0k|    header->type = atype;
 1394|  26.0k|    return (void *) & (header->data);
 1395|  26.0k|}
janet_abstract_end:
 1397|  26.0k|void *janet_abstract_end(void *x) {
 1398|  26.0k|    janet_gc_settype((void *)(janet_abstract_head(x)), JANET_MEMORY_ABSTRACT);
  ------------------
  |  |  679|  26.0k|#define janet_gc_settype(m, t) ((janet_gc_header(m)->flags |= (0xFF & (t))))
  |  |  ------------------
  |  |  |  |  673|  26.0k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  ------------------
 1399|  26.0k|    return x;
 1400|  26.0k|}
janet_abstract:
 1402|  26.0k|void *janet_abstract(const JanetAbstractType *atype, size_t size) {
 1403|  26.0k|    return janet_abstract_end(janet_abstract_begin(atype, size));
 1404|  26.0k|}
janet_array:
 1621|  24.2k|JanetArray *janet_array(int32_t capacity) {
 1622|  24.2k|    JanetArray *array = janet_gcalloc(JANET_MEMORY_ARRAY, sizeof(JanetArray));
 1623|  24.2k|    janet_array_impl(array, capacity);
 1624|  24.2k|    return array;
 1625|  24.2k|}
janet_array_ensure:
 1648|  96.0M|void janet_array_ensure(JanetArray *array, int32_t capacity, int32_t growth) {
 1649|  96.0M|    Janet *newData;
 1650|  96.0M|    Janet *old = array->data;
 1651|  96.0M|    if (capacity <= array->capacity) return;
  ------------------
  |  Branch (1651:9): [True: 96.0M, False: 5.10k]
  ------------------
 1652|  5.10k|    int64_t new_capacity = ((int64_t) capacity) * growth;
 1653|  5.10k|    if (new_capacity > INT32_MAX) new_capacity = INT32_MAX;
  ------------------
  |  Branch (1653:9): [True: 0, False: 5.10k]
  ------------------
 1654|  5.10k|    capacity = (int32_t) new_capacity;
 1655|  5.10k|    newData = janet_realloc(old, capacity * sizeof(Janet));
  ------------------
  |  | 2409|  5.10k|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
 1656|  5.10k|    if (NULL == newData) {
  ------------------
  |  Branch (1656:9): [True: 0, False: 5.10k]
  ------------------
 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|  5.10k|    janet_vm.next_collection += (capacity - array->capacity) * sizeof(Janet);
 1660|  5.10k|    array->data = newData;
 1661|  5.10k|    array->capacity = capacity;
 1662|  5.10k|}
janet_array_push:
 1679|  96.0M|void janet_array_push(JanetArray *array, Janet x) {
 1680|  96.0M|    if (array->count == INT32_MAX) {
  ------------------
  |  Branch (1680:9): [True: 0, False: 96.0M]
  ------------------
 1681|      0|        janet_panic("array overflow");
 1682|      0|    }
 1683|  96.0M|    int32_t newcount = array->count + 1;
 1684|  96.0M|    janet_array_ensure(array, newcount, 2);
 1685|  96.0M|    array->data[array->count] = x;
 1686|  96.0M|    array->count = newcount;
 1687|  96.0M|}
janet_lib_array:
 1978|  6.64k|void janet_lib_array(JanetTable *env) {
 1979|  6.64k|    JanetRegExt array_cfuns[] = {
 1980|  6.64k|        JANET_CORE_REG("array/new", cfun_array_new),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1981|  6.64k|        JANET_CORE_REG("array/weak", cfun_array_weak),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1982|  6.64k|        JANET_CORE_REG("array/new-filled", cfun_array_new_filled),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1983|  6.64k|        JANET_CORE_REG("array/fill", cfun_array_fill),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1984|  6.64k|        JANET_CORE_REG("array/pop", cfun_array_pop),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1985|  6.64k|        JANET_CORE_REG("array/peek", cfun_array_peek),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1986|  6.64k|        JANET_CORE_REG("array/push", cfun_array_push),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1987|  6.64k|        JANET_CORE_REG("array/ensure", cfun_array_ensure),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1988|  6.64k|        JANET_CORE_REG("array/slice", cfun_array_slice),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1989|  6.64k|        JANET_CORE_REG("array/concat", cfun_array_concat),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1990|  6.64k|        JANET_CORE_REG("array/insert", cfun_array_insert),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1991|  6.64k|        JANET_CORE_REG("array/remove", cfun_array_remove),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1992|  6.64k|        JANET_CORE_REG("array/trim", cfun_array_trim),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1993|  6.64k|        JANET_CORE_REG("array/clear", cfun_array_clear),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1994|  6.64k|        JANET_CORE_REG("array/join", cfun_array_join),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1995|  6.64k|        JANET_REG_END
  ------------------
  |  | 2110|  6.64k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
 1996|  6.64k|    };
 1997|       |    janet_core_cfuns_ext(env, NULL, array_cfuns);
 1998|  6.64k|}
janet_lib_asm:
 3143|  6.64k|void janet_lib_asm(JanetTable *env) {
 3144|  6.64k|    JanetRegExt asm_cfuns[] = {
 3145|  6.64k|        JANET_CORE_REG("asm", cfun_asm),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3146|  6.64k|        JANET_CORE_REG("disasm", cfun_disasm),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3147|  6.64k|        JANET_REG_END
  ------------------
  |  | 2110|  6.64k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
 3148|  6.64k|    };
 3149|       |    janet_core_cfuns_ext(env, NULL, asm_cfuns);
 3150|  6.64k|}
janet_buffer_init:
 3211|  10.2M|JanetBuffer *janet_buffer_init(JanetBuffer *buffer, int32_t capacity) {
 3212|  10.2M|    janet_buffer_init_impl(buffer, capacity);
 3213|  10.2M|    buffer->gc.data.next = NULL;
 3214|  10.2M|    buffer->gc.flags = JANET_MEM_DISABLED;
  ------------------
  |  |  677|  10.2M|#define JANET_MEM_DISABLED 0x200
  ------------------
 3215|  10.2M|    return buffer;
 3216|  10.2M|}
janet_buffer_deinit:
 3231|  10.2M|void janet_buffer_deinit(JanetBuffer *buffer) {
 3232|  10.2M|    if (!(buffer->gc.flags & JANET_BUFFER_FLAG_NO_REALLOC)) {
  ------------------
  |  | 1780|  10.2M|#define JANET_BUFFER_FLAG_NO_REALLOC 0x10000
  ------------------
  |  Branch (3232:9): [True: 10.2M, False: 0]
  ------------------
 3233|  10.2M|        janet_free(buffer->data);
  ------------------
  |  | 2415|  10.2M|#define janet_free(X) free((X))
  ------------------
 3234|       |        buffer->data = NULL;
 3235|  10.2M|    }
 3236|  10.2M|}
janet_buffer:
 3239|  12.5k|JanetBuffer *janet_buffer(int32_t capacity) {
 3240|  12.5k|    JanetBuffer *buffer = janet_gcalloc(JANET_MEMORY_BUFFER, sizeof(JanetBuffer));
 3241|  12.5k|    return janet_buffer_init_impl(buffer, capacity);
 3242|  12.5k|}
janet_buffer_extra:
 3275|   303M|void janet_buffer_extra(JanetBuffer *buffer, int32_t n) {
 3276|       |    /* Check for buffer overflow */
 3277|   303M|    if ((int64_t)n + buffer->count > INT32_MAX) {
  ------------------
  |  Branch (3277:9): [True: 0, False: 303M]
  ------------------
 3278|      0|        janet_panic("buffer overflow");
 3279|      0|    }
 3280|   303M|    int32_t new_size = buffer->count + n;
 3281|   303M|    if (new_size > buffer->capacity) {
  ------------------
  |  Branch (3281:9): [True: 10.2M, False: 292M]
  ------------------
 3282|  10.2M|        janet_buffer_can_realloc(buffer);
 3283|  10.2M|        int32_t new_capacity = (new_size > (INT32_MAX / 2)) ? INT32_MAX : (new_size * 2);
  ------------------
  |  Branch (3283:32): [True: 0, False: 10.2M]
  ------------------
 3284|  10.2M|        uint8_t *new_data = janet_realloc(buffer->data, new_capacity * sizeof(uint8_t));
  ------------------
  |  | 2409|  10.2M|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
 3285|  10.2M|        janet_gcpressure(new_capacity - buffer->capacity);
 3286|  10.2M|        if (NULL == new_data) {
  ------------------
  |  Branch (3286:13): [True: 0, False: 10.2M]
  ------------------
 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|  10.2M|        buffer->data = new_data;
 3290|  10.2M|        buffer->capacity = new_capacity;
 3291|  10.2M|    }
 3292|   303M|}
janet_buffer_push_cstring:
 3295|  9.71M|void janet_buffer_push_cstring(JanetBuffer *buffer, const char *cstring) {
 3296|  9.71M|    int32_t len = (int32_t) strlen(cstring);
 3297|  9.71M|    janet_buffer_push_bytes(buffer, (const uint8_t *) cstring, len);
 3298|  9.71M|}
janet_buffer_push_bytes:
 3301|   203M|void janet_buffer_push_bytes(JanetBuffer *buffer, const uint8_t *string, int32_t length) {
 3302|   203M|    if (0 == length) return;
  ------------------
  |  Branch (3302:9): [True: 137M, False: 66.0M]
  ------------------
 3303|  66.0M|    janet_buffer_extra(buffer, length);
 3304|  66.0M|    memcpy(buffer->data + buffer->count, string, length);
 3305|  66.0M|    buffer->count += length;
 3306|  66.0M|}
janet_buffer_push_u8:
 3313|   179M|void janet_buffer_push_u8(JanetBuffer *buffer, uint8_t byte) {
 3314|   179M|    janet_buffer_extra(buffer, 1);
 3315|   179M|    buffer->data[buffer->count] = byte;
 3316|   179M|    buffer->count++;
 3317|   179M|}
janet_lib_buffer:
 3837|  6.64k|void janet_lib_buffer(JanetTable *env) {
 3838|  6.64k|    JanetRegExt buffer_cfuns[] = {
 3839|  6.64k|        JANET_CORE_REG("buffer/new", cfun_buffer_new),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3840|  6.64k|        JANET_CORE_REG("buffer/new-filled", cfun_buffer_new_filled),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3841|  6.64k|        JANET_CORE_REG("buffer/from-bytes", cfun_buffer_frombytes),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3842|  6.64k|        JANET_CORE_REG("buffer/fill", cfun_buffer_fill),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3843|  6.64k|        JANET_CORE_REG("buffer/trim", cfun_buffer_trim),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3844|  6.64k|        JANET_CORE_REG("buffer/push-byte", cfun_buffer_u8),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3845|  6.64k|        JANET_CORE_REG("buffer/push-word", cfun_buffer_word),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3846|  6.64k|        JANET_CORE_REG("buffer/push-string", cfun_buffer_chars),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3847|  6.64k|        JANET_CORE_REG("buffer/push-uint16", cfun_buffer_push_uint16),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3848|  6.64k|        JANET_CORE_REG("buffer/push-uint32", cfun_buffer_push_uint32),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3849|  6.64k|        JANET_CORE_REG("buffer/push-uint64", cfun_buffer_push_uint64),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3850|  6.64k|        JANET_CORE_REG("buffer/push-float32", cfun_buffer_push_float32),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3851|  6.64k|        JANET_CORE_REG("buffer/push-float64", cfun_buffer_push_float64),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3852|  6.64k|        JANET_CORE_REG("buffer/push", cfun_buffer_push),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3853|  6.64k|        JANET_CORE_REG("buffer/push-at", cfun_buffer_push_at),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3854|  6.64k|        JANET_CORE_REG("buffer/popn", cfun_buffer_popn),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3855|  6.64k|        JANET_CORE_REG("buffer/clear", cfun_buffer_clear),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3856|  6.64k|        JANET_CORE_REG("buffer/slice", cfun_buffer_slice),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3857|  6.64k|        JANET_CORE_REG("buffer/bit-set", cfun_buffer_bitset),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3858|  6.64k|        JANET_CORE_REG("buffer/bit-clear", cfun_buffer_bitclear),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3859|  6.64k|        JANET_CORE_REG("buffer/bit", cfun_buffer_bitget),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3860|  6.64k|        JANET_CORE_REG("buffer/bit-toggle", cfun_buffer_bittoggle),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3861|  6.64k|        JANET_CORE_REG("buffer/blit", cfun_buffer_blit),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3862|  6.64k|        JANET_CORE_REG("buffer/format", cfun_buffer_format),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3863|  6.64k|        JANET_CORE_REG("buffer/format-at", cfun_buffer_format_at),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3864|  6.64k|        JANET_REG_END
  ------------------
  |  | 2110|  6.64k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
 3865|  6.64k|    };
 3866|       |    janet_core_cfuns_ext(env, NULL, buffer_cfuns);
 3867|  6.64k|}
janet_verify:
 5644|  3.55M|int janet_verify(JanetFuncDef *def) {
 5645|  3.55M|    int vargs = !!(def->flags & JANET_FUNCDEF_FLAG_VARARG);
  ------------------
  |  | 1097|  3.55M|#define JANET_FUNCDEF_FLAG_VARARG 0x10000
  ------------------
 5646|  3.55M|    int32_t i;
 5647|  3.55M|    int32_t maxslot = def->arity + vargs;
 5648|  3.55M|    int32_t sc = def->slotcount;
 5649|       |
 5650|  3.55M|    if (def->environments_length > 256) return 15;
  ------------------
  |  Branch (5650:9): [True: 0, False: 3.55M]
  ------------------
 5651|  3.55M|    if (def->bytecode_length == 0) return 1;
  ------------------
  |  Branch (5651:9): [True: 0, False: 3.55M]
  ------------------
 5652|       |
 5653|  3.55M|    if (maxslot > sc) return 2;
  ------------------
  |  Branch (5653:9): [True: 0, False: 3.55M]
  ------------------
 5654|       |
 5655|       |    /* Verify each instruction */
 5656|   101M|    for (i = 0; i < def->bytecode_length; i++) {
  ------------------
  |  Branch (5656:17): [True: 98.2M, False: 3.55M]
  ------------------
 5657|  98.2M|        uint32_t instr = def->bytecode[i];
 5658|       |        /* Check for invalid instructions */
 5659|  98.2M|        if ((instr & 0x7F) >= JOP_INSTRUCTION_COUNT) {
  ------------------
  |  Branch (5659:13): [True: 0, False: 98.2M]
  ------------------
 5660|      0|            return 3;
 5661|      0|        }
 5662|  98.2M|        enum JanetInstructionType type = janet_instructions[instr & 0x7F];
 5663|  98.2M|        switch (type) {
  ------------------
  |  Branch (5663:17): [True: 98.2M, False: 0]
  ------------------
 5664|   511k|            case JINT_0:
  ------------------
  |  Branch (5664:13): [True: 511k, False: 97.7M]
  ------------------
 5665|   511k|                continue;
 5666|  18.8M|            case JINT_S: {
  ------------------
  |  Branch (5666:13): [True: 18.8M, False: 79.3M]
  ------------------
 5667|  18.8M|                if ((int32_t)(instr >> 8) >= sc) return 4;
  ------------------
  |  Branch (5667:21): [True: 0, False: 18.8M]
  ------------------
 5668|  18.8M|                continue;
 5669|  18.8M|            }
 5670|  18.8M|            case JINT_SI:
  ------------------
  |  Branch (5670:13): [True: 2.25M, False: 95.9M]
  ------------------
 5671|  2.25M|            case JINT_SU:
  ------------------
  |  Branch (5671:13): [True: 0, False: 98.2M]
  ------------------
 5672|  2.25M|            case JINT_ST: {
  ------------------
  |  Branch (5672:13): [True: 0, False: 98.2M]
  ------------------
 5673|  2.25M|                if ((int32_t)((instr >> 8) & 0xFF) >= sc) return 4;
  ------------------
  |  Branch (5673:21): [True: 0, False: 2.25M]
  ------------------
 5674|  2.25M|                continue;
 5675|  2.25M|            }
 5676|  4.13M|            case JINT_L: {
  ------------------
  |  Branch (5676:13): [True: 4.13M, False: 94.0M]
  ------------------
 5677|  4.13M|                int32_t jumpdest = i + (((int32_t)instr) >> 8);
 5678|  4.13M|                if (jumpdest < 0 || jumpdest >= def->bytecode_length) return 5;
  ------------------
  |  Branch (5678:21): [True: 0, False: 4.13M]
  |  Branch (5678:37): [True: 0, False: 4.13M]
  ------------------
 5679|  4.13M|                continue;
 5680|  4.13M|            }
 5681|  26.2M|            case JINT_SS: {
  ------------------
  |  Branch (5681:13): [True: 26.2M, False: 71.9M]
  ------------------
 5682|  26.2M|                if ((int32_t)((instr >> 8) & 0xFF) >= sc ||
  ------------------
  |  Branch (5682:21): [True: 0, False: 26.2M]
  ------------------
 5683|  26.2M|                        (int32_t)(instr >> 16) >= sc) return 4;
  ------------------
  |  Branch (5683:25): [True: 0, False: 26.2M]
  ------------------
 5684|  26.2M|                continue;
 5685|  26.2M|            }
 5686|  26.2M|            case JINT_SSI:
  ------------------
  |  Branch (5686:13): [True: 1.73M, False: 96.4M]
  ------------------
 5687|  2.76M|            case JINT_SSU: {
  ------------------
  |  Branch (5687:13): [True: 1.02M, False: 97.1M]
  ------------------
 5688|  2.76M|                if ((int32_t)((instr >> 8) & 0xFF) >= sc ||
  ------------------
  |  Branch (5688:21): [True: 0, False: 2.76M]
  ------------------
 5689|  2.76M|                        (int32_t)((instr >> 16) & 0xFF) >= sc) return 4;
  ------------------
  |  Branch (5689:25): [True: 0, False: 2.76M]
  ------------------
 5690|  2.76M|                continue;
 5691|  2.76M|            }
 5692|  7.17M|            case JINT_SL: {
  ------------------
  |  Branch (5692:13): [True: 7.17M, False: 91.0M]
  ------------------
 5693|  7.17M|                int32_t jumpdest = i + (((int32_t)instr) >> 16);
 5694|  7.17M|                if ((int32_t)((instr >> 8) & 0xFF) >= sc) return 4;
  ------------------
  |  Branch (5694:21): [True: 0, False: 7.17M]
  ------------------
 5695|  7.17M|                if (jumpdest < 0 || jumpdest >= def->bytecode_length) return 5;
  ------------------
  |  Branch (5695:21): [True: 0, False: 7.17M]
  |  Branch (5695:37): [True: 0, False: 7.17M]
  ------------------
 5696|  7.17M|                continue;
 5697|  7.17M|            }
 5698|  13.2M|            case JINT_SSS: {
  ------------------
  |  Branch (5698:13): [True: 13.2M, False: 85.0M]
  ------------------
 5699|  13.2M|                if (((int32_t)(instr >> 8) & 0xFF) >= sc ||
  ------------------
  |  Branch (5699:21): [True: 0, False: 13.2M]
  ------------------
 5700|  13.2M|                        ((int32_t)(instr >> 16) & 0xFF) >= sc ||
  ------------------
  |  Branch (5700:25): [True: 0, False: 13.2M]
  ------------------
 5701|  13.2M|                        ((int32_t)(instr >> 24) & 0xFF) >= sc) return 4;
  ------------------
  |  Branch (5701:25): [True: 0, False: 13.2M]
  ------------------
 5702|  13.2M|                continue;
 5703|  13.2M|            }
 5704|  13.2M|            case JINT_SD: {
  ------------------
  |  Branch (5704:13): [True: 1.03M, False: 97.1M]
  ------------------
 5705|  1.03M|                if ((int32_t)((instr >> 8) & 0xFF) >= sc) return 4;
  ------------------
  |  Branch (5705:21): [True: 0, False: 1.03M]
  ------------------
 5706|  1.03M|                if ((int32_t)(instr >> 16) >= def->defs_length) return 6;
  ------------------
  |  Branch (5706:21): [True: 0, False: 1.03M]
  ------------------
 5707|  1.03M|                continue;
 5708|  1.03M|            }
 5709|  17.9M|            case JINT_SC: {
  ------------------
  |  Branch (5709:13): [True: 17.9M, False: 80.2M]
  ------------------
 5710|  17.9M|                if ((int32_t)((instr >> 8) & 0xFF) >= sc) return 4;
  ------------------
  |  Branch (5710:21): [True: 0, False: 17.9M]
  ------------------
 5711|  17.9M|                if ((int32_t)(instr >> 16) >= def->constants_length) return 7;
  ------------------
  |  Branch (5711:21): [True: 0, False: 17.9M]
  ------------------
 5712|  17.9M|                continue;
 5713|  17.9M|            }
 5714|  17.9M|            case JINT_SES: {
  ------------------
  |  Branch (5714:13): [True: 4.05M, False: 94.1M]
  ------------------
 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|  4.05M|                if ((int32_t)((instr >> 8) & 0xFF) >= sc) return 4;
  ------------------
  |  Branch (5718:21): [True: 0, False: 4.05M]
  ------------------
 5719|  4.05M|                if ((int32_t)((instr >> 16) & 0xFF) >= def->environments_length) return 8;
  ------------------
  |  Branch (5719:21): [True: 0, False: 4.05M]
  ------------------
 5720|  4.05M|                continue;
 5721|  4.05M|            }
 5722|  98.2M|        }
 5723|  98.2M|    }
 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.55M|    {
 5730|  3.55M|        uint32_t lastop = def->bytecode[def->bytecode_length - 1] & 0xFF;
 5731|  3.55M|        switch (lastop) {
 5732|      0|            default:
  ------------------
  |  Branch (5732:13): [True: 0, False: 3.55M]
  ------------------
 5733|      0|                return 9;
 5734|  2.09M|            case JOP_RETURN:
  ------------------
  |  Branch (5734:13): [True: 2.09M, False: 1.46M]
  ------------------
 5735|  2.36M|            case JOP_RETURN_NIL:
  ------------------
  |  Branch (5735:13): [True: 272k, False: 3.28M]
  ------------------
 5736|  2.37M|            case JOP_JUMP:
  ------------------
  |  Branch (5736:13): [True: 6.64k, False: 3.54M]
  ------------------
 5737|  2.41M|            case JOP_ERROR:
  ------------------
  |  Branch (5737:13): [True: 46.5k, False: 3.50M]
  ------------------
 5738|  3.55M|            case JOP_TAILCALL:
  ------------------
  |  Branch (5738:13): [True: 1.13M, False: 2.41M]
  ------------------
 5739|  3.55M|                break;
 5740|  3.55M|        }
 5741|  3.55M|    }
 5742|       |
 5743|       |    /* Verify debug info - slotmapping, etc. */
 5744|  37.3M|    for (int32_t i = def->symbolmap_length - 1; i >= 0; i--) {
  ------------------
  |  Branch (5744:49): [True: 33.8M, False: 3.55M]
  ------------------
 5745|  33.8M|        JanetSymbolMap jsm = def->symbolmap[i];
 5746|  33.8M|        if (jsm.birth_pc == UINT32_MAX) {
  ------------------
  |  Branch (5746:13): [True: 17.4M, False: 16.3M]
  ------------------
 5747|  17.4M|            if (jsm.death_pc >= (uint32_t) def->environments_length) {
  ------------------
  |  Branch (5747:17): [True: 0, False: 17.4M]
  ------------------
 5748|      0|                return 10;
 5749|       |                /* We should also check jsm.slot_index */
 5750|      0|            }
 5751|  17.4M|        } else {
 5752|  16.3M|            if (jsm.slot_index >= (uint32_t) def->slotcount) {
  ------------------
  |  Branch (5752:17): [True: 0, False: 16.3M]
  ------------------
 5753|      0|                return 11;
 5754|      0|            }
 5755|  16.3M|            if (jsm.birth_pc != UINT32_MAX && jsm.birth_pc >= (uint32_t) def->bytecode_length) {
  ------------------
  |  Branch (5755:17): [True: 16.3M, False: 0]
  |  Branch (5755:47): [True: 0, False: 16.3M]
  ------------------
 5756|      0|                return 12;
 5757|      0|            }
 5758|  16.3M|            if (jsm.death_pc != UINT32_MAX && jsm.death_pc > (uint32_t) def->bytecode_length) {
  ------------------
  |  Branch (5758:17): [True: 16.3M, False: 0]
  |  Branch (5758:47): [True: 0, False: 16.3M]
  ------------------
 5759|      0|                return 13;
 5760|      0|            }
 5761|  16.3M|        }
 5762|  33.8M|        if (jsm.symbol == NULL) {
  ------------------
  |  Branch (5762:13): [True: 0, False: 33.8M]
  ------------------
 5763|      0|            return 14;
 5764|      0|        }
 5765|  33.8M|    }
 5766|       |
 5767|  3.55M|    return 0;
 5768|  3.55M|}
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.68k|void janet_panicf(const char *format, ...) {
 5912|  2.68k|    va_list args;
 5913|  2.68k|    const uint8_t *ret;
 5914|  2.68k|    JanetBuffer buffer;
 5915|  2.68k|    int32_t len = 0;
 5916|  64.6k|    while (format[len]) len++;
  ------------------
  |  Branch (5916:12): [True: 61.9k, False: 2.68k]
  ------------------
 5917|  2.68k|    janet_buffer_init(&buffer, len);
 5918|  2.68k|    va_start(args, format);
 5919|  2.68k|    janet_formatbv(&buffer, format, args);
 5920|       |    va_end(args);
 5921|  2.68k|    ret = janet_string(buffer.data, buffer.count);
 5922|  2.68k|    janet_buffer_deinit(&buffer);
 5923|  2.68k|    janet_panics(ret);
 5924|  2.68k|}
janet_panics:
 5930|  2.68k|void janet_panics(const uint8_t *message) {
 5931|  2.68k|    janet_panicv(janet_wrap_string(message));
  ------------------
  |  |  848|  2.68k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|  2.68k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.68k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.68k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5932|  2.68k|}
janet_arity:
 5947|  4.64k|void janet_arity(int32_t arity, int32_t min, int32_t max) {
 5948|  4.64k|    if (min >= 0 && arity < min)
  ------------------
  |  Branch (5948:9): [True: 4.64k, False: 0]
  |  Branch (5948:21): [True: 0, False: 4.64k]
  ------------------
 5949|      0|        janet_panicf("arity mismatch, expected at least %d, got %d", min, arity);
 5950|  4.64k|    if (max >= 0 && arity > max)
  ------------------
  |  Branch (5950:9): [True: 0, False: 4.64k]
  |  Branch (5950:21): [True: 0, False: 0]
  ------------------
 5951|      0|        janet_panicf("arity mismatch, expected at most %d, got %d", max, arity);
 5952|  4.64k|}
janet_getbytes:
 6246|  1.96k|JanetByteView janet_getbytes(const Janet *argv, int32_t n) {
 6247|  1.96k|    Janet x = argv[n];
 6248|  1.96k|    JanetByteView view;
 6249|  1.96k|    if (!janet_bytes_view(x, &view.bytes, &view.len)) {
  ------------------
  |  Branch (6249:9): [True: 0, False: 1.96k]
  ------------------
 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.96k|    return view;
 6253|  1.96k|}
janet_dyn:
 6287|  10.2M|Janet janet_dyn(const char *name) {
 6288|  10.2M|    if (!janet_vm.fiber) {
  ------------------
  |  Branch (6288:9): [True: 10.2M, False: 0]
  ------------------
 6289|  10.2M|        if (!janet_vm.top_dyns) return janet_wrap_nil();
  ------------------
  |  |  831|  10.2M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  10.2M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  10.2M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  10.2M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (6289:13): [True: 10.2M, 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|  10.2M|    }
 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:
 8261|  6.64k|void janet_lib_compile(JanetTable *env) {
 8262|  6.64k|    JanetRegExt cfuns[] = {
 8263|  6.64k|        JANET_CORE_REG("compile", cfun_compile),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 8264|  6.64k|        JANET_REG_END
  ------------------
  |  | 2110|  6.64k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
 8265|  6.64k|    };
 8266|       |    janet_core_cfuns_ext(env, NULL, cfuns);
 8267|  6.64k|}
janet_core_env:
 9672|  6.64k|JanetTable *janet_core_env(JanetTable *replacements) {
 9673|       |    /* Memoize core env, ignoring replacements the second time around. */
 9674|  6.64k|    if (NULL != janet_vm.core_env) {
  ------------------
  |  Branch (9674:9): [True: 0, False: 6.64k]
  ------------------
 9675|      0|        return janet_vm.core_env;
 9676|      0|    }
 9677|       |
 9678|  6.64k|    JanetTable *dict = janet_core_lookup_table(replacements);
 9679|       |
 9680|       |    /* Unmarshal bytecode */
 9681|  6.64k|    Janet marsh_out = janet_unmarshal(
 9682|  6.64k|                          janet_core_image,
 9683|  6.64k|                          janet_core_image_size,
 9684|  6.64k|                          0,
 9685|  6.64k|                          dict,
 9686|  6.64k|                          NULL);
 9687|       |
 9688|       |    /* Memoize */
 9689|  6.64k|    janet_gcroot(marsh_out);
 9690|  6.64k|    JanetTable *env = janet_unwrap_table(marsh_out);
  ------------------
  |  |  861|  6.64k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
 9691|  6.64k|    janet_vm.core_env = env;
 9692|       |
 9693|       |    /* Invert image dict manually here. We can't do this in boot.janet as it
 9694|       |     * breaks deterministic builds */
 9695|  6.64k|    Janet lidv, midv;
 9696|  6.64k|    lidv = midv = janet_wrap_nil();
  ------------------
  |  |  831|  6.64k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  6.64k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  6.64k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  6.64k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 9697|  6.64k|    janet_resolve(env, janet_csymbol("load-image-dict"), &lidv);
 9698|  6.64k|    janet_resolve(env, janet_csymbol("make-image-dict"), &midv);
 9699|       |
 9700|       |    /* Check that we actually got tables - if we are using a smaller corelib, may not exist */
 9701|  6.64k|    if (janet_checktype(lidv, JANET_TABLE) && janet_checktype(midv, JANET_TABLE)) {
  ------------------
  |  |  806|  13.2k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 6.64k, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 6.64k]
  |  |  ------------------
  |  |  807|  13.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|  13.2k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  6.64k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  6.64k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  6.64k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  6.64k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  if (janet_checktype(lidv, JANET_TABLE) && janet_checktype(midv, JANET_TABLE)) {
  ------------------
  |  |  806|  6.64k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 6.64k, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 6.64k]
  |  |  ------------------
  |  |  807|  6.64k|        ? 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.64k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  6.64k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  6.64k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  6.64k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  6.64k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 9702|  6.64k|        JanetTable *lid = janet_unwrap_table(lidv);
  ------------------
  |  |  861|  6.64k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
 9703|  6.64k|        JanetTable *mid = janet_unwrap_table(midv);
  ------------------
  |  |  861|  6.64k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
 9704|  13.6M|        for (int32_t i = 0; i < lid->capacity; i++) {
  ------------------
  |  Branch (9704:29): [True: 13.6M, False: 6.64k]
  ------------------
 9705|  13.6M|            const JanetKV *kv = lid->data + i;
 9706|  13.6M|            if (!janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|  13.6M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 13.6M]
  |  |  ------------------
  |  |  807|  13.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|  13.6M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  13.6M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  13.6M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  13.6M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  13.6M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (9706:17): [True: 4.37M, False: 9.22M]
  ------------------
 9707|  4.37M|                janet_table_put(mid, kv->value, kv->key);
 9708|  4.37M|            }
 9709|  13.6M|        }
 9710|  6.64k|    }
 9711|       |
 9712|  6.64k|    return env;
 9713|  6.64k|}
janet_core_lookup_table:
 9717|  6.64k|JanetTable *janet_core_lookup_table(JanetTable *replacements) {
 9718|  6.64k|    JanetTable *dict = janet_table(512);
 9719|  6.64k|    janet_load_libs(dict);
 9720|       |
 9721|       |    /* Add replacements */
 9722|  6.64k|    if (replacements != NULL) {
  ------------------
  |  Branch (9722:9): [True: 0, False: 6.64k]
  ------------------
 9723|      0|        for (int32_t i = 0; i < replacements->capacity; i++) {
  ------------------
  |  Branch (9723:29): [True: 0, False: 0]
  ------------------
 9724|      0|            JanetKV kv = replacements->data[i];
 9725|      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 (9725:17): [True: 0, False: 0]
  ------------------
 9726|      0|                janet_table_put(dict, kv.key, kv.value);
 9727|       |                /* Add replacement functions to registry? */
 9728|      0|            }
 9729|      0|        }
 9730|      0|    }
 9731|       |
 9732|  6.64k|    return dict;
 9733|  6.64k|}
janet_lib_debug:
10185|  6.64k|void janet_lib_debug(JanetTable *env) {
10186|  6.64k|    JanetRegExt debug_cfuns[] = {
10187|  6.64k|        JANET_CORE_REG("debug/break", cfun_debug_break),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
10188|  6.64k|        JANET_CORE_REG("debug/unbreak", cfun_debug_unbreak),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
10189|  6.64k|        JANET_CORE_REG("debug/fbreak", cfun_debug_fbreak),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
10190|  6.64k|        JANET_CORE_REG("debug/unfbreak", cfun_debug_unfbreak),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
10191|  6.64k|        JANET_CORE_REG("debug/arg-stack", cfun_debug_argstack),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
10192|  6.64k|        JANET_CORE_REG("debug/stack", cfun_debug_stack),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
10193|  6.64k|        JANET_CORE_REG("debug/stacktrace", cfun_debug_stacktrace),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
10194|  6.64k|        JANET_CORE_REG("debug/lineage", cfun_debug_lineage),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
10195|  6.64k|        JANET_CORE_REG("debug/step", cfun_debug_step),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
10196|  6.64k|        JANET_REG_END
  ------------------
  |  | 2110|  6.64k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
10197|  6.64k|    };
10198|       |    janet_core_cfuns_ext(env, NULL, debug_cfuns);
10199|  6.64k|}
janet_ev_init_common:
11165|  6.64k|void janet_ev_init_common(void) {
11166|  6.64k|    janet_q_init(&janet_vm.spawn);
11167|  6.64k|    janet_vm.tq = NULL;
11168|  6.64k|    janet_vm.tq_count = 0;
11169|  6.64k|    janet_vm.tq_capacity = 0;
11170|  6.64k|    janet_table_init_raw(&janet_vm.threaded_abstracts, 0);
11171|  6.64k|    janet_table_init_raw(&janet_vm.active_tasks, 0);
11172|  6.64k|    janet_table_init_raw(&janet_vm.signal_handlers, 0);
11173|  6.64k|    janet_rng_seed(&janet_vm.ev_rng, 0);
11174|  6.64k|#ifndef JANET_WINDOWS
11175|  6.64k|    pthread_attr_init(&janet_vm.new_thread_attr);
11176|       |    pthread_attr_setdetachstate(&janet_vm.new_thread_attr, PTHREAD_CREATE_DETACHED);
11177|  6.64k|#endif
11178|  6.64k|}
janet_ev_deinit_common:
11211|  6.64k|void janet_ev_deinit_common(void) {
11212|  6.64k|    JanetTimeout to;
11213|  6.64k|    while (peek_timeout(&to)) {
  ------------------
  |  Branch (11213:12): [True: 0, False: 6.64k]
  ------------------
11214|      0|        handle_timeout_worker(to, 1);
11215|      0|        pop_timeout(0);
11216|      0|    }
11217|  6.64k|    janet_q_deinit(&janet_vm.spawn);
11218|  6.64k|    janet_free(janet_vm.tq);
  ------------------
  |  | 2415|  6.64k|#define janet_free(X) free((X))
  ------------------
11219|  6.64k|    janet_table_deinit(&janet_vm.threaded_abstracts);
11220|  6.64k|    janet_table_deinit(&janet_vm.active_tasks);
11221|  6.64k|    janet_table_deinit(&janet_vm.signal_handlers);
11222|  6.64k|#ifndef JANET_WINDOWS
11223|  6.64k|    pthread_attr_destroy(&janet_vm.new_thread_attr);
11224|  6.64k|#endif
11225|  6.64k|}
janet_ev_init:
12502|  6.64k|void janet_ev_init(void) {
12503|  6.64k|    janet_ev_init_common();
12504|  6.64k|    janet_ev_setup_selfpipe();
12505|  6.64k|    janet_vm.epoll = epoll_create1(EPOLL_CLOEXEC);
12506|  6.64k|    janet_vm.timerfd = timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC | TFD_NONBLOCK);
12507|  6.64k|    janet_vm.timer_enabled = 0;
12508|  6.64k|    if (janet_vm.epoll == -1 || janet_vm.timerfd == -1) goto error;
  ------------------
  |  Branch (12508:9): [True: 0, False: 6.64k]
  |  Branch (12508:33): [True: 0, False: 6.64k]
  ------------------
12509|  6.64k|    struct epoll_event ev;
12510|  6.64k|    ev.events = EPOLLIN | EPOLLET;
12511|  6.64k|    ev.data.ptr = &janet_vm.timerfd;
12512|  6.64k|    if (-1 == epoll_ctl(janet_vm.epoll, EPOLL_CTL_ADD, janet_vm.timerfd, &ev)) goto error;
  ------------------
  |  Branch (12512:9): [True: 0, False: 6.64k]
  ------------------
12513|  6.64k|    ev.events = EPOLLIN | EPOLLET;
12514|  6.64k|    ev.data.ptr = janet_vm.selfpipe;
12515|  6.64k|    if (-1 == epoll_ctl(janet_vm.epoll, EPOLL_CTL_ADD, janet_vm.selfpipe[0], &ev)) goto error;
  ------------------
  |  Branch (12515:9): [True: 0, False: 6.64k]
  ------------------
12516|  6.64k|    return;
12517|  6.64k|error:
12518|       |    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]
  |  |  ------------------
  ------------------
12519|      0|}
janet_ev_deinit:
12521|  6.64k|void janet_ev_deinit(void) {
12522|  6.64k|    janet_ev_deinit_common();
12523|  6.64k|    close(janet_vm.epoll);
12524|  6.64k|    close(janet_vm.timerfd);
12525|  6.64k|    janet_ev_cleanup_selfpipe();
12526|  6.64k|    janet_vm.epoll = 0;
12527|  6.64k|}
janet_make_pipe:
13624|  6.64k|int janet_make_pipe(JanetHandle handles[2], int mode) {
13625|       |#ifdef JANET_WINDOWS
13626|       |    /*
13627|       |     * On windows, the built in CreatePipe function doesn't support overlapped IO
13628|       |     * so we lift from the windows source code and modify for our own version.
13629|       |     */
13630|       |    JanetHandle shandle, chandle;
13631|       |    CHAR PipeNameBuffer[MAX_PATH];
13632|       |    SECURITY_ATTRIBUTES saAttr;
13633|       |    memset(&saAttr, 0, sizeof(saAttr));
13634|       |    saAttr.nLength = sizeof(saAttr);
13635|       |    saAttr.bInheritHandle = TRUE;
13636|       |    if (mode == 3) {
13637|       |        /* No overlapped IO involved, just call CreatePipe */
13638|       |        if (!CreatePipe(handles, handles + 1, &saAttr, 0)) return -1;
13639|       |        return 0;
13640|       |    }
13641|       |    snprintf(PipeNameBuffer,
13642|       |             sizeof(PipeNameBuffer),
13643|       |             "\\\\.\\Pipe\\JanetPipeFile.%08x.%08x",
13644|       |             (unsigned int) GetCurrentProcessId(),
13645|       |             (unsigned int) InterlockedIncrement(&PipeSerialNumber));
13646|       |
13647|       |    /* server handle goes to subprocess */
13648|       |    shandle = CreateNamedPipeA(
13649|       |                  PipeNameBuffer,
13650|       |                  (mode == 2 ? PIPE_ACCESS_INBOUND : PIPE_ACCESS_OUTBOUND) | FILE_FLAG_OVERLAPPED,
13651|       |                  PIPE_TYPE_BYTE | PIPE_WAIT,
13652|       |                  255,           /* Max number of pipes for duplication. */
13653|       |                  4096,          /* Out buffer size */
13654|       |                  4096,          /* In buffer size */
13655|       |                  120 * 1000,    /* Timeout in ms */
13656|       |                  &saAttr);
13657|       |    if (shandle == INVALID_HANDLE_VALUE) {
13658|       |        return -1;
13659|       |    }
13660|       |
13661|       |    /* we keep client handle */
13662|       |    chandle = CreateFileA(
13663|       |                  PipeNameBuffer,
13664|       |                  (mode == 2 ? GENERIC_WRITE : GENERIC_READ),
13665|       |                  0,
13666|       |                  &saAttr,
13667|       |                  OPEN_EXISTING,
13668|       |                  FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED,
13669|       |                  NULL);
13670|       |
13671|       |    if (chandle == INVALID_HANDLE_VALUE) {
13672|       |        CloseHandle(shandle);
13673|       |        return -1;
13674|       |    }
13675|       |    if (mode == 2) {
13676|       |        handles[0] = shandle;
13677|       |        handles[1] = chandle;
13678|       |    } else {
13679|       |        handles[0] = chandle;
13680|       |        handles[1] = shandle;
13681|       |    }
13682|       |    return 0;
13683|       |#else
13684|  6.64k|    if (pipe(handles)) return -1;
  ------------------
  |  Branch (13684:9): [True: 0, False: 6.64k]
  ------------------
13685|  6.64k|    if (mode != 2 && fcntl(handles[0], F_SETFD, FD_CLOEXEC)) goto error;
  ------------------
  |  Branch (13685:9): [True: 6.64k, False: 0]
  |  Branch (13685:22): [True: 0, False: 6.64k]
  ------------------
13686|  6.64k|    if (mode != 1 && fcntl(handles[1], F_SETFD, FD_CLOEXEC)) goto error;
  ------------------
  |  Branch (13686:9): [True: 0, False: 6.64k]
  |  Branch (13686:22): [True: 0, False: 0]
  ------------------
13687|  6.64k|    if (mode != 2 && mode != 3 && fcntl(handles[0], F_SETFL, O_NONBLOCK)) goto error;
  ------------------
  |  Branch (13687:9): [True: 6.64k, False: 0]
  |  Branch (13687:22): [True: 6.64k, False: 0]
  |  Branch (13687:35): [True: 0, False: 6.64k]
  ------------------
13688|  6.64k|    if (mode != 1 && mode != 3 && fcntl(handles[1], F_SETFL, O_NONBLOCK)) goto error;
  ------------------
  |  Branch (13688:9): [True: 0, False: 6.64k]
  |  Branch (13688:22): [True: 0, False: 0]
  |  Branch (13688:35): [True: 0, False: 0]
  ------------------
13689|  6.64k|    return 0;
13690|      0|error:
13691|      0|    close(handles[0]);
13692|      0|    close(handles[1]);
13693|      0|    return -1;
13694|  6.64k|#endif
13695|  6.64k|}
janet_lib_ev:
14280|  6.64k|void janet_lib_ev(JanetTable *env) {
14281|  6.64k|    JanetRegExt ev_cfuns_ext[] = {
14282|  6.64k|        JANET_CORE_REG("ev/give", cfun_channel_push),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14283|  6.64k|        JANET_CORE_REG("ev/take", cfun_channel_pop),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14284|  6.64k|        JANET_CORE_REG("ev/full", cfun_channel_full),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14285|  6.64k|        JANET_CORE_REG("ev/capacity", cfun_channel_capacity),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14286|  6.64k|        JANET_CORE_REG("ev/count", cfun_channel_count),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14287|  6.64k|        JANET_CORE_REG("ev/select", cfun_channel_choice),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14288|  6.64k|        JANET_CORE_REG("ev/rselect", cfun_channel_rchoice),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14289|  6.64k|        JANET_CORE_REG("ev/chan", cfun_channel_new),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14290|  6.64k|        JANET_CORE_REG("ev/thread-chan", cfun_channel_new_threaded),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14291|  6.64k|        JANET_CORE_REG("ev/chan-close", cfun_channel_close),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14292|  6.64k|        JANET_CORE_REG("ev/go", cfun_ev_go),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14293|  6.64k|        JANET_CORE_REG("ev/thread", cfun_ev_thread),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14294|  6.64k|        JANET_CORE_REG("ev/give-supervisor", cfun_ev_give_supervisor),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14295|  6.64k|        JANET_CORE_REG("ev/sleep", cfun_ev_sleep),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14296|  6.64k|        JANET_CORE_REG("ev/deadline", cfun_ev_deadline),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14297|  6.64k|        JANET_CORE_REG("ev/cancel", cfun_ev_cancel),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14298|  6.64k|        JANET_CORE_REG("ev/close", janet_cfun_stream_close),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14299|  6.64k|        JANET_CORE_REG("ev/read", janet_cfun_stream_read),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14300|  6.64k|        JANET_CORE_REG("ev/chunk", janet_cfun_stream_chunk),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14301|  6.64k|        JANET_CORE_REG("ev/write", janet_cfun_stream_write),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14302|  6.64k|        JANET_CORE_REG("ev/lock", janet_cfun_mutex),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14303|  6.64k|        JANET_CORE_REG("ev/acquire-lock", janet_cfun_mutex_acquire),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14304|  6.64k|        JANET_CORE_REG("ev/release-lock", janet_cfun_mutex_release),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14305|  6.64k|        JANET_CORE_REG("ev/rwlock", janet_cfun_rwlock),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14306|  6.64k|        JANET_CORE_REG("ev/acquire-rlock", janet_cfun_rwlock_read_lock),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14307|  6.64k|        JANET_CORE_REG("ev/acquire-wlock", janet_cfun_rwlock_write_lock),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14308|  6.64k|        JANET_CORE_REG("ev/release-rlock", janet_cfun_rwlock_read_release),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14309|  6.64k|        JANET_CORE_REG("ev/release-wlock", janet_cfun_rwlock_write_release),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14310|  6.64k|        JANET_CORE_REG("ev/to-file", janet_cfun_to_file),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14311|  6.64k|        JANET_CORE_REG("ev/all-tasks", janet_cfun_ev_all_tasks),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14312|  6.64k|        JANET_REG_END
  ------------------
  |  | 2110|  6.64k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
14313|  6.64k|    };
14314|       |
14315|       |    janet_core_cfuns_ext(env, NULL, ev_cfuns_ext);
14316|  6.64k|    janet_register_abstract_type(&janet_stream_type);
14317|  6.64k|    janet_register_abstract_type(&janet_channel_type);
14318|  6.64k|    janet_register_abstract_type(&janet_mutex_type);
14319|  6.64k|    janet_register_abstract_type(&janet_rwlock_type);
14320|  6.64k|}
janet_lib_ffi:
16250|  6.64k|void janet_lib_ffi(JanetTable *env) {
16251|  6.64k|    JanetRegExt ffi_cfuns[] = {
16252|  6.64k|        JANET_CORE_REG("ffi/native", janet_core_raw_native),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16253|  6.64k|        JANET_CORE_REG("ffi/lookup", janet_core_native_lookup),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16254|  6.64k|        JANET_CORE_REG("ffi/close", janet_core_native_close),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16255|  6.64k|        JANET_CORE_REG("ffi/signature", cfun_ffi_signature),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16256|  6.64k|        JANET_CORE_REG("ffi/call", cfun_ffi_call),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16257|  6.64k|        JANET_CORE_REG("ffi/struct", cfun_ffi_struct),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16258|  6.64k|        JANET_CORE_REG("ffi/write", cfun_ffi_buffer_write),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16259|  6.64k|        JANET_CORE_REG("ffi/read", cfun_ffi_buffer_read),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16260|  6.64k|        JANET_CORE_REG("ffi/size", cfun_ffi_size),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16261|  6.64k|        JANET_CORE_REG("ffi/align", cfun_ffi_align),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16262|  6.64k|        JANET_CORE_REG("ffi/trampoline", cfun_ffi_get_callback_trampoline),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16263|  6.64k|        JANET_CORE_REG("ffi/jitfn", cfun_ffi_jitfn),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16264|  6.64k|        JANET_CORE_REG("ffi/malloc", cfun_ffi_malloc),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16265|  6.64k|        JANET_CORE_REG("ffi/free", cfun_ffi_free),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16266|  6.64k|        JANET_CORE_REG("ffi/pointer-buffer", cfun_ffi_pointer_buffer),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16267|  6.64k|        JANET_CORE_REG("ffi/pointer-cfunction", cfun_ffi_pointer_cfunction),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16268|  6.64k|        JANET_CORE_REG("ffi/calling-conventions", cfun_ffi_supported_calling_conventions),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16269|  6.64k|        JANET_REG_END
  ------------------
  |  | 2110|  6.64k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
16270|  6.64k|    };
16271|       |    janet_core_cfuns_ext(env, NULL, ffi_cfuns);
16272|  6.64k|}
janet_lib_fiber:
16952|  6.64k|void janet_lib_fiber(JanetTable *env) {
16953|  6.64k|    JanetRegExt fiber_cfuns[] = {
16954|  6.64k|        JANET_CORE_REG("fiber/new", cfun_fiber_new),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16955|  6.64k|        JANET_CORE_REG("fiber/status", cfun_fiber_status),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16956|  6.64k|        JANET_CORE_REG("fiber/root", cfun_fiber_root),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16957|  6.64k|        JANET_CORE_REG("fiber/current", cfun_fiber_current),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16958|  6.64k|        JANET_CORE_REG("fiber/maxstack", cfun_fiber_maxstack),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16959|  6.64k|        JANET_CORE_REG("fiber/setmaxstack", cfun_fiber_setmaxstack),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16960|  6.64k|        JANET_CORE_REG("fiber/getenv", cfun_fiber_getenv),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16961|  6.64k|        JANET_CORE_REG("fiber/setenv", cfun_fiber_setenv),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16962|  6.64k|        JANET_CORE_REG("fiber/can-resume?", cfun_fiber_can_resume),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16963|  6.64k|        JANET_CORE_REG("fiber/last-value", cfun_fiber_last_value),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16964|  6.64k|        JANET_REG_END
  ------------------
  |  | 2110|  6.64k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
16965|  6.64k|    };
16966|       |    janet_core_cfuns_ext(env, NULL, fiber_cfuns);
16967|  6.64k|}
janet_lib_filewatch:
17962|  6.64k|void janet_lib_filewatch(JanetTable *env) {
17963|  6.64k|    JanetRegExt cfuns[] = {
17964|  6.64k|        JANET_CORE_REG("filewatch/new", cfun_filewatch_make),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
17965|  6.64k|        JANET_CORE_REG("filewatch/add", cfun_filewatch_add),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
17966|  6.64k|        JANET_CORE_REG("filewatch/remove", cfun_filewatch_remove),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
17967|  6.64k|        JANET_CORE_REG("filewatch/listen", cfun_filewatch_listen),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
17968|  6.64k|        JANET_CORE_REG("filewatch/unlisten", cfun_filewatch_unlisten),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
17969|  6.64k|        JANET_REG_END
  ------------------
  |  | 2110|  6.64k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
17970|  6.64k|    };
17971|       |    janet_core_cfuns_ext(env, NULL, cfuns);
17972|  6.64k|}
janet_gcpressure:
18032|  20.5M|void janet_gcpressure(size_t s) {
18033|  20.5M|    janet_vm.next_collection += s;
18034|  20.5M|}
janet_gcalloc:
18506|  52.2M|void *janet_gcalloc(enum JanetMemoryType type, size_t size) {
18507|  52.2M|    JanetGCObject *mem;
18508|       |
18509|       |    /* Make sure everything is inited */
18510|  52.2M|    janet_assert(NULL != janet_vm.cache, "please initialize janet before use");
  ------------------
  |  |  389|  52.2M|#define janet_assert(c, m) do { \
  |  |  390|  52.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: 52.2M]
  |  |  ------------------
  |  |  391|  52.2M|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 52.2M]
  |  |  ------------------
  ------------------
18511|  52.2M|    mem = janet_malloc(size);
  ------------------
  |  | 2406|  52.2M|#define janet_malloc(X) malloc((X))
  ------------------
18512|       |
18513|       |    /* Check for bad malloc */
18514|  52.2M|    if (NULL == mem) {
  ------------------
  |  Branch (18514:9): [True: 0, False: 52.2M]
  ------------------
18515|      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]
  |  |  ------------------
  ------------------
18516|      0|    }
18517|       |
18518|       |    /* Configure block */
18519|  52.2M|    mem->flags = type;
18520|       |
18521|       |    /* Prepend block to heap list */
18522|  52.2M|    janet_vm.next_collection += size;
18523|  52.2M|    if (type < JANET_MEMORY_TABLE_WEAKK) {
  ------------------
  |  Branch (18523:9): [True: 52.2M, False: 0]
  ------------------
18524|       |        /* normal heap */
18525|  52.2M|        mem->data.next = janet_vm.blocks;
18526|  52.2M|        janet_vm.blocks = mem;
18527|  52.2M|    } else {
18528|       |        /* weak heap */
18529|      0|        mem->data.next = janet_vm.weak_blocks;
18530|      0|        janet_vm.weak_blocks = mem;
18531|      0|    }
18532|  52.2M|    janet_vm.block_count++;
18533|       |
18534|  52.2M|    return (void *)mem;
18535|  52.2M|}
janet_gcroot:
18596|  13.2k|void janet_gcroot(Janet root) {
18597|  13.2k|    size_t newcount = janet_vm.root_count + 1;
18598|  13.2k|    if (newcount > janet_vm.root_capacity) {
  ------------------
  |  Branch (18598:9): [True: 6.64k, False: 6.64k]
  ------------------
18599|  6.64k|        size_t newcap = 2 * newcount;
18600|  6.64k|        janet_vm.roots = janet_realloc(janet_vm.roots, sizeof(Janet) * newcap);
  ------------------
  |  | 2409|  6.64k|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
18601|  6.64k|        if (NULL == janet_vm.roots) {
  ------------------
  |  Branch (18601:13): [True: 0, False: 6.64k]
  ------------------
18602|      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]
  |  |  ------------------
  ------------------
18603|      0|        }
18604|  6.64k|        janet_vm.root_capacity = newcap;
18605|  6.64k|    }
18606|  13.2k|    janet_vm.roots[janet_vm.root_count] = root;
18607|  13.2k|    janet_vm.root_count = newcount;
18608|  13.2k|}
janet_clear_memory:
18654|  6.64k|void janet_clear_memory(void) {
18655|  6.64k|#ifdef JANET_EV
18656|  6.64k|    JanetKV *items = janet_vm.threaded_abstracts.data;
18657|  13.2k|    for (int32_t i = 0; i < janet_vm.threaded_abstracts.capacity; i++) {
  ------------------
  |  Branch (18657:25): [True: 6.64k, False: 6.64k]
  ------------------
18658|  6.64k|        if (janet_checktype(items[i].key, JANET_ABSTRACT)) {
  ------------------
  |  |  806|  6.64k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 6.64k]
  |  |  |  Branch (806:6): [Folded, False: 6.64k]
  |  |  ------------------
  |  |  807|  6.64k|        ? 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.64k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  6.64k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  6.64k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  6.64k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  6.64k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18659|      0|            void *abst = janet_unwrap_abstract(items[i].key);
  ------------------
  |  |  866|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
18660|      0|            JanetAbstractHead *head = janet_abstract_head(abst);
  ------------------
  |  | 1897|      0|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  ------------------
18661|      0|            if (head->type->gcperthread) {
  ------------------
  |  Branch (18661:17): [True: 0, False: 0]
  ------------------
18662|      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]
  |  |  ------------------
  ------------------
18663|      0|            }
18664|      0|            janet_abstract_decref_maybe_free(abst);
18665|      0|        }
18666|  6.64k|    }
18667|  6.64k|#endif
18668|  6.64k|    JanetGCObject *current = janet_vm.blocks;
18669|  52.2M|    while (NULL != current) {
  ------------------
  |  Branch (18669:12): [True: 52.2M, False: 6.64k]
  ------------------
18670|  52.2M|        janet_deinit_block(current);
18671|  52.2M|        JanetGCObject *next = current->data.next;
18672|  52.2M|        janet_free(current);
  ------------------
  |  | 2415|  52.2M|#define janet_free(X) free((X))
  ------------------
18673|  52.2M|        current = next;
18674|  52.2M|    }
18675|  6.64k|    janet_vm.blocks = NULL;
18676|  6.64k|    janet_free_all_scratch();
18677|  6.64k|    janet_free(janet_vm.scratch_mem);
  ------------------
  |  | 2415|  6.64k|#define janet_free(X) free((X))
  ------------------
18678|  6.64k|}
janet_smalloc:
18692|  12.4M|void *janet_smalloc(size_t size) {
18693|  12.4M|    JanetScratch *s = janet_malloc(sizeof(JanetScratch) + size);
  ------------------
  |  | 2406|  12.4M|#define janet_malloc(X) malloc((X))
  ------------------
18694|  12.4M|    if (NULL == s) {
  ------------------
  |  Branch (18694:9): [True: 0, False: 12.4M]
  ------------------
18695|      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]
  |  |  ------------------
  ------------------
18696|      0|    }
18697|  12.4M|    s->finalize = NULL;
18698|  12.4M|    if (janet_vm.scratch_len == janet_vm.scratch_cap) {
  ------------------
  |  Branch (18698:9): [True: 14.1k, False: 12.4M]
  ------------------
18699|  14.1k|        size_t newcap = 2 * janet_vm.scratch_cap + 2;
18700|  14.1k|        JanetScratch **newmem = (JanetScratch **) janet_realloc(janet_vm.scratch_mem, newcap * sizeof(JanetScratch));
  ------------------
  |  | 2409|  14.1k|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
18701|  14.1k|        if (NULL == newmem) {
  ------------------
  |  Branch (18701:13): [True: 0, False: 14.1k]
  ------------------
18702|      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]
  |  |  ------------------
  ------------------
18703|      0|        }
18704|  14.1k|        janet_vm.scratch_cap = newcap;
18705|  14.1k|        janet_vm.scratch_mem = newmem;
18706|  14.1k|    }
18707|  12.4M|    janet_vm.scratch_mem[janet_vm.scratch_len++] = s;
18708|  12.4M|    return (char *)(s->mem);
18709|  12.4M|}
janet_srealloc:
18721|  1.40M|void *janet_srealloc(void *mem, size_t size) {
18722|  1.40M|    if (NULL == mem) return janet_smalloc(size);
  ------------------
  |  Branch (18722:9): [True: 1.20M, False: 208k]
  ------------------
18723|   208k|    JanetScratch *s = janet_mem2scratch(mem);
18724|   208k|    if (janet_vm.scratch_len) {
  ------------------
  |  Branch (18724:9): [True: 208k, False: 0]
  ------------------
18725|   335k|        for (size_t i = janet_vm.scratch_len - 1; ; i--) {
18726|   335k|            if (janet_vm.scratch_mem[i] == s) {
  ------------------
  |  Branch (18726:17): [True: 208k, False: 126k]
  ------------------
18727|   208k|                JanetScratch *news = janet_realloc(s, size + sizeof(JanetScratch));
  ------------------
  |  | 2409|   208k|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
18728|   208k|                if (NULL == news) {
  ------------------
  |  Branch (18728:21): [True: 0, False: 208k]
  ------------------
18729|      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]
  |  |  ------------------
  ------------------
18730|      0|                }
18731|   208k|                janet_vm.scratch_mem[i] = news;
18732|   208k|                return (char *)(news->mem);
18733|   208k|            }
18734|   126k|            if (i == 0) break;
  ------------------
  |  Branch (18734:17): [True: 0, False: 126k]
  ------------------
18735|   126k|        }
18736|   208k|    }
18737|      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]
  |  |  ------------------
  ------------------
18738|      0|}
janet_sfree:
18745|  11.2M|void janet_sfree(void *mem) {
18746|  11.2M|    if (NULL == mem) return;
  ------------------
  |  Branch (18746:9): [True: 0, False: 11.2M]
  ------------------
18747|  11.2M|    JanetScratch *s = janet_mem2scratch(mem);
18748|  11.2M|    if (janet_vm.scratch_len) {
  ------------------
  |  Branch (18748:9): [True: 11.2M, False: 0]
  ------------------
18749|  14.5M|        for (size_t i = janet_vm.scratch_len - 1; ; i--) {
18750|  14.5M|            if (janet_vm.scratch_mem[i] == s) {
  ------------------
  |  Branch (18750:17): [True: 11.2M, False: 3.28M]
  ------------------
18751|  11.2M|                janet_vm.scratch_mem[i] = janet_vm.scratch_mem[--janet_vm.scratch_len];
18752|  11.2M|                free_one_scratch(s);
18753|  11.2M|                return;
18754|  11.2M|            }
18755|  3.28M|            if (i == 0) break;
  ------------------
  |  Branch (18755:17): [True: 0, False: 3.28M]
  ------------------
18756|  3.28M|        }
18757|  11.2M|    }
18758|      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]
  |  |  ------------------
  ------------------
18759|      0|}
janet_wrap_s64:
18944|  2.80k|Janet janet_wrap_s64(int64_t x) {
18945|  2.80k|    int64_t *box = janet_abstract(&janet_s64_type, sizeof(int64_t));
18946|  2.80k|    *box = (int64_t)x;
18947|  2.80k|    return janet_wrap_abstract(box);
  ------------------
  |  |  851|  2.80k|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|  2.80k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.80k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.80k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18948|  2.80k|}
janet_wrap_u64:
18950|  1.38k|Janet janet_wrap_u64(uint64_t x) {
18951|  1.38k|    uint64_t *box = janet_abstract(&janet_u64_type, sizeof(uint64_t));
18952|  1.38k|    *box = (uint64_t)x;
18953|  1.38k|    return janet_wrap_abstract(box);
  ------------------
  |  |  851|  1.38k|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|  1.38k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.38k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.38k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18954|  1.38k|}
janet_lib_inttypes:
19436|  6.64k|void janet_lib_inttypes(JanetTable *env) {
19437|  6.64k|    JanetRegExt it_cfuns[] = {
19438|  6.64k|        JANET_CORE_REG("int/s64", cfun_it_s64_new),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
19439|  6.64k|        JANET_CORE_REG("int/u64", cfun_it_u64_new),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
19440|  6.64k|        JANET_CORE_REG("int/to-number", cfun_to_number),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
19441|  6.64k|        JANET_CORE_REG("int/to-bytes", cfun_to_bytes),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
19442|  6.64k|        JANET_REG_END
  ------------------
  |  | 2110|  6.64k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
19443|  6.64k|    };
19444|       |    janet_core_cfuns_ext(env, NULL, it_cfuns);
19445|  6.64k|    janet_register_abstract_type(&janet_s64_type);
19446|  6.64k|    janet_register_abstract_type(&janet_u64_type);
19447|  6.64k|}
janet_file_close:
19763|  19.9k|int janet_file_close(JanetFile *file) {
19764|  19.9k|    int ret = 0;
19765|  19.9k|    if (!(file->flags & (JANET_FILE_NOT_CLOSEABLE | JANET_FILE_CLOSED))) {
  ------------------
  |  | 2278|  19.9k|#define JANET_FILE_NOT_CLOSEABLE 16
  ------------------
                  if (!(file->flags & (JANET_FILE_NOT_CLOSEABLE | JANET_FILE_CLOSED))) {
  ------------------
  |  | 2279|  19.9k|#define JANET_FILE_CLOSED 32
  ------------------
  |  Branch (19765:9): [True: 0, False: 19.9k]
  ------------------
19766|      0|        ret = fclose(file->file);
19767|      0|        file->flags |= JANET_FILE_CLOSED;
  ------------------
  |  | 2279|      0|#define JANET_FILE_CLOSED 32
  ------------------
19768|      0|        file->file = NULL; /* NULL dereference is easier to debug then other problems */
19769|      0|        return ret;
19770|      0|    }
19771|  19.9k|    return 0;
19772|  19.9k|}
janet_dynprintf:
20201|  10.2M|void janet_dynprintf(const char *name, FILE *dflt_file, const char *format, ...) {
20202|  10.2M|    va_list args;
20203|  10.2M|    va_start(args, format);
20204|  10.2M|    JanetType xtype;
20205|  10.2M|    Janet x;
20206|  10.2M|    if (!name || name[0] == '\0') { /* Allow NULL or empty string to just use dflt_file directly */
  ------------------
  |  Branch (20206:9): [True: 0, False: 10.2M]
  |  Branch (20206:18): [True: 0, False: 10.2M]
  ------------------
20207|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20208|      0|        xtype = JANET_NIL;
20209|  10.2M|    } else {
20210|  10.2M|        x = janet_dyn(name);
20211|  10.2M|        xtype = janet_type(x);
  ------------------
  |  |  795|  10.2M|    (isnan((x).number) \
  |  |  796|  10.2M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  10.2M|        : JANET_NUMBER)
  ------------------
  |  Branch (20211:17): [True: 10.2M, False: 0]
  ------------------
20212|  10.2M|    }
20213|  10.2M|    switch (xtype) {
20214|      0|        default:
  ------------------
  |  Branch (20214:9): [True: 0, False: 10.2M]
  ------------------
20215|       |            /* Other values simply do nothing */
20216|      0|            break;
20217|  10.2M|        case JANET_NIL:
  ------------------
  |  Branch (20217:9): [True: 10.2M, False: 0]
  ------------------
20218|  10.2M|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (20218:9): [True: 0, False: 10.2M]
  ------------------
20219|  10.2M|            FILE *f = dflt_file;
20220|  10.2M|            JanetBuffer buffer;
20221|  10.2M|            int32_t len = 0;
20222|   132M|            while (format[len]) len++;
  ------------------
  |  Branch (20222:20): [True: 122M, False: 10.2M]
  ------------------
20223|  10.2M|            janet_buffer_init(&buffer, len);
20224|  10.2M|            janet_formatbv(&buffer, format, args);
20225|  10.2M|            if (xtype == JANET_ABSTRACT) {
  ------------------
  |  Branch (20225:17): [True: 0, False: 10.2M]
  ------------------
20226|      0|                void *abstract = janet_unwrap_abstract(x);
  ------------------
  |  |  866|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
20227|      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 (20227:21): [True: 0, False: 0]
  ------------------
20228|      0|                    break;
20229|      0|                JanetFile *iofile = abstract;
20230|      0|                io_assert_writeable(iofile);
20231|      0|                f = iofile->file;
20232|      0|            }
20233|  10.2M|            fwrite(buffer.data, buffer.count, 1, f);
20234|  10.2M|            janet_buffer_deinit(&buffer);
20235|  10.2M|            break;
20236|  10.2M|        }
20237|      0|        case JANET_FUNCTION: {
  ------------------
  |  Branch (20237:9): [True: 0, False: 10.2M]
  ------------------
20238|      0|            JanetFunction *fun = janet_unwrap_function(x);
  ------------------
  |  |  868|      0|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
20239|      0|            int32_t len = 0;
20240|      0|            while (format[len]) len++;
  ------------------
  |  Branch (20240:20): [True: 0, False: 0]
  ------------------
20241|      0|            JanetBuffer *buf = janet_buffer(len);
20242|      0|            janet_formatbv(buf, format, args);
20243|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20244|      0|            janet_call(fun, 1, args);
20245|      0|            break;
20246|  10.2M|        }
20247|      0|        case JANET_BUFFER:
  ------------------
  |  Branch (20247:9): [True: 0, False: 10.2M]
  ------------------
20248|      0|            janet_formatbv(janet_unwrap_buffer(x), format, args);
  ------------------
  |  |  862|      0|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
20249|      0|            break;
20250|  10.2M|    }
20251|  10.2M|    va_end(args);
20252|  10.2M|    return;
20253|  10.2M|}
janet_makefile:
20271|  19.9k|Janet janet_makefile(FILE *f, int32_t flags) {
20272|  19.9k|    return janet_wrap_abstract(makef(f, flags, BUFSIZ));
  ------------------
  |  |  851|  19.9k|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|  19.9k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  19.9k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  19.9k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20273|  19.9k|}
janet_lib_io:
20286|  6.64k|void janet_lib_io(JanetTable *env) {
20287|  6.64k|    JanetRegExt io_cfuns[] = {
20288|  6.64k|        JANET_CORE_REG("print", cfun_io_print),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20289|  6.64k|        JANET_CORE_REG("prin", cfun_io_prin),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20290|  6.64k|        JANET_CORE_REG("printf", cfun_io_printf),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20291|  6.64k|        JANET_CORE_REG("prinf", cfun_io_prinf),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20292|  6.64k|        JANET_CORE_REG("eprin", cfun_io_eprin),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20293|  6.64k|        JANET_CORE_REG("eprint", cfun_io_eprint),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20294|  6.64k|        JANET_CORE_REG("eprintf", cfun_io_eprintf),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20295|  6.64k|        JANET_CORE_REG("eprinf", cfun_io_eprinf),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20296|  6.64k|        JANET_CORE_REG("xprint", cfun_io_xprint),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20297|  6.64k|        JANET_CORE_REG("xprin", cfun_io_xprin),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20298|  6.64k|        JANET_CORE_REG("xprintf", cfun_io_xprintf),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20299|  6.64k|        JANET_CORE_REG("xprinf", cfun_io_xprinf),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20300|  6.64k|        JANET_CORE_REG("flush", cfun_io_flush),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20301|  6.64k|        JANET_CORE_REG("eflush", cfun_io_eflush),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20302|  6.64k|        JANET_CORE_REG("file/temp", cfun_io_temp),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20303|  6.64k|        JANET_CORE_REG("file/open", cfun_io_fopen),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20304|  6.64k|        JANET_CORE_REG("file/close", cfun_io_fclose),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20305|  6.64k|        JANET_CORE_REG("file/read", cfun_io_fread),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20306|  6.64k|        JANET_CORE_REG("file/write", cfun_io_fwrite),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20307|  6.64k|        JANET_CORE_REG("file/flush", cfun_io_fflush),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20308|  6.64k|        JANET_CORE_REG("file/seek", cfun_io_fseek),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20309|  6.64k|        JANET_CORE_REG("file/tell", cfun_io_ftell),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20310|  6.64k|        JANET_REG_END
  ------------------
  |  | 2110|  6.64k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
20311|  6.64k|    };
20312|  6.64k|    janet_core_cfuns_ext(env, NULL, io_cfuns);
20313|  6.64k|    janet_register_abstract_type(&janet_file_type);
20314|  6.64k|    int default_flags = JANET_FILE_NOT_CLOSEABLE | JANET_FILE_SERIALIZABLE;
  ------------------
  |  | 2278|  6.64k|#define JANET_FILE_NOT_CLOSEABLE 16
  ------------------
                  int default_flags = JANET_FILE_NOT_CLOSEABLE | JANET_FILE_SERIALIZABLE;
  ------------------
  |  | 2281|  6.64k|#define JANET_FILE_SERIALIZABLE 128
  ------------------
20315|       |    /* stdout */
20316|  6.64k|    JANET_CORE_DEF(env, "stdout",
  ------------------
  |  |  520|  6.64k|#define JANET_CORE_DEF(ENV, NAME, X, DOC) janet_core_def_sm(ENV, NAME, X, DOC, NULL, 0)
  ------------------
20317|  6.64k|                   janet_makefile(stdout, JANET_FILE_APPEND | default_flags),
20318|  6.64k|                   "The standard output file.");
20319|       |    /* stderr */
20320|  6.64k|    JANET_CORE_DEF(env, "stderr",
  ------------------
  |  |  520|  6.64k|#define JANET_CORE_DEF(ENV, NAME, X, DOC) janet_core_def_sm(ENV, NAME, X, DOC, NULL, 0)
  ------------------
20321|  6.64k|                   janet_makefile(stderr, JANET_FILE_APPEND | default_flags),
20322|  6.64k|                   "The standard error file.");
20323|       |    /* stdin */
20324|  6.64k|    JANET_CORE_DEF(env, "stdin",
  ------------------
  |  |  520|  6.64k|#define JANET_CORE_DEF(ENV, NAME, X, DOC) janet_core_def_sm(ENV, NAME, X, DOC, NULL, 0)
  ------------------
20325|  6.64k|                   janet_makefile(stdin, JANET_FILE_READ | default_flags),
20326|  6.64k|                   "The standard input file.");
20327|       |
20328|  6.64k|}
janet_unmarshal:
21991|  6.64k|    const uint8_t **next) {
21992|  6.64k|    UnmarshalState st;
21993|  6.64k|    st.start = bytes;
21994|  6.64k|    st.end = bytes + len;
21995|  6.64k|    st.lookup_defs = NULL;
21996|  6.64k|    st.lookup_envs = NULL;
21997|  6.64k|    st.lookup = NULL;
21998|  6.64k|    st.reg = reg;
21999|  6.64k|    Janet out;
22000|  6.64k|    const uint8_t *nextbytes = unmarshal_one(&st, bytes, &out, flags);
22001|  6.64k|    if (next) *next = nextbytes;
  ------------------
  |  Branch (22001:9): [True: 0, False: 6.64k]
  ------------------
22002|  6.64k|    janet_v_free(st.lookup_defs);
  ------------------
  |  |  756|  6.64k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  764|  6.64k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (756:34): [True: 6.64k, False: 0]
  |  |  ------------------
  ------------------
22003|  6.64k|    janet_v_free(st.lookup_envs);
  ------------------
  |  |  756|  6.64k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  764|  6.64k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (756:34): [True: 6.64k, False: 0]
  |  |  ------------------
  ------------------
22004|       |    janet_v_free(st.lookup);
  ------------------
  |  |  756|  6.64k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  764|  6.64k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (756:34): [True: 6.64k, False: 0]
  |  |  ------------------
  ------------------
22005|  6.64k|    return out;
22006|  6.64k|}
janet_lib_marsh:
22067|  6.64k|void janet_lib_marsh(JanetTable *env) {
22068|  6.64k|    JanetRegExt marsh_cfuns[] = {
22069|  6.64k|        JANET_CORE_REG("marshal", cfun_marshal),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22070|  6.64k|        JANET_CORE_REG("unmarshal", cfun_unmarshal),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22071|  6.64k|        JANET_CORE_REG("env-lookup", cfun_env_lookup),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22072|  6.64k|        JANET_REG_END
  ------------------
  |  | 2110|  6.64k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
22073|  6.64k|    };
22074|       |    janet_core_cfuns_ext(env, NULL, marsh_cfuns);
22075|  6.64k|}
janet_default_rng:
22150|  6.64k|JanetRNG *janet_default_rng(void) {
22151|  6.64k|    return &janet_vm.rng;
22152|  6.64k|}
janet_rng_seed:
22154|  13.2k|void janet_rng_seed(JanetRNG *rng, uint32_t seed) {
22155|  13.2k|    rng->a = seed;
22156|  13.2k|    rng->b = 0x97654321u;
22157|  13.2k|    rng->c = 123871873u;
22158|  13.2k|    rng->d = 0xf23f56c8u;
22159|  13.2k|    rng->counter = 0u;
22160|       |    /* First several numbers aren't that random. */
22161|   225k|    for (int i = 0; i < 16; i++) janet_rng_u32(rng);
  ------------------
  |  Branch (22161:21): [True: 212k, False: 13.2k]
  ------------------
22162|  13.2k|}
janet_rng_u32:
22178|   212k|uint32_t janet_rng_u32(JanetRNG *rng) {
22179|       |    /* Algorithm "xorwow" from p. 5 of Marsaglia, "Xorshift RNGs" */
22180|   212k|    uint32_t t = rng->d;
22181|   212k|    uint32_t const s = rng->a;
22182|   212k|    rng->d = rng->c;
22183|   212k|    rng->c = rng->b;
22184|   212k|    rng->b = s;
22185|   212k|    t ^= t >> 2;
22186|   212k|    t ^= t << 1;
22187|   212k|    t ^= s ^ (s << 4);
22188|   212k|    rng->a = t;
22189|   212k|    rng->counter += 362437;
22190|   212k|    return t + rng->counter;
22191|   212k|}
janet_lib_math:
22458|  6.64k|void janet_lib_math(JanetTable *env) {
22459|  6.64k|    JanetRegExt math_cfuns[] = {
22460|  6.64k|        JANET_CORE_REG("not", janet_not),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22461|  6.64k|        JANET_CORE_REG("math/random", janet_rand),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22462|  6.64k|        JANET_CORE_REG("math/seedrandom", janet_srand),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22463|  6.64k|        JANET_CORE_REG("math/cos", janet_cos),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22464|  6.64k|        JANET_CORE_REG("math/sin", janet_sin),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22465|  6.64k|        JANET_CORE_REG("math/tan", janet_tan),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22466|  6.64k|        JANET_CORE_REG("math/acos", janet_acos),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22467|  6.64k|        JANET_CORE_REG("math/asin", janet_asin),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22468|  6.64k|        JANET_CORE_REG("math/atan", janet_atan),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22469|  6.64k|        JANET_CORE_REG("math/exp", janet_exp),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22470|  6.64k|        JANET_CORE_REG("math/log", janet_log),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22471|  6.64k|        JANET_CORE_REG("math/log10", janet_log10),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22472|  6.64k|        JANET_CORE_REG("math/log2", janet_log2),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22473|  6.64k|        JANET_CORE_REG("math/sqrt", janet_sqrt),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22474|  6.64k|#ifndef JANET_PLAN9
22475|  6.64k|        JANET_CORE_REG("math/cbrt", janet_cbrt),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22476|  6.64k|        JANET_CORE_REG("math/gamma", janet_tgamma),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22477|  6.64k|        JANET_CORE_REG("math/log-gamma", janet_lgamma),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22478|  6.64k|        JANET_CORE_REG("math/erfc", janet_erfc),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22479|  6.64k|        JANET_CORE_REG("math/erf", janet_erf),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22480|  6.64k|        JANET_CORE_REG("math/expm1", janet_expm1),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22481|  6.64k|        JANET_CORE_REG("math/atanh", janet_atanh),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22482|  6.64k|        JANET_CORE_REG("math/asinh", janet_asinh),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22483|  6.64k|        JANET_CORE_REG("math/next", janet_nextafter),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22484|  6.64k|#endif
22485|  6.64k|        JANET_CORE_REG("math/floor", janet_floor),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22486|  6.64k|        JANET_CORE_REG("math/ceil", janet_ceil),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22487|  6.64k|        JANET_CORE_REG("math/pow", janet_pow),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22488|  6.64k|        JANET_CORE_REG("math/abs", janet_fabs),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22489|  6.64k|        JANET_CORE_REG("math/sinh", janet_sinh),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22490|  6.64k|        JANET_CORE_REG("math/cosh", janet_cosh),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22491|  6.64k|        JANET_CORE_REG("math/tanh", janet_tanh),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22492|  6.64k|        JANET_CORE_REG("math/acosh", janet_acosh),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22493|  6.64k|        JANET_CORE_REG("math/atan2", janet_atan2),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22494|  6.64k|        JANET_CORE_REG("math/rng", cfun_rng_make),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22495|  6.64k|        JANET_CORE_REG("math/rng-uniform", cfun_rng_uniform),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22496|  6.64k|        JANET_CORE_REG("math/rng-int", cfun_rng_int),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22497|  6.64k|        JANET_CORE_REG("math/rng-buffer", cfun_rng_buffer),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22498|  6.64k|        JANET_CORE_REG("math/hypot", janet_hypot),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22499|  6.64k|        JANET_CORE_REG("math/exp2", janet_exp2),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22500|  6.64k|        JANET_CORE_REG("math/log1p", janet_log1p),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22501|  6.64k|        JANET_CORE_REG("math/trunc", janet_trunc),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22502|  6.64k|        JANET_CORE_REG("math/round", janet_round),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22503|  6.64k|        JANET_CORE_REG("math/gcd", janet_cfun_gcd),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22504|  6.64k|        JANET_CORE_REG("math/lcm", janet_cfun_lcm),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22505|  6.64k|        JANET_CORE_REG("math/frexp", janet_cfun_frexp),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22506|  6.64k|        JANET_CORE_REG("math/ldexp", janet_cfun_ldexp),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22507|  6.64k|        JANET_REG_END
  ------------------
  |  | 2110|  6.64k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
22508|  6.64k|    };
22509|  6.64k|    janet_core_cfuns_ext(env, NULL, math_cfuns);
22510|  6.64k|    janet_register_abstract_type(&janet_rng_type);
22511|       |#ifdef JANET_BOOTSTRAP
22512|       |    JANET_CORE_DEF(env, "math/pi", janet_wrap_number(3.1415926535897931),
22513|       |                   "The value pi.");
22514|       |    JANET_CORE_DEF(env, "math/e", janet_wrap_number(2.7182818284590451),
22515|       |                   "The base of the natural log.");
22516|       |    JANET_CORE_DEF(env, "math/inf", janet_wrap_number(INFINITY),
22517|       |                   "The number representing positive infinity");
22518|       |    JANET_CORE_DEF(env, "math/-inf", janet_wrap_number(-INFINITY),
22519|       |                   "The number representing negative infinity");
22520|       |    JANET_CORE_DEF(env, "math/int32-min", janet_wrap_number(INT32_MIN),
22521|       |                   "The minimum contiguous integer representable by a 32 bit signed integer");
22522|       |    JANET_CORE_DEF(env, "math/int32-max", janet_wrap_number(INT32_MAX),
22523|       |                   "The maximum contiguous integer representable by a 32 bit signed integer");
22524|       |    JANET_CORE_DEF(env, "math/int-min", janet_wrap_number(JANET_INTMIN_DOUBLE),
22525|       |                   "The minimum contiguous integer representable by a double (-(2^53))");
22526|       |    JANET_CORE_DEF(env, "math/int-max", janet_wrap_number(JANET_INTMAX_DOUBLE),
22527|       |                   "The maximum contiguous integer representable by a double (2^53)");
22528|       |#ifdef NAN
22529|       |    JANET_CORE_DEF(env, "math/nan", janet_wrap_number(NAN), "Not a number (IEEE-754 NaN)");
22530|       |#else
22531|       |    JANET_CORE_DEF(env, "math/nan", janet_wrap_number(0.0 / 0.0), "Not a number (IEEE-754 NaN)");
22532|       |#endif
22533|       |#endif
22534|  6.64k|}
janet_lib_net:
23805|  6.64k|void janet_lib_net(JanetTable *env) {
23806|  6.64k|    JanetRegExt net_cfuns[] = {
23807|  6.64k|        JANET_CORE_REG("net/address", cfun_net_sockaddr),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23808|  6.64k|        JANET_CORE_REG("net/listen", cfun_net_listen),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23809|  6.64k|        JANET_CORE_REG("net/socket", cfun_net_socket),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23810|  6.64k|        JANET_CORE_REG("net/accept", cfun_stream_accept),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23811|  6.64k|        JANET_CORE_REG("net/accept-loop", cfun_stream_accept_loop),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23812|  6.64k|        JANET_CORE_REG("net/read", cfun_stream_read),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23813|  6.64k|        JANET_CORE_REG("net/chunk", cfun_stream_chunk),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23814|  6.64k|        JANET_CORE_REG("net/write", cfun_stream_write),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23815|  6.64k|        JANET_CORE_REG("net/send-to", cfun_stream_send_to),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23816|  6.64k|        JANET_CORE_REG("net/recv-from", cfun_stream_recv_from),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23817|  6.64k|        JANET_CORE_REG("net/flush", cfun_stream_flush),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23818|  6.64k|        JANET_CORE_REG("net/connect", cfun_net_connect),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23819|  6.64k|        JANET_CORE_REG("net/shutdown", cfun_net_shutdown),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23820|  6.64k|        JANET_CORE_REG("net/peername", cfun_net_getpeername),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23821|  6.64k|        JANET_CORE_REG("net/localname", cfun_net_getsockname),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23822|  6.64k|        JANET_CORE_REG("net/address-unpack", cfun_net_address_unpack),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23823|  6.64k|        JANET_CORE_REG("net/setsockopt", cfun_net_setsockopt),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23824|  6.64k|        JANET_REG_END
  ------------------
  |  | 2110|  6.64k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
23825|  6.64k|    };
23826|       |    janet_core_cfuns_ext(env, NULL, net_cfuns);
23827|  6.64k|}
janet_net_init:
23829|  6.64k|void janet_net_init(void) {
23830|       |#ifdef JANET_WINDOWS
23831|       |    WSADATA wsaData;
23832|       |    janet_assert(!WSAStartup(MAKEWORD(2, 2), &wsaData), "could not start winsock");
23833|       |    janet_vm.connect_ex_loaded = 0;
23834|       |    janet_vm.connect_ex = NULL;
23835|       |#endif
23836|  6.64k|}
janet_net_deinit:
23838|  6.64k|void janet_net_deinit(void) {
23839|       |#ifdef JANET_WINDOWS
23840|       |    WSACleanup();
23841|       |#endif
23842|  6.64k|}
janet_lib_os:
26854|  6.64k|void janet_lib_os(JanetTable *env) {
26855|       |#if !defined(JANET_REDUCED_OS) && defined(JANET_WINDOWS) && defined(JANET_THREADS)
26856|       |    /* During start up, the top-most abstract machine (thread)
26857|       |     * in the thread tree sets up the critical section. */
26858|       |    static volatile long env_lock_initializing = 0;
26859|       |    static volatile long env_lock_initialized = 0;
26860|       |    if (!InterlockedExchange(&env_lock_initializing, 1)) {
26861|       |        InitializeCriticalSection(&env_lock);
26862|       |        InterlockedOr(&env_lock_initialized, 1);
26863|       |    } else {
26864|       |        while (!InterlockedOr(&env_lock_initialized, 0)) {
26865|       |            Sleep(0);
26866|       |        }
26867|       |    }
26868|       |
26869|       |#endif
26870|  6.64k|#ifndef JANET_NO_PROCESSES
26871|  6.64k|#endif
26872|  6.64k|    JanetRegExt os_cfuns[] = {
26873|  6.64k|        JANET_CORE_REG("os/exit", os_exit),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26874|  6.64k|        JANET_CORE_REG("os/which", os_which),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26875|  6.64k|        JANET_CORE_REG("os/arch", os_arch),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26876|  6.64k|        JANET_CORE_REG("os/compiler", os_compiler),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26877|  6.64k|#ifndef JANET_REDUCED_OS
26878|       |
26879|       |        /* misc (un-sandboxed) */
26880|  6.64k|        JANET_CORE_REG("os/cpu-count", os_cpu_count),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26881|  6.64k|        JANET_CORE_REG("os/cwd", os_cwd),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26882|  6.64k|        JANET_CORE_REG("os/cryptorand", os_cryptorand),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26883|  6.64k|        JANET_CORE_REG("os/perm-string", os_permission_string),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26884|  6.64k|        JANET_CORE_REG("os/perm-int", os_permission_int),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26885|  6.64k|        JANET_CORE_REG("os/mktime", os_mktime),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26886|  6.64k|        JANET_CORE_REG("os/time", os_time), /* not high resolution */
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26887|  6.64k|        JANET_CORE_REG("os/date", os_date), /* not high resolution */
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26888|  6.64k|        JANET_CORE_REG("os/strftime", os_strftime),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26889|  6.64k|        JANET_CORE_REG("os/sleep", os_sleep),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26890|  6.64k|        JANET_CORE_REG("os/isatty", os_isatty),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26891|  6.64k|#ifndef JANET_NO_LOCALES
26892|  6.64k|        JANET_CORE_REG("os/setlocale", os_setlocale),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26893|  6.64k|#endif
26894|       |
26895|       |        /* env functions */
26896|  6.64k|#ifndef JANET_PLAN9
26897|  6.64k|        JANET_CORE_REG("os/environ", os_environ),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26898|  6.64k|#endif
26899|  6.64k|        JANET_CORE_REG("os/getenv", os_getenv),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26900|  6.64k|        JANET_CORE_REG("os/setenv", os_setenv),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26901|       |
26902|       |        /* fs read */
26903|  6.64k|        JANET_CORE_REG("os/dir", os_dir),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26904|  6.64k|        JANET_CORE_REG("os/stat", os_stat),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26905|  6.64k|        JANET_CORE_REG("os/lstat", os_lstat),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26906|  6.64k|        JANET_CORE_REG("os/realpath", os_realpath),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26907|  6.64k|        JANET_CORE_REG("os/cd", os_cd),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26908|  6.64k|#ifndef JANET_NO_UMASK
26909|  6.64k|        JANET_CORE_REG("os/umask", os_umask),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26910|  6.64k|#endif
26911|  6.64k|#ifndef JANET_NO_SYMLINKS
26912|  6.64k|        JANET_CORE_REG("os/readlink", os_readlink),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26913|  6.64k|#endif
26914|       |
26915|       |        /* fs write */
26916|  6.64k|        JANET_CORE_REG("os/mkdir", os_mkdir),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26917|  6.64k|        JANET_CORE_REG("os/rmdir", os_rmdir),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26918|  6.64k|        JANET_CORE_REG("os/rm", os_remove),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26919|  6.64k|        JANET_CORE_REG("os/link", os_link),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26920|  6.64k|        JANET_CORE_REG("os/rename", os_rename),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26921|  6.64k|        JANET_CORE_REG("os/chmod", os_chmod),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26922|  6.64k|        JANET_CORE_REG("os/touch", os_touch),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26923|  6.64k|#ifndef JANET_NO_SYMLINKS
26924|  6.64k|        JANET_CORE_REG("os/symlink", os_symlink),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26925|  6.64k|#endif
26926|       |
26927|       |        /* processes */
26928|  6.64k|#ifndef JANET_NO_PROCESSES
26929|  6.64k|        JANET_CORE_REG("os/execute", os_execute),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26930|  6.64k|        JANET_CORE_REG("os/spawn", os_spawn),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26931|  6.64k|        JANET_CORE_REG("os/shell", os_shell),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26932|  6.64k|        JANET_CORE_REG("os/posix-fork", os_posix_fork),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26933|  6.64k|        JANET_CORE_REG("os/posix-exec", os_posix_exec),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26934|  6.64k|        JANET_CORE_REG("os/posix-chroot", os_posix_chroot),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26935|       |        /* no need to sandbox process management if you can't create processes
26936|       |         * (allows for limited functionality if use exposes C-functions to create specific processes) */
26937|  6.64k|        JANET_CORE_REG("os/proc-wait", os_proc_wait),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26938|  6.64k|        JANET_CORE_REG("os/proc-kill", os_proc_kill),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26939|  6.64k|        JANET_CORE_REG("os/proc-close", os_proc_close),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26940|  6.64k|        JANET_CORE_REG("os/getpid", os_proc_getpid),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26941|  6.64k|#ifdef JANET_EV
26942|  6.64k|        JANET_CORE_REG("os/sigaction", os_sigaction),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26943|  6.64k|#endif
26944|  6.64k|#endif
26945|       |
26946|       |        /* high resolution timers */
26947|  6.64k|        JANET_CORE_REG("os/clock", os_clock),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26948|       |
26949|  6.64k|#ifdef JANET_EV
26950|  6.64k|        JANET_CORE_REG("os/open", os_open), /* fs read and write */
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26951|  6.64k|        JANET_CORE_REG("os/pipe", os_pipe),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26952|  6.64k|#endif
26953|  6.64k|#endif
26954|  6.64k|        JANET_REG_END
  ------------------
  |  | 2110|  6.64k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
26955|  6.64k|    };
26956|       |    janet_core_cfuns_ext(env, NULL, os_cfuns);
26957|  6.64k|}
janet_is_symbol_char:
27017|   174k|int janet_is_symbol_char(uint8_t c) {
27018|   174k|    return symchars[c >> 5] & ((uint32_t)1 << (c & 0x1F));
27019|   174k|}
janet_valid_utf8:
27024|    970|int janet_valid_utf8(const uint8_t *str, int32_t len) {
27025|    970|    int32_t i = 0;
27026|    970|    int32_t j;
27027|  4.72k|    while (i < len) {
  ------------------
  |  Branch (27027:12): [True: 4.11k, False: 609]
  ------------------
27028|  4.11k|        int32_t nexti;
27029|  4.11k|        uint8_t c = str[i];
27030|       |
27031|       |        /* Check the number of bytes in code point */
27032|  4.11k|        if (c < 0x80) nexti = i + 1;
  ------------------
  |  Branch (27032:13): [True: 2.66k, False: 1.45k]
  ------------------
27033|  1.45k|        else if ((c >> 5) == 0x06) nexti = i + 2;
  ------------------
  |  Branch (27033:18): [True: 557, False: 899]
  ------------------
27034|    899|        else if ((c >> 4) == 0x0E) nexti = i + 3;
  ------------------
  |  Branch (27034:18): [True: 381, False: 518]
  ------------------
27035|    518|        else if ((c >> 3) == 0x1E) nexti = i + 4;
  ------------------
  |  Branch (27035:18): [True: 356, False: 162]
  ------------------
27036|       |        /* Don't allow 5 or 6 byte code points */
27037|    162|        else return 0;
27038|       |
27039|       |        /* No overflow */
27040|  3.95k|        if (nexti > len) return 0;
  ------------------
  |  Branch (27040:13): [True: 100, False: 3.85k]
  ------------------
27041|       |
27042|       |        /* Ensure trailing bytes are well formed (10XX XXXX) */
27043|  5.95k|        for (j = i + 1; j < nexti; j++) {
  ------------------
  |  Branch (27043:25): [True: 2.18k, False: 3.77k]
  ------------------
27044|  2.18k|            if ((str[j] >> 6) != 2) return 0;
  ------------------
  |  Branch (27044:17): [True: 75, False: 2.10k]
  ------------------
27045|  2.18k|        }
27046|       |
27047|       |        /* Check for overlong encoding */
27048|  3.77k|        if ((nexti == i + 2) && str[i] < 0xC2) return 0;
  ------------------
  |  Branch (27048:13): [True: 458, False: 3.32k]
  |  Branch (27048:33): [True: 7, False: 451]
  ------------------
27049|  3.77k|        if ((str[i] == 0xE0) && str[i + 1] < 0xA0) return 0;
  ------------------
  |  Branch (27049:13): [True: 162, False: 3.61k]
  |  Branch (27049:33): [True: 11, False: 151]
  ------------------
27050|  3.76k|        if ((str[i] == 0xF0) && str[i + 1] < 0x90) return 0;
  ------------------
  |  Branch (27050:13): [True: 126, False: 3.63k]
  |  Branch (27050:33): [True: 6, False: 120]
  ------------------
27051|       |
27052|  3.75k|        i = nexti;
27053|  3.75k|    }
27054|    609|    return 1;
27055|    970|}
janet_parser_consume:
27659|   256k|void janet_parser_consume(JanetParser *parser, uint8_t c) {
27660|   256k|    int consumed = 0;
27661|   256k|    janet_parser_checkdead(parser);
27662|   256k|    if (c == '\r') {
  ------------------
  |  Branch (27662:9): [True: 4.15k, False: 252k]
  ------------------
27663|  4.15k|        parser->line++;
27664|  4.15k|        parser->column = 0;
27665|   252k|    } else if (c == '\n') {
  ------------------
  |  Branch (27665:16): [True: 10.3k, False: 242k]
  ------------------
27666|  10.3k|        parser->column = 0;
27667|  10.3k|        if (parser->lookback != '\r')
  ------------------
  |  Branch (27667:13): [True: 9.86k, False: 484]
  ------------------
27668|  9.86k|            parser->line++;
27669|   242k|    } else {
27670|   242k|        parser->column++;
27671|   242k|    }
27672|   583k|    while (!consumed && !parser->error) {
  ------------------
  |  Branch (27672:12): [True: 326k, False: 256k]
  |  Branch (27672:25): [True: 326k, False: 699]
  ------------------
27673|   326k|        JanetParseState *state = parser->states + parser->statecount - 1;
27674|   326k|        consumed = state->consumer(parser, state, c);
27675|   326k|    }
27676|   256k|    parser->lookback = c;
27677|   256k|}
janet_parser_eof:
27679|  6.13k|void janet_parser_eof(JanetParser *parser) {
27680|  6.13k|    janet_parser_checkdead(parser);
27681|  6.13k|    size_t oldcolumn = parser->column;
27682|  6.13k|    size_t oldline = parser->line;
27683|  6.13k|    janet_parser_consume(parser, '\n');
27684|  6.13k|    if (parser->statecount > 1) {
  ------------------
  |  Branch (27684:9): [True: 1.41k, False: 4.71k]
  ------------------
27685|  1.41k|        delim_error(parser, parser->statecount - 1, 0, "unexpected end of source");
27686|  1.41k|    }
27687|  6.13k|    parser->line = oldline;
27688|  6.13k|    parser->column = oldcolumn;
27689|  6.13k|    parser->flag |= JANET_PARSER_DEAD;
  ------------------
  |  |26991|  6.13k|#define JANET_PARSER_DEAD 0x1
  ------------------
27690|  6.13k|}
janet_parser_status:
27692|   264k|enum JanetParserStatus janet_parser_status(JanetParser *parser) {
27693|   264k|    if (parser->error) return JANET_PARSE_ERROR;
  ------------------
  |  Branch (27693:9): [True: 2.95k, False: 261k]
  ------------------
27694|   261k|    if (parser->flag) return JANET_PARSE_DEAD;
  ------------------
  |  Branch (27694:9): [True: 4.71k, False: 256k]
  ------------------
27695|   256k|    if (parser->statecount > 1) return JANET_PARSE_PENDING;
  ------------------
  |  Branch (27695:9): [True: 241k, False: 15.3k]
  ------------------
27696|  15.3k|    return JANET_PARSE_ROOT;
27697|   256k|}
janet_parser_produce:
27718|  4.64k|Janet janet_parser_produce(JanetParser *parser) {
27719|  4.64k|    Janet ret;
27720|  4.64k|    size_t i;
27721|  4.64k|    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 (27721:9): [True: 0, False: 4.64k]
  ------------------
27722|  4.64k|    ret = janet_unwrap_tuple(parser->args[0])[0];
  ------------------
  |  |  858|  4.64k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
27723|  10.4k|    for (i = 1; i < parser->argcount; i++) {
  ------------------
  |  Branch (27723:17): [True: 5.78k, False: 4.64k]
  ------------------
27724|  5.78k|        parser->args[i - 1] = parser->args[i];
27725|  5.78k|    }
27726|  4.64k|    parser->pending--;
27727|  4.64k|    parser->argcount--;
27728|  4.64k|    parser->states[0].argn--;
27729|  4.64k|    return ret;
27730|  4.64k|}
janet_parser_init:
27746|  6.64k|void janet_parser_init(JanetParser *parser) {
27747|  6.64k|    parser->args = NULL;
27748|  6.64k|    parser->states = NULL;
27749|  6.64k|    parser->buf = NULL;
27750|  6.64k|    parser->argcount = 0;
27751|  6.64k|    parser->argcap = 0;
27752|  6.64k|    parser->bufcount = 0;
27753|  6.64k|    parser->bufcap = 0;
27754|  6.64k|    parser->statecount = 0;
27755|  6.64k|    parser->statecap = 0;
27756|  6.64k|    parser->error = NULL;
27757|  6.64k|    parser->lookback = -1;
27758|  6.64k|    parser->line = 1;
27759|  6.64k|    parser->column = 0;
27760|  6.64k|    parser->pending = 0;
27761|  6.64k|    parser->flag = 0;
27762|       |
27763|  6.64k|    pushstate(parser, root, PFLAG_CONTAINER);
  ------------------
  |  |27096|  6.64k|#define PFLAG_CONTAINER 0x100
  ------------------
27764|  6.64k|}
janet_parser_deinit:
27766|  6.64k|void janet_parser_deinit(JanetParser *parser) {
27767|  6.64k|    janet_free(parser->args);
  ------------------
  |  | 2415|  6.64k|#define janet_free(X) free((X))
  ------------------
27768|  6.64k|    janet_free(parser->buf);
  ------------------
  |  | 2415|  6.64k|#define janet_free(X) free((X))
  ------------------
27769|  6.64k|    janet_free(parser->states);
  ------------------
  |  | 2415|  6.64k|#define janet_free(X) free((X))
  ------------------
27770|  6.64k|}
janet_parser_has_more:
27817|  4.71k|int janet_parser_has_more(JanetParser *parser) {
27818|  4.71k|    return !!parser->pending;
27819|  4.71k|}
janet_lib_parse:
28271|  6.64k|void janet_lib_parse(JanetTable *env) {
28272|  6.64k|    JanetRegExt parse_cfuns[] = {
28273|  6.64k|        JANET_CORE_REG("parser/new", cfun_parse_parser),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28274|  6.64k|        JANET_CORE_REG("parser/clone", cfun_parse_clone),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28275|  6.64k|        JANET_CORE_REG("parser/has-more", cfun_parse_has_more),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28276|  6.64k|        JANET_CORE_REG("parser/produce", cfun_parse_produce),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28277|  6.64k|        JANET_CORE_REG("parser/consume", cfun_parse_consume),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28278|  6.64k|        JANET_CORE_REG("parser/byte", cfun_parse_byte),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28279|  6.64k|        JANET_CORE_REG("parser/error", cfun_parse_error),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28280|  6.64k|        JANET_CORE_REG("parser/status", cfun_parse_status),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28281|  6.64k|        JANET_CORE_REG("parser/flush", cfun_parse_flush),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28282|  6.64k|        JANET_CORE_REG("parser/state", cfun_parse_state),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28283|  6.64k|        JANET_CORE_REG("parser/where", cfun_parse_where),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28284|  6.64k|        JANET_CORE_REG("parser/eof", cfun_parse_eof),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28285|  6.64k|        JANET_CORE_REG("parser/insert", cfun_parse_insert),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28286|  6.64k|        JANET_REG_END
  ------------------
  |  | 2110|  6.64k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
28287|  6.64k|    };
28288|       |    janet_core_cfuns_ext(env, NULL, parse_cfuns);
28289|  6.64k|}
cfun_peg_match:
30306|  4.64k|              "Returns nil if text does not match the language defined by peg. The syntax of PEGs is documented on the Janet website.") {
30307|  4.64k|    PegCall c = peg_cfun_init(argc, argv, 0);
30308|  4.64k|    const uint8_t *result = peg_rule(&c.s, c.s.bytecode, c.bytes.bytes + c.start);
30309|  4.64k|    return result ? janet_wrap_array(c.s.captures) : janet_wrap_nil();
  ------------------
  |  |  845|  1.24k|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  825|  1.24k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.24k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.24k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  return result ? janet_wrap_array(c.s.captures) : janet_wrap_nil();
  ------------------
  |  |  831|  3.39k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  3.39k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  3.39k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  3.39k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (30309:12): [True: 1.24k, False: 3.39k]
  ------------------
30310|  4.64k|}
janet_lib_peg:
30407|  6.64k|void janet_lib_peg(JanetTable *env) {
30408|  6.64k|    JanetRegExt cfuns[] = {
30409|  6.64k|        JANET_CORE_REG("peg/compile", cfun_peg_compile),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
30410|  6.64k|        JANET_CORE_REG("peg/match", cfun_peg_match),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
30411|  6.64k|        JANET_CORE_REG("peg/find", cfun_peg_find),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
30412|  6.64k|        JANET_CORE_REG("peg/find-all", cfun_peg_find_all),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
30413|  6.64k|        JANET_CORE_REG("peg/replace", cfun_peg_replace),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
30414|  6.64k|        JANET_CORE_REG("peg/replace-all", cfun_peg_replace_all),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
30415|  6.64k|        JANET_REG_END
  ------------------
  |  | 2110|  6.64k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
30416|  6.64k|    };
30417|       |    janet_core_cfuns_ext(env, NULL, cfuns);
30418|  6.64k|    janet_register_abstract_type(&janet_peg_type);
30419|  6.64k|}
janet_to_string_b:
30649|  80.5M|void janet_to_string_b(JanetBuffer *buffer, Janet x) {
30650|  80.5M|    switch (janet_type(x)) {
  ------------------
  |  |  795|  80.5M|    (isnan((x).number) \
  |  |  796|  80.5M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  80.5M|        : JANET_NUMBER)
  ------------------
  |  Branch (30650:13): [True: 77.6M, False: 2.89M]
  ------------------
30651|      0|        case JANET_NIL:
  ------------------
  |  Branch (30651:9): [True: 0, False: 80.5M]
  ------------------
30652|      0|            janet_buffer_push_cstring(buffer, "");
30653|      0|            break;
30654|  3.89k|        case JANET_BOOLEAN:
  ------------------
  |  Branch (30654:9): [True: 3.89k, False: 80.5M]
  ------------------
30655|  3.89k|            janet_buffer_push_cstring(buffer,
30656|  3.89k|                                      janet_unwrap_boolean(x) ? "true" : "false");
  ------------------
  |  |  838|  3.89k|#define janet_unwrap_boolean(x) ((x).u64 & 0x1)
  |  |  ------------------
  |  |  |  Branch (838:33): [True: 3.62k, False: 276]
  |  |  ------------------
  ------------------
30657|  3.89k|            break;
30658|  2.89M|        case JANET_NUMBER:
  ------------------
  |  Branch (30658:9): [True: 2.89M, False: 77.6M]
  ------------------
30659|  2.89M|            number_to_string_b(buffer, janet_unwrap_number(x));
  ------------------
  |  |  839|  2.89M|#define janet_unwrap_number(x) ((x).number)
  ------------------
30660|  2.89M|            break;
30661|  7.03M|        case JANET_STRING:
  ------------------
  |  Branch (30661:9): [True: 7.03M, False: 73.5M]
  ------------------
30662|  21.8M|        case JANET_SYMBOL:
  ------------------
  |  Branch (30662:9): [True: 14.8M, False: 65.7M]
  ------------------
30663|  23.0M|        case JANET_KEYWORD:
  ------------------
  |  Branch (30663:9): [True: 1.19M, False: 79.3M]
  ------------------
30664|  23.0M|            janet_buffer_push_bytes(buffer,
30665|  23.0M|                                    janet_unwrap_string(x),
  ------------------
  |  |  863|  23.0M|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
30666|  23.0M|                                    janet_string_length(janet_unwrap_string(x)));
  ------------------
  |  | 1813|  23.0M|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|  23.0M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
30667|  23.0M|            break;
30668|  17.1k|        case JANET_BUFFER: {
  ------------------
  |  Branch (30668:9): [True: 17.1k, False: 80.5M]
  ------------------
30669|  17.1k|            JanetBuffer *to = janet_unwrap_buffer(x);
  ------------------
  |  |  862|  17.1k|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
30670|       |            /* Prevent resizing buffer while appending */
30671|  17.1k|            if (buffer == to) janet_buffer_extra(buffer, to->count);
  ------------------
  |  Branch (30671:17): [True: 0, False: 17.1k]
  ------------------
30672|  17.1k|            janet_buffer_push_bytes(buffer, to->data, to->count);
30673|  17.1k|            break;
30674|  21.8M|        }
30675|    219|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (30675:9): [True: 219, False: 80.5M]
  ------------------
30676|    219|            JanetAbstract p = janet_unwrap_abstract(x);
  ------------------
  |  |  866|    219|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
30677|    219|            const JanetAbstractType *t = janet_abstract_type(p);
  ------------------
  |  | 1899|    219|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|    219|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
30678|    219|            if (t->tostring != NULL) {
  ------------------
  |  Branch (30678:17): [True: 219, False: 0]
  ------------------
30679|    219|                t->tostring(p, buffer);
30680|    219|            } else {
30681|      0|                string_description_b(buffer, t->name, p);
30682|      0|            }
30683|    219|        }
30684|    219|        return;
30685|      0|        case JANET_CFUNCTION: {
  ------------------
  |  Branch (30685:9): [True: 0, False: 80.5M]
  ------------------
30686|      0|            JanetCFunRegistry *reg = janet_registry_get(janet_unwrap_cfunction(x));
  ------------------
  |  |  869|      0|#define janet_unwrap_cfunction(x) ((JanetCFunction)janet_nanbox_to_pointer(x))
  ------------------
30687|      0|            if (NULL != reg) {
  ------------------
  |  Branch (30687:17): [True: 0, False: 0]
  ------------------
30688|      0|                janet_buffer_push_cstring(buffer, "<cfunction ");
30689|      0|                if (NULL != reg->name_prefix) {
  ------------------
  |  Branch (30689:21): [True: 0, False: 0]
  ------------------
30690|      0|                    janet_buffer_push_cstring(buffer, reg->name_prefix);
30691|      0|                    janet_buffer_push_u8(buffer, '/');
30692|      0|                }
30693|      0|                janet_buffer_push_cstring(buffer, reg->name);
30694|      0|                janet_buffer_push_u8(buffer, '>');
30695|      0|                break;
30696|      0|            }
30697|      0|            goto fallthrough;
30698|      0|        }
30699|      0|        case JANET_FUNCTION: {
  ------------------
  |  Branch (30699:9): [True: 0, False: 80.5M]
  ------------------
30700|      0|            JanetFunction *fun = janet_unwrap_function(x);
  ------------------
  |  |  868|      0|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
30701|      0|            JanetFuncDef *def = fun->def;
30702|      0|            if (def == NULL) {
  ------------------
  |  Branch (30702:17): [True: 0, False: 0]
  ------------------
30703|      0|                janet_buffer_push_cstring(buffer, "<incomplete function>");
30704|      0|                break;
30705|      0|            }
30706|      0|            if (def->name) {
  ------------------
  |  Branch (30706:17): [True: 0, False: 0]
  ------------------
30707|      0|                const uint8_t *n = def->name;
30708|      0|                janet_buffer_push_cstring(buffer, "<function ");
30709|      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)))
  |  |  ------------------
  ------------------
30710|      0|                janet_buffer_push_u8(buffer, '>');
30711|      0|                break;
30712|      0|            }
30713|      0|            goto fallthrough;
30714|      0|        }
30715|      0|    fallthrough:
30716|  54.5M|        default:
  ------------------
  |  Branch (30716:9): [True: 54.5M, False: 25.9M]
  ------------------
30717|  54.5M|            string_description_b(buffer, janet_type_names[janet_type(x)], janet_unwrap_pointer(x));
  ------------------
  |  |  795|  54.5M|    (isnan((x).number) \
  |  |  796|  54.5M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  54.5M|        : JANET_NUMBER)
  ------------------
                          string_description_b(buffer, janet_type_names[janet_type(x)], janet_unwrap_pointer(x));
  ------------------
  |  |  867|  54.5M|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (30717:59): [True: 54.5M, False: 0]
  ------------------
30718|  54.5M|            break;
30719|  80.5M|    }
30720|  80.5M|}
janet_description_b:
30735|  28.2M|void janet_description_b(JanetBuffer *buffer, Janet x) {
30736|  28.2M|    switch (janet_type(x)) {
  ------------------
  |  |  795|  28.2M|    (isnan((x).number) \
  |  |  796|  28.2M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  28.2M|        : JANET_NUMBER)
  ------------------
  |  Branch (30736:13): [True: 25.3M, False: 2.88M]
  ------------------
30737|  17.7M|        default:
  ------------------
  |  Branch (30737:9): [True: 17.7M, False: 10.5M]
  ------------------
30738|  17.7M|            break;
30739|  17.7M|        case JANET_NIL:
  ------------------
  |  Branch (30739:9): [True: 205k, False: 28.0M]
  ------------------
30740|   205k|            janet_buffer_push_cstring(buffer, "nil");
30741|   205k|            return;
30742|  1.19M|        case JANET_KEYWORD:
  ------------------
  |  Branch (30742:9): [True: 1.19M, False: 27.0M]
  ------------------
30743|  1.19M|            janet_buffer_push_u8(buffer, ':');
30744|  1.19M|            break;
30745|  8.68M|        case JANET_STRING:
  ------------------
  |  Branch (30745:9): [True: 8.68M, False: 19.5M]
  ------------------
30746|  8.68M|            janet_escape_string_b(buffer, janet_unwrap_string(x));
  ------------------
  |  |  863|  8.68M|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
30747|  8.68M|            return;
30748|   299k|        case JANET_BUFFER: {
  ------------------
  |  Branch (30748:9): [True: 299k, False: 27.9M]
  ------------------
30749|   299k|            JanetBuffer *b = janet_unwrap_buffer(x);
  ------------------
  |  |  862|   299k|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
30750|   299k|            janet_escape_buffer_b(buffer, b);
30751|   299k|            return;
30752|      0|        }
30753|   147k|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (30753:9): [True: 147k, False: 28.1M]
  ------------------
30754|   147k|            JanetAbstract p = janet_unwrap_abstract(x);
  ------------------
  |  |  866|   147k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
30755|   147k|            const JanetAbstractType *t = janet_abstract_type(p);
  ------------------
  |  | 1899|   147k|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|   147k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
30756|   147k|            if (t->tostring != NULL) {
  ------------------
  |  Branch (30756:17): [True: 147k, False: 0]
  ------------------
30757|   147k|                janet_buffer_push_cstring(buffer, "<");
30758|   147k|                janet_buffer_push_cstring(buffer, t->name);
30759|   147k|                janet_buffer_push_cstring(buffer, " ");
30760|   147k|                t->tostring(p, buffer);
30761|   147k|                janet_buffer_push_cstring(buffer, ">");
30762|   147k|            } else {
30763|      0|                string_description_b(buffer, t->name, p);
30764|      0|            }
30765|   147k|            return;
30766|      0|        }
30767|  28.2M|    }
30768|  18.9M|    janet_to_string_b(buffer, x);
30769|  18.9M|}
janet_formatbv:
31422|  10.2M|void janet_formatbv(JanetBuffer *b, const char *format, va_list args) {
31423|  10.2M|    const char *format_end = format + strlen(format);
31424|  10.2M|    const char *c = format;
31425|  10.2M|    int32_t startlen = b->count;
31426|   110M|    while (c < format_end) {
  ------------------
  |  Branch (31426:12): [True: 100M, False: 10.2M]
  ------------------
31427|   100M|        if (*c != '%') {
  ------------------
  |  Branch (31427:13): [True: 78.8M, False: 21.7M]
  ------------------
31428|  78.8M|            janet_buffer_push_u8(b, (uint8_t) *c++);
31429|  78.8M|        } else if (*++c == '%') {
  ------------------
  |  Branch (31429:20): [True: 0, False: 21.7M]
  ------------------
31430|      0|            janet_buffer_push_u8(b, (uint8_t) *c++);
31431|  21.7M|        } else {
31432|  21.7M|            char form[MAX_FORMAT], item[MAX_ITEM];
31433|  21.7M|            char width[3], precision[3];
31434|  21.7M|            int nb = 0; /* number of bytes in added item */
31435|  21.7M|            c = scanformat(c, form, width, precision);
31436|  21.7M|            switch (*c++) {
31437|      0|                case 'c': {
  ------------------
  |  Branch (31437:17): [True: 0, False: 21.7M]
  ------------------
31438|      0|                    int n = va_arg(args, int);
31439|      0|                    nb = snprintf(item, MAX_ITEM, form, n);
  ------------------
  |  |31345|      0|#define MAX_ITEM  256
  ------------------
31440|      0|                    break;
31441|      0|                }
31442|  11.5M|                case 'd':
  ------------------
  |  Branch (31442:17): [True: 11.5M, False: 10.2M]
  ------------------
31443|  11.5M|                case 'i': {
  ------------------
  |  Branch (31443:17): [True: 0, False: 21.7M]
  ------------------
31444|  11.5M|                    int64_t n = (int64_t) va_arg(args, int32_t);
31445|  11.5M|                    nb = snprintf(item, MAX_ITEM, form, n);
  ------------------
  |  |31345|  11.5M|#define MAX_ITEM  256
  ------------------
31446|  11.5M|                    break;
31447|  11.5M|                }
31448|      0|                case 'D':
  ------------------
  |  Branch (31448:17): [True: 0, False: 21.7M]
  ------------------
31449|      0|                case 'I': {
  ------------------
  |  Branch (31449:17): [True: 0, False: 21.7M]
  ------------------
31450|      0|                    int64_t n = va_arg(args, int64_t);
31451|      0|                    nb = snprintf(item, MAX_ITEM, form, n);
  ------------------
  |  |31345|      0|#define MAX_ITEM  256
  ------------------
31452|      0|                    break;
31453|      0|                }
31454|      0|                case 'x':
  ------------------
  |  Branch (31454:17): [True: 0, False: 21.7M]
  ------------------
31455|      0|                case 'X':
  ------------------
  |  Branch (31455:17): [True: 0, False: 21.7M]
  ------------------
31456|      0|                case 'o':
  ------------------
  |  Branch (31456:17): [True: 0, False: 21.7M]
  ------------------
31457|      0|                case 'u': {
  ------------------
  |  Branch (31457:17): [True: 0, False: 21.7M]
  ------------------
31458|      0|                    uint64_t n = va_arg(args, uint64_t);
31459|      0|                    nb = snprintf(item, MAX_ITEM, form, n);
  ------------------
  |  |31345|      0|#define MAX_ITEM  256
  ------------------
31460|      0|                    break;
31461|      0|                }
31462|      0|                case 'a':
  ------------------
  |  Branch (31462:17): [True: 0, False: 21.7M]
  ------------------
31463|      0|                case 'A':
  ------------------
  |  Branch (31463:17): [True: 0, False: 21.7M]
  ------------------
31464|      0|                case 'e':
  ------------------
  |  Branch (31464:17): [True: 0, False: 21.7M]
  ------------------
31465|      0|                case 'E':
  ------------------
  |  Branch (31465:17): [True: 0, False: 21.7M]
  ------------------
31466|      0|                case 'f':
  ------------------
  |  Branch (31466:17): [True: 0, False: 21.7M]
  ------------------
31467|      0|                case 'g':
  ------------------
  |  Branch (31467:17): [True: 0, False: 21.7M]
  ------------------
31468|      0|                case 'G': {
  ------------------
  |  Branch (31468:17): [True: 0, False: 21.7M]
  ------------------
31469|      0|                    double d = va_arg(args, double);
31470|      0|                    nb = snprintf(item, MAX_ITEM, form, d);
  ------------------
  |  |31345|      0|#define MAX_ITEM  256
  ------------------
31471|      0|                    break;
31472|      0|                }
31473|  35.6k|                case 's':
  ------------------
  |  Branch (31473:17): [True: 35.6k, False: 21.7M]
  ------------------
31474|  35.9k|                case 'S': {
  ------------------
  |  Branch (31474:17): [True: 361, False: 21.7M]
  ------------------
31475|  35.9k|                    const char *str = va_arg(args, const char *);
31476|  35.9k|                    int32_t len = (c[-1] == 's')
  ------------------
  |  Branch (31476:35): [True: 35.6k, False: 361]
  ------------------
31477|  35.9k|                                  ? (int32_t) strlen(str)
31478|  35.9k|                                  : janet_string_length((JanetString) str);
  ------------------
  |  | 1813|    361|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|    361|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
31479|  35.9k|                    if (form[2] == '\0')
  ------------------
  |  Branch (31479:25): [True: 35.9k, False: 0]
  ------------------
31480|  35.9k|                        janet_buffer_push_bytes(b, (const uint8_t *) str, len);
31481|      0|                    else {
31482|      0|                        if (len != (int32_t) strlen((const char *) str))
  ------------------
  |  Branch (31482:29): [True: 0, False: 0]
  ------------------
31483|      0|                            janet_panic("string contains zeros");
31484|      0|                        if (!strchr(form, '.') && len >= 100) {
  ------------------
  |  Branch (31484:29): [True: 0, False: 0]
  |  Branch (31484:51): [True: 0, False: 0]
  ------------------
31485|      0|                            janet_panic("no precision and string is too long to be formatted");
31486|      0|                        } else {
31487|      0|                            nb = snprintf(item, MAX_ITEM, form, str);
  ------------------
  |  |31345|      0|#define MAX_ITEM  256
  ------------------
31488|      0|                        }
31489|      0|                    }
31490|  35.9k|                    break;
31491|  35.9k|                }
31492|  35.9k|                case 'V':
  ------------------
  |  Branch (31492:17): [True: 0, False: 21.7M]
  ------------------
31493|      0|                    janet_to_string_b(b, va_arg(args, Janet));
31494|      0|                    break;
31495|    743|                case 'v':
  ------------------
  |  Branch (31495:17): [True: 743, False: 21.7M]
  ------------------
31496|    743|                    janet_description_b(b, va_arg(args, Janet));
31497|    743|                    break;
31498|      0|                case 't':
  ------------------
  |  Branch (31498:17): [True: 0, False: 21.7M]
  ------------------
31499|      0|                    janet_buffer_push_cstring(b, typestr(va_arg(args, Janet)));
31500|      0|                    break;
31501|      0|                case 'T': {
  ------------------
  |  Branch (31501:17): [True: 0, False: 21.7M]
  ------------------
31502|      0|                    int types = va_arg(args, int);
31503|      0|                    pushtypes(b, types);
31504|      0|                    break;
31505|  35.9k|                }
31506|      0|                case 'M':
  ------------------
  |  Branch (31506:17): [True: 0, False: 21.7M]
  ------------------
31507|  10.1M|                case 'm':
  ------------------
  |  Branch (31507:17): [True: 10.1M, False: 11.5M]
  ------------------
31508|  10.1M|                case 'N':
  ------------------
  |  Branch (31508:17): [True: 0, False: 21.7M]
  ------------------
31509|  10.1M|                case 'n':
  ------------------
  |  Branch (31509:17): [True: 0, False: 21.7M]
  ------------------
31510|  10.1M|                case 'Q':
  ------------------
  |  Branch (31510:17): [True: 0, False: 21.7M]
  ------------------
31511|  10.1M|                case 'q':
  ------------------
  |  Branch (31511:17): [True: 0, False: 21.7M]
  ------------------
31512|  10.1M|                case 'P':
  ------------------
  |  Branch (31512:17): [True: 0, False: 21.7M]
  ------------------
31513|  10.1M|                case 'p': { /* janet pretty , precision = depth */
  ------------------
  |  Branch (31513:17): [True: 2.67k, False: 21.7M]
  ------------------
31514|  10.1M|                    int depth = atoi(precision);
31515|  10.1M|                    if (depth < 1) depth = JANET_RECURSION_GUARD;
  ------------------
  |  |  296|  10.1M|#define JANET_RECURSION_GUARD 1024
  ------------------
  |  Branch (31515:25): [True: 10.1M, False: 0]
  ------------------
31516|  10.1M|                    char d = c[-1];
31517|  10.1M|                    int has_color = (d == 'P') || (d == 'Q') || (d == 'M') || (d == 'N');
  ------------------
  |  Branch (31517:37): [True: 0, False: 10.1M]
  |  Branch (31517:51): [True: 0, False: 10.1M]
  |  Branch (31517:65): [True: 0, False: 10.1M]
  |  Branch (31517:79): [True: 0, False: 10.1M]
  ------------------
31518|  10.1M|                    int has_oneline = (d == 'Q') || (d == 'q') || (d == 'N') || (d == 'n');
  ------------------
  |  Branch (31518:39): [True: 0, False: 10.1M]
  |  Branch (31518:53): [True: 0, False: 10.1M]
  |  Branch (31518:67): [True: 0, False: 10.1M]
  |  Branch (31518:81): [True: 0, False: 10.1M]
  ------------------
31519|  10.1M|                    int has_notrunc = (d == 'M') || (d == 'm') || (d == 'N') || (d == 'n');
  ------------------
  |  Branch (31519:39): [True: 0, False: 10.1M]
  |  Branch (31519:53): [True: 10.1M, False: 2.67k]
  |  Branch (31519:67): [True: 0, False: 2.67k]
  |  Branch (31519:81): [True: 0, False: 2.67k]
  ------------------
31520|  10.1M|                    int columns = atoi(width);
31521|  10.1M|                    if (columns == 0) {
  ------------------
  |  Branch (31521:25): [True: 10.1M, False: 0]
  ------------------
31522|  10.1M|                        columns = JANET_COLUMNS;
  ------------------
  |  |31258|  10.1M|#define JANET_COLUMNS 80
  ------------------
31523|  10.1M|                    } else if (columns < 0) {
  ------------------
  |  Branch (31523:32): [True: 0, False: 0]
  ------------------
31524|      0|                        has_oneline = 1;
31525|      0|                    }
31526|  10.1M|                    int flags = 0;
31527|  10.1M|                    flags |= has_color ? JANET_PRETTY_COLOR : 0;
  ------------------
  |  | 1967|      0|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (31527:30): [True: 0, False: 10.1M]
  ------------------
31528|  10.1M|                    flags |= has_oneline ? JANET_PRETTY_ONELINE : 0;
  ------------------
  |  | 1968|      0|#define JANET_PRETTY_ONELINE 2
  ------------------
  |  Branch (31528:30): [True: 0, False: 10.1M]
  ------------------
31529|  10.1M|                    flags |= has_notrunc ? JANET_PRETTY_NOTRUNC : 0;
  ------------------
  |  | 1969|  10.1M|#define JANET_PRETTY_NOTRUNC 4
  ------------------
  |  Branch (31529:30): [True: 10.1M, False: 2.67k]
  ------------------
31530|  10.1M|                    janet_pretty_(b, depth, columns, flags,
31531|  10.1M|                                  va_arg(args, Janet), startlen, b->count);
31532|  10.1M|                    break;
31533|  10.1M|                }
31534|      0|                case 'j': {
  ------------------
  |  Branch (31534:17): [True: 0, False: 21.7M]
  ------------------
31535|      0|                    int depth = atoi(precision);
31536|      0|                    if (depth < 1) {
  ------------------
  |  Branch (31536:25): [True: 0, False: 0]
  ------------------
31537|      0|                        depth = JANET_RECURSION_GUARD;
  ------------------
  |  |  296|      0|#define JANET_RECURSION_GUARD 1024
  ------------------
31538|      0|                    }
31539|      0|                    janet_jdn_(b, depth, va_arg(args, Janet), startlen, b->count);
31540|      0|                    break;
31541|  10.1M|                }
31542|      0|                default: {
  ------------------
  |  Branch (31542:17): [True: 0, False: 21.7M]
  ------------------
31543|       |                    /* also treat cases 'nLlh' */
31544|      0|                    janet_panicf("invalid conversion '%s' to 'format'",
31545|      0|                                 form);
31546|  10.1M|                }
31547|  21.7M|            }
31548|  21.7M|            if (nb >= MAX_ITEM)
  ------------------
  |  |31345|  21.7M|#define MAX_ITEM  256
  ------------------
  |  Branch (31548:17): [True: 0, False: 21.7M]
  ------------------
31549|      0|                janet_panic("format buffer overflow");
31550|  21.7M|            if (nb > 0)
  ------------------
  |  Branch (31550:17): [True: 11.5M, False: 10.2M]
  ------------------
31551|  11.5M|                janet_buffer_push_bytes(b, (uint8_t *) item, nb);
31552|  21.7M|        }
31553|       |
31554|   100M|    }
31555|  10.2M|}
janet_formatc:
31559|  1.27k|const uint8_t *janet_formatc(const char *format, ...) {
31560|  1.27k|    va_list args;
31561|  1.27k|    const uint8_t *ret;
31562|  1.27k|    JanetBuffer buffer;
31563|  1.27k|    int32_t len = 0;
31564|       |
31565|       |    /* Calculate length, init buffer and args */
31566|  35.2k|    while (format[len]) len++;
  ------------------
  |  Branch (31566:12): [True: 33.9k, False: 1.27k]
  ------------------
31567|  1.27k|    janet_buffer_init(&buffer, len);
31568|  1.27k|    va_start(args, format);
31569|       |
31570|       |    /* Run format */
31571|  1.27k|    janet_formatbv(&buffer, format, args);
31572|       |
31573|       |    /* Iterate length */
31574|  1.27k|    va_end(args);
31575|       |
31576|  1.27k|    ret = janet_string(buffer.data, buffer.count);
31577|  1.27k|    janet_buffer_deinit(&buffer);
31578|  1.27k|    return ret;
31579|  1.27k|}
janet_formatb:
31581|  1.42k|JanetBuffer *janet_formatb(JanetBuffer *buffer, const char *format, ...) {
31582|  1.42k|    va_list args;
31583|  1.42k|    va_start(args, format);
31584|  1.42k|    janet_formatbv(buffer, format, args);
31585|       |    va_end(args);
31586|  1.42k|    return buffer;
31587|  1.42k|}
janet_string:
33498|  22.7M|const uint8_t *janet_string(const uint8_t *buf, int32_t len) {
33499|  22.7M|    JanetStringHead *head = janet_gcalloc(JANET_MEMORY_STRING, sizeof(JanetStringHead) + (size_t) len + 1);
33500|  22.7M|    head->length = len;
33501|  22.7M|    head->hash = janet_string_calchash(buf, len);
33502|  22.7M|    uint8_t *data = (uint8_t *)head->data;
33503|  22.7M|    safe_memcpy(data, buf, len);
33504|  22.7M|    data[len] = 0;
33505|  22.7M|    return data;
33506|  22.7M|}
janet_string_compare:
33509|   687k|int janet_string_compare(const uint8_t *lhs, const uint8_t *rhs) {
33510|   687k|    int32_t xlen = janet_string_length(lhs);
  ------------------
  |  | 1813|   687k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|   687k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
33511|   687k|    int32_t ylen = janet_string_length(rhs);
  ------------------
  |  | 1813|   687k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|   687k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
33512|   687k|    int32_t len = xlen > ylen ? ylen : xlen;
  ------------------
  |  Branch (33512:19): [True: 21.9k, False: 665k]
  ------------------
33513|   687k|    int res = memcmp(lhs, rhs, len);
33514|   687k|    if (res) return res > 0 ? 1 : -1;
  ------------------
  |  Branch (33514:9): [True: 169k, False: 518k]
  |  Branch (33514:21): [True: 108k, False: 60.8k]
  ------------------
33515|   518k|    if (xlen == ylen) return 0;
  ------------------
  |  Branch (33515:9): [True: 335k, False: 182k]
  ------------------
33516|   182k|    return xlen < ylen ? -1 : 1;
  ------------------
  |  Branch (33516:12): [True: 177k, False: 4.78k]
  ------------------
33517|   518k|}
janet_string_equalconst:
33520|  42.3M|int janet_string_equalconst(const uint8_t *lhs, const uint8_t *rhs, int32_t rlen, int32_t rhash) {
33521|  42.3M|    int32_t lhash = janet_string_hash(lhs);
  ------------------
  |  | 1814|  42.3M|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  ------------------
  |  |  |  | 1812|  42.3M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
33522|  42.3M|    int32_t llen = janet_string_length(lhs);
  ------------------
  |  | 1813|  42.3M|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|  42.3M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
33523|  42.3M|    if (lhash != rhash || llen != rlen)
  ------------------
  |  Branch (33523:9): [True: 18.9M, False: 23.4M]
  |  Branch (33523:27): [True: 19, False: 23.4M]
  ------------------
33524|  18.9M|        return 0;
33525|  23.4M|    if (lhs == rhs)
  ------------------
  |  Branch (33525:9): [True: 13.2M, False: 10.1M]
  ------------------
33526|  13.2M|        return 1;
33527|  10.1M|    return !memcmp(lhs, rhs, rlen);
33528|  23.4M|}
janet_string_equal:
33531|  1.41k|int janet_string_equal(const uint8_t *lhs, const uint8_t *rhs) {
33532|  1.41k|    return janet_string_equalconst(lhs, rhs,
33533|  1.41k|                                   janet_string_length(rhs), janet_string_hash(rhs));
  ------------------
  |  | 1813|  1.41k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|  1.41k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
                                                 janet_string_length(rhs), janet_string_hash(rhs));
  ------------------
  |  | 1814|  1.41k|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  ------------------
  |  |  |  | 1812|  1.41k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
33534|  1.41k|}
janet_lib_string:
34106|  6.64k|void janet_lib_string(JanetTable *env) {
34107|  6.64k|    JanetRegExt string_cfuns[] = {
34108|  6.64k|        JANET_CORE_REG("string/slice", cfun_string_slice),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34109|  6.64k|        JANET_CORE_REG("keyword/slice", cfun_keyword_slice),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34110|  6.64k|        JANET_CORE_REG("symbol/slice", cfun_symbol_slice),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34111|  6.64k|        JANET_CORE_REG("string/repeat", cfun_string_repeat),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34112|  6.64k|        JANET_CORE_REG("string/bytes", cfun_string_bytes),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34113|  6.64k|        JANET_CORE_REG("string/from-bytes", cfun_string_frombytes),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34114|  6.64k|        JANET_CORE_REG("string/ascii-lower", cfun_string_asciilower),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34115|  6.64k|        JANET_CORE_REG("string/ascii-upper", cfun_string_asciiupper),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34116|  6.64k|        JANET_CORE_REG("string/reverse", cfun_string_reverse),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34117|  6.64k|        JANET_CORE_REG("string/find", cfun_string_find),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34118|  6.64k|        JANET_CORE_REG("string/find-all", cfun_string_findall),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34119|  6.64k|        JANET_CORE_REG("string/has-prefix?", cfun_string_hasprefix),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34120|  6.64k|        JANET_CORE_REG("string/has-suffix?", cfun_string_hassuffix),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34121|  6.64k|        JANET_CORE_REG("string/replace", cfun_string_replace),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34122|  6.64k|        JANET_CORE_REG("string/replace-all", cfun_string_replaceall),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34123|  6.64k|        JANET_CORE_REG("string/split", cfun_string_split),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34124|  6.64k|        JANET_CORE_REG("string/check-set", cfun_string_checkset),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34125|  6.64k|        JANET_CORE_REG("string/join", cfun_string_join),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34126|  6.64k|        JANET_CORE_REG("string/format", cfun_string_format),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34127|  6.64k|        JANET_CORE_REG("string/trim", cfun_string_trim),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34128|  6.64k|        JANET_CORE_REG("string/triml", cfun_string_triml),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34129|  6.64k|        JANET_CORE_REG("string/trimr", cfun_string_trimr),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34130|  6.64k|        JANET_REG_END
  ------------------
  |  | 2110|  6.64k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
34131|  6.64k|    };
34132|       |    janet_core_cfuns_ext(env, NULL, string_cfuns);
34133|  6.64k|}
janet_scan_number_base:
34394|  15.2k|    double *out) {
34395|  15.2k|    const uint8_t *end = str + len;
34396|  15.2k|    int seenadigit = 0;
34397|  15.2k|    int ex = 0;
34398|  15.2k|    int seenpoint = 0;
34399|  15.2k|    int foundexp = 0;
34400|  15.2k|    int neg = 0;
34401|  15.2k|    struct BigNat mant;
34402|  15.2k|    bignat_zero(&mant);
34403|       |
34404|       |    /* Prevent some kinds of overflow bugs relating to the exponent
34405|       |     * overflowing.  For example, if a string was passed 2GB worth of 0s after
34406|       |     * the decimal point, exponent could wrap around and become positive. It's
34407|       |     * easier to reject ridiculously large inputs than to check for overflows.
34408|       |     * */
34409|  15.2k|    if (len > JANET_NUMBER_LENGTH_RIDICULOUS) goto error;
  ------------------
  |  |34190|  15.2k|#define JANET_NUMBER_LENGTH_RIDICULOUS 0xFFFF
  ------------------
  |  Branch (34409:9): [True: 0, False: 15.2k]
  ------------------
34410|       |
34411|       |    /* Get sign */
34412|  15.2k|    if (str >= end) goto error;
  ------------------
  |  Branch (34412:9): [True: 0, False: 15.2k]
  ------------------
34413|  15.2k|    if (*str == '-') {
  ------------------
  |  Branch (34413:9): [True: 2.16k, False: 13.1k]
  ------------------
34414|  2.16k|        neg = 1;
34415|  2.16k|        str++;
34416|  13.1k|    } else if (*str == '+') {
  ------------------
  |  Branch (34416:16): [True: 1.28k, False: 11.8k]
  ------------------
34417|  1.28k|        str++;
34418|  1.28k|    }
34419|       |
34420|       |    /* Check for leading 0x or digit digit r */
34421|  15.2k|    if (base == 0) {
  ------------------
  |  Branch (34421:9): [True: 15.2k, False: 0]
  ------------------
34422|  15.2k|        if (str + 1 < end && str[0] == '0' && str[1] == 'x') {
  ------------------
  |  Branch (34422:13): [True: 7.41k, False: 7.88k]
  |  Branch (34422:30): [True: 1.31k, False: 6.09k]
  |  Branch (34422:47): [True: 168, False: 1.14k]
  ------------------
34423|    168|            base = 16;
34424|    168|            str += 2;
34425|  15.1k|        } else if (str + 1 < end  &&
  ------------------
  |  Branch (34425:20): [True: 7.24k, False: 7.88k]
  ------------------
34426|  7.24k|                   str[0] >= '0' && str[0] <= '9' &&
  ------------------
  |  Branch (34426:20): [True: 5.70k, False: 1.54k]
  |  Branch (34426:37): [True: 5.43k, False: 265]
  ------------------
34427|  5.43k|                   str[1] == 'r') {
  ------------------
  |  Branch (34427:20): [True: 83, False: 5.35k]
  ------------------
34428|     83|            base = str[0] - '0';
34429|     83|            str += 2;
34430|  15.0k|        } else if (str + 2 < end  &&
  ------------------
  |  Branch (34430:20): [True: 4.96k, False: 10.0k]
  ------------------
34431|  4.96k|                   str[0] >= '0' && str[0] <= '9' &&
  ------------------
  |  Branch (34431:20): [True: 4.09k, False: 872]
  |  Branch (34431:37): [True: 3.88k, False: 210]
  ------------------
34432|  3.88k|                   str[1] >= '0' && str[1] <= '9' &&
  ------------------
  |  Branch (34432:20): [True: 2.75k, False: 1.12k]
  |  Branch (34432:37): [True: 1.94k, False: 813]
  ------------------
34433|  1.94k|                   str[2] == 'r') {
  ------------------
  |  Branch (34433:20): [True: 207, False: 1.73k]
  ------------------
34434|    207|            base = 10 * (str[0] - '0') + (str[1] - '0');
34435|    207|            if (base < 2 || base > 36) goto error;
  ------------------
  |  Branch (34435:17): [True: 19, False: 188]
  |  Branch (34435:29): [True: 48, False: 140]
  ------------------
34436|    140|            str += 3;
34437|    140|        }
34438|  15.2k|    }
34439|       |
34440|       |    /* If still base is 0, set to default (10) */
34441|  15.2k|    if (base == 0) {
  ------------------
  |  Branch (34441:9): [True: 14.8k, False: 383]
  ------------------
34442|  14.8k|        base = 10;
34443|  14.8k|    }
34444|  15.2k|    int exp_base = base;
34445|       |
34446|       |    /* Skip leading zeros */
34447|  21.7k|    while (str < end && (*str == '0' || *str == '.')) {
  ------------------
  |  Branch (34447:12): [True: 17.4k, False: 4.30k]
  |  Branch (34447:26): [True: 4.58k, False: 12.8k]
  |  Branch (34447:41): [True: 2.18k, False: 10.7k]
  ------------------
34448|  6.76k|        if (seenpoint) ex--;
  ------------------
  |  Branch (34448:13): [True: 590, False: 6.17k]
  ------------------
34449|  6.76k|        if (*str == '.') {
  ------------------
  |  Branch (34449:13): [True: 2.18k, False: 4.58k]
  ------------------
34450|  2.18k|            if (seenpoint) goto error;
  ------------------
  |  Branch (34450:17): [True: 220, False: 1.96k]
  ------------------
34451|  1.96k|            seenpoint = 1;
34452|  4.58k|        } else {
34453|  4.58k|            seenadigit = 1;
34454|  4.58k|        }
34455|  6.54k|        str++;
34456|  6.54k|    }
34457|       |
34458|       |    /* Parse significant digits */
34459|  37.6k|    while (str < end) {
  ------------------
  |  Branch (34459:12): [True: 26.2k, False: 11.3k]
  ------------------
34460|  26.2k|        if (*str == '.') {
  ------------------
  |  Branch (34460:13): [True: 408, False: 25.8k]
  ------------------
34461|    408|            if (seenpoint) goto error;
  ------------------
  |  Branch (34461:17): [True: 55, False: 353]
  ------------------
34462|    353|            seenpoint = 1;
34463|  25.8k|        } else if (*str == '&') {
  ------------------
  |  Branch (34463:20): [True: 1.25k, False: 24.5k]
  ------------------
34464|  1.25k|            foundexp = 1;
34465|  1.25k|            break;
34466|  24.5k|        } else if (base == 16 && (*str == 'P' || *str == 'p')) { /* IEEE hex float */
  ------------------
  |  Branch (34466:20): [True: 1.30k, False: 23.2k]
  |  Branch (34466:35): [True: 18, False: 1.28k]
  |  Branch (34466:50): [True: 73, False: 1.21k]
  ------------------
34467|     91|            foundexp = 1;
34468|     91|            exp_base = 10;
34469|     91|            base = 2;
34470|     91|            ex *= 4; /* We need to correct the current exponent after we change the base */
34471|     91|            break;
34472|  24.4k|        } else if (base == 10 && (*str == 'E' || *str == 'e')) {
  ------------------
  |  Branch (34472:20): [True: 21.7k, False: 2.72k]
  |  Branch (34472:35): [True: 647, False: 21.0k]
  |  Branch (34472:50): [True: 373, False: 20.7k]
  ------------------
34473|  1.02k|            foundexp = 1;
34474|  1.02k|            break;
34475|  23.4k|        } else if (*str == '_') {
  ------------------
  |  Branch (34475:20): [True: 1.05k, False: 22.3k]
  ------------------
34476|  1.05k|            if (!seenadigit) goto error;
  ------------------
  |  Branch (34476:17): [True: 144, False: 909]
  ------------------
34477|  22.3k|        } else {
34478|  22.3k|            int digit = digit_lookup[*str & 0x7F];
34479|  22.3k|            if (*str > 127 || digit >= base) goto error;
  ------------------
  |  Branch (34479:17): [True: 188, False: 22.2k]
  |  Branch (34479:31): [True: 857, False: 21.3k]
  ------------------
34480|  21.3k|            if (seenpoint) ex--;
  ------------------
  |  Branch (34480:17): [True: 3.45k, False: 17.8k]
  ------------------
34481|  21.3k|            bignat_muladd(&mant, base, digit);
34482|  21.3k|            seenadigit = 1;
34483|  21.3k|        }
34484|  22.6k|        str++;
34485|  22.6k|    }
34486|       |
34487|  13.7k|    if (!seenadigit)
  ------------------
  |  Branch (34487:9): [True: 1.96k, False: 11.8k]
  ------------------
34488|  1.96k|        goto error;
34489|       |
34490|       |    /* Read exponent */
34491|  11.8k|    if (str < end && foundexp) {
  ------------------
  |  Branch (34491:9): [True: 2.20k, False: 9.59k]
  |  Branch (34491:22): [True: 2.20k, False: 0]
  ------------------
34492|  2.20k|        int eneg = 0;
34493|  2.20k|        int32_t ee = 0;
34494|  2.20k|        seenadigit = 0;
34495|  2.20k|        str++;
34496|  2.20k|        if (str >= end) goto error;
  ------------------
  |  Branch (34496:13): [True: 53, False: 2.15k]
  ------------------
34497|  2.15k|        if (*str == '-') {
  ------------------
  |  Branch (34497:13): [True: 359, False: 1.79k]
  ------------------
34498|    359|            eneg = 1;
34499|    359|            str++;
34500|  1.79k|        } else if (*str == '+') {
  ------------------
  |  Branch (34500:20): [True: 90, False: 1.70k]
  ------------------
34501|     90|            str++;
34502|     90|        }
34503|       |        /* Skip leading 0s in exponent */
34504|  2.60k|        while (str < end && *str == '0') {
  ------------------
  |  Branch (34504:16): [True: 2.46k, False: 134]
  |  Branch (34504:29): [True: 447, False: 2.02k]
  ------------------
34505|    447|            str++;
34506|    447|            seenadigit = 1;
34507|    447|        }
34508|  7.24k|        while (str < end) {
  ------------------
  |  Branch (34508:16): [True: 5.19k, False: 2.05k]
  ------------------
34509|  5.19k|            int digit = digit_lookup[*str & 0x7F];
34510|  5.19k|            if (*str > 127 || digit >= exp_base) goto error;
  ------------------
  |  Branch (34510:17): [True: 34, False: 5.15k]
  |  Branch (34510:31): [True: 62, False: 5.09k]
  ------------------
34511|  5.09k|            if (ee < (INT32_MAX / 40)) {
  ------------------
  |  Branch (34511:17): [True: 4.55k, False: 535]
  ------------------
34512|  4.55k|                ee = exp_base * ee + digit;
34513|  4.55k|            }
34514|  5.09k|            str++;
34515|  5.09k|            seenadigit = 1;
34516|  5.09k|        }
34517|  2.05k|        if (eneg) ex -= ee;
  ------------------
  |  Branch (34517:13): [True: 356, False: 1.70k]
  ------------------
34518|  1.70k|        else ex += ee;
34519|  2.05k|    }
34520|       |
34521|  11.6k|    if (!seenadigit)
  ------------------
  |  Branch (34521:9): [True: 43, False: 11.6k]
  ------------------
34522|     43|        goto error;
34523|       |
34524|  11.6k|    *out = convert(neg, &mant, base, ex);
34525|  11.6k|    janet_free(mant.digits);
  ------------------
  |  | 2415|  11.6k|#define janet_free(X) free((X))
  ------------------
34526|  11.6k|    return 0;
34527|       |
34528|  3.68k|error:
34529|  3.68k|    janet_free(mant.digits);
  ------------------
  |  | 2415|  3.68k|#define janet_free(X) free((X))
  ------------------
34530|  3.68k|    return 1;
34531|  11.6k|}
janet_scan_int64:
34604|  1.60k|int janet_scan_int64(const uint8_t *str, int32_t len, int64_t *out) {
34605|  1.60k|    int neg;
34606|  1.60k|    uint64_t bi;
34607|  1.60k|    if (scan_uint64(str, len, &bi, &neg)) {
  ------------------
  |  Branch (34607:9): [True: 1.11k, False: 489]
  ------------------
34608|  1.11k|        if (neg && bi <= ((UINT64_MAX / 2) + 1)) {
  ------------------
  |  Branch (34608:13): [True: 316, False: 796]
  |  Branch (34608:20): [True: 301, False: 15]
  ------------------
34609|    301|            if (bi > INT64_MAX) {
  ------------------
  |  Branch (34609:17): [True: 13, False: 288]
  ------------------
34610|     13|                *out = INT64_MIN;
34611|    288|            } else {
34612|    288|                *out = -((int64_t) bi);
34613|    288|            }
34614|    301|            return 1;
34615|    301|        }
34616|    811|        if (!neg && bi <= INT64_MAX) {
  ------------------
  |  Branch (34616:13): [True: 796, False: 15]
  |  Branch (34616:21): [True: 732, False: 64]
  ------------------
34617|    732|            *out = (int64_t) bi;
34618|    732|            return 1;
34619|    732|        }
34620|    811|    }
34621|    568|    return 0;
34622|  1.60k|}
janet_scan_uint64:
34624|    867|int janet_scan_uint64(const uint8_t *str, int32_t len, uint64_t *out) {
34625|    867|    int neg;
34626|    867|    uint64_t bi;
34627|    867|    if (scan_uint64(str, len, &bi, &neg)) {
  ------------------
  |  Branch (34627:9): [True: 629, False: 238]
  ------------------
34628|    629|        if (!neg) {
  ------------------
  |  Branch (34628:13): [True: 582, False: 47]
  ------------------
34629|    582|            *out = bi;
34630|    582|            return 1;
34631|    582|        }
34632|    629|    }
34633|    285|    return 0;
34634|    867|}
janet_scan_numeric:
34641|  17.8k|    Janet *out) {
34642|  17.8k|    int result;
34643|  17.8k|    double num;
34644|  17.8k|    int64_t i64 = 0;
34645|  17.8k|    uint64_t u64 = 0;
34646|  17.8k|    if (len < 2 || str[len - 2] != ':') {
  ------------------
  |  Branch (34646:9): [True: 7.29k, False: 10.5k]
  |  Branch (34646:20): [True: 7.97k, False: 2.56k]
  ------------------
34647|  15.2k|        result = janet_scan_number_base(str, len, 0, &num);
34648|  15.2k|        *out = janet_wrap_number(num);
  ------------------
  |  |  835|  15.2k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
34649|  15.2k|        return result;
34650|  15.2k|    }
34651|  2.56k|    switch (str[len - 1]) {
34652|     60|        default:
  ------------------
  |  Branch (34652:9): [True: 60, False: 2.50k]
  ------------------
34653|     60|            return 1;
34654|     34|        case 'n':
  ------------------
  |  Branch (34654:9): [True: 34, False: 2.52k]
  ------------------
34655|     34|            result = janet_scan_number_base(str, len - 2, 0, &num);
34656|     34|            *out = janet_wrap_number(num);
  ------------------
  |  |  835|     34|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
34657|     34|            return result;
34658|       |        /* Condition is inverted janet_scan_int64 and janet_scan_uint64 */
34659|  1.60k|        case 's':
  ------------------
  |  Branch (34659:9): [True: 1.60k, False: 961]
  ------------------
34660|  1.60k|            result = !janet_scan_int64(str, len - 2, &i64);
34661|  1.60k|            *out = janet_wrap_s64(i64);
34662|  1.60k|            return result;
34663|    867|        case 'u':
  ------------------
  |  Branch (34663:9): [True: 867, False: 1.69k]
  ------------------
34664|    867|            result = !janet_scan_uint64(str, len - 2, &u64);
34665|    867|            *out = janet_wrap_u64(u64);
34666|    867|            return result;
34667|  2.56k|    }
34668|  2.56k|}
janet_struct_begin:
34722|  50.5k|JanetKV *janet_struct_begin(int32_t count) {
34723|       |    /* Calculate capacity as power of 2 after 2 * count. */
34724|  50.5k|    int32_t capacity = janet_tablen(2 * count);
34725|  50.5k|    if (capacity < 0) capacity = janet_tablen(count + 1);
  ------------------
  |  Branch (34725:9): [True: 0, False: 50.5k]
  ------------------
34726|       |
34727|  50.5k|    size_t size = sizeof(JanetStructHead) + (size_t) capacity * sizeof(JanetKV);
34728|  50.5k|    JanetStructHead *head = janet_gcalloc(JANET_MEMORY_STRUCT, size);
34729|  50.5k|    head->length = count;
34730|  50.5k|    head->capacity = capacity;
34731|  50.5k|    head->hash = 0;
34732|  50.5k|    head->proto = NULL;
34733|       |
34734|  50.5k|    JanetKV *st = (JanetKV *)(head->data);
34735|  50.5k|    janet_memempty(st, capacity);
34736|  50.5k|    return st;
34737|  50.5k|}
janet_struct_find:
34740|      1|const JanetKV *janet_struct_find(const JanetKV *st, Janet key) {
34741|       |    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)))
  |  |  ------------------
  ------------------
34742|      1|}
janet_struct_put_ext:
34752|   318k|void janet_struct_put_ext(JanetKV *st, Janet key, Janet value, int replace) {
34753|   318k|    int32_t cap = janet_struct_capacity(st);
  ------------------
  |  | 1849|   318k|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1846|   318k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
34754|   318k|    int32_t hash = janet_hash(key);
34755|   318k|    int32_t index = janet_maphash(cap, hash);
  ------------------
  |  |  396|   318k|#define janet_maphash(cap, hash) ((uint32_t)(hash) & (cap - 1))
  ------------------
34756|   318k|    int32_t i, j, dist;
34757|   318k|    int32_t bounds[4] = {index, cap, 0, index};
34758|   318k|    if (janet_checktype(key, JANET_NIL) || janet_checktype(value, JANET_NIL)) return;
  ------------------
  |  |  806|   637k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 110, False: 318k]
  |  |  |  Branch (806:6): [Folded, False: 318k]
  |  |  ------------------
  |  |  807|   637k|        ? 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|   637k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   318k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   318k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   318k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   318k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  if (janet_checktype(key, JANET_NIL) || janet_checktype(value, JANET_NIL)) return;
  ------------------
  |  |  806|   318k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 71, False: 318k]
  |  |  |  Branch (806:6): [Folded, False: 318k]
  |  |  ------------------
  |  |  807|   318k|        ? 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|   318k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   318k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   318k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   318k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   318k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34759|   318k|    if (janet_checktype(key, JANET_NUMBER) && isnan(janet_unwrap_number(key))) return;
  ------------------
  |  |  806|   637k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 962, False: 317k]
  |  |  |  Branch (806:6): [True: 318k, Folded]
  |  |  ------------------
  |  |  807|   637k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|   318k|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 962, False: 317k]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 317k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   637k|        : 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 (34759:47): [True: 0, False: 962]
  ------------------
34760|       |    /* Avoid extra items */
34761|   318k|    if (janet_struct_hash(st) == janet_struct_length(st)) return;
  ------------------
  |  | 1850|   318k|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1846|   318k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                  if (janet_struct_hash(st) == janet_struct_length(st)) return;
  ------------------
  |  | 1848|   318k|#define janet_struct_length(t) (janet_struct_head(t)->length)
  |  |  ------------------
  |  |  |  | 1846|   318k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (34761:9): [True: 0, False: 318k]
  ------------------
34762|   318k|    for (dist = 0, j = 0; j < 4; j += 2)
  ------------------
  |  Branch (34762:27): [True: 318k, False: 0]
  ------------------
34763|   456k|        for (i = bounds[j]; i < bounds[j + 1]; i++, dist++) {
  ------------------
  |  Branch (34763:29): [True: 456k, False: 90]
  ------------------
34764|   456k|            int status;
34765|   456k|            int32_t otherhash;
34766|   456k|            int32_t otherindex, otherdist;
34767|   456k|            JanetKV *kv = st + i;
34768|       |            /* We found an empty slot, so just add key and value */
34769|   456k|            if (janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|   456k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 317k, False: 138k]
  |  |  |  Branch (806:6): [Folded, False: 456k]
  |  |  ------------------
  |  |  807|   456k|        ? 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|   456k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   456k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   456k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   456k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   456k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34770|   317k|                kv->key = key;
34771|   317k|                kv->value = value;
34772|       |                /* Update the temporary count */
34773|   317k|                janet_struct_hash(st)++;
  ------------------
  |  | 1850|   317k|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1846|   317k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
34774|   317k|                return;
34775|   317k|            }
34776|       |            /* Robinhood hashing - check if colliding kv pair
34777|       |             * is closer to their source than current. We use robinhood
34778|       |             * hashing to ensure that equivalent structs that are constructed
34779|       |             * with different order have the same internal layout, and therefor
34780|       |             * will compare properly - i.e., {1 2 3 4} should equal {3 4 1 2}.
34781|       |             * Collisions are resolved via an insertion sort insertion. */
34782|   138k|            otherhash = janet_hash(kv->key);
34783|   138k|            otherindex = janet_maphash(cap, otherhash);
  ------------------
  |  |  396|   138k|#define janet_maphash(cap, hash) ((uint32_t)(hash) & (cap - 1))
  ------------------
34784|   138k|            otherdist = (i + cap - otherindex) & (cap - 1);
34785|   138k|            if (dist < otherdist)
  ------------------
  |  Branch (34785:17): [True: 68.2k, False: 70.3k]
  ------------------
34786|  68.2k|                status = -1;
34787|  70.3k|            else if (otherdist < dist)
  ------------------
  |  Branch (34787:22): [True: 805, False: 69.5k]
  ------------------
34788|    805|                status = 1;
34789|  69.5k|            else if (hash < otherhash)
  ------------------
  |  Branch (34789:22): [True: 67.5k, False: 2.02k]
  ------------------
34790|  67.5k|                status = -1;
34791|  2.02k|            else if (otherhash < hash)
  ------------------
  |  Branch (34791:22): [True: 819, False: 1.20k]
  ------------------
34792|    819|                status = 1;
34793|  1.20k|            else
34794|  1.20k|                status = janet_compare(key, kv->key);
34795|       |            /* If other is closer to their ideal slot */
34796|   138k|            if (status == 1) {
  ------------------
  |  Branch (34796:17): [True: 1.75k, False: 136k]
  ------------------
34797|       |                /* Swap current kv pair with pair in slot */
34798|  1.75k|                JanetKV temp = *kv;
34799|  1.75k|                kv->key = key;
34800|  1.75k|                kv->value = value;
34801|  1.75k|                key = temp.key;
34802|  1.75k|                value = temp.value;
34803|       |                /* Save dist and hash of new kv pair */
34804|  1.75k|                dist = otherdist;
34805|  1.75k|                hash = otherhash;
34806|   136k|            } else if (status == 0) {
  ------------------
  |  Branch (34806:24): [True: 877, False: 135k]
  ------------------
34807|    877|                if (replace) {
  ------------------
  |  Branch (34807:21): [True: 877, False: 0]
  ------------------
34808|       |                    /* A key was added to the struct more than once - replace old value */
34809|    877|                    kv->value = value;
34810|    877|                }
34811|    877|                return;
34812|    877|            }
34813|   138k|        }
34814|   318k|}
janet_struct_put:
34816|   318k|void janet_struct_put(JanetKV *st, Janet key, Janet value) {
34817|   318k|    janet_struct_put_ext(st, key, value, 1);
34818|   318k|}
janet_struct_end:
34821|  50.2k|const JanetKV *janet_struct_end(JanetKV *st) {
34822|  50.2k|    if (janet_struct_hash(st) != janet_struct_length(st)) {
  ------------------
  |  | 1850|  50.2k|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1846|  50.2k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                  if (janet_struct_hash(st) != janet_struct_length(st)) {
  ------------------
  |  | 1848|  50.2k|#define janet_struct_length(t) (janet_struct_head(t)->length)
  |  |  ------------------
  |  |  |  | 1846|  50.2k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (34822:9): [True: 285, False: 49.9k]
  ------------------
34823|       |        /* Error building struct, probably duplicate values. We need to rebuild
34824|       |         * the struct using only the values that went in. The second creation should always
34825|       |         * succeed. */
34826|    285|        JanetKV *newst = janet_struct_begin(janet_struct_hash(st));
  ------------------
  |  | 1850|    285|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1846|    285|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
34827|  7.84k|        for (int32_t i = 0; i < janet_struct_capacity(st); i++) {
  ------------------
  |  | 1849|  7.84k|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1846|  7.84k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (34827:29): [True: 7.56k, False: 285]
  ------------------
34828|  7.56k|            JanetKV *kv = st + i;
34829|  7.56k|            if (!janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|  7.56k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 7.56k]
  |  |  ------------------
  |  |  807|  7.56k|        ? 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|  7.56k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  7.56k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  7.56k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  7.56k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  7.56k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (34829:17): [True: 1.37k, False: 6.18k]
  ------------------
34830|  1.37k|                janet_struct_put(newst, kv->key, kv->value);
34831|  1.37k|            }
34832|  7.56k|        }
34833|    285|        janet_struct_proto(newst) = janet_struct_proto(st);
  ------------------
  |  | 1851|    285|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1846|    285|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                      janet_struct_proto(newst) = janet_struct_proto(st);
  ------------------
  |  | 1851|    285|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1846|    285|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
34834|    285|        st = newst;
34835|    285|    }
34836|  50.2k|    janet_struct_hash(st) = janet_kv_calchash(st, janet_struct_capacity(st));
  ------------------
  |  | 1850|  50.2k|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1846|  50.2k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                  janet_struct_hash(st) = janet_kv_calchash(st, janet_struct_capacity(st));
  ------------------
  |  | 1849|  50.2k|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1846|  50.2k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
34837|  50.2k|    if (janet_struct_proto(st)) {
  ------------------
  |  | 1851|  50.2k|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1846|  50.2k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  |  |  |  Branch (1851:31): [True: 0, False: 50.2k]
  |  |  ------------------
  ------------------
34838|      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)))
  |  |  ------------------
  ------------------
34839|      0|    }
34840|  50.2k|    return (const JanetKV *)st;
34841|  50.2k|}
janet_struct_get:
34850|      1|Janet janet_struct_get(const JanetKV *st, Janet key) {
34851|      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 (34851:41): [True: 1, False: 1]
  |  Branch (34851:47): [True: 1, False: 0]
  ------------------
34852|      1|        const JanetKV *kv = janet_struct_find(st, key);
34853|      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 (34853:13): [True: 1, False: 0]
  |  Branch (34853:27): [True: 0, False: 1]
  ------------------
34854|      0|            return kv->value;
34855|      0|        }
34856|      1|    }
34857|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34858|      1|}
janet_lib_struct:
34988|  6.64k|void janet_lib_struct(JanetTable *env) {
34989|  6.64k|    JanetRegExt struct_cfuns[] = {
34990|  6.64k|        JANET_CORE_REG("struct/with-proto", cfun_struct_with_proto),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34991|  6.64k|        JANET_CORE_REG("struct/getproto", cfun_struct_getproto),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34992|  6.64k|        JANET_CORE_REG("struct/proto-flatten", cfun_struct_flatten),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34993|  6.64k|        JANET_CORE_REG("struct/to-table", cfun_struct_to_table),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34994|  6.64k|        JANET_CORE_REG("struct/rawget", cfun_struct_rawget),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34995|  6.64k|        JANET_REG_END
  ------------------
  |  | 2110|  6.64k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
34996|  6.64k|    };
34997|       |    janet_core_cfuns_ext(env, NULL, struct_cfuns);
34998|  6.64k|}
janet_symcache_init:
35043|  6.64k|void janet_symcache_init() {
35044|  6.64k|    janet_vm.cache_capacity = 1024;
35045|  6.64k|    janet_vm.cache = janet_calloc(1, (size_t) janet_vm.cache_capacity * sizeof(const uint8_t *));
  ------------------
  |  | 2412|  6.64k|#define janet_calloc(X, Y) calloc((X), (Y))
  ------------------
35046|  6.64k|    if (NULL == janet_vm.cache) {
  ------------------
  |  Branch (35046:9): [True: 0, False: 6.64k]
  ------------------
35047|      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]
  |  |  ------------------
  ------------------
35048|      0|    }
35049|  6.64k|    memset(&janet_vm.gensym_counter, '0', sizeof(janet_vm.gensym_counter));
35050|  6.64k|    janet_vm.gensym_counter[0] = '_';
35051|  6.64k|    janet_vm.cache_count = 0;
35052|  6.64k|    janet_vm.cache_deleted = 0;
35053|  6.64k|}
janet_symcache_deinit:
35056|  6.64k|void janet_symcache_deinit() {
35057|  6.64k|    janet_free((void *)janet_vm.cache);
  ------------------
  |  | 2415|  6.64k|#define janet_free(X) free((X))
  ------------------
35058|       |    janet_vm.cache = NULL;
35059|  6.64k|    janet_vm.cache_capacity = 0;
35060|  6.64k|    janet_vm.cache_count = 0;
35061|  6.64k|    janet_vm.cache_deleted = 0;
35062|  6.64k|}
janet_symbol_deinit:
35164|  13.2M|void janet_symbol_deinit(const uint8_t *sym) {
35165|  13.2M|    int status = 0;
35166|  13.2M|    const uint8_t **bucket = janet_symcache_find(sym, &status);
  ------------------
  |  |35119|  13.2M|    janet_symcache_findmem((str), janet_string_length(str), janet_string_hash(str), (success))
  |  |  ------------------
  |  |  |  | 1813|  13.2M|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1812|  13.2M|#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|  13.2M|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1812|  13.2M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35167|  13.2M|    if (status) {
  ------------------
  |  Branch (35167:9): [True: 13.2M, False: 0]
  ------------------
35168|  13.2M|        janet_vm.cache_count--;
35169|  13.2M|        janet_vm.cache_deleted++;
35170|  13.2M|        *bucket = JANET_SYMCACHE_DELETED;
35171|  13.2M|    }
35172|  13.2M|}
janet_symbol:
35175|  18.8M|const uint8_t *janet_symbol(const uint8_t *str, int32_t len) {
35176|  18.8M|    int32_t hash = janet_string_calchash(str, len);
35177|  18.8M|    uint8_t *newstr;
35178|  18.8M|    int success = 0;
35179|  18.8M|    const uint8_t **bucket = janet_symcache_findmem(str, len, hash, &success);
35180|  18.8M|    if (success)
  ------------------
  |  Branch (35180:9): [True: 5.55M, False: 13.2M]
  ------------------
35181|  5.55M|        return *bucket;
35182|  13.2M|    JanetStringHead *head = janet_gcalloc(JANET_MEMORY_SYMBOL, sizeof(JanetStringHead) + (size_t) len + 1);
35183|  13.2M|    head->hash = hash;
35184|  13.2M|    head->length = len;
35185|  13.2M|    newstr = (uint8_t *)(head->data);
35186|  13.2M|    safe_memcpy(newstr, str, len);
35187|  13.2M|    newstr[len] = 0;
35188|  13.2M|    janet_symcache_put((const uint8_t *)newstr, bucket);
35189|  13.2M|    return newstr;
35190|  18.8M|}
janet_csymbol:
35193|  2.47M|const uint8_t *janet_csymbol(const char *cstr) {
35194|  2.47M|    return janet_symbol((const uint8_t *)cstr, (int32_t) strlen(cstr));
35195|  2.47M|}
janet_table_init:
35319|  10.1M|JanetTable *janet_table_init(JanetTable *table, int32_t capacity) {
35320|  10.1M|    return janet_table_init_impl(table, capacity, 1);
35321|  10.1M|}
janet_table_init_raw:
35324|  19.9k|JanetTable *janet_table_init_raw(JanetTable *table, int32_t capacity) {
35325|  19.9k|    return janet_table_init_impl(table, capacity, 0);
35326|  19.9k|}
janet_table_deinit:
35329|  10.2M|void janet_table_deinit(JanetTable *table) {
35330|  10.2M|    if (table->gc.flags & JANET_TABLE_FLAG_STACK) {
  ------------------
  |  |35279|  10.2M|#define JANET_TABLE_FLAG_STACK 0x10000
  ------------------
  |  Branch (35330:9): [True: 10.1M, False: 19.9k]
  ------------------
35331|  10.1M|        janet_sfree(table->data);
35332|  10.1M|    } else {
35333|  19.9k|        janet_free(table->data);
  ------------------
  |  | 2415|  19.9k|#define janet_free(X) free((X))
  ------------------
35334|  19.9k|    }
35335|  10.2M|}
janet_table:
35339|  4.88M|JanetTable *janet_table(int32_t capacity) {
35340|  4.88M|    JanetTable *table = janet_gcalloc(JANET_MEMORY_TABLE, sizeof(JanetTable));
35341|  4.88M|    return janet_table_init_impl(table, capacity, 0);
35342|  4.88M|}
janet_table_find:
35361|   142M|JanetKV *janet_table_find(JanetTable *t, Janet key) {
35362|   142M|    return (JanetKV *) janet_dict_find(t->data, t->capacity, key);
35363|   142M|}
janet_table_get:
35397|  23.0M|Janet janet_table_get(JanetTable *t, Janet key) {
35398|  43.8M|    for (int i = JANET_MAX_PROTO_DEPTH; t && i; t = t->proto, --i) {
  ------------------
  |  |  299|  23.0M|#define JANET_MAX_PROTO_DEPTH 200
  ------------------
  |  Branch (35398:41): [True: 23.0M, False: 20.7M]
  |  Branch (35398:46): [True: 23.0M, False: 0]
  ------------------
35399|  23.0M|        JanetKV *bucket = janet_table_find(t, key);
35400|  23.0M|        if (NULL != bucket && !janet_checktype(bucket->key, JANET_NIL))
  ------------------
  |  |  806|  23.0M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 23.0M]
  |  |  ------------------
  |  |  807|  23.0M|        ? 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|  23.0M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  23.0M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  23.0M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  23.0M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  23.0M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35400:13): [True: 23.0M, False: 0]
  |  Branch (35400:31): [True: 2.37M, False: 20.7M]
  ------------------
35401|  2.37M|            return bucket->value;
35402|  23.0M|    }
35403|  20.7M|    return janet_wrap_nil();
  ------------------
  |  |  831|  20.7M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  20.7M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  20.7M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  20.7M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35404|  23.0M|}
janet_table_get_keyword:
35407|  79.7k|Janet janet_table_get_keyword(JanetTable *t, const char *keyword) {
35408|  79.7k|    int32_t keyword_len = (int32_t) strlen(keyword);
35409|   139k|    for (int i = JANET_MAX_PROTO_DEPTH; t && i; t = t->proto, --i) {
  ------------------
  |  |  299|  79.7k|#define JANET_MAX_PROTO_DEPTH 200
  ------------------
  |  Branch (35409:41): [True: 79.7k, False: 59.7k]
  |  Branch (35409:46): [True: 79.7k, False: 0]
  ------------------
35410|  79.7k|        JanetKV *bucket = (JanetKV *) janet_dict_find_keyword(t->data, t->capacity, (const uint8_t *) keyword, keyword_len);
35411|  79.7k|        if (NULL != bucket && !janet_checktype(bucket->key, JANET_NIL))
  ------------------
  |  |  806|  79.7k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 79.7k]
  |  |  ------------------
  |  |  807|  79.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|  79.7k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  79.7k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  79.7k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  79.7k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  79.7k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35411:13): [True: 79.7k, False: 0]
  |  Branch (35411:31): [True: 19.9k, False: 59.7k]
  ------------------
35412|  19.9k|            return bucket->value;
35413|  79.7k|    }
35414|  59.7k|    return janet_wrap_nil();
  ------------------
  |  |  831|  59.7k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  59.7k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  59.7k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  59.7k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35415|  79.7k|}
janet_table_get_ex:
35418|     36|Janet janet_table_get_ex(JanetTable *t, Janet key, JanetTable **which) {
35419|     72|    for (int i = JANET_MAX_PROTO_DEPTH; t && i; t = t->proto, --i) {
  ------------------
  |  |  299|     36|#define JANET_MAX_PROTO_DEPTH 200
  ------------------
  |  Branch (35419:41): [True: 36, False: 36]
  |  Branch (35419:46): [True: 36, False: 0]
  ------------------
35420|     36|        JanetKV *bucket = janet_table_find(t, key);
35421|     36|        if (NULL != bucket && !janet_checktype(bucket->key, JANET_NIL)) {
  ------------------
  |  |  806|     36|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 36]
  |  |  ------------------
  |  |  807|     36|        ? 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|     36|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|     36|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|     36|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     36|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     36|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35421:13): [True: 36, False: 0]
  |  Branch (35421:31): [True: 0, False: 36]
  ------------------
35422|      0|            *which = t;
35423|      0|            return bucket->value;
35424|      0|        }
35425|     36|    }
35426|     36|    return janet_wrap_nil();
  ------------------
  |  |  831|     36|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|     36|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     36|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     36|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35427|     36|}
janet_table_rawget:
35430|  18.8k|Janet janet_table_rawget(JanetTable *t, Janet key) {
35431|  18.8k|    JanetKV *bucket = janet_table_find(t, key);
35432|  18.8k|    if (NULL != bucket && !janet_checktype(bucket->key, JANET_NIL))
  ------------------
  |  |  806|  18.8k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 18.8k]
  |  |  ------------------
  |  |  807|  18.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|  18.8k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  18.8k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  18.8k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  18.8k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  18.8k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35432:9): [True: 18.8k, False: 0]
  |  Branch (35432:27): [True: 145, False: 18.7k]
  ------------------
35433|    145|        return bucket->value;
35434|  18.7k|    else
35435|  18.7k|        return janet_wrap_nil();
  ------------------
  |  |  831|  18.7k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  18.7k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  18.7k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  18.7k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35436|  18.8k|}
janet_table_remove:
35440|  38.5M|Janet janet_table_remove(JanetTable *t, Janet key) {
35441|  38.5M|    JanetKV *bucket = janet_table_find(t, key);
35442|  38.5M|    if (NULL != bucket && !janet_checktype(bucket->key, JANET_NIL)) {
  ------------------
  |  |  806|  38.5M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 38.5M]
  |  |  ------------------
  |  |  807|  38.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|  38.5M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  38.5M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  38.5M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  38.5M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  38.5M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35442:9): [True: 38.5M, False: 0]
  |  Branch (35442:27): [True: 20.6M, False: 17.9M]
  ------------------
35443|  20.6M|        Janet ret = bucket->value;
35444|  20.6M|        t->count--;
35445|  20.6M|        t->deleted++;
35446|  20.6M|        bucket->key = janet_wrap_nil();
  ------------------
  |  |  831|  20.6M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  20.6M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  20.6M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  20.6M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35447|  20.6M|        bucket->value = janet_wrap_false();
  ------------------
  |  |  833|  20.6M|#define janet_wrap_false() janet_nanbox_from_payload(JANET_BOOLEAN, 0)
  |  |  ------------------
  |  |  |  |  822|  20.6M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  20.6M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  20.6M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35448|  20.6M|        return ret;
35449|  20.6M|    } else {
35450|  17.9M|        return janet_wrap_nil();
  ------------------
  |  |  831|  17.9M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  17.9M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  17.9M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  17.9M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35451|  17.9M|    }
35452|  38.5M|}
janet_table_put:
35455|  51.9M|void janet_table_put(JanetTable *t, Janet key, Janet value) {
35456|  51.9M|    if (janet_checktype(key, JANET_NIL)) return;
  ------------------
  |  |  806|  51.9M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 49, False: 51.9M]
  |  |  |  Branch (806:6): [Folded, False: 51.9M]
  |  |  ------------------
  |  |  807|  51.9M|        ? 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|  51.9M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  51.9M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  51.9M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  51.9M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  51.9M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35457|  51.9M|    if (janet_checktype(key, JANET_NUMBER) && isnan(janet_unwrap_number(key))) return;
  ------------------
  |  |  806|   103M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 2.90k, False: 51.9M]
  |  |  |  Branch (806:6): [True: 51.9M, Folded]
  |  |  ------------------
  |  |  807|   103M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|  51.9M|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 2.90k, False: 51.9M]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 51.9M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   103M|        : 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 (35457:47): [True: 0, False: 2.90k]
  ------------------
35458|  51.9M|    if (janet_checktype(value, JANET_NIL)) {
  ------------------
  |  |  806|  51.9M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 61, False: 51.9M]
  |  |  |  Branch (806:6): [Folded, False: 51.9M]
  |  |  ------------------
  |  |  807|  51.9M|        ? 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|  51.9M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  51.9M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  51.9M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  51.9M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  51.9M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35459|     61|        janet_table_remove(t, key);
35460|  51.9M|    } else {
35461|  51.9M|        JanetKV *bucket = janet_table_find(t, key);
35462|  51.9M|        if (NULL != bucket && !janet_checktype(bucket->key, JANET_NIL)) {
  ------------------
  |  |  806|  51.9M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 51.9M]
  |  |  ------------------
  |  |  807|  51.9M|        ? 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|  51.9M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  51.9M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  51.9M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  51.9M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  51.9M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35462:13): [True: 51.9M, False: 0]
  |  Branch (35462:31): [True: 355, False: 51.9M]
  ------------------
35463|    355|            bucket->value = value;
35464|  51.9M|        } else {
35465|  51.9M|            if (NULL == bucket || 2 * (t->count + t->deleted + 1) > t->capacity) {
  ------------------
  |  Branch (35465:17): [True: 0, False: 51.9M]
  |  Branch (35465:35): [True: 5.02M, False: 46.9M]
  ------------------
35466|  5.02M|                janet_table_rehash(t, janet_tablen(2 * t->count + 2));
35467|  5.02M|                bucket = janet_table_find(t, key);
35468|  5.02M|            }
35469|  51.9M|            if (janet_checktype(bucket->value, JANET_BOOLEAN))
  ------------------
  |  |  806|  51.9M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 51.9M]
  |  |  |  Branch (806:6): [Folded, False: 51.9M]
  |  |  ------------------
  |  |  807|  51.9M|        ? 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|  51.9M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  51.9M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  51.9M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  51.9M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  51.9M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35470|      0|                --t->deleted;
35471|  51.9M|            bucket->key = key;
35472|  51.9M|            bucket->value = value;
35473|  51.9M|            ++t->count;
35474|  51.9M|        }
35475|  51.9M|    }
35476|  51.9M|}
janet_table_clone:
35505|    136|JanetTable *janet_table_clone(JanetTable *table) {
35506|    136|    JanetTable *newTable = janet_gcalloc(JANET_MEMORY_TABLE, sizeof(JanetTable));
35507|    136|    newTable->count = table->count;
35508|    136|    newTable->capacity = table->capacity;
35509|    136|    newTable->deleted = table->deleted;
35510|    136|    newTable->proto = table->proto;
35511|    136|    newTable->data = array_allocate(sizeof(JanetKV), newTable->capacity);
35512|    136|    if (NULL == newTable->data) {
  ------------------
  |  Branch (35512:9): [True: 0, False: 136]
  ------------------
35513|      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]
  |  |  ------------------
  ------------------
35514|      0|    }
35515|    136|    memcpy(newTable->data, table->data, (size_t) table->capacity * sizeof(JanetKV));
35516|    136|    return newTable;
35517|    136|}
janet_lib_table:
35685|  6.64k|void janet_lib_table(JanetTable *env) {
35686|  6.64k|    JanetRegExt table_cfuns[] = {
35687|  6.64k|        JANET_CORE_REG("table/new", cfun_table_new),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35688|  6.64k|        JANET_CORE_REG("table/weak", cfun_table_weak),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35689|  6.64k|        JANET_CORE_REG("table/weak-keys", cfun_table_weak_keys),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35690|  6.64k|        JANET_CORE_REG("table/weak-values", cfun_table_weak_values),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35691|  6.64k|        JANET_CORE_REG("table/to-struct", cfun_table_tostruct),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35692|  6.64k|        JANET_CORE_REG("table/getproto", cfun_table_getproto),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35693|  6.64k|        JANET_CORE_REG("table/setproto", cfun_table_setproto),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35694|  6.64k|        JANET_CORE_REG("table/rawget", cfun_table_rawget),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35695|  6.64k|        JANET_CORE_REG("table/clone", cfun_table_clone),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35696|  6.64k|        JANET_CORE_REG("table/clear", cfun_table_clear),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35697|  6.64k|        JANET_CORE_REG("table/proto-flatten", cfun_table_proto_flatten),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35698|  6.64k|        JANET_REG_END
  ------------------
  |  | 2110|  6.64k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
35699|  6.64k|    };
35700|       |    janet_core_cfuns_ext(env, NULL, table_cfuns);
35701|  6.64k|}
janet_tuple_begin:
35740|  5.05M|Janet *janet_tuple_begin(int32_t length) {
35741|  5.05M|    size_t size = sizeof(JanetTupleHead) + ((size_t) length * sizeof(Janet));
35742|  5.05M|    JanetTupleHead *head = janet_gcalloc(JANET_MEMORY_TUPLE, size);
35743|  5.05M|    head->sm_line = -1;
35744|  5.05M|    head->sm_column = -1;
35745|  5.05M|    head->length = length;
35746|  5.05M|    return (Janet *)(head->data);
35747|  5.05M|}
janet_tuple_end:
35750|  5.05M|const Janet *janet_tuple_end(Janet *tuple) {
35751|  5.05M|    janet_tuple_hash(tuple) = janet_array_calchash(tuple, janet_tuple_length(tuple));
  ------------------
  |  | 1803|  5.05M|#define janet_tuple_hash(t) (janet_tuple_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1800|  5.05M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                  janet_tuple_hash(tuple) = janet_array_calchash(tuple, janet_tuple_length(tuple));
  ------------------
  |  | 1802|  5.05M|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1800|  5.05M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
35752|  5.05M|    return (const Janet *)tuple;
35753|  5.05M|}
janet_tuple_n:
35756|  15.0k|const Janet *janet_tuple_n(const Janet *values, int32_t n) {
35757|  15.0k|    Janet *t = janet_tuple_begin(n);
35758|  15.0k|    safe_memcpy(t, values, sizeof(Janet) * n);
35759|  15.0k|    return janet_tuple_end(t);
35760|  15.0k|}
janet_lib_tuple:
35860|  6.64k|void janet_lib_tuple(JanetTable *env) {
35861|  6.64k|    JanetRegExt tuple_cfuns[] = {
35862|  6.64k|        JANET_CORE_REG("tuple/brackets", cfun_tuple_brackets),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35863|  6.64k|        JANET_CORE_REG("tuple/slice", cfun_tuple_slice),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35864|  6.64k|        JANET_CORE_REG("tuple/type", cfun_tuple_type),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35865|  6.64k|        JANET_CORE_REG("tuple/sourcemap", cfun_tuple_sourcemap),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35866|  6.64k|        JANET_CORE_REG("tuple/setmap", cfun_tuple_setmap),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35867|  6.64k|        JANET_CORE_REG("tuple/join", cfun_tuple_join),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35868|  6.64k|        JANET_REG_END
  ------------------
  |  | 2110|  6.64k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
35869|  6.64k|    };
35870|       |    janet_core_cfuns_ext(env, NULL, tuple_cfuns);
35871|  6.64k|}
janet_hash_mix:
35997|  45.8M|uint32_t janet_hash_mix(uint32_t input, uint32_t more) {
35998|  45.8M|    uint32_t mix1 = (more + 0x9e3779b9 + (input << 6) + (input >> 2));
35999|  45.8M|    return input ^ (0x9e3779b9 + (mix1 << 6) + (mix1 >> 2));
36000|  45.8M|}
janet_string_calchash:
36004|  41.7M|int32_t janet_string_calchash(const uint8_t *str, int32_t len) {
36005|  41.7M|    if (NULL == str || len == 0) return 5381;
  ------------------
  |  Branch (36005:9): [True: 324, False: 41.7M]
  |  Branch (36005:24): [True: 12.3M, False: 29.3M]
  ------------------
36006|  29.3M|    const uint8_t *end = str + len;
36007|  29.3M|    uint32_t hash = 5381;
36008|  2.39G|    while (str < end)
  ------------------
  |  Branch (36008:12): [True: 2.36G, False: 29.3M]
  ------------------
36009|  2.36G|        hash = (hash << 5) + hash + *str++;
36010|  29.3M|    hash = janet_hash_mix(hash, (uint32_t) len);
36011|  29.3M|    return (int32_t) hash;
36012|  41.7M|}
janet_array_calchash:
36127|  5.05M|int32_t janet_array_calchash(const Janet *array, int32_t len) {
36128|  5.05M|    const Janet *end = array + len;
36129|  5.05M|    uint32_t hash = 33;
36130|  19.9M|    while (array < end) {
  ------------------
  |  Branch (36130:12): [True: 14.8M, False: 5.05M]
  ------------------
36131|  14.8M|        hash = janet_hash_mix(hash, janet_hash(*array++));
36132|  14.8M|    }
36133|  5.05M|    return (int32_t) hash;
36134|  5.05M|}
janet_kv_calchash:
36137|  50.2k|int32_t janet_kv_calchash(const JanetKV *kvs, int32_t len) {
36138|  50.2k|    const JanetKV *end = kvs + len;
36139|  50.2k|    uint32_t hash = 33;
36140|   869k|    while (kvs < end) {
  ------------------
  |  Branch (36140:12): [True: 819k, False: 50.2k]
  ------------------
36141|   819k|        hash = janet_hash_mix(hash, janet_hash(kvs->key));
36142|   819k|        hash = janet_hash_mix(hash, janet_hash(kvs->value));
36143|   819k|        kvs++;
36144|   819k|    }
36145|  50.2k|    return (int32_t) hash;
36146|  50.2k|}
janet_tablen:
36150|  20.1M|int32_t janet_tablen(int32_t n) {
36151|  20.1M|    if (n < 0) return 0;
  ------------------
  |  Branch (36151:9): [True: 0, False: 20.1M]
  ------------------
36152|  20.1M|    n |= n >> 1;
36153|  20.1M|    n |= n >> 2;
36154|  20.1M|    n |= n >> 4;
36155|  20.1M|    n |= n >> 8;
36156|  20.1M|    n |= n >> 16;
36157|  20.1M|    return n == INT32_MAX ? INT32_MAX : n + 1;
  ------------------
  |  Branch (36157:12): [True: 0, False: 20.1M]
  ------------------
36158|  20.1M|}
safe_memcpy:
36161|  36.1M|void safe_memcpy(void *dest, const void *src, size_t len) {
36162|  36.1M|    if (!len) return;
  ------------------
  |  Branch (36162:9): [True: 12.3M, False: 23.7M]
  ------------------
36163|  23.7M|    memcpy(dest, src, len);
36164|  23.7M|}
janet_dict_find_deep:
36168|  57.2M|const JanetKV *janet_dict_find_deep(const JanetKV *buckets, int32_t cap, Janet key) {
36169|  57.2M|    int32_t index = janet_maphash(cap, janet_hash(key));
  ------------------
  |  |  396|  57.2M|#define janet_maphash(cap, hash) ((uint32_t)(hash) & (cap - 1))
  ------------------
36170|  57.2M|    int32_t i;
36171|  57.2M|    const JanetKV *first_bucket = NULL;
36172|       |    /* Higher half */
36173|  67.9M|    for (i = index; i < cap; i++) {
  ------------------
  |  Branch (36173:21): [True: 67.5M, False: 379k]
  ------------------
36174|  67.5M|        const JanetKV *kv = buckets + i;
36175|  67.5M|        if (janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|  67.5M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 45.1M, False: 22.3M]
  |  |  |  Branch (806:6): [Folded, False: 67.5M]
  |  |  ------------------
  |  |  807|  67.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|  67.5M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  67.5M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  67.5M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  67.5M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  67.5M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36176|  45.1M|            if (janet_checktype(kv->value, JANET_NIL)) {
  ------------------
  |  |  806|  45.1M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 39.0M, False: 6.10M]
  |  |  |  Branch (806:6): [Folded, False: 45.1M]
  |  |  ------------------
  |  |  807|  45.1M|        ? 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.1M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  45.1M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  45.1M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  45.1M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  45.1M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36177|  39.0M|                return kv;
36178|  39.0M|            } else if (NULL == first_bucket) {
  ------------------
  |  Branch (36178:24): [True: 4.15M, False: 1.95M]
  ------------------
36179|  4.15M|                first_bucket = kv;
36180|  4.15M|            }
36181|  45.1M|        } else if (janet_bitwise_same(kv->key, key) || janet_equals(kv->key, key)) {
  ------------------
  |  |  401|  44.7M|#define janet_bitwise_same(x, y) (janet_u64(x) == janet_u64(y))
  |  |  ------------------
  |  |  |  |  788|  22.3M|#define janet_u64(x) ((x).u64)
  |  |  ------------------
  |  |               #define janet_bitwise_same(x, y) (janet_u64(x) == janet_u64(y))
  |  |  ------------------
  |  |  |  |  788|  22.3M|#define janet_u64(x) ((x).u64)
  |  |  ------------------
  |  |  |  Branch (401:34): [True: 17.7M, False: 4.56M]
  |  |  ------------------
  ------------------
  |  Branch (36181:56): [True: 1.05k, False: 4.56M]
  ------------------
36182|  17.7M|            return buckets + i;
36183|  17.7M|        }
36184|  67.5M|    }
36185|       |    /* Lower half */
36186|   620k|    for (i = 0; i < index; i++) {
  ------------------
  |  Branch (36186:17): [True: 620k, False: 0]
  ------------------
36187|   620k|        const JanetKV *kv = buckets + i;
36188|   620k|        if (janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|   620k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 433k, False: 186k]
  |  |  |  Branch (806:6): [Folded, False: 620k]
  |  |  ------------------
  |  |  807|   620k|        ? 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|   620k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   620k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   620k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   620k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   620k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36189|   433k|            if (janet_checktype(kv->value, JANET_NIL)) {
  ------------------
  |  |  806|   433k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 307k, False: 126k]
  |  |  |  Branch (806:6): [Folded, False: 433k]
  |  |  ------------------
  |  |  807|   433k|        ? 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|   433k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   433k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   433k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   433k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   433k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36190|   307k|                return kv;
36191|   307k|            } else if (NULL == first_bucket) {
  ------------------
  |  Branch (36191:24): [True: 41.1k, False: 85.6k]
  ------------------
36192|  41.1k|                first_bucket = kv;
36193|  41.1k|            }
36194|   433k|        } else if (janet_bitwise_same(kv->key, key) || janet_equals(kv->key, key)) {
  ------------------
  |  |  401|   373k|#define janet_bitwise_same(x, y) (janet_u64(x) == janet_u64(y))
  |  |  ------------------
  |  |  |  |  788|   186k|#define janet_u64(x) ((x).u64)
  |  |  ------------------
  |  |               #define janet_bitwise_same(x, y) (janet_u64(x) == janet_u64(y))
  |  |  ------------------
  |  |  |  |  788|   186k|#define janet_u64(x) ((x).u64)
  |  |  ------------------
  |  |  |  Branch (401:34): [True: 72.0k, False: 114k]
  |  |  ------------------
  ------------------
  |  Branch (36194:56): [True: 101, False: 114k]
  ------------------
36195|  72.1k|            return buckets + i;
36196|  72.1k|        }
36197|   620k|    }
36198|      0|    return first_bucket;
36199|   379k|}
janet_dict_find_keyword:
36205|  79.7k|    const uint8_t *cstr, int32_t cstr_len) {
36206|  79.7k|    int32_t hash = janet_string_calchash(cstr, cstr_len);
36207|  79.7k|    int32_t index = janet_maphash(cap, hash);
  ------------------
  |  |  396|  79.7k|#define janet_maphash(cap, hash) ((uint32_t)(hash) & (cap - 1))
  ------------------
36208|  79.7k|    int32_t i;
36209|  79.7k|    const JanetKV *first_bucket = NULL;
36210|       |    /* Higher half */
36211|   119k|    for (i = index; i < cap; i++) {
  ------------------
  |  Branch (36211:21): [True: 119k, False: 0]
  ------------------
36212|   119k|        const JanetKV *kv = buckets + i;
36213|   119k|        if (janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|   119k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 59.7k, False: 59.7k]
  |  |  |  Branch (806:6): [Folded, False: 119k]
  |  |  ------------------
  |  |  807|   119k|        ? 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|   119k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   119k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   119k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   119k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   119k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36214|  59.7k|            if (janet_checktype(kv->value, JANET_NIL)) {
  ------------------
  |  |  806|  59.7k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 59.7k, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 59.7k]
  |  |  ------------------
  |  |  807|  59.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|  59.7k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  59.7k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  59.7k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  59.7k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  59.7k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36215|  59.7k|                return kv;
36216|  59.7k|            } else if (NULL == first_bucket) {
  ------------------
  |  Branch (36216:24): [True: 0, False: 0]
  ------------------
36217|      0|                first_bucket = kv;
36218|      0|            }
36219|  59.7k|        } else if (janet_checktype(kv->key, JANET_KEYWORD)) {
  ------------------
  |  |  806|  59.7k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 59.7k, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 59.7k]
  |  |  ------------------
  |  |  807|  59.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|  59.7k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  59.7k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  59.7k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  59.7k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  59.7k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36220|       |            /* Works for symbol and keyword, too */
36221|  59.7k|            JanetString str = janet_unwrap_string(kv->key);
  ------------------
  |  |  863|  59.7k|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
36222|  59.7k|            int32_t len = janet_string_length(str);
  ------------------
  |  | 1813|  59.7k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|  59.7k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
36223|  59.7k|            if (hash == janet_string_hash(str) && len == cstr_len && !memcmp(str, cstr, len)) {
  ------------------
  |  | 1814|   119k|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  ------------------
  |  |  |  | 1812|  59.7k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (36223:17): [True: 19.9k, False: 39.8k]
  |  Branch (36223:51): [True: 19.9k, False: 0]
  |  Branch (36223:70): [True: 19.9k, False: 0]
  ------------------
36224|  19.9k|                return buckets + i;
36225|  19.9k|            }
36226|  59.7k|        }
36227|   119k|    }
36228|       |    /* Lower half */
36229|      0|    for (i = 0; i < index; i++) {
  ------------------
  |  Branch (36229:17): [True: 0, False: 0]
  ------------------
36230|      0|        const JanetKV *kv = buckets + i;
36231|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36232|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36233|      0|                return kv;
36234|      0|            } else if (NULL == first_bucket) {
  ------------------
  |  Branch (36234:24): [True: 0, False: 0]
  ------------------
36235|      0|                first_bucket = kv;
36236|      0|            }
36237|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36238|       |            /* Works for symbol and keyword, too */
36239|      0|            JanetString str = janet_unwrap_string(kv->key);
  ------------------
  |  |  863|      0|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
36240|      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)))
  |  |  ------------------
  ------------------
36241|      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 (36241:17): [True: 0, False: 0]
  |  Branch (36241:51): [True: 0, False: 0]
  |  Branch (36241:70): [True: 0, False: 0]
  ------------------
36242|      0|                return buckets + i;
36243|      0|            }
36244|      0|        }
36245|      0|    }
36246|      0|    return first_bucket;
36247|      0|}
janet_cstrcmp:
36272|  85.7k|int janet_cstrcmp(const uint8_t *str, const char *other) {
36273|  85.7k|    int32_t len = janet_string_length(str);
  ------------------
  |  | 1813|  85.7k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|  85.7k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
36274|  85.7k|    int32_t index;
36275|   160k|    for (index = 0; index < len; index++) {
  ------------------
  |  Branch (36275:21): [True: 143k, False: 16.6k]
  ------------------
36276|   143k|        uint8_t c = str[index];
36277|   143k|        uint8_t k = ((const uint8_t *)other)[index];
36278|   143k|        if (c < k) return -1;
  ------------------
  |  Branch (36278:13): [True: 23.8k, False: 120k]
  ------------------
36279|   120k|        if (c > k) return 1;
  ------------------
  |  Branch (36279:13): [True: 45.2k, False: 74.9k]
  ------------------
36280|  74.9k|        if (k == '\0') break;
  ------------------
  |  Branch (36280:13): [True: 0, False: 74.9k]
  ------------------
36281|  74.9k|    }
36282|  16.6k|    return (other[index] == '\0') ? 0 : -1;
  ------------------
  |  Branch (36282:12): [True: 16.3k, False: 278]
  ------------------
36283|  85.7k|}
janet_strbinsearch:
36292|  16.7k|    const uint8_t *key) {
36293|  16.7k|    size_t low = 0;
36294|  16.7k|    size_t hi = tabcount;
36295|  16.7k|    const char *t = (const char *)tab;
36296|  86.0k|    while (low < hi) {
  ------------------
  |  Branch (36296:12): [True: 85.7k, False: 361]
  ------------------
36297|  85.7k|        size_t mid = low + ((hi - low) / 2);
36298|  85.7k|        const char **item = (const char **)(t + mid * itemsize);
36299|  85.7k|        const char *name = *item;
36300|  85.7k|        int comp = janet_cstrcmp(key, name);
36301|  85.7k|        if (comp < 0) {
  ------------------
  |  Branch (36301:13): [True: 24.0k, False: 61.6k]
  ------------------
36302|  24.0k|            hi = mid;
36303|  61.6k|        } else if (comp > 0) {
  ------------------
  |  Branch (36303:20): [True: 45.2k, False: 16.3k]
  ------------------
36304|  45.2k|            low = mid + 1;
36305|  45.2k|        } else {
36306|  16.3k|            return (const void *)item;
36307|  16.3k|        }
36308|  85.7k|    }
36309|    361|    return NULL;
36310|  16.7k|}
janet_registry_put:
36372|  2.33M|    int32_t source_line) {
36373|  2.33M|    if (janet_vm.registry_count == janet_vm.registry_cap) {
  ------------------
  |  Branch (36373:9): [True: 6.64k, False: 2.33M]
  ------------------
36374|  6.64k|        size_t newcap = (janet_vm.registry_count + 1) * 2;
36375|       |        /* Size it nicely with core by default */
36376|  6.64k|        if (newcap < 512) {
  ------------------
  |  Branch (36376:13): [True: 6.64k, False: 0]
  ------------------
36377|  6.64k|            newcap = 512;
36378|  6.64k|        }
36379|  6.64k|        void *newmem = janet_realloc(janet_vm.registry, newcap * sizeof(JanetCFunRegistry));
  ------------------
  |  | 2409|  6.64k|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
36380|  6.64k|        if (NULL == newmem) {
  ------------------
  |  Branch (36380:13): [True: 0, False: 6.64k]
  ------------------
36381|      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]
  |  |  ------------------
  ------------------
36382|      0|        }
36383|  6.64k|        janet_vm.registry = newmem;
36384|  6.64k|        janet_vm.registry_cap = newcap;
36385|  6.64k|    }
36386|  2.33M|    JanetCFunRegistry value = {
36387|  2.33M|        key,
36388|  2.33M|        name,
36389|  2.33M|        name_prefix,
36390|  2.33M|        source_file,
36391|  2.33M|        source_line
36392|  2.33M|    };
36393|  2.33M|    janet_vm.registry[janet_vm.registry_count++] = value;
36394|  2.33M|    janet_vm.registry_dirty = 1;
36395|  2.33M|}
janet_register_abstract_type:
36521|  59.7k|void janet_register_abstract_type(const JanetAbstractType *at) {
36522|  59.7k|    janet_check_pointer_align((void *) at);
36523|  59.7k|    Janet sym = janet_csymbolv(at->name);
  ------------------
  |  | 1837|  59.7k|#define janet_csymbolv(cstr) janet_wrap_symbol(janet_csymbol(cstr))
  |  |  ------------------
  |  |  |  |  849|  59.7k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  59.7k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  59.7k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  59.7k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36524|  59.7k|    Janet check = janet_table_get(janet_vm.abstract_registry, sym);
36525|  59.7k|    if (!janet_checktype(check, JANET_NIL) && at != janet_unwrap_pointer(check)) {
  ------------------
  |  |  806|   119k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 59.7k]
  |  |  ------------------
  |  |  807|   119k|        ? 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|   119k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  59.7k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  59.7k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  59.7k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  59.7k|#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 (36525:9): [True: 0, False: 59.7k]
  |  Branch (36525:47): [True: 0, False: 0]
  ------------------
36526|      0|        janet_panicf("cannot register abstract type %s, "
36527|      0|                     "a type with the same name exists", at->name);
36528|      0|    }
36529|  59.7k|    janet_table_put(janet_vm.abstract_registry, sym, janet_wrap_pointer((void *) at));
  ------------------
  |  |  854|  59.7k|#define janet_wrap_pointer(s) janet_nanbox_wrap_((s), JANET_POINTER)
  |  |  ------------------
  |  |  |  |  825|  59.7k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  59.7k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  59.7k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36530|  59.7k|}
janet_core_def_sm:
36541|  19.9k|void janet_core_def_sm(JanetTable *env, const char *name, Janet x, const void *p, const void *sf, int32_t sl) {
36542|  19.9k|    (void) sf;
36543|  19.9k|    (void) sl;
36544|  19.9k|    (void) p;
36545|  19.9k|    Janet key = janet_csymbolv(name);
  ------------------
  |  | 1837|  19.9k|#define janet_csymbolv(cstr) janet_wrap_symbol(janet_csymbol(cstr))
  |  |  ------------------
  |  |  |  |  849|  19.9k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  19.9k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  19.9k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  19.9k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36546|  19.9k|    janet_table_put(env, key, x);
36547|  19.9k|    if (janet_checktype(x, JANET_CFUNCTION)) {
  ------------------
  |  |  806|  19.9k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 19.9k]
  |  |  |  Branch (806:6): [Folded, False: 19.9k]
  |  |  ------------------
  |  |  807|  19.9k|        ? 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.9k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  19.9k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  19.9k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  19.9k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  19.9k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36548|      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))
  ------------------
36549|      0|    }
36550|  19.9k|}
janet_core_cfuns_ext:
36552|   146k|void janet_core_cfuns_ext(JanetTable *env, const char *regprefix, const JanetRegExt *cfuns) {
36553|   146k|    (void) regprefix;
36554|  2.48M|    while (cfuns->name) {
  ------------------
  |  Branch (36554:12): [True: 2.33M, False: 146k]
  ------------------
36555|  2.33M|        janet_check_pointer_align(cfuns->cfun);
36556|  2.33M|        Janet fun = janet_wrap_cfunction(cfuns->cfun);
  ------------------
  |  |  853|  2.33M|#define janet_wrap_cfunction(s) janet_nanbox_wrap_((s), JANET_CFUNCTION)
  |  |  ------------------
  |  |  |  |  825|  2.33M|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36557|  2.33M|        janet_table_put(env, janet_csymbolv(cfuns->name), fun);
  ------------------
  |  | 1837|  2.33M|#define janet_csymbolv(cstr) janet_wrap_symbol(janet_csymbol(cstr))
  |  |  ------------------
  |  |  |  |  849|  2.33M|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  2.33M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36558|  2.33M|        janet_registry_put(cfuns->cfun, cfuns->name, regprefix, cfuns->source_file, cfuns->source_line);
36559|  2.33M|        cfuns++;
36560|  2.33M|    }
36561|   146k|}
janet_binding_from_entry:
36564|  19.9k|JanetBinding janet_binding_from_entry(Janet entry) {
36565|  19.9k|    JanetTable *entry_table;
36566|  19.9k|    JanetBinding binding = {
36567|  19.9k|        JANET_BINDING_NONE,
36568|  19.9k|        janet_wrap_nil(),
  ------------------
  |  |  831|  19.9k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  19.9k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  19.9k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  19.9k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36569|  19.9k|        JANET_BINDING_DEP_NONE
36570|  19.9k|    };
36571|       |
36572|       |    /* Check environment for entry */
36573|  19.9k|    if (!janet_checktype(entry, JANET_TABLE))
  ------------------
  |  |  806|  19.9k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 19.9k]
  |  |  ------------------
  |  |  807|  19.9k|        ? 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.9k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  19.9k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  19.9k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  19.9k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  19.9k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (36573:9): [True: 0, False: 19.9k]
  ------------------
36574|      0|        return binding;
36575|  19.9k|    entry_table = janet_unwrap_table(entry);
  ------------------
  |  |  861|  19.9k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
36576|       |
36577|  19.9k|    Janet deprecate = janet_table_get_keyword(entry_table, "deprecated");
36578|  19.9k|    int macro = janet_truthy(janet_table_get_keyword(entry_table, "macro"));
  ------------------
  |  |  818|  19.9k|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  806|  39.8k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 19.9k]
  |  |  |  |  ------------------
  |  |  |  |  807|  39.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|  39.8k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|  19.9k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|  19.9k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  19.9k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  19.9k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (818:6): [True: 0, False: 19.9k]
  |  |  ------------------
  |  |  819|  19.9k|     (!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]
  |  |  ------------------
  ------------------
36579|  19.9k|    Janet value = janet_table_get_keyword(entry_table, "value");
36580|  19.9k|    Janet ref = janet_table_get_keyword(entry_table, "ref");
36581|       |
36582|  19.9k|    if (janet_checktype(deprecate, JANET_KEYWORD)) {
  ------------------
  |  |  806|  19.9k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 19.9k]
  |  |  |  Branch (806:6): [Folded, False: 19.9k]
  |  |  ------------------
  |  |  807|  19.9k|        ? 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.9k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  19.9k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  19.9k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  19.9k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  19.9k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36583|      0|        JanetKeyword depkw = janet_unwrap_keyword(deprecate);
  ------------------
  |  |  865|      0|#define janet_unwrap_keyword(x) ((const uint8_t *)janet_nanbox_to_pointer(x))
  ------------------
36584|      0|        if (!janet_cstrcmp(depkw, "relaxed")) {
  ------------------
  |  Branch (36584:13): [True: 0, False: 0]
  ------------------
36585|      0|            binding.deprecation = JANET_BINDING_DEP_RELAXED;
36586|      0|        } else if (!janet_cstrcmp(depkw, "normal")) {
  ------------------
  |  Branch (36586:20): [True: 0, False: 0]
  ------------------
36587|      0|            binding.deprecation = JANET_BINDING_DEP_NORMAL;
36588|      0|        } else if (!janet_cstrcmp(depkw, "strict")) {
  ------------------
  |  Branch (36588:20): [True: 0, False: 0]
  ------------------
36589|      0|            binding.deprecation = JANET_BINDING_DEP_STRICT;
36590|      0|        }
36591|  19.9k|    } else if (!janet_checktype(deprecate, JANET_NIL)) {
  ------------------
  |  |  806|  19.9k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 19.9k]
  |  |  ------------------
  |  |  807|  19.9k|        ? 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.9k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  19.9k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  19.9k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  19.9k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  19.9k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (36591:16): [True: 0, False: 19.9k]
  ------------------
36592|      0|        binding.deprecation = JANET_BINDING_DEP_NORMAL;
36593|      0|    }
36594|       |
36595|  19.9k|    int ref_is_valid = janet_checktype(ref, JANET_ARRAY);
  ------------------
  |  |  806|  19.9k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 19.9k]
  |  |  ------------------
  |  |  807|  19.9k|        ? 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.9k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  19.9k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  19.9k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  19.9k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  19.9k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36596|  19.9k|    int redef = ref_is_valid && janet_truthy(janet_table_get_keyword(entry_table, "redef"));
  ------------------
  |  |  818|  19.9k|    (!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|  19.9k|     (!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 (36596:17): [True: 0, False: 19.9k]
  ------------------
36597|       |
36598|  19.9k|    if (macro) {
  ------------------
  |  Branch (36598:9): [True: 0, False: 19.9k]
  ------------------
36599|      0|        binding.value = redef ? ref : value;
  ------------------
  |  Branch (36599:25): [True: 0, False: 0]
  ------------------
36600|      0|        binding.type = redef ? JANET_BINDING_DYNAMIC_MACRO : JANET_BINDING_MACRO;
  ------------------
  |  Branch (36600:24): [True: 0, False: 0]
  ------------------
36601|      0|        return binding;
36602|      0|    }
36603|       |
36604|  19.9k|    if (ref_is_valid) {
  ------------------
  |  Branch (36604:9): [True: 0, False: 19.9k]
  ------------------
36605|      0|        binding.value = ref;
36606|      0|        binding.type = redef ? JANET_BINDING_DYNAMIC_DEF : JANET_BINDING_VAR;
  ------------------
  |  Branch (36606:24): [True: 0, False: 0]
  ------------------
36607|  19.9k|    } else {
36608|  19.9k|        binding.value = value;
36609|  19.9k|        binding.type = JANET_BINDING_DEF;
36610|  19.9k|    }
36611|       |
36612|  19.9k|    return binding;
36613|  19.9k|}
janet_resolve_ext:
36668|  19.9k|JanetBinding janet_resolve_ext(JanetTable *env, const uint8_t *sym) {
36669|  19.9k|    Janet entry = janet_table_get(env, janet_wrap_symbol(sym));
  ------------------
  |  |  849|  19.9k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  ------------------
  |  |  |  |  828|  19.9k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  19.9k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  19.9k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36670|  19.9k|    return janet_binding_from_entry(entry);
36671|  19.9k|}
janet_resolve:
36673|  19.9k|JanetBindingType janet_resolve(JanetTable *env, const uint8_t *sym, Janet *out) {
36674|  19.9k|    JanetBinding binding = janet_resolve_ext(env, sym);
36675|  19.9k|    if (binding.type == JANET_BINDING_DYNAMIC_DEF || binding.type == JANET_BINDING_DYNAMIC_MACRO) {
  ------------------
  |  Branch (36675:9): [True: 0, False: 19.9k]
  |  Branch (36675:54): [True: 0, False: 19.9k]
  ------------------
36676|      0|        *out = janet_array_peek(janet_unwrap_array(binding.value));
  ------------------
  |  |  860|      0|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
36677|  19.9k|    } else {
36678|  19.9k|        *out = binding.value;
36679|  19.9k|    }
36680|  19.9k|    return binding.type;
36681|  19.9k|}
janet_resolve_core:
36684|  6.64k|Janet janet_resolve_core(const char *name) {
36685|  6.64k|    JanetTable *env = janet_core_env(NULL);
36686|  6.64k|    Janet out = janet_wrap_nil();
  ------------------
  |  |  831|  6.64k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  6.64k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  6.64k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  6.64k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36687|  6.64k|    janet_resolve(env, janet_csymbol(name), &out);
36688|  6.64k|    return out;
36689|  6.64k|}
janet_indexed_view:
36693|  7.56M|int janet_indexed_view(Janet seq, const Janet **data, int32_t *len) {
36694|  7.56M|    if (janet_checktype(seq, JANET_ARRAY)) {
  ------------------
  |  |  806|  7.56M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 81.0k, False: 7.48M]
  |  |  |  Branch (806:6): [Folded, False: 7.56M]
  |  |  ------------------
  |  |  807|  7.56M|        ? 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|  7.56M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  7.56M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  7.56M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  7.56M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  7.56M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36695|  81.0k|        *data = janet_unwrap_array(seq)->data;
  ------------------
  |  |  860|  81.0k|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
36696|  81.0k|        *len = janet_unwrap_array(seq)->count;
  ------------------
  |  |  860|  81.0k|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
36697|  81.0k|        return 1;
36698|  7.48M|    } else if (janet_checktype(seq, JANET_TUPLE)) {
  ------------------
  |  |  806|  7.48M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 7.48M, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 7.48M]
  |  |  ------------------
  |  |  807|  7.48M|        ? 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|  7.48M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  7.48M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  7.48M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  7.48M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  7.48M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36699|  7.48M|        *data = janet_unwrap_tuple(seq);
  ------------------
  |  |  858|  7.48M|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
36700|  7.48M|        *len = janet_tuple_length(janet_unwrap_tuple(seq));
  ------------------
  |  | 1802|  7.48M|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1800|  7.48M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
36701|  7.48M|        return 1;
36702|  7.48M|    }
36703|      0|    return 0;
36704|  7.56M|}
janet_bytes_view:
36708|  1.96k|int janet_bytes_view(Janet str, const uint8_t **data, int32_t *len) {
36709|  1.96k|    JanetType t = janet_type(str);
  ------------------
  |  |  795|  1.96k|    (isnan((x).number) \
  |  |  796|  1.96k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  1.96k|        : JANET_NUMBER)
  ------------------
  |  Branch (36709:19): [True: 1.96k, False: 0]
  ------------------
36710|  1.96k|    if (t == JANET_STRING || t == JANET_SYMBOL || t == JANET_KEYWORD) {
  ------------------
  |  Branch (36710:9): [True: 1.96k, False: 0]
  |  Branch (36710:30): [True: 0, False: 0]
  |  Branch (36710:51): [True: 0, False: 0]
  ------------------
36711|  1.96k|        *data = janet_unwrap_string(str);
  ------------------
  |  |  863|  1.96k|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
36712|  1.96k|        *len = janet_string_length(janet_unwrap_string(str));
  ------------------
  |  | 1813|  1.96k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|  1.96k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
36713|  1.96k|        return 1;
36714|  1.96k|    } else if (t == JANET_BUFFER) {
  ------------------
  |  Branch (36714:16): [True: 0, False: 0]
  ------------------
36715|      0|        *data = janet_unwrap_buffer(str)->data;
  ------------------
  |  |  862|      0|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
36716|      0|        *len = janet_unwrap_buffer(str)->count;
  ------------------
  |  |  862|      0|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
36717|      0|        return 1;
36718|      0|    } else if (t == JANET_ABSTRACT) {
  ------------------
  |  Branch (36718:16): [True: 0, False: 0]
  ------------------
36719|      0|        void *abst = janet_unwrap_abstract(str);
  ------------------
  |  |  866|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
36720|      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)))
  |  |  ------------------
  ------------------
36721|      0|        if (NULL == atype->bytes) {
  ------------------
  |  Branch (36721:13): [True: 0, False: 0]
  ------------------
36722|      0|            return 0;
36723|      0|        }
36724|      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)))
  |  |  ------------------
  ------------------
36725|      0|        *data = view.bytes;
36726|      0|        *len = view.len;
36727|      0|        return 1;
36728|      0|    }
36729|      0|    return 0;
36730|  1.96k|}
janet_dictionary_view:
36735|  2.74M|int janet_dictionary_view(Janet tab, const JanetKV **data, int32_t *len, int32_t *cap) {
36736|  2.74M|    if (janet_checktype(tab, JANET_TABLE)) {
  ------------------
  |  |  806|  2.74M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 1.20M, False: 1.54M]
  |  |  |  Branch (806:6): [Folded, False: 2.74M]
  |  |  ------------------
  |  |  807|  2.74M|        ? 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.74M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  2.74M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  2.74M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.74M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.74M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36737|  1.20M|        *data = janet_unwrap_table(tab)->data;
  ------------------
  |  |  861|  1.20M|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
36738|  1.20M|        *cap = janet_unwrap_table(tab)->capacity;
  ------------------
  |  |  861|  1.20M|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
36739|  1.20M|        *len = janet_unwrap_table(tab)->count;
  ------------------
  |  |  861|  1.20M|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
36740|  1.20M|        return 1;
36741|  1.54M|    } else if (janet_checktype(tab, JANET_STRUCT)) {
  ------------------
  |  |  806|  1.54M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 1.54M, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 1.54M]
  |  |  ------------------
  |  |  807|  1.54M|        ? 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.54M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  1.54M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  1.54M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.54M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.54M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36742|  1.54M|        *data = janet_unwrap_struct(tab);
  ------------------
  |  |  857|  1.54M|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
36743|  1.54M|        *cap = janet_struct_capacity(janet_unwrap_struct(tab));
  ------------------
  |  | 1849|  1.54M|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1846|  1.54M|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
36744|  1.54M|        *len = janet_struct_length(janet_unwrap_struct(tab));
  ------------------
  |  | 1848|  1.54M|#define janet_struct_length(t) (janet_struct_head(t)->length)
  |  |  ------------------
  |  |  |  | 1846|  1.54M|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
36745|  1.54M|        return 1;
36746|  1.54M|    }
36747|      0|    return 0;
36748|  2.74M|}
janet_checkint:
36750|  21.9k|int janet_checkint(Janet x) {
36751|  21.9k|    if (!janet_checktype(x, JANET_NUMBER))
  ------------------
  |  |  806|  21.9k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [True: 21.9k, Folded]
  |  |  ------------------
  |  |  807|  21.9k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|  21.9k|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 5.01k, False: 16.8k]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 16.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  21.9k|        : 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 (36751:9): [True: 16.8k, False: 5.01k]
  ------------------
36752|  16.8k|        return 0;
36753|  5.01k|    double dval = janet_unwrap_number(x);
  ------------------
  |  |  839|  5.01k|#define janet_unwrap_number(x) ((x).number)
  ------------------
36754|       |    return janet_checkintrange(dval);
  ------------------
  |  |  962|  5.01k|#define janet_checkintrange(x) ((x) >= INT32_MIN && (x) <= INT32_MAX && (x) == (int32_t)(x))
  |  |  ------------------
  |  |  |  Branch (962:33): [True: 4.96k, False: 52]
  |  |  |  Branch (962:53): [True: 4.75k, False: 206]
  |  |  |  Branch (962:73): [True: 4.55k, False: 203]
  |  |  ------------------
  ------------------
36755|  21.9k|}
janet_sorted_keys:
36832|  2.74M|int32_t janet_sorted_keys(const JanetKV *dict, int32_t cap, int32_t *index_buffer) {
36833|       |
36834|       |    /* First, put populated indices into index_buffer */
36835|  2.74M|    int32_t next_index = 0;
36836|  12.0M|    for (int32_t i = 0; i < cap; i++) {
  ------------------
  |  Branch (36836:25): [True: 9.34M, False: 2.74M]
  ------------------
36837|  9.34M|        if (!janet_checktype(dict[i].key, JANET_NIL)) {
  ------------------
  |  |  806|  9.34M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 9.34M]
  |  |  ------------------
  |  |  807|  9.34M|        ? 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.34M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  9.34M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  9.34M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  9.34M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  9.34M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (36837:13): [True: 2.25M, False: 7.08M]
  ------------------
36838|  2.25M|            index_buffer[next_index++] = i;
36839|  2.25M|        }
36840|  9.34M|    }
36841|       |
36842|       |    /* Next, sort those (simple insertion sort here for now) */
36843|  3.73M|    for (int32_t i = 1; i < next_index; i++) {
  ------------------
  |  Branch (36843:25): [True: 987k, False: 2.74M]
  ------------------
36844|   987k|        int32_t index_to_insert = index_buffer[i];
36845|   987k|        Janet lhs = dict[index_to_insert].key;
36846|  1.80M|        for (int32_t j = i - 1; j >= 0; j--) {
  ------------------
  |  Branch (36846:33): [True: 1.44M, False: 360k]
  ------------------
36847|  1.44M|            index_buffer[j + 1] = index_buffer[j];
36848|  1.44M|            Janet rhs = dict[index_buffer[j]].key;
36849|  1.44M|            if (janet_compare(lhs, rhs) >= 0) {
  ------------------
  |  Branch (36849:17): [True: 626k, False: 820k]
  ------------------
36850|   626k|                index_buffer[j + 1] = index_to_insert;
36851|   626k|                break;
36852|   820k|            } else if (j == 0) {
  ------------------
  |  Branch (36852:24): [True: 360k, False: 459k]
  ------------------
36853|   360k|                index_buffer[0] = index_to_insert;
36854|   360k|            }
36855|  1.44M|        }
36856|   987k|    }
36857|       |
36858|       |    /* Return number of indices found */
36859|  2.74M|    return next_index;
36860|       |
36861|  2.74M|}
array_allocate:
37094|  32.4M|void *array_allocate(size_t element_size, int32_t count) {
37095|  32.4M|    if (count < 0) return NULL;
  ------------------
  |  Branch (37095:9): [True: 0, False: 32.4M]
  ------------------
37096|  32.4M|    if ((size_t) count > (SIZE_MAX / element_size)) return NULL;
  ------------------
  |  Branch (37096:9): [True: 0, False: 32.4M]
  ------------------
37097|  32.4M|    return janet_malloc(element_size * count);
  ------------------
  |  | 2406|  32.4M|#define janet_malloc(X) malloc((X))
  ------------------
37098|  32.4M|}
janet_equals:
37400|  4.67M|int janet_equals(Janet x, Janet y) {
37401|  4.67M|    if (janet_type(x) != janet_type(y)) return 0;
  ------------------
  |  |  795|  4.67M|    (isnan((x).number) \
  |  |  796|  4.67M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  4.67M|        : JANET_NUMBER)
  ------------------
                  if (janet_type(x) != janet_type(y)) return 0;
  ------------------
  |  |  795|  4.67M|    (isnan((x).number) \
  |  |  796|  4.67M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  4.67M|        : JANET_NUMBER)
  ------------------
  |  Branch (37401:9): [True: 4.67M, False: 900]
  |  Branch (37401:9): [True: 1.82M, False: 2.85M]
  |  Branch (37401:26): [True: 4.65M, False: 19.3k]
  ------------------
37402|  2.85M|    if (janet_checktypes(x, JANET_TFLAG_TUPLE | JANET_TFLAG_STRUCT)) return janet_equals_containers(x, y);
  ------------------
  |  |  969|  2.85M|#define janet_checktypes(x, tps) ((1 << janet_type(x)) & (tps))
  |  |  ------------------
  |  |  |  |  795|  2.85M|    (isnan((x).number) \
  |  |  |  |  796|  2.85M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  |  |  797|  2.85M|        : JANET_NUMBER)
  |  |  ------------------
  |  |  |  Branch (969:34): [True: 2.85M, False: 1.89k]
  |  |  ------------------
  ------------------
  |  Branch (37402:9): [True: 2.85M, False: 292]
  ------------------
37403|  1.89k|    return janet_equals_leaf(x, y);
37404|  2.85M|}
janet_hash:
37416|  93.1M|int32_t janet_hash(Janet x) {
37417|  93.1M|    int32_t hash = 0;
37418|  93.1M|    switch (janet_type(x)) {
  ------------------
  |  |  795|  93.1M|    (isnan((x).number) \
  |  |  796|  93.1M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  93.1M|        : JANET_NUMBER)
  ------------------
  |  Branch (37418:13): [True: 81.0M, False: 12.0M]
  ------------------
37419|  1.22M|        case JANET_NIL:
  ------------------
  |  Branch (37419:9): [True: 1.22M, False: 91.8M]
  ------------------
37420|  1.22M|            hash = 0;
37421|  1.22M|            break;
37422|  43.9k|        case JANET_BOOLEAN:
  ------------------
  |  Branch (37422:9): [True: 43.9k, False: 93.0M]
  ------------------
37423|  43.9k|            hash = janet_unwrap_boolean(x);
  ------------------
  |  |  838|  43.9k|#define janet_unwrap_boolean(x) ((x).u64 & 0x1)
  ------------------
37424|  43.9k|            break;
37425|  31.5M|        case JANET_STRING:
  ------------------
  |  Branch (37425:9): [True: 31.5M, False: 61.5M]
  ------------------
37426|  31.9M|        case JANET_SYMBOL:
  ------------------
  |  Branch (37426:9): [True: 344k, False: 92.7M]
  ------------------
37427|  32.5M|        case JANET_KEYWORD:
  ------------------
  |  Branch (37427:9): [True: 606k, False: 92.4M]
  ------------------
37428|  32.5M|            hash = janet_string_hash(janet_unwrap_string(x));
  ------------------
  |  | 1814|  32.5M|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  ------------------
  |  |  |  | 1812|  32.5M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
37429|  32.5M|            break;
37430|  25.5M|        case JANET_TUPLE:
  ------------------
  |  Branch (37430:9): [True: 25.5M, False: 67.5M]
  ------------------
37431|  25.5M|            hash = janet_tuple_hash(janet_unwrap_tuple(x));
  ------------------
  |  | 1803|  25.5M|#define janet_tuple_hash(t) (janet_tuple_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1800|  25.5M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
37432|  25.5M|            uint32_t inc = (janet_tuple_flag(janet_unwrap_tuple(x)) & JANET_TUPLE_FLAG_BRACKETCTOR) ? 1 : 0;
  ------------------
  |  | 1806|  25.5M|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1800|  25.5M|#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|  25.5M|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
  |  Branch (37432:28): [True: 92.7k, False: 25.4M]
  ------------------
37433|  25.5M|            hash = (int32_t)((uint32_t)hash + inc); /* avoid overflow undefined behavior */
37434|  25.5M|            break;
37435|  4.76M|        case JANET_STRUCT:
  ------------------
  |  Branch (37435:9): [True: 4.76M, False: 88.3M]
  ------------------
37436|  4.76M|            hash = janet_struct_hash(janet_unwrap_struct(x));
  ------------------
  |  | 1850|  4.76M|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1846|  4.76M|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
37437|  4.76M|            break;
37438|  12.0M|        case JANET_NUMBER: {
  ------------------
  |  Branch (37438:9): [True: 12.0M, False: 81.0M]
  ------------------
37439|  12.0M|            union {
37440|  12.0M|                double d;
37441|  12.0M|                uint64_t u;
37442|  12.0M|            } as;
37443|  12.0M|            as.d = janet_unwrap_number(x);
  ------------------
  |  |  839|  12.0M|#define janet_unwrap_number(x) ((x).number)
  ------------------
37444|  12.0M|            as.d += 0.0; /* normalize negative 0 */
37445|  12.0M|            as.u = murmur64(as.u);
37446|  12.0M|            uint32_t hi = (uint32_t)(as.u >> 32);
37447|  12.0M|            hash = (int32_t)hi;
37448|  12.0M|            break;
37449|  31.9M|        }
37450|   492k|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (37450:9): [True: 492k, False: 92.6M]
  ------------------
37451|   492k|            JanetAbstract xx = janet_unwrap_abstract(x);
  ------------------
  |  |  866|   492k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
37452|   492k|            const JanetAbstractType *at = janet_abstract_type(xx);
  ------------------
  |  | 1899|   492k|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|   492k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
37453|   492k|            if (at->hash != NULL) {
  ------------------
  |  Branch (37453:17): [True: 452k, False: 39.8k]
  ------------------
37454|   452k|                hash = at->hash(xx, janet_abstract_size(xx));
  ------------------
  |  | 1900|   452k|#define janet_abstract_size(u) (janet_abstract_head(u)->size)
  |  |  ------------------
  |  |  |  | 1897|   452k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
37455|   452k|                break;
37456|   452k|            }
37457|   492k|        }
37458|       |        /* fallthrough */
37459|  16.4M|        default:
  ------------------
  |  Branch (37459:9): [True: 16.4M, False: 76.6M]
  ------------------
37460|  16.4M|            if (sizeof(double) == sizeof(void *)) {
  ------------------
  |  Branch (37460:17): [True: 16.4M, Folded]
  ------------------
37461|       |                /* Assuming 8 byte pointer (8 byte aligned) */
37462|  16.4M|                uint64_t i = murmur64(janet_u64(x));
  ------------------
  |  |  788|  16.4M|#define janet_u64(x) ((x).u64)
  ------------------
37463|  16.4M|                hash = (int32_t)(i >> 32);
37464|  16.4M|            } else {
37465|       |                /* Assuming 4 byte pointer (or smaller) */
37466|      0|                uintptr_t diff = (uintptr_t) janet_unwrap_pointer(x);
  ------------------
  |  |  867|      0|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
37467|      0|                uint32_t hilo = (uint32_t) diff * 2654435769u;
37468|      0|                hash = (int32_t)((hilo << 16) | (hilo >> 16));
37469|      0|            }
37470|  16.4M|            break;
37471|  93.1M|    }
37472|  93.1M|    return hash;
37473|  93.1M|}
janet_compare:
37478|  1.44M|int janet_compare(Janet x, Janet y) {
37479|  1.44M|    janet_vm.traversal = janet_vm.traversal_base;
37480|  1.44M|    int status;
37481|  2.15M|    do {
37482|  2.15M|        JanetType tx = janet_type(x);
  ------------------
  |  |  795|  2.15M|    (isnan((x).number) \
  |  |  796|  2.15M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  2.15M|        : JANET_NUMBER)
  ------------------
  |  Branch (37482:24): [True: 1.81M, False: 339k]
  ------------------
37483|  2.15M|        JanetType ty = janet_type(y);
  ------------------
  |  |  795|  2.15M|    (isnan((x).number) \
  |  |  796|  2.15M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  2.15M|        : JANET_NUMBER)
  ------------------
  |  Branch (37483:24): [True: 2.10M, False: 56.7k]
  ------------------
37484|  2.15M|        if (tx != ty) return tx < ty ? -1 : 1;
  ------------------
  |  Branch (37484:13): [True: 942k, False: 1.21M]
  |  Branch (37484:30): [True: 474k, False: 468k]
  ------------------
37485|  1.21M|        switch (tx) {
37486|    800|            case JANET_NIL:
  ------------------
  |  Branch (37486:13): [True: 800, False: 1.21M]
  ------------------
37487|    800|                break;
37488|     18|            case JANET_BOOLEAN: {
  ------------------
  |  Branch (37488:13): [True: 18, False: 1.21M]
  ------------------
37489|     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)
  ------------------
37490|     18|                if (diff) return diff;
  ------------------
  |  Branch (37490:21): [True: 0, False: 18]
  ------------------
37491|     18|                break;
37492|     18|            }
37493|  5.48k|            case JANET_NUMBER: {
  ------------------
  |  Branch (37493:13): [True: 5.48k, False: 1.21M]
  ------------------
37494|  5.48k|                double xx = janet_unwrap_number(x);
  ------------------
  |  |  839|  5.48k|#define janet_unwrap_number(x) ((x).number)
  ------------------
37495|  5.48k|                double yy = janet_unwrap_number(y);
  ------------------
  |  |  839|  5.48k|#define janet_unwrap_number(x) ((x).number)
  ------------------
37496|  5.48k|                if (xx == yy) {
  ------------------
  |  Branch (37496:21): [True: 369, False: 5.11k]
  ------------------
37497|    369|                    break;
37498|  5.11k|                } else {
37499|  5.11k|                    return (xx < yy) ? -1 : 1;
  ------------------
  |  Branch (37499:28): [True: 5.01k, False: 105]
  ------------------
37500|  5.11k|                }
37501|  5.48k|            }
37502|  5.45k|            case JANET_STRING:
  ------------------
  |  Branch (37502:13): [True: 5.45k, False: 1.21M]
  ------------------
37503|   418k|            case JANET_SYMBOL:
  ------------------
  |  Branch (37503:13): [True: 412k, False: 802k]
  ------------------
37504|   687k|            case JANET_KEYWORD: {
  ------------------
  |  Branch (37504:13): [True: 269k, False: 946k]
  ------------------
37505|   687k|                int diff = janet_string_compare(janet_unwrap_string(x), janet_unwrap_string(y));
  ------------------
  |  |  863|   687k|#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|   687k|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
37506|   687k|                if (diff) return diff;
  ------------------
  |  Branch (37506:21): [True: 352k, False: 335k]
  ------------------
37507|   335k|                break;
37508|   687k|            }
37509|   335k|            case JANET_ABSTRACT: {
  ------------------
  |  Branch (37509:13): [True: 17.5k, False: 1.19M]
  ------------------
37510|  17.5k|                int diff = janet_compare_abstract(janet_unwrap_abstract(x), janet_unwrap_abstract(y));
  ------------------
  |  |  866|  17.5k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
                              int diff = janet_compare_abstract(janet_unwrap_abstract(x), janet_unwrap_abstract(y));
  ------------------
  |  |  866|  17.5k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
37511|  17.5k|                if (diff) return diff;
  ------------------
  |  Branch (37511:21): [True: 17.4k, False: 112]
  ------------------
37512|    112|                break;
37513|  17.5k|            }
37514|  19.6k|            default: {
  ------------------
  |  Branch (37514:13): [True: 19.6k, False: 1.19M]
  ------------------
37515|  19.6k|                if (janet_unwrap_pointer(x) == janet_unwrap_pointer(y)) {
  ------------------
  |  |  867|  19.6k|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
                              if (janet_unwrap_pointer(x) == janet_unwrap_pointer(y)) {
  ------------------
  |  |  867|  19.6k|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (37515:21): [True: 0, False: 19.6k]
  ------------------
37516|      0|                    break;
37517|  19.6k|                } else {
37518|  19.6k|                    return janet_unwrap_pointer(x) > janet_unwrap_pointer(y) ? 1 : -1;
  ------------------
  |  |  867|  19.6k|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
                                  return janet_unwrap_pointer(x) > janet_unwrap_pointer(y) ? 1 : -1;
  ------------------
  |  |  867|  19.6k|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (37518:28): [True: 4.09k, False: 15.5k]
  ------------------
37519|  19.6k|                }
37520|  19.6k|            }
37521|   461k|            case JANET_TUPLE: {
  ------------------
  |  Branch (37521:13): [True: 461k, False: 754k]
  ------------------
37522|   461k|                const Janet *lhs = janet_unwrap_tuple(x);
  ------------------
  |  |  858|   461k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
37523|   461k|                const Janet *rhs = janet_unwrap_tuple(y);
  ------------------
  |  |  858|   461k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
37524|   461k|                if (JANET_TUPLE_FLAG_BRACKETCTOR & (janet_tuple_flag(lhs) ^ janet_tuple_flag(rhs))) {
  ------------------
  |  | 1798|   461k|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
                              if (JANET_TUPLE_FLAG_BRACKETCTOR & (janet_tuple_flag(lhs) ^ janet_tuple_flag(rhs))) {
  ------------------
  |  | 1806|   461k|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1800|   461k|#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|   461k|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1800|   461k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (37524:21): [True: 74.2k, False: 387k]
  ------------------
37525|  74.2k|                    return (janet_tuple_flag(lhs) & JANET_TUPLE_FLAG_BRACKETCTOR) ? 1 : -1;
  ------------------
  |  | 1806|  74.2k|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1800|  74.2k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                                  return (janet_tuple_flag(lhs) & JANET_TUPLE_FLAG_BRACKETCTOR) ? 1 : -1;
  ------------------
  |  | 1798|  74.2k|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
  |  Branch (37525:28): [True: 4.94k, False: 69.3k]
  ------------------
37526|  74.2k|                }
37527|   387k|                push_traversal_node(janet_tuple_head(lhs), janet_tuple_head(rhs), 1);
  ------------------
  |  | 1800|   387k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  ------------------
                              push_traversal_node(janet_tuple_head(lhs), janet_tuple_head(rhs), 1);
  ------------------
  |  | 1800|   387k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  ------------------
37528|   387k|                break;
37529|   461k|            }
37530|  22.6k|            case JANET_STRUCT: {
  ------------------
  |  Branch (37530:13): [True: 22.6k, False: 1.19M]
  ------------------
37531|  22.6k|                const JanetKV *lhs = janet_unwrap_struct(x);
  ------------------
  |  |  857|  22.6k|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
37532|  22.6k|                const JanetKV *rhs = janet_unwrap_struct(y);
  ------------------
  |  |  857|  22.6k|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
37533|  22.6k|                int32_t llen = janet_struct_capacity(lhs);
  ------------------
  |  | 1849|  22.6k|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1846|  22.6k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
37534|  22.6k|                int32_t rlen = janet_struct_capacity(rhs);
  ------------------
  |  | 1849|  22.6k|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1846|  22.6k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
37535|  22.6k|                int32_t lhash = janet_struct_hash(lhs);
  ------------------
  |  | 1850|  22.6k|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1846|  22.6k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
37536|  22.6k|                int32_t rhash = janet_struct_hash(rhs);
  ------------------
  |  | 1850|  22.6k|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1846|  22.6k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
37537|  22.6k|                if (llen < rlen) return -1;
  ------------------
  |  Branch (37537:21): [True: 4.97k, False: 17.6k]
  ------------------
37538|  17.6k|                if (llen > rlen) return 1;
  ------------------
  |  Branch (37538:21): [True: 7.39k, False: 10.2k]
  ------------------
37539|  10.2k|                if (lhash < rhash) return -1;
  ------------------
  |  Branch (37539:21): [True: 4.98k, False: 5.31k]
  ------------------
37540|  5.31k|                if (lhash > rhash) return 1;
  ------------------
  |  Branch (37540:21): [True: 5.00k, False: 304]
  ------------------
37541|    304|                push_traversal_node(janet_struct_head(lhs), janet_struct_head(rhs), 0);
  ------------------
  |  | 1846|    304|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  ------------------
                              push_traversal_node(janet_struct_head(lhs), janet_struct_head(rhs), 0);
  ------------------
  |  | 1846|    304|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  ------------------
37542|    304|                break;
37543|  5.31k|            }
37544|  1.21M|        }
37545|  1.21M|    } while (!(status = traversal_next(&x, &y)));
  ------------------
  |  Branch (37545:14): [True: 710k, False: 14.4k]
  ------------------
37546|  14.4k|    return status - 2;
37547|  1.44M|}
janet_v_grow:
37951|   211k|void *janet_v_grow(void *v, int32_t increment, int32_t itemsize) {
37952|   211k|    int32_t dbl_cur = (NULL != v) ? 2 * janet_v__cap(v) : 0;
  ------------------
  |  |  765|   189k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  ------------------
  |  |  |  |  764|   189k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  ------------------
  |  Branch (37952:23): [True: 189k, False: 22.7k]
  ------------------
37953|   211k|    int32_t min_needed = janet_v_count(v) + increment;
  ------------------
  |  |  759|   211k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  766|   189k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|   189k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (759:34): [True: 189k, False: 22.7k]
  |  |  ------------------
  ------------------
37954|   211k|    int32_t m = dbl_cur > min_needed ? dbl_cur : min_needed;
  ------------------
  |  Branch (37954:17): [True: 166k, False: 45.2k]
  ------------------
37955|   211k|    size_t newsize = ((size_t) itemsize) * m + sizeof(int32_t) * 2;
37956|   211k|    int32_t *p = (int32_t *) janet_srealloc(v ? janet_v__raw(v) : 0, newsize);
  ------------------
  |  |  764|   189k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  ------------------
  |  Branch (37956:45): [True: 189k, False: 22.7k]
  ------------------
37957|   211k|    if (!v) p[1] = 0;
  ------------------
  |  Branch (37957:9): [True: 22.7k, False: 189k]
  ------------------
37958|   211k|    p[0] = m;
37959|   211k|    return p + 2;
37960|   211k|}
janet_try_init:
39467|  4.64k|void janet_try_init(JanetTryState *state) {
39468|  4.64k|    state->stackn = janet_vm.stackn++;
39469|  4.64k|    state->gc_handle = janet_vm.gc_suspend;
39470|  4.64k|    state->vm_fiber = janet_vm.fiber;
39471|  4.64k|    state->vm_jmp_buf = janet_vm.signal_buf;
39472|  4.64k|    state->vm_return_reg = janet_vm.return_reg;
39473|  4.64k|    state->coerce_error = janet_vm.coerce_error;
39474|  4.64k|    janet_vm.return_reg = &(state->payload);
39475|  4.64k|    janet_vm.signal_buf = &(state->buf);
39476|  4.64k|    janet_vm.coerce_error = 0;
39477|  4.64k|}
janet_restore:
39479|  4.64k|void janet_restore(JanetTryState *state) {
39480|  4.64k|    janet_vm.stackn = state->stackn;
39481|  4.64k|    janet_vm.gc_suspend = state->gc_handle;
39482|  4.64k|    janet_vm.fiber = state->vm_fiber;
39483|  4.64k|    janet_vm.signal_buf = state->vm_jmp_buf;
39484|  4.64k|    janet_vm.return_reg = state->vm_return_reg;
39485|  4.64k|    janet_vm.coerce_error = state->coerce_error;
39486|  4.64k|}
janet_init:
39641|  6.64k|int janet_init(void) {
39642|       |
39643|       |    /* Garbage collection */
39644|  6.64k|    janet_vm.blocks = NULL;
39645|  6.64k|    janet_vm.weak_blocks = NULL;
39646|  6.64k|    janet_vm.next_collection = 0;
39647|  6.64k|    janet_vm.gc_interval = 0x400000;
39648|  6.64k|    janet_vm.block_count = 0;
39649|  6.64k|    janet_vm.gc_mark_phase = 0;
39650|       |
39651|  6.64k|    janet_symcache_init();
39652|       |
39653|       |    /* Initialize gc roots */
39654|  6.64k|    janet_vm.roots = NULL;
39655|  6.64k|    janet_vm.root_count = 0;
39656|  6.64k|    janet_vm.root_capacity = 0;
39657|       |
39658|       |    /* Scratch memory */
39659|  6.64k|    janet_vm.user = NULL;
39660|  6.64k|    janet_vm.scratch_mem = NULL;
39661|  6.64k|    janet_vm.scratch_len = 0;
39662|  6.64k|    janet_vm.scratch_cap = 0;
39663|       |
39664|       |    /* Sandbox flags */
39665|  6.64k|    janet_vm.sandbox_flags = 0;
39666|       |
39667|       |    /* Initialize registry */
39668|  6.64k|    janet_vm.registry = NULL;
39669|  6.64k|    janet_vm.registry_cap = 0;
39670|  6.64k|    janet_vm.registry_count = 0;
39671|  6.64k|    janet_vm.registry_dirty = 0;
39672|       |
39673|       |    /* Initialize abstract registry */
39674|  6.64k|    janet_vm.abstract_registry = janet_table(0);
39675|  6.64k|    janet_gcroot(janet_wrap_table(janet_vm.abstract_registry));
  ------------------
  |  |  846|  6.64k|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  825|  6.64k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  6.64k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  6.64k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39676|       |
39677|       |    /* Traversal */
39678|  6.64k|    janet_vm.traversal = NULL;
39679|  6.64k|    janet_vm.traversal_base = NULL;
39680|  6.64k|    janet_vm.traversal_top = NULL;
39681|       |
39682|       |    /* Core env */
39683|  6.64k|    janet_vm.core_env = NULL;
39684|       |
39685|       |    /* Auto suspension */
39686|  6.64k|    janet_vm.auto_suspend = 0;
39687|       |
39688|       |    /* Dynamic bindings */
39689|  6.64k|    janet_vm.top_dyns = NULL;
39690|       |
39691|       |    /* Seed RNG */
39692|  6.64k|    janet_rng_seed(janet_default_rng(), 0);
39693|       |
39694|       |    /* Fibers */
39695|  6.64k|    janet_vm.fiber = NULL;
39696|  6.64k|    janet_vm.root_fiber = NULL;
39697|  6.64k|    janet_vm.stackn = 0;
39698|       |
39699|  6.64k|#ifdef JANET_EV
39700|  6.64k|    janet_ev_init();
39701|  6.64k|#endif
39702|  6.64k|#ifdef JANET_NET
39703|  6.64k|    janet_net_init();
39704|  6.64k|#endif
39705|  6.64k|    return 0;
39706|  6.64k|}
janet_deinit:
39721|  6.64k|void janet_deinit(void) {
39722|  6.64k|    janet_clear_memory();
39723|  6.64k|    janet_symcache_deinit();
39724|  6.64k|    janet_free(janet_vm.roots);
  ------------------
  |  | 2415|  6.64k|#define janet_free(X) free((X))
  ------------------
39725|  6.64k|    janet_vm.roots = NULL;
39726|  6.64k|    janet_vm.root_count = 0;
39727|  6.64k|    janet_vm.root_capacity = 0;
39728|  6.64k|    janet_vm.abstract_registry = NULL;
39729|  6.64k|    janet_vm.core_env = NULL;
39730|  6.64k|    janet_vm.top_dyns = NULL;
39731|  6.64k|    janet_vm.user = NULL;
39732|  6.64k|    janet_free(janet_vm.traversal_base);
  ------------------
  |  | 2415|  6.64k|#define janet_free(X) free((X))
  ------------------
39733|  6.64k|    janet_vm.fiber = NULL;
39734|  6.64k|    janet_vm.root_fiber = NULL;
39735|  6.64k|    janet_free(janet_vm.registry);
  ------------------
  |  | 2415|  6.64k|#define janet_free(X) free((X))
  ------------------
39736|       |    janet_vm.registry = NULL;
39737|  6.64k|#ifdef JANET_EV
39738|  6.64k|    janet_ev_deinit();
39739|  6.64k|#endif
39740|  6.64k|#ifdef JANET_NET
39741|  6.64k|    janet_net_deinit();
39742|  6.64k|#endif
39743|  6.64k|}
janet_memalloc_empty:
39911|  8.84M|void *janet_memalloc_empty(int32_t count) {
39912|  8.84M|    int32_t i;
39913|  8.84M|    void *mem = array_allocate(sizeof(JanetKV), count);
39914|  8.84M|    janet_vm.next_collection += (size_t) count * sizeof(JanetKV);
39915|  8.84M|    if (NULL == mem) {
  ------------------
  |  Branch (39915:9): [True: 0, False: 8.84M]
  ------------------
39916|      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]
  |  |  ------------------
  ------------------
39917|      0|    }
39918|  8.84M|    JanetKV *mmem = (JanetKV *)mem;
39919|   139M|    for (i = 0; i < count; i++) {
  ------------------
  |  Branch (39919:17): [True: 130M, False: 8.84M]
  ------------------
39920|   130M|        JanetKV *kv = mmem + i;
39921|   130M|        kv->key = janet_wrap_nil();
  ------------------
  |  |  831|   130M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   130M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   130M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   130M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39922|   130M|        kv->value = janet_wrap_nil();
  ------------------
  |  |  831|   130M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   130M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   130M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   130M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39923|   130M|    }
39924|  8.84M|    return mem;
39925|  8.84M|}
janet_memempty:
39927|  50.5k|void janet_memempty(JanetKV *mem, int32_t count) {
39928|  50.5k|    int32_t i;
39929|   877k|    for (i = 0; i < count; i++) {
  ------------------
  |  Branch (39929:17): [True: 827k, False: 50.5k]
  ------------------
39930|   827k|        mem[i].key = janet_wrap_nil();
  ------------------
  |  |  831|   827k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   827k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   827k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   827k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39931|   827k|        mem[i].value = janet_wrap_nil();
  ------------------
  |  |  831|   827k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   827k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   827k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   827k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39932|   827k|    }
39933|  50.5k|}
janet_wrap_number_safe:
39937|  46.5k|Janet janet_wrap_number_safe(double d) {
39938|  46.5k|    Janet ret;
39939|  46.5k|    ret.number = isnan(d) ? NAN : d;
  ------------------
  |  Branch (39939:18): [True: 6.64k, False: 39.8k]
  ------------------
39940|  46.5k|    return ret;
39941|  46.5k|}
janet_nanbox_to_pointer:
39943|   340M|void *janet_nanbox_to_pointer(Janet x) {
39944|   340M|    x.i64 &= JANET_NANBOX_PAYLOADBITS;
  ------------------
  |  |  791|   340M|#define JANET_NANBOX_PAYLOADBITS 0x00007FFFFFFFFFFFllu
  ------------------
39945|   340M|    x.u64 <<= JANET_NANBOX_64_POINTER_SHIFT; /* Alignment, usually 0 */
  ------------------
  |  |  341|   340M|#define JANET_NANBOX_64_POINTER_SHIFT 0
  ------------------
39946|   340M|    return x.pointer;
39947|   340M|}
janet_nanbox_from_pointer:
39949|  9.86M|Janet janet_nanbox_from_pointer(void *p, uint64_t tagmask) {
39950|  9.86M|    Janet ret;
39951|  9.86M|    ret.pointer = p;
39952|       |    /* Should be noop when pointer shift is 0 */
39953|       |    /*
39954|       |    janet_assert(!(ret.u64 & (uint64_t) ((1 << JANET_NANBOX_64_POINTER_SHIFT) - 1)), "unaligned pointer wrap");
39955|       |    */
39956|  9.86M|    ret.u64 >>= JANET_NANBOX_64_POINTER_SHIFT; /* Alignment, usually 0 */
  ------------------
  |  |  341|  9.86M|#define JANET_NANBOX_64_POINTER_SHIFT 0
  ------------------
39957|  9.86M|    ret.u64 |= tagmask;
39958|  9.86M|    return ret;
39959|  9.86M|}
janet_nanbox_from_cpointer:
39961|  46.7M|Janet janet_nanbox_from_cpointer(const void *p, uint64_t tagmask) {
39962|  46.7M|    Janet ret;
39963|  46.7M|    ret.pointer = (void *)p;
39964|       |    /* Should be noop when pointer shift is 0 */
39965|       |    /*
39966|       |    janet_assert(!(ret.u64 & (uint64_t) ((1 << JANET_NANBOX_64_POINTER_SHIFT) - 1)), "unaligned pointer wrap");
39967|       |    */
39968|  46.7M|    ret.u64 >>= JANET_NANBOX_64_POINTER_SHIFT; /* Alignment, usually 0 */
  ------------------
  |  |  341|  46.7M|#define JANET_NANBOX_64_POINTER_SHIFT 0
  ------------------
39969|  46.7M|    ret.u64 |= tagmask;
39970|  46.7M|    return ret;
39971|  46.7M|}
janet_nanbox_from_double:
39973|   108M|Janet janet_nanbox_from_double(double d) {
39974|   108M|    Janet ret;
39975|   108M|    ret.number = d;
39976|   108M|    return ret;
39977|   108M|}
janet_nanbox_from_bits:
39979|   761M|Janet janet_nanbox_from_bits(uint64_t bits) {
39980|   761M|    Janet ret;
39981|   761M|    ret.u64 = bits;
39982|   761M|    return ret;
39983|   761M|}
janet.c:janet_array_impl:
 1606|  24.2k|static void janet_array_impl(JanetArray *array, int32_t capacity) {
 1607|  24.2k|    Janet *data = NULL;
 1608|  24.2k|    if (capacity > 0) {
  ------------------
  |  Branch (1608:9): [True: 20.1k, False: 4.15k]
  ------------------
 1609|  20.1k|        janet_vm.next_collection += capacity * sizeof(Janet);
 1610|  20.1k|        data = (Janet *) array_allocate(sizeof(Janet), capacity);
 1611|  20.1k|        if (NULL == data) {
  ------------------
  |  Branch (1611:13): [True: 0, False: 20.1k]
  ------------------
 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|  20.1k|    }
 1615|  24.2k|    array->count = 0;
 1616|  24.2k|    array->capacity = capacity;
 1617|  24.2k|    array->data = data;
 1618|  24.2k|}
janet.c:janet_buffer_init_impl:
 3196|  10.2M|static JanetBuffer *janet_buffer_init_impl(JanetBuffer *buffer, int32_t capacity) {
 3197|  10.2M|    uint8_t *data = NULL;
 3198|  10.2M|    if (capacity < 4) capacity = 4;
  ------------------
  |  Branch (3198:9): [True: 7.10k, False: 10.2M]
  ------------------
 3199|  10.2M|    janet_gcpressure(capacity);
 3200|  10.2M|    data = array_allocate(sizeof(uint8_t), capacity);
 3201|  10.2M|    if (NULL == data) {
  ------------------
  |  Branch (3201:9): [True: 0, False: 10.2M]
  ------------------
 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|  10.2M|    buffer->count = 0;
 3205|  10.2M|    buffer->capacity = capacity;
 3206|  10.2M|    buffer->data = data;
 3207|  10.2M|    return buffer;
 3208|  10.2M|}
janet.c:janet_buffer_can_realloc:
 3189|  10.2M|static void janet_buffer_can_realloc(JanetBuffer *buffer) {
 3190|  10.2M|    if (buffer->gc.flags & JANET_BUFFER_FLAG_NO_REALLOC) {
  ------------------
  |  | 1780|  10.2M|#define JANET_BUFFER_FLAG_NO_REALLOC 0x10000
  ------------------
  |  Branch (3190:9): [True: 0, False: 10.2M]
  ------------------
 3191|      0|        janet_panic("buffer cannot reallocate foreign memory");
 3192|      0|    }
 3193|  10.2M|}
janet.c:janet_load_libs:
 9378|  6.64k|static void janet_load_libs(JanetTable *env) {
 9379|  6.64k|    JanetRegExt corelib_cfuns[] = {
 9380|  6.64k|        JANET_CORE_REG("native", janet_core_native),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9381|  6.64k|        JANET_CORE_REG("describe", janet_core_describe),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9382|  6.64k|        JANET_CORE_REG("string", janet_core_string),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9383|  6.64k|        JANET_CORE_REG("symbol", janet_core_symbol),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9384|  6.64k|        JANET_CORE_REG("keyword", janet_core_keyword),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9385|  6.64k|        JANET_CORE_REG("buffer", janet_core_buffer),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9386|  6.64k|        JANET_CORE_REG("abstract?", janet_core_is_abstract),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9387|  6.64k|        JANET_CORE_REG("table", janet_core_table),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9388|  6.64k|        JANET_CORE_REG("array", janet_core_array),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9389|  6.64k|        JANET_CORE_REG("scan-number", janet_core_scannumber),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9390|  6.64k|        JANET_CORE_REG("tuple", janet_core_tuple),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9391|  6.64k|        JANET_CORE_REG("struct", janet_core_struct),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9392|  6.64k|        JANET_CORE_REG("gensym", janet_core_gensym),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9393|  6.64k|        JANET_CORE_REG("gccollect", janet_core_gccollect),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9394|  6.64k|        JANET_CORE_REG("gcsetinterval", janet_core_gcsetinterval),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9395|  6.64k|        JANET_CORE_REG("gcinterval", janet_core_gcinterval),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9396|  6.64k|        JANET_CORE_REG("type", janet_core_type),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9397|  6.64k|        JANET_CORE_REG("hash", janet_core_hash),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9398|  6.64k|        JANET_CORE_REG("getline", janet_core_getline),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9399|  6.64k|        JANET_CORE_REG("dyn", janet_core_dyn),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9400|  6.64k|        JANET_CORE_REG("setdyn", janet_core_setdyn),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9401|  6.64k|        JANET_CORE_REG("trace", janet_core_trace),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9402|  6.64k|        JANET_CORE_REG("untrace", janet_core_untrace),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9403|  6.64k|        JANET_CORE_REG("module/expand-path", janet_core_expand_path),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9404|  6.64k|        JANET_CORE_REG("int?", janet_core_check_int),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9405|  6.64k|        JANET_CORE_REG("nat?", janet_core_check_nat),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9406|  6.64k|        JANET_CORE_REG("bytes?", janet_core_is_bytes),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9407|  6.64k|        JANET_CORE_REG("indexed?", janet_core_is_indexed),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9408|  6.64k|        JANET_CORE_REG("dictionary?", janet_core_is_dictionary),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9409|  6.64k|        JANET_CORE_REG("lengthable?", janet_core_is_lengthable),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9410|  6.64k|        JANET_CORE_REG("slice", janet_core_slice),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9411|  6.64k|        JANET_CORE_REG("range", janet_core_range),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9412|  6.64k|        JANET_CORE_REG("signal", janet_core_signal),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9413|  6.64k|        JANET_CORE_REG("memcmp", janet_core_memcmp),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9414|  6.64k|        JANET_CORE_REG("getproto", janet_core_getproto),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9415|  6.64k|        JANET_CORE_REG("sandbox", janet_core_sandbox),
  ------------------
  |  |  518|  6.64k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.64k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9416|  6.64k|        JANET_REG_END
  ------------------
  |  | 2110|  6.64k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
 9417|  6.64k|    };
 9418|       |    janet_core_cfuns_ext(env, NULL, corelib_cfuns);
 9419|  6.64k|    janet_lib_io(env);
 9420|  6.64k|    janet_lib_math(env);
 9421|  6.64k|    janet_lib_array(env);
 9422|  6.64k|    janet_lib_tuple(env);
 9423|  6.64k|    janet_lib_buffer(env);
 9424|  6.64k|    janet_lib_table(env);
 9425|  6.64k|    janet_lib_struct(env);
 9426|  6.64k|    janet_lib_fiber(env);
 9427|  6.64k|    janet_lib_os(env);
 9428|  6.64k|    janet_lib_parse(env);
 9429|  6.64k|    janet_lib_compile(env);
 9430|  6.64k|    janet_lib_debug(env);
 9431|  6.64k|    janet_lib_string(env);
 9432|  6.64k|    janet_lib_marsh(env);
 9433|  6.64k|#ifdef JANET_PEG
 9434|  6.64k|    janet_lib_peg(env);
 9435|  6.64k|#endif
 9436|  6.64k|#ifdef JANET_ASSEMBLER
 9437|  6.64k|    janet_lib_asm(env);
 9438|  6.64k|#endif
 9439|  6.64k|#ifdef JANET_INT_TYPES
 9440|  6.64k|    janet_lib_inttypes(env);
 9441|  6.64k|#endif
 9442|  6.64k|#ifdef JANET_EV
 9443|  6.64k|    janet_lib_ev(env);
 9444|  6.64k|#ifdef JANET_FILEWATCH
 9445|  6.64k|    janet_lib_filewatch(env);
 9446|  6.64k|#endif
 9447|  6.64k|#endif
 9448|  6.64k|#ifdef JANET_NET
 9449|  6.64k|    janet_lib_net(env);
 9450|  6.64k|#endif
 9451|  6.64k|#ifdef JANET_FFI
 9452|  6.64k|    janet_lib_ffi(env);
 9453|  6.64k|#endif
 9454|  6.64k|}
janet.c:janet_q_init:
10696|  6.64k|static void janet_q_init(JanetQueue *q) {
10697|       |    q->data = NULL;
10698|  6.64k|    q->head = 0;
10699|  6.64k|    q->tail = 0;
10700|  6.64k|    q->capacity = 0;
10701|  6.64k|}
janet.c:peek_timeout:
10778|  6.64k|static int peek_timeout(JanetTimeout *out) {
10779|  6.64k|    if (janet_vm.tq_count == 0) return 0;
  ------------------
  |  Branch (10779:9): [True: 6.64k, False: 0]
  ------------------
10780|      0|    *out = janet_vm.tq[0];
10781|      0|    return 1;
10782|  6.64k|}
janet.c:janet_q_deinit:
10703|  6.64k|static void janet_q_deinit(JanetQueue *q) {
10704|  6.64k|    janet_free(q->data);
  ------------------
  |  | 2415|  6.64k|#define janet_free(X) free((X))
  ------------------
10705|  6.64k|}
janet.c:janet_ev_setup_selfpipe:
12265|  6.64k|static void janet_ev_setup_selfpipe(void) {
12266|  6.64k|    if (janet_make_pipe(janet_vm.selfpipe, 1)) {
  ------------------
  |  Branch (12266:9): [True: 0, False: 6.64k]
  ------------------
12267|       |        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]
  |  |  ------------------
  ------------------
12268|      0|    }
12269|  6.64k|}
janet.c:janet_ev_cleanup_selfpipe:
12288|  6.64k|static void janet_ev_cleanup_selfpipe(void) {
12289|  6.64k|    close(janet_vm.selfpipe[0]);
12290|  6.64k|    close(janet_vm.selfpipe[1]);
12291|  6.64k|}
janet.c:janet_deinit_block:
18295|  52.2M|static void janet_deinit_block(JanetGCObject *mem) {
18296|  52.2M|    switch (mem->flags & JANET_MEM_TYPEBITS) {
  ------------------
  |  |  675|  52.2M|#define JANET_MEM_TYPEBITS 0xFF
  ------------------
18297|  27.8M|        default:
  ------------------
  |  Branch (18297:9): [True: 27.8M, False: 24.3M]
  ------------------
18298|  30.4M|        case JANET_MEMORY_FUNCTION:
  ------------------
  |  Branch (18298:9): [True: 2.54M, False: 49.7M]
  ------------------
18299|  30.4M|            break; /* Do nothing for non gc types */
18300|  13.2M|        case JANET_MEMORY_SYMBOL:
  ------------------
  |  Branch (18300:9): [True: 13.2M, False: 38.9M]
  ------------------
18301|  13.2M|            janet_symbol_deinit(((JanetStringHead *) mem)->data);
18302|  13.2M|            break;
18303|  24.2k|        case JANET_MEMORY_ARRAY:
  ------------------
  |  Branch (18303:9): [True: 24.2k, False: 52.2M]
  ------------------
18304|  24.2k|        case JANET_MEMORY_ARRAY_WEAK:
  ------------------
  |  Branch (18304:9): [True: 0, False: 52.2M]
  ------------------
18305|  24.2k|            janet_free(((JanetArray *) mem)->data);
  ------------------
  |  | 2415|  24.2k|#define janet_free(X) free((X))
  ------------------
18306|  24.2k|            break;
18307|  4.88M|        case JANET_MEMORY_TABLE:
  ------------------
  |  Branch (18307:9): [True: 4.88M, False: 47.3M]
  ------------------
18308|  4.88M|        case JANET_MEMORY_TABLE_WEAKK:
  ------------------
  |  Branch (18308:9): [True: 0, False: 52.2M]
  ------------------
18309|  4.88M|        case JANET_MEMORY_TABLE_WEAKV:
  ------------------
  |  Branch (18309:9): [True: 0, False: 52.2M]
  ------------------
18310|  4.88M|        case JANET_MEMORY_TABLE_WEAKKV:
  ------------------
  |  Branch (18310:9): [True: 0, False: 52.2M]
  ------------------
18311|  4.88M|            janet_free(((JanetTable *) mem)->data);
  ------------------
  |  | 2415|  4.88M|#define janet_free(X) free((X))
  ------------------
18312|  4.88M|            break;
18313|      0|        case JANET_MEMORY_FIBER: {
  ------------------
  |  Branch (18313:9): [True: 0, False: 52.2M]
  ------------------
18314|      0|            JanetFiber *f = (JanetFiber *)mem;
18315|      0|#ifdef JANET_EV
18316|      0|            if (f->ev_state && !(f->flags & JANET_FIBER_EV_FLAG_IN_FLIGHT)) {
  ------------------
  |  |  847|      0|#define JANET_FIBER_EV_FLAG_IN_FLIGHT 0x1
  ------------------
  |  Branch (18316:17): [True: 0, False: 0]
  |  Branch (18316:32): [True: 0, False: 0]
  ------------------
18317|      0|                janet_ev_dec_refcount();
18318|      0|                janet_free(f->ev_state);
  ------------------
  |  | 2415|      0|#define janet_free(X) free((X))
  ------------------
18319|      0|            } else if (f->gc.flags & JANET_FIBER_EV_GCFLAG_SUSPENDED) {
  ------------------
  |  |  843|      0|#define JANET_FIBER_EV_GCFLAG_SUSPENDED 0x2000000
  ------------------
  |  Branch (18319:24): [True: 0, False: 0]
  ------------------
18320|      0|                janet_ev_dec_refcount();
18321|      0|            }
18322|      0|#endif
18323|      0|            janet_free(f->data);
  ------------------
  |  | 2415|      0|#define janet_free(X) free((X))
  ------------------
18324|      0|        }
18325|      0|        break;
18326|  12.5k|        case JANET_MEMORY_BUFFER:
  ------------------
  |  Branch (18326:9): [True: 12.5k, False: 52.2M]
  ------------------
18327|  12.5k|            janet_buffer_deinit((JanetBuffer *) mem);
18328|  12.5k|            break;
18329|  26.0k|        case JANET_MEMORY_ABSTRACT: {
  ------------------
  |  Branch (18329:9): [True: 26.0k, False: 52.2M]
  ------------------
18330|  26.0k|            JanetAbstractHead *head = (JanetAbstractHead *)mem;
18331|  26.0k|            if (head->type->gcperthread) {
  ------------------
  |  Branch (18331:17): [True: 0, False: 26.0k]
  ------------------
18332|      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]
  |  |  ------------------
  ------------------
18333|      0|            }
18334|  26.0k|            if (head->type->gc) {
  ------------------
  |  Branch (18334:17): [True: 19.9k, False: 6.14k]
  ------------------
18335|  19.9k|                janet_assert(!head->type->gc(head->data, head->size), "finalizer failed");
  ------------------
  |  |  389|  19.9k|#define janet_assert(c, m) do { \
  |  |  390|  19.9k|    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: 19.9k]
  |  |  ------------------
  |  |  391|  19.9k|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 19.9k]
  |  |  ------------------
  ------------------
18336|  19.9k|            }
18337|  26.0k|        }
18338|  26.0k|        break;
18339|  53.1k|        case JANET_MEMORY_FUNCENV: {
  ------------------
  |  Branch (18339:9): [True: 53.1k, False: 52.2M]
  ------------------
18340|  53.1k|            JanetFuncEnv *env = (JanetFuncEnv *)mem;
18341|  53.1k|            if (0 == env->offset)
  ------------------
  |  Branch (18341:17): [True: 53.1k, False: 0]
  ------------------
18342|  53.1k|                janet_free(env->as.values);
  ------------------
  |  | 2415|  53.1k|#define janet_free(X) free((X))
  ------------------
18343|  53.1k|        }
18344|  53.1k|        break;
18345|  3.55M|        case JANET_MEMORY_FUNCDEF: {
  ------------------
  |  Branch (18345:9): [True: 3.55M, False: 48.7M]
  ------------------
18346|  3.55M|            JanetFuncDef *def = (JanetFuncDef *)mem;
18347|       |            /* TODO - get this all with one alloc and one free */
18348|  3.55M|            janet_free(def->defs);
  ------------------
  |  | 2415|  3.55M|#define janet_free(X) free((X))
  ------------------
18349|  3.55M|            janet_free(def->environments);
  ------------------
  |  | 2415|  3.55M|#define janet_free(X) free((X))
  ------------------
18350|  3.55M|            janet_free(def->constants);
  ------------------
  |  | 2415|  3.55M|#define janet_free(X) free((X))
  ------------------
18351|  3.55M|            janet_free(def->bytecode);
  ------------------
  |  | 2415|  3.55M|#define janet_free(X) free((X))
  ------------------
18352|  3.55M|            janet_free(def->sourcemap);
  ------------------
  |  | 2415|  3.55M|#define janet_free(X) free((X))
  ------------------
18353|  3.55M|            janet_free(def->closure_bitset);
  ------------------
  |  | 2415|  3.55M|#define janet_free(X) free((X))
  ------------------
18354|  3.55M|            janet_free(def->symbolmap);
  ------------------
  |  | 2415|  3.55M|#define janet_free(X) free((X))
  ------------------
18355|  3.55M|        }
18356|  3.55M|        break;
18357|  52.2M|    }
18358|  52.2M|}
janet.c:janet_free_all_scratch:
18545|  6.64k|static void janet_free_all_scratch(void) {
18546|  1.18M|    for (size_t i = 0; i < janet_vm.scratch_len; i++) {
  ------------------
  |  Branch (18546:24): [True: 1.17M, False: 6.64k]
  ------------------
18547|  1.17M|        free_one_scratch(janet_vm.scratch_mem[i]);
18548|  1.17M|    }
18549|  6.64k|    janet_vm.scratch_len = 0;
18550|  6.64k|}
janet.c:janet_mem2scratch:
18552|  11.4M|static JanetScratch *janet_mem2scratch(void *mem) {
18553|  11.4M|    JanetScratch *s = (JanetScratch *)mem;
18554|  11.4M|    return s - 1;
18555|  11.4M|}
janet.c:free_one_scratch:
18537|  12.4M|static void free_one_scratch(JanetScratch *s) {
18538|  12.4M|    if (NULL != s->finalize) {
  ------------------
  |  Branch (18538:9): [True: 0, False: 12.4M]
  ------------------
18539|      0|        s->finalize((char *) s->mem);
18540|      0|    }
18541|  12.4M|    janet_free(s);
  ------------------
  |  | 2415|  12.4M|#define janet_free(X) free((X))
  ------------------
18542|  12.4M|}
janet.c:it_s64_tostring:
18838|  17.7k|static void it_s64_tostring(void *p, JanetBuffer *buffer) {
18839|  17.7k|    char str[32];
18840|       |    snprintf(str, sizeof(str), "%" PRId64, *((int64_t *)p));
18841|  17.7k|    janet_buffer_push_cstring(buffer, str);
18842|  17.7k|}
janet.c:janet_int64_compare:
18815|  7.55k|static int janet_int64_compare(void *p1, void *p2) {
18816|  7.55k|    int64_t x = *((int64_t *)p1);
18817|  7.55k|    int64_t y = *((int64_t *)p2);
18818|  7.55k|    return x == y ? 0 : x < y ? -1 : 1;
  ------------------
  |  Branch (18818:12): [True: 101, False: 7.45k]
  |  Branch (18818:25): [True: 75, False: 7.38k]
  ------------------
18819|  7.55k|}
janet.c:janet_int64_hash:
18809|   452k|static int32_t janet_int64_hash(void *p1, size_t size) {
18810|   452k|    (void) size;
18811|   452k|    int32_t *words = p1;
18812|   452k|    return words[0] ^ words[1];
18813|   452k|}
janet.c:it_u64_tostring:
18844|   129k|static void it_u64_tostring(void *p, JanetBuffer *buffer) {
18845|   129k|    char str[32];
18846|       |    snprintf(str, sizeof(str), "%" PRIu64, *((uint64_t *)p));
18847|   129k|    janet_buffer_push_cstring(buffer, str);
18848|   129k|}
janet.c:janet_uint64_compare:
18821|  7.44k|static int janet_uint64_compare(void *p1, void *p2) {
18822|  7.44k|    uint64_t x = *((uint64_t *)p1);
18823|  7.44k|    uint64_t y = *((uint64_t *)p2);
18824|  7.44k|    return x == y ? 0 : x < y ? -1 : 1;
  ------------------
  |  Branch (18824:12): [True: 66, False: 7.38k]
  |  Branch (18824:25): [True: 78, False: 7.30k]
  ------------------
18825|  7.44k|}
janet.c:makef:
19567|  19.9k|static void *makef(FILE *f, int32_t flags, size_t bufsize) {
19568|  19.9k|    JanetFile *iof = (JanetFile *) janet_abstract(&janet_file_type, sizeof(JanetFile));
19569|  19.9k|    iof->file = f;
19570|  19.9k|    iof->flags = flags;
19571|  19.9k|    iof->vbufsize = bufsize;
19572|  19.9k|#if !(defined(JANET_WINDOWS) || defined(JANET_PLAN9))
19573|       |    /* While we would like fopen to set cloexec by default (like O_CLOEXEC) with the e flag, that is
19574|       |     * not standard. */
19575|  19.9k|    if (!(flags & JANET_FILE_NOT_CLOSEABLE))
  ------------------
  |  | 2278|  19.9k|#define JANET_FILE_NOT_CLOSEABLE 16
  ------------------
  |  Branch (19575:9): [True: 0, False: 19.9k]
  ------------------
19576|      0|        fcntl(fileno(f), F_SETFD, FD_CLOEXEC);
19577|  19.9k|#endif
19578|  19.9k|    return iof;
19579|  19.9k|}
janet.c:cfun_io_gc:
19775|  19.9k|static int cfun_io_gc(void *p, size_t len) {
19776|  19.9k|    (void) len;
19777|  19.9k|    JanetFile *iof = (JanetFile *)p;
19778|  19.9k|    janet_file_close(iof);
19779|  19.9k|    return 0;
19780|  19.9k|}
janet.c:readint:
21059|   450M|static int32_t readint(UnmarshalState *st, const uint8_t **atdata) {
21060|   450M|    const uint8_t *data = *atdata;
21061|   450M|    int32_t ret;
21062|   450M|    MARSH_EOS(st, data);
  ------------------
  |  |21054|   450M|#define MARSH_EOS(st, data) do { \
  |  |21055|   450M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21055:9): [True: 0, False: 450M]
  |  |  ------------------
  |  |21056|   450M|} while (0)
  |  |  ------------------
  |  |  |  Branch (21056:10): [Folded, False: 450M]
  |  |  ------------------
  ------------------
21063|   450M|    if (*data < 128) {
  ------------------
  |  Branch (21063:9): [True: 367M, False: 83.5M]
  ------------------
21064|   367M|        ret = *data++;
21065|   367M|    } else if (*data < 192) {
  ------------------
  |  Branch (21065:16): [True: 78.9M, False: 4.68M]
  ------------------
21066|  78.9M|        MARSH_EOS(st, data + 1);
  ------------------
  |  |21054|  78.9M|#define MARSH_EOS(st, data) do { \
  |  |21055|  78.9M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21055:9): [True: 0, False: 78.9M]
  |  |  ------------------
  |  |21056|  78.9M|} while (0)
  |  |  ------------------
  |  |  |  Branch (21056:10): [Folded, False: 78.9M]
  |  |  ------------------
  ------------------
21067|  78.9M|        uint32_t uret = ((data[0] & 0x3F) << 8) + data[1];
21068|       |        /* Sign extend 18 MSBs */
21069|  78.9M|        uret |= (uret >> 13) ? 0xFFFFC000 : 0;
  ------------------
  |  Branch (21069:17): [True: 22.0M, False: 56.8M]
  ------------------
21070|  78.9M|        ret = (int32_t)uret;
21071|  78.9M|        data += 2;
21072|  78.9M|    } else if (*data == LB_INTEGER) {
  ------------------
  |  Branch (21072:16): [True: 4.68M, False: 0]
  ------------------
21073|  4.68M|        MARSH_EOS(st, data + 4);
  ------------------
  |  |21054|  4.68M|#define MARSH_EOS(st, data) do { \
  |  |21055|  4.68M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21055:9): [True: 0, False: 4.68M]
  |  |  ------------------
  |  |21056|  4.68M|} while (0)
  |  |  ------------------
  |  |  |  Branch (21056:10): [Folded, False: 4.68M]
  |  |  ------------------
  ------------------
21074|  4.68M|        uint32_t ui = ((uint32_t)(data[1]) << 24) |
21075|  4.68M|                      ((uint32_t)(data[2]) << 16) |
21076|  4.68M|                      ((uint32_t)(data[3]) << 8) |
21077|  4.68M|                      (uint32_t)(data[4]);
21078|  4.68M|        ret = (int32_t)ui;
21079|  4.68M|        data += 5;
21080|  4.68M|    } else {
21081|      0|        janet_panicf("expected integer, got byte %x at index %d",
21082|      0|                     *data,
21083|      0|                     data - st->start);
21084|      0|        ret = 0;
21085|      0|    }
21086|   450M|    *atdata = data;
21087|   450M|    return ret;
21088|   450M|}
janet.c:unmarshal_one:
21668|   120M|    int flags) {
21669|   120M|    uint8_t lead;
21670|   120M|    MARSH_STACKCHECK;
  ------------------
  |  |20526|   120M|#define MARSH_STACKCHECK if ((flags & 0xFFFF) > JANET_RECURSION_GUARD) janet_panic("stack overflow")
  |  |  ------------------
  |  |  |  |  296|   120M|#define JANET_RECURSION_GUARD 1024
  |  |  ------------------
  |  |  |  Branch (20526:30): [True: 0, False: 120M]
  |  |  ------------------
  ------------------
21671|   120M|    MARSH_EOS(st, data);
  ------------------
  |  |21054|   120M|#define MARSH_EOS(st, data) do { \
  |  |21055|   120M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21055:9): [True: 0, False: 120M]
  |  |  ------------------
  |  |21056|   120M|} while (0)
  |  |  ------------------
  |  |  |  Branch (21056:10): [Folded, False: 120M]
  |  |  ------------------
  ------------------
21672|   120M|    lead = data[0];
21673|   120M|    if (lead < LB_REAL) {
  ------------------
  |  Branch (21673:9): [True: 9.18M, False: 111M]
  ------------------
21674|  9.18M|        *out = janet_wrap_integer(readint(st, &data));
  ------------------
  |  |  967|  9.18M|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|  9.18M|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
21675|  9.18M|        return data;
21676|  9.18M|    }
21677|   111M|    switch (lead) {
21678|   365k|        case LB_NIL:
  ------------------
  |  Branch (21678:9): [True: 365k, False: 111M]
  ------------------
21679|   365k|            *out = janet_wrap_nil();
  ------------------
  |  |  831|   365k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   365k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   365k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   365k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21680|   365k|            return data + 1;
21681|      0|        case LB_FALSE:
  ------------------
  |  Branch (21681:9): [True: 0, False: 111M]
  ------------------
21682|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21683|      0|            return data + 1;
21684|   883k|        case LB_TRUE:
  ------------------
  |  Branch (21684:9): [True: 883k, False: 110M]
  ------------------
21685|   883k|            *out = janet_wrap_true();
  ------------------
  |  |  832|   883k|#define janet_wrap_true() janet_nanbox_from_payload(JANET_BOOLEAN, 1)
  |  |  ------------------
  |  |  |  |  822|   883k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   883k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   883k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21686|   883k|            return data + 1;
21687|  19.9k|        case LB_INTEGER:
  ------------------
  |  Branch (21687:9): [True: 19.9k, False: 111M]
  ------------------
21688|       |            /* Long integer */
21689|  19.9k|            MARSH_EOS(st, data + 4);
  ------------------
  |  |21054|  19.9k|#define MARSH_EOS(st, data) do { \
  |  |21055|  19.9k|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21055:9): [True: 0, False: 19.9k]
  |  |  ------------------
  |  |21056|  19.9k|} while (0)
  |  |  ------------------
  |  |  |  Branch (21056:10): [Folded, False: 19.9k]
  |  |  ------------------
  ------------------
21690|  19.9k|            uint32_t ui = ((uint32_t)(data[4])) |
21691|  19.9k|                          ((uint32_t)(data[3]) << 8) |
21692|  19.9k|                          ((uint32_t)(data[2]) << 16) |
21693|  19.9k|                          ((uint32_t)(data[1]) << 24);
21694|  19.9k|            int32_t si = (int32_t)ui;
21695|  19.9k|            *out = janet_wrap_integer(si);
  ------------------
  |  |  967|  19.9k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|  19.9k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
21696|  19.9k|            return data + 5;
21697|  46.5k|        case LB_REAL:
  ------------------
  |  Branch (21697:9): [True: 46.5k, False: 111M]
  ------------------
21698|       |            /* Real */
21699|  46.5k|        {
21700|  46.5k|            union {
21701|  46.5k|                double d;
21702|  46.5k|                uint8_t bytes[8];
21703|  46.5k|            } u;
21704|  46.5k|            MARSH_EOS(st, data + 8);
  ------------------
  |  |21054|  46.5k|#define MARSH_EOS(st, data) do { \
  |  |21055|  46.5k|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21055:9): [True: 0, False: 46.5k]
  |  |  ------------------
  |  |21056|  46.5k|} while (0)
  |  |  ------------------
  |  |  |  Branch (21056:10): [Folded, False: 46.5k]
  |  |  ------------------
  ------------------
21705|       |#ifdef JANET_BIG_ENDIAN
21706|       |            u.bytes[0] = data[8];
21707|       |            u.bytes[1] = data[7];
21708|       |            u.bytes[2] = data[6];
21709|       |            u.bytes[3] = data[5];
21710|       |            u.bytes[4] = data[4];
21711|       |            u.bytes[5] = data[3];
21712|       |            u.bytes[6] = data[2];
21713|       |            u.bytes[7] = data[1];
21714|       |#else
21715|  46.5k|            memcpy(&u.bytes, data + 1, sizeof(double));
21716|  46.5k|#endif
21717|  46.5k|            *out = janet_wrap_number_safe(u.d);
21718|  46.5k|            janet_v_push(st->lookup, *out);
  ------------------
  |  |  757|  46.5k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|  46.5k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|  46.5k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|  46.5k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  46.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|  46.5k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  46.5k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 0, False: 46.5k]
  |  |  |  |  |  |  |  Branch (768:50): [True: 0, False: 46.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #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|  46.5k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  46.5k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21719|  46.5k|            return data + 9;
21720|  46.5k|        }
21721|  9.82M|        case LB_STRING:
  ------------------
  |  Branch (21721:9): [True: 9.82M, False: 101M]
  ------------------
21722|  22.2M|        case LB_SYMBOL:
  ------------------
  |  Branch (21722:9): [True: 12.4M, False: 99.0M]
  ------------------
21723|  22.2M|        case LB_BUFFER:
  ------------------
  |  Branch (21723:9): [True: 6.64k, False: 111M]
  ------------------
21724|  23.8M|        case LB_KEYWORD:
  ------------------
  |  Branch (21724:9): [True: 1.58M, False: 109M]
  ------------------
21725|  26.1M|        case LB_REGISTRY: {
  ------------------
  |  Branch (21725:9): [True: 2.35M, False: 109M]
  ------------------
21726|  26.1M|            data++;
21727|  26.1M|            int32_t len = readnat(st, &data);
21728|  26.1M|            MARSH_EOS(st, data - 1 + len);
  ------------------
  |  |21054|  26.1M|#define MARSH_EOS(st, data) do { \
  |  |21055|  26.1M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21055:9): [True: 0, False: 26.1M]
  |  |  ------------------
  |  |21056|  26.1M|} while (0)
  |  |  ------------------
  |  |  |  Branch (21056:10): [Folded, False: 26.1M]
  |  |  ------------------
  ------------------
21729|  26.1M|            if (lead == LB_STRING) {
  ------------------
  |  Branch (21729:17): [True: 9.82M, False: 16.3M]
  ------------------
21730|  9.82M|                const uint8_t *str = janet_string(data, len);
21731|  9.82M|                *out = janet_wrap_string(str);
  ------------------
  |  |  848|  9.82M|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|  9.82M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  9.82M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  9.82M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21732|  16.3M|            } else if (lead == LB_SYMBOL) {
  ------------------
  |  Branch (21732:24): [True: 12.4M, False: 3.94M]
  ------------------
21733|  12.4M|                const uint8_t *str = janet_symbol(data, len);
21734|  12.4M|                *out = janet_wrap_symbol(str);
  ------------------
  |  |  849|  12.4M|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  ------------------
  |  |  |  |  828|  12.4M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  12.4M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  12.4M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21735|  12.4M|            } else if (lead == LB_KEYWORD) {
  ------------------
  |  Branch (21735:24): [True: 1.58M, False: 2.36M]
  ------------------
21736|  1.58M|                const uint8_t *str = janet_keyword(data, len);
  ------------------
  |  | 1840|  1.58M|#define janet_keyword janet_symbol
  ------------------
21737|  1.58M|                *out = janet_wrap_keyword(str);
  ------------------
  |  |  850|  1.58M|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  ------------------
  |  |  |  |  828|  1.58M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.58M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.58M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21738|  2.36M|            } else if (lead == LB_REGISTRY) {
  ------------------
  |  Branch (21738:24): [True: 2.35M, False: 6.64k]
  ------------------
21739|  2.35M|                if (st->reg) {
  ------------------
  |  Branch (21739:21): [True: 2.35M, False: 0]
  ------------------
21740|  2.35M|                    Janet regkey = janet_symbolv(data, len);
  ------------------
  |  | 1836|  2.35M|#define janet_symbolv(str, len) janet_wrap_symbol(janet_symbol((str), (len)))
  |  |  ------------------
  |  |  |  |  849|  2.35M|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  2.35M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  2.35M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  2.35M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21741|  2.35M|                    *out = janet_table_get(st->reg, regkey);
21742|  2.35M|                } else {
21743|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21744|      0|                }
21745|  2.35M|            } else { /* (lead == LB_BUFFER) */
21746|  6.64k|                JanetBuffer *buffer = janet_buffer(len);
21747|  6.64k|                buffer->count = len;
21748|  6.64k|                safe_memcpy(buffer->data, data, len);
21749|  6.64k|                *out = janet_wrap_buffer(buffer);
  ------------------
  |  |  847|  6.64k|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  825|  6.64k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  6.64k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  6.64k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21750|  6.64k|            }
21751|  26.1M|            janet_v_push(st->lookup, *out);
  ------------------
  |  |  757|  26.1M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|  26.1M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|  26.1M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|  26.1M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  26.1M|#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|  26.1M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  26.1M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 0, False: 26.1M]
  |  |  |  |  |  |  |  Branch (768:50): [True: 79.7k, False: 26.0M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  770|  79.7k|#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|  26.1M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  26.1M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21752|  26.1M|            return data + len;
21753|  26.1M|        }
21754|      0|        case LB_FIBER: {
  ------------------
  |  Branch (21754:9): [True: 0, False: 111M]
  ------------------
21755|      0|            JanetFiber *fiber;
21756|      0|            data = unmarshal_one_fiber(st, data + 1, &fiber, flags + 1);
21757|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21758|      0|            return data;
21759|  26.1M|        }
21760|  2.54M|        case LB_FUNCTION: {
  ------------------
  |  Branch (21760:9): [True: 2.54M, False: 108M]
  ------------------
21761|  2.54M|            JanetFunction *func;
21762|  2.54M|            JanetFuncDef *def;
21763|  2.54M|            data++;
21764|  2.54M|            int32_t len = readnat(st, &data);
21765|  2.54M|            if (len > 255) {
  ------------------
  |  Branch (21765:17): [True: 0, False: 2.54M]
  ------------------
21766|      0|                janet_panicf("invalid function - too many environments (%d)", len);
21767|      0|            }
21768|  2.54M|            func = janet_gcalloc(JANET_MEMORY_FUNCTION, sizeof(JanetFunction) +
21769|  2.54M|                                 len * sizeof(JanetFuncEnv));
21770|  2.54M|            func->def = NULL;
21771|  2.83M|            for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (21771:33): [True: 285k, False: 2.54M]
  ------------------
21772|   285k|                func->envs[i] = NULL;
21773|   285k|            }
21774|  2.54M|            *out = janet_wrap_function(func);
  ------------------
  |  |  852|  2.54M|#define janet_wrap_function(s) janet_nanbox_wrap_((s), JANET_FUNCTION)
  |  |  ------------------
  |  |  |  |  825|  2.54M|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.54M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.54M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21775|  2.54M|            janet_v_push(st->lookup, *out);
  ------------------
  |  |  757|  2.54M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|  2.54M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|  2.54M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|  2.54M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  2.54M|#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.54M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  2.54M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 0, False: 2.54M]
  |  |  |  |  |  |  |  Branch (768:50): [True: 0, False: 2.54M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #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.54M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  2.54M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21776|  2.54M|            data = unmarshal_one_def(st, data, &def, flags + 1);
21777|  2.54M|            if (def->environments_length != len) {
  ------------------
  |  Branch (21777:17): [True: 0, False: 2.54M]
  ------------------
21778|      0|                janet_panicf("invalid function - env count %d does not match funcdef (%d)",
21779|      0|                             len, def->environments_length);
21780|      0|            }
21781|  2.54M|            func->def = def;
21782|  2.83M|            for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (21782:33): [True: 285k, False: 2.54M]
  ------------------
21783|   285k|                data = unmarshal_one_env(st, data, &(func->envs[i]), flags + 1);
21784|   285k|            }
21785|  2.54M|            return data;
21786|  2.54M|        }
21787|      0|        case LB_ABSTRACT: {
  ------------------
  |  Branch (21787:9): [True: 0, False: 111M]
  ------------------
21788|      0|            data++;
21789|      0|            return unmarshal_one_abstract(st, data, out, flags);
21790|  2.54M|        }
21791|  71.5M|        case LB_REFERENCE:
  ------------------
  |  Branch (21791:9): [True: 71.5M, False: 39.9M]
  ------------------
21792|  71.5M|        case LB_ARRAY:
  ------------------
  |  Branch (21792:9): [True: 19.9k, False: 111M]
  ------------------
21793|  71.5M|        case LB_ARRAY_WEAK:
  ------------------
  |  Branch (21793:9): [True: 0, False: 111M]
  ------------------
21794|  76.5M|        case LB_TUPLE:
  ------------------
  |  Branch (21794:9): [True: 4.99M, False: 106M]
  ------------------
21795|  76.6M|        case LB_STRUCT:
  ------------------
  |  Branch (21795:9): [True: 46.5k, False: 111M]
  ------------------
21796|  76.6M|        case LB_STRUCT_PROTO:
  ------------------
  |  Branch (21796:9): [True: 0, False: 111M]
  ------------------
21797|  81.4M|        case LB_TABLE:
  ------------------
  |  Branch (21797:9): [True: 4.85M, False: 106M]
  ------------------
21798|  81.4M|        case LB_TABLE_PROTO:
  ------------------
  |  Branch (21798:9): [True: 0, False: 111M]
  ------------------
21799|  81.4M|        case LB_TABLE_WEAKK:
  ------------------
  |  Branch (21799:9): [True: 0, False: 111M]
  ------------------
21800|  81.4M|        case LB_TABLE_WEAKV:
  ------------------
  |  Branch (21800:9): [True: 0, False: 111M]
  ------------------
21801|  81.4M|        case LB_TABLE_WEAKKV:
  ------------------
  |  Branch (21801:9): [True: 0, False: 111M]
  ------------------
21802|  81.4M|        case LB_TABLE_WEAKK_PROTO:
  ------------------
  |  Branch (21802:9): [True: 0, False: 111M]
  ------------------
21803|  81.4M|        case LB_TABLE_WEAKV_PROTO:
  ------------------
  |  Branch (21803:9): [True: 0, False: 111M]
  ------------------
21804|  81.4M|        case LB_TABLE_WEAKKV_PROTO:
  ------------------
  |  Branch (21804:9): [True: 0, False: 111M]
  ------------------
21805|       |            /* Things that open with integers */
21806|  81.4M|        {
21807|  81.4M|            data++;
21808|  81.4M|            int32_t len = readnat(st, &data);
21809|       |            /* DOS check */
21810|  81.4M|            if (lead != LB_REFERENCE) {
  ------------------
  |  Branch (21810:17): [True: 9.91M, False: 71.5M]
  ------------------
21811|  9.91M|                MARSH_EOS(st, data - 1 + len);
  ------------------
  |  |21054|  9.91M|#define MARSH_EOS(st, data) do { \
  |  |21055|  9.91M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21055:9): [True: 0, False: 9.91M]
  |  |  ------------------
  |  |21056|  9.91M|} while (0)
  |  |  ------------------
  |  |  |  Branch (21056:10): [Folded, False: 9.91M]
  |  |  ------------------
  ------------------
21812|  9.91M|            }
21813|  81.4M|            if (lead == LB_ARRAY || lead == LB_ARRAY_WEAK) {
  ------------------
  |  Branch (21813:17): [True: 19.9k, False: 81.4M]
  |  Branch (21813:37): [True: 0, False: 81.4M]
  ------------------
21814|       |                /* Array */
21815|  19.9k|                JanetArray *array = (lead == LB_ARRAY_WEAK) ? janet_array_weak(len) : janet_array(len);
  ------------------
  |  Branch (21815:37): [True: 0, False: 19.9k]
  ------------------
21816|  19.9k|                array->count = len;
21817|  19.9k|                *out = janet_wrap_array(array);
  ------------------
  |  |  845|  19.9k|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  825|  19.9k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  19.9k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  19.9k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21818|  19.9k|                janet_v_push(st->lookup, *out);
  ------------------
  |  |  757|  19.9k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|  19.9k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|  19.9k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|  19.9k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  19.9k|#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|  19.9k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  19.9k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 0, False: 19.9k]
  |  |  |  |  |  |  |  Branch (768:50): [True: 0, False: 19.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #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|  19.9k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  19.9k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21819|   172k|                for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (21819:37): [True: 152k, False: 19.9k]
  ------------------
21820|   152k|                    data = unmarshal_one(st, data, array->data + i, flags + 1);
21821|   152k|                }
21822|  81.4M|            } else if (lead == LB_TUPLE) {
  ------------------
  |  Branch (21822:24): [True: 4.99M, False: 76.4M]
  ------------------
21823|       |                /* Tuple */
21824|  4.99M|                Janet *tup = janet_tuple_begin(len);
21825|  4.99M|                int32_t flag = readint(st, &data);
21826|  4.99M|                janet_tuple_flag(tup) |= (int32_t)(((uint32_t) flag) << 16);  /* Avoid left shift of negative value */
  ------------------
  |  | 1806|  4.99M|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1800|  4.99M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
21827|  19.7M|                for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (21827:37): [True: 14.7M, False: 4.99M]
  ------------------
21828|  14.7M|                    data = unmarshal_one(st, data, tup + i, flags + 1);
21829|  14.7M|                }
21830|  4.99M|                *out = janet_wrap_tuple(janet_tuple_end(tup));
  ------------------
  |  |  843|  4.99M|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|  4.99M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  4.99M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  4.99M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21831|  4.99M|                janet_v_push(st->lookup, *out);
  ------------------
  |  |  757|  4.99M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|  4.99M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|  4.99M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|  4.99M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  4.99M|#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.99M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  4.99M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 0, False: 4.99M]
  |  |  |  |  |  |  |  Branch (768:50): [True: 0, False: 4.99M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #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.99M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  4.99M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21832|  76.4M|            } else if (lead == LB_STRUCT || lead == LB_STRUCT_PROTO) {
  ------------------
  |  Branch (21832:24): [True: 46.5k, False: 76.3M]
  |  Branch (21832:45): [True: 0, False: 76.3M]
  ------------------
21833|       |                /* Struct */
21834|  46.5k|                JanetKV *struct_ = janet_struct_begin(len);
21835|  46.5k|                if (lead == LB_STRUCT_PROTO) {
  ------------------
  |  Branch (21835:21): [True: 0, False: 46.5k]
  ------------------
21836|      0|                    Janet proto;
21837|      0|                    data = unmarshal_one(st, data, &proto, flags + 1);
21838|      0|                    janet_asserttype(proto, JANET_STRUCT, st);
21839|      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))
  ------------------
21840|      0|                }
21841|   358k|                for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (21841:37): [True: 312k, False: 46.5k]
  ------------------
21842|   312k|                    Janet key, value;
21843|   312k|                    data = unmarshal_one(st, data, &key, flags + 1);
21844|   312k|                    data = unmarshal_one(st, data, &value, flags + 1);
21845|   312k|                    janet_struct_put(struct_, key, value);
21846|   312k|                }
21847|  46.5k|                *out = janet_wrap_struct(janet_struct_end(struct_));
  ------------------
  |  |  842|  46.5k|#define janet_wrap_struct(s) janet_nanbox_wrap_c((s), JANET_STRUCT)
  |  |  ------------------
  |  |  |  |  828|  46.5k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  46.5k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  46.5k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21848|  46.5k|                janet_v_push(st->lookup, *out);
  ------------------
  |  |  757|  46.5k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|  46.5k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|  46.5k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|  46.5k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  46.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|  46.5k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  46.5k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 0, False: 46.5k]
  |  |  |  |  |  |  |  Branch (768:50): [True: 0, False: 46.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #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|  46.5k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  46.5k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21849|  76.3M|            } else if (lead == LB_REFERENCE) {
  ------------------
  |  Branch (21849:24): [True: 71.5M, False: 4.85M]
  ------------------
21850|  71.5M|                if (len >= janet_v_count(st->lookup))
  ------------------
  |  |  759|  71.5M|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  766|  71.5M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  71.5M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (759:34): [True: 71.5M, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (21850:21): [True: 0, False: 71.5M]
  ------------------
21851|      0|                    janet_panicf("invalid reference %d", len);
21852|  71.5M|                *out = st->lookup[len];
21853|  71.5M|            } else {
21854|       |                /* Table */
21855|  4.85M|                JanetTable *t;
21856|  4.85M|                if (lead == LB_TABLE_WEAKK_PROTO || lead == LB_TABLE_WEAKK) {
  ------------------
  |  Branch (21856:21): [True: 0, False: 4.85M]
  |  Branch (21856:53): [True: 0, False: 4.85M]
  ------------------
21857|      0|                    t = janet_table_weakk(len);
21858|  4.85M|                } else if (lead == LB_TABLE_WEAKV_PROTO || lead == LB_TABLE_WEAKV) {
  ------------------
  |  Branch (21858:28): [True: 0, False: 4.85M]
  |  Branch (21858:60): [True: 0, False: 4.85M]
  ------------------
21859|      0|                    t = janet_table_weakv(len);
21860|  4.85M|                } else if (lead == LB_TABLE_WEAKKV_PROTO || lead == LB_TABLE_WEAKKV) {
  ------------------
  |  Branch (21860:28): [True: 0, False: 4.85M]
  |  Branch (21860:61): [True: 0, False: 4.85M]
  ------------------
21861|      0|                    t = janet_table_weakkv(len);
21862|  4.85M|                } else {
21863|  4.85M|                    t = janet_table(len);
21864|  4.85M|                }
21865|  4.85M|                *out = janet_wrap_table(t);
  ------------------
  |  |  846|  4.85M|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  825|  4.85M|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  4.85M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  4.85M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21866|  4.85M|                janet_v_push(st->lookup, *out);
  ------------------
  |  |  757|  4.85M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|  4.85M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|  4.85M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|  4.85M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  4.85M|#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.85M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  4.85M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 6.64k, False: 4.85M]
  |  |  |  |  |  |  |  Branch (768:50): [True: 6.64k, False: 4.84M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  770|  13.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|  4.85M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  4.85M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21867|  4.85M|                if (lead == LB_TABLE_PROTO || lead == LB_TABLE_WEAKK_PROTO || lead == LB_TABLE_WEAKV_PROTO || lead == LB_TABLE_WEAKKV_PROTO) {
  ------------------
  |  Branch (21867:21): [True: 0, False: 4.85M]
  |  Branch (21867:47): [True: 0, False: 4.85M]
  |  Branch (21867:79): [True: 0, False: 4.85M]
  |  Branch (21867:111): [True: 0, False: 4.85M]
  ------------------
21868|      0|                    Janet proto;
21869|      0|                    data = unmarshal_one(st, data, &proto, flags + 1);
21870|      0|                    janet_asserttype(proto, JANET_TABLE, st);
21871|      0|                    t->proto = janet_unwrap_table(proto);
  ------------------
  |  |  861|      0|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
21872|      0|                }
21873|  29.3M|                for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (21873:37): [True: 24.4M, False: 4.85M]
  ------------------
21874|  24.4M|                    Janet key, value;
21875|  24.4M|                    data = unmarshal_one(st, data, &key, flags + 1);
21876|  24.4M|                    data = unmarshal_one(st, data, &value, flags + 1);
21877|  24.4M|                    janet_table_put(t, key, value);
21878|  24.4M|                }
21879|  4.85M|            }
21880|  81.4M|            return data;
21881|  81.4M|        }
21882|      0|        case LB_UNSAFE_POINTER: {
  ------------------
  |  Branch (21882:9): [True: 0, False: 111M]
  ------------------
21883|      0|            MARSH_EOS(st, data + sizeof(void *));
  ------------------
  |  |21054|      0|#define MARSH_EOS(st, data) do { \
  |  |21055|      0|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21055:9): [True: 0, False: 0]
  |  |  ------------------
  |  |21056|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (21056:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
21884|      0|            data++;
21885|      0|            if (!(flags & JANET_MARSHAL_UNSAFE)) {
  ------------------
  |  | 1911|      0|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (21885:17): [True: 0, False: 0]
  ------------------
21886|      0|                janet_panicf("unsafe flag not given, "
21887|      0|                             "will not unmarshal raw pointer at index %d",
21888|      0|                             (int)(data - st->start));
21889|      0|            }
21890|      0|            union {
21891|      0|                void *ptr;
21892|      0|                uint8_t bytes[sizeof(void *)];
21893|      0|            } u;
21894|      0|            memcpy(u.bytes, data, sizeof(void *));
21895|      0|            data += sizeof(void *);
21896|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21897|      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)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21898|      0|            return data;
21899|      0|        }
21900|      0|#ifdef JANET_EV
21901|      0|        case LB_POINTER_BUFFER: {
  ------------------
  |  Branch (21901:9): [True: 0, False: 111M]
  ------------------
21902|      0|            data++;
21903|      0|            int32_t count = readnat(st, &data);
21904|      0|            int32_t capacity = readnat(st, &data);
21905|      0|            MARSH_EOS(st, data + sizeof(void *));
  ------------------
  |  |21054|      0|#define MARSH_EOS(st, data) do { \
  |  |21055|      0|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21055:9): [True: 0, False: 0]
  |  |  ------------------
  |  |21056|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (21056:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
21906|      0|            union {
21907|      0|                void *ptr;
21908|      0|                uint8_t bytes[sizeof(void *)];
21909|      0|            } u;
21910|      0|            if (!(flags & JANET_MARSHAL_UNSAFE)) {
  ------------------
  |  | 1911|      0|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (21910:17): [True: 0, False: 0]
  ------------------
21911|      0|                janet_panicf("unsafe flag not given, "
21912|      0|                             "will not unmarshal raw pointer at index %d",
21913|      0|                             (int)(data - st->start));
21914|      0|            }
21915|      0|            memcpy(u.bytes, data, sizeof(void *));
21916|      0|            data += sizeof(void *);
21917|      0|            JanetBuffer *buffer = janet_pointer_buffer_unsafe(u.ptr, capacity, count);
21918|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21919|      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)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21920|      0|            return data;
21921|      0|        }
21922|      0|#endif
21923|      0|        case LB_UNSAFE_CFUNCTION: {
  ------------------
  |  Branch (21923:9): [True: 0, False: 111M]
  ------------------
21924|      0|            MARSH_EOS(st, data + sizeof(JanetCFunction));
  ------------------
  |  |21054|      0|#define MARSH_EOS(st, data) do { \
  |  |21055|      0|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21055:9): [True: 0, False: 0]
  |  |  ------------------
  |  |21056|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (21056:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
21925|      0|            data++;
21926|      0|            if (!(flags & JANET_MARSHAL_UNSAFE)) {
  ------------------
  |  | 1911|      0|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (21926:17): [True: 0, False: 0]
  ------------------
21927|      0|                janet_panicf("unsafe flag not given, "
21928|      0|                             "will not unmarshal function pointer at index %d",
21929|      0|                             (int)(data - st->start));
21930|      0|            }
21931|      0|            union {
21932|      0|                JanetCFunction ptr;
21933|      0|                uint8_t bytes[sizeof(JanetCFunction)];
21934|      0|            } u;
21935|      0|            memcpy(u.bytes, data, sizeof(JanetCFunction));
21936|      0|            data += sizeof(JanetCFunction);
21937|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21938|      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)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21939|      0|            return data;
21940|      0|        }
21941|      0|#ifdef JANET_EV
21942|      0|        case LB_THREADED_ABSTRACT: {
  ------------------
  |  Branch (21942:9): [True: 0, False: 111M]
  ------------------
21943|      0|            MARSH_EOS(st, data + sizeof(void *));
  ------------------
  |  |21054|      0|#define MARSH_EOS(st, data) do { \
  |  |21055|      0|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21055:9): [True: 0, False: 0]
  |  |  ------------------
  |  |21056|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (21056:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
21944|      0|            data++;
21945|      0|            if (!(flags & JANET_MARSHAL_UNSAFE)) {
  ------------------
  |  | 1911|      0|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (21945:17): [True: 0, False: 0]
  ------------------
21946|      0|                janet_panicf("unsafe flag not given, "
21947|      0|                             "will not unmarshal threaded abstract pointer at index %d",
21948|      0|                             (int)(data - st->start));
21949|      0|            }
21950|      0|            union {
21951|      0|                void *ptr;
21952|      0|                uint8_t bytes[sizeof(void *)];
21953|      0|            } u;
21954|      0|            memcpy(u.bytes, data, sizeof(void *));
21955|      0|            data += sizeof(void *);
21956|       |
21957|      0|            if (flags & JANET_MARSHAL_DECREF) {
  ------------------
  |  |  387|      0|#define JANET_MARSHAL_DECREF 0x40000
  ------------------
  |  Branch (21957:17): [True: 0, False: 0]
  ------------------
21958|       |                /* Decrement immediately and don't bother putting into heap */
21959|      0|                janet_abstract_decref(u.ptr);
21960|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21961|      0|            } else {
21962|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21963|      0|                Janet check = janet_table_get(&janet_vm.threaded_abstracts, *out);
21964|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21965|       |                    /* Transfers reference from threaded channel buffer to current heap */
21966|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21967|      0|                } else {
21968|       |                    /* Heap reference already accounted for, remove threaded channel reference. */
21969|      0|                    janet_abstract_decref(u.ptr);
21970|      0|                }
21971|      0|            }
21972|       |
21973|      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)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21974|      0|            return data;
21975|      0|        }
21976|      0|#endif
21977|      0|        default: {
  ------------------
  |  Branch (21977:9): [True: 0, False: 111M]
  ------------------
21978|      0|            janet_panicf("unknown byte %x at index %d",
21979|      0|                         *data,
21980|      0|                         (int)(data - st->start));
21981|      0|            return NULL;
21982|      0|        }
21983|   111M|    }
21984|   111M|}
janet.c:readnat:
21091|   138M|static int32_t readnat(UnmarshalState *st, const uint8_t **atdata) {
21092|   138M|    int32_t ret = readint(st, atdata);
21093|   138M|    if (ret < 0) {
  ------------------
  |  Branch (21093:9): [True: 0, False: 138M]
  ------------------
21094|      0|        janet_panicf("expected integer >= 0, got %d", ret);
21095|      0|    }
21096|   138M|    return ret;
21097|   138M|}
janet.c:unmarshal_one_def:
21230|  3.58M|    int flags) {
21231|  3.58M|    MARSH_EOS(st, data);
  ------------------
  |  |21054|  3.58M|#define MARSH_EOS(st, data) do { \
  |  |21055|  3.58M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21055:9): [True: 0, False: 3.58M]
  |  |  ------------------
  |  |21056|  3.58M|} while (0)
  |  |  ------------------
  |  |  |  Branch (21056:10): [Folded, False: 3.58M]
  |  |  ------------------
  ------------------
21232|  3.58M|    if (*data == LB_FUNCDEF_REF) {
  ------------------
  |  Branch (21232:9): [True: 26.5k, False: 3.55M]
  ------------------
21233|  26.5k|        data++;
21234|  26.5k|        int32_t index = readint(st, &data);
21235|  26.5k|        if (index < 0 || index >= janet_v_count(st->lookup_defs))
  ------------------
  |  |  759|  26.5k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  766|  26.5k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  26.5k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (759:34): [True: 26.5k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (21235:13): [True: 0, False: 26.5k]
  |  Branch (21235:26): [True: 0, False: 26.5k]
  ------------------
21236|      0|            janet_panicf("invalid funcdef reference %d", index);
21237|  26.5k|        *out = st->lookup_defs[index];
21238|  3.55M|    } else {
21239|       |        /* Initialize with values that will not break garbage collection
21240|       |         * if unmarshalling fails. */
21241|  3.55M|        JanetFuncDef *def = janet_gcalloc(JANET_MEMORY_FUNCDEF, sizeof(JanetFuncDef));
21242|  3.55M|        def->environments_length = 0;
21243|  3.55M|        def->defs_length = 0;
21244|  3.55M|        def->constants_length = 0;
21245|  3.55M|        def->bytecode_length = 0;
21246|  3.55M|        def->name = NULL;
21247|  3.55M|        def->source = NULL;
21248|  3.55M|        def->closure_bitset = NULL;
21249|  3.55M|        def->defs = NULL;
21250|  3.55M|        def->environments = NULL;
21251|  3.55M|        def->constants = NULL;
21252|  3.55M|        def->bytecode = NULL;
21253|  3.55M|        def->sourcemap = NULL;
21254|  3.55M|        def->symbolmap = NULL;
21255|  3.55M|        def->symbolmap_length = 0;
21256|  3.55M|        def->named_args_count = 0;
21257|  3.55M|        janet_v_push(st->lookup_defs, def);
  ------------------
  |  |  757|  3.55M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|  3.55M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|  3.55M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|  3.54M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  3.54M|#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.54M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  3.54M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 6.64k, False: 3.54M]
  |  |  |  |  |  |  |  Branch (768:50): [True: 66.4k, False: 3.48M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  770|  73.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|  3.55M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  3.55M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21258|       |
21259|       |        /* Set default lengths to zero */
21260|  3.55M|        int32_t bytecode_length = 0;
21261|  3.55M|        int32_t constants_length = 0;
21262|  3.55M|        int32_t environments_length = 0;
21263|  3.55M|        int32_t defs_length = 0;
21264|  3.55M|        int32_t symbolmap_length = 0;
21265|       |
21266|       |        /* Read flags and other fixed values */
21267|  3.55M|        def->flags = readint(st, &data);
21268|  3.55M|        def->slotcount = readnat(st, &data);
21269|  3.55M|        def->arity = readnat(st, &data);
21270|  3.55M|        def->min_arity = readnat(st, &data);
21271|  3.55M|        def->max_arity = readnat(st, &data);
21272|       |
21273|       |        /* Read some lengths */
21274|  3.55M|        constants_length = readnat(st, &data);
21275|  3.55M|        bytecode_length = readnat(st, &data);
21276|  3.55M|        if (def->flags & JANET_FUNCDEF_FLAG_NAMEDARGS)
  ------------------
  |  | 1107|  3.55M|#define JANET_FUNCDEF_FLAG_NAMEDARGS 0x4000000
  ------------------
  |  Branch (21276:13): [True: 13.2k, False: 3.54M]
  ------------------
21277|  13.2k|            def->named_args_count = readnat(st, &data);
21278|  3.55M|        if (def->flags & JANET_FUNCDEF_FLAG_HASENVS)
  ------------------
  |  | 1103|  3.55M|#define JANET_FUNCDEF_FLAG_HASENVS 0x400000
  ------------------
  |  Branch (21278:13): [True: 3.33M, False: 219k]
  ------------------
21279|  3.33M|            environments_length = readnat(st, &data);
21280|  3.55M|        if (def->flags & JANET_FUNCDEF_FLAG_HASDEFS)
  ------------------
  |  | 1102|  3.55M|#define JANET_FUNCDEF_FLAG_HASDEFS 0x200000
  ------------------
  |  Branch (21280:13): [True: 465k, False: 3.08M]
  ------------------
21281|   465k|            defs_length = readnat(st, &data);
21282|  3.55M|        if (def->flags & JANET_FUNCDEF_FLAG_HASSYMBOLMAP)
  ------------------
  |  | 1099|  3.55M|#define JANET_FUNCDEF_FLAG_HASSYMBOLMAP 0x40000
  ------------------
  |  Branch (21282:13): [True: 3.28M, False: 265k]
  ------------------
21283|  3.28M|            symbolmap_length = readnat(st, &data);
21284|       |
21285|       |        /* Check name and source (optional) */
21286|  3.55M|        if (def->flags & JANET_FUNCDEF_FLAG_HASNAME) {
  ------------------
  |  | 1100|  3.55M|#define JANET_FUNCDEF_FLAG_HASNAME 0x80000
  ------------------
  |  Branch (21286:13): [True: 3.32M, False: 225k]
  ------------------
21287|  3.32M|            Janet x;
21288|  3.32M|            data = unmarshal_one(st, data, &x, flags + 1);
21289|  3.32M|            janet_asserttype(x, JANET_STRING, st);
21290|  3.32M|            def->name = janet_unwrap_string(x);
  ------------------
  |  |  863|  3.32M|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
21291|  3.32M|        }
21292|  3.55M|        if (def->flags & JANET_FUNCDEF_FLAG_HASSOURCE) {
  ------------------
  |  | 1101|  3.55M|#define JANET_FUNCDEF_FLAG_HASSOURCE 0x100000
  ------------------
  |  Branch (21292:13): [True: 3.33M, False: 219k]
  ------------------
21293|  3.33M|            Janet x;
21294|  3.33M|            data = unmarshal_one(st, data, &x, flags + 1);
21295|  3.33M|            janet_asserttype(x, JANET_STRING, st);
21296|  3.33M|            def->source = janet_unwrap_string(x);
  ------------------
  |  |  863|  3.33M|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
21297|  3.33M|        }
21298|       |
21299|       |        /* Unmarshal constants */
21300|  3.55M|        if (constants_length) {
  ------------------
  |  Branch (21300:13): [True: 2.71M, False: 843k]
  ------------------
21301|  2.71M|            def->constants = array_allocate(sizeof(Janet), constants_length);
21302|  2.71M|            if (!def->constants) {
  ------------------
  |  Branch (21302:17): [True: 0, False: 2.71M]
  ------------------
21303|      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]
  |  |  ------------------
  ------------------
21304|      0|            }
21305|  17.8M|            for (int32_t i = 0; i < constants_length; i++)
  ------------------
  |  Branch (21305:33): [True: 15.0M, False: 2.71M]
  ------------------
21306|  15.0M|                data = unmarshal_one(st, data, def->constants + i, flags + 1);
21307|  2.71M|        } else {
21308|   843k|            def->constants = NULL;
21309|   843k|        }
21310|  3.55M|        def->constants_length = constants_length;
21311|       |
21312|       |        /* Unmarshal symbol map, if needed */
21313|  3.55M|        if (def->flags & JANET_FUNCDEF_FLAG_HASSYMBOLMAP) {
  ------------------
  |  | 1099|  3.55M|#define JANET_FUNCDEF_FLAG_HASSYMBOLMAP 0x40000
  ------------------
  |  Branch (21313:13): [True: 3.28M, False: 265k]
  ------------------
21314|  3.28M|            def->symbolmap = array_allocate(sizeof(JanetSymbolMap), symbolmap_length);
21315|  3.28M|            if (def->symbolmap == NULL) {
  ------------------
  |  Branch (21315:17): [True: 0, False: 3.28M]
  ------------------
21316|      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]
  |  |  ------------------
  ------------------
21317|      0|            }
21318|  37.0M|            for (int32_t i = 0; i < symbolmap_length; i++) {
  ------------------
  |  Branch (21318:33): [True: 33.8M, False: 3.28M]
  ------------------
21319|  33.8M|                def->symbolmap[i].birth_pc = (uint32_t) readint(st, &data);
21320|  33.8M|                def->symbolmap[i].death_pc = (uint32_t) readint(st, &data);
21321|  33.8M|                def->symbolmap[i].slot_index = (uint32_t) readint(st, &data);
21322|  33.8M|                Janet value;
21323|  33.8M|                data = unmarshal_one(st, data, &value, flags + 1);
21324|  33.8M|                if (!janet_checktype(value, JANET_SYMBOL)) {
  ------------------
  |  |  806|  33.8M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 33.8M]
  |  |  ------------------
  |  |  807|  33.8M|        ? 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|  33.8M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  33.8M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  33.8M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  33.8M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  33.8M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (21324:21): [True: 0, False: 33.8M]
  ------------------
21325|      0|                    janet_panicf("corrupted symbolmap when unmarshalling debug info, got %v", value);
21326|      0|                }
21327|  33.8M|                def->symbolmap[i].symbol = janet_unwrap_symbol(value);
  ------------------
  |  |  864|  33.8M|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
21328|  33.8M|            }
21329|  3.28M|            def->symbolmap_length = (uint32_t) symbolmap_length;
21330|  3.28M|        }
21331|       |
21332|       |        /* Unmarshal bytecode */
21333|  3.55M|        def->bytecode = array_allocate(sizeof(uint32_t), bytecode_length);
21334|  3.55M|        if (!def->bytecode) {
  ------------------
  |  Branch (21334:13): [True: 0, False: 3.55M]
  ------------------
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|  3.55M|        data = janet_unmarshal_u32s(st, data, def->bytecode, bytecode_length);
21338|  3.55M|        def->bytecode_length = bytecode_length;
21339|       |
21340|       |        /* Unmarshal environments */
21341|  3.55M|        if (def->flags & JANET_FUNCDEF_FLAG_HASENVS) {
  ------------------
  |  | 1103|  3.55M|#define JANET_FUNCDEF_FLAG_HASENVS 0x400000
  ------------------
  |  Branch (21341:13): [True: 3.33M, False: 219k]
  ------------------
21342|  3.33M|            def->environments = janet_calloc(1, sizeof(int32_t) * (size_t) environments_length);
  ------------------
  |  | 2412|  3.33M|#define janet_calloc(X, Y) calloc((X), (Y))
  ------------------
21343|  3.33M|            if (!def->environments) {
  ------------------
  |  Branch (21343:17): [True: 0, False: 3.33M]
  ------------------
21344|      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]
  |  |  ------------------
  ------------------
21345|      0|            }
21346|  4.64M|            for (int32_t i = 0; i < environments_length; i++) {
  ------------------
  |  Branch (21346:33): [True: 1.30M, False: 3.33M]
  ------------------
21347|  1.30M|                def->environments[i] = readint(st, &data);
21348|  1.30M|            }
21349|  3.33M|        } else {
21350|   219k|            def->environments = NULL;
21351|   219k|        }
21352|  3.55M|        def->environments_length = environments_length;
21353|       |
21354|       |        /* Unmarshal sub funcdefs */
21355|  3.55M|        if (def->flags & JANET_FUNCDEF_FLAG_HASDEFS) {
  ------------------
  |  | 1102|  3.55M|#define JANET_FUNCDEF_FLAG_HASDEFS 0x200000
  ------------------
  |  Branch (21355:13): [True: 465k, False: 3.08M]
  ------------------
21356|   465k|            def->defs = janet_calloc(1, sizeof(JanetFuncDef *) * (size_t) defs_length);
  ------------------
  |  | 2412|   465k|#define janet_calloc(X, Y) calloc((X), (Y))
  ------------------
21357|   465k|            if (!def->defs) {
  ------------------
  |  Branch (21357:17): [True: 0, False: 465k]
  ------------------
21358|      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]
  |  |  ------------------
  ------------------
21359|      0|            }
21360|  1.50M|            for (int32_t i = 0; i < defs_length; i++) {
  ------------------
  |  Branch (21360:33): [True: 1.03M, False: 465k]
  ------------------
21361|  1.03M|                data = unmarshal_one_def(st, data, def->defs + i, flags + 1);
21362|  1.03M|            }
21363|  3.08M|        } else {
21364|  3.08M|            def->defs = NULL;
21365|  3.08M|        }
21366|  3.55M|        def->defs_length = defs_length;
21367|       |
21368|       |        /* Unmarshal source maps if needed */
21369|  3.55M|        if (def->flags & JANET_FUNCDEF_FLAG_HASSOURCEMAP) {
  ------------------
  |  | 1104|  3.55M|#define JANET_FUNCDEF_FLAG_HASSOURCEMAP 0x800000
  ------------------
  |  Branch (21369:13): [True: 3.33M, False: 219k]
  ------------------
21370|  3.33M|            int32_t current = 0;
21371|  3.33M|            def->sourcemap = array_allocate(sizeof(JanetSourceMapping), bytecode_length);
21372|  3.33M|            if (!def->sourcemap) {
  ------------------
  |  Branch (21372:17): [True: 0, False: 3.33M]
  ------------------
21373|      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]
  |  |  ------------------
  ------------------
21374|      0|            }
21375|  98.9M|            for (int32_t i = 0; i < bytecode_length; i++) {
  ------------------
  |  Branch (21375:33): [True: 95.6M, False: 3.33M]
  ------------------
21376|  95.6M|                current += readint(st, &data);
21377|  95.6M|                def->sourcemap[i].line = current;
21378|  95.6M|                def->sourcemap[i].column = readint(st, &data);
21379|  95.6M|            }
21380|  3.33M|        } else {
21381|   219k|            def->sourcemap = NULL;
21382|   219k|        }
21383|       |
21384|       |        /* Unmarshal closure bitset if needed */
21385|  3.55M|        if (def->flags & JANET_FUNCDEF_FLAG_HASCLOBITSET) {
  ------------------
  |  | 1106|  3.55M|#define JANET_FUNCDEF_FLAG_HASCLOBITSET 0x2000000
  ------------------
  |  Branch (21385:13): [True: 391k, False: 3.16M]
  ------------------
21386|   391k|            int32_t n = ((def->slotcount - 1) >> 5) + 1;
21387|   391k|            def->closure_bitset = array_allocate(sizeof(uint32_t), n);
21388|   391k|            if (NULL == def->closure_bitset) {
  ------------------
  |  Branch (21388:17): [True: 0, False: 391k]
  ------------------
21389|      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]
  |  |  ------------------
  ------------------
21390|      0|            }
21391|   391k|            data = janet_unmarshal_u32s(st, data, def->closure_bitset, n);
21392|   391k|        }
21393|       |
21394|       |        /* Validate */
21395|  3.55M|        int status;
21396|  3.55M|        if ((status = janet_verify(def))) {
  ------------------
  |  Branch (21396:13): [True: 0, False: 3.55M]
  ------------------
21397|      0|            janet_panicf("funcdef has invalid bytecode: %d", status);
21398|      0|        }
21399|       |
21400|       |        /* Set def */
21401|  3.55M|        *out = def;
21402|  3.55M|    }
21403|  3.58M|    return data;
21404|  3.58M|}
janet.c:janet_unmarshal_u32s:
21212|  3.94M|static const uint8_t *janet_unmarshal_u32s(UnmarshalState *st, const uint8_t *data, uint32_t *into, int32_t n) {
21213|   102M|    for (int32_t i = 0; i < n; i++) {
  ------------------
  |  Branch (21213:25): [True: 98.6M, False: 3.94M]
  ------------------
21214|  98.6M|        MARSH_EOS(st, data + 3);
  ------------------
  |  |21054|  98.6M|#define MARSH_EOS(st, data) do { \
  |  |21055|  98.6M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21055:9): [True: 0, False: 98.6M]
  |  |  ------------------
  |  |21056|  98.6M|} while (0)
  |  |  ------------------
  |  |  |  Branch (21056:10): [Folded, False: 98.6M]
  |  |  ------------------
  ------------------
21215|  98.6M|        into[i] =
21216|  98.6M|            (uint32_t)(data[0]) |
21217|  98.6M|            ((uint32_t)(data[1]) << 8) |
21218|  98.6M|            ((uint32_t)(data[2]) << 16) |
21219|  98.6M|            ((uint32_t)(data[3]) << 24);
21220|  98.6M|        data += 4;
21221|  98.6M|    }
21222|  3.94M|    return data;
21223|  3.94M|}
janet.c:unmarshal_one_env:
21168|   285k|    int flags) {
21169|   285k|    MARSH_EOS(st, data);
  ------------------
  |  |21054|   285k|#define MARSH_EOS(st, data) do { \
  |  |21055|   285k|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21055:9): [True: 0, False: 285k]
  |  |  ------------------
  |  |21056|   285k|} while (0)
  |  |  ------------------
  |  |  |  Branch (21056:10): [Folded, False: 285k]
  |  |  ------------------
  ------------------
21170|   285k|    if (*data == LB_FUNCENV_REF) {
  ------------------
  |  Branch (21170:9): [True: 232k, False: 53.1k]
  ------------------
21171|   232k|        data++;
21172|   232k|        int32_t index = readint(st, &data);
21173|   232k|        if (index < 0 || index >= janet_v_count(st->lookup_envs))
  ------------------
  |  |  759|   232k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  766|   232k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|   232k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (759:34): [True: 232k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (21173:13): [True: 0, False: 232k]
  |  Branch (21173:26): [True: 0, False: 232k]
  ------------------
21174|      0|            janet_panicf("invalid funcenv reference %d", index);
21175|   232k|        *out = st->lookup_envs[index];
21176|   232k|    } else {
21177|  53.1k|        JanetFuncEnv *env = janet_gcalloc(JANET_MEMORY_FUNCENV, sizeof(JanetFuncEnv));
21178|  53.1k|        env->length = 0;
21179|  53.1k|        env->offset = 0;
21180|  53.1k|        env->as.values = NULL;
21181|  53.1k|        janet_v_push(st->lookup_envs, env);
  ------------------
  |  |  757|  53.1k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|  53.1k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|  53.1k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|  46.5k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  46.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|  46.5k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  46.5k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 6.64k, False: 46.5k]
  |  |  |  |  |  |  |  Branch (768:50): [True: 26.5k, False: 19.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  770|  33.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|  53.1k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  53.1k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21182|  53.1k|        int32_t offset = readnat(st, &data);
21183|  53.1k|        int32_t length = readnat(st, &data);
21184|  53.1k|        if (offset > 0) {
  ------------------
  |  Branch (21184:13): [True: 0, False: 53.1k]
  ------------------
21185|      0|            Janet fiberv;
21186|       |            /* On stack variant */
21187|      0|            data = unmarshal_one(st, data, &fiberv, flags);
21188|      0|            janet_asserttype(fiberv, JANET_FIBER, st);
21189|      0|            env->as.fiber = janet_unwrap_fiber(fiberv);
  ------------------
  |  |  859|      0|#define janet_unwrap_fiber(x) ((JanetFiber *)janet_nanbox_to_pointer(x))
  ------------------
21190|       |            /* Negative offset indicates untrusted input */
21191|      0|            env->offset = -offset;
21192|  53.1k|        } else {
21193|       |            /* Off stack variant */
21194|  53.1k|            if (length == 0) {
  ------------------
  |  Branch (21194:17): [True: 0, False: 53.1k]
  ------------------
21195|      0|                janet_panic("invalid funcenv length");
21196|      0|            }
21197|  53.1k|            env->as.values = array_allocate(sizeof(Janet), length);
21198|  53.1k|            if (!env->as.values) {
  ------------------
  |  Branch (21198:17): [True: 0, False: 53.1k]
  ------------------
21199|      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]
  |  |  ------------------
  ------------------
21200|      0|            }
21201|  53.1k|            env->offset = 0;
21202|   657k|            for (int32_t i = 0; i < length; i++)
  ------------------
  |  Branch (21202:33): [True: 604k, False: 53.1k]
  ------------------
21203|   604k|                data = unmarshal_one(st, data, env->as.values + i, flags);
21204|  53.1k|        }
21205|  53.1k|        env->length = length;
21206|  53.1k|        *out = env;
21207|  53.1k|    }
21208|   285k|    return data;
21209|   285k|}
janet.c:janet_asserttype:
21130|  6.66M|static void janet_asserttype(Janet x, JanetType t, UnmarshalState *st) {
21131|  6.66M|    if (!janet_checktype(x, t)) {
  ------------------
  |  |  806|  6.66M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [True: 0, False: 6.66M]
  |  |  ------------------
  |  |  807|  6.66M|        ? 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.66M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  6.66M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  6.66M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  6.66M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  6.66M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (21131:9): [True: 0, False: 6.66M]
  ------------------
21132|       |#ifdef JANET_MARSHAL_DEBUG
21133|       |        dump_reference_table(st);
21134|       |#else
21135|      0|        (void) st;
21136|      0|#endif
21137|      0|        janet_panicf("expected type %T, got %v", 1 << t, x);
21138|      0|    }
21139|  6.66M|}
janet.c:janet_parser_checkdead:
27652|   263k|static void janet_parser_checkdead(JanetParser *parser) {
27653|   263k|    if (parser->flag) janet_panic("parser is dead, cannot consume");
  ------------------
  |  Branch (27653:9): [True: 0, False: 263k]
  ------------------
27654|   263k|    if (parser->error) janet_panic("parser has unchecked error, cannot consume");
  ------------------
  |  Branch (27654:9): [True: 0, False: 263k]
  ------------------
27655|   263k|}
janet.c:delim_error:
27162|  1.48k|static void delim_error(JanetParser *parser, size_t stack_index, char c, const char *msg) {
27163|  1.48k|    JanetParseState *s = parser->states + stack_index;
27164|  1.48k|    JanetBuffer *buffer = janet_buffer(40);
27165|  1.48k|    if (msg) {
  ------------------
  |  Branch (27165:9): [True: 1.48k, False: 0]
  ------------------
27166|  1.48k|        janet_buffer_push_cstring(buffer, msg);
27167|  1.48k|    }
27168|  1.48k|    if (c) {
  ------------------
  |  Branch (27168:9): [True: 68, False: 1.41k]
  ------------------
27169|     68|        janet_buffer_push_u8(buffer, c);
27170|     68|    }
27171|  1.48k|    if (stack_index > 0) {
  ------------------
  |  Branch (27171:9): [True: 1.42k, False: 55]
  ------------------
27172|  1.42k|        janet_buffer_push_cstring(buffer, ", ");
27173|  1.42k|        if (s->flags & PFLAG_PARENS) {
  ------------------
  |  |27098|  1.42k|#define PFLAG_PARENS 0x400
  ------------------
  |  Branch (27173:13): [True: 113, False: 1.31k]
  ------------------
27174|    113|            janet_buffer_push_u8(buffer, '(');
27175|  1.31k|        } else if (s->flags & PFLAG_SQRBRACKETS) {
  ------------------
  |  |27099|  1.31k|#define PFLAG_SQRBRACKETS 0x800
  ------------------
  |  Branch (27175:20): [True: 45, False: 1.27k]
  ------------------
27176|     45|            janet_buffer_push_u8(buffer, '[');
27177|  1.27k|        } else if (s->flags & PFLAG_CURLYBRACKETS) {
  ------------------
  |  |27100|  1.27k|#define PFLAG_CURLYBRACKETS 0x1000
  ------------------
  |  Branch (27177:20): [True: 98, False: 1.17k]
  ------------------
27178|     98|            janet_buffer_push_u8(buffer, '{');
27179|  1.17k|        } else if (s->flags & PFLAG_STRING) {
  ------------------
  |  |27101|  1.17k|#define PFLAG_STRING 0x2000
  ------------------
  |  Branch (27179:20): [True: 367, False: 805]
  ------------------
27180|    367|            janet_buffer_push_u8(buffer, '"');
27181|    805|        } else if (s->flags & PFLAG_LONGSTRING) {
  ------------------
  |  |27102|    805|#define PFLAG_LONGSTRING 0x4000
  ------------------
  |  Branch (27181:20): [True: 171, False: 634]
  ------------------
27182|    171|            int32_t i;
27183|  2.24k|            for (i = 0; i < s->argn; i++) {
  ------------------
  |  Branch (27183:25): [True: 2.07k, False: 171]
  ------------------
27184|  2.07k|                janet_buffer_push_u8(buffer, '`');
27185|  2.07k|            }
27186|    171|        }
27187|  1.42k|        janet_formatb(buffer, " opened at line %d, column %d", (int32_t) s->line, (int32_t) s->column);
27188|  1.42k|    }
27189|  1.48k|    parser->error = (const char *) janet_string(buffer->data, buffer->count);
27190|  1.48k|    parser->flag |= JANET_PARSER_GENERATED_ERROR;
  ------------------
  |  |26992|  1.48k|#define JANET_PARSER_GENERATED_ERROR 0x2
  ------------------
27191|  1.48k|}
janet.c:pushstate:
27108|   105k|static void pushstate(JanetParser *p, Consumer consumer, int flags) {
27109|   105k|    JanetParseState s;
27110|   105k|    s.counter = 0;
27111|   105k|    s.argn = 0;
27112|   105k|    s.flags = flags;
27113|   105k|    s.consumer = consumer;
27114|   105k|    s.line = p->line;
27115|   105k|    s.column = p->column;
27116|   105k|    _pushstate(p, s);
27117|   105k|}
janet.c:root:
27579|   137k|static int root(JanetParser *p, JanetParseState *state, uint8_t c) {
27580|   137k|    switch (c) {
27581|  64.5k|        default:
  ------------------
  |  Branch (27581:9): [True: 64.5k, False: 73.2k]
  ------------------
27582|  64.5k|            if (is_whitespace(c)) return 1;
  ------------------
  |  Branch (27582:17): [True: 31.2k, False: 33.2k]
  ------------------
27583|  33.2k|            if (!janet_is_symbol_char(c)) {
  ------------------
  |  Branch (27583:17): [True: 158, False: 33.1k]
  ------------------
27584|    158|                p->error = "unexpected character";
27585|    158|                return 1;
27586|    158|            }
27587|  33.1k|            pushstate(p, tokenchar, PFLAG_TOKEN);
  ------------------
  |  |27106|  33.1k|#define PFLAG_TOKEN 0x40000
  ------------------
27588|  33.1k|            return 0;
27589|  22.2k|        case '\'':
  ------------------
  |  Branch (27589:9): [True: 22.2k, False: 115k]
  ------------------
27590|  26.3k|        case ',':
  ------------------
  |  Branch (27590:9): [True: 4.00k, False: 133k]
  ------------------
27591|  31.0k|        case ';':
  ------------------
  |  Branch (27591:9): [True: 4.79k, False: 133k]
  ------------------
27592|  35.9k|        case '~':
  ------------------
  |  Branch (27592:9): [True: 4.85k, False: 132k]
  ------------------
27593|  40.9k|        case '|':
  ------------------
  |  Branch (27593:9): [True: 4.99k, False: 132k]
  ------------------
27594|  40.9k|            pushstate(p, root, PFLAG_READERMAC | c);
  ------------------
  |  |27103|  40.9k|#define PFLAG_READERMAC 0x8000
  ------------------
27595|  40.9k|            return 1;
27596|  3.35k|        case '"':
  ------------------
  |  Branch (27596:9): [True: 3.35k, False: 134k]
  ------------------
27597|  3.35k|            pushstate(p, stringchar, PFLAG_STRING);
  ------------------
  |  |27101|  3.35k|#define PFLAG_STRING 0x2000
  ------------------
27598|  3.35k|            return 1;
27599|    445|        case '#':
  ------------------
  |  Branch (27599:9): [True: 445, False: 137k]
  ------------------
27600|    445|            pushstate(p, comment, PFLAG_COMMENT);
  ------------------
  |  |27105|    445|#define PFLAG_COMMENT 0x20000
  ------------------
27601|    445|            return 1;
27602|  3.08k|        case '@':
  ------------------
  |  Branch (27602:9): [True: 3.08k, False: 134k]
  ------------------
27603|  3.08k|            pushstate(p, atsign, PFLAG_ATSYM);
  ------------------
  |  |27104|  3.08k|#define PFLAG_ATSYM 0x10000
  ------------------
27604|  3.08k|            return 1;
27605|  1.86k|        case '`':
  ------------------
  |  Branch (27605:9): [True: 1.86k, False: 135k]
  ------------------
27606|  1.86k|            pushstate(p, longstring, PFLAG_LONGSTRING);
  ------------------
  |  |27102|  1.86k|#define PFLAG_LONGSTRING 0x4000
  ------------------
27607|  1.86k|            return 1;
27608|  5.22k|        case ')':
  ------------------
  |  Branch (27608:9): [True: 5.22k, False: 132k]
  ------------------
27609|  6.11k|        case ']':
  ------------------
  |  Branch (27609:9): [True: 892, False: 136k]
  ------------------
27610|  10.9k|        case '}': {
  ------------------
  |  Branch (27610:9): [True: 4.84k, False: 132k]
  ------------------
27611|  10.9k|            Janet ds;
27612|  10.9k|            if (p->statecount == 1) {
  ------------------
  |  Branch (27612:17): [True: 55, False: 10.9k]
  ------------------
27613|     55|                delim_error(p, 0, c, "unexpected closing delimiter ");
27614|     55|                return 1;
27615|     55|            }
27616|  10.9k|            if ((c == ')' && (state->flags & PFLAG_PARENS)) ||
  ------------------
  |  |27098|  5.21k|#define PFLAG_PARENS 0x400
  ------------------
  |  Branch (27616:18): [True: 5.21k, False: 5.69k]
  |  Branch (27616:30): [True: 5.20k, False: 4]
  ------------------
27617|  6.08k|                    (c == ']' && (state->flags & PFLAG_SQRBRACKETS))) {
  ------------------
  |  |27099|    882|#define PFLAG_SQRBRACKETS 0x800
  ------------------
  |  Branch (27617:22): [True: 882, False: 4.81k]
  |  Branch (27617:34): [True: 879, False: 3]
  ------------------
27618|  6.08k|                if (state->flags & PFLAG_ATSYM) {
  ------------------
  |  |27104|  6.08k|#define PFLAG_ATSYM 0x10000
  ------------------
  |  Branch (27618:21): [True: 406, False: 5.67k]
  ------------------
27619|    406|                    ds = close_array(p, state);
27620|  5.67k|                } else {
27621|  5.67k|                    ds = close_tuple(p, state, c == ']' ? JANET_TUPLE_FLAG_BRACKETCTOR : 0);
  ------------------
  |  | 1798|    588|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
  |  Branch (27621:48): [True: 588, False: 5.09k]
  ------------------
27622|  5.67k|                }
27623|  6.08k|            } else if (c == '}' && (state->flags & PFLAG_CURLYBRACKETS)) {
  ------------------
  |  |27100|  4.81k|#define PFLAG_CURLYBRACKETS 0x1000
  ------------------
  |  Branch (27623:24): [True: 4.81k, False: 7]
  |  Branch (27623:36): [True: 4.80k, False: 6]
  ------------------
27624|  4.80k|                if (state->argn & 1) {
  ------------------
  |  Branch (27624:21): [True: 9, False: 4.79k]
  ------------------
27625|      9|                    p->error = "struct and table literals expect even number of arguments";
27626|      9|                    return 1;
27627|      9|                }
27628|  4.79k|                if (state->flags & PFLAG_ATSYM) {
  ------------------
  |  |27104|  4.79k|#define PFLAG_ATSYM 0x10000
  ------------------
  |  Branch (27628:21): [True: 1.06k, False: 3.73k]
  ------------------
27629|  1.06k|                    ds = close_table(p, state);
27630|  3.73k|                } else {
27631|  3.73k|                    ds = close_struct(p, state);
27632|  3.73k|                }
27633|  4.79k|            } else {
27634|     13|                delim_error(p, p->statecount - 1, c, "mismatched delimiter ");
27635|     13|                return 1;
27636|     13|            }
27637|  10.8k|            popstate(p, ds);
27638|  10.8k|        }
27639|      0|        return 1;
27640|  6.32k|        case '(':
  ------------------
  |  Branch (27640:9): [True: 6.32k, False: 131k]
  ------------------
27641|  6.32k|            pushstate(p, root, PFLAG_CONTAINER | PFLAG_PARENS);
  ------------------
  |  |27096|  6.32k|#define PFLAG_CONTAINER 0x100
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_PARENS);
  ------------------
  |  |27098|  6.32k|#define PFLAG_PARENS 0x400
  ------------------
27642|  6.32k|            return 1;
27643|  1.28k|        case '[':
  ------------------
  |  Branch (27643:9): [True: 1.28k, False: 136k]
  ------------------
27644|  1.28k|            pushstate(p, root, PFLAG_CONTAINER | PFLAG_SQRBRACKETS);
  ------------------
  |  |27096|  1.28k|#define PFLAG_CONTAINER 0x100
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_SQRBRACKETS);
  ------------------
  |  |27099|  1.28k|#define PFLAG_SQRBRACKETS 0x800
  ------------------
27645|  1.28k|            return 1;
27646|  5.03k|        case '{':
  ------------------
  |  Branch (27646:9): [True: 5.03k, False: 132k]
  ------------------
27647|  5.03k|            pushstate(p, root, PFLAG_CONTAINER | PFLAG_CURLYBRACKETS);
  ------------------
  |  |27096|  5.03k|#define PFLAG_CONTAINER 0x100
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_CURLYBRACKETS);
  ------------------
  |  |27100|  5.03k|#define PFLAG_CURLYBRACKETS 0x1000
  ------------------
27648|  5.03k|            return 1;
27649|   137k|    }
27650|   137k|}
janet.c:is_whitespace:
26995|  64.5k|static int is_whitespace(uint8_t c) {
26996|  64.5k|    return c == ' '
  ------------------
  |  Branch (26996:12): [True: 1.59k, False: 62.9k]
  ------------------
26997|  62.9k|           || c == '\t'
  ------------------
  |  Branch (26997:15): [True: 2.26k, False: 60.6k]
  ------------------
26998|  60.6k|           || c == '\n'
  ------------------
  |  Branch (26998:15): [True: 7.02k, False: 53.6k]
  ------------------
26999|  53.6k|           || c == '\r'
  ------------------
  |  Branch (26999:15): [True: 3.05k, False: 50.5k]
  ------------------
27000|  50.5k|           || c == '\0'
  ------------------
  |  Branch (27000:15): [True: 13.8k, False: 36.7k]
  ------------------
27001|  36.7k|           || c == '\v'
  ------------------
  |  Branch (27001:15): [True: 2.20k, False: 34.5k]
  ------------------
27002|  34.5k|           || c == '\f';
  ------------------
  |  Branch (27002:15): [True: 1.21k, False: 33.2k]
  ------------------
27003|  64.5k|}
janet.c:stringchar:
27374|  17.3k|static int stringchar(JanetParser *p, JanetParseState *state, uint8_t c) {
27375|       |    /* Enter escape */
27376|  17.3k|    if (c == '\\') {
  ------------------
  |  Branch (27376:9): [True: 2.21k, False: 15.1k]
  ------------------
27377|  2.21k|        state->consumer = escape1;
27378|  2.21k|        return 1;
27379|  2.21k|    }
27380|       |    /* String end */
27381|  15.1k|    if (c == '"') {
  ------------------
  |  Branch (27381:9): [True: 3.24k, False: 11.9k]
  ------------------
27382|  3.24k|        return stringend(p, state);
27383|  3.24k|    }
27384|       |    /* normal char */
27385|  11.9k|    if (c != '\n' && c != '\r')
  ------------------
  |  Branch (27385:9): [True: 11.3k, False: 528]
  |  Branch (27385:22): [True: 11.1k, False: 254]
  ------------------
27386|  11.1k|        push_buf(p, c);
27387|  11.9k|    return 1;
27388|  15.1k|}
janet.c:escape1:
27289|  2.21k|static int escape1(JanetParser *p, JanetParseState *state, uint8_t c) {
27290|  2.21k|    int e = checkescape(c);
27291|  2.21k|    if (e < 0) {
  ------------------
  |  Branch (27291:9): [True: 41, False: 2.17k]
  ------------------
27292|     41|        p->error = "invalid string escape sequence";
27293|     41|        return 1;
27294|     41|    }
27295|  2.17k|    if (c == 'x') {
  ------------------
  |  Branch (27295:9): [True: 240, False: 1.93k]
  ------------------
27296|    240|        state->counter = 2;
27297|    240|        state->argn = 0;
27298|    240|        state->consumer = escapeh;
27299|  1.93k|    } else if (c == 'u' || c == 'U') {
  ------------------
  |  Branch (27299:16): [True: 518, False: 1.41k]
  |  Branch (27299:28): [True: 197, False: 1.22k]
  ------------------
27300|    715|        state->counter = c == 'u' ? 4 : 6;
  ------------------
  |  Branch (27300:26): [True: 518, False: 197]
  ------------------
27301|    715|        state->argn = 0;
27302|    715|        state->consumer = escapeu;
27303|  1.22k|    } else {
27304|  1.22k|        push_buf(p, (uint8_t) e);
27305|  1.22k|        state->consumer = stringchar;
27306|  1.22k|    }
27307|  2.17k|    return 1;
27308|  2.21k|}
janet.c:checkescape:
27193|  2.21k|static int checkescape(uint8_t c) {
27194|  2.21k|    switch (c) {
27195|     41|        default:
  ------------------
  |  Branch (27195:9): [True: 41, False: 2.17k]
  ------------------
27196|     41|            return -1;
27197|    240|        case 'x':
  ------------------
  |  Branch (27197:9): [True: 240, False: 1.97k]
  ------------------
27198|    758|        case 'u':
  ------------------
  |  Branch (27198:9): [True: 518, False: 1.70k]
  ------------------
27199|    955|        case 'U':
  ------------------
  |  Branch (27199:9): [True: 197, False: 2.02k]
  ------------------
27200|    955|            return 1;
27201|     68|        case 'n':
  ------------------
  |  Branch (27201:9): [True: 68, False: 2.15k]
  ------------------
27202|     68|            return '\n';
27203|     92|        case 't':
  ------------------
  |  Branch (27203:9): [True: 92, False: 2.12k]
  ------------------
27204|     92|            return '\t';
27205|     72|        case 'r':
  ------------------
  |  Branch (27205:9): [True: 72, False: 2.14k]
  ------------------
27206|     72|            return '\r';
27207|     80|        case '0':
  ------------------
  |  Branch (27207:9): [True: 80, False: 2.13k]
  ------------------
27208|     80|            return '\0';
27209|     85|        case 'z':
  ------------------
  |  Branch (27209:9): [True: 85, False: 2.13k]
  ------------------
27210|     85|            return '\0';
27211|     80|        case 'f':
  ------------------
  |  Branch (27211:9): [True: 80, False: 2.13k]
  ------------------
27212|     80|            return '\f';
27213|     71|        case 'v':
  ------------------
  |  Branch (27213:9): [True: 71, False: 2.14k]
  ------------------
27214|     71|            return '\v';
27215|     75|        case 'a':
  ------------------
  |  Branch (27215:9): [True: 75, False: 2.14k]
  ------------------
27216|     75|            return '\a';
27217|     72|        case 'b':
  ------------------
  |  Branch (27217:9): [True: 72, False: 2.14k]
  ------------------
27218|     72|            return '\b';
27219|     81|        case '\'':
  ------------------
  |  Branch (27219:9): [True: 81, False: 2.13k]
  ------------------
27220|     81|            return '\'';
27221|     77|        case '?':
  ------------------
  |  Branch (27221:9): [True: 77, False: 2.14k]
  ------------------
27222|     77|            return '?';
27223|     76|        case 'e':
  ------------------
  |  Branch (27223:9): [True: 76, False: 2.14k]
  ------------------
27224|     76|            return 27;
27225|     93|        case '"':
  ------------------
  |  Branch (27225:9): [True: 93, False: 2.12k]
  ------------------
27226|     93|            return '"';
27227|    200|        case '\\':
  ------------------
  |  Branch (27227:9): [True: 200, False: 2.01k]
  ------------------
27228|    200|            return '\\';
27229|  2.21k|    }
27230|  2.21k|}
janet.c:escapeh:
27253|    460|static int escapeh(JanetParser *p, JanetParseState *state, uint8_t c) {
27254|    460|    int digit = to_hex(c);
27255|    460|    if (digit < 0) {
  ------------------
  |  Branch (27255:9): [True: 34, False: 426]
  ------------------
27256|     34|        p->error = "invalid hex digit in hex escape";
27257|     34|        return 1;
27258|     34|    }
27259|    426|    state->argn = (state->argn << 4) + digit;
27260|    426|    state->counter--;
27261|    426|    if (!state->counter) {
  ------------------
  |  Branch (27261:9): [True: 206, False: 220]
  ------------------
27262|    206|        push_buf(p, (uint8_t)(state->argn & 0xFF));
27263|    206|        state->argn = 0;
27264|    206|        state->consumer = stringchar;
27265|    206|    }
27266|    426|    return 1;
27267|    460|}
janet.c:to_hex:
27058|  3.53k|static int to_hex(uint8_t c) {
27059|  3.53k|    if (c >= '0' && c <= '9') {
  ------------------
  |  Branch (27059:9): [True: 3.47k, False: 61]
  |  Branch (27059:21): [True: 1.99k, False: 1.48k]
  ------------------
27060|  1.99k|        return c - '0';
27061|  1.99k|    } else if (c >= 'A' && c <= 'F') {
  ------------------
  |  Branch (27061:16): [True: 1.48k, False: 67]
  |  Branch (27061:28): [True: 502, False: 980]
  ------------------
27062|    502|        return 10 + c - 'A';
27063|  1.04k|    } else if (c >= 'a' && c <= 'f') {
  ------------------
  |  Branch (27063:16): [True: 969, False: 78]
  |  Branch (27063:28): [True: 940, False: 29]
  ------------------
27064|    940|        return 10 + c - 'a';
27065|    940|    } else {
27066|    107|        return -1;
27067|    107|    }
27068|  3.53k|}
janet.c:escapeu:
27269|  3.07k|static int escapeu(JanetParser *p, JanetParseState *state, uint8_t c) {
27270|  3.07k|    int digit = to_hex(c);
27271|  3.07k|    if (digit < 0) {
  ------------------
  |  Branch (27271:9): [True: 73, False: 3.00k]
  ------------------
27272|     73|        p->error = "invalid hex digit in unicode escape";
27273|     73|        return 1;
27274|     73|    }
27275|  3.00k|    state->argn = (state->argn << 4) + digit;
27276|  3.00k|    state->counter--;
27277|  3.00k|    if (!state->counter) {
  ------------------
  |  Branch (27277:9): [True: 642, False: 2.36k]
  ------------------
27278|    642|        if (state->argn > 0x10FFFF) {
  ------------------
  |  Branch (27278:13): [True: 7, False: 635]
  ------------------
27279|      7|            p->error = "invalid unicode codepoint";
27280|      7|            return 1;
27281|      7|        }
27282|    635|        write_codepoint(p, state->argn);
27283|    635|        state->argn = 0;
27284|    635|        state->consumer = stringchar;
27285|    635|    }
27286|  2.99k|    return 1;
27287|  3.00k|}
janet.c:write_codepoint:
27235|    635|static void write_codepoint(JanetParser *p, int32_t codepoint) {
27236|    635|    if (codepoint <= 0x7F) {
  ------------------
  |  Branch (27236:9): [True: 107, False: 528]
  ------------------
27237|    107|        push_buf(p, (uint8_t) codepoint);
27238|    528|    } else if (codepoint <= 0x7FF) {
  ------------------
  |  Branch (27238:16): [True: 125, False: 403]
  ------------------
27239|    125|        push_buf(p, (uint8_t)((codepoint >>  6) & 0x1F) | 0xC0);
27240|    125|        push_buf(p, (uint8_t)((codepoint >>  0) & 0x3F) | 0x80);
27241|    403|    } else if (codepoint <= 0xFFFF) {
  ------------------
  |  Branch (27241:16): [True: 255, False: 148]
  ------------------
27242|    255|        push_buf(p, (uint8_t)((codepoint >> 12) & 0x0F) | 0xE0);
27243|    255|        push_buf(p, (uint8_t)((codepoint >>  6) & 0x3F) | 0x80);
27244|    255|        push_buf(p, (uint8_t)((codepoint >>  0) & 0x3F) | 0x80);
27245|    255|    } else {
27246|    148|        push_buf(p, (uint8_t)((codepoint >> 18) & 0x07) | 0xF0);
27247|    148|        push_buf(p, (uint8_t)((codepoint >> 12) & 0x3F) | 0x80);
27248|    148|        push_buf(p, (uint8_t)((codepoint >>  6) & 0x3F) | 0x80);
27249|    148|        push_buf(p, (uint8_t)((codepoint >>  0) & 0x3F) | 0x80);
27250|    148|    }
27251|    635|}
janet.c:stringend:
27310|  5.15k|static int stringend(JanetParser *p, JanetParseState *state) {
27311|  5.15k|    Janet ret;
27312|  5.15k|    uint8_t *bufstart = p->buf;
27313|  5.15k|    int32_t buflen = (int32_t) p->bufcount;
27314|  5.15k|    if (state->flags & PFLAG_LONGSTRING) {
  ------------------
  |  |27102|  5.15k|#define PFLAG_LONGSTRING 0x4000
  ------------------
  |  Branch (27314:9): [True: 1.90k, False: 3.24k]
  ------------------
27315|       |        /* Post process to remove leading whitespace */
27316|  1.90k|        JanetParseState top = p->states[p->statecount - 1];
27317|  1.90k|        int32_t indent_col = (int32_t) top.column - 1;
27318|  1.90k|        uint8_t *r = bufstart, *end = r + buflen;
27319|       |        /* Unless there are only spaces before EOLs, disable reindenting */
27320|  1.90k|        int reindent = 1;
27321|  9.68k|        while (reindent && (r < end)) {
  ------------------
  |  Branch (27321:16): [True: 9.53k, False: 145]
  |  Branch (27321:28): [True: 7.77k, False: 1.76k]
  ------------------
27322|  7.77k|            if (*r++ == '\n') {
  ------------------
  |  Branch (27322:17): [True: 1.36k, False: 6.40k]
  ------------------
27323|  1.47k|                for (int32_t j = 0; (r < end) && (*r != '\n') && (j < indent_col); j++, r++) {
  ------------------
  |  Branch (27323:37): [True: 1.10k, False: 378]
  |  Branch (27323:50): [True: 619, False: 481]
  |  Branch (27323:66): [True: 330, False: 289]
  ------------------
27324|    330|                    if (*r != ' ') {
  ------------------
  |  Branch (27324:25): [True: 221, False: 109]
  ------------------
27325|    221|                        reindent = 0;
27326|    221|                        break;
27327|    221|                    }
27328|    330|                }
27329|  1.36k|                if ((r + 1) < end && *r == '\r' && *(r + 1) == '\n') reindent = 1;
  ------------------
  |  Branch (27329:21): [True: 847, False: 522]
  |  Branch (27329:38): [True: 281, False: 566]
  |  Branch (27329:52): [True: 195, False: 86]
  ------------------
27330|  1.36k|            }
27331|  7.77k|        }
27332|       |        /* Now reindent if able */
27333|  1.90k|        if (reindent) {
  ------------------
  |  Branch (27333:13): [True: 1.76k, False: 145]
  ------------------
27334|  1.76k|            uint8_t *w = bufstart;
27335|  1.76k|            r = bufstart;
27336|  8.84k|            while (r < end) {
  ------------------
  |  Branch (27336:20): [True: 7.07k, False: 1.76k]
  ------------------
27337|  7.07k|                if (*r == '\n') {
  ------------------
  |  Branch (27337:21): [True: 1.14k, False: 5.93k]
  ------------------
27338|  1.14k|                    *w++ = *r++;
27339|  1.26k|                    for (int32_t j = 0; (r < end) && (*r != '\n') && (j < indent_col); j++, r++);
  ------------------
  |  Branch (27339:41): [True: 884, False: 378]
  |  Branch (27339:54): [True: 409, False: 475]
  |  Branch (27339:70): [True: 120, False: 289]
  ------------------
27340|  1.14k|                    if ((r + 1) < end && *r == '\r' && *(r + 1) == '\n') *w++ = *r++;
  ------------------
  |  Branch (27340:25): [True: 703, False: 439]
  |  Branch (27340:42): [True: 204, False: 499]
  |  Branch (27340:56): [True: 119, False: 85]
  ------------------
27341|  5.93k|                } else {
27342|  5.93k|                    *w++ = *r++;
27343|  5.93k|                }
27344|  7.07k|            }
27345|  1.76k|            buflen = (int32_t)(w - bufstart);
27346|  1.76k|        }
27347|       |        /* Check for leading EOL so we can remove it */
27348|  1.90k|        if (buflen > 1 && bufstart[0] == '\r' && bufstart[1] == '\n') { /* Windows EOL */
  ------------------
  |  Branch (27348:13): [True: 1.11k, False: 795]
  |  Branch (27348:27): [True: 192, False: 922]
  |  Branch (27348:50): [True: 74, False: 118]
  ------------------
27349|     74|            buflen = buflen - 2;
27350|     74|            bufstart = bufstart + 2;
27351|  1.83k|        } else if (buflen > 0 && bufstart[0] == '\n') { /* Unix EOL */
  ------------------
  |  Branch (27351:20): [True: 1.83k, False: 0]
  |  Branch (27351:34): [True: 317, False: 1.51k]
  ------------------
27352|    317|            buflen--;
27353|    317|            bufstart++;
27354|    317|        }
27355|       |        /* Check for trailing EOL so we can remove it */
27356|  1.90k|        if (buflen > 1 && bufstart[buflen - 2] == '\r' && bufstart[buflen - 1] == '\n') { /* Windows EOL */
  ------------------
  |  Branch (27356:13): [True: 957, False: 952]
  |  Branch (27356:27): [True: 171, False: 786]
  |  Branch (27356:59): [True: 43, False: 128]
  ------------------
27357|     43|            buflen = buflen - 2;
27358|  1.86k|        } else if (buflen > 0 && bufstart[buflen - 1] == '\n') { /* Unix EOL */
  ------------------
  |  Branch (27358:20): [True: 1.64k, False: 223]
  |  Branch (27358:34): [True: 121, False: 1.52k]
  ------------------
27359|    121|            buflen--;
27360|    121|        }
27361|  1.90k|    }
27362|  5.15k|    if (state->flags & PFLAG_BUFFER) {
  ------------------
  |  |27097|  5.15k|#define PFLAG_BUFFER 0x200
  ------------------
  |  Branch (27362:9): [True: 542, False: 4.61k]
  ------------------
27363|    542|        JanetBuffer *b = janet_buffer(buflen);
27364|    542|        janet_buffer_push_bytes(b, bufstart, buflen);
27365|    542|        ret = janet_wrap_buffer(b);
  ------------------
  |  |  847|    542|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  825|    542|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    542|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    542|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27366|  4.61k|    } else {
27367|  4.61k|        ret = janet_wrap_string(janet_string(bufstart, buflen));
  ------------------
  |  |  848|  4.61k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|  4.61k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  4.61k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  4.61k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27368|  4.61k|    }
27369|  5.15k|    p->bufcount = 0;
27370|  5.15k|    popstate(p, ret);
27371|  5.15k|    return 1;
27372|  5.15k|}
janet.c:comment:
27456|  4.55k|static int comment(JanetParser *p, JanetParseState *state, uint8_t c) {
27457|  4.55k|    (void) state;
27458|  4.55k|    if (c == '\n') {
  ------------------
  |  Branch (27458:9): [True: 445, False: 4.10k]
  ------------------
27459|    445|        p->statecount--;
27460|    445|        p->bufcount = 0;
27461|  4.10k|    } else {
27462|  4.10k|        push_buf(p, c);
27463|  4.10k|    }
27464|  4.55k|    return 1;
27465|  4.55k|}
janet.c:atsign:
27551|  3.08k|static int atsign(JanetParser *p, JanetParseState *state, uint8_t c) {
27552|  3.08k|    (void) state;
27553|  3.08k|    p->statecount--;
27554|  3.08k|    switch (c) {
27555|  1.15k|        case '{':
  ------------------
  |  Branch (27555:9): [True: 1.15k, False: 1.93k]
  ------------------
27556|  1.15k|            pushstate(p, root, PFLAG_CONTAINER | PFLAG_CURLYBRACKETS | PFLAG_ATSYM);
  ------------------
  |  |27096|  1.15k|#define PFLAG_CONTAINER 0x100
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_CURLYBRACKETS | PFLAG_ATSYM);
  ------------------
  |  |27100|  1.15k|#define PFLAG_CURLYBRACKETS 0x1000
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_CURLYBRACKETS | PFLAG_ATSYM);
  ------------------
  |  |27104|  1.15k|#define PFLAG_ATSYM 0x10000
  ------------------
27557|  1.15k|            return 1;
27558|    343|        case '"':
  ------------------
  |  Branch (27558:9): [True: 343, False: 2.74k]
  ------------------
27559|    343|            pushstate(p, stringchar, PFLAG_BUFFER | PFLAG_STRING);
  ------------------
  |  |27097|    343|#define PFLAG_BUFFER 0x200
  ------------------
                          pushstate(p, stringchar, PFLAG_BUFFER | PFLAG_STRING);
  ------------------
  |  |27101|    343|#define PFLAG_STRING 0x2000
  ------------------
27560|    343|            return 1;
27561|    214|        case '`':
  ------------------
  |  Branch (27561:9): [True: 214, False: 2.87k]
  ------------------
27562|    214|            pushstate(p, longstring, PFLAG_BUFFER | PFLAG_LONGSTRING);
  ------------------
  |  |27097|    214|#define PFLAG_BUFFER 0x200
  ------------------
                          pushstate(p, longstring, PFLAG_BUFFER | PFLAG_LONGSTRING);
  ------------------
  |  |27102|    214|#define PFLAG_LONGSTRING 0x4000
  ------------------
27563|    214|            return 1;
27564|    372|        case '[':
  ------------------
  |  Branch (27564:9): [True: 372, False: 2.71k]
  ------------------
27565|    372|            pushstate(p, root, PFLAG_CONTAINER | PFLAG_SQRBRACKETS | PFLAG_ATSYM);
  ------------------
  |  |27096|    372|#define PFLAG_CONTAINER 0x100
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_SQRBRACKETS | PFLAG_ATSYM);
  ------------------
  |  |27099|    372|#define PFLAG_SQRBRACKETS 0x800
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_SQRBRACKETS | PFLAG_ATSYM);
  ------------------
  |  |27104|    372|#define PFLAG_ATSYM 0x10000
  ------------------
27566|    372|            return 1;
27567|    206|        case '(':
  ------------------
  |  Branch (27567:9): [True: 206, False: 2.88k]
  ------------------
27568|    206|            pushstate(p, root, PFLAG_CONTAINER | PFLAG_PARENS | PFLAG_ATSYM);
  ------------------
  |  |27096|    206|#define PFLAG_CONTAINER 0x100
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_PARENS | PFLAG_ATSYM);
  ------------------
  |  |27098|    206|#define PFLAG_PARENS 0x400
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_PARENS | PFLAG_ATSYM);
  ------------------
  |  |27104|    206|#define PFLAG_ATSYM 0x10000
  ------------------
27569|    206|            return 1;
27570|    801|        default:
  ------------------
  |  Branch (27570:9): [True: 801, False: 2.28k]
  ------------------
27571|    801|            break;
27572|  3.08k|    }
27573|    801|    pushstate(p, tokenchar, PFLAG_TOKEN);
  ------------------
  |  |27106|    801|#define PFLAG_TOKEN 0x40000
  ------------------
27574|    801|    push_buf(p, '@'); /* Push the leading at-sign that was dropped */
27575|    801|    return 0;
27576|  3.08k|}
janet.c:longstring:
27507|  16.2k|static int longstring(JanetParser *p, JanetParseState *state, uint8_t c) {
27508|  16.2k|    if (state->flags & PFLAG_INSTRING) {
  ------------------
  |  |27505|  16.2k|#define PFLAG_INSTRING 0x100000
  ------------------
  |  Branch (27508:9): [True: 9.54k, False: 6.67k]
  ------------------
27509|       |        /* We are inside the long string */
27510|  9.54k|        if (c == '`') {
  ------------------
  |  Branch (27510:13): [True: 2.10k, False: 7.44k]
  ------------------
27511|  2.10k|            state->flags |= PFLAG_END_CANDIDATE;
  ------------------
  |  |27506|  2.10k|#define PFLAG_END_CANDIDATE 0x200000
  ------------------
27512|  2.10k|            state->flags &= ~PFLAG_INSTRING;
  ------------------
  |  |27505|  2.10k|#define PFLAG_INSTRING 0x100000
  ------------------
27513|  2.10k|            state->counter = 1; /* Use counter to keep track of number of '=' seen */
27514|  2.10k|            return 1;
27515|  2.10k|        }
27516|  7.44k|        push_buf(p, c);
27517|  7.44k|        return 1;
27518|  9.54k|    } else if (state->flags & PFLAG_END_CANDIDATE) {
  ------------------
  |  |27506|  6.67k|#define PFLAG_END_CANDIDATE 0x200000
  ------------------
  |  Branch (27518:16): [True: 2.60k, False: 4.07k]
  ------------------
27519|  2.60k|        int i;
27520|       |        /* We are checking a potential end of the string */
27521|  2.60k|        if (state->counter == state->argn) {
  ------------------
  |  Branch (27521:13): [True: 1.90k, False: 698]
  ------------------
27522|  1.90k|            stringend(p, state);
27523|  1.90k|            return 0;
27524|  1.90k|        }
27525|    698|        if (c == '`' && state->counter < state->argn) {
  ------------------
  |  Branch (27525:13): [True: 507, False: 191]
  |  Branch (27525:25): [True: 507, False: 0]
  ------------------
27526|    507|            state->counter++;
27527|    507|            return 1;
27528|    507|        }
27529|       |        /* Failed end candidate */
27530|    798|        for (i = 0; i < state->counter; i++) {
  ------------------
  |  Branch (27530:21): [True: 607, False: 191]
  ------------------
27531|    607|            push_buf(p, '`');
27532|    607|        }
27533|    191|        push_buf(p, c);
27534|    191|        state->counter = 0;
27535|    191|        state->flags &= ~PFLAG_END_CANDIDATE;
  ------------------
  |  |27506|    191|#define PFLAG_END_CANDIDATE 0x200000
  ------------------
27536|    191|        state->flags |= PFLAG_INSTRING;
  ------------------
  |  |27505|    191|#define PFLAG_INSTRING 0x100000
  ------------------
27537|    191|        return 1;
27538|  4.07k|    } else {
27539|       |        /* We are at beginning of string */
27540|  4.07k|        state->argn++;
27541|  4.07k|        if (c != '`') {
  ------------------
  |  Branch (27541:13): [True: 2.08k, False: 1.99k]
  ------------------
27542|  2.08k|            state->flags |= PFLAG_INSTRING;
  ------------------
  |  |27505|  2.08k|#define PFLAG_INSTRING 0x100000
  ------------------
27543|  2.08k|            push_buf(p, c);
27544|  2.08k|        }
27545|  4.07k|        return 1;
27546|  4.07k|    }
27547|  16.2k|}
janet.c:close_array:
27475|    406|static Janet close_array(JanetParser *p, JanetParseState *state) {
27476|    406|    JanetArray *array = janet_array(state->argn);
27477|  1.16k|    for (int32_t i = state->argn - 1; i >= 0; i--)
  ------------------
  |  Branch (27477:39): [True: 762, False: 406]
  ------------------
27478|    762|        array->data[i] = p->args[--p->argcount];
27479|    406|    array->count = state->argn;
27480|    406|    return janet_wrap_array(array);
  ------------------
  |  |  845|    406|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  825|    406|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    406|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    406|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27481|    406|}
janet.c:close_tuple:
27467|  5.67k|static Janet close_tuple(JanetParser *p, JanetParseState *state, int32_t flag) {
27468|  5.67k|    Janet *ret = janet_tuple_begin(state->argn);
27469|  5.67k|    janet_tuple_flag(ret) |= flag;
  ------------------
  |  | 1806|  5.67k|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1800|  5.67k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
27470|  21.8k|    for (int32_t i = state->argn - 1; i >= 0; i--)
  ------------------
  |  Branch (27470:39): [True: 16.1k, False: 5.67k]
  ------------------
27471|  16.1k|        ret[i] = p->args[--p->argcount];
27472|  5.67k|    return janet_wrap_tuple(janet_tuple_end(ret));
  ------------------
  |  |  843|  5.67k|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|  5.67k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  5.67k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  5.67k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27473|  5.67k|}
janet.c:close_table:
27494|  1.06k|static Janet close_table(JanetParser *p, JanetParseState *state) {
27495|  1.06k|    JanetTable *table = janet_table(state->argn >> 1);
27496|  2.53k|    for (size_t i = p->argcount - state->argn; i < p->argcount; i += 2) {
  ------------------
  |  Branch (27496:48): [True: 1.46k, False: 1.06k]
  ------------------
27497|  1.46k|        Janet key = p->args[i];
27498|  1.46k|        Janet value = p->args[i + 1];
27499|  1.46k|        janet_table_put(table, key, value);
27500|  1.46k|    }
27501|  1.06k|    p->argcount -= state->argn;
27502|  1.06k|    return janet_wrap_table(table);
  ------------------
  |  |  846|  1.06k|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  825|  1.06k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.06k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.06k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27503|  1.06k|}
janet.c:close_struct:
27483|  3.73k|static Janet close_struct(JanetParser *p, JanetParseState *state) {
27484|  3.73k|    JanetKV *st = janet_struct_begin(state->argn >> 1);
27485|  8.84k|    for (size_t i = p->argcount - state->argn; i < p->argcount; i += 2) {
  ------------------
  |  Branch (27485:48): [True: 5.11k, False: 3.73k]
  ------------------
27486|  5.11k|        Janet key = p->args[i];
27487|  5.11k|        Janet value = p->args[i + 1];
27488|  5.11k|        janet_struct_put(st, key, value);
27489|  5.11k|    }
27490|  3.73k|    p->argcount -= state->argn;
27491|  3.73k|    return janet_wrap_struct(janet_struct_end(st));
  ------------------
  |  |  842|  3.73k|#define janet_wrap_struct(s) janet_nanbox_wrap_c((s), JANET_STRUCT)
  |  |  ------------------
  |  |  |  |  828|  3.73k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  3.73k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  3.73k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27492|  3.73k|}
janet.c:popstate:
27119|  49.2k|static void popstate(JanetParser *p, Janet val) {
27120|  88.7k|    for (;;) {
27121|  88.7k|        JanetParseState top = p->states[--p->statecount];
27122|  88.7k|        JanetParseState *newtop = p->states + p->statecount - 1;
27123|       |        /* Source mapping info */
27124|  88.7k|        if (janet_checktype(val, JANET_TUPLE)) {
  ------------------
  |  |  806|  88.7k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 45.1k, False: 43.5k]
  |  |  |  Branch (806:6): [Folded, False: 88.7k]
  |  |  ------------------
  |  |  807|  88.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|  88.7k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  88.7k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  88.7k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  88.7k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  88.7k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27125|  45.1k|            janet_tuple_sm_line(janet_unwrap_tuple(val)) = (int32_t) top.line;
  ------------------
  |  | 1804|  45.1k|#define janet_tuple_sm_line(t) (janet_tuple_head(t)->sm_line)
  |  |  ------------------
  |  |  |  | 1800|  45.1k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
27126|  45.1k|            janet_tuple_sm_column(janet_unwrap_tuple(val)) = (int32_t) top.column;
  ------------------
  |  | 1805|  45.1k|#define janet_tuple_sm_column(t) (janet_tuple_head(t)->sm_column)
  |  |  ------------------
  |  |  |  | 1800|  45.1k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
27127|  45.1k|        }
27128|  88.7k|        if (newtop->flags & PFLAG_CONTAINER) {
  ------------------
  |  |27096|  88.7k|#define PFLAG_CONTAINER 0x100
  ------------------
  |  Branch (27128:13): [True: 49.2k, False: 39.4k]
  ------------------
27129|  49.2k|            newtop->argn++;
27130|       |            /* Keep track of number of values in the root state */
27131|  49.2k|            if (p->statecount == 1) {
  ------------------
  |  Branch (27131:17): [True: 15.0k, False: 34.2k]
  ------------------
27132|  15.0k|                p->pending++;
27133|       |                /* Root items are always wrapped in a tuple for source map info. */
27134|  15.0k|                const Janet *tup = janet_tuple_n(&val, 1);
27135|  15.0k|                janet_tuple_sm_line(tup) = (int32_t) top.line;
  ------------------
  |  | 1804|  15.0k|#define janet_tuple_sm_line(t) (janet_tuple_head(t)->sm_line)
  |  |  ------------------
  |  |  |  | 1800|  15.0k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
27136|  15.0k|                janet_tuple_sm_column(tup) = (int32_t) top.column;
  ------------------
  |  | 1805|  15.0k|#define janet_tuple_sm_column(t) (janet_tuple_head(t)->sm_column)
  |  |  ------------------
  |  |  |  | 1800|  15.0k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
27137|  15.0k|                val = janet_wrap_tuple(tup);
  ------------------
  |  |  843|  15.0k|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|  15.0k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  15.0k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  15.0k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27138|  15.0k|            }
27139|  49.2k|            push_arg(p, val);
27140|  49.2k|            return;
27141|  49.2k|        } else if (newtop->flags & PFLAG_READERMAC) {
  ------------------
  |  |27103|  39.4k|#define PFLAG_READERMAC 0x8000
  ------------------
  |  Branch (27141:20): [True: 39.4k, False: 0]
  ------------------
27142|  39.4k|            Janet *t = janet_tuple_begin(2);
27143|  39.4k|            int c = newtop->flags & 0xFF;
27144|  39.4k|            const char *which =
27145|  39.4k|                (c == '\'') ? "quote" :
  ------------------
  |  Branch (27145:17): [True: 21.6k, False: 17.8k]
  ------------------
27146|  39.4k|                (c == ',') ? "unquote" :
  ------------------
  |  Branch (27146:17): [True: 3.66k, False: 14.1k]
  ------------------
27147|  17.8k|                (c == ';') ? "splice" :
  ------------------
  |  Branch (27147:17): [True: 4.58k, False: 9.56k]
  ------------------
27148|  14.1k|                (c == '|') ? "short-fn" :
  ------------------
  |  Branch (27148:17): [True: 4.84k, False: 4.72k]
  ------------------
27149|  9.56k|                (c == '~') ? "quasiquote" : "<unknown>";
  ------------------
  |  Branch (27149:17): [True: 4.72k, False: 0]
  ------------------
27150|  39.4k|            t[0] = janet_csymbolv(which);
  ------------------
  |  | 1837|  39.4k|#define janet_csymbolv(cstr) janet_wrap_symbol(janet_csymbol(cstr))
  |  |  ------------------
  |  |  |  |  849|  39.4k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  39.4k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  39.4k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  39.4k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27151|  39.4k|            t[1] = val;
27152|       |            /* Quote source mapping info */
27153|  39.4k|            janet_tuple_sm_line(t) = (int32_t) newtop->line;
  ------------------
  |  | 1804|  39.4k|#define janet_tuple_sm_line(t) (janet_tuple_head(t)->sm_line)
  |  |  ------------------
  |  |  |  | 1800|  39.4k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
27154|  39.4k|            janet_tuple_sm_column(t) = (int32_t) newtop->column;
  ------------------
  |  | 1805|  39.4k|#define janet_tuple_sm_column(t) (janet_tuple_head(t)->sm_column)
  |  |  ------------------
  |  |  |  | 1800|  39.4k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
27155|  39.4k|            val = janet_wrap_tuple(janet_tuple_end(t));
  ------------------
  |  |  843|  39.4k|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|  39.4k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  39.4k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  39.4k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27156|  39.4k|        } else {
27157|      0|            return;
27158|      0|        }
27159|  88.7k|    }
27160|  49.2k|}
janet.c:tokenchar:
27403|   141k|static int tokenchar(JanetParser *p, JanetParseState *state, uint8_t c) {
27404|   141k|    Janet ret;
27405|   141k|    double numval;
27406|   141k|    int32_t blen;
27407|   141k|    if (janet_is_symbol_char(c)) {
  ------------------
  |  Branch (27407:9): [True: 107k, False: 33.9k]
  ------------------
27408|   107k|        push_buf(p, (uint8_t) c);
27409|   107k|        if (c > 127) state->argn = 1; /* Use to indicate non ascii */
  ------------------
  |  Branch (27409:13): [True: 4.74k, False: 102k]
  ------------------
27410|   107k|        return 1;
27411|   107k|    }
27412|       |    /* Token finished */
27413|  33.9k|    blen = (int32_t) p->bufcount;
27414|  33.9k|    int start_dig = p->buf[0] >= '0' && p->buf[0] <= '9';
  ------------------
  |  Branch (27414:21): [True: 24.5k, False: 9.40k]
  |  Branch (27414:41): [True: 11.5k, False: 12.9k]
  ------------------
27415|  33.9k|    int start_num = start_dig || p->buf[0] == '-' || p->buf[0] == '+' || p->buf[0] == '.';
  ------------------
  |  Branch (27415:21): [True: 11.5k, False: 22.3k]
  |  Branch (27415:34): [True: 3.03k, False: 19.3k]
  |  Branch (27415:54): [True: 1.39k, False: 17.9k]
  |  Branch (27415:74): [True: 1.83k, False: 16.1k]
  ------------------
27416|  33.9k|    if (p->buf[0] == ':') {
  ------------------
  |  Branch (27416:9): [True: 1.77k, False: 32.1k]
  ------------------
27417|       |        /* Don't do full utf-8 check unless we have seen non ascii characters. */
27418|  1.77k|        int valid = (!state->argn) || janet_valid_utf8(p->buf + 1, blen - 1);
  ------------------
  |  Branch (27418:21): [True: 1.62k, False: 159]
  |  Branch (27418:39): [True: 95, False: 64]
  ------------------
27419|  1.77k|        if (!valid) {
  ------------------
  |  Branch (27419:13): [True: 64, False: 1.71k]
  ------------------
27420|     64|            p->error = "invalid utf-8 in keyword";
27421|     64|            return 0;
27422|     64|        }
27423|  1.71k|        ret = janet_keywordv(p->buf + 1, blen - 1);
  ------------------
  |  | 1842|  1.71k|#define janet_keywordv(str, len) janet_wrap_keyword(janet_keyword((str), (len)))
  |  |  ------------------
  |  |  |  |  850|  1.71k|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  1.71k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  1.71k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  1.71k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27424|  1.71k|#ifdef JANET_INT_TYPES
27425|  32.1k|    } else if (start_num && !janet_scan_numeric(p->buf, blen, &ret)) {
  ------------------
  |  Branch (27425:16): [True: 17.8k, False: 14.3k]
  |  Branch (27425:29): [True: 13.2k, False: 4.59k]
  ------------------
27426|  13.2k|        (void) numval;
27427|       |#else
27428|       |    } else if (start_num && !janet_scan_number(p->buf, blen, &numval)) {
27429|       |        ret = janet_wrap_number(numval);
27430|       |#endif
27431|  18.9k|    } else if (!check_str_const("nil", p->buf, blen)) {
  ------------------
  |  Branch (27431:16): [True: 450, False: 18.4k]
  ------------------
27432|    450|        ret = janet_wrap_nil();
  ------------------
  |  |  831|    450|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|    450|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    450|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    450|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27433|  18.4k|    } else if (!check_str_const("false", p->buf, blen)) {
  ------------------
  |  Branch (27433:16): [True: 32, False: 18.4k]
  ------------------
27434|     32|        ret = janet_wrap_false();
  ------------------
  |  |  833|     32|#define janet_wrap_false() janet_nanbox_from_payload(JANET_BOOLEAN, 0)
  |  |  ------------------
  |  |  |  |  822|     32|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     32|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     32|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27435|  18.4k|    } else if (!check_str_const("true", p->buf, blen)) {
  ------------------
  |  Branch (27435:16): [True: 159, False: 18.2k]
  ------------------
27436|    159|        ret = janet_wrap_true();
  ------------------
  |  |  832|    159|#define janet_wrap_true() janet_nanbox_from_payload(JANET_BOOLEAN, 1)
  |  |  ------------------
  |  |  |  |  822|    159|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    159|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    159|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27437|  18.2k|    } else {
27438|  18.2k|        if (start_dig) {
  ------------------
  |  Branch (27438:13): [True: 338, False: 17.9k]
  ------------------
27439|    338|            p->error = "symbol literal cannot start with a digit";
27440|    338|            return 0;
27441|  17.9k|        } else {
27442|       |            /* Don't do full utf-8 check unless we have seen non ascii characters. */
27443|  17.9k|            int valid = (!state->argn) || janet_valid_utf8(p->buf, blen);
  ------------------
  |  Branch (27443:25): [True: 17.1k, False: 811]
  |  Branch (27443:43): [True: 514, False: 297]
  ------------------
27444|  17.9k|            if (!valid) {
  ------------------
  |  Branch (27444:17): [True: 297, False: 17.6k]
  ------------------
27445|    297|                p->error = "invalid utf-8 in symbol";
27446|    297|                return 0;
27447|    297|            }
27448|  17.6k|            ret = janet_symbolv(p->buf, blen);
  ------------------
  |  | 1836|  17.6k|#define janet_symbolv(str, len) janet_wrap_symbol(janet_symbol((str), (len)))
  |  |  ------------------
  |  |  |  |  849|  17.6k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  17.6k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  17.6k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  17.6k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27449|  17.6k|        }
27450|  18.2k|    }
27451|  33.2k|    p->bufcount = 0;
27452|  33.2k|    popstate(p, ret);
27453|  33.2k|    return 0;
27454|  33.9k|}
janet.c:check_str_const:
27391|  55.8k|static int check_str_const(const char *cstr, const uint8_t *str, int32_t len) {
27392|  55.8k|    int32_t index;
27393|  59.7k|    for (index = 0; index < len; index++) {
  ------------------
  |  Branch (27393:21): [True: 58.3k, False: 1.44k]
  ------------------
27394|  58.3k|        uint8_t c = str[index];
27395|  58.3k|        uint8_t k = ((const uint8_t *)cstr)[index];
27396|  58.3k|        if (c < k) return -1;
  ------------------
  |  Branch (27396:13): [True: 44.1k, False: 14.1k]
  ------------------
27397|  14.1k|        if (c > k) return 1;
  ------------------
  |  Branch (27397:13): [True: 10.2k, False: 3.88k]
  ------------------
27398|  3.88k|        if (k == '\0') break;
  ------------------
  |  Branch (27398:13): [True: 0, False: 3.88k]
  ------------------
27399|  3.88k|    }
27400|  1.44k|    return (cstr[index] == '\0') ? 0 : -1;
  ------------------
  |  Branch (27400:12): [True: 641, False: 808]
  ------------------
27401|  55.8k|}
janet.c:size_padded:
29929|  3.92k|static size_t size_padded(size_t offset, size_t size) {
29930|  3.92k|    size_t x = size + offset - 1;
29931|  3.92k|    return x - (x % size);
29932|  3.92k|}
janet.c:compile_peg:
30206|  4.64k|static JanetPeg *compile_peg(Janet x) {
30207|  4.64k|    Builder builder;
30208|  4.64k|    builder.grammar = janet_table(0);
30209|  4.64k|    builder.default_grammar = NULL;
30210|  4.64k|    {
30211|  4.64k|        Janet default_grammarv = janet_dyn("peg-grammar");
30212|  4.64k|        if (janet_checktype(default_grammarv, JANET_TABLE)) {
  ------------------
  |  |  806|  4.64k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 4.64k]
  |  |  |  Branch (806:6): [Folded, False: 4.64k]
  |  |  ------------------
  |  |  807|  4.64k|        ? 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.64k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  4.64k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  4.64k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  4.64k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  4.64k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30213|      0|            builder.default_grammar = janet_unwrap_table(default_grammarv);
  ------------------
  |  |  861|      0|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
30214|      0|        }
30215|  4.64k|    }
30216|  4.64k|    builder.tags = janet_table(0);
30217|  4.64k|    builder.constants = NULL;
30218|  4.64k|    builder.bytecode = NULL;
30219|  4.64k|    builder.nexttag = 1;
30220|  4.64k|    builder.form = x;
30221|  4.64k|    builder.depth = JANET_RECURSION_GUARD;
  ------------------
  |  |  296|  4.64k|#define JANET_RECURSION_GUARD 1024
  ------------------
30222|  4.64k|    builder.has_backref = 0;
30223|  4.64k|    peg_compile1(&builder, x);
30224|  4.64k|    JanetPeg *peg = make_peg(&builder);
30225|  4.64k|    builder_cleanup(&builder);
30226|  4.64k|    return peg;
30227|  4.64k|}
janet.c:peg_compile1:
29740|  23.9k|static uint32_t peg_compile1(Builder *b, Janet peg) {
29741|       |
29742|       |    /* Keep track of the form being compiled for error purposes */
29743|  23.9k|    Janet old_form = b->form;
29744|  23.9k|    JanetTable *old_grammar = b->grammar;
29745|  23.9k|    b->form = peg;
29746|       |
29747|       |    /* Resolve keyword references */
29748|  23.9k|    int i = JANET_RECURSION_GUARD;
  ------------------
  |  |  296|  23.9k|#define JANET_RECURSION_GUARD 1024
  ------------------
29749|  23.9k|    JanetTable *grammar = old_grammar;
29750|  23.9k|    for (; i > 0 && janet_checktype(peg, JANET_KEYWORD); --i) {
  ------------------
  |  |  806|  23.9k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 36, False: 23.9k]
  |  |  |  Branch (806:6): [Folded, False: 23.9k]
  |  |  ------------------
  |  |  807|  23.9k|        ? 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|  23.9k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  23.9k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  23.9k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  23.9k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  23.9k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (29750:12): [True: 23.9k, False: 0]
  ------------------
29751|     36|        Janet nextPeg = janet_table_get_ex(grammar, peg, &grammar);
29752|     36|        if (!grammar || janet_checktype(nextPeg, JANET_NIL)) {
  ------------------
  |  |  806|     36|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 36, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 36]
  |  |  ------------------
  |  |  807|     36|        ? 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|     36|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|     36|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|     36|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     36|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     36|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (29752:13): [True: 0, False: 36]
  ------------------
29753|     36|            nextPeg = (b->default_grammar == NULL)
  ------------------
  |  Branch (29753:23): [True: 36, False: 0]
  ------------------
29754|     36|                      ? janet_wrap_nil()
  ------------------
  |  |  831|     36|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|     36|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     36|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     36|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29755|     36|                      : janet_table_get(b->default_grammar, peg);
29756|     36|            if (janet_checktype(nextPeg, JANET_NIL)) {
  ------------------
  |  |  806|     36|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 36, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 36]
  |  |  ------------------
  |  |  807|     36|        ? 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|     36|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|     36|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|     36|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     36|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     36|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29757|     36|                peg_panic(b, "unknown rule");
29758|     36|            }
29759|     36|        }
29760|      0|        peg = nextPeg;
29761|      0|        b->form = peg;
29762|      0|        b->grammar = grammar;
29763|      0|    }
29764|  23.9k|    if (i == 0)
  ------------------
  |  Branch (29764:9): [True: 0, False: 23.9k]
  ------------------
29765|      0|        peg_panic(b, "reference chain too deep");
29766|       |
29767|       |    /* Check cache - for tuples we check only the local cache, as
29768|       |     * in a different grammar, the same tuple can compile to a different
29769|       |     * rule - for example, (+ :a :b) depends on whatever :a and :b are bound to. */
29770|  23.9k|    Janet check = janet_checktype(peg, JANET_TUPLE)
  ------------------
  |  |  806|  23.9k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 18.1k, False: 5.74k]
  |  |  |  Branch (806:6): [Folded, False: 23.9k]
  |  |  ------------------
  |  |  807|  23.9k|        ? 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|  23.9k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  23.9k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  23.9k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  23.9k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  23.9k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29771|  23.9k|                  ? janet_table_rawget(grammar, peg)
29772|  23.9k|                  : janet_table_get(grammar, peg);
29773|  23.9k|    if (!janet_checktype(check, JANET_NIL)) {
  ------------------
  |  |  806|  23.9k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 23.9k]
  |  |  ------------------
  |  |  807|  23.9k|        ? 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|  23.9k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  23.9k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  23.9k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  23.9k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  23.9k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (29773:9): [True: 1.14k, False: 22.7k]
  ------------------
29774|  1.14k|        b->form = old_form;
29775|  1.14k|        b->grammar = old_grammar;
29776|  1.14k|        return (uint32_t) janet_unwrap_number(check);
  ------------------
  |  |  839|  1.14k|#define janet_unwrap_number(x) ((x).number)
  ------------------
29777|  1.14k|    }
29778|       |
29779|       |    /* Check depth */
29780|  22.7k|    if (b->depth-- == 0)
  ------------------
  |  Branch (29780:9): [True: 0, False: 22.7k]
  ------------------
29781|      0|        peg_panic(b, "peg grammar recursed too deeply");
29782|       |
29783|       |    /* The final rule to return */
29784|  22.7k|    uint32_t rule = janet_v_count(b->bytecode);
  ------------------
  |  |  759|  22.7k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  766|  18.1k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  18.1k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (759:34): [True: 18.1k, False: 4.61k]
  |  |  ------------------
  ------------------
29785|       |
29786|       |    /* Add to cache. Do not cache structs, as we don't yet know
29787|       |     * what rule they will return! We can just as effectively cache
29788|       |     * the structs main rule. */
29789|  22.7k|    if (!janet_checktype(peg, JANET_STRUCT)) {
  ------------------
  |  |  806|  22.7k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 22.7k]
  |  |  ------------------
  |  |  807|  22.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|  22.7k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  22.7k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  22.7k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  22.7k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  22.7k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (29789:9): [True: 22.2k, False: 548]
  ------------------
29790|  22.2k|        JanetTable *which_grammar = grammar;
29791|       |        /* If we are a primitive pattern, add to the global cache (root grammar table) */
29792|  22.2k|        if (!janet_checktype(peg, JANET_TUPLE)) {
  ------------------
  |  |  806|  22.2k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 22.2k]
  |  |  ------------------
  |  |  807|  22.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|  22.2k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  22.2k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  22.2k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  22.2k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  22.2k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (29792:13): [True: 4.20k, False: 18.0k]
  ------------------
29793|  4.20k|            while (which_grammar->proto)
  ------------------
  |  Branch (29793:20): [True: 0, False: 4.20k]
  ------------------
29794|      0|                which_grammar = which_grammar->proto;
29795|  4.20k|        }
29796|  22.2k|        janet_table_put(which_grammar, peg, janet_wrap_number(rule));
  ------------------
  |  |  835|  22.2k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
29797|  22.2k|    }
29798|       |
29799|  22.7k|    switch (janet_type(peg)) {
  ------------------
  |  |  795|  22.7k|    (isnan((x).number) \
  |  |  796|  22.7k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  22.7k|        : JANET_NUMBER)
  ------------------
  |  Branch (29799:13): [True: 20.2k, False: 2.59k]
  ------------------
29800|    624|        default:
  ------------------
  |  Branch (29800:9): [True: 624, False: 22.1k]
  ------------------
29801|    624|            peg_panic(b, "unexpected peg source");
29802|      0|            return 0;
29803|       |
29804|     15|        case JANET_BOOLEAN: {
  ------------------
  |  Branch (29804:9): [True: 15, False: 22.7k]
  ------------------
29805|     15|            int n = janet_unwrap_boolean(peg);
  ------------------
  |  |  838|     15|#define janet_unwrap_boolean(x) ((x).u64 & 0x1)
  ------------------
29806|     15|            Reserve r = reserve(b, 2);
29807|     15|            emit_1(r, n ? RULE_NCHAR : RULE_NOTNCHAR, 0);
  ------------------
  |  Branch (29807:23): [True: 12, False: 3]
  ------------------
29808|     15|            break;
29809|      0|        }
29810|  2.59k|        case JANET_NUMBER: {
  ------------------
  |  Branch (29810:9): [True: 2.59k, False: 20.2k]
  ------------------
29811|  2.59k|            int32_t n = peg_getinteger(b, peg);
29812|  2.59k|            Reserve r = reserve(b, 2);
29813|  2.59k|            if (n < 0) {
  ------------------
  |  Branch (29813:17): [True: 116, False: 2.47k]
  ------------------
29814|    116|                if (n == INT32_MIN) {
  ------------------
  |  Branch (29814:21): [True: 2, False: 114]
  ------------------
29815|       |                    /* Since buffers can't hold this many characters, will
29816|       |                     * always match. Avoid undefined behavior negating INT32_MIN. */
29817|      2|                    emit_1(r, RULE_NCHAR, 0);
29818|    114|                } else {
29819|    114|                    emit_1(r, RULE_NOTNCHAR, -n);
29820|    114|                }
29821|  2.47k|            } else {
29822|  2.47k|                emit_1(r, RULE_NCHAR, n);
29823|  2.47k|            }
29824|  2.59k|            break;
29825|      0|        }
29826|    702|        case JANET_STRING: {
  ------------------
  |  Branch (29826:9): [True: 702, False: 22.0k]
  ------------------
29827|    702|            const uint8_t *str = janet_unwrap_string(peg);
  ------------------
  |  |  863|    702|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
29828|    702|            int32_t len = janet_string_length(str);
  ------------------
  |  | 1813|    702|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|    702|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
29829|    702|            emit_bytes(b, RULE_LITERAL, len, str);
29830|    702|            break;
29831|      0|        }
29832|    134|        case JANET_BUFFER: {
  ------------------
  |  Branch (29832:9): [True: 134, False: 22.6k]
  ------------------
29833|    134|            const JanetBuffer *buf = janet_unwrap_buffer(peg);
  ------------------
  |  |  862|    134|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
29834|    134|            emit_bytes(b, RULE_LITERAL, buf->count, buf->data);
29835|    134|            break;
29836|      0|        }
29837|    136|        case JANET_TABLE: {
  ------------------
  |  Branch (29837:9): [True: 136, False: 22.6k]
  ------------------
29838|       |            /* Build grammar table */
29839|    136|            JanetTable *new_grammar = janet_table_clone(janet_unwrap_table(peg));
  ------------------
  |  |  861|    136|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
29840|    136|            new_grammar->proto = grammar;
29841|    136|            b->grammar = grammar = new_grammar;
29842|       |            /* Run the main rule */
29843|    136|            Janet main_rule = janet_table_rawget(grammar, janet_ckeywordv("main"));
  ------------------
  |  | 1843|    136|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|    136|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|    136|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|    136|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|    136|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29844|    136|            if (janet_checktype(main_rule, JANET_NIL))
  ------------------
  |  |  806|    136|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 136, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 136]
  |  |  ------------------
  |  |  807|    136|        ? 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|    136|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|    136|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|    136|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    136|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    136|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29845|    136|                peg_panic(b, "grammar requires :main rule");
29846|      0|            rule = peg_compile1(b, main_rule);
29847|      0|            break;
29848|    136|        }
29849|    548|        case JANET_STRUCT: {
  ------------------
  |  Branch (29849:9): [True: 548, False: 22.2k]
  ------------------
29850|       |            /* Build grammar table */
29851|    548|            const JanetKV *st = janet_unwrap_struct(peg);
  ------------------
  |  |  857|    548|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
29852|    548|            JanetTable *new_grammar = janet_table(2 * janet_struct_capacity(st));
  ------------------
  |  | 1849|    548|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1846|    548|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
29853|  6.36k|            for (int32_t i = 0; i < janet_struct_capacity(st); i++) {
  ------------------
  |  | 1849|  6.36k|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1846|  6.36k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (29853:33): [True: 5.81k, False: 548]
  ------------------
29854|  5.81k|                if (janet_checktype(st[i].key, JANET_KEYWORD)) {
  ------------------
  |  |  806|  5.81k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 44, False: 5.77k]
  |  |  |  Branch (806:6): [Folded, False: 5.81k]
  |  |  ------------------
  |  |  807|  5.81k|        ? 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.81k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  5.81k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  5.81k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  5.81k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  5.81k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29855|     44|                    janet_table_put(new_grammar, st[i].key, st[i].value);
29856|     44|                }
29857|  5.81k|            }
29858|    548|            new_grammar->proto = grammar;
29859|    548|            b->grammar = grammar = new_grammar;
29860|       |            /* Run the main rule */
29861|    548|            Janet main_rule = janet_table_rawget(grammar, janet_ckeywordv("main"));
  ------------------
  |  | 1843|    548|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|    548|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|    548|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|    548|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|    548|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29862|    548|            if (janet_checktype(main_rule, JANET_NIL))
  ------------------
  |  |  806|    548|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 548, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 548]
  |  |  ------------------
  |  |  807|    548|        ? 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|    548|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|    548|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|    548|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    548|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    548|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29863|    548|                peg_panic(b, "grammar requires :main rule");
29864|      0|            rule = peg_compile1(b, main_rule);
29865|      0|            break;
29866|    548|        }
29867|  18.0k|        case JANET_TUPLE: {
  ------------------
  |  Branch (29867:9): [True: 18.0k, False: 4.75k]
  ------------------
29868|  18.0k|            const Janet *tup = janet_unwrap_tuple(peg);
  ------------------
  |  |  858|  18.0k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
29869|  18.0k|            int32_t len = janet_tuple_length(tup);
  ------------------
  |  | 1802|  18.0k|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1800|  18.0k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
29870|  18.0k|            if (len == 0) peg_panic(b, "tuple in grammar must have non-zero length");
  ------------------
  |  Branch (29870:17): [True: 17, False: 18.0k]
  ------------------
29871|  18.0k|            if (janet_checkint(tup[0])) {
  ------------------
  |  Branch (29871:17): [True: 1.10k, False: 16.9k]
  ------------------
29872|  1.10k|                int32_t n = janet_unwrap_integer(tup[0]);
  ------------------
  |  |  966|  1.10k|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  839|  1.10k|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
29873|  1.10k|                if (n < 0) {
  ------------------
  |  Branch (29873:21): [True: 37, False: 1.06k]
  ------------------
29874|     37|                    peg_panicf(b, "expected non-negative integer, got %d", n);
  ------------------
  |  |29181|     37|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29875|     37|                }
29876|  1.06k|                spec_repeat(b, len, tup);
29877|  1.06k|                break;
29878|  1.10k|            }
29879|  16.9k|            if (!janet_checktype(tup[0], JANET_SYMBOL))
  ------------------
  |  |  806|  16.9k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 16.9k]
  |  |  ------------------
  |  |  807|  16.9k|        ? 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.9k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  16.9k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  16.9k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  16.9k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  16.9k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (29879:17): [True: 167, False: 16.7k]
  ------------------
29880|    167|                peg_panicf(b, "expected grammar command, found %v", tup[0]);
  ------------------
  |  |29181|    167|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29881|  16.7k|            const uint8_t *sym = janet_unwrap_symbol(tup[0]);
  ------------------
  |  |  864|  16.7k|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
29882|  16.7k|            const SpecialPair *sp = janet_strbinsearch(
29883|  16.7k|                                        &peg_specials,
29884|  16.7k|                                        sizeof(peg_specials) / sizeof(SpecialPair),
29885|  16.7k|                                        sizeof(SpecialPair),
29886|  16.7k|                                        sym);
29887|  16.7k|            if (sp) {
  ------------------
  |  Branch (29887:17): [True: 16.3k, False: 361]
  ------------------
29888|  16.3k|                sp->special(b, len - 1, tup + 1);
29889|  16.3k|            } else {
29890|    361|                peg_panicf(b, "unknown special %S", sym);
  ------------------
  |  |29181|    361|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29891|    361|            }
29892|  16.3k|            break;
29893|  16.7k|        }
29894|  22.7k|    }
29895|       |
29896|       |    /* Increase depth again */
29897|  16.8k|    b->depth++;
29898|  16.8k|    b->form = old_form;
29899|  16.8k|    b->grammar = old_grammar;
29900|  16.8k|    return rule;
29901|  22.7k|}
janet.c:peg_panic:
29176|  2.67k|JANET_NO_RETURN static void peg_panic(Builder *b, const char *msg) {
29177|  2.67k|    builder_cleanup(b);
29178|  2.67k|    janet_panicf("grammar error in %p, %s", b->form, msg);
29179|  2.67k|}
janet.c:reserve:
29267|  18.4k|static Reserve reserve(Builder *b, int32_t size) {
29268|  18.4k|    Reserve r;
29269|  18.4k|    r.index = janet_v_count(b->bytecode);
  ------------------
  |  |  759|  18.4k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  766|  16.3k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  16.3k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (759:34): [True: 16.3k, False: 2.14k]
  |  |  ------------------
  ------------------
29270|  18.4k|    r.builder = b;
29271|  18.4k|    r.size = size;
29272|  72.6k|    for (int32_t i = 0; i < size; i++)
  ------------------
  |  Branch (29272:25): [True: 54.1k, False: 18.4k]
  ------------------
29273|       |        janet_v_push(b->bytecode, 0);
  ------------------
  |  |  757|  54.1k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|  54.1k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|  54.1k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|  52.0k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  52.0k|#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|  52.0k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  52.0k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 2.14k, False: 52.0k]
  |  |  |  |  |  |  |  Branch (768:50): [True: 8.04k, False: 43.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  770|  10.1k|#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|  54.1k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  54.1k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29274|  18.4k|    return r;
29275|  18.4k|}
janet.c:emit_1:
29296|  2.56k|static void emit_1(Reserve r, uint32_t op, uint32_t arg) {
29297|  2.56k|    emit_rule(r, op, 1, &arg);
29298|  2.56k|}
janet.c:emit_rule:
29278|  15.1k|static void emit_rule(Reserve r, int32_t op, int32_t n, const uint32_t *body) {
29279|  15.1k|    janet_assert(r.size == n + 1, "bad reserve");
  ------------------
  |  |  389|  15.1k|#define janet_assert(c, m) do { \
  |  |  390|  15.1k|    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: 15.1k]
  |  |  ------------------
  |  |  391|  15.1k|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 15.1k]
  |  |  ------------------
  ------------------
29280|  15.1k|    r.builder->bytecode[r.index] = op;
29281|  15.1k|    memcpy(r.builder->bytecode + r.index + 1, body, n * sizeof(uint32_t));
29282|  15.1k|}
janet.c:peg_getinteger:
29217|  3.88k|static int32_t peg_getinteger(Builder *b, Janet x) {
29218|  3.88k|    if (!janet_checkint(x))
  ------------------
  |  Branch (29218:9): [True: 440, False: 3.44k]
  ------------------
29219|    440|        peg_panicf(b, "expected integer, got %v", x);
  ------------------
  |  |29181|    440|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29220|  3.44k|    return janet_unwrap_integer(x);
  ------------------
  |  |  966|  3.44k|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  839|  3.44k|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
29221|  3.88k|}
janet.c:emit_bytes:
29285|    836|static void emit_bytes(Builder *b, uint32_t op, int32_t len, const uint8_t *bytes) {
29286|    836|    uint32_t next_rule = janet_v_count(b->bytecode);
  ------------------
  |  |  759|    836|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  766|    662|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|    662|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (759:34): [True: 662, False: 174]
  |  |  ------------------
  ------------------
29287|    836|    janet_v_push(b->bytecode, op);
  ------------------
  |  |  757|    836|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|    836|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|    836|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|    662|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|    662|#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|    662|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|    662|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 174, False: 662]
  |  |  |  |  |  |  |  Branch (768:50): [True: 61, False: 601]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  770|    235|#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|    836|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|    836|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29288|    836|    janet_v_push(b->bytecode, len);
  ------------------
  |  |  757|    836|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|    836|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|    836|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|    836|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|    836|#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|    836|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|    836|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 0, False: 836]
  |  |  |  |  |  |  |  Branch (768:50): [True: 238, False: 598]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  770|    238|#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|    836|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|    836|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29289|    836|    int32_t words = ((len + 3) >> 2);
29290|  2.24k|    for (int32_t i = 0; i < words; i++)
  ------------------
  |  Branch (29290:25): [True: 1.40k, False: 836]
  ------------------
29291|       |        janet_v_push(b->bytecode, 0);
  ------------------
  |  |  757|  1.40k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|  1.40k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|  1.40k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|  1.40k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  1.40k|#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.40k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  1.40k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 0, False: 1.40k]
  |  |  |  |  |  |  |  Branch (768:50): [True: 257, False: 1.14k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  770|    257|#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.40k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  1.40k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29292|    836|    memcpy(b->bytecode + next_rule + 2, bytes, len);
29293|    836|}
janet.c:spec_repeat:
29440|  1.12k|static void spec_repeat(Builder *b, int32_t argc, const Janet *argv) {
29441|  1.12k|    peg_fixarity(b, argc, 2);
29442|  1.12k|    Reserve r = reserve(b, 4);
29443|  1.12k|    int32_t n = peg_getnat(b, argv[0]);
29444|  1.12k|    uint32_t subrule = peg_compile1(b, argv[1]);
29445|  1.12k|    emit_3(r, RULE_BETWEEN, n, n, subrule);
29446|  1.12k|}
janet.c:peg_fixarity:
29183|  1.58k|static void peg_fixarity(Builder *b, int32_t argc, int32_t arity) {
29184|  1.58k|    if (argc != arity) {
  ------------------
  |  Branch (29184:9): [True: 57, False: 1.53k]
  ------------------
29185|     57|        peg_panicf(b, "expected %d argument%s, got %d",
  ------------------
  |  |29181|    114|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  |  |  ------------------
  |  |  |  Branch (29181:71): [True: 24, False: 33]
  |  |  ------------------
  ------------------
29186|     57|                   arity,
29187|     57|                   arity == 1 ? "" : "s",
29188|     57|                   argc);
29189|     57|    }
29190|  1.58k|}
janet.c:peg_getnat:
29223|  1.24k|static int32_t peg_getnat(Builder *b, Janet x) {
29224|  1.24k|    int32_t i = peg_getinteger(b, x);
29225|  1.24k|    if (i < 0)
  ------------------
  |  Branch (29225:9): [True: 71, False: 1.17k]
  ------------------
29226|     71|        peg_panicf(b, "expected non-negative integer, got %v", x);
  ------------------
  |  |29181|     71|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29227|  1.17k|    return i;
29228|  1.24k|}
janet.c:emit_3:
29303|  1.48k|static void emit_3(Reserve r, uint32_t op, uint32_t arg1, uint32_t arg2, uint32_t arg3) {
29304|  1.48k|    uint32_t arr[3] = {arg1, arg2, arg3};
29305|  1.48k|    emit_rule(r, op, 3, arr);
29306|  1.48k|}
janet.c:spec_not:
29456|     81|static void spec_not(Builder *b, int32_t argc, const Janet *argv) {
29457|     81|    spec_onerule(b, argc, argv, RULE_NOT);
29458|     81|}
janet.c:spec_onerule:
29449|    147|static void spec_onerule(Builder *b, int32_t argc, const Janet *argv, uint32_t op) {
29450|    147|    peg_fixarity(b, argc, 1);
29451|    147|    Reserve r = reserve(b, 2);
29452|    147|    uint32_t rule = peg_compile1(b, argv[0]);
29453|    147|    emit_1(r, op, rule);
29454|    147|}
janet.c:spec_position:
29548|     57|static void spec_position(Builder *b, int32_t argc, const Janet *argv) {
29549|     57|    spec_tag1(b, argc, argv, RULE_POSITION);
29550|     57|}
janet.c:spec_tag1:
29540|    247|static void spec_tag1(Builder *b, int32_t argc, const Janet *argv, uint32_t op) {
29541|    247|    peg_arity(b, argc, 0, 1);
29542|    247|    Reserve r = reserve(b, 2);
29543|    247|    uint32_t tag = (argc) ? emit_tag(b, argv[0]) : 0;
  ------------------
  |  Branch (29543:20): [True: 22, False: 225]
  ------------------
29544|    247|    (void) argv;
29545|    247|    emit_1(r, op, tag);
29546|    247|}
janet.c:peg_arity:
29192|  14.8k|static void peg_arity(Builder *b, int32_t arity, int32_t min, int32_t max) {
29193|  14.8k|    if (min >= 0 && arity < min)
  ------------------
  |  Branch (29193:9): [True: 14.8k, False: 0]
  |  Branch (29193:21): [True: 17, False: 14.8k]
  ------------------
29194|     17|        peg_panicf(b, "arity mismatch, expected at least %d, got %d", min, arity);
  ------------------
  |  |29181|     17|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29195|  14.8k|    if (max >= 0 && arity > max)
  ------------------
  |  Branch (29195:9): [True: 14.7k, False: 73]
  |  Branch (29195:21): [True: 30, False: 14.7k]
  ------------------
29196|     30|        peg_panicf(b, "arity mismatch, expected at most %d, got %d", max, arity);
  ------------------
  |  |29181|     30|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29197|  14.8k|}
janet.c:emit_tag:
29240|    198|static uint32_t emit_tag(Builder *b, Janet t) {
29241|    198|    if (!janet_checktype(t, JANET_KEYWORD))
  ------------------
  |  |  806|    198|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 198]
  |  |  ------------------
  |  |  807|    198|        ? 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|    198|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|    198|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|    198|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    198|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    198|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (29241:9): [True: 27, False: 171]
  ------------------
29242|     27|        peg_panicf(b, "expected keyword for capture tag, got %v", t);
  ------------------
  |  |29181|     27|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29243|    171|    Janet check = janet_table_get(b->tags, t);
29244|    171|    if (janet_checktype(check, JANET_NIL)) {
  ------------------
  |  |  806|    171|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 149, False: 22]
  |  |  |  Branch (806:6): [Folded, False: 171]
  |  |  ------------------
  |  |  807|    171|        ? 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|    171|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|    171|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|    171|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    171|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    171|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29245|    149|        uint32_t tag = b->nexttag++;
29246|    149|        if (tag > 255) {
  ------------------
  |  Branch (29246:13): [True: 0, False: 149]
  ------------------
29247|      0|            peg_panic(b, "too many tags - up to 255 tags are supported per peg");
29248|      0|        }
29249|    149|        Janet val = janet_wrap_number(tag);
  ------------------
  |  |  835|    149|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
29250|    149|        janet_table_put(b->tags, t, val);
29251|    149|        return tag;
29252|    149|    } else {
29253|     22|        return (uint32_t) janet_unwrap_number(check);
  ------------------
  |  |  839|     22|#define janet_unwrap_number(x) ((x).number)
  ------------------
29254|     22|    }
29255|    171|}
janet.c:spec_accumulate:
29493|    218|static void spec_accumulate(Builder *b, int32_t argc, const Janet *argv) {
29494|    218|    spec_cap1(b, argc, argv, RULE_ACCUMULATE);
29495|    218|}
janet.c:spec_cap1:
29482|  13.3k|static void spec_cap1(Builder *b, int32_t argc, const Janet *argv, uint32_t op) {
29483|  13.3k|    peg_arity(b, argc, 1, 2);
29484|  13.3k|    Reserve r = reserve(b, 3);
29485|  13.3k|    uint32_t tag = (argc == 2) ? emit_tag(b, argv[1]) : 0;
  ------------------
  |  Branch (29485:20): [True: 21, False: 13.3k]
  ------------------
29486|  13.3k|    uint32_t rule = peg_compile1(b, argv[0]);
29487|  13.3k|    emit_2(r, op, rule, tag);
29488|  13.3k|}
janet.c:emit_2:
29299|  10.7k|static void emit_2(Reserve r, uint32_t op, uint32_t arg1, uint32_t arg2) {
29300|  10.7k|    uint32_t arr[2] = {arg1, arg2};
29301|  10.7k|    emit_rule(r, op, 2, arr);
29302|  10.7k|}
janet.c:spec_sequence:
29371|    339|static void spec_sequence(Builder *b, int32_t argc, const Janet *argv) {
29372|    339|    spec_variadic(b, argc, argv, RULE_SEQUENCE);
29373|    339|}
janet.c:spec_variadic:
29356|  1.04k|static void spec_variadic(Builder *b, int32_t argc, const Janet *argv, uint32_t op) {
29357|  1.04k|    uint32_t rule = janet_v_count(b->bytecode);
  ------------------
  |  |  759|  1.04k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  766|    853|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|    853|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (759:34): [True: 853, False: 189]
  |  |  ------------------
  ------------------
29358|  1.04k|    janet_v_push(b->bytecode, op);
  ------------------
  |  |  757|  1.04k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|  1.04k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|  1.04k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|    853|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|    853|#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|    853|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|    853|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 189, False: 853]
  |  |  |  |  |  |  |  Branch (768:50): [True: 161, False: 692]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  770|    350|#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.04k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  1.04k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29359|  1.04k|    janet_v_push(b->bytecode, argc);
  ------------------
  |  |  757|  1.04k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|  1.04k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|  1.04k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|  1.04k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  1.04k|#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.04k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  1.04k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 0, False: 1.04k]
  |  |  |  |  |  |  |  Branch (768:50): [True: 236, False: 806]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  770|    236|#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.04k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  1.04k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29360|  5.00k|    for (int32_t i = 0; i < argc; i++)
  ------------------
  |  Branch (29360:25): [True: 3.96k, False: 1.04k]
  ------------------
29361|  3.96k|        janet_v_push(b->bytecode, 0);
  ------------------
  |  |  757|  3.96k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|  3.96k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|  3.96k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|  3.96k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  3.96k|#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.96k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  3.96k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 0, False: 3.96k]
  |  |  |  |  |  |  |  Branch (768:50): [True: 618, False: 3.34k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  770|    618|#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.96k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  3.96k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29362|  4.80k|    for (int32_t i = 0; i < argc; i++) {
  ------------------
  |  Branch (29362:25): [True: 3.76k, False: 1.04k]
  ------------------
29363|  3.76k|        uint32_t rulei = peg_compile1(b, argv[i]);
29364|  3.76k|        b->bytecode[rule + 2 + i] = rulei;
29365|  3.76k|    }
29366|  1.04k|}
janet.c:spec_choice:
29368|    703|static void spec_choice(Builder *b, int32_t argc, const Janet *argv) {
29369|    703|    spec_variadic(b, argc, argv, RULE_CHOICE);
29370|    703|}
janet.c:spec_reference:
29531|    103|static void spec_reference(Builder *b, int32_t argc, const Janet *argv) {
29532|    103|    peg_arity(b, argc, 1, 2);
29533|    103|    Reserve r = reserve(b, 3);
29534|    103|    uint32_t search = emit_tag(b, argv[0]);
29535|    103|    uint32_t tag = (argc == 2) ? emit_tag(b, argv[1]) : 0;
  ------------------
  |  Branch (29535:20): [True: 4, False: 99]
  ------------------
29536|    103|    b->has_backref = 1;
29537|    103|    emit_2(r, RULE_GETTAG, search, tag);
29538|    103|}
janet.c:spec_replace:
29586|    427|static void spec_replace(Builder *b, int32_t argc, const Janet *argv) {
29587|    427|    peg_arity(b, argc, 2, 3);
29588|    427|    Reserve r = reserve(b, 4);
29589|    427|    uint32_t subrule = peg_compile1(b, argv[0]);
29590|    427|    uint32_t constant = emit_constant(b, argv[1]);
29591|    427|    uint32_t tag = (argc == 3) ? emit_tag(b, argv[2]) : 0;
  ------------------
  |  Branch (29591:20): [True: 40, False: 387]
  ------------------
29592|    427|    emit_3(r, RULE_REPLACE, subrule, constant, tag);
29593|    427|}
janet.c:emit_constant:
29234|    387|static uint32_t emit_constant(Builder *b, Janet c) {
29235|    387|    uint32_t cindex = (uint32_t) janet_v_count(b->constants);
  ------------------
  |  |  759|    387|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  766|     46|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|     46|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (759:34): [True: 46, False: 341]
  |  |  ------------------
  ------------------
29236|       |    janet_v_push(b->constants, c);
  ------------------
  |  |  757|    387|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|    387|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|    387|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|     46|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|     46|#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|     46|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|     46|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 341, False: 46]
  |  |  |  |  |  |  |  Branch (768:50): [True: 30, False: 16]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  770|    371|#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|    387|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|    387|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29237|    387|    return cindex;
29238|    387|}
janet.c:spec_capture:
29490|  13.1k|static void spec_capture(Builder *b, int32_t argc, const Janet *argv) {
29491|  13.1k|    spec_cap1(b, argc, argv, RULE_CAPTURE);
29492|  13.1k|}
janet.c:spec_look:
29346|    106|static void spec_look(Builder *b, int32_t argc, const Janet *argv) {
29347|    106|    peg_arity(b, argc, 1, 2);
29348|    106|    Reserve r = reserve(b, 3);
29349|    106|    int32_t rulearg = argc == 2 ? 1 : 0;
  ------------------
  |  Branch (29349:23): [True: 43, False: 63]
  ------------------
29350|    106|    int32_t offset = argc == 2 ? peg_getinteger(b, argv[0]) : 0;
  ------------------
  |  Branch (29350:22): [True: 43, False: 63]
  ------------------
29351|    106|    uint32_t subrule = peg_compile1(b, argv[rulearg]);
29352|    106|    emit_2(r, RULE_LOOK, (uint32_t) offset, subrule);
29353|    106|}
janet.c:spec_opt:
29433|     51|static void spec_opt(Builder *b, int32_t argc, const Janet *argv) {
29434|     51|    peg_fixarity(b, argc, 1);
29435|     51|    Reserve r = reserve(b, 4);
29436|     51|    uint32_t subrule = peg_compile1(b, argv[0]);
29437|     51|    emit_3(r, RULE_BETWEEN, 0, 1, subrule);
29438|     51|}
janet.c:spec_debug:
29578|    295|static void spec_debug(Builder *b, int32_t argc, const Janet *argv) {
29579|    295|    peg_arity(b, argc, 0, 0);
29580|    295|    Reserve r = reserve(b, 1);
29581|    295|    uint32_t empty = 0;
29582|    295|    (void) argv;
29583|    295|    emit_rule(r, RULE_DEBUG, 0, &empty);
29584|    295|}
janet.c:spec_any:
29413|     54|static void spec_any(Builder *b, int32_t argc, const Janet *argv) {
29414|     54|    spec_repeater(b, argc, argv, 0);
29415|     54|}
janet.c:spec_repeater:
29403|     54|static void spec_repeater(Builder *b, int32_t argc, const Janet *argv, int32_t min) {
29404|     54|    peg_fixarity(b, argc, 1);
29405|     54|    Reserve r = reserve(b, 4);
29406|     54|    uint32_t subrule = peg_compile1(b, argv[0]);
29407|       |    emit_3(r, RULE_BETWEEN, min, UINT32_MAX, subrule);
29408|     54|}
janet.c:spec_matchtime_splice:
29613|     12|static void spec_matchtime_splice(Builder *b, int32_t argc, const Janet *argv) {
29614|     12|    spec_matchtime_impl(b, argc, argv, RULE_MATCHSPLICE);
29615|     12|}
janet.c:spec_matchtime_impl:
29595|     57|static void spec_matchtime_impl(Builder *b, int32_t argc, const Janet *argv, uint32_t op) {
29596|     57|    peg_arity(b, argc, 2, 3);
29597|     57|    Reserve r = reserve(b, 4);
29598|     57|    uint32_t subrule = peg_compile1(b, argv[0]);
29599|     57|    Janet fun = argv[1];
29600|     57|    if (!janet_checktype(fun, JANET_FUNCTION) &&
  ------------------
  |  |  806|    114|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 57]
  |  |  ------------------
  |  |  807|    114|        ? 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|    114|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|     57|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|     57|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     57|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     57|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (29600:9): [True: 29, False: 28]
  ------------------
29601|     29|            !janet_checktype(fun, JANET_CFUNCTION)) {
  ------------------
  |  |  806|     29|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 29]
  |  |  ------------------
  |  |  807|     29|        ? 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|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|     29|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|     29|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     29|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     29|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (29601:13): [True: 29, False: 0]
  ------------------
29602|     29|        peg_panicf(b, "expected function or cfunction, got %v", fun);
  ------------------
  |  |29181|     29|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29603|     29|    }
29604|     28|    uint32_t tag = (argc == 3) ? emit_tag(b, argv[2]) : 0;
  ------------------
  |  Branch (29604:20): [True: 0, False: 28]
  ------------------
29605|     28|    uint32_t cindex = emit_constant(b, fun);
29606|     28|    emit_3(r, op, subrule, cindex, tag);
29607|     28|}
janet.c:spec_matchtime:
29609|     45|static void spec_matchtime(Builder *b, int32_t argc, const Janet *argv) {
29610|     45|    spec_matchtime_impl(b, argc, argv, RULE_MATCHTIME);
29611|     45|}
janet.c:spec_column:
29554|      1|static void spec_column(Builder *b, int32_t argc, const Janet *argv) {
29555|      1|    spec_tag1(b, argc, argv, RULE_COLUMN);
29556|      1|}
janet.c:spec_error:
29459|     30|static void spec_error(Builder *b, int32_t argc, const Janet *argv) {
29460|     30|    if (argc == 0) {
  ------------------
  |  Branch (29460:9): [True: 10, False: 20]
  ------------------
29461|     10|        Reserve r = reserve(b, 2);
29462|     10|        uint32_t rule = peg_compile1(b, janet_wrap_number(0));
  ------------------
  |  |  835|     10|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
29463|     10|        emit_1(r, RULE_ERROR, rule);
29464|     20|    } else {
29465|     20|        spec_onerule(b, argc, argv, RULE_ERROR);
29466|     20|    }
29467|     30|}
janet.c:spec_if:
29384|     96|static void spec_if(Builder *b, int32_t argc, const Janet *argv) {
29385|     96|    spec_branch(b, argc, argv, RULE_IF);
29386|     96|}
janet.c:spec_branch:
29376|     96|static void spec_branch(Builder *b, int32_t argc, const Janet *argv, uint32_t rule) {
29377|     96|    peg_fixarity(b, argc, 2);
29378|     96|    Reserve r = reserve(b, 3);
29379|     96|    uint32_t rule_a = peg_compile1(b, argv[0]);
29380|     96|    uint32_t rule_b = peg_compile1(b, argv[1]);
29381|     96|    emit_2(r, rule, rule_a, rule_b);
29382|     96|}
janet.c:spec_int_le:
29661|    141|static void spec_int_le(Builder *b, int32_t argc, const Janet *argv) {
29662|    141|    spec_readint(b, argc, argv, 0x10u);
29663|    141|}
janet.c:spec_readint:
29647|    161|static void spec_readint(Builder *b, int32_t argc, const Janet *argv, uint32_t mask) {
29648|    161|    peg_arity(b, argc, 1, 2);
29649|    161|    Reserve r = reserve(b, 3);
29650|    161|    uint32_t tag = (argc == 2) ? emit_tag(b, argv[1]) : 0;
  ------------------
  |  Branch (29650:20): [True: 11, False: 150]
  ------------------
29651|    161|    int32_t width = peg_getnat(b, argv[0]);
29652|    161|    if ((width < 0) || (width > JANET_MAX_READINT_WIDTH)) {
  ------------------
  |  |29642|    113|#define JANET_MAX_READINT_WIDTH 8
  ------------------
  |  Branch (29652:9): [True: 48, False: 113]
  |  Branch (29652:24): [True: 27, False: 86]
  ------------------
29653|     27|        peg_panicf(b, "width must be between 0 and %d, got %d", JANET_MAX_READINT_WIDTH, width);
  ------------------
  |  |29181|     27|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29654|     27|    }
29655|    134|    emit_2(r, RULE_READINT, mask | ((uint32_t) width), tag);
29656|    134|}
janet.c:spec_line:
29551|    189|static void spec_line(Builder *b, int32_t argc, const Janet *argv) {
29552|    189|    spec_tag1(b, argc, argv, RULE_LINE);
29553|    189|}
janet.c:spec_range:
29316|     74|static void spec_range(Builder *b, int32_t argc, const Janet *argv) {
29317|     74|    peg_arity(b, argc, 1, -1);
29318|     74|    if (argc == 1) {
  ------------------
  |  Branch (29318:9): [True: 45, False: 29]
  ------------------
29319|     45|        Reserve r = reserve(b, 2);
29320|     45|        const uint8_t *str = peg_getrange(b, argv[0]);
29321|     45|        uint32_t arg = str[0] | (str[1] << 16);
29322|     45|        emit_1(r, RULE_RANGE, arg);
29323|     45|    } else {
29324|       |        /* Compile as a set */
29325|     29|        Reserve r = reserve(b, 9);
29326|     29|        uint32_t bitmap[8] = {0};
29327|     78|        for (int32_t i = 0; i < argc; i++) {
  ------------------
  |  Branch (29327:29): [True: 49, False: 29]
  ------------------
29328|     49|            const uint8_t *str = peg_getrange(b, argv[i]);
29329|  1.38k|            for (uint32_t c = str[0]; c <= str[1]; c++)
  ------------------
  |  Branch (29329:39): [True: 1.33k, False: 49]
  ------------------
29330|  1.33k|                bitmap_set(bitmap, c);
29331|     49|        }
29332|     29|        emit_rule(r, RULE_SET, 8, bitmap);
29333|     29|    }
29334|     74|}
janet.c:peg_getrange:
29206|     94|static const uint8_t *peg_getrange(Builder *b, Janet x) {
29207|     94|    if (!janet_checktype(x, JANET_STRING))
  ------------------
  |  |  806|     94|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 94]
  |  |  ------------------
  |  |  807|     94|        ? 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|     94|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|     94|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|     94|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     94|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     94|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (29207:9): [True: 43, False: 51]
  ------------------
29208|     43|        peg_panic(b, "expected string for character range");
29209|     51|    const uint8_t *str = janet_unwrap_string(x);
  ------------------
  |  |  863|     51|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
29210|     51|    if (janet_string_length(str) != 2)
  ------------------
  |  | 1813|     51|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|     51|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (29210:9): [True: 6, False: 45]
  ------------------
29211|      6|        peg_panicf(b, "expected string to have length 2, got %v", x);
  ------------------
  |  |29181|      6|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29212|     45|    if (str[1] < str[0])
  ------------------
  |  Branch (29212:9): [True: 3, False: 42]
  ------------------
29213|      3|        peg_panicf(b, "range %v is empty", x);
  ------------------
  |  |29181|      3|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29214|     42|    return str;
29215|     45|}
janet.c:bitmap_set:
29312|  1.64k|static void bitmap_set(uint32_t *bitmap, uint8_t c) {
29313|  1.64k|    bitmap[c >> 5] |= ((uint32_t)1) << (c & 0x1F);
29314|  1.64k|}
janet.c:spec_set:
29336|     13|static void spec_set(Builder *b, int32_t argc, const Janet *argv) {
29337|     13|    peg_fixarity(b, argc, 1);
29338|     13|    Reserve r = reserve(b, 9);
29339|     13|    const uint8_t *str = peg_getset(b, argv[0]);
29340|     13|    uint32_t bitmap[8] = {0};
29341|    328|    for (int32_t i = 0; i < janet_string_length(str); i++)
  ------------------
  |  | 1813|    328|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|    328|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (29341:25): [True: 315, False: 13]
  ------------------
29342|    315|        bitmap_set(bitmap, str[i]);
29343|     13|    emit_rule(r, RULE_SET, 8, bitmap);
29344|     13|}
janet.c:peg_getset:
29199|     12|static const uint8_t *peg_getset(Builder *b, Janet x) {
29200|     12|    if (!janet_checktype(x, JANET_STRING))
  ------------------
  |  |  806|     12|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 12]
  |  |  ------------------
  |  |  807|     12|        ? 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|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|     12|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|     12|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     12|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     12|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (29200:9): [True: 2, False: 10]
  ------------------
29201|      2|        peg_panic(b, "expected string for character set");
29202|     10|    const uint8_t *str = janet_unwrap_string(x);
  ------------------
  |  |  863|     10|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
29203|     10|    return str;
29204|     12|}
janet.c:spec_sub:
29617|     15|static void spec_sub(Builder *b, int32_t argc, const Janet *argv) {
29618|     15|    peg_fixarity(b, argc, 2);
29619|     15|    Reserve r = reserve(b, 3);
29620|     15|    uint32_t subrule1 = peg_compile1(b, argv[0]);
29621|     15|    uint32_t subrule2 = peg_compile1(b, argv[1]);
29622|     15|    emit_2(r, RULE_SUB, subrule1, subrule2);
29623|     15|}
janet.c:spec_til:
29625|     90|static void spec_til(Builder *b, int32_t argc, const Janet *argv) {
29626|     90|    peg_fixarity(b, argc, 2);
29627|     90|    Reserve r = reserve(b, 3);
29628|     90|    uint32_t subrule1 = peg_compile1(b, argv[0]);
29629|     90|    uint32_t subrule2 = peg_compile1(b, argv[1]);
29630|     90|    emit_2(r, RULE_TIL, subrule1, subrule2);
29631|     90|}
janet.c:spec_to:
29468|     46|static void spec_to(Builder *b, int32_t argc, const Janet *argv) {
29469|     46|    spec_onerule(b, argc, argv, RULE_TO);
29470|     46|}
janet.c:spec_uint_le:
29658|     20|static void spec_uint_le(Builder *b, int32_t argc, const Janet *argv) {
29659|     20|    spec_readint(b, argc, argv, 0x0u);
29660|     20|}
janet.c:make_peg:
30187|  1.96k|static JanetPeg *make_peg(Builder *b) {
30188|  1.96k|    size_t bytecode_start = size_padded(sizeof(JanetPeg), sizeof(uint32_t));
30189|  1.96k|    size_t bytecode_size = janet_v_count(b->bytecode) * sizeof(uint32_t);
  ------------------
  |  |  759|  1.96k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  766|  1.96k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  1.96k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (759:34): [True: 1.96k, False: 0]
  |  |  ------------------
  ------------------
30190|  1.96k|    size_t constants_start = size_padded(bytecode_start + bytecode_size, sizeof(Janet));
30191|  1.96k|    size_t constants_size = janet_v_count(b->constants) * sizeof(Janet);
  ------------------
  |  |  759|  1.96k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  766|    336|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|    336|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (759:34): [True: 336, False: 1.62k]
  |  |  ------------------
  ------------------
30192|  1.96k|    size_t total_size = constants_start + constants_size;
30193|  1.96k|    char *mem = janet_abstract(&janet_peg_type, total_size);
30194|  1.96k|    JanetPeg *peg = (JanetPeg *)mem;
30195|  1.96k|    peg->bytecode = (uint32_t *)(mem + bytecode_start);
30196|  1.96k|    peg->constants = (Janet *)(mem + constants_start);
30197|  1.96k|    peg->num_constants = janet_v_count(b->constants);
  ------------------
  |  |  759|  1.96k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  766|    336|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|    336|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (759:34): [True: 336, False: 1.62k]
  |  |  ------------------
  ------------------
30198|  1.96k|    safe_memcpy(peg->bytecode, b->bytecode, bytecode_size);
30199|  1.96k|    safe_memcpy(peg->constants, b->constants, constants_size);
30200|       |    peg->bytecode_len = janet_v_count(b->bytecode);
  ------------------
  |  |  759|  1.96k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  766|  1.96k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  1.96k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (759:34): [True: 1.96k, False: 0]
  |  |  ------------------
  ------------------
30201|  1.96k|    peg->has_backref = b->has_backref;
30202|  1.96k|    return peg;
30203|  1.96k|}
janet.c:builder_cleanup:
29171|  4.64k|static void builder_cleanup(Builder *b) {
29172|  4.64k|    janet_v_free(b->constants);
  ------------------
  |  |  756|  4.64k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  764|    341|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (756:34): [True: 341, False: 4.29k]
  |  |  ------------------
  ------------------
29173|       |    janet_v_free(b->bytecode);
  ------------------
  |  |  756|  4.64k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  764|  2.51k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (756:34): [True: 2.51k, False: 2.13k]
  |  |  ------------------
  ------------------
29174|  4.64k|}
janet.c:peg_cfun_init:
30253|  4.64k|static PegCall peg_cfun_init(int32_t argc, Janet *argv, int get_replace) {
30254|  4.64k|    PegCall ret;
30255|  4.64k|    int32_t min = get_replace ? 3 : 2;
  ------------------
  |  Branch (30255:19): [True: 0, False: 4.64k]
  ------------------
30256|  4.64k|    janet_arity(argc, min, -1);
30257|  4.64k|    if (janet_checktype(argv[0], JANET_ABSTRACT) &&
  ------------------
  |  |  806|  9.28k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 196, False: 4.44k]
  |  |  |  Branch (806:6): [Folded, False: 4.64k]
  |  |  ------------------
  |  |  807|  9.28k|        ? 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.28k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  4.64k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  4.64k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  4.64k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  4.64k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30258|    196|            janet_abstract_type(janet_unwrap_abstract(argv[0])) == &janet_peg_type) {
  ------------------
  |  | 1899|    196|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|    196|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (30258:13): [True: 0, False: 196]
  ------------------
30259|      0|        ret.peg = janet_unwrap_abstract(argv[0]);
  ------------------
  |  |  866|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
30260|  4.64k|    } else {
30261|  4.64k|        ret.peg = compile_peg(argv[0]);
30262|  4.64k|    }
30263|  4.64k|    if (get_replace) {
  ------------------
  |  Branch (30263:9): [True: 0, False: 4.64k]
  ------------------
30264|      0|        ret.subst = argv[1];
30265|      0|        ret.bytes = janet_getbytes(argv, 2);
30266|  4.64k|    } else {
30267|  4.64k|        ret.bytes = janet_getbytes(argv, 1);
30268|  4.64k|    }
30269|  4.64k|    if (argc > min) {
  ------------------
  |  Branch (30269:9): [True: 0, False: 4.64k]
  ------------------
30270|      0|        ret.start = janet_gethalfrange(argv, min, ret.bytes.len, "offset");
30271|      0|        ret.s.extrac = argc - min - 1;
30272|      0|        ret.s.extrav = janet_tuple_n(argv + min + 1, argc - min - 1);
30273|  4.64k|    } else {
30274|  4.64k|        ret.start = 0;
30275|  4.64k|        ret.s.extrac = 0;
30276|  4.64k|        ret.s.extrav = NULL;
30277|  4.64k|    }
30278|  4.64k|    ret.s.mode = PEG_MODE_NORMAL;
30279|  4.64k|    ret.s.text_start = ret.bytes.bytes;
30280|  4.64k|    ret.s.text_end = ret.bytes.bytes + ret.bytes.len;
30281|  4.64k|    ret.s.outer_text_end = ret.s.text_end;
30282|  4.64k|    ret.s.depth = JANET_RECURSION_GUARD;
  ------------------
  |  |  296|  4.64k|#define JANET_RECURSION_GUARD 1024
  ------------------
30283|  4.64k|    ret.s.captures = janet_array(0);
30284|  4.64k|    ret.s.tagged_captures = janet_array(0);
30285|  4.64k|    ret.s.scratch = janet_buffer(10);
30286|  4.64k|    ret.s.tags = janet_buffer(10);
30287|  4.64k|    ret.s.constants = ret.peg->constants;
30288|  4.64k|    ret.s.bytecode = ret.peg->bytecode;
30289|       |    ret.s.linemap = NULL;
30290|  4.64k|    ret.s.linemaplen = -1;
30291|  4.64k|    ret.s.has_backref = ret.peg->has_backref;
30292|  4.64k|    return ret;
30293|  4.64k|}
janet.c:peg_rule:
28479|   432M|    const uint8_t *text) {
28480|   437M|tail:
28481|   437M|    switch (*rule) {
28482|      0|        default:
  ------------------
  |  Branch (28482:9): [True: 0, False: 437M]
  ------------------
28483|      0|            janet_panic("unexpected opcode");
28484|      0|            return NULL;
28485|       |
28486|  7.05M|        case RULE_LITERAL: {
  ------------------
  |  Branch (28486:9): [True: 7.05M, False: 430M]
  ------------------
28487|  7.05M|            uint32_t len = rule[1];
28488|  7.05M|            if (text + len > s->text_end) return NULL;
  ------------------
  |  Branch (28488:17): [True: 9.97k, False: 7.04M]
  ------------------
28489|  7.04M|            return memcmp(text, rule + 2, len) ? NULL : text + len;
  ------------------
  |  Branch (28489:20): [True: 1.30k, False: 7.04M]
  ------------------
28490|  7.05M|        }
28491|       |
28492|  32.9k|        case RULE_DEBUG: {
  ------------------
  |  Branch (28492:9): [True: 32.9k, False: 437M]
  ------------------
28493|  32.9k|            char buffer[32] = {0};
28494|  32.9k|            size_t len = (size_t)(s->outer_text_end - text);
28495|  32.9k|            memcpy(buffer, text, (len > 31 ? 31 : len));
  ------------------
  |  Branch (28495:35): [True: 1.86k, False: 31.0k]
  ------------------
28496|  32.9k|            janet_eprintf("?? at [%s] (index %d)\n", buffer, (int32_t)(text - s->text_start));
  ------------------
  |  | 2195|  32.9k|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
28497|  32.9k|            int has_color = janet_truthy(janet_dyn("err-color"));
  ------------------
  |  |  818|  32.9k|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  806|  65.8k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 32.9k]
  |  |  |  |  ------------------
  |  |  |  |  807|  65.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|  65.8k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|  32.9k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|  32.9k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  32.9k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  32.9k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (818:6): [True: 0, False: 32.9k]
  |  |  ------------------
  |  |  819|  32.9k|     (!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]
  |  |  ------------------
  ------------------
28498|       |            /* Accumulate buffer */
28499|  32.9k|            if (s->scratch->count) {
  ------------------
  |  Branch (28499:17): [True: 0, False: 32.9k]
  ------------------
28500|      0|                janet_eprintf("accumulate buffer: %v\n", janet_wrap_buffer(s->scratch));
  ------------------
  |  | 2195|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
28501|      0|            }
28502|       |            /* Normal captures */
28503|  32.9k|            if (s->captures->count) {
  ------------------
  |  Branch (28503:17): [True: 27.5k, False: 5.36k]
  ------------------
28504|  27.5k|                janet_eprintf("stack [%d]:\n", s->captures->count);
  ------------------
  |  | 2195|  27.5k|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
28505|  8.89M|                for (int32_t i = 0; i < s->captures->count; i++) {
  ------------------
  |  Branch (28505:37): [True: 8.86M, False: 27.5k]
  ------------------
28506|  8.86M|                    if (has_color) {
  ------------------
  |  Branch (28506:25): [True: 0, False: 8.86M]
  ------------------
28507|      0|                        janet_eprintf("  [%d]: %M\n", i, s->captures->data[i]);
  ------------------
  |  | 2195|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
28508|  8.86M|                    } else {
28509|  8.86M|                        janet_eprintf("  [%d]: %m\n", i, s->captures->data[i]);
  ------------------
  |  | 2195|  8.86M|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
28510|  8.86M|                    }
28511|  8.86M|                }
28512|  27.5k|            }
28513|       |            /* Tagged captures */
28514|  32.9k|            if (s->tagged_captures->count) {
  ------------------
  |  Branch (28514:17): [True: 1.37k, False: 31.5k]
  ------------------
28515|  1.37k|                janet_eprintf("tag stack [%d]:\n", s->tagged_captures->count);
  ------------------
  |  | 2195|  1.37k|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
28516|  1.31M|                for (int32_t i = 0; i < s->tagged_captures->count; i++) {
  ------------------
  |  Branch (28516:37): [True: 1.30M, False: 1.37k]
  ------------------
28517|  1.30M|                    if (has_color) {
  ------------------
  |  Branch (28517:25): [True: 0, False: 1.30M]
  ------------------
28518|      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__)
  ------------------
28519|  1.30M|                    } else {
28520|  1.30M|                        janet_eprintf("  [%d] tag=%d: %m\n", i, (int32_t) s->tags->data[i], s->tagged_captures->data[i]);
  ------------------
  |  | 2195|  1.30M|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
28521|  1.30M|                    }
28522|  1.30M|                }
28523|  1.37k|            }
28524|  32.9k|            return text;
28525|  7.05M|        }
28526|       |
28527|  64.6M|        case RULE_NCHAR: {
  ------------------
  |  Branch (28527:9): [True: 64.6M, False: 373M]
  ------------------
28528|  64.6M|            uint32_t n = rule[1];
28529|  64.6M|            return (text + n > s->text_end) ? NULL : text + n;
  ------------------
  |  Branch (28529:20): [True: 7.04M, False: 57.5M]
  ------------------
28530|  7.05M|        }
28531|       |
28532|  4.59M|        case RULE_NOTNCHAR: {
  ------------------
  |  Branch (28532:9): [True: 4.59M, False: 433M]
  ------------------
28533|  4.59M|            uint32_t n = rule[1];
28534|  4.59M|            return (text + n > s->text_end) ? text : NULL;
  ------------------
  |  Branch (28534:20): [True: 4.59M, False: 242]
  ------------------
28535|  7.05M|        }
28536|       |
28537|     20|        case RULE_RANGE: {
  ------------------
  |  Branch (28537:9): [True: 20, False: 437M]
  ------------------
28538|     20|            uint8_t lo = rule[1] & 0xFF;
28539|     20|            uint8_t hi = (rule[1] >> 16) & 0xFF;
28540|     20|            return (text < s->text_end &&
  ------------------
  |  Branch (28540:21): [True: 20, False: 0]
  ------------------
28541|     20|                    text[0] >= lo &&
  ------------------
  |  Branch (28541:21): [True: 13, False: 7]
  ------------------
28542|     13|                    text[0] <= hi)
  ------------------
  |  Branch (28542:21): [True: 9, False: 4]
  ------------------
28543|     20|                   ? text + 1
28544|     20|                   : NULL;
28545|  7.05M|        }
28546|       |
28547|     11|        case RULE_SET: {
  ------------------
  |  Branch (28547:9): [True: 11, False: 437M]
  ------------------
28548|     11|            if (text >= s->text_end) return NULL;
  ------------------
  |  Branch (28548:17): [True: 0, False: 11]
  ------------------
28549|     11|            uint32_t word = rule[1 + (text[0] >> 5)];
28550|     11|            uint32_t mask = (uint32_t)1 << (text[0] & 0x1F);
28551|     11|            return (word & mask)
  ------------------
  |  Branch (28551:20): [True: 1, False: 10]
  ------------------
28552|     11|                   ? text + 1
28553|     11|                   : NULL;
28554|     11|        }
28555|       |
28556|  13.4k|        case RULE_LOOK: {
  ------------------
  |  Branch (28556:9): [True: 13.4k, False: 437M]
  ------------------
28557|  13.4k|            text += ((int32_t *)rule)[1];
28558|  13.4k|            if (text < s->text_start || text > s->text_end) return NULL;
  ------------------
  |  Branch (28558:17): [True: 2.64k, False: 10.7k]
  |  Branch (28558:41): [True: 730, False: 10.0k]
  ------------------
28559|  10.0k|            down1(s);
  ------------------
  |  |28464|  10.0k|#define down1(s) do { \
  |  |28465|  10.0k|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28465:9): [True: 0, False: 10.0k]
  |  |  ------------------
  |  |28466|  10.0k|} while (0)
  |  |  ------------------
  |  |  |  Branch (28466:10): [Folded, False: 10.0k]
  |  |  ------------------
  ------------------
28560|  10.0k|            const uint8_t *result = peg_rule(s, s->bytecode + rule[2], text);
28561|  10.0k|            up1(s);
  ------------------
  |  |28467|  10.0k|#define up1(s) ((s)->depth++)
  ------------------
28562|  10.0k|            text -= ((int32_t *)rule)[1];
28563|  10.0k|            return result ? text : NULL;
  ------------------
  |  Branch (28563:20): [True: 3.54k, False: 6.50k]
  ------------------
28564|  10.0k|        }
28565|       |
28566|  7.11M|        case RULE_CHOICE: {
  ------------------
  |  Branch (28566:9): [True: 7.11M, False: 430M]
  ------------------
28567|  7.11M|            uint32_t len = rule[1];
28568|  7.11M|            const uint32_t *args = rule + 2;
28569|  7.11M|            if (len == 0) return NULL;
  ------------------
  |  Branch (28569:17): [True: 1.90k, False: 7.11M]
  ------------------
28570|  7.11M|            down1(s);
  ------------------
  |  |28464|  7.11M|#define down1(s) do { \
  |  |28465|  7.11M|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28465:9): [True: 0, False: 7.11M]
  |  |  ------------------
  |  |28466|  7.11M|} while (0)
  |  |  ------------------
  |  |  |  Branch (28466:10): [Folded, False: 7.11M]
  |  |  ------------------
  ------------------
28571|  7.11M|            CapState cs = cap_save(s);
28572|  14.1M|            for (uint32_t i = 0; i < len - 1; i++) {
  ------------------
  |  Branch (28572:34): [True: 9.07M, False: 5.10M]
  ------------------
28573|  9.07M|                const uint8_t *result = peg_rule(s, s->bytecode + args[i], text);
28574|  9.07M|                if (result) {
  ------------------
  |  Branch (28574:21): [True: 2.01M, False: 7.06M]
  ------------------
28575|  2.01M|                    up1(s);
  ------------------
  |  |28467|  2.01M|#define up1(s) ((s)->depth++)
  ------------------
28576|  2.01M|                    return result;
28577|  2.01M|                }
28578|  7.06M|                cap_load(s, cs);
28579|  7.06M|            }
28580|  5.10M|            up1(s);
  ------------------
  |  |28467|  5.10M|#define up1(s) ((s)->depth++)
  ------------------
28581|  5.10M|            rule = s->bytecode + args[len - 1];
28582|  5.10M|            goto tail;
28583|  7.11M|        }
28584|       |
28585|  68.6M|        case RULE_SEQUENCE: {
  ------------------
  |  Branch (28585:9): [True: 68.6M, False: 369M]
  ------------------
28586|  68.6M|            uint32_t len = rule[1];
28587|  68.6M|            const uint32_t *args = rule + 2;
28588|  68.6M|            if (len == 0) return text;
  ------------------
  |  Branch (28588:17): [True: 68.1M, False: 453k]
  ------------------
28589|   453k|            down1(s);
  ------------------
  |  |28464|   453k|#define down1(s) do { \
  |  |28465|   453k|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28465:9): [True: 0, False: 453k]
  |  |  ------------------
  |  |28466|   453k|} while (0)
  |  |  ------------------
  |  |  |  Branch (28466:10): [Folded, False: 453k]
  |  |  ------------------
  ------------------
28590|   915k|            for (uint32_t i = 0; text && i < len - 1; i++)
  ------------------
  |  Branch (28590:34): [True: 905k, False: 9.46k]
  |  Branch (28590:42): [True: 461k, False: 444k]
  ------------------
28591|   461k|                text = peg_rule(s, s->bytecode + args[i], text);
28592|   453k|            up1(s);
  ------------------
  |  |28467|   453k|#define up1(s) ((s)->depth++)
  ------------------
28593|   453k|            if (!text) return NULL;
  ------------------
  |  Branch (28593:17): [True: 9.46k, False: 444k]
  ------------------
28594|   444k|            rule = s->bytecode + args[len - 1];
28595|   444k|            goto tail;
28596|   453k|        }
28597|       |
28598|  6.85k|        case RULE_IF: {
  ------------------
  |  Branch (28598:9): [True: 6.85k, False: 437M]
  ------------------
28599|  6.85k|            const uint32_t *rule_a = s->bytecode + rule[1];
28600|  6.85k|            const uint32_t *rule_b = s->bytecode + rule[2];
28601|  6.85k|            down1(s);
  ------------------
  |  |28464|  6.85k|#define down1(s) do { \
  |  |28465|  6.85k|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28465:9): [True: 0, False: 6.85k]
  |  |  ------------------
  |  |28466|  6.85k|} while (0)
  |  |  ------------------
  |  |  |  Branch (28466:10): [Folded, False: 6.85k]
  |  |  ------------------
  ------------------
28602|  6.85k|            const uint8_t *result = peg_rule(s, rule_a, text);
28603|  6.85k|            up1(s);
  ------------------
  |  |28467|  6.85k|#define up1(s) ((s)->depth++)
  ------------------
28604|  6.85k|            if (!result) return NULL;
  ------------------
  |  Branch (28604:17): [True: 1.28k, False: 5.56k]
  ------------------
28605|  5.56k|            rule = rule_b;
28606|  5.56k|            goto tail;
28607|  6.85k|        }
28608|      0|        case RULE_IFNOT: {
  ------------------
  |  Branch (28608:9): [True: 0, False: 437M]
  ------------------
28609|      0|            const uint32_t *rule_a = s->bytecode + rule[1];
28610|      0|            const uint32_t *rule_b = s->bytecode + rule[2];
28611|      0|            down1(s);
  ------------------
  |  |28464|      0|#define down1(s) do { \
  |  |28465|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28465:9): [True: 0, False: 0]
  |  |  ------------------
  |  |28466|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (28466:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
28612|      0|            CapState cs = cap_save(s);
28613|      0|            const uint8_t *result = peg_rule(s, rule_a, text);
28614|      0|            if (!!result) {
  ------------------
  |  Branch (28614:17): [True: 0, False: 0]
  ------------------
28615|      0|                up1(s);
  ------------------
  |  |28467|      0|#define up1(s) ((s)->depth++)
  ------------------
28616|      0|                return NULL;
28617|      0|            } else {
28618|      0|                cap_load(s, cs);
28619|      0|                up1(s);
  ------------------
  |  |28467|      0|#define up1(s) ((s)->depth++)
  ------------------
28620|      0|                rule = rule_b;
28621|      0|                goto tail;
28622|      0|            }
28623|      0|        }
28624|       |
28625|  22.2k|        case RULE_NOT: {
  ------------------
  |  Branch (28625:9): [True: 22.2k, False: 437M]
  ------------------
28626|  22.2k|            const uint32_t *rule_a = s->bytecode + rule[1];
28627|  22.2k|            down1(s);
  ------------------
  |  |28464|  22.2k|#define down1(s) do { \
  |  |28465|  22.2k|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28465:9): [True: 0, False: 22.2k]
  |  |  ------------------
  |  |28466|  22.2k|} while (0)
  |  |  ------------------
  |  |  |  Branch (28466:10): [Folded, False: 22.2k]
  |  |  ------------------
  ------------------
28628|  22.2k|            CapState cs = cap_save(s);
28629|  22.2k|            const uint8_t *result = peg_rule(s, rule_a, text);
28630|  22.2k|            if (result) {
  ------------------
  |  Branch (28630:17): [True: 15.2k, False: 7.05k]
  ------------------
28631|  15.2k|                up1(s);
  ------------------
  |  |28467|  15.2k|#define up1(s) ((s)->depth++)
  ------------------
28632|  15.2k|                return NULL;
28633|  15.2k|            } else {
28634|  7.05k|                cap_load(s, cs);
28635|  7.05k|                up1(s);
  ------------------
  |  |28467|  7.05k|#define up1(s) ((s)->depth++)
  ------------------
28636|  7.05k|                return text;
28637|  7.05k|            }
28638|  22.2k|        }
28639|       |
28640|      0|        case RULE_THRU:
  ------------------
  |  Branch (28640:9): [True: 0, False: 437M]
  ------------------
28641|    753|        case RULE_TO: {
  ------------------
  |  Branch (28641:9): [True: 753, False: 437M]
  ------------------
28642|    753|            const uint32_t *rule_a = s->bytecode + rule[1];
28643|    753|            const uint8_t *next_text = NULL;
28644|    753|            CapState cs = cap_save(s);
28645|    753|            down1(s);
  ------------------
  |  |28464|    753|#define down1(s) do { \
  |  |28465|    753|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28465:9): [True: 0, False: 753]
  |  |  ------------------
  |  |28466|    753|} while (0)
  |  |  ------------------
  |  |  |  Branch (28466:10): [Folded, False: 753]
  |  |  ------------------
  ------------------
28646|  9.90k|            while (text <= s->text_end) {
  ------------------
  |  Branch (28646:20): [True: 9.70k, False: 203]
  ------------------
28647|  9.70k|                CapState cs2 = cap_save(s);
28648|  9.70k|                next_text = peg_rule(s, rule_a, text);
28649|  9.70k|                if (next_text) {
  ------------------
  |  Branch (28649:21): [True: 550, False: 9.15k]
  ------------------
28650|    550|                    if (rule[0] == RULE_TO) cap_load(s, cs2);
  ------------------
  |  Branch (28650:25): [True: 550, False: 0]
  ------------------
28651|    550|                    break;
28652|    550|                }
28653|  9.15k|                cap_load(s, cs2);
28654|  9.15k|                text++;
28655|  9.15k|            }
28656|    753|            up1(s);
  ------------------
  |  |28467|    753|#define up1(s) ((s)->depth++)
  ------------------
28657|    753|            if (text > s->text_end) {
  ------------------
  |  Branch (28657:17): [True: 203, False: 550]
  ------------------
28658|    203|                cap_load(s, cs);
28659|    203|                return NULL;
28660|    203|            }
28661|    550|            return rule[0] == RULE_TO ? text : next_text;
  ------------------
  |  Branch (28661:20): [True: 550, False: 0]
  ------------------
28662|    753|        }
28663|       |
28664|  38.0k|        case RULE_BETWEEN: {
  ------------------
  |  Branch (28664:9): [True: 38.0k, False: 437M]
  ------------------
28665|  38.0k|            uint32_t lo = rule[1];
28666|  38.0k|            uint32_t hi = rule[2];
28667|  38.0k|            const uint32_t *rule_a = s->bytecode + rule[3];
28668|  38.0k|            uint32_t captured = 0;
28669|  38.0k|            const uint8_t *next_text;
28670|  38.0k|            CapState cs = cap_save(s);
28671|  38.0k|            down1(s);
  ------------------
  |  |28464|  38.0k|#define down1(s) do { \
  |  |28465|  38.0k|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28465:9): [True: 0, False: 38.0k]
  |  |  ------------------
  |  |28466|  38.0k|} while (0)
  |  |  ------------------
  |  |  |  Branch (28466:10): [Folded, False: 38.0k]
  |  |  ------------------
  ------------------
28672|   217M|            while (captured < hi) {
  ------------------
  |  Branch (28672:20): [True: 217M, False: 3.71k]
  ------------------
28673|   217M|                CapState cs2 = cap_save(s);
28674|   217M|                next_text = peg_rule(s, rule_a, text);
28675|   217M|                if (!next_text || ((next_text == text) && (hi == UINT32_MAX))) {
  ------------------
  |  Branch (28675:21): [True: 5.31k, False: 217M]
  |  Branch (28675:36): [True: 215M, False: 1.78M]
  |  Branch (28675:59): [True: 29.0k, False: 215M]
  ------------------
28676|  34.3k|                    cap_load(s, cs2);
28677|  34.3k|                    break;
28678|  34.3k|                }
28679|   217M|                captured++;
28680|   217M|                text = next_text;
28681|   217M|            }
28682|  38.0k|            up1(s);
  ------------------
  |  |28467|  38.0k|#define up1(s) ((s)->depth++)
  ------------------
28683|  38.0k|            if (captured < lo) {
  ------------------
  |  Branch (28683:17): [True: 4.55k, False: 33.4k]
  ------------------
28684|  4.55k|                cap_load(s, cs);
28685|  4.55k|                return NULL;
28686|  4.55k|            }
28687|  33.4k|            return text;
28688|  38.0k|        }
28689|       |
28690|       |        /* Capturing rules */
28691|       |
28692|  1.91M|        case RULE_GETTAG: {
  ------------------
  |  Branch (28692:9): [True: 1.91M, False: 435M]
  ------------------
28693|  1.91M|            uint32_t search = rule[1];
28694|  1.91M|            uint32_t tag = rule[2];
28695|  16.5M|            for (int32_t i = s->tags->count - 1; i >= 0; i--) {
  ------------------
  |  Branch (28695:50): [True: 16.5M, False: 4.65k]
  ------------------
28696|  16.5M|                if (s->tags->data[i] == search) {
  ------------------
  |  Branch (28696:21): [True: 1.90M, False: 14.6M]
  ------------------
28697|  1.90M|                    pushcap(s, s->tagged_captures->data[i], tag);
28698|  1.90M|                    return text;
28699|  1.90M|                }
28700|  16.5M|            }
28701|  4.65k|            return NULL;
28702|  1.91M|        }
28703|       |
28704|  73.0M|        case RULE_POSITION: {
  ------------------
  |  Branch (28704:9): [True: 73.0M, False: 364M]
  ------------------
28705|  73.0M|            pushcap(s, janet_wrap_number((double)(text - s->text_start)), rule[1]);
  ------------------
  |  |  835|  73.0M|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
28706|  73.0M|            return text;
28707|  1.91M|        }
28708|       |
28709|  5.49M|        case RULE_LINE: {
  ------------------
  |  Branch (28709:9): [True: 5.49M, False: 432M]
  ------------------
28710|  5.49M|            LineCol lc = get_linecol_from_position(s, (int32_t)(text - s->text_start));
28711|  5.49M|            pushcap(s, janet_wrap_number((double)(lc.line)), rule[1]);
  ------------------
  |  |  835|  5.49M|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
28712|  5.49M|            return text;
28713|  1.91M|        }
28714|       |
28715|      1|        case RULE_COLUMN: {
  ------------------
  |  Branch (28715:9): [True: 1, False: 437M]
  ------------------
28716|      1|            LineCol lc = get_linecol_from_position(s, (int32_t)(text - s->text_start));
28717|      1|            pushcap(s, janet_wrap_number((double)(lc.col)), rule[1]);
  ------------------
  |  |  835|      1|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
28718|      1|            return text;
28719|  1.91M|        }
28720|       |
28721|      0|        case RULE_ARGUMENT: {
  ------------------
  |  Branch (28721:9): [True: 0, False: 437M]
  ------------------
28722|      0|            int32_t index = ((int32_t *)rule)[1];
28723|      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 (28723:29): [True: 0, False: 0]
  ------------------
28724|      0|            pushcap(s, capture, rule[2]);
28725|      0|            return text;
28726|  1.91M|        }
28727|       |
28728|      0|        case RULE_CONSTANT: {
  ------------------
  |  Branch (28728:9): [True: 0, False: 437M]
  ------------------
28729|      0|            pushcap(s, s->constants[rule[1]], rule[2]);
28730|      0|            return text;
28731|  1.91M|        }
28732|       |
28733|   141M|        case RULE_CAPTURE: {
  ------------------
  |  Branch (28733:9): [True: 141M, False: 296M]
  ------------------
28734|   141M|            down1(s);
  ------------------
  |  |28464|   141M|#define down1(s) do { \
  |  |28465|   141M|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28465:9): [True: 0, False: 141M]
  |  |  ------------------
  |  |28466|   141M|} while (0)
  |  |  ------------------
  |  |  |  Branch (28466:10): [Folded, False: 141M]
  |  |  ------------------
  ------------------
28735|   141M|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
28736|   141M|            up1(s);
  ------------------
  |  |28467|   141M|#define up1(s) ((s)->depth++)
  ------------------
28737|   141M|            if (!result) return NULL;
  ------------------
  |  Branch (28737:17): [True: 5.16M, False: 136M]
  ------------------
28738|       |            /* Specialized pushcap - avoid intermediate string creation */
28739|   136M|            if (!s->has_backref && s->mode == PEG_MODE_ACCUMULATE) {
  ------------------
  |  Branch (28739:17): [True: 132M, False: 3.98M]
  |  Branch (28739:36): [True: 130M, False: 1.94M]
  ------------------
28740|   130M|                janet_buffer_push_bytes(s->scratch, text, (int32_t)(result - text));
28741|   130M|            } else {
28742|  5.92M|                uint32_t tag = rule[2];
28743|  5.92M|                pushcap(s, janet_stringv(text, (int32_t)(result - text)), tag);
  ------------------
  |  | 1827|  5.92M|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  848|  5.92M|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  5.92M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  5.92M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  5.92M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28744|  5.92M|            }
28745|   136M|            return result;
28746|   141M|        }
28747|       |
28748|      0|        case RULE_CAPTURE_NUM: {
  ------------------
  |  Branch (28748:9): [True: 0, False: 437M]
  ------------------
28749|      0|            down1(s);
  ------------------
  |  |28464|      0|#define down1(s) do { \
  |  |28465|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28465:9): [True: 0, False: 0]
  |  |  ------------------
  |  |28466|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (28466:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
28750|      0|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
28751|      0|            up1(s);
  ------------------
  |  |28467|      0|#define up1(s) ((s)->depth++)
  ------------------
28752|      0|            if (!result) return NULL;
  ------------------
  |  Branch (28752:17): [True: 0, False: 0]
  ------------------
28753|       |            /* check number parsing */
28754|      0|            double x = 0.0;
28755|      0|            int32_t base = (int32_t) rule[2];
28756|      0|            if (janet_scan_number_base(text, (int32_t)(result - text), base, &x)) return NULL;
  ------------------
  |  Branch (28756:17): [True: 0, False: 0]
  ------------------
28757|       |            /* Specialized pushcap - avoid intermediate string creation */
28758|      0|            if (!s->has_backref && s->mode == PEG_MODE_ACCUMULATE) {
  ------------------
  |  Branch (28758:17): [True: 0, False: 0]
  |  Branch (28758:36): [True: 0, False: 0]
  ------------------
28759|      0|                janet_buffer_push_bytes(s->scratch, text, (int32_t)(result - text));
28760|      0|            } else {
28761|      0|                uint32_t tag = rule[3];
28762|      0|                pushcap(s, janet_wrap_number(x), tag);
  ------------------
  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
28763|      0|            }
28764|      0|            return result;
28765|      0|        }
28766|       |
28767|  7.02M|        case RULE_ACCUMULATE: {
  ------------------
  |  Branch (28767:9): [True: 7.02M, False: 430M]
  ------------------
28768|  7.02M|            uint32_t tag = rule[2];
28769|  7.02M|            int oldmode = s->mode;
28770|  7.02M|            if (!tag && oldmode == PEG_MODE_ACCUMULATE) {
  ------------------
  |  Branch (28770:17): [True: 7.05k, False: 7.01M]
  |  Branch (28770:25): [True: 230, False: 6.82k]
  ------------------
28771|    230|                rule = s->bytecode + rule[1];
28772|    230|                goto tail;
28773|    230|            }
28774|  7.02M|            CapState cs = cap_save(s);
28775|  7.02M|            s->mode = PEG_MODE_ACCUMULATE;
28776|  7.02M|            down1(s);
  ------------------
  |  |28464|  7.02M|#define down1(s) do { \
  |  |28465|  7.02M|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28465:9): [True: 0, False: 7.02M]
  |  |  ------------------
  |  |28466|  7.02M|} while (0)
  |  |  ------------------
  |  |  |  Branch (28466:10): [Folded, False: 7.02M]
  |  |  ------------------
  ------------------
28777|  7.02M|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
28778|  7.02M|            up1(s);
  ------------------
  |  |28467|  7.02M|#define up1(s) ((s)->depth++)
  ------------------
28779|  7.02M|            s->mode = oldmode;
28780|  7.02M|            if (!result) return NULL;
  ------------------
  |  Branch (28780:17): [True: 1.16k, False: 7.01M]
  ------------------
28781|  7.01M|            Janet cap = janet_stringv(s->scratch->data + cs.scratch,
  ------------------
  |  | 1827|  7.01M|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  848|  7.01M|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  7.01M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  7.01M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  7.01M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28782|  7.01M|                                      s->scratch->count - cs.scratch);
28783|  7.01M|            cap_load_keept(s, cs);
28784|  7.01M|            pushcap(s, cap, tag);
28785|  7.01M|            return result;
28786|  7.02M|        }
28787|       |
28788|      0|        case RULE_DROP: {
  ------------------
  |  Branch (28788:9): [True: 0, False: 437M]
  ------------------
28789|      0|            CapState cs = cap_save(s);
28790|      0|            down1(s);
  ------------------
  |  |28464|      0|#define down1(s) do { \
  |  |28465|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28465:9): [True: 0, False: 0]
  |  |  ------------------
  |  |28466|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (28466:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
28791|      0|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
28792|      0|            up1(s);
  ------------------
  |  |28467|      0|#define up1(s) ((s)->depth++)
  ------------------
28793|      0|            if (!result) return NULL;
  ------------------
  |  Branch (28793:17): [True: 0, False: 0]
  ------------------
28794|      0|            cap_load(s, cs);
28795|      0|            return result;
28796|      0|        }
28797|       |
28798|      0|        case RULE_ONLY_TAGS: {
  ------------------
  |  Branch (28798:9): [True: 0, False: 437M]
  ------------------
28799|      0|            CapState cs = cap_save(s);
28800|      0|            down1(s);
  ------------------
  |  |28464|      0|#define down1(s) do { \
  |  |28465|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28465:9): [True: 0, False: 0]
  |  |  ------------------
  |  |28466|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (28466:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
28801|      0|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
28802|      0|            up1(s);
  ------------------
  |  |28467|      0|#define up1(s) ((s)->depth++)
  ------------------
28803|      0|            if (!result) return NULL;
  ------------------
  |  Branch (28803:17): [True: 0, False: 0]
  ------------------
28804|      0|            cap_load_keept(s, cs);
28805|      0|            return result;
28806|      0|        }
28807|       |
28808|      0|        case RULE_GROUP: {
  ------------------
  |  Branch (28808:9): [True: 0, False: 437M]
  ------------------
28809|      0|            uint32_t tag = rule[2];
28810|      0|            int oldmode = s->mode;
28811|      0|            CapState cs = cap_save(s);
28812|      0|            s->mode = PEG_MODE_NORMAL;
28813|      0|            down1(s);
  ------------------
  |  |28464|      0|#define down1(s) do { \
  |  |28465|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28465:9): [True: 0, False: 0]
  |  |  ------------------
  |  |28466|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (28466:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
28814|      0|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
28815|      0|            up1(s);
  ------------------
  |  |28467|      0|#define up1(s) ((s)->depth++)
  ------------------
28816|      0|            s->mode = oldmode;
28817|      0|            if (!result) return NULL;
  ------------------
  |  Branch (28817:17): [True: 0, False: 0]
  ------------------
28818|      0|            int32_t num_sub_captures = s->captures->count - cs.cap;
28819|      0|            JanetArray *sub_captures = janet_array(num_sub_captures);
28820|      0|            safe_memcpy(sub_captures->data,
28821|      0|                        s->captures->data + cs.cap,
28822|      0|                        sizeof(Janet) * num_sub_captures);
28823|      0|            sub_captures->count = num_sub_captures;
28824|      0|            cap_load_keept(s, cs);
28825|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28826|      0|            return result;
28827|      0|        }
28828|       |
28829|      0|        case RULE_NTH: {
  ------------------
  |  Branch (28829:9): [True: 0, False: 437M]
  ------------------
28830|      0|            uint32_t nth = rule[1];
28831|      0|            if (nth > INT32_MAX) nth = INT32_MAX;
  ------------------
  |  Branch (28831:17): [True: 0, False: 0]
  ------------------
28832|      0|            uint32_t tag = rule[3];
28833|      0|            int oldmode = s->mode;
28834|      0|            CapState cs = cap_save(s);
28835|      0|            s->mode = PEG_MODE_NORMAL;
28836|      0|            down1(s);
  ------------------
  |  |28464|      0|#define down1(s) do { \
  |  |28465|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28465:9): [True: 0, False: 0]
  |  |  ------------------
  |  |28466|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (28466:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
28837|      0|            const uint8_t *result = peg_rule(s, s->bytecode + rule[2], text);
28838|      0|            up1(s);
  ------------------
  |  |28467|      0|#define up1(s) ((s)->depth++)
  ------------------
28839|      0|            s->mode = oldmode;
28840|      0|            if (!result) return NULL;
  ------------------
  |  Branch (28840:17): [True: 0, False: 0]
  ------------------
28841|      0|            int32_t num_sub_captures = s->captures->count - cs.cap;
28842|      0|            Janet cap;
28843|      0|            if (num_sub_captures > (int32_t) nth) {
  ------------------
  |  Branch (28843:17): [True: 0, False: 0]
  ------------------
28844|      0|                cap = s->captures->data[cs.cap + nth];
28845|      0|            } else {
28846|      0|                return NULL;
28847|      0|            }
28848|      0|            cap_load_keept(s, cs);
28849|      0|            pushcap(s, cap, tag);
28850|      0|            return result;
28851|      0|        }
28852|       |
28853|     91|        case RULE_SUB: {
  ------------------
  |  Branch (28853:9): [True: 91, False: 437M]
  ------------------
28854|     91|            const uint8_t *text_start = text;
28855|     91|            const uint32_t *rule_window = s->bytecode + rule[1];
28856|     91|            const uint32_t *rule_subpattern = s->bytecode + rule[2];
28857|     91|            down1(s);
  ------------------
  |  |28464|     91|#define down1(s) do { \
  |  |28465|     91|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28465:9): [True: 0, False: 91]
  |  |  ------------------
  |  |28466|     91|} while (0)
  |  |  ------------------
  |  |  |  Branch (28466:10): [Folded, False: 91]
  |  |  ------------------
  ------------------
28858|     91|            const uint8_t *window_end = peg_rule(s, rule_window, text);
28859|     91|            up1(s);
  ------------------
  |  |28467|     91|#define up1(s) ((s)->depth++)
  ------------------
28860|     91|            if (!window_end) {
  ------------------
  |  Branch (28860:17): [True: 88, False: 3]
  ------------------
28861|     88|                return NULL;
28862|     88|            }
28863|      3|            const uint8_t *saved_end = s->text_end;
28864|      3|            s->text_end = window_end;
28865|      3|            down1(s);
  ------------------
  |  |28464|      3|#define down1(s) do { \
  |  |28465|      3|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28465:9): [True: 0, False: 3]
  |  |  ------------------
  |  |28466|      3|} while (0)
  |  |  ------------------
  |  |  |  Branch (28466:10): [Folded, False: 3]
  |  |  ------------------
  ------------------
28866|      3|            const uint8_t *next_text = peg_rule(s, rule_subpattern, text_start);
28867|      3|            up1(s);
  ------------------
  |  |28467|      3|#define up1(s) ((s)->depth++)
  ------------------
28868|      3|            s->text_end = saved_end;
28869|       |
28870|      3|            if (!next_text) {
  ------------------
  |  Branch (28870:17): [True: 2, False: 1]
  ------------------
28871|      2|                return NULL;
28872|      2|            }
28873|       |
28874|      1|            return window_end;
28875|      3|        }
28876|       |
28877|  4.93k|        case RULE_TIL: {
  ------------------
  |  Branch (28877:9): [True: 4.93k, False: 437M]
  ------------------
28878|  4.93k|            const uint32_t *rule_terminus = s->bytecode + rule[1];
28879|  4.93k|            const uint32_t *rule_subpattern = s->bytecode + rule[2];
28880|       |
28881|  4.93k|            const uint8_t *terminus_start = text;
28882|  4.93k|            const uint8_t *terminus_end = NULL;
28883|  4.93k|            down1(s);
  ------------------
  |  |28464|  4.93k|#define down1(s) do { \
  |  |28465|  4.93k|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28465:9): [True: 0, False: 4.93k]
  |  |  ------------------
  |  |28466|  4.93k|} while (0)
  |  |  ------------------
  |  |  |  Branch (28466:10): [Folded, False: 4.93k]
  |  |  ------------------
  ------------------
28884|  8.81k|            while (terminus_start <= s->text_end) {
  ------------------
  |  Branch (28884:20): [True: 7.62k, False: 1.19k]
  ------------------
28885|  7.62k|                CapState cs2 = cap_save(s);
28886|  7.62k|                terminus_end = peg_rule(s, rule_terminus, terminus_start);
28887|  7.62k|                cap_load(s, cs2);
28888|  7.62k|                if (terminus_end) {
  ------------------
  |  Branch (28888:21): [True: 3.74k, False: 3.88k]
  ------------------
28889|  3.74k|                    break;
28890|  3.74k|                }
28891|  3.88k|                terminus_start++;
28892|  3.88k|            }
28893|  4.93k|            up1(s);
  ------------------
  |  |28467|  4.93k|#define up1(s) ((s)->depth++)
  ------------------
28894|       |
28895|  4.93k|            if (!terminus_end) {
  ------------------
  |  Branch (28895:17): [True: 1.19k, False: 3.74k]
  ------------------
28896|  1.19k|                return NULL;
28897|  1.19k|            }
28898|       |
28899|  3.74k|            const uint8_t *saved_end = s->text_end;
28900|  3.74k|            s->text_end = terminus_start;
28901|  3.74k|            down1(s);
  ------------------
  |  |28464|  3.74k|#define down1(s) do { \
  |  |28465|  3.74k|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28465:9): [True: 0, False: 3.74k]
  |  |  ------------------
  |  |28466|  3.74k|} while (0)
  |  |  ------------------
  |  |  |  Branch (28466:10): [Folded, False: 3.74k]
  |  |  ------------------
  ------------------
28902|  3.74k|            const uint8_t *matched = peg_rule(s, rule_subpattern, text);
28903|  3.74k|            up1(s);
  ------------------
  |  |28467|  3.74k|#define up1(s) ((s)->depth++)
  ------------------
28904|  3.74k|            s->text_end = saved_end;
28905|       |
28906|  3.74k|            if (!matched) {
  ------------------
  |  Branch (28906:17): [True: 1.55k, False: 2.18k]
  ------------------
28907|  1.55k|                return NULL;
28908|  1.55k|            }
28909|       |
28910|  2.18k|            return terminus_end;
28911|  3.74k|        }
28912|       |
28913|      0|        case RULE_SPLIT: {
  ------------------
  |  Branch (28913:9): [True: 0, False: 437M]
  ------------------
28914|      0|            const uint8_t *saved_end = s->text_end;
28915|      0|            const uint32_t *rule_separator = s->bytecode + rule[1];
28916|      0|            const uint32_t *rule_subpattern = s->bytecode + rule[2];
28917|       |
28918|      0|            const uint8_t *chunk_start = text;
28919|      0|            const uint8_t *chunk_end = NULL;
28920|       |
28921|      0|            while (text <= saved_end) {
  ------------------
  |  Branch (28921:20): [True: 0, False: 0]
  ------------------
28922|       |                /* Find next split (or end of text) */
28923|      0|                CapState cs = cap_save(s);
28924|      0|                down1(s);
  ------------------
  |  |28464|      0|#define down1(s) do { \
  |  |28465|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28465:9): [True: 0, False: 0]
  |  |  ------------------
  |  |28466|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (28466:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
28925|      0|                while (text <= saved_end) {
  ------------------
  |  Branch (28925:24): [True: 0, False: 0]
  ------------------
28926|      0|                    chunk_end = text;
28927|      0|                    const uint8_t *check = peg_rule(s, rule_separator, text);
28928|      0|                    cap_load(s, cs);
28929|      0|                    if (check) {
  ------------------
  |  Branch (28929:25): [True: 0, False: 0]
  ------------------
28930|      0|                        text = check;
28931|      0|                        break;
28932|      0|                    }
28933|      0|                    text++;
28934|      0|                }
28935|      0|                up1(s);
  ------------------
  |  |28467|      0|#define up1(s) ((s)->depth++)
  ------------------
28936|       |
28937|       |                /* Match between splits */
28938|      0|                s->text_end = chunk_end;
28939|      0|                down1(s);
  ------------------
  |  |28464|      0|#define down1(s) do { \
  |  |28465|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28465:9): [True: 0, False: 0]
  |  |  ------------------
  |  |28466|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (28466:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
28940|      0|                const uint8_t *subpattern_end = peg_rule(s, rule_subpattern, chunk_start);
28941|      0|                up1(s);
  ------------------
  |  |28467|      0|#define up1(s) ((s)->depth++)
  ------------------
28942|      0|                s->text_end = saved_end;
28943|      0|                if (!subpattern_end) return NULL; /* Don't match anything */
  ------------------
  |  Branch (28943:21): [True: 0, False: 0]
  ------------------
28944|       |
28945|       |                /* Ensure forward progress */
28946|      0|                if (text == chunk_start) return NULL;
  ------------------
  |  Branch (28946:21): [True: 0, False: 0]
  ------------------
28947|      0|                chunk_start = text;
28948|      0|            }
28949|       |
28950|      0|            s->text_end = saved_end;
28951|      0|            return s->text_end;
28952|      0|        }
28953|       |
28954|  56.5M|        case RULE_REPLACE:
  ------------------
  |  Branch (28954:9): [True: 56.5M, False: 381M]
  ------------------
28955|  56.5M|        case RULE_MATCHSPLICE:
  ------------------
  |  Branch (28955:9): [True: 0, False: 437M]
  ------------------
28956|  56.5M|        case RULE_MATCHTIME: {
  ------------------
  |  Branch (28956:9): [True: 0, False: 437M]
  ------------------
28957|  56.5M|            uint32_t tag = rule[3];
28958|  56.5M|            int oldmode = s->mode;
28959|  56.5M|            CapState cs = cap_save(s);
28960|  56.5M|            s->mode = PEG_MODE_NORMAL;
28961|  56.5M|            down1(s);
  ------------------
  |  |28464|  56.5M|#define down1(s) do { \
  |  |28465|  56.5M|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28465:9): [True: 0, False: 56.5M]
  |  |  ------------------
  |  |28466|  56.5M|} while (0)
  |  |  ------------------
  |  |  |  Branch (28466:10): [Folded, False: 56.5M]
  |  |  ------------------
  ------------------
28962|  56.5M|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
28963|  56.5M|            up1(s);
  ------------------
  |  |28467|  56.5M|#define up1(s) ((s)->depth++)
  ------------------
28964|  56.5M|            s->mode = oldmode;
28965|  56.5M|            if (!result) return NULL;
  ------------------
  |  Branch (28965:17): [True: 895, False: 56.5M]
  ------------------
28966|       |
28967|  56.5M|            Janet cap = janet_wrap_nil();
  ------------------
  |  |  831|  56.5M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  56.5M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  56.5M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  56.5M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28968|  56.5M|            Janet constant = s->constants[rule[2]];
28969|  56.5M|            switch (janet_type(constant)) {
  ------------------
  |  |  795|  56.5M|    (isnan((x).number) \
  |  |  796|  56.5M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  56.5M|        : JANET_NUMBER)
  ------------------
  |  Branch (28969:21): [True: 56.5M, False: 11.3k]
  ------------------
28970|  56.5M|                default:
  ------------------
  |  Branch (28970:17): [True: 56.5M, False: 2]
  ------------------
28971|  56.5M|                    cap = constant;
28972|  56.5M|                    break;
28973|      2|                case JANET_STRUCT:
  ------------------
  |  Branch (28973:17): [True: 2, False: 56.5M]
  ------------------
28974|      2|                    if (s->captures->count) {
  ------------------
  |  Branch (28974:25): [True: 1, False: 1]
  ------------------
28975|      1|                        cap = janet_struct_get(janet_unwrap_struct(constant),
  ------------------
  |  |  857|      1|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
28976|      1|                                               s->captures->data[s->captures->count - 1]);
28977|      1|                    }
28978|      2|                    break;
28979|      0|                case JANET_TABLE:
  ------------------
  |  Branch (28979:17): [True: 0, False: 56.5M]
  ------------------
28980|      0|                    if (s->captures->count) {
  ------------------
  |  Branch (28980:25): [True: 0, False: 0]
  ------------------
28981|      0|                        cap = janet_table_get(janet_unwrap_table(constant),
  ------------------
  |  |  861|      0|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
28982|      0|                                              s->captures->data[s->captures->count - 1]);
28983|      0|                    }
28984|      0|                    break;
28985|      0|                case JANET_CFUNCTION:
  ------------------
  |  Branch (28985:17): [True: 0, False: 56.5M]
  ------------------
28986|      0|                    cap = janet_unwrap_cfunction(constant)(s->captures->count - cs.cap,
  ------------------
  |  |  869|      0|#define janet_unwrap_cfunction(x) ((JanetCFunction)janet_nanbox_to_pointer(x))
  ------------------
28987|      0|                                                           s->captures->data + cs.cap);
28988|      0|                    break;
28989|      0|                case JANET_FUNCTION:
  ------------------
  |  Branch (28989:17): [True: 0, False: 56.5M]
  ------------------
28990|      0|                    cap = janet_call(janet_unwrap_function(constant),
  ------------------
  |  |  868|      0|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
28991|      0|                                     s->captures->count - cs.cap,
28992|      0|                                     s->captures->data + cs.cap);
28993|      0|                    break;
28994|  56.5M|            }
28995|  56.5M|            cap_load_keept(s, cs);
28996|  56.5M|            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 (28996:17): [True: 0, False: 56.5M]
  ------------------
28997|  56.5M|            const Janet *elements = NULL;
28998|  56.5M|            int32_t len = 0;
28999|  56.5M|            if ((rule[0] == RULE_MATCHSPLICE) && janet_indexed_view(cap, &elements, &len)) {
  ------------------
  |  Branch (28999:17): [True: 0, False: 56.5M]
  |  Branch (28999:50): [True: 0, False: 0]
  ------------------
29000|       |                /* unpack and flatten capture */
29001|      0|                for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (29001:37): [True: 0, False: 0]
  ------------------
29002|      0|                    pushcap(s, elements[i], tag);
29003|      0|                }
29004|  56.5M|            } else {
29005|  56.5M|                pushcap(s, cap, tag);
29006|  56.5M|            }
29007|  56.5M|            return result;
29008|  56.5M|        }
29009|       |
29010|     23|        case RULE_ERROR: {
  ------------------
  |  Branch (29010:9): [True: 23, False: 437M]
  ------------------
29011|     23|            int oldmode = s->mode;
29012|     23|            s->mode = PEG_MODE_NORMAL;
29013|     23|            int32_t old_cap = s->captures->count;
29014|     23|            down1(s);
  ------------------
  |  |28464|     23|#define down1(s) do { \
  |  |28465|     23|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28465:9): [True: 0, False: 23]
  |  |  ------------------
  |  |28466|     23|} while (0)
  |  |  ------------------
  |  |  |  Branch (28466:10): [Folded, False: 23]
  |  |  ------------------
  ------------------
29015|     23|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
29016|     23|            up1(s);
  ------------------
  |  |28467|     23|#define up1(s) ((s)->depth++)
  ------------------
29017|     23|            s->mode = oldmode;
29018|     23|            if (!result) return NULL;
  ------------------
  |  Branch (29018:17): [True: 6, False: 17]
  ------------------
29019|     17|            if (s->captures->count > old_cap) {
  ------------------
  |  Branch (29019:17): [True: 4, False: 13]
  ------------------
29020|       |                /* Throw last capture */
29021|      4|                janet_panicv(s->captures->data[s->captures->count - 1]);
29022|     13|            } else {
29023|       |                /* Throw generic error */
29024|     13|                int32_t start = (int32_t)(text - s->text_start);
29025|     13|                LineCol lc = get_linecol_from_position(s, start);
29026|     13|                janet_panicf("match error at line %d, column %d", lc.line, lc.col);
29027|     13|            }
29028|      0|            return NULL;
29029|     17|        }
29030|       |
29031|      0|        case RULE_BACKMATCH: {
  ------------------
  |  Branch (29031:9): [True: 0, False: 437M]
  ------------------
29032|      0|            uint32_t search = rule[1];
29033|      0|            for (int32_t i = s->tags->count - 1; i >= 0; i--) {
  ------------------
  |  Branch (29033:50): [True: 0, False: 0]
  ------------------
29034|      0|                if (s->tags->data[i] == search) {
  ------------------
  |  Branch (29034:21): [True: 0, False: 0]
  ------------------
29035|      0|                    Janet capture = s->tagged_captures->data[i];
29036|      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 (29036:25): [True: 0, False: 0]
  ------------------
29037|      0|                        return NULL;
29038|      0|                    const uint8_t *bytes = janet_unwrap_string(capture);
  ------------------
  |  |  863|      0|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
29039|      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)))
  |  |  ------------------
  ------------------
29040|      0|                    if (text + len > s->text_end)
  ------------------
  |  Branch (29040:25): [True: 0, False: 0]
  ------------------
29041|      0|                        return NULL;
29042|      0|                    return memcmp(text, bytes, len) ? NULL : text + len;
  ------------------
  |  Branch (29042:28): [True: 0, False: 0]
  ------------------
29043|      0|                }
29044|      0|            }
29045|      0|            return NULL;
29046|      0|        }
29047|       |
29048|      0|        case RULE_LENPREFIX: {
  ------------------
  |  Branch (29048:9): [True: 0, False: 437M]
  ------------------
29049|      0|            int oldmode = s->mode;
29050|      0|            s->mode = PEG_MODE_NORMAL;
29051|      0|            const uint8_t *next_text;
29052|      0|            CapState cs = cap_save(s);
29053|      0|            down1(s);
  ------------------
  |  |28464|      0|#define down1(s) do { \
  |  |28465|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28465:9): [True: 0, False: 0]
  |  |  ------------------
  |  |28466|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (28466:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
29054|      0|            next_text = peg_rule(s, s->bytecode + rule[1], text);
29055|      0|            up1(s);
  ------------------
  |  |28467|      0|#define up1(s) ((s)->depth++)
  ------------------
29056|      0|            if (NULL == next_text) return NULL;
  ------------------
  |  Branch (29056:17): [True: 0, False: 0]
  ------------------
29057|      0|            s->mode = oldmode;
29058|      0|            int32_t num_sub_captures = s->captures->count - cs.cap;
29059|      0|            Janet lencap;
29060|      0|            if (num_sub_captures <= 0 ||
  ------------------
  |  Branch (29060:17): [True: 0, False: 0]
  ------------------
29061|      0|                    (lencap = s->captures->data[cs.cap], !janet_checkint(lencap))) {
  ------------------
  |  Branch (29061:21): [True: 0, False: 0]
  ------------------
29062|      0|                cap_load(s, cs);
29063|      0|                return NULL;
29064|      0|            }
29065|      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)
  |  |  ------------------
  ------------------
29066|       |            /* drop captures from len pattern */
29067|      0|            cap_load(s, cs);
29068|      0|            for (int32_t i = 0; i < nrep; i++) {
  ------------------
  |  Branch (29068:33): [True: 0, False: 0]
  ------------------
29069|      0|                down1(s);
  ------------------
  |  |28464|      0|#define down1(s) do { \
  |  |28465|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28465:9): [True: 0, False: 0]
  |  |  ------------------
  |  |28466|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (28466:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
29070|      0|                next_text = peg_rule(s, s->bytecode + rule[2], next_text);
29071|      0|                up1(s);
  ------------------
  |  |28467|      0|#define up1(s) ((s)->depth++)
  ------------------
29072|      0|                if (NULL == next_text) {
  ------------------
  |  Branch (29072:21): [True: 0, False: 0]
  ------------------
29073|      0|                    cap_load(s, cs);
29074|      0|                    return NULL;
29075|      0|                }
29076|      0|            }
29077|      0|            return next_text;
29078|      0|        }
29079|       |
29080|  12.6k|        case RULE_READINT: {
  ------------------
  |  Branch (29080:9): [True: 12.6k, False: 437M]
  ------------------
29081|  12.6k|            uint32_t tag = rule[2];
29082|  12.6k|            uint32_t signedness = rule[1] & 0x10;
29083|  12.6k|            uint32_t endianness = rule[1] & 0x20;
29084|  12.6k|            int width = (int)(rule[1] & 0xF);
29085|  12.6k|            if (text + width > s->text_end) return NULL;
  ------------------
  |  Branch (29085:17): [True: 990, False: 11.6k]
  ------------------
29086|  11.6k|            uint64_t accum = 0;
29087|  11.6k|            if (endianness) {
  ------------------
  |  Branch (29087:17): [True: 0, False: 11.6k]
  ------------------
29088|       |                /* BE */
29089|      0|                for (int i = 0; i < width; i++) accum = (accum << 8) | text[i];
  ------------------
  |  Branch (29089:33): [True: 0, False: 0]
  ------------------
29090|  11.6k|            } else {
29091|       |                /* LE */
29092|  32.2k|                for (int i = width - 1; i >= 0; i--) accum = (accum << 8) | text[i];
  ------------------
  |  Branch (29092:41): [True: 20.5k, False: 11.6k]
  ------------------
29093|  11.6k|            }
29094|       |
29095|  11.6k|            Janet capture_value;
29096|       |            /* We can only parse integeres of greater than 6 bytes reliable if int-types are enabled.
29097|       |             * Otherwise, we may lose precision, so 6 is the maximum size when int-types are disabled. */
29098|  11.6k|#ifdef JANET_INT_TYPES
29099|  11.6k|            if (width > 6) {
  ------------------
  |  Branch (29099:17): [True: 1.71k, False: 9.95k]
  ------------------
29100|  1.71k|                if (signedness) {
  ------------------
  |  Branch (29100:21): [True: 1.19k, False: 515]
  ------------------
29101|  1.19k|                    capture_value = janet_wrap_s64(peg_convert_u64_s64(accum, width));
29102|  1.19k|                } else {
29103|    515|                    capture_value = janet_wrap_u64(accum);
29104|    515|                }
29105|  1.71k|            } else
29106|  9.95k|#endif
29107|  9.95k|            {
29108|  9.95k|                double double_value;
29109|  9.95k|                if (signedness) {
  ------------------
  |  Branch (29109:21): [True: 8.63k, False: 1.31k]
  ------------------
29110|  8.63k|                    double_value = (double)(peg_convert_u64_s64(accum, width));
29111|  8.63k|                } else {
29112|  1.31k|                    double_value = (double)accum;
29113|  1.31k|                }
29114|  9.95k|                capture_value = janet_wrap_number(double_value);
  ------------------
  |  |  835|  9.95k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
29115|  9.95k|            }
29116|       |
29117|  11.6k|            pushcap(s, capture_value, tag);
29118|  11.6k|            return text + width;
29119|  12.6k|        }
29120|       |
29121|      0|        case RULE_UNREF: {
  ------------------
  |  Branch (29121:9): [True: 0, False: 437M]
  ------------------
29122|      0|            int32_t tcap = s->tags->count;
29123|      0|            down1(s);
  ------------------
  |  |28464|      0|#define down1(s) do { \
  |  |28465|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28465:9): [True: 0, False: 0]
  |  |  ------------------
  |  |28466|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (28466:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
29124|      0|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
29125|      0|            up1(s);
  ------------------
  |  |28467|      0|#define up1(s) ((s)->depth++)
  ------------------
29126|      0|            if (!result) return NULL;
  ------------------
  |  Branch (29126:17): [True: 0, False: 0]
  ------------------
29127|      0|            int32_t final_tcap = s->tags->count;
29128|       |            /* Truncate tagged captures to not include items of the given tag */
29129|      0|            int32_t w = tcap;
29130|       |            /* If no tag is given, drop ALL tagged captures */
29131|      0|            if (rule[2]) {
  ------------------
  |  Branch (29131:17): [True: 0, False: 0]
  ------------------
29132|      0|                for (int32_t i = tcap; i < final_tcap; i++) {
  ------------------
  |  Branch (29132:40): [True: 0, False: 0]
  ------------------
29133|      0|                    if (s->tags->data[i] != (0xFF & rule[2])) {
  ------------------
  |  Branch (29133:25): [True: 0, False: 0]
  ------------------
29134|      0|                        s->tags->data[w] = s->tags->data[i];
29135|      0|                        s->tagged_captures->data[w] = s->tagged_captures->data[i];
29136|      0|                        w++;
29137|      0|                    }
29138|      0|                }
29139|      0|            }
29140|      0|            s->tags->count = w;
29141|      0|            s->tagged_captures->count = w;
29142|      0|            return result;
29143|      0|        }
29144|       |
29145|   437M|    }
29146|   437M|}
janet.c:cap_save:
28368|   288M|static CapState cap_save(PegState *s) {
28369|   288M|    CapState cs;
28370|   288M|    cs.scratch = s->scratch->count;
28371|   288M|    cs.cap = s->captures->count;
28372|   288M|    cs.tcap = s->tagged_captures->count;
28373|   288M|    return cs;
28374|   288M|}
janet.c:cap_load:
28377|  7.12M|static void cap_load(PegState *s, CapState cs) {
28378|  7.12M|    s->scratch->count = cs.scratch;
28379|  7.12M|    s->captures->count = cs.cap;
28380|  7.12M|    s->tags->count = cs.tcap;
28381|  7.12M|    s->tagged_captures->count = cs.tcap;
28382|  7.12M|}
janet.c:pushcap:
28392|   149M|static void pushcap(PegState *s, Janet capture, uint32_t tag) {
28393|   149M|    if (s->mode == PEG_MODE_ACCUMULATE) {
  ------------------
  |  Branch (28393:9): [True: 61.6M, False: 88.2M]
  ------------------
28394|  61.6M|        janet_to_string_b(s->scratch, capture);
28395|  61.6M|    }
28396|   149M|    if (s->mode == PEG_MODE_NORMAL) {
  ------------------
  |  Branch (28396:9): [True: 88.2M, False: 61.6M]
  ------------------
28397|  88.2M|        janet_array_push(s->captures, capture);
28398|  88.2M|    }
28399|   149M|    if (s->has_backref) {
  ------------------
  |  Branch (28399:9): [True: 7.80M, False: 142M]
  ------------------
28400|  7.80M|        janet_array_push(s->tagged_captures, capture);
28401|  7.80M|        janet_buffer_push_u8(s->tags, tag);
28402|  7.80M|    }
28403|   149M|}
janet.c:get_linecol_from_position:
28411|  5.49M|static LineCol get_linecol_from_position(PegState *s, int32_t position) {
28412|       |    /* Generate if not made yet */
28413|  5.49M|    if (s->linemaplen < 0) {
  ------------------
  |  Branch (28413:9): [True: 198, False: 5.49M]
  ------------------
28414|    198|        int32_t newline_count = 0;
28415|  6.38M|        for (const uint8_t *c = s->text_start; c < s->outer_text_end; c++) {
  ------------------
  |  Branch (28415:48): [True: 6.38M, False: 198]
  ------------------
28416|  6.38M|            if (*c == '\n') newline_count++;
  ------------------
  |  Branch (28416:17): [True: 1.59M, False: 4.78M]
  ------------------
28417|  6.38M|        }
28418|    198|        int32_t *mem = janet_smalloc(sizeof(int32_t) * newline_count);
28419|    198|        size_t index = 0;
28420|  6.38M|        for (const uint8_t *c = s->text_start; c < s->outer_text_end; c++) {
  ------------------
  |  Branch (28420:48): [True: 6.38M, False: 198]
  ------------------
28421|  6.38M|            if (*c == '\n') mem[index++] = (int32_t)(c - s->text_start);
  ------------------
  |  Branch (28421:17): [True: 1.59M, False: 4.78M]
  ------------------
28422|  6.38M|        }
28423|    198|        s->linemaplen = newline_count;
28424|    198|        s->linemap = mem;
28425|    198|    }
28426|       |    /* Do binary search for line. Slightly modified from classic binary search:
28427|       |     * - if we find that our current character is a line break, just return immediately.
28428|       |     *   a newline character is consider to be on the same line as the character before
28429|       |     *   (\n is line terminator, not line separator).
28430|       |     * - in the not-found case, we still want to find the greatest-indexed newline that
28431|       |     *   is before position. we use that to calculate the line and column.
28432|       |     * - in the case that lo = 0 and s->linemap[0] is still greater than position, we
28433|       |     *   are on the first line and our column is position + 1. */
28434|  5.49M|    int32_t hi = s->linemaplen; /* hi is greater than the actual line */
28435|  5.49M|    int32_t lo = 0; /* lo is less than or equal to the actual line */
28436|  5.49M|    LineCol ret;
28437|  58.3M|    while (lo + 1 < hi) {
  ------------------
  |  Branch (28437:12): [True: 52.8M, False: 5.49M]
  ------------------
28438|  52.8M|        int32_t mid = lo + (hi - lo) / 2;
28439|  52.8M|        if (s->linemap[mid] >= position) {
  ------------------
  |  Branch (28439:13): [True: 6.98M, False: 45.8M]
  ------------------
28440|  6.98M|            hi = mid;
28441|  45.8M|        } else {
28442|  45.8M|            lo = mid;
28443|  45.8M|        }
28444|  52.8M|    }
28445|       |    /* first line case */
28446|  5.49M|    if (s->linemaplen == 0 || (lo == 0 && s->linemap[0] >= position)) {
  ------------------
  |  Branch (28446:9): [True: 5.00k, False: 5.49M]
  |  Branch (28446:32): [True: 318k, False: 5.17M]
  |  Branch (28446:43): [True: 186k, False: 132k]
  ------------------
28447|   191k|        ret.line = 1;
28448|   191k|        ret.col = position + 1;
28449|  5.30M|    } else {
28450|  5.30M|        ret.line = lo + 2;
28451|  5.30M|        ret.col = position - s->linemap[lo];
28452|  5.30M|    }
28453|  5.49M|    return ret;
28454|  5.49M|}
janet.c:cap_load_keept:
28386|  63.5M|static void cap_load_keept(PegState *s, CapState cs) {
28387|  63.5M|    s->scratch->count = cs.scratch;
28388|  63.5M|    s->captures->count = cs.cap;
28389|  63.5M|}
janet.c:peg_convert_u64_s64:
28457|  9.83k|static int64_t peg_convert_u64_s64(uint64_t from, int width) {
28458|  9.83k|    if (width == 0) return 0; /* Avoid undefined shift */
  ------------------
  |  Branch (28458:9): [True: 6.78k, False: 3.05k]
  ------------------
28459|  3.05k|    int shift = 8 * (8 - width);
28460|  3.05k|    return ((int64_t)(from << shift)) >> shift;
28461|  9.83k|}
janet.c:number_to_string_b:
30472|  2.89M|static void number_to_string_b(JanetBuffer *buffer, double x) {
30473|  2.89M|    janet_buffer_extra(buffer, BUFSIZE);
  ------------------
  |  |30466|  2.89M|#define BUFSIZE 64
  ------------------
30474|  2.89M|    const char *fmt = (x == floor(x) &&
  ------------------
  |  Branch (30474:24): [True: 2.79M, False: 103k]
  ------------------
30475|  2.79M|                       x <= JANET_INTMAX_DOUBLE &&
  ------------------
  |  |  165|  5.69M|#define JANET_INTMAX_DOUBLE 9007199254740992.0
  ------------------
  |  Branch (30475:24): [True: 2.78M, False: 5.52k]
  ------------------
30476|  2.78M|                       x >= JANET_INTMIN_DOUBLE) ? "%.0f" : ("%." STR(DBL_DIG) "g");
  ------------------
  |  |  166|  2.78M|#define JANET_INTMIN_DOUBLE (-9007199254740992.0)
  ------------------
  |  Branch (30476:24): [True: 2.78M, False: 164]
  ------------------
30477|  2.89M|    int count;
30478|  2.89M|    if (x == 0.0) {
  ------------------
  |  Branch (30478:9): [True: 299k, False: 2.59M]
  ------------------
30479|       |        /* Prevent printing of '-0' */
30480|   299k|        count = 1;
30481|   299k|        buffer->data[buffer->count] = '0';
30482|  2.59M|    } else {
30483|  2.59M|        count = snprintf((char *) buffer->data + buffer->count, BUFSIZE, fmt, x);
  ------------------
  |  |30466|  2.59M|#define BUFSIZE 64
  ------------------
30484|  2.59M|    }
30485|  2.89M|    buffer->count += count;
30486|  2.89M|}
janet.c:string_description_b:
30532|  54.5M|static void string_description_b(JanetBuffer *buffer, const char *title, void *pointer) {
30533|  54.5M|    janet_buffer_extra(buffer, BUFSIZE);
  ------------------
  |  |30466|  54.5M|#define BUFSIZE 64
  ------------------
30534|  54.5M|    uint8_t *c = buffer->data + buffer->count;
30535|  54.5M|    int32_t i;
30536|  54.5M|    union {
30537|  54.5M|        uint8_t bytes[sizeof(void *)];
30538|  54.5M|        void *p;
30539|  54.5M|    } pbuf;
30540|       |
30541|  54.5M|    pbuf.p = pointer;
30542|  54.5M|    *c++ = '<';
30543|       |    /* Maximum of 32 bytes for abstract type name */
30544|   327M|    for (i = 0; i < 32 && title[i]; ++i)
  ------------------
  |  Branch (30544:17): [True: 327M, False: 0]
  |  Branch (30544:27): [True: 272M, False: 54.5M]
  ------------------
30545|   272M|        *c++ = ((uint8_t *)title) [i];
30546|  54.5M|    *c++ = ' ';
30547|  54.5M|    *c++ = '0';
30548|  54.5M|    *c++ = 'x';
30549|  54.5M|#if defined(JANET_NANBOX_64)
30550|  54.5M|#define POINTSIZE 6
30551|       |#else
30552|       |#define POINTSIZE (sizeof(void *))
30553|       |#endif
30554|   382M|    for (i = POINTSIZE; i > 0; --i) {
  ------------------
  |  |30550|  54.5M|#define POINTSIZE 6
  ------------------
  |  Branch (30554:25): [True: 327M, False: 54.5M]
  ------------------
30555|   327M|        uint8_t byte = pbuf.bytes[i - 1];
30556|   327M|        *c++ = HEX(byte >> 4);
  ------------------
  |  |30528|   327M|#define HEX(i) (((uint8_t *) janet_base64)[(i)])
  ------------------
30557|   327M|        *c++ = HEX(byte & 0xF);
  ------------------
  |  |30528|   327M|#define HEX(i) (((uint8_t *) janet_base64)[(i)])
  ------------------
30558|   327M|    }
30559|  54.5M|    *c++ = '>';
30560|  54.5M|    buffer->count = (int32_t)(c - buffer->data);
30561|  54.5M|#undef POINTSIZE
30562|  54.5M|}
janet.c:janet_escape_string_b:
30634|  8.68M|static void janet_escape_string_b(JanetBuffer *buffer, const uint8_t *str) {
30635|       |    janet_escape_string_impl(buffer, str, janet_string_length(str));
  ------------------
  |  | 1813|  8.68M|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|  8.68M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
30636|  8.68M|}
janet.c:janet_escape_string_impl:
30564|  8.98M|static int janet_escape_string_impl(JanetBuffer *buffer, const uint8_t *str, int32_t len) {
30565|  8.98M|    janet_buffer_push_u8(buffer, '"');
30566|  8.98M|    int align = 1;
30567|  42.2M|    for (int32_t i = 0; i < len; ++i) {
  ------------------
  |  Branch (30567:25): [True: 33.2M, False: 8.98M]
  ------------------
30568|  33.2M|        uint8_t c = str[i];
30569|  33.2M|        switch (c) {
30570|  23.0k|            case '"':
  ------------------
  |  Branch (30570:13): [True: 23.0k, False: 33.2M]
  ------------------
30571|  23.0k|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\\"", 2);
30572|  23.0k|                align += 2;
30573|  23.0k|                break;
30574|  25.6M|            case '\n':
  ------------------
  |  Branch (30574:13): [True: 25.6M, False: 7.59M]
  ------------------
30575|  25.6M|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\n", 2);
30576|  25.6M|                align += 2;
30577|  25.6M|                break;
30578|  39.4k|            case '\r':
  ------------------
  |  Branch (30578:13): [True: 39.4k, False: 33.1M]
  ------------------
30579|  39.4k|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\r", 2);
30580|  39.4k|                align += 2;
30581|  39.4k|                break;
30582|  1.15M|            case '\0':
  ------------------
  |  Branch (30582:13): [True: 1.15M, False: 32.0M]
  ------------------
30583|  1.15M|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\0", 2);
30584|  1.15M|                align += 2;
30585|  1.15M|                break;
30586|  8.39k|            case '\f':
  ------------------
  |  Branch (30586:13): [True: 8.39k, False: 33.2M]
  ------------------
30587|  8.39k|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\f", 2);
30588|  8.39k|                align += 2;
30589|  8.39k|                break;
30590|  13.8k|            case '\v':
  ------------------
  |  Branch (30590:13): [True: 13.8k, False: 33.2M]
  ------------------
30591|  13.8k|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\v", 2);
30592|  13.8k|                align += 2;
30593|  13.8k|                break;
30594|  3.35k|            case '\a':
  ------------------
  |  Branch (30594:13): [True: 3.35k, False: 33.2M]
  ------------------
30595|  3.35k|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\a", 2);
30596|  3.35k|                align += 2;
30597|  3.35k|                break;
30598|  1.82k|            case '\b':
  ------------------
  |  Branch (30598:13): [True: 1.82k, False: 33.2M]
  ------------------
30599|  1.82k|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\b", 2);
30600|  1.82k|                align += 2;
30601|  1.82k|                break;
30602|    559|            case 27:
  ------------------
  |  Branch (30602:13): [True: 559, False: 33.2M]
  ------------------
30603|    559|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\e", 2);
30604|    559|                align += 2;
30605|    559|                break;
30606|  4.29k|            case '\\':
  ------------------
  |  Branch (30606:13): [True: 4.29k, False: 33.2M]
  ------------------
30607|  4.29k|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\\\", 2);
30608|  4.29k|                align += 2;
30609|  4.29k|                break;
30610|   130k|            case '\t':
  ------------------
  |  Branch (30610:13): [True: 130k, False: 33.0M]
  ------------------
30611|   130k|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\t", 2);
30612|   130k|                align += 2;
30613|   130k|                break;
30614|  6.21M|            default:
  ------------------
  |  Branch (30614:13): [True: 6.21M, False: 27.0M]
  ------------------
30615|  6.21M|                if (c < 32 || c > 126) {
  ------------------
  |  Branch (30615:21): [True: 828k, False: 5.38M]
  |  Branch (30615:31): [True: 1.17M, False: 4.21M]
  ------------------
30616|  1.99M|                    uint8_t buf[4];
30617|  1.99M|                    buf[0] = '\\';
30618|  1.99M|                    buf[1] = 'x';
30619|  1.99M|                    buf[2] = janet_base64[(c >> 4) & 0xF];
30620|  1.99M|                    buf[3] = janet_base64[c & 0xF];
30621|  1.99M|                    janet_buffer_push_bytes(buffer, buf, 4);
30622|  1.99M|                    align += 4;
30623|  4.21M|                } else {
30624|  4.21M|                    janet_buffer_push_u8(buffer, c);
30625|  4.21M|                    align++;
30626|  4.21M|                }
30627|  6.21M|                break;
30628|  33.2M|        }
30629|  33.2M|    }
30630|  8.98M|    janet_buffer_push_u8(buffer, '"');
30631|  8.98M|    return align + 1;
30632|  8.98M|}
janet.c:janet_escape_buffer_b:
30638|   299k|static void janet_escape_buffer_b(JanetBuffer *buffer, JanetBuffer *bx) {
30639|   299k|    if (bx == buffer) {
  ------------------
  |  Branch (30639:9): [True: 0, False: 299k]
  ------------------
30640|       |        /* Ensures buffer won't resize while escaping */
30641|      0|        int64_t new_size = 6 * (int64_t) bx->count + 3;
30642|      0|        if (new_size > INT32_MAX) janet_panic("buffer overflow");
  ------------------
  |  Branch (30642:13): [True: 0, False: 0]
  ------------------
30643|      0|        janet_buffer_ensure(bx, (int32_t) new_size, 1);
30644|      0|    }
30645|   299k|    janet_buffer_push_u8(buffer, '@');
30646|   299k|    janet_escape_string_impl(buffer, bx->data, bx->count);
30647|   299k|}
janet.c:janet_pretty_:
31261|  10.1M|                                  int flags, Janet x, int32_t startlen, int32_t lookback_barrier) {
31262|  10.1M|    struct pretty S;
31263|  10.1M|    if (NULL == buffer) {
  ------------------
  |  Branch (31263:9): [True: 0, False: 10.1M]
  ------------------
31264|      0|        buffer = janet_buffer(0);
31265|      0|    }
31266|  10.1M|    S.buffer = buffer;
31267|  10.1M|    S.depth = depth;
31268|  10.1M|    S.width = width;
31269|  10.1M|    S.align = 0;
31270|  10.1M|    S.flags = flags;
31271|  10.1M|    S.bufstartlen = startlen;
31272|  10.1M|    S.lookback_barrier = lookback_barrier;
31273|  10.1M|    S.keysort_capacity = 0;
31274|       |    S.keysort_buffer = NULL;
31275|  10.1M|    S.keysort_start = 0;
31276|  10.1M|    janet_table_init(&S.seen, 10);
31277|  10.1M|    janet_pretty_one(&S, x);
31278|  10.1M|    backtrack_newlines(&S);
31279|  10.1M|    janet_table_deinit(&S.seen);
31280|  10.1M|    return S.buffer;
31281|  10.1M|}
janet.c:janet_pretty_one:
31028|  38.5M|static void janet_pretty_one(struct pretty *S, Janet x) {
31029|       |    /* Add to seen */
31030|  38.5M|    switch (janet_type(x)) {
  ------------------
  |  |  795|  38.5M|    (isnan((x).number) \
  |  |  796|  38.5M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  38.5M|        : JANET_NUMBER)
  ------------------
  |  Branch (31030:13): [True: 35.6M, False: 2.88M]
  ------------------
31031|   205k|        case JANET_NIL:
  ------------------
  |  Branch (31031:9): [True: 205k, False: 38.3M]
  ------------------
31032|  3.09M|        case JANET_NUMBER:
  ------------------
  |  Branch (31032:9): [True: 2.88M, False: 35.6M]
  ------------------
31033|  17.9M|        case JANET_SYMBOL:
  ------------------
  |  Branch (31033:9): [True: 14.8M, False: 23.7M]
  ------------------
31034|  17.9M|        case JANET_BOOLEAN:
  ------------------
  |  Branch (31034:9): [True: 3.89k, False: 38.5M]
  ------------------
31035|  17.9M|            break;
31036|  20.6M|        default: {
  ------------------
  |  Branch (31036:9): [True: 20.6M, False: 17.9M]
  ------------------
31037|  20.6M|            Janet seenid = janet_table_get(&S->seen, x);
31038|  20.6M|            if (janet_checktype(seenid, JANET_NUMBER)) {
  ------------------
  |  |  806|  20.6M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 20.6M]
  |  |  |  Branch (806:6): [True: 20.6M, Folded]
  |  |  ------------------
  |  |  807|  20.6M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|  20.6M|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 20.6M]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 20.6M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  20.6M|        : 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31039|      0|                if (S->flags & JANET_PRETTY_COLOR) {
  ------------------
  |  | 1967|      0|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (31039:21): [True: 0, False: 0]
  ------------------
31040|      0|                    janet_buffer_push_cstring(S->buffer, janet_cycle_color);
31041|      0|                }
31042|      0|                janet_buffer_push_cstring(S->buffer, "<cycle ");
31043|      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)
  |  |  ------------------
  ------------------
31044|      0|                janet_buffer_push_u8(S->buffer, '>');
31045|      0|                if (S->flags & JANET_PRETTY_COLOR) {
  ------------------
  |  | 1967|      0|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (31045:21): [True: 0, False: 0]
  ------------------
31046|      0|                    janet_buffer_push_cstring(S->buffer, "\x1B[0m");
31047|      0|                }
31048|      0|                return;
31049|  20.6M|            } else {
31050|  20.6M|                janet_table_put(&S->seen, x, janet_wrap_integer(S->seen.count));
  ------------------
  |  |  967|  20.6M|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|  20.6M|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
31051|  20.6M|                break;
31052|  20.6M|            }
31053|  20.6M|        }
31054|  38.5M|    }
31055|       |
31056|  38.5M|    switch (janet_type(x)) {
  ------------------
  |  |  795|  38.5M|    (isnan((x).number) \
  |  |  796|  38.5M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  38.5M|        : JANET_NUMBER)
  ------------------
  |  Branch (31056:13): [True: 35.6M, False: 2.88M]
  ------------------
31057|  28.2M|        default: {
  ------------------
  |  Branch (31057:9): [True: 28.2M, False: 10.3M]
  ------------------
31058|  28.2M|            const char *color = janet_pretty_colors[janet_type(x)];
  ------------------
  |  |  795|  28.2M|    (isnan((x).number) \
  |  |  796|  28.2M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  28.2M|        : JANET_NUMBER)
  ------------------
  |  Branch (31058:53): [True: 25.3M, False: 2.88M]
  ------------------
31059|  28.2M|            if (color && (S->flags & JANET_PRETTY_COLOR)) {
  ------------------
  |  | 1967|  28.2M|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (31059:17): [True: 28.2M, False: 0]
  |  Branch (31059:26): [True: 0, False: 28.2M]
  ------------------
31060|      0|                janet_buffer_push_cstring(S->buffer, color);
31061|      0|            }
31062|  28.2M|            if (janet_checktype(x, JANET_BUFFER) && janet_unwrap_buffer(x) == S->buffer) {
  ------------------
  |  |  806|  56.5M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 299k, False: 27.9M]
  |  |  |  Branch (806:6): [Folded, False: 28.2M]
  |  |  ------------------
  |  |  807|  56.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|  56.5M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  28.2M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  28.2M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  28.2M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  28.2M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                          if (janet_checktype(x, JANET_BUFFER) && janet_unwrap_buffer(x) == S->buffer) {
  ------------------
  |  |  862|   299k|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (31062:53): [True: 0, False: 299k]
  ------------------
31063|      0|                int64_t new_size = (int64_t) S->buffer->count + S->bufstartlen * 4 + 3;
31064|      0|                if (new_size > INT32_MAX) janet_panic("buffer overflow");
  ------------------
  |  Branch (31064:21): [True: 0, False: 0]
  ------------------
31065|      0|                janet_buffer_ensure(S->buffer, (int32_t) new_size, 1);
31066|      0|                janet_buffer_push_u8(S->buffer, '@');
31067|       |                /* Use start len to print to self better */
31068|      0|                S->align += 1 + janet_escape_string_impl(S->buffer, S->buffer->data, S->bufstartlen);
31069|  28.2M|            } else {
31070|  28.2M|                S->align -= S->buffer->count;
31071|  28.2M|                janet_description_b(S->buffer, x);
31072|  28.2M|                S->align += S->buffer->count;
31073|  28.2M|            }
31074|  28.2M|            if (color && (S->flags & JANET_PRETTY_COLOR)) {
  ------------------
  |  | 1967|  28.2M|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (31074:17): [True: 28.2M, False: 0]
  |  Branch (31074:26): [True: 0, False: 28.2M]
  ------------------
31075|      0|                janet_buffer_push_cstring(S->buffer, "\x1B[0m");
31076|      0|            }
31077|  28.2M|            break;
31078|  28.2M|        }
31079|  81.0k|        case JANET_ARRAY:
  ------------------
  |  Branch (31079:9): [True: 81.0k, False: 38.4M]
  ------------------
31080|  7.56M|        case JANET_TUPLE: {
  ------------------
  |  Branch (31080:9): [True: 7.48M, False: 31.0M]
  ------------------
31081|  7.56M|            int32_t i = 0, len = 0;
31082|  7.56M|            const Janet *arr = NULL;
31083|  7.56M|            int isarray = janet_checktype(x, JANET_ARRAY);
  ------------------
  |  |  806|  7.56M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 7.56M]
  |  |  ------------------
  |  |  807|  7.56M|        ? 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|  7.56M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  7.56M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  7.56M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  7.56M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  7.56M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31084|  7.56M|            janet_indexed_view(x, &arr, &len);
31085|  7.56M|            int hasbrackets = !isarray && (janet_tuple_flag(arr) & JANET_TUPLE_FLAG_BRACKETCTOR);
  ------------------
  |  | 1806|  7.48M|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1800|  7.48M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                          int hasbrackets = !isarray && (janet_tuple_flag(arr) & JANET_TUPLE_FLAG_BRACKETCTOR);
  ------------------
  |  | 1798|  7.48M|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
  |  Branch (31085:31): [True: 7.48M, False: 81.0k]
  |  Branch (31085:43): [True: 27.4k, False: 7.45M]
  ------------------
31086|  7.56M|            const char *startstr = isarray ? "@[" : hasbrackets ? "[" : "(";
  ------------------
  |  Branch (31086:36): [True: 81.0k, False: 7.48M]
  |  Branch (31086:53): [True: 27.4k, False: 7.45M]
  ------------------
31087|  7.56M|            const char endchar = isarray ? ']' : hasbrackets ? ']' : ')';
  ------------------
  |  Branch (31087:34): [True: 81.0k, False: 7.48M]
  |  Branch (31087:50): [True: 27.4k, False: 7.45M]
  ------------------
31088|  7.56M|            janet_buffer_push_cstring(S->buffer, startstr);
31089|  7.56M|            S->align += (int32_t) strlen(startstr);
31090|  7.56M|            const int align = S->leaf_align = S->align;
31091|  7.56M|            S->depth--;
31092|  7.56M|            if (S->depth == 0) {
  ------------------
  |  Branch (31092:17): [True: 0, False: 7.56M]
  ------------------
31093|      0|                janet_buffer_push_cstring(S->buffer, "...");
31094|      0|                S->align += 3;
31095|  7.56M|            } else {
31096|  7.56M|                if (len > JANET_PRETTY_ARRAY_LIMIT && !(S->flags & JANET_PRETTY_NOTRUNC)) {
  ------------------
  |  |31025|  15.1M|#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 (31096:21): [True: 0, False: 7.56M]
  |  Branch (31096:55): [True: 0, False: 0]
  ------------------
31097|      0|                    for (i = 0; i < 3; i++) {
  ------------------
  |  Branch (31097:33): [True: 0, False: 0]
  ------------------
31098|      0|                        if (i) print_newline(S, align);
  ------------------
  |  Branch (31098:29): [True: 0, False: 0]
  ------------------
31099|      0|                        janet_pretty_one(S, arr[i]);
31100|      0|                    }
31101|      0|                    print_newline(S, align);
31102|      0|                    janet_buffer_push_cstring(S->buffer, "...");
31103|      0|                    S->align += 3;
31104|      0|                    for (i = len - 3; i < len; i++) {
  ------------------
  |  Branch (31104:39): [True: 0, False: 0]
  ------------------
31105|      0|                        print_newline(S, align);
31106|      0|                        janet_pretty_one(S, arr[i]);
31107|      0|                    }
31108|  7.56M|                } else {
31109|  31.4M|                    for (i = 0; i < len; i++) {
  ------------------
  |  Branch (31109:33): [True: 23.8M, False: 7.56M]
  ------------------
31110|  23.8M|                        if (i) print_newline(S, align);
  ------------------
  |  Branch (31110:29): [True: 16.3M, False: 7.51M]
  ------------------
31111|  23.8M|                        janet_pretty_one(S, arr[i]);
31112|  23.8M|                    }
31113|  7.56M|                }
31114|  7.56M|            }
31115|  7.56M|            S->depth++;
31116|  7.56M|            janet_buffer_push_u8(S->buffer, endchar);
31117|  7.56M|            S->align++;
31118|  7.56M|            break;
31119|  81.0k|        }
31120|  1.54M|        case JANET_STRUCT:
  ------------------
  |  Branch (31120:9): [True: 1.54M, False: 37.0M]
  ------------------
31121|  2.74M|        case JANET_TABLE: {
  ------------------
  |  Branch (31121:9): [True: 1.20M, False: 37.3M]
  ------------------
31122|  2.74M|            int istable = janet_checktype(x, JANET_TABLE);
  ------------------
  |  |  806|  2.74M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 2.74M]
  |  |  ------------------
  |  |  807|  2.74M|        ? 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.74M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  2.74M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  2.74M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.74M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.74M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31123|       |
31124|       |            /* For object-like tables, print class name */
31125|  2.74M|            if (istable) {
  ------------------
  |  Branch (31125:17): [True: 1.20M, False: 1.54M]
  ------------------
31126|  1.20M|                JanetTable *t = janet_unwrap_table(x);
  ------------------
  |  |  861|  1.20M|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
31127|  1.20M|                JanetTable *proto = t->proto;
31128|  1.20M|                S->align++;
31129|  1.20M|                janet_buffer_push_cstring(S->buffer, "@");
31130|  1.20M|                if (NULL != proto) {
  ------------------
  |  Branch (31130:21): [True: 0, False: 1.20M]
  ------------------
31131|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31132|      0|                    const uint8_t *n;
31133|      0|                    int32_t len;
31134|      0|                    if (janet_bytes_view(name, &n, &len)) {
  ------------------
  |  Branch (31134:25): [True: 0, False: 0]
  ------------------
31135|      0|                        if (S->flags & JANET_PRETTY_COLOR) {
  ------------------
  |  | 1967|      0|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (31135:29): [True: 0, False: 0]
  ------------------
31136|      0|                            janet_buffer_push_cstring(S->buffer, janet_class_color);
31137|      0|                        }
31138|      0|                        janet_buffer_push_bytes(S->buffer, n, len);
31139|      0|                        S->align += len;
31140|      0|                        if (S->flags & JANET_PRETTY_COLOR) {
  ------------------
  |  | 1967|      0|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (31140:29): [True: 0, False: 0]
  ------------------
31141|      0|                            janet_buffer_push_cstring(S->buffer, "\x1B[0m");
31142|      0|                        }
31143|      0|                    }
31144|      0|                }
31145|  1.54M|            } else {
31146|  1.54M|                JanetStruct st = janet_unwrap_struct(x);
  ------------------
  |  |  857|  1.54M|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
31147|  1.54M|                JanetStruct proto = janet_struct_proto(st);
  ------------------
  |  | 1851|  1.54M|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1846|  1.54M|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
31148|  1.54M|                if (NULL != proto) {
  ------------------
  |  Branch (31148:21): [True: 0, False: 1.54M]
  ------------------
31149|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31150|      0|                    const uint8_t *n;
31151|      0|                    int32_t len;
31152|      0|                    if (janet_bytes_view(name, &n, &len)) {
  ------------------
  |  Branch (31152:25): [True: 0, False: 0]
  ------------------
31153|      0|                        if (S->flags & JANET_PRETTY_COLOR) {
  ------------------
  |  | 1967|      0|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (31153:29): [True: 0, False: 0]
  ------------------
31154|      0|                            janet_buffer_push_cstring(S->buffer, janet_class_color);
31155|      0|                        }
31156|      0|                        janet_buffer_push_bytes(S->buffer, n, len);
31157|      0|                        S->align += len;
31158|      0|                        if (S->flags & JANET_PRETTY_COLOR) {
  ------------------
  |  | 1967|      0|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (31158:29): [True: 0, False: 0]
  ------------------
31159|      0|                            janet_buffer_push_cstring(S->buffer, "\x1B[0m");
31160|      0|                        }
31161|      0|                    }
31162|      0|                }
31163|  1.54M|            }
31164|  2.74M|            janet_buffer_push_u8(S->buffer, '{');
31165|  2.74M|            const int align = S->leaf_align = ++S->align;
31166|       |
31167|  2.74M|            S->depth--;
31168|  2.74M|            if (S->depth == 0) {
  ------------------
  |  Branch (31168:17): [True: 0, False: 2.74M]
  ------------------
31169|      0|                janet_buffer_push_cstring(S->buffer, "...");
31170|      0|                S->align += 3;
31171|  2.74M|            } else {
31172|  2.74M|                int32_t len = 0, cap = 0;
31173|  2.74M|                const JanetKV *kvs = NULL;
31174|  2.74M|                janet_dictionary_view(x, &kvs, &len, &cap);
31175|  2.74M|                int32_t ks_start = S->keysort_start;
31176|  2.74M|                int truncated = 0;
31177|       |
31178|       |                /* Shortcut for huge dictionaries, don't bother sorting keys */
31179|  2.74M|                if (len > JANET_PRETTY_DICT_KEYSORT_LIMIT) {
  ------------------
  |  |31024|  2.74M|#define JANET_PRETTY_DICT_KEYSORT_LIMIT 2000
  ------------------
  |  Branch (31179:21): [True: 0, False: 2.74M]
  ------------------
31180|      0|                    if (!(S->flags & JANET_PRETTY_NOTRUNC)) {
  ------------------
  |  | 1969|      0|#define JANET_PRETTY_NOTRUNC 4
  ------------------
  |  Branch (31180:25): [True: 0, False: 0]
  ------------------
31181|      0|                        len = JANET_PRETTY_DICT_LIMIT;
  ------------------
  |  |31023|      0|#define JANET_PRETTY_DICT_LIMIT 30
  ------------------
31182|      0|                        truncated = 1;
31183|      0|                    }
31184|      0|                    int32_t j = 0;
31185|      0|                    for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (31185:41): [True: 0, False: 0]
  ------------------
31186|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31187|      0|                        if (i) print_newline(S, align);
  ------------------
  |  Branch (31187:29): [True: 0, False: 0]
  ------------------
31188|      0|                        janet_pretty_one(S, kvs[j].key);
31189|      0|                        janet_buffer_push_u8(S->buffer, ' ');
31190|      0|                        S->align++;
31191|      0|                        janet_pretty_one(S, kvs[j].value);
31192|      0|                        j++;
31193|      0|                    }
31194|      0|                    if (truncated) {
  ------------------
  |  Branch (31194:25): [True: 0, False: 0]
  ------------------
31195|      0|                        print_newline(S, align);
31196|      0|                        janet_buffer_push_cstring(S->buffer, "...");
31197|      0|                        S->align += 3;
31198|      0|                    }
31199|  2.74M|                } else {
31200|       |                    /* Sorted keys dictionaries */
31201|       |
31202|       |                    /* Ensure buffer is large enough to sort keys. */
31203|  2.74M|                    int64_t mincap = (int64_t) len + (int64_t) ks_start;
31204|  2.74M|                    if (mincap > INT32_MAX) {
  ------------------
  |  Branch (31204:25): [True: 0, False: 2.74M]
  ------------------
31205|      0|                        truncated = 1;
31206|      0|                        len = 0;
31207|      0|                        mincap = ks_start;
31208|      0|                    }
31209|       |
31210|  2.74M|                    if (S->keysort_capacity < mincap) {
  ------------------
  |  Branch (31210:25): [True: 1.19M, False: 1.55M]
  ------------------
31211|  1.19M|                        if (mincap >= INT32_MAX / 2) {
  ------------------
  |  Branch (31211:29): [True: 0, False: 1.19M]
  ------------------
31212|      0|                            S->keysort_capacity = INT32_MAX;
31213|  1.19M|                        } else {
31214|  1.19M|                            S->keysort_capacity = (int32_t)(mincap * 2);
31215|  1.19M|                        }
31216|  1.19M|                        S->keysort_buffer = janet_srealloc(S->keysort_buffer, sizeof(int32_t) * S->keysort_capacity);
31217|  1.19M|                        if (NULL == S->keysort_buffer) {
  ------------------
  |  Branch (31217:29): [True: 0, False: 1.19M]
  ------------------
31218|      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]
  |  |  ------------------
  ------------------
31219|      0|                        }
31220|  1.19M|                    }
31221|       |
31222|  2.74M|                    janet_sorted_keys(kvs, cap, S->keysort_buffer == NULL ? NULL : S->keysort_buffer + ks_start);
  ------------------
  |  Branch (31222:49): [True: 838k, False: 1.91M]
  ------------------
31223|  2.74M|                    S->keysort_start += len;
31224|  2.74M|                    if (!(S->flags & JANET_PRETTY_NOTRUNC) && (len > JANET_PRETTY_DICT_LIMIT)) {
  ------------------
  |  | 1969|  2.74M|#define JANET_PRETTY_NOTRUNC 4
  ------------------
                                  if (!(S->flags & JANET_PRETTY_NOTRUNC) && (len > JANET_PRETTY_DICT_LIMIT)) {
  ------------------
  |  |31023|  2.07k|#define JANET_PRETTY_DICT_LIMIT 30
  ------------------
  |  Branch (31224:25): [True: 2.07k, False: 2.74M]
  |  Branch (31224:63): [True: 0, False: 2.07k]
  ------------------
31225|      0|                        len = JANET_PRETTY_DICT_LIMIT;
  ------------------
  |  |31023|      0|#define JANET_PRETTY_DICT_LIMIT 30
  ------------------
31226|      0|                        truncated = 1;
31227|      0|                    }
31228|       |
31229|  5.00M|                    for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (31229:41): [True: 2.25M, False: 2.74M]
  ------------------
31230|  2.25M|                        if (i) print_newline(S, align);
  ------------------
  |  Branch (31230:29): [True: 987k, False: 1.27M]
  ------------------
31231|  2.25M|                        int32_t j = S->keysort_buffer[i + ks_start];
31232|  2.25M|                        janet_pretty_one(S, kvs[j].key);
31233|  2.25M|                        janet_buffer_push_u8(S->buffer, ' ');
31234|  2.25M|                        S->align++;
31235|  2.25M|                        janet_pretty_one(S, kvs[j].value);
31236|  2.25M|                    }
31237|       |
31238|  2.74M|                    if (truncated) {
  ------------------
  |  Branch (31238:25): [True: 0, False: 2.74M]
  ------------------
31239|      0|                        print_newline(S, align);
31240|      0|                        janet_buffer_push_cstring(S->buffer, "...");
31241|      0|                        S->align += 3;
31242|      0|                    }
31243|       |
31244|  2.74M|                }
31245|  2.74M|                S->keysort_start = ks_start;
31246|  2.74M|            }
31247|  2.74M|            S->depth++;
31248|  2.74M|            janet_buffer_push_u8(S->buffer, '}');
31249|  2.74M|            S->align++;
31250|  2.74M|            break;
31251|  2.74M|        }
31252|  38.5M|    }
31253|       |    /* Remove from seen */
31254|  38.5M|    janet_table_remove(&S->seen, x);
31255|  38.5M|    return;
31256|  38.5M|}
janet.c:print_newline:
30987|  17.3M|static void print_newline(struct pretty *S, int align) {
30988|  17.3M|    int i;
30989|  17.3M|    if (S->flags & JANET_PRETTY_ONELINE) {
  ------------------
  |  | 1968|  17.3M|#define JANET_PRETTY_ONELINE 2
  ------------------
  |  Branch (30989:9): [True: 0, False: 17.3M]
  ------------------
30990|      0|        janet_buffer_push_u8(S->buffer, ' ');
30991|      0|        return;
30992|      0|    }
30993|  17.3M|    backtrack_newlines(S);
30994|  17.3M|    janet_buffer_push_u8(S->buffer, '\n');
30995|  17.3M|    S->leaf_align = S->align = align;
30996|  53.9M|    for (i = 0; i < S->align; i++) {
  ------------------
  |  Branch (30996:17): [True: 36.6M, False: 17.3M]
  ------------------
30997|  36.6M|        janet_buffer_push_u8(S->buffer, ' ');
30998|  36.6M|    }
30999|  17.3M|}
janet.c:backtrack_newlines:
30927|  27.5M|static void backtrack_newlines(const struct pretty *S) {
30928|  27.5M|    if (S->flags & JANET_PRETTY_ONELINE || S->buffer->count <= 0)
  ------------------
  |  | 1968|  55.0M|#define JANET_PRETTY_ONELINE 2
  ------------------
  |  Branch (30928:9): [True: 0, False: 27.5M]
  |  Branch (30928:44): [True: 0, False: 27.5M]
  ------------------
30929|      0|        return;
30930|  27.5M|    switch (S->buffer->data[S->buffer->count - 1]) {
30931|  4.71M|        case ')':
  ------------------
  |  Branch (30931:9): [True: 4.71M, False: 22.8M]
  ------------------
30932|  6.30M|        case '}':
  ------------------
  |  Branch (30932:9): [True: 1.59M, False: 25.9M]
  ------------------
30933|  6.37M|        case ']':
  ------------------
  |  Branch (30933:9): [True: 61.6k, False: 27.4M]
  ------------------
30934|  6.37M|            break;
30935|  21.1M|        default:
  ------------------
  |  Branch (30935:9): [True: 21.1M, False: 6.37M]
  ------------------
30936|  21.1M|            return;
30937|  27.5M|    }
30938|  6.37M|    int32_t removed = 0;
30939|  6.37M|    int32_t old_count = S->buffer->count;
30940|  6.37M|    int32_t offset = old_count;
30941|  6.37M|    int32_t b0 = S->lookback_barrier;
30942|  6.37M|    int32_t columns = S->width;
30943|  6.37M|    int32_t align = 0;
30944|   180M|    while (--offset >= b0) {
  ------------------
  |  Branch (30944:12): [True: 179M, False: 617k]
  ------------------
30945|   179M|        const char *s = (const char *)S->buffer->data + offset;
30946|   179M|        if (*s == '\n') {
  ------------------
  |  Branch (30946:13): [True: 15.9M, False: 163M]
  ------------------
30947|  15.9M|            if (align < S->leaf_align) {
  ------------------
  |  Branch (30947:17): [True: 5.07M, False: 10.8M]
  ------------------
30948|  5.07M|                break;
30949|  5.07M|            }
30950|  10.8M|            columns += align;
30951|  10.8M|            removed += align;
30952|  10.8M|            align = 0;
30953|   163M|        } else if (*s == ' ') {
  ------------------
  |  Branch (30953:20): [True: 41.0M, False: 122M]
  ------------------
30954|  41.0M|            align++;
30955|   122M|        } else {
30956|   122M|            align = 0;
30957|       |            /* Don't count color sequences: \x1B(0|3\d)m */
30958|   122M|            if (S->flags & JANET_PRETTY_COLOR && *s == 'm') {
  ------------------
  |  | 1967|   244M|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (30958:17): [True: 0, False: 122M]
  |  Branch (30958:50): [True: 0, False: 0]
  ------------------
30959|      0|                if (offset >= (3 + b0) && strncmp("\x1B[0m", s - 3, 4) == 0) {
  ------------------
  |  Branch (30959:21): [True: 0, False: 0]
  |  Branch (30959:43): [True: 0, False: 0]
  ------------------
30960|      0|                    offset -= 3;
30961|      0|                    columns++;
30962|      0|                } else if (offset >= (4 + b0) && strncmp("\x1B[3", s - 4, 3) == 0) {
  ------------------
  |  Branch (30962:28): [True: 0, False: 0]
  |  Branch (30962:50): [True: 0, False: 0]
  ------------------
30963|      0|                    offset -= 4;
30964|      0|                    columns++;
30965|      0|                }
30966|      0|            }
30967|   122M|        }
30968|   174M|        if (--columns <= 0) {
  ------------------
  |  Branch (30968:13): [True: 680k, False: 173M]
  ------------------
30969|   680k|            return;
30970|   680k|        }
30971|   174M|    }
30972|  5.68M|    offset++; /* Don't mess with the last newline we found */
30973|  5.68M|    janet_assert(offset >= b0, "bad buffer index");
  ------------------
  |  |  389|  5.68M|#define janet_assert(c, m) do { \
  |  |  390|  5.68M|    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.68M]
  |  |  ------------------
  |  |  391|  5.68M|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 5.68M]
  |  |  ------------------
  ------------------
30974|  5.68M|    S->buffer->count -= removed;
30975|   100M|    for (int32_t i = offset; i < S->buffer->count; i++) {
  ------------------
  |  Branch (30975:30): [True: 95.1M, False: 5.68M]
  ------------------
30976|  95.1M|        if (S->buffer->data[offset] == '\n') {
  ------------------
  |  Branch (30976:13): [True: 5.88M, False: 89.2M]
  ------------------
30977|  5.88M|            S->buffer->data[i] = ' ';
30978|  22.4M|            while (S->buffer->data[++offset] == ' ') {
  ------------------
  |  Branch (30978:20): [True: 16.5M, False: 5.88M]
  ------------------
30979|  16.5M|                janet_assert(offset < old_count, "bad replacement of newline");
  ------------------
  |  |  389|  16.5M|#define janet_assert(c, m) do { \
  |  |  390|  16.5M|    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: 16.5M]
  |  |  ------------------
  |  |  391|  16.5M|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 16.5M]
  |  |  ------------------
  ------------------
30980|  16.5M|            }
30981|  89.2M|        } else {
30982|  89.2M|            S->buffer->data[i] = S->buffer->data[offset++];
30983|  89.2M|        }
30984|  95.1M|    }
30985|  5.68M|}
janet.c:scanformat:
31380|  21.7M|    char precision[3]) {
31381|  21.7M|    const char *p = strfrmt;
31382|       |
31383|       |    /* Parse strfrmt */
31384|  21.7M|    memset(width, '\0', 3);
31385|  21.7M|    memset(precision, '\0', 3);
31386|  21.7M|    while (*p != '\0' && strchr(FMT_FLAGS, *p) != NULL)
  ------------------
  |  |31346|  21.7M|#define FMT_FLAGS "-+ #0"
  ------------------
  |  Branch (31386:12): [True: 21.7M, False: 0]
  |  Branch (31386:26): [True: 0, False: 21.7M]
  ------------------
31387|      0|        p++; /* skip flags */
31388|  21.7M|    if ((size_t)(p - strfrmt) >= sizeof(FMT_FLAGS)) janet_panic("invalid format (repeated flags)");
  ------------------
  |  |31346|  21.7M|#define FMT_FLAGS "-+ #0"
  ------------------
  |  Branch (31388:9): [True: 0, False: 21.7M]
  ------------------
31389|  21.7M|    if (isdigit((int)(*p)))
  ------------------
  |  Branch (31389:9): [True: 0, False: 21.7M]
  ------------------
31390|      0|        width[0] = *p++; /* skip width */
31391|  21.7M|    if (isdigit((int)(*p)))
  ------------------
  |  Branch (31391:9): [True: 0, False: 21.7M]
  ------------------
31392|      0|        width[1] = *p++; /* (2 digits at most) */
31393|  21.7M|    if (*p == '.') {
  ------------------
  |  Branch (31393:9): [True: 0, False: 21.7M]
  ------------------
31394|      0|        p++;
31395|      0|        if (isdigit((int)(*p)))
  ------------------
  |  Branch (31395:13): [True: 0, False: 0]
  ------------------
31396|      0|            precision[0] = *p++; /* skip precision */
31397|      0|        if (isdigit((int)(*p)))
  ------------------
  |  Branch (31397:13): [True: 0, False: 0]
  ------------------
31398|      0|            precision[1] = *p++; /* (2 digits at most) */
31399|      0|    }
31400|  21.7M|    if (isdigit((int)(*p)))
  ------------------
  |  Branch (31400:9): [True: 0, False: 21.7M]
  ------------------
31401|      0|        janet_panic("invalid format (width or precision too long)");
31402|       |
31403|       |    /* Write to form - replace characters with fixed size stuff */
31404|  21.7M|    *(form++) = '%';
31405|  21.7M|    const char *p2 = strfrmt;
31406|  43.5M|    while (p2 <= p) {
  ------------------
  |  Branch (31406:12): [True: 21.7M, False: 21.7M]
  ------------------
31407|  21.7M|        char *loc = strchr(FMT_REPLACE_INTTYPES, *p2);
  ------------------
  |  |31347|  21.7M|#define FMT_REPLACE_INTTYPES "diouxX"
  ------------------
31408|  21.7M|        if (loc != NULL && *loc != '\0') {
  ------------------
  |  Branch (31408:13): [True: 11.5M, False: 10.2M]
  |  Branch (31408:28): [True: 11.5M, False: 0]
  ------------------
31409|  11.5M|            const char *mapping = get_fmt_mapping(*p2++);
31410|  11.5M|            size_t len = strlen(mapping);
31411|  11.5M|            memcpy(form, mapping, len);
31412|  11.5M|            form += len;
31413|  11.5M|        } else {
31414|  10.2M|            *(form++) = *(p2++);
31415|  10.2M|        }
31416|  21.7M|    }
31417|  21.7M|    *form = '\0';
31418|       |
31419|  21.7M|    return p;
31420|  21.7M|}
janet.c:get_fmt_mapping:
31368|  11.5M|static const char *get_fmt_mapping(char c) {
31369|  34.6M|    for (size_t i = 0; i < (sizeof(format_mappings) / sizeof(struct FmtMapping)); i++) {
  ------------------
  |  Branch (31369:24): [True: 34.6M, False: 0]
  ------------------
31370|  34.6M|        if (format_mappings[i].c == c)
  ------------------
  |  Branch (31370:13): [True: 11.5M, False: 23.1M]
  ------------------
31371|  11.5M|            return format_mappings[i].mapping;
31372|  34.6M|    }
31373|      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]
  |  |  ------------------
  ------------------
31374|      0|}
janet.c:bignat_zero:
34217|  15.2k|static void bignat_zero(struct BigNat *x) {
34218|  15.2k|    x->first_digit = 0;
34219|  15.2k|    x->n = 0;
34220|  15.2k|    x->cap = 0;
34221|       |    x->digits = NULL;
34222|  15.2k|}
janet.c:bignat_muladd:
34249|  45.7k|static void bignat_muladd(struct BigNat *mant, uint32_t factor, uint32_t term) {
34250|  45.7k|    int32_t i;
34251|  45.7k|    uint64_t carry = ((uint64_t) mant->first_digit) * factor + term;
34252|  45.7k|    mant->first_digit = carry % BIGNAT_BASE;
  ------------------
  |  |34206|  45.7k|#define BIGNAT_BASE 0x80000000U
  ------------------
34253|  45.7k|    carry /= BIGNAT_BASE;
  ------------------
  |  |34206|  45.7k|#define BIGNAT_BASE 0x80000000U
  ------------------
34254|   339k|    for (i = 0; i < mant->n; i++) {
  ------------------
  |  Branch (34254:17): [True: 293k, False: 45.7k]
  ------------------
34255|   293k|        carry += ((uint64_t) mant->digits[i]) * factor;
34256|   293k|        mant->digits[i] = carry % BIGNAT_BASE;
  ------------------
  |  |34206|   293k|#define BIGNAT_BASE 0x80000000U
  ------------------
34257|   293k|        carry /= BIGNAT_BASE;
  ------------------
  |  |34206|   293k|#define BIGNAT_BASE 0x80000000U
  ------------------
34258|   293k|    }
34259|  45.7k|    if (carry) bignat_append(mant, (uint32_t) carry);
  ------------------
  |  Branch (34259:9): [True: 10.2k, False: 35.5k]
  ------------------
34260|  45.7k|}
janet.c:bignat_append:
34242|  10.2k|static void bignat_append(struct BigNat *mant, uint32_t dig) {
34243|  10.2k|    bignat_extra(mant, 1)[0] = dig;
34244|  10.2k|}
janet.c:bignat_extra:
34225|  11.3k|static uint32_t *bignat_extra(struct BigNat *mant, int32_t n) {
34226|  11.3k|    int32_t oldn = mant->n;
34227|  11.3k|    int32_t newn = oldn + n;
34228|  11.3k|    if (mant->cap < newn) {
  ------------------
  |  Branch (34228:9): [True: 3.65k, False: 7.68k]
  ------------------
34229|  3.65k|        int32_t newcap = 2 * newn;
34230|  3.65k|        uint32_t *mem = janet_realloc(mant->digits, (size_t) newcap * sizeof(uint32_t));
  ------------------
  |  | 2409|  3.65k|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
34231|  3.65k|        if (NULL == mem) {
  ------------------
  |  Branch (34231:13): [True: 0, False: 3.65k]
  ------------------
34232|      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]
  |  |  ------------------
  ------------------
34233|      0|        }
34234|  3.65k|        mant->cap = newcap;
34235|  3.65k|        mant->digits = mem;
34236|  3.65k|    }
34237|  11.3k|    mant->n = newn;
34238|  11.3k|    return mant->digits + oldn;
34239|  11.3k|}
janet.c:convert:
34345|  11.6k|    int32_t exponent) {
34346|       |
34347|  11.6k|    int32_t exponent2 = 0;
34348|       |
34349|       |    /* Approximate exponent in base 2 of mant and exponent. This should get us a good estimate of the final size of the
34350|       |     * number, within * 2^32 or so. */
34351|  11.6k|    int64_t mant_exp2_approx = mant->n * 32 + 16;
34352|  11.6k|    int64_t exp_exp2_approx = (int64_t)(floor(log2(base) * exponent));
34353|  11.6k|    int64_t exp2_approx = mant_exp2_approx + exp_exp2_approx;
34354|       |
34355|       |    /* Short circuit zero, huge, and small numbers. We use the exponent range of valid IEEE754 doubles (-1022, 1023)
34356|       |     * with a healthy buffer to allow for inaccuracies in the approximation and denormailzed numbers. */
34357|  11.6k|    if (mant->n == 0 && mant->first_digit == 0)
  ------------------
  |  Branch (34357:9): [True: 11.3k, False: 299]
  |  Branch (34357:25): [True: 2.68k, False: 8.62k]
  ------------------
34358|  2.68k|        return negative ? -0.0 : 0.0;
  ------------------
  |  Branch (34358:16): [True: 59, False: 2.63k]
  ------------------
34359|  8.92k|    if (exp2_approx > 1176)
  ------------------
  |  Branch (34359:9): [True: 109, False: 8.81k]
  ------------------
34360|    109|        return negative ? -INFINITY : INFINITY;
  ------------------
  |  Branch (34360:16): [True: 18, False: 91]
  ------------------
34361|  8.81k|    if (exp2_approx < -1175)
  ------------------
  |  Branch (34361:9): [True: 98, False: 8.71k]
  ------------------
34362|     98|        return negative ? -0.0 : 0.0;
  ------------------
  |  Branch (34362:16): [True: 7, False: 91]
  ------------------
34363|       |
34364|       |    /* Final value is X = mant * base ^ exponent * 2 ^ exponent2
34365|       |     * Get exponent to zero while holding X constant. */
34366|       |
34367|       |    /* Positive exponents are simple */
34368|  31.5k|    for (; exponent > 3; exponent -= 4) bignat_muladd(mant, base * base * base * base, 0);
  ------------------
  |  Branch (34368:12): [True: 22.8k, False: 8.71k]
  ------------------
34369|  9.52k|    for (; exponent > 1; exponent -= 2) bignat_muladd(mant, base * base, 0);
  ------------------
  |  Branch (34369:12): [True: 806, False: 8.71k]
  ------------------
34370|  9.47k|    for (; exponent > 0; exponent -= 1) bignat_muladd(mant, base, 0);
  ------------------
  |  Branch (34370:12): [True: 754, False: 8.71k]
  ------------------
34371|       |
34372|       |    /* Negative exponents are tricky - we don't want to loose bits
34373|       |     * from integer division, so we need to premultiply. */
34374|  8.71k|    if (exponent < 0) {
  ------------------
  |  Branch (34374:9): [True: 1.11k, False: 7.60k]
  ------------------
34375|  1.11k|        int32_t shamt = 5 - exponent / 4;
34376|  1.11k|        bignat_lshift_n(mant, shamt);
34377|  1.11k|        exponent2 -= shamt * BIGNAT_NBIT;
  ------------------
  |  |34205|  1.11k|#define BIGNAT_NBIT 31
  ------------------
34378|  7.73k|        for (; exponent < -3; exponent += 4) bignat_div(mant, base * base * base * base);
  ------------------
  |  Branch (34378:16): [True: 6.62k, False: 1.11k]
  ------------------
34379|  1.61k|        for (; exponent < -1; exponent += 2) bignat_div(mant, base * base);
  ------------------
  |  Branch (34379:16): [True: 501, False: 1.11k]
  ------------------
34380|  1.83k|        for (; exponent <  0; exponent += 1) bignat_div(mant, base);
  ------------------
  |  Branch (34380:16): [True: 727, False: 1.11k]
  ------------------
34381|  1.11k|    }
34382|       |
34383|  8.71k|    return negative
  ------------------
  |  Branch (34383:12): [True: 969, False: 7.74k]
  ------------------
34384|  8.71k|           ? -bignat_extract(mant, exponent2)
34385|  8.71k|           : bignat_extract(mant, exponent2);
34386|  8.81k|}
janet.c:bignat_lshift_n:
34281|  1.11k|static void bignat_lshift_n(struct BigNat *mant, int n) {
34282|  1.11k|    if (!n) return;
  ------------------
  |  Branch (34282:9): [True: 0, False: 1.11k]
  ------------------
34283|  1.11k|    int32_t oldn = mant->n;
34284|  1.11k|    bignat_extra(mant, n);
34285|  1.11k|    memmove(mant->digits + n, mant->digits, sizeof(uint32_t) * oldn);
34286|  1.11k|    memset(mant->digits, 0, sizeof(uint32_t) * (n - 1));
34287|  1.11k|    mant->digits[n - 1] = mant->first_digit;
34288|  1.11k|    mant->first_digit = 0;
34289|  1.11k|}
janet.c:bignat_div:
34263|  7.85k|static void bignat_div(struct BigNat *mant, uint32_t divisor) {
34264|  7.85k|    int32_t i;
34265|  7.85k|    uint32_t quotient, remainder;
34266|  7.85k|    uint64_t dividend;
34267|  7.85k|    remainder = 0, quotient = 0;
34268|   571k|    for (i = mant->n - 1; i >= 0; i--) {
  ------------------
  |  Branch (34268:27): [True: 563k, False: 7.85k]
  ------------------
34269|   563k|        dividend = ((uint64_t)remainder * BIGNAT_BASE) + mant->digits[i];
  ------------------
  |  |34206|   563k|#define BIGNAT_BASE 0x80000000U
  ------------------
34270|   563k|        if (i < mant->n - 1) mant->digits[i + 1] = quotient;
  ------------------
  |  Branch (34270:13): [True: 555k, False: 7.85k]
  ------------------
34271|   563k|        quotient = (uint32_t)(dividend / divisor);
34272|   563k|        remainder = (uint32_t)(dividend % divisor);
34273|   563k|        mant->digits[i] = remainder;
34274|   563k|    }
34275|  7.85k|    dividend = ((uint64_t)remainder * BIGNAT_BASE) + mant->first_digit;
  ------------------
  |  |34206|  7.85k|#define BIGNAT_BASE 0x80000000U
  ------------------
34276|  7.85k|    if (mant->n && mant->digits[mant->n - 1] == 0) mant->n--;
  ------------------
  |  Branch (34276:9): [True: 7.85k, False: 0]
  |  Branch (34276:20): [True: 3.10k, False: 4.75k]
  ------------------
34277|  7.85k|    mant->first_digit = (uint32_t)(dividend / divisor);
34278|  7.85k|}
janet.c:bignat_extract:
34306|  8.71k|static double bignat_extract(struct BigNat *mant, int32_t exponent2) {
34307|  8.71k|    uint64_t top53;
34308|  8.71k|    int32_t n = mant->n;
34309|       |    /* Get most significant 53 bits from mant. Bit 52 (0 indexed) should
34310|       |     * always be 1. This is essentially a large right shift on mant.*/
34311|  8.71k|    if (n) {
  ------------------
  |  Branch (34311:9): [True: 2.33k, False: 6.38k]
  ------------------
34312|       |        /* Two or more digits */
34313|  2.33k|        uint64_t d1 = mant->digits[n - 1]; /* MSD (non-zero) */
34314|  2.33k|        uint64_t d2 = (n == 1) ? mant->first_digit : mant->digits[n - 2];
  ------------------
  |  Branch (34314:23): [True: 329, False: 2.00k]
  ------------------
34315|  2.33k|        uint64_t d3 = (n > 2) ? mant->digits[n - 3] : (n == 2) ? mant->first_digit : 0;
  ------------------
  |  Branch (34315:23): [True: 1.51k, False: 825]
  |  Branch (34315:55): [True: 496, False: 329]
  ------------------
34316|  2.33k|        int lz = clz((uint32_t) d1);
  ------------------
  |  |34292|  2.33k|#define clz(x) __builtin_clz(x)
  ------------------
34317|  2.33k|        int nbits = 32 - lz;
34318|       |        /* First get 54 bits */
34319|  2.33k|        top53 = (d2 << (54 - BIGNAT_NBIT)) + (d3 >> (2 * BIGNAT_NBIT - 54));
  ------------------
  |  |34205|  2.33k|#define BIGNAT_NBIT 31
  ------------------
                      top53 = (d2 << (54 - BIGNAT_NBIT)) + (d3 >> (2 * BIGNAT_NBIT - 54));
  ------------------
  |  |34205|  2.33k|#define BIGNAT_NBIT 31
  ------------------
34320|  2.33k|        top53 >>= nbits;
34321|  2.33k|        top53 |= (d1 << (54 - nbits));
34322|       |        /* Rounding based on lowest bit of 54 */
34323|  2.33k|        if (top53 & 1) top53++;
  ------------------
  |  Branch (34323:13): [True: 929, False: 1.40k]
  ------------------
34324|  2.33k|        top53 >>= 1;
34325|  2.33k|        if (top53 > 0x1FffffFFFFffffUL) {
  ------------------
  |  Branch (34325:13): [True: 31, False: 2.30k]
  ------------------
34326|     31|            top53 >>= 1;
34327|     31|            exponent2++;
34328|     31|        }
34329|       |        /* Correct exponent - to correct for large right shift to mantissa. */
34330|  2.33k|        exponent2 += (nbits - 53) + BIGNAT_NBIT * n;
  ------------------
  |  |34205|  2.33k|#define BIGNAT_NBIT 31
  ------------------
34331|  6.38k|    } else {
34332|       |        /* One digit */
34333|  6.38k|        top53 = mant->first_digit;
34334|  6.38k|    }
34335|  8.71k|    return ldexp((double)top53, exponent2);
34336|  8.71k|}
janet.c:scan_uint64:
34546|  2.46k|    int *neg) {
34547|  2.46k|    const uint8_t *end = str + len;
34548|  2.46k|    int seenadigit = 0;
34549|  2.46k|    int base = 10;
34550|  2.46k|    *neg = 0;
34551|  2.46k|    *out = 0;
34552|  2.46k|    uint64_t accum = 0;
34553|  2.46k|    if (len > JANET_NUMBER_LENGTH_RIDICULOUS) return 0;
  ------------------
  |  |34190|  2.46k|#define JANET_NUMBER_LENGTH_RIDICULOUS 0xFFFF
  ------------------
  |  Branch (34553:9): [True: 0, False: 2.46k]
  ------------------
34554|       |    /* Get sign */
34555|  2.46k|    if (str >= end) return 0;
  ------------------
  |  Branch (34555:9): [True: 0, False: 2.46k]
  ------------------
34556|  2.46k|    if (*str == '-') {
  ------------------
  |  Branch (34556:9): [True: 826, False: 1.64k]
  ------------------
34557|    826|        *neg = 1;
34558|    826|        str++;
34559|  1.64k|    } else if (*str == '+') {
  ------------------
  |  Branch (34559:16): [True: 108, False: 1.53k]
  ------------------
34560|    108|        str++;
34561|    108|    }
34562|       |    /* Check for leading 0x or digit digit r */
34563|  2.46k|    if (str + 1 < end && str[0] == '0' && str[1] == 'x') {
  ------------------
  |  Branch (34563:9): [True: 1.39k, False: 1.07k]
  |  Branch (34563:26): [True: 289, False: 1.10k]
  |  Branch (34563:43): [True: 28, False: 261]
  ------------------
34564|     28|        base = 16;
34565|     28|        str += 2;
34566|  2.44k|    } else if (str + 1 < end  &&
  ------------------
  |  Branch (34566:16): [True: 1.36k, False: 1.07k]
  ------------------
34567|  1.36k|               str[0] >= '0' && str[0] <= '9' &&
  ------------------
  |  Branch (34567:16): [True: 1.26k, False: 105]
  |  Branch (34567:33): [True: 1.17k, False: 93]
  ------------------
34568|  1.17k|               str[1] == 'r') {
  ------------------
  |  Branch (34568:16): [True: 49, False: 1.12k]
  ------------------
34569|     49|        base = str[0] - '0';
34570|     49|        str += 2;
34571|  2.39k|    } else if (str + 2 < end  &&
  ------------------
  |  Branch (34571:16): [True: 1.05k, False: 1.33k]
  ------------------
34572|  1.05k|               str[0] >= '0' && str[0] <= '9' &&
  ------------------
  |  Branch (34572:16): [True: 990, False: 66]
  |  Branch (34572:33): [True: 935, False: 55]
  ------------------
34573|    935|               str[1] >= '0' && str[1] <= '9' &&
  ------------------
  |  Branch (34573:16): [True: 912, False: 23]
  |  Branch (34573:33): [True: 843, False: 69]
  ------------------
34574|    843|               str[2] == 'r') {
  ------------------
  |  Branch (34574:16): [True: 145, False: 698]
  ------------------
34575|    145|        base = 10 * (str[0] - '0') + (str[1] - '0');
34576|    145|        if (base < 2 || base > 36) return 0;
  ------------------
  |  Branch (34576:13): [True: 18, False: 127]
  |  Branch (34576:25): [True: 23, False: 104]
  ------------------
34577|    104|        str += 3;
34578|    104|    }
34579|       |
34580|       |    /* Skip leading zeros */
34581|  3.76k|    while (str < end && *str == '0') {
  ------------------
  |  Branch (34581:12): [True: 3.12k, False: 641]
  |  Branch (34581:25): [True: 1.33k, False: 1.78k]
  ------------------
34582|  1.33k|        seenadigit = 1;
34583|  1.33k|        str++;
34584|  1.33k|    }
34585|       |    /* Parse significant digits */
34586|  12.3k|    while (str < end) {
  ------------------
  |  Branch (34586:12): [True: 10.4k, False: 1.92k]
  ------------------
34587|  10.4k|        if (*str == '_') {
  ------------------
  |  Branch (34587:13): [True: 465, False: 10.0k]
  ------------------
34588|    465|            if (!seenadigit) return 0;
  ------------------
  |  Branch (34588:17): [True: 63, False: 402]
  ------------------
34589|  10.0k|        } else {
34590|  10.0k|            int digit = digit_lookup[*str & 0x7F];
34591|  10.0k|            if (*str > 127 || digit >= base) return 0;
  ------------------
  |  Branch (34591:17): [True: 52, False: 9.95k]
  |  Branch (34591:31): [True: 322, False: 9.63k]
  ------------------
34592|  9.63k|            if (accum > (UINT64_MAX - digit) / base) return 0;
  ------------------
  |  Branch (34592:17): [True: 68, False: 9.56k]
  ------------------
34593|  9.56k|            accum = accum * base + digit;
34594|  9.56k|            seenadigit = 1;
34595|  9.56k|        }
34596|  9.96k|        str++;
34597|  9.96k|    }
34598|       |
34599|  1.92k|    if (!seenadigit) return 0;
  ------------------
  |  Branch (34599:9): [True: 181, False: 1.74k]
  ------------------
34600|  1.74k|    *out = accum;
34601|  1.74k|    return 1;
34602|  1.92k|}
janet.c:janet_dict_find:
  433|   142M|static inline const JanetKV *janet_dict_find(const JanetKV *buckets, int32_t cap, Janet key) {
  434|   142M|    int32_t hash;
  435|   142M|    if (janet_checktype(key, JANET_KEYWORD) || janet_checktype(key, JANET_SYMBOL)) {
  ------------------
  |  |  806|   285M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 30.9M, False: 112M]
  |  |  |  Branch (806:6): [Folded, False: 142M]
  |  |  ------------------
  |  |  807|   285M|        ? 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|   285M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   142M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   142M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   142M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   142M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  if (janet_checktype(key, JANET_KEYWORD) || janet_checktype(key, JANET_SYMBOL)) {
  ------------------
  |  |  806|   112M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 35.9M, False: 76.1M]
  |  |  |  Branch (806:6): [Folded, False: 112M]
  |  |  ------------------
  |  |  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|   112M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   112M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   112M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   112M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  436|  66.8M|        hash = janet_string_hash(janet_unwrap_string(key));
  ------------------
  |  | 1814|  66.8M|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  ------------------
  |  |  |  | 1812|  66.8M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
  437|  76.1M|    } else if (janet_checktypes(key, JANET_TFLAG_NIL | JANET_TFLAG_STRING | JANET_TFLAG_TUPLE | JANET_TFLAG_STRUCT | JANET_TFLAG_ABSTRACT) ||
  ------------------
  |  |  969|   152M|#define janet_checktypes(x, tps) ((1 << janet_type(x)) & (tps))
  |  |  ------------------
  |  |  |  |  795|  76.1M|    (isnan((x).number) \
  |  |  |  |  796|  76.1M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  |  |  797|  76.1M|        : JANET_NUMBER)
  |  |  ------------------
  |  |  |  Branch (969:34): [True: 56.9M, False: 19.1M]
  |  |  ------------------
  ------------------
  |  Branch (437:16): [True: 73.2M, False: 2.89M]
  ------------------
  438|  57.2M|               (janet_checktype(key, JANET_NUMBER) && janet_unwrap_number(key) == 0)) {
  ------------------
  |  |  806|  38.3M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 2.89M, False: 16.2M]
  |  |  |  Branch (806:6): [True: 19.1M, Folded]
  |  |  ------------------
  |  |  807|  38.3M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|  19.1M|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 2.89M, False: 16.2M]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 16.2M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  38.3M|        : 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|  2.89M|#define janet_unwrap_number(x) ((x).number)
  ------------------
  |  Branch (438:55): [True: 300k, False: 2.59M]
  ------------------
  439|  57.2M|        return janet_dict_find_deep(buckets, cap, key);
  440|  57.2M|    } else {
  441|  18.8M|        hash = janet_hash(key);
  442|  18.8M|    }
  443|  85.7M|    uint32_t mask = (uint32_t) cap - 1;
  444|  85.7M|    uint32_t i = (uint32_t) hash & mask;
  445|  85.7M|    const JanetKV *first_bucket = NULL;
  446|   111M|    for (int32_t n = 0; n < cap; n++, i = (i + 1) & mask) {
  ------------------
  |  Branch (446:25): [True: 111M, False: 0]
  ------------------
  447|   111M|        const JanetKV *kv = buckets + i;
  448|   111M|        if (janet_bitwise_same(kv->key, key)) return kv;
  ------------------
  |  |  401|   111M|#define janet_bitwise_same(x, y) (janet_u64(x) == janet_u64(y))
  |  |  ------------------
  |  |  |  |  788|   111M|#define janet_u64(x) ((x).u64)
  |  |  ------------------
  |  |               #define janet_bitwise_same(x, y) (janet_u64(x) == janet_u64(y))
  |  |  ------------------
  |  |  |  |  788|   111M|#define janet_u64(x) ((x).u64)
  |  |  ------------------
  |  |  |  Branch (401:34): [True: 5.15M, False: 106M]
  |  |  ------------------
  ------------------
  449|   106M|        if (janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|   106M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 84.6M, False: 21.9M]
  |  |  |  Branch (806:6): [Folded, False: 106M]
  |  |  ------------------
  |  |  807|   106M|        ? 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|   106M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   106M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   106M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   106M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   106M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  450|  84.6M|            if (janet_checktype(kv->value, JANET_NIL)) return kv;
  ------------------
  |  |  806|  84.6M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 80.5M, False: 4.06M]
  |  |  |  Branch (806:6): [Folded, False: 84.6M]
  |  |  ------------------
  |  |  807|  84.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|  84.6M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  84.6M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  84.6M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  84.6M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  84.6M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  451|  4.06M|            if (NULL == first_bucket) first_bucket = kv;
  ------------------
  |  Branch (451:17): [True: 3.18M, False: 878k]
  ------------------
  452|  4.06M|        }
  453|   106M|    }
  454|      0|    return first_bucket;
  455|  85.7M|}
janet.c:janet_symcache_findmem:
35074|  42.3M|    int *success) {
35075|  42.3M|    uint32_t bounds[4];
35076|  42.3M|    uint32_t i, j, index;
35077|  42.3M|    const uint8_t **firstEmpty = NULL;
35078|       |
35079|       |    /* We will search two ranges - index to the end,
35080|       |     * and 0 to the index. */
35081|  42.3M|    index = (uint32_t)hash & (janet_vm.cache_capacity - 1);
35082|  42.3M|    bounds[0] = index;
35083|  42.3M|    bounds[1] = janet_vm.cache_capacity;
35084|  42.3M|    bounds[2] = 0;
35085|  42.3M|    bounds[3] = index;
35086|  42.4M|    for (j = 0; j < 4; j += 2)
  ------------------
  |  Branch (35086:17): [True: 42.4M, False: 0]
  ------------------
35087|  65.9M|        for (i = bounds[j]; i < bounds[j + 1]; ++i) {
  ------------------
  |  Branch (35087:29): [True: 65.9M, False: 13.4k]
  ------------------
35088|  65.9M|            const uint8_t *test = janet_vm.cache[i];
35089|       |            /* Check empty spots */
35090|  65.9M|            if (NULL == test) {
  ------------------
  |  Branch (35090:17): [True: 23.5M, False: 42.3M]
  ------------------
35091|  23.5M|                if (NULL == firstEmpty)
  ------------------
  |  Branch (35091:21): [True: 23.5M, False: 0]
  ------------------
35092|  23.5M|                    firstEmpty = janet_vm.cache + i;
35093|  23.5M|                goto notfound;
35094|  23.5M|            }
35095|       |            /* Check for marked deleted */
35096|  42.3M|            if (JANET_SYMCACHE_DELETED == test) {
  ------------------
  |  Branch (35096:17): [True: 6.67k, False: 42.3M]
  ------------------
35097|  6.67k|                if (firstEmpty == NULL)
  ------------------
  |  Branch (35097:21): [True: 6.65k, False: 27]
  ------------------
35098|  6.65k|                    firstEmpty = janet_vm.cache + i;
35099|  6.67k|                continue;
35100|  6.67k|            }
35101|  42.3M|            if (janet_string_equalconst(test, str, len, hash)) {
  ------------------
  |  Branch (35101:17): [True: 18.8M, False: 23.5M]
  ------------------
35102|       |                /* Replace first deleted */
35103|  18.8M|                *success = 1;
35104|  18.8M|                if (firstEmpty != NULL) {
  ------------------
  |  Branch (35104:21): [True: 6.65k, False: 18.8M]
  ------------------
35105|  6.65k|                    *firstEmpty = test;
35106|  6.65k|                    janet_vm.cache[i] = JANET_SYMCACHE_DELETED;
35107|  6.65k|                    return firstEmpty;
35108|  6.65k|                }
35109|  18.8M|                return janet_vm.cache + i;
35110|  18.8M|            }
35111|  42.3M|        }
35112|  23.5M|notfound:
35113|  23.5M|    *success = 0;
35114|  23.5M|    janet_assert(firstEmpty != NULL, "symcache failed to get memory");
  ------------------
  |  |  389|  23.5M|#define janet_assert(c, m) do { \
  |  |  390|  23.5M|    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: 23.5M]
  |  |  ------------------
  |  |  391|  23.5M|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 23.5M]
  |  |  ------------------
  ------------------
35115|  23.5M|    return firstEmpty;
35116|  23.5M|}
janet.c:janet_symcache_put:
35152|  13.2M|static void janet_symcache_put(const uint8_t *x, const uint8_t **bucket) {
35153|  13.2M|    if ((janet_vm.cache_count + janet_vm.cache_deleted) * 2 > janet_vm.cache_capacity) {
  ------------------
  |  Branch (35153:9): [True: 13.3k, False: 13.2M]
  ------------------
35154|  13.3k|        int status;
35155|  13.3k|        janet_cache_resize(janet_tablen((2 * janet_vm.cache_count + 1)));
35156|  13.3k|        bucket = janet_symcache_find(x, &status);
  ------------------
  |  |35119|  13.3k|    janet_symcache_findmem((str), janet_string_length(str), janet_string_hash(str), (success))
  |  |  ------------------
  |  |  |  | 1813|  13.3k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1812|  13.3k|#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|  13.3k|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1812|  13.3k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35157|  13.3k|    }
35158|       |    /* Add x to the cache */
35159|  13.2M|    janet_vm.cache_count++;
35160|  13.2M|    *bucket = x;
35161|  13.2M|}
janet.c:janet_cache_resize:
35122|  13.3k|static void janet_cache_resize(uint32_t newCapacity) {
35123|  13.3k|    uint32_t i, oldCapacity;
35124|  13.3k|    const uint8_t **oldCache = janet_vm.cache;
35125|  13.3k|    const uint8_t **newCache = janet_calloc(1, (size_t) newCapacity * sizeof(const uint8_t *));
  ------------------
  |  | 2412|  13.3k|#define janet_calloc(X, Y) calloc((X), (Y))
  ------------------
35126|  13.3k|    if (newCache == NULL) {
  ------------------
  |  Branch (35126:9): [True: 0, False: 13.3k]
  ------------------
35127|      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]
  |  |  ------------------
  ------------------
35128|      0|    }
35129|  13.3k|    oldCapacity = janet_vm.cache_capacity;
35130|  13.3k|    janet_vm.cache = newCache;
35131|  13.3k|    janet_vm.cache_capacity = newCapacity;
35132|  13.3k|    janet_vm.cache_deleted = 0;
35133|       |    /* Add all of the old cache entries back */
35134|  20.4M|    for (i = 0; i < oldCapacity; ++i) {
  ------------------
  |  Branch (35134:17): [True: 20.4M, False: 13.3k]
  ------------------
35135|  20.4M|        int status;
35136|  20.4M|        const uint8_t **bucket;
35137|  20.4M|        const uint8_t *x = oldCache[i];
35138|  20.4M|        if (x != NULL && x != JANET_SYMCACHE_DELETED) {
  ------------------
  |  Branch (35138:13): [True: 10.2M, False: 10.2M]
  |  Branch (35138:26): [True: 10.2M, False: 0]
  ------------------
35139|  10.2M|            bucket = janet_symcache_find(x, &status);
  ------------------
  |  |35119|  10.2M|    janet_symcache_findmem((str), janet_string_length(str), janet_string_hash(str), (success))
  |  |  ------------------
  |  |  |  | 1813|  10.2M|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1812|  10.2M|#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|  10.2M|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1812|  10.2M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35140|  10.2M|            if (status || bucket == NULL) {
  ------------------
  |  Branch (35140:17): [True: 0, False: 10.2M]
  |  Branch (35140:27): [True: 0, False: 10.2M]
  ------------------
35141|       |                /* there was a problem with the algorithm. */
35142|      0|                break;
35143|      0|            }
35144|  10.2M|            *bucket = x;
35145|  10.2M|        }
35146|  20.4M|    }
35147|       |    /* Free the old cache */
35148|  13.3k|    janet_free((void *)oldCache);
  ------------------
  |  | 2415|  13.3k|#define janet_free(X) free((X))
  ------------------
35149|  13.3k|}
janet.c:janet_table_init_impl:
35293|  15.0M|static JanetTable *janet_table_init_impl(JanetTable *table, int32_t capacity, int stackalloc) {
35294|  15.0M|    JanetKV *data;
35295|  15.0M|    capacity = janet_tablen(capacity);
35296|  15.0M|    if (stackalloc) table->gc.flags = JANET_TABLE_FLAG_STACK;
  ------------------
  |  |35279|  10.1M|#define JANET_TABLE_FLAG_STACK 0x10000
  ------------------
  |  Branch (35296:9): [True: 10.1M, False: 4.90M]
  ------------------
35297|  15.0M|    if (capacity) {
  ------------------
  |  Branch (35297:9): [True: 15.0M, False: 0]
  ------------------
35298|  15.0M|        if (stackalloc) {
  ------------------
  |  Branch (35298:13): [True: 10.1M, False: 4.90M]
  ------------------
35299|  10.1M|            data = janet_memalloc_empty_local(capacity);
35300|  10.1M|        } else {
35301|  4.90M|            data = (JanetKV *) janet_memalloc_empty(capacity);
35302|  4.90M|            if (NULL == data) {
  ------------------
  |  Branch (35302:17): [True: 0, False: 4.90M]
  ------------------
35303|      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]
  |  |  ------------------
  ------------------
35304|      0|            }
35305|  4.90M|        }
35306|  15.0M|        table->data = data;
35307|  15.0M|        table->capacity = capacity;
35308|  15.0M|    } else {
35309|      0|        table->data = NULL;
35310|      0|        table->capacity = 0;
35311|      0|    }
35312|  15.0M|    table->count = 0;
35313|  15.0M|    table->deleted = 0;
35314|       |    table->proto = NULL;
35315|  15.0M|    return table;
35316|  15.0M|}
janet.c:janet_memalloc_empty_local:
35281|  11.2M|static void *janet_memalloc_empty_local(int32_t count) {
35282|  11.2M|    int32_t i;
35283|  11.2M|    void *mem = janet_smalloc((size_t) count * sizeof(JanetKV));
35284|  11.2M|    JanetKV *mmem = (JanetKV *)mem;
35285|   186M|    for (i = 0; i < count; i++) {
  ------------------
  |  Branch (35285:17): [True: 175M, False: 11.2M]
  ------------------
35286|   175M|        JanetKV *kv = mmem + i;
35287|   175M|        kv->key = janet_wrap_nil();
  ------------------
  |  |  831|   175M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   175M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   175M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   175M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35288|   175M|        kv->value = janet_wrap_nil();
  ------------------
  |  |  831|   175M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   175M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   175M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   175M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35289|   175M|    }
35290|  11.2M|    return mem;
35291|  11.2M|}
janet.c:janet_table_rehash:
35366|  5.02M|static void janet_table_rehash(JanetTable *t, int32_t size) {
35367|  5.02M|    JanetKV *olddata = t->data;
35368|  5.02M|    JanetKV *newdata;
35369|  5.02M|    int islocal = t->gc.flags & JANET_TABLE_FLAG_STACK;
  ------------------
  |  |35279|  5.02M|#define JANET_TABLE_FLAG_STACK 0x10000
  ------------------
35370|  5.02M|    if (islocal) {
  ------------------
  |  Branch (35370:9): [True: 1.07M, False: 3.94M]
  ------------------
35371|  1.07M|        newdata = (JanetKV *) janet_memalloc_empty_local(size);
35372|  3.94M|    } else {
35373|  3.94M|        newdata = (JanetKV *) janet_memalloc_empty(size);
35374|  3.94M|        if (NULL == newdata) {
  ------------------
  |  Branch (35374:13): [True: 0, False: 3.94M]
  ------------------
35375|      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]
  |  |  ------------------
  ------------------
35376|      0|        }
35377|  3.94M|    }
35378|  5.02M|    int32_t oldcapacity = t->capacity;
35379|  5.02M|    t->data = newdata;
35380|  5.02M|    t->capacity = size;
35381|  5.02M|    t->deleted = 0;
35382|  63.5M|    for (int32_t i = 0; i < oldcapacity; i++) {
  ------------------
  |  Branch (35382:25): [True: 58.4M, False: 5.02M]
  ------------------
35383|  58.4M|        JanetKV *kv = olddata + i;
35384|  58.4M|        if (!janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|  58.4M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 58.4M]
  |  |  ------------------
  |  |  807|  58.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|  58.4M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  58.4M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  58.4M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  58.4M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  58.4M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35384:13): [True: 24.3M, False: 34.1M]
  ------------------
35385|  24.3M|            JanetKV *newkv = janet_table_find(t, kv->key);
35386|  24.3M|            *newkv = *kv;
35387|  24.3M|        }
35388|  58.4M|    }
35389|  5.02M|    if (islocal) {
  ------------------
  |  Branch (35389:9): [True: 1.07M, False: 3.94M]
  ------------------
35390|  1.07M|        janet_sfree(olddata);
35391|  3.94M|    } else {
35392|  3.94M|        janet_free(olddata);
  ------------------
  |  | 2415|  3.94M|#define janet_free(X) free((X))
  ------------------
35393|  3.94M|    }
35394|  5.02M|}
janet.c:janet_check_pointer_align:
36455|  2.39M|static void janet_check_pointer_align(void *p) {
36456|  2.39M|    (void) p;
36457|       |#if defined(JANET_NANBOX_64) && JANET_NANBOX_64_POINTER_SHIFT != 0
36458|       |    union {
36459|       |        void *p;
36460|       |        uintptr_t u;
36461|       |    } un;
36462|       |    un.p = p;
36463|       |    janet_assert(!(un.u & (uintptr_t)((1 << JANET_NANBOX_64_POINTER_SHIFT) - 1)),
36464|       |                 "unaligned pointer wrap - cfunction pointers and abstract types must be aligned with this nanboxing configuration.");
36465|       |#endif
36466|  2.39M|}
janet.c:janet_equals_containers:
37366|  2.85M|static int janet_equals_containers(Janet x, Janet y) {
37367|  2.85M|    janet_vm.traversal = janet_vm.traversal_base;
37368|  2.87M|    do {
37369|  2.87M|        if (janet_type(x) != janet_type(y)) return 0;
  ------------------
  |  |  795|  2.87M|    (isnan((x).number) \
  |  |  796|  2.87M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  2.87M|        : JANET_NUMBER)
  ------------------
                      if (janet_type(x) != janet_type(y)) return 0;
  ------------------
  |  |  795|  2.87M|    (isnan((x).number) \
  |  |  796|  2.87M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  2.87M|        : JANET_NUMBER)
  ------------------
  |  Branch (37369:13): [True: 2.87M, False: 457]
  |  Branch (37369:13): [True: 343, False: 2.87M]
  |  Branch (37369:30): [True: 2.87M, False: 180]
  ------------------
37370|  2.87M|        switch (janet_type(x)) {
  ------------------
  |  |  795|  2.87M|    (isnan((x).number) \
  |  |  796|  2.87M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  2.87M|        : JANET_NUMBER)
  ------------------
  |  Branch (37370:17): [True: 2.87M, False: 176]
  ------------------
37371|  9.26k|            default:
  ------------------
  |  Branch (37371:13): [True: 9.26k, False: 2.86M]
  ------------------
37372|  9.26k|                if (!janet_equals_leaf(x, y)) return 0;
  ------------------
  |  Branch (37372:21): [True: 62, False: 9.20k]
  ------------------
37373|  9.20k|                break;
37374|  2.78M|            case JANET_TUPLE: {
  ------------------
  |  Branch (37374:13): [True: 2.78M, False: 85.6k]
  ------------------
37375|  2.78M|                const Janet *t1 = janet_unwrap_tuple(x);
  ------------------
  |  |  858|  2.78M|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
37376|  2.78M|                const Janet *t2 = janet_unwrap_tuple(y);
  ------------------
  |  |  858|  2.78M|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
37377|  2.78M|                if (t1 == t2) break;
  ------------------
  |  Branch (37377:21): [True: 0, False: 2.78M]
  ------------------
37378|  2.78M|                if (JANET_TUPLE_FLAG_BRACKETCTOR & (janet_tuple_flag(t1) ^ janet_tuple_flag(t2))) return 0;
  ------------------
  |  | 1798|  2.78M|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
                              if (JANET_TUPLE_FLAG_BRACKETCTOR & (janet_tuple_flag(t1) ^ janet_tuple_flag(t2))) return 0;
  ------------------
  |  | 1806|  2.78M|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1800|  2.78M|#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|  2.78M|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1800|  2.78M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (37378:21): [True: 5.95k, False: 2.78M]
  ------------------
37379|  2.78M|                if (janet_tuple_hash(t1) != janet_tuple_hash(t2)) return 0;
  ------------------
  |  | 1803|  2.78M|#define janet_tuple_hash(t) (janet_tuple_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1800|  2.78M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                              if (janet_tuple_hash(t1) != janet_tuple_hash(t2)) return 0;
  ------------------
  |  | 1803|  2.78M|#define janet_tuple_hash(t) (janet_tuple_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1800|  2.78M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (37379:21): [True: 2.77M, False: 8.64k]
  ------------------
37380|  8.64k|                if (janet_tuple_length(t1) != janet_tuple_length(t2)) return 0;
  ------------------
  |  | 1802|  8.64k|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1800|  8.64k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                              if (janet_tuple_length(t1) != janet_tuple_length(t2)) return 0;
  ------------------
  |  | 1802|  8.64k|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1800|  8.64k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (37380:21): [True: 0, False: 8.64k]
  ------------------
37381|  8.64k|                push_traversal_node(janet_tuple_head(t1), janet_tuple_head(t2), 0);
  ------------------
  |  | 1800|  8.64k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  ------------------
                              push_traversal_node(janet_tuple_head(t1), janet_tuple_head(t2), 0);
  ------------------
  |  | 1800|  8.64k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  ------------------
37382|  8.64k|                break;
37383|  8.64k|            }
37384|  76.3k|            case JANET_STRUCT: {
  ------------------
  |  Branch (37384:13): [True: 76.3k, False: 2.79M]
  ------------------
37385|  76.3k|                const JanetKV *s1 = janet_unwrap_struct(x);
  ------------------
  |  |  857|  76.3k|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
37386|  76.3k|                const JanetKV *s2 = janet_unwrap_struct(y);
  ------------------
  |  |  857|  76.3k|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
37387|  76.3k|                if (s1 == s2) break;
  ------------------
  |  Branch (37387:21): [True: 0, False: 76.3k]
  ------------------
37388|  76.3k|                if (janet_struct_hash(s1) != janet_struct_hash(s2)) return 0;
  ------------------
  |  | 1850|  76.3k|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1846|  76.3k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                              if (janet_struct_hash(s1) != janet_struct_hash(s2)) return 0;
  ------------------
  |  | 1850|  76.3k|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1846|  76.3k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (37388:21): [True: 76.2k, False: 115]
  ------------------
37389|    115|                if (janet_struct_length(s1) != janet_struct_length(s2)) return 0;
  ------------------
  |  | 1848|    115|#define janet_struct_length(t) (janet_struct_head(t)->length)
  |  |  ------------------
  |  |  |  | 1846|    115|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                              if (janet_struct_length(s1) != janet_struct_length(s2)) return 0;
  ------------------
  |  | 1848|    115|#define janet_struct_length(t) (janet_struct_head(t)->length)
  |  |  ------------------
  |  |  |  | 1846|    115|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (37389:21): [True: 0, False: 115]
  ------------------
37390|    115|                if (janet_struct_proto(s1) && !janet_struct_proto(s2)) return 0;
  ------------------
  |  | 1851|    230|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1846|    115|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  |  |  |  Branch (1851:31): [True: 0, False: 115]
  |  |  ------------------
  ------------------
                              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 (37390:47): [True: 0, False: 0]
  ------------------
37391|    115|                if (!janet_struct_proto(s1) && janet_struct_proto(s2)) return 0;
  ------------------
  |  | 1851|    230|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1846|    115|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                              if (!janet_struct_proto(s1) && janet_struct_proto(s2)) return 0;
  ------------------
  |  | 1851|    115|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1846|    115|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  |  |  |  Branch (1851:31): [True: 0, False: 115]
  |  |  ------------------
  ------------------
  |  Branch (37391:21): [True: 115, False: 0]
  ------------------
37392|    115|                push_traversal_node(janet_struct_head(s1), janet_struct_head(s2), 0);
  ------------------
  |  | 1846|    115|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  ------------------
                              push_traversal_node(janet_struct_head(s1), janet_struct_head(s2), 0);
  ------------------
  |  | 1846|    115|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  ------------------
37393|    115|                break;
37394|    115|            }
37395|  2.87M|        }
37396|  2.87M|    } while (!traversal_next(&x, &y));
  ------------------
  |  Branch (37396:14): [True: 17.6k, False: 344]
  ------------------
37397|    344|    return 1;
37398|  2.85M|}
janet.c:janet_equals_leaf:
37353|  11.1k|static int janet_equals_leaf(Janet x, Janet y) {
37354|  11.1k|    switch (janet_type(x)) {
  ------------------
  |  |  795|  11.1k|    (isnan((x).number) \
  |  |  796|  11.1k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  11.1k|        : JANET_NUMBER)
  ------------------
  |  Branch (37354:13): [True: 10.6k, False: 468]
  ------------------
37355|    468|        case JANET_NUMBER:
  ------------------
  |  Branch (37355:9): [True: 468, False: 10.6k]
  ------------------
37356|    468|            return janet_unwrap_number(x) == janet_unwrap_number(y);
  ------------------
  |  |  839|    468|#define janet_unwrap_number(x) ((x).number)
  ------------------
                          return janet_unwrap_number(x) == janet_unwrap_number(y);
  ------------------
  |  |  839|    468|#define janet_unwrap_number(x) ((x).number)
  ------------------
37357|  1.41k|        case JANET_STRING:
  ------------------
  |  Branch (37357:9): [True: 1.41k, False: 9.74k]
  ------------------
37358|  1.41k|            return janet_string_equal(janet_unwrap_string(x), janet_unwrap_string(y));
  ------------------
  |  |  863|  1.41k|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
                          return janet_string_equal(janet_unwrap_string(x), janet_unwrap_string(y));
  ------------------
  |  |  863|  1.41k|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
37359|    296|        case JANET_ABSTRACT:
  ------------------
  |  Branch (37359:9): [True: 296, False: 10.8k]
  ------------------
37360|    296|            return !janet_compare_abstract(janet_unwrap_abstract(x), janet_unwrap_abstract(y));
  ------------------
  |  |  866|    296|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
                          return !janet_compare_abstract(janet_unwrap_abstract(x), janet_unwrap_abstract(y));
  ------------------
  |  |  866|    296|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
37361|  8.98k|        default:
  ------------------
  |  Branch (37361:9): [True: 8.98k, False: 2.18k]
  ------------------
37362|  8.98k|            return janet_bitwise_same(x, y);
  ------------------
  |  |  401|  8.98k|#define janet_bitwise_same(x, y) (janet_u64(x) == janet_u64(y))
  |  |  ------------------
  |  |  |  |  788|  8.98k|#define janet_u64(x) ((x).u64)
  |  |  ------------------
  |  |               #define janet_bitwise_same(x, y) (janet_u64(x) == janet_u64(y))
  |  |  ------------------
  |  |  |  |  788|  8.98k|#define janet_u64(x) ((x).u64)
  |  |  ------------------
  ------------------
37363|  11.1k|    }
37364|  11.1k|}
janet.c:murmur64:
37406|  28.5M|static uint64_t murmur64(uint64_t h) {
37407|  28.5M|    h ^= h >> 33;
37408|  28.5M|    h *= 0xff51afd7ed558ccdUL;
37409|  28.5M|    h ^= h >> 33;
37410|  28.5M|    h *= 0xc4ceb9fe1a85ec53UL;
37411|  28.5M|    h ^= h >> 33;
37412|  28.5M|    return h;
37413|  28.5M|}
janet.c:janet_compare_abstract:
37339|  17.8k|static int janet_compare_abstract(JanetAbstract xx, JanetAbstract yy) {
37340|  17.8k|    if (xx == yy) return 0;
  ------------------
  |  Branch (37340:9): [True: 0, False: 17.8k]
  ------------------
37341|  17.8k|    const JanetAbstractType *xt = janet_abstract_type(xx);
  ------------------
  |  | 1899|  17.8k|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|  17.8k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
37342|  17.8k|    const JanetAbstractType *yt = janet_abstract_type(yy);
  ------------------
  |  | 1899|  17.8k|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|  17.8k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
37343|  17.8k|    if (xt != yt) {
  ------------------
  |  Branch (37343:9): [True: 2.80k, False: 15.0k]
  ------------------
37344|  2.80k|        return xt > yt ? 1 : -1;
  ------------------
  |  Branch (37344:16): [True: 61, False: 2.74k]
  ------------------
37345|  2.80k|    }
37346|  15.0k|    if (xt->compare == NULL) {
  ------------------
  |  Branch (37346:9): [True: 62, False: 15.0k]
  ------------------
37347|     62|        return xx > yy ? 1 : -1;
  ------------------
  |  Branch (37347:16): [True: 8, False: 54]
  ------------------
37348|     62|    }
37349|  15.0k|    return xt->compare(xx, yy);
37350|  15.0k|}
janet.c:push_traversal_node:
37137|   396k|static void push_traversal_node(void *lhs, void *rhs, int32_t index2) {
37138|   396k|    JanetTraversalNode node;
37139|   396k|    node.self = (JanetGCObject *) lhs;
37140|   396k|    node.other = (JanetGCObject *) rhs;
37141|   396k|    node.index = 0;
37142|   396k|    node.index2 = index2;
37143|   396k|    int is_new = janet_vm.traversal_base == NULL;
37144|   396k|    if (is_new || (janet_vm.traversal + 1 >= janet_vm.traversal_top)) {
  ------------------
  |  Branch (37144:9): [True: 339, False: 396k]
  |  Branch (37144:19): [True: 0, False: 396k]
  ------------------
37145|    339|        size_t oldsize = is_new ? 0 : (janet_vm.traversal - janet_vm.traversal_base);
  ------------------
  |  Branch (37145:26): [True: 339, False: 0]
  ------------------
37146|    339|        size_t newsize = 2 * oldsize + 1;
37147|    339|        if (newsize < 128) {
  ------------------
  |  Branch (37147:13): [True: 339, False: 0]
  ------------------
37148|    339|            newsize = 128;
37149|    339|        }
37150|    339|        JanetTraversalNode *tn = janet_realloc(janet_vm.traversal_base, newsize * sizeof(JanetTraversalNode));
  ------------------
  |  | 2409|    339|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
37151|    339|        if (tn == NULL) {
  ------------------
  |  Branch (37151:13): [True: 0, False: 339]
  ------------------
37152|      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]
  |  |  ------------------
  ------------------
37153|      0|        }
37154|    339|        janet_vm.traversal_base = tn;
37155|    339|        janet_vm.traversal_top = janet_vm.traversal_base + newsize;
37156|    339|        janet_vm.traversal = janet_vm.traversal_base + oldsize;
37157|    339|    }
37158|   396k|    *(++janet_vm.traversal) = node;
37159|   396k|}
janet.c:traversal_next:
37169|   742k|static int traversal_next(Janet *x, Janet *y) {
37170|   742k|    JanetTraversalNode *t = janet_vm.traversal;
37171|   744k|    while (t && t > janet_vm.traversal_base) {
  ------------------
  |  Branch (37171:12): [True: 743k, False: 469]
  |  Branch (37171:17): [True: 742k, False: 752]
  ------------------
37172|   742k|        JanetGCObject *self = t->self;
37173|   742k|        JanetTupleHead *tself = (JanetTupleHead *)self;
37174|   742k|        JanetStructHead *sself = (JanetStructHead *)self;
37175|   742k|        JanetGCObject *other = t->other;
37176|   742k|        JanetTupleHead *tother = (JanetTupleHead *)other;
37177|   742k|        JanetStructHead *sother = (JanetStructHead *)other;
37178|   742k|        if ((self->flags & JANET_MEM_TYPEBITS) == JANET_MEMORY_TUPLE) {
  ------------------
  |  |  675|   742k|#define JANET_MEM_TYPEBITS 0xFF
  ------------------
  |  Branch (37178:13): [True: 741k, False: 1.63k]
  ------------------
37179|       |            /* Node is a tuple at index t->index */
37180|   741k|            if (t->index < tself->length && t->index < tother->length) {
  ------------------
  |  Branch (37180:17): [True: 735k, False: 5.93k]
  |  Branch (37180:45): [True: 726k, False: 8.59k]
  ------------------
37181|   726k|                int32_t index = t->index++;
37182|   726k|                *x = tself->data[index];
37183|   726k|                *y = tother->data[index];
37184|   726k|                janet_vm.traversal = t;
37185|   726k|                return 0;
37186|   726k|            }
37187|  14.5k|            if (t->index2 && tself->length != tother->length) {
  ------------------
  |  Branch (37187:17): [True: 13.7k, False: 741]
  |  Branch (37187:30): [True: 13.5k, False: 226]
  ------------------
37188|  13.5k|                return tself->length > tother->length ? 3 : 1;
  ------------------
  |  Branch (37188:24): [True: 8.59k, False: 4.96k]
  ------------------
37189|  13.5k|            }
37190|  14.5k|        } else {
37191|       |            /* Node is a struct at index t->index: if t->index2 is true, we should return the values. */
37192|  1.63k|            if (t->index2) {
  ------------------
  |  Branch (37192:17): [True: 628, False: 1.00k]
  ------------------
37193|    628|                t->index2 = 0;
37194|    628|                int32_t index = t->index++;
37195|    628|                *x = sself->data[index].value;
37196|    628|                *y = sother->data[index].value;
37197|    628|                janet_vm.traversal = t;
37198|    628|                return 0;
37199|    628|            }
37200|  1.00k|            for (int32_t i = t->index; i < sself->capacity; i++) {
  ------------------
  |  Branch (37200:40): [True: 628, False: 376]
  ------------------
37201|    628|                t->index2 = 1;
37202|    628|                *x = sself->data[t->index].key;
37203|    628|                *y = sother->data[t->index].key;
37204|    628|                janet_vm.traversal = t;
37205|    628|                return 0;
37206|    628|            }
37207|       |            /* Traverse prototype */
37208|    376|            JanetStruct sproto = sself->proto;
37209|    376|            JanetStruct oproto = sother->proto;
37210|    376|            if (sproto && !oproto) return 3;
  ------------------
  |  Branch (37210:17): [True: 0, False: 376]
  |  Branch (37210:27): [True: 0, False: 0]
  ------------------
37211|    376|            if (!sproto && oproto) return 1;
  ------------------
  |  Branch (37211:17): [True: 376, False: 0]
  |  Branch (37211:28): [True: 0, False: 376]
  ------------------
37212|    376|            if (oproto && sproto) {
  ------------------
  |  Branch (37212:17): [True: 0, False: 376]
  |  Branch (37212:27): [True: 0, False: 0]
  ------------------
37213|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37214|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37215|      0|                janet_vm.traversal = t - 1;
37216|      0|                return 0;
37217|      0|            }
37218|    376|        }
37219|  1.34k|        t--;
37220|  1.34k|    }
37221|  1.22k|    janet_vm.traversal = t;
37222|  1.22k|    return 2;
37223|   742k|}

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

