janet_abstract_begin:
 1389|  26.6k|void *janet_abstract_begin(const JanetAbstractType *atype, size_t size) {
 1390|  26.6k|    JanetAbstractHead *header = janet_gcalloc(JANET_MEMORY_NONE,
 1391|  26.6k|        sizeof(JanetAbstractHead) + size);
 1392|  26.6k|    header->size = size;
 1393|  26.6k|    header->type = atype;
 1394|  26.6k|    return (void *) & (header->data);
 1395|  26.6k|}
janet_abstract_end:
 1397|  26.6k|void *janet_abstract_end(void *x) {
 1398|  26.6k|    janet_gc_settype((void *)(janet_abstract_head(x)), JANET_MEMORY_ABSTRACT);
  ------------------
  |  |  679|  26.6k|#define janet_gc_settype(m, t) ((janet_gc_header(m)->flags |= (0xFF & (t))))
  |  |  ------------------
  |  |  |  |  673|  26.6k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  ------------------
 1399|  26.6k|    return x;
 1400|  26.6k|}
janet_abstract:
 1402|  26.6k|void *janet_abstract(const JanetAbstractType *atype, size_t size) {
 1403|  26.6k|    return janet_abstract_end(janet_abstract_begin(atype, size));
 1404|  26.6k|}
janet_array:
 1621|  24.3k|JanetArray *janet_array(int32_t capacity) {
 1622|  24.3k|    JanetArray *array = janet_gcalloc(JANET_MEMORY_ARRAY, sizeof(JanetArray));
 1623|  24.3k|    janet_array_impl(array, capacity);
 1624|  24.3k|    return array;
 1625|  24.3k|}
janet_array_ensure:
 1648|  72.9M|void janet_array_ensure(JanetArray *array, int32_t capacity, int32_t growth) {
 1649|  72.9M|    Janet *newData;
 1650|  72.9M|    Janet *old = array->data;
 1651|  72.9M|    if (capacity <= array->capacity) return;
  ------------------
  |  Branch (1651:9): [True: 72.9M, False: 3.79k]
  ------------------
 1652|  3.79k|    int64_t new_capacity = ((int64_t) capacity) * growth;
 1653|  3.79k|    if (new_capacity > INT32_MAX) new_capacity = INT32_MAX;
  ------------------
  |  Branch (1653:9): [True: 0, False: 3.79k]
  ------------------
 1654|  3.79k|    capacity = (int32_t) new_capacity;
 1655|  3.79k|    newData = janet_realloc(old, capacity * sizeof(Janet));
  ------------------
  |  | 2409|  3.79k|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
 1656|  3.79k|    if (NULL == newData) {
  ------------------
  |  Branch (1656:9): [True: 0, False: 3.79k]
  ------------------
 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|  3.79k|    janet_vm.next_collection += (capacity - array->capacity) * sizeof(Janet);
 1660|  3.79k|    array->data = newData;
 1661|  3.79k|    array->capacity = capacity;
 1662|  3.79k|}
janet_array_push:
 1679|  72.9M|void janet_array_push(JanetArray *array, Janet x) {
 1680|  72.9M|    if (array->count == INT32_MAX) {
  ------------------
  |  Branch (1680:9): [True: 0, False: 72.9M]
  ------------------
 1681|      0|        janet_panic("array overflow");
 1682|      0|    }
 1683|  72.9M|    int32_t newcount = array->count + 1;
 1684|  72.9M|    janet_array_ensure(array, newcount, 2);
 1685|  72.9M|    array->data[array->count] = x;
 1686|  72.9M|    array->count = newcount;
 1687|  72.9M|}
janet_lib_array:
 1978|  6.71k|void janet_lib_array(JanetTable *env) {
 1979|  6.71k|    JanetRegExt array_cfuns[] = {
 1980|  6.71k|        JANET_CORE_REG("array/new", cfun_array_new),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1981|  6.71k|        JANET_CORE_REG("array/weak", cfun_array_weak),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1982|  6.71k|        JANET_CORE_REG("array/new-filled", cfun_array_new_filled),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1983|  6.71k|        JANET_CORE_REG("array/fill", cfun_array_fill),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1984|  6.71k|        JANET_CORE_REG("array/pop", cfun_array_pop),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1985|  6.71k|        JANET_CORE_REG("array/peek", cfun_array_peek),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1986|  6.71k|        JANET_CORE_REG("array/push", cfun_array_push),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1987|  6.71k|        JANET_CORE_REG("array/ensure", cfun_array_ensure),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1988|  6.71k|        JANET_CORE_REG("array/slice", cfun_array_slice),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1989|  6.71k|        JANET_CORE_REG("array/concat", cfun_array_concat),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1990|  6.71k|        JANET_CORE_REG("array/insert", cfun_array_insert),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1991|  6.71k|        JANET_CORE_REG("array/remove", cfun_array_remove),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1992|  6.71k|        JANET_CORE_REG("array/trim", cfun_array_trim),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1993|  6.71k|        JANET_CORE_REG("array/clear", cfun_array_clear),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1994|  6.71k|        JANET_CORE_REG("array/join", cfun_array_join),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1995|  6.71k|        JANET_REG_END
  ------------------
  |  | 2110|  6.71k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
 1996|  6.71k|    };
 1997|       |    janet_core_cfuns_ext(env, NULL, array_cfuns);
 1998|  6.71k|}
janet_lib_asm:
 3143|  6.71k|void janet_lib_asm(JanetTable *env) {
 3144|  6.71k|    JanetRegExt asm_cfuns[] = {
 3145|  6.71k|        JANET_CORE_REG("asm", cfun_asm),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3146|  6.71k|        JANET_CORE_REG("disasm", cfun_disasm),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3147|  6.71k|        JANET_REG_END
  ------------------
  |  | 2110|  6.71k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
 3148|  6.71k|    };
 3149|       |    janet_core_cfuns_ext(env, NULL, asm_cfuns);
 3150|  6.71k|}
janet_buffer_init:
 3211|  4.23M|JanetBuffer *janet_buffer_init(JanetBuffer *buffer, int32_t capacity) {
 3212|  4.23M|    janet_buffer_init_impl(buffer, capacity);
 3213|  4.23M|    buffer->gc.data.next = NULL;
 3214|  4.23M|    buffer->gc.flags = JANET_MEM_DISABLED;
  ------------------
  |  |  677|  4.23M|#define JANET_MEM_DISABLED 0x200
  ------------------
 3215|  4.23M|    return buffer;
 3216|  4.23M|}
janet_buffer_deinit:
 3231|  4.24M|void janet_buffer_deinit(JanetBuffer *buffer) {
 3232|  4.24M|    if (!(buffer->gc.flags & JANET_BUFFER_FLAG_NO_REALLOC)) {
  ------------------
  |  | 1780|  4.24M|#define JANET_BUFFER_FLAG_NO_REALLOC 0x10000
  ------------------
  |  Branch (3232:9): [True: 4.24M, False: 0]
  ------------------
 3233|  4.24M|        janet_free(buffer->data);
  ------------------
  |  | 2415|  4.24M|#define janet_free(X) free((X))
  ------------------
 3234|       |        buffer->data = NULL;
 3235|  4.24M|    }
 3236|  4.24M|}
janet_buffer:
 3239|  12.4k|JanetBuffer *janet_buffer(int32_t capacity) {
 3240|  12.4k|    JanetBuffer *buffer = janet_gcalloc(JANET_MEMORY_BUFFER, sizeof(JanetBuffer));
 3241|  12.4k|    return janet_buffer_init_impl(buffer, capacity);
 3242|  12.4k|}
janet_buffer_extra:
 3275|   123M|void janet_buffer_extra(JanetBuffer *buffer, int32_t n) {
 3276|       |    /* Check for buffer overflow */
 3277|   123M|    if ((int64_t)n + buffer->count > INT32_MAX) {
  ------------------
  |  Branch (3277:9): [True: 0, False: 123M]
  ------------------
 3278|      0|        janet_panic("buffer overflow");
 3279|      0|    }
 3280|   123M|    int32_t new_size = buffer->count + n;
 3281|   123M|    if (new_size > buffer->capacity) {
  ------------------
  |  Branch (3281:9): [True: 3.53M, False: 119M]
  ------------------
 3282|  3.53M|        janet_buffer_can_realloc(buffer);
 3283|  3.53M|        int32_t new_capacity = (new_size > (INT32_MAX / 2)) ? INT32_MAX : (new_size * 2);
  ------------------
  |  Branch (3283:32): [True: 0, False: 3.53M]
  ------------------
 3284|  3.53M|        uint8_t *new_data = janet_realloc(buffer->data, new_capacity * sizeof(uint8_t));
  ------------------
  |  | 2409|  3.53M|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
 3285|  3.53M|        janet_gcpressure(new_capacity - buffer->capacity);
 3286|  3.53M|        if (NULL == new_data) {
  ------------------
  |  Branch (3286:13): [True: 0, False: 3.53M]
  ------------------
 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|  3.53M|        buffer->data = new_data;
 3290|  3.53M|        buffer->capacity = new_capacity;
 3291|  3.53M|    }
 3292|   123M|}
janet_buffer_push_cstring:
 3295|  3.26M|void janet_buffer_push_cstring(JanetBuffer *buffer, const char *cstring) {
 3296|  3.26M|    int32_t len = (int32_t) strlen(cstring);
 3297|  3.26M|    janet_buffer_push_bytes(buffer, (const uint8_t *) cstring, len);
 3298|  3.26M|}
janet_buffer_push_bytes:
 3301|  86.0M|void janet_buffer_push_bytes(JanetBuffer *buffer, const uint8_t *string, int32_t length) {
 3302|  86.0M|    if (0 == length) return;
  ------------------
  |  Branch (3302:9): [True: 74.0M, False: 12.0M]
  ------------------
 3303|  12.0M|    janet_buffer_extra(buffer, length);
 3304|  12.0M|    memcpy(buffer->data + buffer->count, string, length);
 3305|  12.0M|    buffer->count += length;
 3306|  12.0M|}
janet_buffer_push_u8:
 3313|  66.6M|void janet_buffer_push_u8(JanetBuffer *buffer, uint8_t byte) {
 3314|  66.6M|    janet_buffer_extra(buffer, 1);
 3315|  66.6M|    buffer->data[buffer->count] = byte;
 3316|  66.6M|    buffer->count++;
 3317|  66.6M|}
janet_lib_buffer:
 3837|  6.71k|void janet_lib_buffer(JanetTable *env) {
 3838|  6.71k|    JanetRegExt buffer_cfuns[] = {
 3839|  6.71k|        JANET_CORE_REG("buffer/new", cfun_buffer_new),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3840|  6.71k|        JANET_CORE_REG("buffer/new-filled", cfun_buffer_new_filled),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3841|  6.71k|        JANET_CORE_REG("buffer/from-bytes", cfun_buffer_frombytes),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3842|  6.71k|        JANET_CORE_REG("buffer/fill", cfun_buffer_fill),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3843|  6.71k|        JANET_CORE_REG("buffer/trim", cfun_buffer_trim),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3844|  6.71k|        JANET_CORE_REG("buffer/push-byte", cfun_buffer_u8),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3845|  6.71k|        JANET_CORE_REG("buffer/push-word", cfun_buffer_word),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3846|  6.71k|        JANET_CORE_REG("buffer/push-string", cfun_buffer_chars),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3847|  6.71k|        JANET_CORE_REG("buffer/push-uint16", cfun_buffer_push_uint16),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3848|  6.71k|        JANET_CORE_REG("buffer/push-uint32", cfun_buffer_push_uint32),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3849|  6.71k|        JANET_CORE_REG("buffer/push-uint64", cfun_buffer_push_uint64),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3850|  6.71k|        JANET_CORE_REG("buffer/push-float32", cfun_buffer_push_float32),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3851|  6.71k|        JANET_CORE_REG("buffer/push-float64", cfun_buffer_push_float64),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3852|  6.71k|        JANET_CORE_REG("buffer/push", cfun_buffer_push),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3853|  6.71k|        JANET_CORE_REG("buffer/push-at", cfun_buffer_push_at),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3854|  6.71k|        JANET_CORE_REG("buffer/popn", cfun_buffer_popn),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3855|  6.71k|        JANET_CORE_REG("buffer/clear", cfun_buffer_clear),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3856|  6.71k|        JANET_CORE_REG("buffer/slice", cfun_buffer_slice),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3857|  6.71k|        JANET_CORE_REG("buffer/bit-set", cfun_buffer_bitset),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3858|  6.71k|        JANET_CORE_REG("buffer/bit-clear", cfun_buffer_bitclear),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3859|  6.71k|        JANET_CORE_REG("buffer/bit", cfun_buffer_bitget),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3860|  6.71k|        JANET_CORE_REG("buffer/bit-toggle", cfun_buffer_bittoggle),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3861|  6.71k|        JANET_CORE_REG("buffer/blit", cfun_buffer_blit),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3862|  6.71k|        JANET_CORE_REG("buffer/format", cfun_buffer_format),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3863|  6.71k|        JANET_CORE_REG("buffer/format-at", cfun_buffer_format_at),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3864|  6.71k|        JANET_REG_END
  ------------------
  |  | 2110|  6.71k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
 3865|  6.71k|    };
 3866|       |    janet_core_cfuns_ext(env, NULL, buffer_cfuns);
 3867|  6.71k|}
janet_verify:
 5644|  3.59M|int janet_verify(JanetFuncDef *def) {
 5645|  3.59M|    int vargs = !!(def->flags & JANET_FUNCDEF_FLAG_VARARG);
  ------------------
  |  | 1097|  3.59M|#define JANET_FUNCDEF_FLAG_VARARG 0x10000
  ------------------
 5646|  3.59M|    int32_t i;
 5647|  3.59M|    int32_t maxslot = def->arity + vargs;
 5648|  3.59M|    int32_t sc = def->slotcount;
 5649|       |
 5650|  3.59M|    if (def->environments_length > 256) return 15;
  ------------------
  |  Branch (5650:9): [True: 0, False: 3.59M]
  ------------------
 5651|  3.59M|    if (def->bytecode_length == 0) return 1;
  ------------------
  |  Branch (5651:9): [True: 0, False: 3.59M]
  ------------------
 5652|       |
 5653|  3.59M|    if (maxslot > sc) return 2;
  ------------------
  |  Branch (5653:9): [True: 0, False: 3.59M]
  ------------------
 5654|       |
 5655|       |    /* Verify each instruction */
 5656|   102M|    for (i = 0; i < def->bytecode_length; i++) {
  ------------------
  |  Branch (5656:17): [True: 99.2M, False: 3.59M]
  ------------------
 5657|  99.2M|        uint32_t instr = def->bytecode[i];
 5658|       |        /* Check for invalid instructions */
 5659|  99.2M|        if ((instr & 0x7F) >= JOP_INSTRUCTION_COUNT) {
  ------------------
  |  Branch (5659:13): [True: 0, False: 99.2M]
  ------------------
 5660|      0|            return 3;
 5661|      0|        }
 5662|  99.2M|        enum JanetInstructionType type = janet_instructions[instr & 0x7F];
 5663|  99.2M|        switch (type) {
  ------------------
  |  Branch (5663:17): [True: 99.2M, False: 0]
  ------------------
 5664|   517k|            case JINT_0:
  ------------------
  |  Branch (5664:13): [True: 517k, False: 98.7M]
  ------------------
 5665|   517k|                continue;
 5666|  19.0M|            case JINT_S: {
  ------------------
  |  Branch (5666:13): [True: 19.0M, False: 80.1M]
  ------------------
 5667|  19.0M|                if ((int32_t)(instr >> 8) >= sc) return 4;
  ------------------
  |  Branch (5667:21): [True: 0, False: 19.0M]
  ------------------
 5668|  19.0M|                continue;
 5669|  19.0M|            }
 5670|  19.0M|            case JINT_SI:
  ------------------
  |  Branch (5670:13): [True: 2.27M, False: 96.9M]
  ------------------
 5671|  2.27M|            case JINT_SU:
  ------------------
  |  Branch (5671:13): [True: 0, False: 99.2M]
  ------------------
 5672|  2.27M|            case JINT_ST: {
  ------------------
  |  Branch (5672:13): [True: 0, False: 99.2M]
  ------------------
 5673|  2.27M|                if ((int32_t)((instr >> 8) & 0xFF) >= sc) return 4;
  ------------------
  |  Branch (5673:21): [True: 0, False: 2.27M]
  ------------------
 5674|  2.27M|                continue;
 5675|  2.27M|            }
 5676|  4.18M|            case JINT_L: {
  ------------------
  |  Branch (5676:13): [True: 4.18M, False: 95.0M]
  ------------------
 5677|  4.18M|                int32_t jumpdest = i + (((int32_t)instr) >> 8);
 5678|  4.18M|                if (jumpdest < 0 || jumpdest >= def->bytecode_length) return 5;
  ------------------
  |  Branch (5678:21): [True: 0, False: 4.18M]
  |  Branch (5678:37): [True: 0, False: 4.18M]
  ------------------
 5679|  4.18M|                continue;
 5680|  4.18M|            }
 5681|  26.5M|            case JINT_SS: {
  ------------------
  |  Branch (5681:13): [True: 26.5M, False: 72.7M]
  ------------------
 5682|  26.5M|                if ((int32_t)((instr >> 8) & 0xFF) >= sc ||
  ------------------
  |  Branch (5682:21): [True: 0, False: 26.5M]
  ------------------
 5683|  26.5M|                        (int32_t)(instr >> 16) >= sc) return 4;
  ------------------
  |  Branch (5683:25): [True: 0, False: 26.5M]
  ------------------
 5684|  26.5M|                continue;
 5685|  26.5M|            }
 5686|  26.5M|            case JINT_SSI:
  ------------------
  |  Branch (5686:13): [True: 1.75M, False: 97.5M]
  ------------------
 5687|  2.79M|            case JINT_SSU: {
  ------------------
  |  Branch (5687:13): [True: 1.04M, False: 98.2M]
  ------------------
 5688|  2.79M|                if ((int32_t)((instr >> 8) & 0xFF) >= sc ||
  ------------------
  |  Branch (5688:21): [True: 0, False: 2.79M]
  ------------------
 5689|  2.79M|                        (int32_t)((instr >> 16) & 0xFF) >= sc) return 4;
  ------------------
  |  Branch (5689:25): [True: 0, False: 2.79M]
  ------------------
 5690|  2.79M|                continue;
 5691|  2.79M|            }
 5692|  7.25M|            case JINT_SL: {
  ------------------
  |  Branch (5692:13): [True: 7.25M, False: 92.0M]
  ------------------
 5693|  7.25M|                int32_t jumpdest = i + (((int32_t)instr) >> 16);
 5694|  7.25M|                if ((int32_t)((instr >> 8) & 0xFF) >= sc) return 4;
  ------------------
  |  Branch (5694:21): [True: 0, False: 7.25M]
  ------------------
 5695|  7.25M|                if (jumpdest < 0 || jumpdest >= def->bytecode_length) return 5;
  ------------------
  |  Branch (5695:21): [True: 0, False: 7.25M]
  |  Branch (5695:37): [True: 0, False: 7.25M]
  ------------------
 5696|  7.25M|                continue;
 5697|  7.25M|            }
 5698|  13.3M|            case JINT_SSS: {
  ------------------
  |  Branch (5698:13): [True: 13.3M, False: 85.9M]
  ------------------
 5699|  13.3M|                if (((int32_t)(instr >> 8) & 0xFF) >= sc ||
  ------------------
  |  Branch (5699:21): [True: 0, False: 13.3M]
  ------------------
 5700|  13.3M|                        ((int32_t)(instr >> 16) & 0xFF) >= sc ||
  ------------------
  |  Branch (5700:25): [True: 0, False: 13.3M]
  ------------------
 5701|  13.3M|                        ((int32_t)(instr >> 24) & 0xFF) >= sc) return 4;
  ------------------
  |  Branch (5701:25): [True: 0, False: 13.3M]
  ------------------
 5702|  13.3M|                continue;
 5703|  13.3M|            }
 5704|  13.3M|            case JINT_SD: {
  ------------------
  |  Branch (5704:13): [True: 1.04M, False: 98.2M]
  ------------------
 5705|  1.04M|                if ((int32_t)((instr >> 8) & 0xFF) >= sc) return 4;
  ------------------
  |  Branch (5705:21): [True: 0, False: 1.04M]
  ------------------
 5706|  1.04M|                if ((int32_t)(instr >> 16) >= def->defs_length) return 6;
  ------------------
  |  Branch (5706:21): [True: 0, False: 1.04M]
  ------------------
 5707|  1.04M|                continue;
 5708|  1.04M|            }
 5709|  18.1M|            case JINT_SC: {
  ------------------
  |  Branch (5709:13): [True: 18.1M, False: 81.1M]
  ------------------
 5710|  18.1M|                if ((int32_t)((instr >> 8) & 0xFF) >= sc) return 4;
  ------------------
  |  Branch (5710:21): [True: 0, False: 18.1M]
  ------------------
 5711|  18.1M|                if ((int32_t)(instr >> 16) >= def->constants_length) return 7;
  ------------------
  |  Branch (5711:21): [True: 0, False: 18.1M]
  ------------------
 5712|  18.1M|                continue;
 5713|  18.1M|            }
 5714|  18.1M|            case JINT_SES: {
  ------------------
  |  Branch (5714:13): [True: 4.09M, False: 95.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.09M|                if ((int32_t)((instr >> 8) & 0xFF) >= sc) return 4;
  ------------------
  |  Branch (5718:21): [True: 0, False: 4.09M]
  ------------------
 5719|  4.09M|                if ((int32_t)((instr >> 16) & 0xFF) >= def->environments_length) return 8;
  ------------------
  |  Branch (5719:21): [True: 0, False: 4.09M]
  ------------------
 5720|  4.09M|                continue;
 5721|  4.09M|            }
 5722|  99.2M|        }
 5723|  99.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.59M|    {
 5730|  3.59M|        uint32_t lastop = def->bytecode[def->bytecode_length - 1] & 0xFF;
 5731|  3.59M|        switch (lastop) {
 5732|      0|            default:
  ------------------
  |  Branch (5732:13): [True: 0, False: 3.59M]
  ------------------
 5733|      0|                return 9;
 5734|  2.11M|            case JOP_RETURN:
  ------------------
  |  Branch (5734:13): [True: 2.11M, False: 1.47M]
  ------------------
 5735|  2.39M|            case JOP_RETURN_NIL:
  ------------------
  |  Branch (5735:13): [True: 275k, False: 3.31M]
  ------------------
 5736|  2.39M|            case JOP_JUMP:
  ------------------
  |  Branch (5736:13): [True: 6.71k, False: 3.58M]
  ------------------
 5737|  2.44M|            case JOP_ERROR:
  ------------------
  |  Branch (5737:13): [True: 47.0k, False: 3.54M]
  ------------------
 5738|  3.59M|            case JOP_TAILCALL:
  ------------------
  |  Branch (5738:13): [True: 1.14M, False: 2.44M]
  ------------------
 5739|  3.59M|                break;
 5740|  3.59M|        }
 5741|  3.59M|    }
 5742|       |
 5743|       |    /* Verify debug info - slotmapping, etc. */
 5744|  37.7M|    for (int32_t i = def->symbolmap_length - 1; i >= 0; i--) {
  ------------------
  |  Branch (5744:49): [True: 34.1M, False: 3.59M]
  ------------------
 5745|  34.1M|        JanetSymbolMap jsm = def->symbolmap[i];
 5746|  34.1M|        if (jsm.birth_pc == UINT32_MAX) {
  ------------------
  |  Branch (5746:13): [True: 17.6M, False: 16.5M]
  ------------------
 5747|  17.6M|            if (jsm.death_pc >= (uint32_t) def->environments_length) {
  ------------------
  |  Branch (5747:17): [True: 0, False: 17.6M]
  ------------------
 5748|      0|                return 10;
 5749|       |                /* We should also check jsm.slot_index */
 5750|      0|            }
 5751|  17.6M|        } else {
 5752|  16.5M|            if (jsm.slot_index >= (uint32_t) def->slotcount) {
  ------------------
  |  Branch (5752:17): [True: 0, False: 16.5M]
  ------------------
 5753|      0|                return 11;
 5754|      0|            }
 5755|  16.5M|            if (jsm.birth_pc != UINT32_MAX && jsm.birth_pc >= (uint32_t) def->bytecode_length) {
  ------------------
  |  Branch (5755:17): [True: 16.5M, False: 0]
  |  Branch (5755:47): [True: 0, False: 16.5M]
  ------------------
 5756|      0|                return 12;
 5757|      0|            }
 5758|  16.5M|            if (jsm.death_pc != UINT32_MAX && jsm.death_pc > (uint32_t) def->bytecode_length) {
  ------------------
  |  Branch (5758:17): [True: 16.5M, False: 0]
  |  Branch (5758:47): [True: 0, False: 16.5M]
  ------------------
 5759|      0|                return 13;
 5760|      0|            }
 5761|  16.5M|        }
 5762|  34.1M|        if (jsm.symbol == NULL) {
  ------------------
  |  Branch (5762:13): [True: 0, False: 34.1M]
  ------------------
 5763|      0|            return 14;
 5764|      0|        }
 5765|  34.1M|    }
 5766|       |
 5767|  3.59M|    return 0;
 5768|  3.59M|}
janet_signalv:
 5878|  2.81k|void janet_signalv(JanetSignal sig, Janet message) {
 5879|  2.81k|    if (janet_vm.return_reg != NULL) {
  ------------------
  |  Branch (5879:9): [True: 2.81k, False: 0]
  ------------------
 5880|       |        /* Should match logic in janet_call for coercing everything not ok to an error (no awaits, yields, etc.) */
 5881|  2.81k|        if (janet_vm.coerce_error && sig != JANET_SIGNAL_OK) {
  ------------------
  |  Branch (5881:13): [True: 0, False: 2.81k]
  |  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.81k|        *janet_vm.return_reg = message;
 5893|  2.81k|        if (NULL != janet_vm.fiber) {
  ------------------
  |  Branch (5893:13): [True: 0, False: 2.81k]
  ------------------
 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.81k|        longjmp(*janet_vm.signal_buf, sig);
 5900|  2.81k|#endif
 5901|  2.81k|    } 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.81k|}
janet_panicv:
 5907|  2.81k|void janet_panicv(Janet message) {
 5908|  2.81k|    janet_signalv(JANET_SIGNAL_ERROR, message);
 5909|  2.81k|}
janet_panicf:
 5911|  2.80k|void janet_panicf(const char *format, ...) {
 5912|  2.80k|    va_list args;
 5913|  2.80k|    const uint8_t *ret;
 5914|  2.80k|    JanetBuffer buffer;
 5915|  2.80k|    int32_t len = 0;
 5916|  67.4k|    while (format[len]) len++;
  ------------------
  |  Branch (5916:12): [True: 64.6k, False: 2.80k]
  ------------------
 5917|  2.80k|    janet_buffer_init(&buffer, len);
 5918|  2.80k|    va_start(args, format);
 5919|  2.80k|    janet_formatbv(&buffer, format, args);
 5920|       |    va_end(args);
 5921|  2.80k|    ret = janet_string(buffer.data, buffer.count);
 5922|  2.80k|    janet_buffer_deinit(&buffer);
 5923|  2.80k|    janet_panics(ret);
 5924|  2.80k|}
janet_panics:
 5930|  2.80k|void janet_panics(const uint8_t *message) {
 5931|  2.80k|    janet_panicv(janet_wrap_string(message));
  ------------------
  |  |  848|  2.80k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|  2.80k|    janet_nanbox_from_cpointer((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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5932|  2.80k|}
janet_arity:
 5947|  4.66k|void janet_arity(int32_t arity, int32_t min, int32_t max) {
 5948|  4.66k|    if (min >= 0 && arity < min)
  ------------------
  |  Branch (5948:9): [True: 4.66k, False: 0]
  |  Branch (5948:21): [True: 0, False: 4.66k]
  ------------------
 5949|      0|        janet_panicf("arity mismatch, expected at least %d, got %d", min, arity);
 5950|  4.66k|    if (max >= 0 && arity > max)
  ------------------
  |  Branch (5950:9): [True: 0, False: 4.66k]
  |  Branch (5950:21): [True: 0, False: 0]
  ------------------
 5951|      0|        janet_panicf("arity mismatch, expected at most %d, got %d", max, arity);
 5952|  4.66k|}
janet_getbytes:
 6246|  1.86k|JanetByteView janet_getbytes(const Janet *argv, int32_t n) {
 6247|  1.86k|    Janet x = argv[n];
 6248|  1.86k|    JanetByteView view;
 6249|  1.86k|    if (!janet_bytes_view(x, &view.bytes, &view.len)) {
  ------------------
  |  Branch (6249:9): [True: 0, False: 1.86k]
  ------------------
 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.86k|    return view;
 6253|  1.86k|}
janet_dyn:
 6287|  4.25M|Janet janet_dyn(const char *name) {
 6288|  4.25M|    if (!janet_vm.fiber) {
  ------------------
  |  Branch (6288:9): [True: 4.25M, False: 0]
  ------------------
 6289|  4.25M|        if (!janet_vm.top_dyns) return janet_wrap_nil();
  ------------------
  |  |  831|  4.25M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  4.25M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  4.25M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  4.25M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (6289:13): [True: 4.25M, 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|  4.25M|    }
 6292|      0|    if (janet_vm.fiber->env) {
  ------------------
  |  Branch (6292:9): [True: 0, False: 0]
  ------------------
 6293|      0|        return janet_table_get_keyword(janet_vm.fiber->env, name);
 6294|      0|    } else {
 6295|      0|        return janet_wrap_nil();
  ------------------
  |  |  831|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6296|      0|    }
 6297|      0|}
janet_lib_compile:
 8256|  6.71k|void janet_lib_compile(JanetTable *env) {
 8257|  6.71k|    JanetRegExt cfuns[] = {
 8258|  6.71k|        JANET_CORE_REG("compile", cfun_compile),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 8259|  6.71k|        JANET_REG_END
  ------------------
  |  | 2110|  6.71k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
 8260|  6.71k|    };
 8261|       |    janet_core_cfuns_ext(env, NULL, cfuns);
 8262|  6.71k|}
janet_core_env:
 9667|  6.71k|JanetTable *janet_core_env(JanetTable *replacements) {
 9668|       |    /* Memoize core env, ignoring replacements the second time around. */
 9669|  6.71k|    if (NULL != janet_vm.core_env) {
  ------------------
  |  Branch (9669:9): [True: 0, False: 6.71k]
  ------------------
 9670|      0|        return janet_vm.core_env;
 9671|      0|    }
 9672|       |
 9673|  6.71k|    JanetTable *dict = janet_core_lookup_table(replacements);
 9674|       |
 9675|       |    /* Unmarshal bytecode */
 9676|  6.71k|    Janet marsh_out = janet_unmarshal(
 9677|  6.71k|                          janet_core_image,
 9678|  6.71k|                          janet_core_image_size,
 9679|  6.71k|                          0,
 9680|  6.71k|                          dict,
 9681|  6.71k|                          NULL);
 9682|       |
 9683|       |    /* Memoize */
 9684|  6.71k|    janet_gcroot(marsh_out);
 9685|  6.71k|    JanetTable *env = janet_unwrap_table(marsh_out);
  ------------------
  |  |  861|  6.71k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
 9686|  6.71k|    janet_vm.core_env = env;
 9687|       |
 9688|       |    /* Invert image dict manually here. We can't do this in boot.janet as it
 9689|       |     * breaks deterministic builds */
 9690|  6.71k|    Janet lidv, midv;
 9691|  6.71k|    lidv = midv = janet_wrap_nil();
  ------------------
  |  |  831|  6.71k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  6.71k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  6.71k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  6.71k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 9692|  6.71k|    janet_resolve(env, janet_csymbol("load-image-dict"), &lidv);
 9693|  6.71k|    janet_resolve(env, janet_csymbol("make-image-dict"), &midv);
 9694|       |
 9695|       |    /* Check that we actually got tables - if we are using a smaller corelib, may not exist */
 9696|  6.71k|    if (janet_checktype(lidv, JANET_TABLE) && janet_checktype(midv, JANET_TABLE)) {
  ------------------
  |  |  806|  13.4k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 6.71k, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 6.71k]
  |  |  ------------------
  |  |  807|  13.4k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  13.4k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  6.71k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  6.71k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  6.71k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  6.71k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  if (janet_checktype(lidv, JANET_TABLE) && janet_checktype(midv, JANET_TABLE)) {
  ------------------
  |  |  806|  6.71k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 6.71k, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 6.71k]
  |  |  ------------------
  |  |  807|  6.71k|        ? 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.71k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  6.71k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  6.71k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  6.71k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  6.71k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 9697|  6.71k|        JanetTable *lid = janet_unwrap_table(lidv);
  ------------------
  |  |  861|  6.71k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
 9698|  6.71k|        JanetTable *mid = janet_unwrap_table(midv);
  ------------------
  |  |  861|  6.71k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
 9699|  13.7M|        for (int32_t i = 0; i < lid->capacity; i++) {
  ------------------
  |  Branch (9699:29): [True: 13.7M, False: 6.71k]
  ------------------
 9700|  13.7M|            const JanetKV *kv = lid->data + i;
 9701|  13.7M|            if (!janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|  13.7M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 13.7M]
  |  |  ------------------
  |  |  807|  13.7M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  13.7M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  13.7M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  13.7M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  13.7M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  13.7M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (9701:17): [True: 4.42M, False: 9.32M]
  ------------------
 9702|  4.42M|                janet_table_put(mid, kv->value, kv->key);
 9703|  4.42M|            }
 9704|  13.7M|        }
 9705|  6.71k|    }
 9706|       |
 9707|  6.71k|    return env;
 9708|  6.71k|}
janet_core_lookup_table:
 9712|  6.71k|JanetTable *janet_core_lookup_table(JanetTable *replacements) {
 9713|  6.71k|    JanetTable *dict = janet_table(512);
 9714|  6.71k|    janet_load_libs(dict);
 9715|       |
 9716|       |    /* Add replacements */
 9717|  6.71k|    if (replacements != NULL) {
  ------------------
  |  Branch (9717:9): [True: 0, False: 6.71k]
  ------------------
 9718|      0|        for (int32_t i = 0; i < replacements->capacity; i++) {
  ------------------
  |  Branch (9718:29): [True: 0, False: 0]
  ------------------
 9719|      0|            JanetKV kv = replacements->data[i];
 9720|      0|            if (!janet_checktype(kv.key, JANET_NIL)) {
  ------------------
  |  |  806|      0|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 0]
  |  |  ------------------
  |  |  807|      0|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (9720:17): [True: 0, False: 0]
  ------------------
 9721|      0|                janet_table_put(dict, kv.key, kv.value);
 9722|       |                /* Add replacement functions to registry? */
 9723|      0|            }
 9724|      0|        }
 9725|      0|    }
 9726|       |
 9727|  6.71k|    return dict;
 9728|  6.71k|}
janet_lib_debug:
10180|  6.71k|void janet_lib_debug(JanetTable *env) {
10181|  6.71k|    JanetRegExt debug_cfuns[] = {
10182|  6.71k|        JANET_CORE_REG("debug/break", cfun_debug_break),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
10183|  6.71k|        JANET_CORE_REG("debug/unbreak", cfun_debug_unbreak),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
10184|  6.71k|        JANET_CORE_REG("debug/fbreak", cfun_debug_fbreak),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
10185|  6.71k|        JANET_CORE_REG("debug/unfbreak", cfun_debug_unfbreak),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
10186|  6.71k|        JANET_CORE_REG("debug/arg-stack", cfun_debug_argstack),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
10187|  6.71k|        JANET_CORE_REG("debug/stack", cfun_debug_stack),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
10188|  6.71k|        JANET_CORE_REG("debug/stacktrace", cfun_debug_stacktrace),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
10189|  6.71k|        JANET_CORE_REG("debug/lineage", cfun_debug_lineage),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
10190|  6.71k|        JANET_CORE_REG("debug/step", cfun_debug_step),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
10191|  6.71k|        JANET_REG_END
  ------------------
  |  | 2110|  6.71k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
10192|  6.71k|    };
10193|       |    janet_core_cfuns_ext(env, NULL, debug_cfuns);
10194|  6.71k|}
janet_ev_init_common:
11153|  6.71k|void janet_ev_init_common(void) {
11154|  6.71k|    janet_q_init(&janet_vm.spawn);
11155|  6.71k|    janet_vm.tq = NULL;
11156|  6.71k|    janet_vm.tq_count = 0;
11157|  6.71k|    janet_vm.tq_capacity = 0;
11158|  6.71k|    janet_table_init_raw(&janet_vm.threaded_abstracts, 0);
11159|  6.71k|    janet_table_init_raw(&janet_vm.active_tasks, 0);
11160|  6.71k|    janet_table_init_raw(&janet_vm.signal_handlers, 0);
11161|  6.71k|    janet_rng_seed(&janet_vm.ev_rng, 0);
11162|  6.71k|#ifndef JANET_WINDOWS
11163|  6.71k|    pthread_attr_init(&janet_vm.new_thread_attr);
11164|       |    pthread_attr_setdetachstate(&janet_vm.new_thread_attr, PTHREAD_CREATE_DETACHED);
11165|  6.71k|#endif
11166|  6.71k|}
janet_ev_deinit_common:
11199|  6.71k|void janet_ev_deinit_common(void) {
11200|  6.71k|    JanetTimeout to;
11201|  6.71k|    while (peek_timeout(&to)) {
  ------------------
  |  Branch (11201:12): [True: 0, False: 6.71k]
  ------------------
11202|      0|        handle_timeout_worker(to, 1);
11203|      0|        pop_timeout(0);
11204|      0|    }
11205|  6.71k|    janet_q_deinit(&janet_vm.spawn);
11206|  6.71k|    janet_free(janet_vm.tq);
  ------------------
  |  | 2415|  6.71k|#define janet_free(X) free((X))
  ------------------
11207|  6.71k|    janet_table_deinit(&janet_vm.threaded_abstracts);
11208|  6.71k|    janet_table_deinit(&janet_vm.active_tasks);
11209|  6.71k|    janet_table_deinit(&janet_vm.signal_handlers);
11210|  6.71k|#ifndef JANET_WINDOWS
11211|  6.71k|    pthread_attr_destroy(&janet_vm.new_thread_attr);
11212|  6.71k|#endif
11213|  6.71k|}
janet_ev_init:
12490|  6.71k|void janet_ev_init(void) {
12491|  6.71k|    janet_ev_init_common();
12492|  6.71k|    janet_ev_setup_selfpipe();
12493|  6.71k|    janet_vm.epoll = epoll_create1(EPOLL_CLOEXEC);
12494|  6.71k|    janet_vm.timerfd = timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC | TFD_NONBLOCK);
12495|  6.71k|    janet_vm.timer_enabled = 0;
12496|  6.71k|    if (janet_vm.epoll == -1 || janet_vm.timerfd == -1) goto error;
  ------------------
  |  Branch (12496:9): [True: 0, False: 6.71k]
  |  Branch (12496:33): [True: 0, False: 6.71k]
  ------------------
12497|  6.71k|    struct epoll_event ev;
12498|  6.71k|    ev.events = EPOLLIN | EPOLLET;
12499|  6.71k|    ev.data.ptr = &janet_vm.timerfd;
12500|  6.71k|    if (-1 == epoll_ctl(janet_vm.epoll, EPOLL_CTL_ADD, janet_vm.timerfd, &ev)) goto error;
  ------------------
  |  Branch (12500:9): [True: 0, False: 6.71k]
  ------------------
12501|  6.71k|    ev.events = EPOLLIN | EPOLLET;
12502|  6.71k|    ev.data.ptr = janet_vm.selfpipe;
12503|  6.71k|    if (-1 == epoll_ctl(janet_vm.epoll, EPOLL_CTL_ADD, janet_vm.selfpipe[0], &ev)) goto error;
  ------------------
  |  Branch (12503:9): [True: 0, False: 6.71k]
  ------------------
12504|  6.71k|    return;
12505|  6.71k|error:
12506|       |    JANET_EXIT("failed to initialize event loop");
  ------------------
  |  |  378|      0|#define JANET_EXIT(m) do { \
  |  |  379|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  380|      0|        __FILE__,\
  |  |  381|      0|        __LINE__,\
  |  |  382|      0|        (m));\
  |  |  383|      0|    abort();\
  |  |  384|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (384:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
12507|      0|}
janet_ev_deinit:
12509|  6.71k|void janet_ev_deinit(void) {
12510|  6.71k|    janet_ev_deinit_common();
12511|  6.71k|    close(janet_vm.epoll);
12512|  6.71k|    close(janet_vm.timerfd);
12513|  6.71k|    janet_ev_cleanup_selfpipe();
12514|  6.71k|    janet_vm.epoll = 0;
12515|  6.71k|}
janet_make_pipe:
13612|  6.71k|int janet_make_pipe(JanetHandle handles[2], int mode) {
13613|       |#ifdef JANET_WINDOWS
13614|       |    /*
13615|       |     * On windows, the built in CreatePipe function doesn't support overlapped IO
13616|       |     * so we lift from the windows source code and modify for our own version.
13617|       |     */
13618|       |    JanetHandle shandle, chandle;
13619|       |    CHAR PipeNameBuffer[MAX_PATH];
13620|       |    SECURITY_ATTRIBUTES saAttr;
13621|       |    memset(&saAttr, 0, sizeof(saAttr));
13622|       |    saAttr.nLength = sizeof(saAttr);
13623|       |    saAttr.bInheritHandle = TRUE;
13624|       |    if (mode == 3) {
13625|       |        /* No overlapped IO involved, just call CreatePipe */
13626|       |        if (!CreatePipe(handles, handles + 1, &saAttr, 0)) return -1;
13627|       |        return 0;
13628|       |    }
13629|       |    snprintf(PipeNameBuffer,
13630|       |             sizeof(PipeNameBuffer),
13631|       |             "\\\\.\\Pipe\\JanetPipeFile.%08x.%08x",
13632|       |             (unsigned int) GetCurrentProcessId(),
13633|       |             (unsigned int) InterlockedIncrement(&PipeSerialNumber));
13634|       |
13635|       |    /* server handle goes to subprocess */
13636|       |    shandle = CreateNamedPipeA(
13637|       |                  PipeNameBuffer,
13638|       |                  (mode == 2 ? PIPE_ACCESS_INBOUND : PIPE_ACCESS_OUTBOUND) | FILE_FLAG_OVERLAPPED,
13639|       |                  PIPE_TYPE_BYTE | PIPE_WAIT,
13640|       |                  255,           /* Max number of pipes for duplication. */
13641|       |                  4096,          /* Out buffer size */
13642|       |                  4096,          /* In buffer size */
13643|       |                  120 * 1000,    /* Timeout in ms */
13644|       |                  &saAttr);
13645|       |    if (shandle == INVALID_HANDLE_VALUE) {
13646|       |        return -1;
13647|       |    }
13648|       |
13649|       |    /* we keep client handle */
13650|       |    chandle = CreateFileA(
13651|       |                  PipeNameBuffer,
13652|       |                  (mode == 2 ? GENERIC_WRITE : GENERIC_READ),
13653|       |                  0,
13654|       |                  &saAttr,
13655|       |                  OPEN_EXISTING,
13656|       |                  FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED,
13657|       |                  NULL);
13658|       |
13659|       |    if (chandle == INVALID_HANDLE_VALUE) {
13660|       |        CloseHandle(shandle);
13661|       |        return -1;
13662|       |    }
13663|       |    if (mode == 2) {
13664|       |        handles[0] = shandle;
13665|       |        handles[1] = chandle;
13666|       |    } else {
13667|       |        handles[0] = chandle;
13668|       |        handles[1] = shandle;
13669|       |    }
13670|       |    return 0;
13671|       |#else
13672|  6.71k|    if (pipe(handles)) return -1;
  ------------------
  |  Branch (13672:9): [True: 0, False: 6.71k]
  ------------------
13673|  6.71k|    if (mode != 2 && fcntl(handles[0], F_SETFD, FD_CLOEXEC)) goto error;
  ------------------
  |  Branch (13673:9): [True: 6.71k, False: 0]
  |  Branch (13673:22): [True: 0, False: 6.71k]
  ------------------
13674|  6.71k|    if (mode != 1 && fcntl(handles[1], F_SETFD, FD_CLOEXEC)) goto error;
  ------------------
  |  Branch (13674:9): [True: 0, False: 6.71k]
  |  Branch (13674:22): [True: 0, False: 0]
  ------------------
13675|  6.71k|    if (mode != 2 && mode != 3 && fcntl(handles[0], F_SETFL, O_NONBLOCK)) goto error;
  ------------------
  |  Branch (13675:9): [True: 6.71k, False: 0]
  |  Branch (13675:22): [True: 6.71k, False: 0]
  |  Branch (13675:35): [True: 0, False: 6.71k]
  ------------------
13676|  6.71k|    if (mode != 1 && mode != 3 && fcntl(handles[1], F_SETFL, O_NONBLOCK)) goto error;
  ------------------
  |  Branch (13676:9): [True: 0, False: 6.71k]
  |  Branch (13676:22): [True: 0, False: 0]
  |  Branch (13676:35): [True: 0, False: 0]
  ------------------
13677|  6.71k|    return 0;
13678|      0|error:
13679|      0|    close(handles[0]);
13680|      0|    close(handles[1]);
13681|      0|    return -1;
13682|  6.71k|#endif
13683|  6.71k|}
janet_lib_ev:
14268|  6.71k|void janet_lib_ev(JanetTable *env) {
14269|  6.71k|    JanetRegExt ev_cfuns_ext[] = {
14270|  6.71k|        JANET_CORE_REG("ev/give", cfun_channel_push),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14271|  6.71k|        JANET_CORE_REG("ev/take", cfun_channel_pop),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14272|  6.71k|        JANET_CORE_REG("ev/full", cfun_channel_full),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14273|  6.71k|        JANET_CORE_REG("ev/capacity", cfun_channel_capacity),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14274|  6.71k|        JANET_CORE_REG("ev/count", cfun_channel_count),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14275|  6.71k|        JANET_CORE_REG("ev/select", cfun_channel_choice),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14276|  6.71k|        JANET_CORE_REG("ev/rselect", cfun_channel_rchoice),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14277|  6.71k|        JANET_CORE_REG("ev/chan", cfun_channel_new),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14278|  6.71k|        JANET_CORE_REG("ev/thread-chan", cfun_channel_new_threaded),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14279|  6.71k|        JANET_CORE_REG("ev/chan-close", cfun_channel_close),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14280|  6.71k|        JANET_CORE_REG("ev/go", cfun_ev_go),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14281|  6.71k|        JANET_CORE_REG("ev/thread", cfun_ev_thread),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14282|  6.71k|        JANET_CORE_REG("ev/give-supervisor", cfun_ev_give_supervisor),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14283|  6.71k|        JANET_CORE_REG("ev/sleep", cfun_ev_sleep),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14284|  6.71k|        JANET_CORE_REG("ev/deadline", cfun_ev_deadline),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14285|  6.71k|        JANET_CORE_REG("ev/cancel", cfun_ev_cancel),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14286|  6.71k|        JANET_CORE_REG("ev/close", janet_cfun_stream_close),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14287|  6.71k|        JANET_CORE_REG("ev/read", janet_cfun_stream_read),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14288|  6.71k|        JANET_CORE_REG("ev/chunk", janet_cfun_stream_chunk),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14289|  6.71k|        JANET_CORE_REG("ev/write", janet_cfun_stream_write),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14290|  6.71k|        JANET_CORE_REG("ev/lock", janet_cfun_mutex),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14291|  6.71k|        JANET_CORE_REG("ev/acquire-lock", janet_cfun_mutex_acquire),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14292|  6.71k|        JANET_CORE_REG("ev/release-lock", janet_cfun_mutex_release),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14293|  6.71k|        JANET_CORE_REG("ev/rwlock", janet_cfun_rwlock),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14294|  6.71k|        JANET_CORE_REG("ev/acquire-rlock", janet_cfun_rwlock_read_lock),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14295|  6.71k|        JANET_CORE_REG("ev/acquire-wlock", janet_cfun_rwlock_write_lock),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14296|  6.71k|        JANET_CORE_REG("ev/release-rlock", janet_cfun_rwlock_read_release),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14297|  6.71k|        JANET_CORE_REG("ev/release-wlock", janet_cfun_rwlock_write_release),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14298|  6.71k|        JANET_CORE_REG("ev/to-file", janet_cfun_to_file),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14299|  6.71k|        JANET_CORE_REG("ev/all-tasks", janet_cfun_ev_all_tasks),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14300|  6.71k|        JANET_REG_END
  ------------------
  |  | 2110|  6.71k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
14301|  6.71k|    };
14302|       |
14303|       |    janet_core_cfuns_ext(env, NULL, ev_cfuns_ext);
14304|  6.71k|    janet_register_abstract_type(&janet_stream_type);
14305|  6.71k|    janet_register_abstract_type(&janet_channel_type);
14306|  6.71k|    janet_register_abstract_type(&janet_mutex_type);
14307|  6.71k|    janet_register_abstract_type(&janet_rwlock_type);
14308|  6.71k|}
janet_lib_ffi:
16241|  6.71k|void janet_lib_ffi(JanetTable *env) {
16242|  6.71k|    JanetRegExt ffi_cfuns[] = {
16243|  6.71k|        JANET_CORE_REG("ffi/native", janet_core_raw_native),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16244|  6.71k|        JANET_CORE_REG("ffi/lookup", janet_core_native_lookup),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16245|  6.71k|        JANET_CORE_REG("ffi/close", janet_core_native_close),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16246|  6.71k|        JANET_CORE_REG("ffi/signature", cfun_ffi_signature),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16247|  6.71k|        JANET_CORE_REG("ffi/call", cfun_ffi_call),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16248|  6.71k|        JANET_CORE_REG("ffi/struct", cfun_ffi_struct),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16249|  6.71k|        JANET_CORE_REG("ffi/write", cfun_ffi_buffer_write),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16250|  6.71k|        JANET_CORE_REG("ffi/read", cfun_ffi_buffer_read),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16251|  6.71k|        JANET_CORE_REG("ffi/size", cfun_ffi_size),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16252|  6.71k|        JANET_CORE_REG("ffi/align", cfun_ffi_align),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16253|  6.71k|        JANET_CORE_REG("ffi/trampoline", cfun_ffi_get_callback_trampoline),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16254|  6.71k|        JANET_CORE_REG("ffi/jitfn", cfun_ffi_jitfn),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16255|  6.71k|        JANET_CORE_REG("ffi/malloc", cfun_ffi_malloc),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16256|  6.71k|        JANET_CORE_REG("ffi/free", cfun_ffi_free),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16257|  6.71k|        JANET_CORE_REG("ffi/pointer-buffer", cfun_ffi_pointer_buffer),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16258|  6.71k|        JANET_CORE_REG("ffi/pointer-cfunction", cfun_ffi_pointer_cfunction),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16259|  6.71k|        JANET_CORE_REG("ffi/calling-conventions", cfun_ffi_supported_calling_conventions),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16260|  6.71k|        JANET_REG_END
  ------------------
  |  | 2110|  6.71k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
16261|  6.71k|    };
16262|       |    janet_core_cfuns_ext(env, NULL, ffi_cfuns);
16263|  6.71k|}
janet_lib_fiber:
16943|  6.71k|void janet_lib_fiber(JanetTable *env) {
16944|  6.71k|    JanetRegExt fiber_cfuns[] = {
16945|  6.71k|        JANET_CORE_REG("fiber/new", cfun_fiber_new),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16946|  6.71k|        JANET_CORE_REG("fiber/status", cfun_fiber_status),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16947|  6.71k|        JANET_CORE_REG("fiber/root", cfun_fiber_root),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16948|  6.71k|        JANET_CORE_REG("fiber/current", cfun_fiber_current),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16949|  6.71k|        JANET_CORE_REG("fiber/maxstack", cfun_fiber_maxstack),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16950|  6.71k|        JANET_CORE_REG("fiber/setmaxstack", cfun_fiber_setmaxstack),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16951|  6.71k|        JANET_CORE_REG("fiber/getenv", cfun_fiber_getenv),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16952|  6.71k|        JANET_CORE_REG("fiber/setenv", cfun_fiber_setenv),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16953|  6.71k|        JANET_CORE_REG("fiber/can-resume?", cfun_fiber_can_resume),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16954|  6.71k|        JANET_CORE_REG("fiber/last-value", cfun_fiber_last_value),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16955|  6.71k|        JANET_REG_END
  ------------------
  |  | 2110|  6.71k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
16956|  6.71k|    };
16957|       |    janet_core_cfuns_ext(env, NULL, fiber_cfuns);
16958|  6.71k|}
janet_lib_filewatch:
17953|  6.71k|void janet_lib_filewatch(JanetTable *env) {
17954|  6.71k|    JanetRegExt cfuns[] = {
17955|  6.71k|        JANET_CORE_REG("filewatch/new", cfun_filewatch_make),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
17956|  6.71k|        JANET_CORE_REG("filewatch/add", cfun_filewatch_add),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
17957|  6.71k|        JANET_CORE_REG("filewatch/remove", cfun_filewatch_remove),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
17958|  6.71k|        JANET_CORE_REG("filewatch/listen", cfun_filewatch_listen),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
17959|  6.71k|        JANET_CORE_REG("filewatch/unlisten", cfun_filewatch_unlisten),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
17960|  6.71k|        JANET_REG_END
  ------------------
  |  | 2110|  6.71k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
17961|  6.71k|    };
17962|       |    janet_core_cfuns_ext(env, NULL, cfuns);
17963|  6.71k|}
janet_gcpressure:
18023|  7.78M|void janet_gcpressure(size_t s) {
18024|  7.78M|    janet_vm.next_collection += s;
18025|  7.78M|}
janet_gcalloc:
18497|  41.8M|void *janet_gcalloc(enum JanetMemoryType type, size_t size) {
18498|  41.8M|    JanetGCObject *mem;
18499|       |
18500|       |    /* Make sure everything is inited */
18501|  41.8M|    janet_assert(NULL != janet_vm.cache, "please initialize janet before use");
  ------------------
  |  |  389|  41.8M|#define janet_assert(c, m) do { \
  |  |  390|  41.8M|    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: 41.8M]
  |  |  ------------------
  |  |  391|  41.8M|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 41.8M]
  |  |  ------------------
  ------------------
18502|  41.8M|    mem = janet_malloc(size);
  ------------------
  |  | 2406|  41.8M|#define janet_malloc(X) malloc((X))
  ------------------
18503|       |
18504|       |    /* Check for bad malloc */
18505|  41.8M|    if (NULL == mem) {
  ------------------
  |  Branch (18505:9): [True: 0, False: 41.8M]
  ------------------
18506|      0|        JANET_OUT_OF_MEMORY;
  ------------------
  |  |  419|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (419:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
18507|      0|    }
18508|       |
18509|       |    /* Configure block */
18510|  41.8M|    mem->flags = type;
18511|       |
18512|       |    /* Prepend block to heap list */
18513|  41.8M|    janet_vm.next_collection += size;
18514|  41.8M|    if (type < JANET_MEMORY_TABLE_WEAKK) {
  ------------------
  |  Branch (18514:9): [True: 41.8M, False: 0]
  ------------------
18515|       |        /* normal heap */
18516|  41.8M|        mem->data.next = janet_vm.blocks;
18517|  41.8M|        janet_vm.blocks = mem;
18518|  41.8M|    } else {
18519|       |        /* weak heap */
18520|      0|        mem->data.next = janet_vm.weak_blocks;
18521|      0|        janet_vm.weak_blocks = mem;
18522|      0|    }
18523|  41.8M|    janet_vm.block_count++;
18524|       |
18525|  41.8M|    return (void *)mem;
18526|  41.8M|}
janet_gcroot:
18587|  13.4k|void janet_gcroot(Janet root) {
18588|  13.4k|    size_t newcount = janet_vm.root_count + 1;
18589|  13.4k|    if (newcount > janet_vm.root_capacity) {
  ------------------
  |  Branch (18589:9): [True: 6.71k, False: 6.71k]
  ------------------
18590|  6.71k|        size_t newcap = 2 * newcount;
18591|  6.71k|        janet_vm.roots = janet_realloc(janet_vm.roots, sizeof(Janet) * newcap);
  ------------------
  |  | 2409|  6.71k|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
18592|  6.71k|        if (NULL == janet_vm.roots) {
  ------------------
  |  Branch (18592:13): [True: 0, False: 6.71k]
  ------------------
18593|      0|            JANET_OUT_OF_MEMORY;
  ------------------
  |  |  419|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (419:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
18594|      0|        }
18595|  6.71k|        janet_vm.root_capacity = newcap;
18596|  6.71k|    }
18597|  13.4k|    janet_vm.roots[janet_vm.root_count] = root;
18598|  13.4k|    janet_vm.root_count = newcount;
18599|  13.4k|}
janet_clear_memory:
18645|  6.71k|void janet_clear_memory(void) {
18646|  6.71k|#ifdef JANET_EV
18647|  6.71k|    JanetKV *items = janet_vm.threaded_abstracts.data;
18648|  13.4k|    for (int32_t i = 0; i < janet_vm.threaded_abstracts.capacity; i++) {
  ------------------
  |  Branch (18648:25): [True: 6.71k, False: 6.71k]
  ------------------
18649|  6.71k|        if (janet_checktype(items[i].key, JANET_ABSTRACT)) {
  ------------------
  |  |  806|  6.71k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 6.71k]
  |  |  |  Branch (806:6): [Folded, False: 6.71k]
  |  |  ------------------
  |  |  807|  6.71k|        ? 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.71k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  6.71k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  6.71k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  6.71k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  6.71k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18650|      0|            void *abst = janet_unwrap_abstract(items[i].key);
  ------------------
  |  |  866|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
18651|      0|            JanetAbstractHead *head = janet_abstract_head(abst);
  ------------------
  |  | 1897|      0|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  ------------------
18652|      0|            if (head->type->gcperthread) {
  ------------------
  |  Branch (18652:17): [True: 0, False: 0]
  ------------------
18653|      0|                janet_assert(!head->type->gcperthread(head->data, head->size), "per-thread finalizer failed");
  ------------------
  |  |  389|      0|#define janet_assert(c, m) do { \
  |  |  390|      0|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  378|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  379|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  380|      0|        __FILE__,\
  |  |  |  |  381|      0|        __LINE__,\
  |  |  |  |  382|      0|        (m));\
  |  |  |  |  383|      0|    abort();\
  |  |  |  |  384|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (384:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (390:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  391|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
18654|      0|            }
18655|      0|            janet_abstract_decref_maybe_free(abst);
18656|      0|        }
18657|  6.71k|    }
18658|  6.71k|#endif
18659|  6.71k|    JanetGCObject *current = janet_vm.blocks;
18660|  41.8M|    while (NULL != current) {
  ------------------
  |  Branch (18660:12): [True: 41.8M, False: 6.71k]
  ------------------
18661|  41.8M|        janet_deinit_block(current);
18662|  41.8M|        JanetGCObject *next = current->data.next;
18663|  41.8M|        janet_free(current);
  ------------------
  |  | 2415|  41.8M|#define janet_free(X) free((X))
  ------------------
18664|  41.8M|        current = next;
18665|  41.8M|    }
18666|  6.71k|    janet_vm.blocks = NULL;
18667|  6.71k|    janet_free_all_scratch();
18668|  6.71k|    janet_free(janet_vm.scratch_mem);
  ------------------
  |  | 2415|  6.71k|#define janet_free(X) free((X))
  ------------------
18669|  6.71k|}
janet_smalloc:
18683|  5.08M|void *janet_smalloc(size_t size) {
18684|  5.08M|    JanetScratch *s = janet_malloc(sizeof(JanetScratch) + size);
  ------------------
  |  | 2406|  5.08M|#define janet_malloc(X) malloc((X))
  ------------------
18685|  5.08M|    if (NULL == s) {
  ------------------
  |  Branch (18685:9): [True: 0, False: 5.08M]
  ------------------
18686|      0|        JANET_OUT_OF_MEMORY;
  ------------------
  |  |  419|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (419:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
18687|      0|    }
18688|  5.08M|    s->finalize = NULL;
18689|  5.08M|    if (janet_vm.scratch_len == janet_vm.scratch_cap) {
  ------------------
  |  Branch (18689:9): [True: 13.9k, False: 5.06M]
  ------------------
18690|  13.9k|        size_t newcap = 2 * janet_vm.scratch_cap + 2;
18691|  13.9k|        JanetScratch **newmem = (JanetScratch **) janet_realloc(janet_vm.scratch_mem, newcap * sizeof(JanetScratch));
  ------------------
  |  | 2409|  13.9k|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
18692|  13.9k|        if (NULL == newmem) {
  ------------------
  |  Branch (18692:13): [True: 0, False: 13.9k]
  ------------------
18693|      0|            JANET_OUT_OF_MEMORY;
  ------------------
  |  |  419|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (419:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
18694|      0|        }
18695|  13.9k|        janet_vm.scratch_cap = newcap;
18696|  13.9k|        janet_vm.scratch_mem = newmem;
18697|  13.9k|    }
18698|  5.08M|    janet_vm.scratch_mem[janet_vm.scratch_len++] = s;
18699|  5.08M|    return (char *)(s->mem);
18700|  5.08M|}
janet_srealloc:
18712|   350k|void *janet_srealloc(void *mem, size_t size) {
18713|   350k|    if (NULL == mem) return janet_smalloc(size);
  ------------------
  |  Branch (18713:9): [True: 149k, False: 201k]
  ------------------
18714|   201k|    JanetScratch *s = janet_mem2scratch(mem);
18715|   201k|    if (janet_vm.scratch_len) {
  ------------------
  |  Branch (18715:9): [True: 201k, False: 0]
  ------------------
18716|   329k|        for (size_t i = janet_vm.scratch_len - 1; ; i--) {
18717|   329k|            if (janet_vm.scratch_mem[i] == s) {
  ------------------
  |  Branch (18717:17): [True: 201k, False: 127k]
  ------------------
18718|   201k|                JanetScratch *news = janet_realloc(s, size + sizeof(JanetScratch));
  ------------------
  |  | 2409|   201k|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
18719|   201k|                if (NULL == news) {
  ------------------
  |  Branch (18719:21): [True: 0, False: 201k]
  ------------------
18720|      0|                    JANET_OUT_OF_MEMORY;
  ------------------
  |  |  419|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (419:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
18721|      0|                }
18722|   201k|                janet_vm.scratch_mem[i] = news;
18723|   201k|                return (char *)(news->mem);
18724|   201k|            }
18725|   127k|            if (i == 0) break;
  ------------------
  |  Branch (18725:17): [True: 0, False: 127k]
  ------------------
18726|   127k|        }
18727|   201k|    }
18728|      0|    JANET_EXIT("invalid janet_srealloc");
  ------------------
  |  |  378|      0|#define JANET_EXIT(m) do { \
  |  |  379|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  380|      0|        __FILE__,\
  |  |  381|      0|        __LINE__,\
  |  |  382|      0|        (m));\
  |  |  383|      0|    abort();\
  |  |  384|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (384:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
18729|      0|}
janet_sfree:
18736|  4.95M|void janet_sfree(void *mem) {
18737|  4.95M|    if (NULL == mem) return;
  ------------------
  |  Branch (18737:9): [True: 0, False: 4.95M]
  ------------------
18738|  4.95M|    JanetScratch *s = janet_mem2scratch(mem);
18739|  4.95M|    if (janet_vm.scratch_len) {
  ------------------
  |  Branch (18739:9): [True: 4.95M, False: 0]
  ------------------
18740|  6.30M|        for (size_t i = janet_vm.scratch_len - 1; ; i--) {
18741|  6.30M|            if (janet_vm.scratch_mem[i] == s) {
  ------------------
  |  Branch (18741:17): [True: 4.95M, False: 1.35M]
  ------------------
18742|  4.95M|                janet_vm.scratch_mem[i] = janet_vm.scratch_mem[--janet_vm.scratch_len];
18743|  4.95M|                free_one_scratch(s);
18744|  4.95M|                return;
18745|  4.95M|            }
18746|  1.35M|            if (i == 0) break;
  ------------------
  |  Branch (18746:17): [True: 0, False: 1.35M]
  ------------------
18747|  1.35M|        }
18748|  4.95M|    }
18749|      0|    JANET_EXIT("invalid janet_sfree");
  ------------------
  |  |  378|      0|#define JANET_EXIT(m) do { \
  |  |  379|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  380|      0|        __FILE__,\
  |  |  381|      0|        __LINE__,\
  |  |  382|      0|        (m));\
  |  |  383|      0|    abort();\
  |  |  384|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (384:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
18750|      0|}
janet_wrap_s64:
18935|  3.28k|Janet janet_wrap_s64(int64_t x) {
18936|  3.28k|    int64_t *box = janet_abstract(&janet_s64_type, sizeof(int64_t));
18937|  3.28k|    *box = (int64_t)x;
18938|  3.28k|    return janet_wrap_abstract(box);
  ------------------
  |  |  851|  3.28k|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|  3.28k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  3.28k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  3.28k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18939|  3.28k|}
janet_wrap_u64:
18941|  1.35k|Janet janet_wrap_u64(uint64_t x) {
18942|  1.35k|    uint64_t *box = janet_abstract(&janet_u64_type, sizeof(uint64_t));
18943|  1.35k|    *box = (uint64_t)x;
18944|  1.35k|    return janet_wrap_abstract(box);
  ------------------
  |  |  851|  1.35k|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|  1.35k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.35k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.35k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18945|  1.35k|}
janet_lib_inttypes:
19427|  6.71k|void janet_lib_inttypes(JanetTable *env) {
19428|  6.71k|    JanetRegExt it_cfuns[] = {
19429|  6.71k|        JANET_CORE_REG("int/s64", cfun_it_s64_new),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
19430|  6.71k|        JANET_CORE_REG("int/u64", cfun_it_u64_new),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
19431|  6.71k|        JANET_CORE_REG("int/to-number", cfun_to_number),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
19432|  6.71k|        JANET_CORE_REG("int/to-bytes", cfun_to_bytes),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
19433|  6.71k|        JANET_REG_END
  ------------------
  |  | 2110|  6.71k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
19434|  6.71k|    };
19435|       |    janet_core_cfuns_ext(env, NULL, it_cfuns);
19436|  6.71k|    janet_register_abstract_type(&janet_s64_type);
19437|  6.71k|    janet_register_abstract_type(&janet_u64_type);
19438|  6.71k|}
janet_file_close:
19754|  20.1k|int janet_file_close(JanetFile *file) {
19755|  20.1k|    int ret = 0;
19756|  20.1k|    if (!(file->flags & (JANET_FILE_NOT_CLOSEABLE | JANET_FILE_CLOSED))) {
  ------------------
  |  | 2278|  20.1k|#define JANET_FILE_NOT_CLOSEABLE 16
  ------------------
                  if (!(file->flags & (JANET_FILE_NOT_CLOSEABLE | JANET_FILE_CLOSED))) {
  ------------------
  |  | 2279|  20.1k|#define JANET_FILE_CLOSED 32
  ------------------
  |  Branch (19756:9): [True: 0, False: 20.1k]
  ------------------
19757|      0|        ret = fclose(file->file);
19758|      0|        file->flags |= JANET_FILE_CLOSED;
  ------------------
  |  | 2279|      0|#define JANET_FILE_CLOSED 32
  ------------------
19759|      0|        file->file = NULL; /* NULL dereference is easier to debug then other problems */
19760|      0|        return ret;
19761|      0|    }
19762|  20.1k|    return 0;
19763|  20.1k|}
janet_dynprintf:
20192|  4.22M|void janet_dynprintf(const char *name, FILE *dflt_file, const char *format, ...) {
20193|  4.22M|    va_list args;
20194|  4.22M|    va_start(args, format);
20195|  4.22M|    JanetType xtype;
20196|  4.22M|    Janet x;
20197|  4.22M|    if (!name || name[0] == '\0') { /* Allow NULL or empty string to just use dflt_file directly */
  ------------------
  |  Branch (20197:9): [True: 0, False: 4.22M]
  |  Branch (20197:18): [True: 0, False: 4.22M]
  ------------------
20198|      0|        x = janet_wrap_nil();
  ------------------
  |  |  831|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20199|      0|        xtype = JANET_NIL;
20200|  4.22M|    } else {
20201|  4.22M|        x = janet_dyn(name);
20202|  4.22M|        xtype = janet_type(x);
  ------------------
  |  |  795|  4.22M|    (isnan((x).number) \
  |  |  796|  4.22M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  4.22M|        : JANET_NUMBER)
  ------------------
  |  Branch (20202:17): [True: 4.22M, False: 0]
  ------------------
20203|  4.22M|    }
20204|  4.22M|    switch (xtype) {
20205|      0|        default:
  ------------------
  |  Branch (20205:9): [True: 0, False: 4.22M]
  ------------------
20206|       |            /* Other values simply do nothing */
20207|      0|            break;
20208|  4.22M|        case JANET_NIL:
  ------------------
  |  Branch (20208:9): [True: 4.22M, False: 0]
  ------------------
20209|  4.22M|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (20209:9): [True: 0, False: 4.22M]
  ------------------
20210|  4.22M|            FILE *f = dflt_file;
20211|  4.22M|            JanetBuffer buffer;
20212|  4.22M|            int32_t len = 0;
20213|  50.9M|            while (format[len]) len++;
  ------------------
  |  Branch (20213:20): [True: 46.7M, False: 4.22M]
  ------------------
20214|  4.22M|            janet_buffer_init(&buffer, len);
20215|  4.22M|            janet_formatbv(&buffer, format, args);
20216|  4.22M|            if (xtype == JANET_ABSTRACT) {
  ------------------
  |  Branch (20216:17): [True: 0, False: 4.22M]
  ------------------
20217|      0|                void *abstract = janet_unwrap_abstract(x);
  ------------------
  |  |  866|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
20218|      0|                if (janet_abstract_type(abstract) != &janet_file_type)
  ------------------
  |  | 1899|      0|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|      0|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (20218:21): [True: 0, False: 0]
  ------------------
20219|      0|                    break;
20220|      0|                JanetFile *iofile = abstract;
20221|      0|                io_assert_writeable(iofile);
20222|      0|                f = iofile->file;
20223|      0|            }
20224|  4.22M|            fwrite(buffer.data, buffer.count, 1, f);
20225|  4.22M|            janet_buffer_deinit(&buffer);
20226|  4.22M|            break;
20227|  4.22M|        }
20228|      0|        case JANET_FUNCTION: {
  ------------------
  |  Branch (20228:9): [True: 0, False: 4.22M]
  ------------------
20229|      0|            JanetFunction *fun = janet_unwrap_function(x);
  ------------------
  |  |  868|      0|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
20230|      0|            int32_t len = 0;
20231|      0|            while (format[len]) len++;
  ------------------
  |  Branch (20231:20): [True: 0, False: 0]
  ------------------
20232|      0|            JanetBuffer *buf = janet_buffer(len);
20233|      0|            janet_formatbv(buf, format, args);
20234|      0|            Janet args[1] = { janet_wrap_buffer(buf) };
  ------------------
  |  |  847|      0|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  825|      0|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20235|      0|            janet_call(fun, 1, args);
20236|      0|            break;
20237|  4.22M|        }
20238|      0|        case JANET_BUFFER:
  ------------------
  |  Branch (20238:9): [True: 0, False: 4.22M]
  ------------------
20239|      0|            janet_formatbv(janet_unwrap_buffer(x), format, args);
  ------------------
  |  |  862|      0|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
20240|      0|            break;
20241|  4.22M|    }
20242|  4.22M|    va_end(args);
20243|  4.22M|    return;
20244|  4.22M|}
janet_makefile:
20262|  20.1k|Janet janet_makefile(FILE *f, int32_t flags) {
20263|  20.1k|    return janet_wrap_abstract(makef(f, flags, BUFSIZ));
  ------------------
  |  |  851|  20.1k|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|  20.1k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  20.1k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  20.1k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20264|  20.1k|}
janet_lib_io:
20277|  6.71k|void janet_lib_io(JanetTable *env) {
20278|  6.71k|    JanetRegExt io_cfuns[] = {
20279|  6.71k|        JANET_CORE_REG("print", cfun_io_print),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20280|  6.71k|        JANET_CORE_REG("prin", cfun_io_prin),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20281|  6.71k|        JANET_CORE_REG("printf", cfun_io_printf),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20282|  6.71k|        JANET_CORE_REG("prinf", cfun_io_prinf),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20283|  6.71k|        JANET_CORE_REG("eprin", cfun_io_eprin),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20284|  6.71k|        JANET_CORE_REG("eprint", cfun_io_eprint),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20285|  6.71k|        JANET_CORE_REG("eprintf", cfun_io_eprintf),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20286|  6.71k|        JANET_CORE_REG("eprinf", cfun_io_eprinf),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20287|  6.71k|        JANET_CORE_REG("xprint", cfun_io_xprint),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20288|  6.71k|        JANET_CORE_REG("xprin", cfun_io_xprin),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20289|  6.71k|        JANET_CORE_REG("xprintf", cfun_io_xprintf),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20290|  6.71k|        JANET_CORE_REG("xprinf", cfun_io_xprinf),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20291|  6.71k|        JANET_CORE_REG("flush", cfun_io_flush),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20292|  6.71k|        JANET_CORE_REG("eflush", cfun_io_eflush),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20293|  6.71k|        JANET_CORE_REG("file/temp", cfun_io_temp),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20294|  6.71k|        JANET_CORE_REG("file/open", cfun_io_fopen),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20295|  6.71k|        JANET_CORE_REG("file/close", cfun_io_fclose),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20296|  6.71k|        JANET_CORE_REG("file/read", cfun_io_fread),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20297|  6.71k|        JANET_CORE_REG("file/write", cfun_io_fwrite),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20298|  6.71k|        JANET_CORE_REG("file/flush", cfun_io_fflush),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20299|  6.71k|        JANET_CORE_REG("file/seek", cfun_io_fseek),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20300|  6.71k|        JANET_CORE_REG("file/tell", cfun_io_ftell),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20301|  6.71k|        JANET_REG_END
  ------------------
  |  | 2110|  6.71k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
20302|  6.71k|    };
20303|  6.71k|    janet_core_cfuns_ext(env, NULL, io_cfuns);
20304|  6.71k|    janet_register_abstract_type(&janet_file_type);
20305|  6.71k|    int default_flags = JANET_FILE_NOT_CLOSEABLE | JANET_FILE_SERIALIZABLE;
  ------------------
  |  | 2278|  6.71k|#define JANET_FILE_NOT_CLOSEABLE 16
  ------------------
                  int default_flags = JANET_FILE_NOT_CLOSEABLE | JANET_FILE_SERIALIZABLE;
  ------------------
  |  | 2281|  6.71k|#define JANET_FILE_SERIALIZABLE 128
  ------------------
20306|       |    /* stdout */
20307|  6.71k|    JANET_CORE_DEF(env, "stdout",
  ------------------
  |  |  520|  6.71k|#define JANET_CORE_DEF(ENV, NAME, X, DOC) janet_core_def_sm(ENV, NAME, X, DOC, NULL, 0)
  ------------------
20308|  6.71k|                   janet_makefile(stdout, JANET_FILE_APPEND | default_flags),
20309|  6.71k|                   "The standard output file.");
20310|       |    /* stderr */
20311|  6.71k|    JANET_CORE_DEF(env, "stderr",
  ------------------
  |  |  520|  6.71k|#define JANET_CORE_DEF(ENV, NAME, X, DOC) janet_core_def_sm(ENV, NAME, X, DOC, NULL, 0)
  ------------------
20312|  6.71k|                   janet_makefile(stderr, JANET_FILE_APPEND | default_flags),
20313|  6.71k|                   "The standard error file.");
20314|       |    /* stdin */
20315|  6.71k|    JANET_CORE_DEF(env, "stdin",
  ------------------
  |  |  520|  6.71k|#define JANET_CORE_DEF(ENV, NAME, X, DOC) janet_core_def_sm(ENV, NAME, X, DOC, NULL, 0)
  ------------------
20316|  6.71k|                   janet_makefile(stdin, JANET_FILE_READ | default_flags),
20317|  6.71k|                   "The standard input file.");
20318|       |
20319|  6.71k|}
janet_unmarshal:
21978|  6.71k|    const uint8_t **next) {
21979|  6.71k|    UnmarshalState st;
21980|  6.71k|    st.start = bytes;
21981|  6.71k|    st.end = bytes + len;
21982|  6.71k|    st.lookup_defs = NULL;
21983|  6.71k|    st.lookup_envs = NULL;
21984|  6.71k|    st.lookup = NULL;
21985|  6.71k|    st.reg = reg;
21986|  6.71k|    Janet out;
21987|  6.71k|    const uint8_t *nextbytes = unmarshal_one(&st, bytes, &out, flags);
21988|  6.71k|    if (next) *next = nextbytes;
  ------------------
  |  Branch (21988:9): [True: 0, False: 6.71k]
  ------------------
21989|  6.71k|    janet_v_free(st.lookup_defs);
  ------------------
  |  |  756|  6.71k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  764|  6.71k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (756:34): [True: 6.71k, False: 0]
  |  |  ------------------
  ------------------
21990|  6.71k|    janet_v_free(st.lookup_envs);
  ------------------
  |  |  756|  6.71k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  764|  6.71k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (756:34): [True: 6.71k, False: 0]
  |  |  ------------------
  ------------------
21991|       |    janet_v_free(st.lookup);
  ------------------
  |  |  756|  6.71k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  764|  6.71k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (756:34): [True: 6.71k, False: 0]
  |  |  ------------------
  ------------------
21992|  6.71k|    return out;
21993|  6.71k|}
janet_lib_marsh:
22054|  6.71k|void janet_lib_marsh(JanetTable *env) {
22055|  6.71k|    JanetRegExt marsh_cfuns[] = {
22056|  6.71k|        JANET_CORE_REG("marshal", cfun_marshal),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22057|  6.71k|        JANET_CORE_REG("unmarshal", cfun_unmarshal),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22058|  6.71k|        JANET_CORE_REG("env-lookup", cfun_env_lookup),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22059|  6.71k|        JANET_REG_END
  ------------------
  |  | 2110|  6.71k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
22060|  6.71k|    };
22061|       |    janet_core_cfuns_ext(env, NULL, marsh_cfuns);
22062|  6.71k|}
janet_default_rng:
22137|  6.71k|JanetRNG *janet_default_rng(void) {
22138|  6.71k|    return &janet_vm.rng;
22139|  6.71k|}
janet_rng_seed:
22141|  13.4k|void janet_rng_seed(JanetRNG *rng, uint32_t seed) {
22142|  13.4k|    rng->a = seed;
22143|  13.4k|    rng->b = 0x97654321u;
22144|  13.4k|    rng->c = 123871873u;
22145|  13.4k|    rng->d = 0xf23f56c8u;
22146|  13.4k|    rng->counter = 0u;
22147|       |    /* First several numbers aren't that random. */
22148|   228k|    for (int i = 0; i < 16; i++) janet_rng_u32(rng);
  ------------------
  |  Branch (22148:21): [True: 214k, False: 13.4k]
  ------------------
22149|  13.4k|}
janet_rng_u32:
22165|   214k|uint32_t janet_rng_u32(JanetRNG *rng) {
22166|       |    /* Algorithm "xorwow" from p. 5 of Marsaglia, "Xorshift RNGs" */
22167|   214k|    uint32_t t = rng->d;
22168|   214k|    uint32_t const s = rng->a;
22169|   214k|    rng->d = rng->c;
22170|   214k|    rng->c = rng->b;
22171|   214k|    rng->b = s;
22172|   214k|    t ^= t >> 2;
22173|   214k|    t ^= t << 1;
22174|   214k|    t ^= s ^ (s << 4);
22175|   214k|    rng->a = t;
22176|   214k|    rng->counter += 362437;
22177|   214k|    return t + rng->counter;
22178|   214k|}
janet_lib_math:
22445|  6.71k|void janet_lib_math(JanetTable *env) {
22446|  6.71k|    JanetRegExt math_cfuns[] = {
22447|  6.71k|        JANET_CORE_REG("not", janet_not),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22448|  6.71k|        JANET_CORE_REG("math/random", janet_rand),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22449|  6.71k|        JANET_CORE_REG("math/seedrandom", janet_srand),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22450|  6.71k|        JANET_CORE_REG("math/cos", janet_cos),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22451|  6.71k|        JANET_CORE_REG("math/sin", janet_sin),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22452|  6.71k|        JANET_CORE_REG("math/tan", janet_tan),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22453|  6.71k|        JANET_CORE_REG("math/acos", janet_acos),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22454|  6.71k|        JANET_CORE_REG("math/asin", janet_asin),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22455|  6.71k|        JANET_CORE_REG("math/atan", janet_atan),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22456|  6.71k|        JANET_CORE_REG("math/exp", janet_exp),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22457|  6.71k|        JANET_CORE_REG("math/log", janet_log),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22458|  6.71k|        JANET_CORE_REG("math/log10", janet_log10),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22459|  6.71k|        JANET_CORE_REG("math/log2", janet_log2),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22460|  6.71k|        JANET_CORE_REG("math/sqrt", janet_sqrt),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22461|  6.71k|#ifndef JANET_PLAN9
22462|  6.71k|        JANET_CORE_REG("math/cbrt", janet_cbrt),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22463|  6.71k|        JANET_CORE_REG("math/gamma", janet_tgamma),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22464|  6.71k|        JANET_CORE_REG("math/log-gamma", janet_lgamma),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22465|  6.71k|        JANET_CORE_REG("math/erfc", janet_erfc),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22466|  6.71k|        JANET_CORE_REG("math/erf", janet_erf),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22467|  6.71k|        JANET_CORE_REG("math/expm1", janet_expm1),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22468|  6.71k|        JANET_CORE_REG("math/atanh", janet_atanh),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22469|  6.71k|        JANET_CORE_REG("math/asinh", janet_asinh),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22470|  6.71k|        JANET_CORE_REG("math/next", janet_nextafter),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22471|  6.71k|#endif
22472|  6.71k|        JANET_CORE_REG("math/floor", janet_floor),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22473|  6.71k|        JANET_CORE_REG("math/ceil", janet_ceil),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22474|  6.71k|        JANET_CORE_REG("math/pow", janet_pow),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22475|  6.71k|        JANET_CORE_REG("math/abs", janet_fabs),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22476|  6.71k|        JANET_CORE_REG("math/sinh", janet_sinh),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22477|  6.71k|        JANET_CORE_REG("math/cosh", janet_cosh),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22478|  6.71k|        JANET_CORE_REG("math/tanh", janet_tanh),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22479|  6.71k|        JANET_CORE_REG("math/acosh", janet_acosh),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22480|  6.71k|        JANET_CORE_REG("math/atan2", janet_atan2),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22481|  6.71k|        JANET_CORE_REG("math/rng", cfun_rng_make),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22482|  6.71k|        JANET_CORE_REG("math/rng-uniform", cfun_rng_uniform),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22483|  6.71k|        JANET_CORE_REG("math/rng-int", cfun_rng_int),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22484|  6.71k|        JANET_CORE_REG("math/rng-buffer", cfun_rng_buffer),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22485|  6.71k|        JANET_CORE_REG("math/hypot", janet_hypot),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22486|  6.71k|        JANET_CORE_REG("math/exp2", janet_exp2),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22487|  6.71k|        JANET_CORE_REG("math/log1p", janet_log1p),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22488|  6.71k|        JANET_CORE_REG("math/trunc", janet_trunc),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22489|  6.71k|        JANET_CORE_REG("math/round", janet_round),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22490|  6.71k|        JANET_CORE_REG("math/gcd", janet_cfun_gcd),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22491|  6.71k|        JANET_CORE_REG("math/lcm", janet_cfun_lcm),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22492|  6.71k|        JANET_CORE_REG("math/frexp", janet_cfun_frexp),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22493|  6.71k|        JANET_CORE_REG("math/ldexp", janet_cfun_ldexp),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22494|  6.71k|        JANET_REG_END
  ------------------
  |  | 2110|  6.71k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
22495|  6.71k|    };
22496|  6.71k|    janet_core_cfuns_ext(env, NULL, math_cfuns);
22497|  6.71k|    janet_register_abstract_type(&janet_rng_type);
22498|       |#ifdef JANET_BOOTSTRAP
22499|       |    JANET_CORE_DEF(env, "math/pi", janet_wrap_number(3.1415926535897931),
22500|       |                   "The value pi.");
22501|       |    JANET_CORE_DEF(env, "math/e", janet_wrap_number(2.7182818284590451),
22502|       |                   "The base of the natural log.");
22503|       |    JANET_CORE_DEF(env, "math/inf", janet_wrap_number(INFINITY),
22504|       |                   "The number representing positive infinity");
22505|       |    JANET_CORE_DEF(env, "math/-inf", janet_wrap_number(-INFINITY),
22506|       |                   "The number representing negative infinity");
22507|       |    JANET_CORE_DEF(env, "math/int32-min", janet_wrap_number(INT32_MIN),
22508|       |                   "The minimum contiguous integer representable by a 32 bit signed integer");
22509|       |    JANET_CORE_DEF(env, "math/int32-max", janet_wrap_number(INT32_MAX),
22510|       |                   "The maximum contiguous integer representable by a 32 bit signed integer");
22511|       |    JANET_CORE_DEF(env, "math/int-min", janet_wrap_number(JANET_INTMIN_DOUBLE),
22512|       |                   "The minimum contiguous integer representable by a double (-(2^53))");
22513|       |    JANET_CORE_DEF(env, "math/int-max", janet_wrap_number(JANET_INTMAX_DOUBLE),
22514|       |                   "The maximum contiguous integer representable by a double (2^53)");
22515|       |#ifdef NAN
22516|       |    JANET_CORE_DEF(env, "math/nan", janet_wrap_number(NAN), "Not a number (IEEE-754 NaN)");
22517|       |#else
22518|       |    JANET_CORE_DEF(env, "math/nan", janet_wrap_number(0.0 / 0.0), "Not a number (IEEE-754 NaN)");
22519|       |#endif
22520|       |#endif
22521|  6.71k|}
janet_lib_net:
23792|  6.71k|void janet_lib_net(JanetTable *env) {
23793|  6.71k|    JanetRegExt net_cfuns[] = {
23794|  6.71k|        JANET_CORE_REG("net/address", cfun_net_sockaddr),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23795|  6.71k|        JANET_CORE_REG("net/listen", cfun_net_listen),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23796|  6.71k|        JANET_CORE_REG("net/socket", cfun_net_socket),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23797|  6.71k|        JANET_CORE_REG("net/accept", cfun_stream_accept),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23798|  6.71k|        JANET_CORE_REG("net/accept-loop", cfun_stream_accept_loop),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23799|  6.71k|        JANET_CORE_REG("net/read", cfun_stream_read),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23800|  6.71k|        JANET_CORE_REG("net/chunk", cfun_stream_chunk),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23801|  6.71k|        JANET_CORE_REG("net/write", cfun_stream_write),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23802|  6.71k|        JANET_CORE_REG("net/send-to", cfun_stream_send_to),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23803|  6.71k|        JANET_CORE_REG("net/recv-from", cfun_stream_recv_from),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23804|  6.71k|        JANET_CORE_REG("net/flush", cfun_stream_flush),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23805|  6.71k|        JANET_CORE_REG("net/connect", cfun_net_connect),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23806|  6.71k|        JANET_CORE_REG("net/shutdown", cfun_net_shutdown),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23807|  6.71k|        JANET_CORE_REG("net/peername", cfun_net_getpeername),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23808|  6.71k|        JANET_CORE_REG("net/localname", cfun_net_getsockname),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23809|  6.71k|        JANET_CORE_REG("net/address-unpack", cfun_net_address_unpack),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23810|  6.71k|        JANET_CORE_REG("net/setsockopt", cfun_net_setsockopt),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23811|  6.71k|        JANET_REG_END
  ------------------
  |  | 2110|  6.71k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
23812|  6.71k|    };
23813|       |    janet_core_cfuns_ext(env, NULL, net_cfuns);
23814|  6.71k|}
janet_net_init:
23816|  6.71k|void janet_net_init(void) {
23817|       |#ifdef JANET_WINDOWS
23818|       |    WSADATA wsaData;
23819|       |    janet_assert(!WSAStartup(MAKEWORD(2, 2), &wsaData), "could not start winsock");
23820|       |    janet_vm.connect_ex_loaded = 0;
23821|       |    janet_vm.connect_ex = NULL;
23822|       |#endif
23823|  6.71k|}
janet_net_deinit:
23825|  6.71k|void janet_net_deinit(void) {
23826|       |#ifdef JANET_WINDOWS
23827|       |    WSACleanup();
23828|       |#endif
23829|  6.71k|}
janet_lib_os:
26841|  6.71k|void janet_lib_os(JanetTable *env) {
26842|       |#if !defined(JANET_REDUCED_OS) && defined(JANET_WINDOWS) && defined(JANET_THREADS)
26843|       |    /* During start up, the top-most abstract machine (thread)
26844|       |     * in the thread tree sets up the critical section. */
26845|       |    static volatile long env_lock_initializing = 0;
26846|       |    static volatile long env_lock_initialized = 0;
26847|       |    if (!InterlockedExchange(&env_lock_initializing, 1)) {
26848|       |        InitializeCriticalSection(&env_lock);
26849|       |        InterlockedOr(&env_lock_initialized, 1);
26850|       |    } else {
26851|       |        while (!InterlockedOr(&env_lock_initialized, 0)) {
26852|       |            Sleep(0);
26853|       |        }
26854|       |    }
26855|       |
26856|       |#endif
26857|  6.71k|#ifndef JANET_NO_PROCESSES
26858|  6.71k|#endif
26859|  6.71k|    JanetRegExt os_cfuns[] = {
26860|  6.71k|        JANET_CORE_REG("os/exit", os_exit),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26861|  6.71k|        JANET_CORE_REG("os/which", os_which),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26862|  6.71k|        JANET_CORE_REG("os/arch", os_arch),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26863|  6.71k|        JANET_CORE_REG("os/compiler", os_compiler),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26864|  6.71k|#ifndef JANET_REDUCED_OS
26865|       |
26866|       |        /* misc (un-sandboxed) */
26867|  6.71k|        JANET_CORE_REG("os/cpu-count", os_cpu_count),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26868|  6.71k|        JANET_CORE_REG("os/cwd", os_cwd),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26869|  6.71k|        JANET_CORE_REG("os/cryptorand", os_cryptorand),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26870|  6.71k|        JANET_CORE_REG("os/perm-string", os_permission_string),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26871|  6.71k|        JANET_CORE_REG("os/perm-int", os_permission_int),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26872|  6.71k|        JANET_CORE_REG("os/mktime", os_mktime),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26873|  6.71k|        JANET_CORE_REG("os/time", os_time), /* not high resolution */
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26874|  6.71k|        JANET_CORE_REG("os/date", os_date), /* not high resolution */
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26875|  6.71k|        JANET_CORE_REG("os/strftime", os_strftime),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26876|  6.71k|        JANET_CORE_REG("os/sleep", os_sleep),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26877|  6.71k|        JANET_CORE_REG("os/isatty", os_isatty),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26878|  6.71k|#ifndef JANET_NO_LOCALES
26879|  6.71k|        JANET_CORE_REG("os/setlocale", os_setlocale),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26880|  6.71k|#endif
26881|       |
26882|       |        /* env functions */
26883|  6.71k|#ifndef JANET_PLAN9
26884|  6.71k|        JANET_CORE_REG("os/environ", os_environ),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26885|  6.71k|#endif
26886|  6.71k|        JANET_CORE_REG("os/getenv", os_getenv),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26887|  6.71k|        JANET_CORE_REG("os/setenv", os_setenv),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26888|       |
26889|       |        /* fs read */
26890|  6.71k|        JANET_CORE_REG("os/dir", os_dir),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26891|  6.71k|        JANET_CORE_REG("os/stat", os_stat),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26892|  6.71k|        JANET_CORE_REG("os/lstat", os_lstat),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26893|  6.71k|        JANET_CORE_REG("os/realpath", os_realpath),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26894|  6.71k|        JANET_CORE_REG("os/cd", os_cd),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26895|  6.71k|#ifndef JANET_NO_UMASK
26896|  6.71k|        JANET_CORE_REG("os/umask", os_umask),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26897|  6.71k|#endif
26898|  6.71k|#ifndef JANET_NO_SYMLINKS
26899|  6.71k|        JANET_CORE_REG("os/readlink", os_readlink),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26900|  6.71k|#endif
26901|       |
26902|       |        /* fs write */
26903|  6.71k|        JANET_CORE_REG("os/mkdir", os_mkdir),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26904|  6.71k|        JANET_CORE_REG("os/rmdir", os_rmdir),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26905|  6.71k|        JANET_CORE_REG("os/rm", os_remove),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26906|  6.71k|        JANET_CORE_REG("os/link", os_link),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26907|  6.71k|        JANET_CORE_REG("os/rename", os_rename),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26908|  6.71k|        JANET_CORE_REG("os/chmod", os_chmod),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26909|  6.71k|        JANET_CORE_REG("os/touch", os_touch),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26910|  6.71k|#ifndef JANET_NO_SYMLINKS
26911|  6.71k|        JANET_CORE_REG("os/symlink", os_symlink),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26912|  6.71k|#endif
26913|       |
26914|       |        /* processes */
26915|  6.71k|#ifndef JANET_NO_PROCESSES
26916|  6.71k|        JANET_CORE_REG("os/execute", os_execute),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26917|  6.71k|        JANET_CORE_REG("os/spawn", os_spawn),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26918|  6.71k|        JANET_CORE_REG("os/shell", os_shell),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26919|  6.71k|        JANET_CORE_REG("os/posix-fork", os_posix_fork),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26920|  6.71k|        JANET_CORE_REG("os/posix-exec", os_posix_exec),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26921|  6.71k|        JANET_CORE_REG("os/posix-chroot", os_posix_chroot),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26922|       |        /* no need to sandbox process management if you can't create processes
26923|       |         * (allows for limited functionality if use exposes C-functions to create specific processes) */
26924|  6.71k|        JANET_CORE_REG("os/proc-wait", os_proc_wait),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26925|  6.71k|        JANET_CORE_REG("os/proc-kill", os_proc_kill),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26926|  6.71k|        JANET_CORE_REG("os/proc-close", os_proc_close),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26927|  6.71k|        JANET_CORE_REG("os/getpid", os_proc_getpid),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26928|  6.71k|#ifdef JANET_EV
26929|  6.71k|        JANET_CORE_REG("os/sigaction", os_sigaction),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26930|  6.71k|#endif
26931|  6.71k|#endif
26932|       |
26933|       |        /* high resolution timers */
26934|  6.71k|        JANET_CORE_REG("os/clock", os_clock),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26935|       |
26936|  6.71k|#ifdef JANET_EV
26937|  6.71k|        JANET_CORE_REG("os/open", os_open), /* fs read and write */
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26938|  6.71k|        JANET_CORE_REG("os/pipe", os_pipe),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26939|  6.71k|#endif
26940|  6.71k|#endif
26941|  6.71k|        JANET_REG_END
  ------------------
  |  | 2110|  6.71k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
26942|  6.71k|    };
26943|       |    janet_core_cfuns_ext(env, NULL, os_cfuns);
26944|  6.71k|}
janet_is_symbol_char:
27004|   176k|int janet_is_symbol_char(uint8_t c) {
27005|   176k|    return symchars[c >> 5] & ((uint32_t)1 << (c & 0x1F));
27006|   176k|}
janet_valid_utf8:
27011|    954|int janet_valid_utf8(const uint8_t *str, int32_t len) {
27012|    954|    int32_t i = 0;
27013|    954|    int32_t j;
27014|  4.54k|    while (i < len) {
  ------------------
  |  Branch (27014:12): [True: 3.95k, False: 590]
  ------------------
27015|  3.95k|        int32_t nexti;
27016|  3.95k|        uint8_t c = str[i];
27017|       |
27018|       |        /* Check the number of bytes in code point */
27019|  3.95k|        if (c < 0x80) nexti = i + 1;
  ------------------
  |  Branch (27019:13): [True: 2.56k, False: 1.39k]
  ------------------
27020|  1.39k|        else if ((c >> 5) == 0x06) nexti = i + 2;
  ------------------
  |  Branch (27020:18): [True: 507, False: 884]
  ------------------
27021|    884|        else if ((c >> 4) == 0x0E) nexti = i + 3;
  ------------------
  |  Branch (27021:18): [True: 376, False: 508]
  ------------------
27022|    508|        else if ((c >> 3) == 0x1E) nexti = i + 4;
  ------------------
  |  Branch (27022:18): [True: 351, False: 157]
  ------------------
27023|       |        /* Don't allow 5 or 6 byte code points */
27024|    157|        else return 0;
27025|       |
27026|       |        /* No overflow */
27027|  3.79k|        if (nexti > len) return 0;
  ------------------
  |  Branch (27027:13): [True: 96, False: 3.69k]
  ------------------
27028|       |
27029|       |        /* Ensure trailing bytes are well formed (10XX XXXX) */
27030|  5.70k|        for (j = i + 1; j < nexti; j++) {
  ------------------
  |  Branch (27030:25): [True: 2.09k, False: 3.60k]
  ------------------
27031|  2.09k|            if ((str[j] >> 6) != 2) return 0;
  ------------------
  |  Branch (27031:17): [True: 93, False: 2.00k]
  ------------------
27032|  2.09k|        }
27033|       |
27034|       |        /* Check for overlong encoding */
27035|  3.60k|        if ((nexti == i + 2) && str[i] < 0xC2) return 0;
  ------------------
  |  Branch (27035:13): [True: 401, False: 3.20k]
  |  Branch (27035:33): [True: 7, False: 394]
  ------------------
27036|  3.59k|        if ((str[i] == 0xE0) && str[i + 1] < 0xA0) return 0;
  ------------------
  |  Branch (27036:13): [True: 178, False: 3.42k]
  |  Branch (27036:33): [True: 5, False: 173]
  ------------------
27037|  3.59k|        if ((str[i] == 0xF0) && str[i + 1] < 0x90) return 0;
  ------------------
  |  Branch (27037:13): [True: 123, False: 3.47k]
  |  Branch (27037:33): [True: 6, False: 117]
  ------------------
27038|       |
27039|  3.58k|        i = nexti;
27040|  3.58k|    }
27041|    590|    return 1;
27042|    954|}
janet_parser_consume:
27646|   262k|void janet_parser_consume(JanetParser *parser, uint8_t c) {
27647|   262k|    int consumed = 0;
27648|   262k|    janet_parser_checkdead(parser);
27649|   262k|    if (c == '\r') {
  ------------------
  |  Branch (27649:9): [True: 4.00k, False: 258k]
  ------------------
27650|  4.00k|        parser->line++;
27651|  4.00k|        parser->column = 0;
27652|   258k|    } else if (c == '\n') {
  ------------------
  |  Branch (27652:16): [True: 10.3k, False: 248k]
  ------------------
27653|  10.3k|        parser->column = 0;
27654|  10.3k|        if (parser->lookback != '\r')
  ------------------
  |  Branch (27654:13): [True: 9.83k, False: 484]
  ------------------
27655|  9.83k|            parser->line++;
27656|   248k|    } else {
27657|   248k|        parser->column++;
27658|   248k|    }
27659|   593k|    while (!consumed && !parser->error) {
  ------------------
  |  Branch (27659:12): [True: 332k, False: 261k]
  |  Branch (27659:25): [True: 331k, False: 724]
  ------------------
27660|   331k|        JanetParseState *state = parser->states + parser->statecount - 1;
27661|   331k|        consumed = state->consumer(parser, state, c);
27662|   331k|    }
27663|   262k|    parser->lookback = c;
27664|   262k|}
janet_parser_eof:
27666|  6.16k|void janet_parser_eof(JanetParser *parser) {
27667|  6.16k|    janet_parser_checkdead(parser);
27668|  6.16k|    size_t oldcolumn = parser->column;
27669|  6.16k|    size_t oldline = parser->line;
27670|  6.16k|    janet_parser_consume(parser, '\n');
27671|  6.16k|    if (parser->statecount > 1) {
  ------------------
  |  Branch (27671:9): [True: 1.43k, False: 4.73k]
  ------------------
27672|  1.43k|        delim_error(parser, parser->statecount - 1, 0, "unexpected end of source");
27673|  1.43k|    }
27674|  6.16k|    parser->line = oldline;
27675|  6.16k|    parser->column = oldcolumn;
27676|  6.16k|    parser->flag |= JANET_PARSER_DEAD;
  ------------------
  |  |26978|  6.16k|#define JANET_PARSER_DEAD 0x1
  ------------------
27677|  6.16k|}
janet_parser_status:
27679|   269k|enum JanetParserStatus janet_parser_status(JanetParser *parser) {
27680|   269k|    if (parser->error) return JANET_PARSE_ERROR;
  ------------------
  |  Branch (27680:9): [True: 3.07k, False: 266k]
  ------------------
27681|   266k|    if (parser->flag) return JANET_PARSE_DEAD;
  ------------------
  |  Branch (27681:9): [True: 4.73k, False: 261k]
  ------------------
27682|   261k|    if (parser->statecount > 1) return JANET_PARSE_PENDING;
  ------------------
  |  Branch (27682:9): [True: 246k, False: 15.4k]
  ------------------
27683|  15.4k|    return JANET_PARSE_ROOT;
27684|   261k|}
janet_parser_produce:
27705|  4.66k|Janet janet_parser_produce(JanetParser *parser) {
27706|  4.66k|    Janet ret;
27707|  4.66k|    size_t i;
27708|  4.66k|    if (parser->pending == 0) return janet_wrap_nil();
  ------------------
  |  |  831|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (27708:9): [True: 0, False: 4.66k]
  ------------------
27709|  4.66k|    ret = janet_unwrap_tuple(parser->args[0])[0];
  ------------------
  |  |  858|  4.66k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
27710|  10.6k|    for (i = 1; i < parser->argcount; i++) {
  ------------------
  |  Branch (27710:17): [True: 5.95k, False: 4.66k]
  ------------------
27711|  5.95k|        parser->args[i - 1] = parser->args[i];
27712|  5.95k|    }
27713|  4.66k|    parser->pending--;
27714|  4.66k|    parser->argcount--;
27715|  4.66k|    parser->states[0].argn--;
27716|  4.66k|    return ret;
27717|  4.66k|}
janet_parser_init:
27733|  6.71k|void janet_parser_init(JanetParser *parser) {
27734|  6.71k|    parser->args = NULL;
27735|  6.71k|    parser->states = NULL;
27736|  6.71k|    parser->buf = NULL;
27737|  6.71k|    parser->argcount = 0;
27738|  6.71k|    parser->argcap = 0;
27739|  6.71k|    parser->bufcount = 0;
27740|  6.71k|    parser->bufcap = 0;
27741|  6.71k|    parser->statecount = 0;
27742|  6.71k|    parser->statecap = 0;
27743|  6.71k|    parser->error = NULL;
27744|  6.71k|    parser->lookback = -1;
27745|  6.71k|    parser->line = 1;
27746|  6.71k|    parser->column = 0;
27747|  6.71k|    parser->pending = 0;
27748|  6.71k|    parser->flag = 0;
27749|       |
27750|  6.71k|    pushstate(parser, root, PFLAG_CONTAINER);
  ------------------
  |  |27083|  6.71k|#define PFLAG_CONTAINER 0x100
  ------------------
27751|  6.71k|}
janet_parser_deinit:
27753|  6.71k|void janet_parser_deinit(JanetParser *parser) {
27754|  6.71k|    janet_free(parser->args);
  ------------------
  |  | 2415|  6.71k|#define janet_free(X) free((X))
  ------------------
27755|  6.71k|    janet_free(parser->buf);
  ------------------
  |  | 2415|  6.71k|#define janet_free(X) free((X))
  ------------------
27756|  6.71k|    janet_free(parser->states);
  ------------------
  |  | 2415|  6.71k|#define janet_free(X) free((X))
  ------------------
27757|  6.71k|}
janet_parser_has_more:
27804|  4.73k|int janet_parser_has_more(JanetParser *parser) {
27805|  4.73k|    return !!parser->pending;
27806|  4.73k|}
janet_lib_parse:
28258|  6.71k|void janet_lib_parse(JanetTable *env) {
28259|  6.71k|    JanetRegExt parse_cfuns[] = {
28260|  6.71k|        JANET_CORE_REG("parser/new", cfun_parse_parser),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28261|  6.71k|        JANET_CORE_REG("parser/clone", cfun_parse_clone),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28262|  6.71k|        JANET_CORE_REG("parser/has-more", cfun_parse_has_more),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28263|  6.71k|        JANET_CORE_REG("parser/produce", cfun_parse_produce),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28264|  6.71k|        JANET_CORE_REG("parser/consume", cfun_parse_consume),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28265|  6.71k|        JANET_CORE_REG("parser/byte", cfun_parse_byte),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28266|  6.71k|        JANET_CORE_REG("parser/error", cfun_parse_error),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28267|  6.71k|        JANET_CORE_REG("parser/status", cfun_parse_status),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28268|  6.71k|        JANET_CORE_REG("parser/flush", cfun_parse_flush),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28269|  6.71k|        JANET_CORE_REG("parser/state", cfun_parse_state),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28270|  6.71k|        JANET_CORE_REG("parser/where", cfun_parse_where),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28271|  6.71k|        JANET_CORE_REG("parser/eof", cfun_parse_eof),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28272|  6.71k|        JANET_CORE_REG("parser/insert", cfun_parse_insert),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28273|  6.71k|        JANET_REG_END
  ------------------
  |  | 2110|  6.71k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
28274|  6.71k|    };
28275|       |    janet_core_cfuns_ext(env, NULL, parse_cfuns);
28276|  6.71k|}
cfun_peg_match:
30282|  4.66k|              "Returns nil if text does not match the language defined by peg. The syntax of PEGs is documented on the Janet website.") {
30283|  4.66k|    PegCall c = peg_cfun_init(argc, argv, 0);
30284|  4.66k|    const uint8_t *result = peg_rule(&c.s, c.s.bytecode, c.bytes.bytes + c.start);
30285|  4.66k|    return result ? janet_wrap_array(c.s.captures) : janet_wrap_nil();
  ------------------
  |  |  845|  1.10k|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  825|  1.10k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.10k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.10k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  return result ? janet_wrap_array(c.s.captures) : janet_wrap_nil();
  ------------------
  |  |  831|  3.55k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  3.55k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  3.55k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  3.55k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (30285:12): [True: 1.10k, False: 3.55k]
  ------------------
30286|  4.66k|}
janet_lib_peg:
30383|  6.71k|void janet_lib_peg(JanetTable *env) {
30384|  6.71k|    JanetRegExt cfuns[] = {
30385|  6.71k|        JANET_CORE_REG("peg/compile", cfun_peg_compile),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
30386|  6.71k|        JANET_CORE_REG("peg/match", cfun_peg_match),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
30387|  6.71k|        JANET_CORE_REG("peg/find", cfun_peg_find),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
30388|  6.71k|        JANET_CORE_REG("peg/find-all", cfun_peg_find_all),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
30389|  6.71k|        JANET_CORE_REG("peg/replace", cfun_peg_replace),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
30390|  6.71k|        JANET_CORE_REG("peg/replace-all", cfun_peg_replace_all),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
30391|  6.71k|        JANET_REG_END
  ------------------
  |  | 2110|  6.71k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
30392|  6.71k|    };
30393|       |    janet_core_cfuns_ext(env, NULL, cfuns);
30394|  6.71k|    janet_register_abstract_type(&janet_peg_type);
30395|  6.71k|}
janet_to_string_b:
30625|  49.1M|void janet_to_string_b(JanetBuffer *buffer, Janet x) {
30626|  49.1M|    switch (janet_type(x)) {
  ------------------
  |  |  795|  49.1M|    (isnan((x).number) \
  |  |  796|  49.1M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  49.1M|        : JANET_NUMBER)
  ------------------
  |  Branch (30626:13): [True: 48.6M, False: 486k]
  ------------------
30627|      0|        case JANET_NIL:
  ------------------
  |  Branch (30627:9): [True: 0, False: 49.1M]
  ------------------
30628|      0|            janet_buffer_push_cstring(buffer, "");
30629|      0|            break;
30630|  4.88k|        case JANET_BOOLEAN:
  ------------------
  |  Branch (30630:9): [True: 4.88k, False: 49.1M]
  ------------------
30631|  4.88k|            janet_buffer_push_cstring(buffer,
30632|  4.88k|                                      janet_unwrap_boolean(x) ? "true" : "false");
  ------------------
  |  |  838|  4.88k|#define janet_unwrap_boolean(x) ((x).u64 & 0x1)
  |  |  ------------------
  |  |  |  Branch (838:33): [True: 4.87k, False: 11]
  |  |  ------------------
  ------------------
30633|  4.88k|            break;
30634|   486k|        case JANET_NUMBER:
  ------------------
  |  Branch (30634:9): [True: 486k, False: 48.6M]
  ------------------
30635|   486k|            number_to_string_b(buffer, janet_unwrap_number(x));
  ------------------
  |  |  839|   486k|#define janet_unwrap_number(x) ((x).number)
  ------------------
30636|   486k|            break;
30637|  79.6k|        case JANET_STRING:
  ------------------
  |  Branch (30637:9): [True: 79.6k, False: 49.0M]
  ------------------
30638|  3.89M|        case JANET_SYMBOL:
  ------------------
  |  Branch (30638:9): [True: 3.81M, False: 45.2M]
  ------------------
30639|  4.43M|        case JANET_KEYWORD:
  ------------------
  |  Branch (30639:9): [True: 545k, False: 48.5M]
  ------------------
30640|  4.43M|            janet_buffer_push_bytes(buffer,
30641|  4.43M|                                    janet_unwrap_string(x),
  ------------------
  |  |  863|  4.43M|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
30642|  4.43M|                                    janet_string_length(janet_unwrap_string(x)));
  ------------------
  |  | 1813|  4.43M|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|  4.43M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
30643|  4.43M|            break;
30644|  14.7k|        case JANET_BUFFER: {
  ------------------
  |  Branch (30644:9): [True: 14.7k, False: 49.0M]
  ------------------
30645|  14.7k|            JanetBuffer *to = janet_unwrap_buffer(x);
  ------------------
  |  |  862|  14.7k|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
30646|       |            /* Prevent resizing buffer while appending */
30647|  14.7k|            if (buffer == to) janet_buffer_extra(buffer, to->count);
  ------------------
  |  Branch (30647:17): [True: 0, False: 14.7k]
  ------------------
30648|  14.7k|            janet_buffer_push_bytes(buffer, to->data, to->count);
30649|  14.7k|            break;
30650|  3.89M|        }
30651|    230|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (30651:9): [True: 230, False: 49.1M]
  ------------------
30652|    230|            JanetAbstract p = janet_unwrap_abstract(x);
  ------------------
  |  |  866|    230|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
30653|    230|            const JanetAbstractType *t = janet_abstract_type(p);
  ------------------
  |  | 1899|    230|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|    230|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
30654|    230|            if (t->tostring != NULL) {
  ------------------
  |  Branch (30654:17): [True: 230, False: 0]
  ------------------
30655|    230|                t->tostring(p, buffer);
30656|    230|            } else {
30657|      0|                string_description_b(buffer, t->name, p);
30658|      0|            }
30659|    230|        }
30660|    230|        return;
30661|      0|        case JANET_CFUNCTION: {
  ------------------
  |  Branch (30661:9): [True: 0, False: 49.1M]
  ------------------
30662|      0|            JanetCFunRegistry *reg = janet_registry_get(janet_unwrap_cfunction(x));
  ------------------
  |  |  869|      0|#define janet_unwrap_cfunction(x) ((JanetCFunction)janet_nanbox_to_pointer(x))
  ------------------
30663|      0|            if (NULL != reg) {
  ------------------
  |  Branch (30663:17): [True: 0, False: 0]
  ------------------
30664|      0|                janet_buffer_push_cstring(buffer, "<cfunction ");
30665|      0|                if (NULL != reg->name_prefix) {
  ------------------
  |  Branch (30665:21): [True: 0, False: 0]
  ------------------
30666|      0|                    janet_buffer_push_cstring(buffer, reg->name_prefix);
30667|      0|                    janet_buffer_push_u8(buffer, '/');
30668|      0|                }
30669|      0|                janet_buffer_push_cstring(buffer, reg->name);
30670|      0|                janet_buffer_push_u8(buffer, '>');
30671|      0|                break;
30672|      0|            }
30673|      0|            goto fallthrough;
30674|      0|        }
30675|      0|        case JANET_FUNCTION: {
  ------------------
  |  Branch (30675:9): [True: 0, False: 49.1M]
  ------------------
30676|      0|            JanetFunction *fun = janet_unwrap_function(x);
  ------------------
  |  |  868|      0|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
30677|      0|            JanetFuncDef *def = fun->def;
30678|      0|            if (def == NULL) {
  ------------------
  |  Branch (30678:17): [True: 0, False: 0]
  ------------------
30679|      0|                janet_buffer_push_cstring(buffer, "<incomplete function>");
30680|      0|                break;
30681|      0|            }
30682|      0|            if (def->name) {
  ------------------
  |  Branch (30682:17): [True: 0, False: 0]
  ------------------
30683|      0|                const uint8_t *n = def->name;
30684|      0|                janet_buffer_push_cstring(buffer, "<function ");
30685|      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)))
  |  |  ------------------
  ------------------
30686|      0|                janet_buffer_push_u8(buffer, '>');
30687|      0|                break;
30688|      0|            }
30689|      0|            goto fallthrough;
30690|      0|        }
30691|      0|    fallthrough:
30692|  44.1M|        default:
  ------------------
  |  Branch (30692:9): [True: 44.1M, False: 4.94M]
  ------------------
30693|  44.1M|            string_description_b(buffer, janet_type_names[janet_type(x)], janet_unwrap_pointer(x));
  ------------------
  |  |  795|  44.1M|    (isnan((x).number) \
  |  |  796|  44.1M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  44.1M|        : JANET_NUMBER)
  ------------------
                          string_description_b(buffer, janet_type_names[janet_type(x)], janet_unwrap_pointer(x));
  ------------------
  |  |  867|  44.1M|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (30693:59): [True: 44.1M, False: 0]
  ------------------
30694|  44.1M|            break;
30695|  49.1M|    }
30696|  49.1M|}
janet_description_b:
30711|  8.76M|void janet_description_b(JanetBuffer *buffer, Janet x) {
30712|  8.76M|    switch (janet_type(x)) {
  ------------------
  |  |  795|  8.76M|    (isnan((x).number) \
  |  |  796|  8.76M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  8.76M|        : JANET_NUMBER)
  ------------------
  |  Branch (30712:13): [True: 8.42M, False: 342k]
  ------------------
30713|  4.16M|        default:
  ------------------
  |  Branch (30713:9): [True: 4.16M, False: 4.60M]
  ------------------
30714|  4.16M|            break;
30715|  4.16M|        case JANET_NIL:
  ------------------
  |  Branch (30715:9): [True: 4.13k, False: 8.76M]
  ------------------
30716|  4.13k|            janet_buffer_push_cstring(buffer, "nil");
30717|  4.13k|            return;
30718|   545k|        case JANET_KEYWORD:
  ------------------
  |  Branch (30718:9): [True: 545k, False: 8.22M]
  ------------------
30719|   545k|            janet_buffer_push_u8(buffer, ':');
30720|   545k|            break;
30721|  3.99M|        case JANET_STRING:
  ------------------
  |  Branch (30721:9): [True: 3.99M, False: 4.77M]
  ------------------
30722|  3.99M|            janet_escape_string_b(buffer, janet_unwrap_string(x));
  ------------------
  |  |  863|  3.99M|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
30723|  3.99M|            return;
30724|  14.9k|        case JANET_BUFFER: {
  ------------------
  |  Branch (30724:9): [True: 14.9k, False: 8.75M]
  ------------------
30725|  14.9k|            JanetBuffer *b = janet_unwrap_buffer(x);
  ------------------
  |  |  862|  14.9k|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
30726|  14.9k|            janet_escape_buffer_b(buffer, b);
30727|  14.9k|            return;
30728|      0|        }
30729|  45.2k|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (30729:9): [True: 45.2k, False: 8.72M]
  ------------------
30730|  45.2k|            JanetAbstract p = janet_unwrap_abstract(x);
  ------------------
  |  |  866|  45.2k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
30731|  45.2k|            const JanetAbstractType *t = janet_abstract_type(p);
  ------------------
  |  | 1899|  45.2k|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|  45.2k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
30732|  45.2k|            if (t->tostring != NULL) {
  ------------------
  |  Branch (30732:17): [True: 45.2k, False: 0]
  ------------------
30733|  45.2k|                janet_buffer_push_cstring(buffer, "<");
30734|  45.2k|                janet_buffer_push_cstring(buffer, t->name);
30735|  45.2k|                janet_buffer_push_cstring(buffer, " ");
30736|  45.2k|                t->tostring(p, buffer);
30737|  45.2k|                janet_buffer_push_cstring(buffer, ">");
30738|  45.2k|            } else {
30739|      0|                string_description_b(buffer, t->name, p);
30740|      0|            }
30741|  45.2k|            return;
30742|      0|        }
30743|  8.76M|    }
30744|  4.70M|    janet_to_string_b(buffer, x);
30745|  4.70M|}
janet_formatbv:
31398|  4.23M|void janet_formatbv(JanetBuffer *b, const char *format, va_list args) {
31399|  4.23M|    const char *format_end = format + strlen(format);
31400|  4.23M|    const char *c = format;
31401|  4.23M|    int32_t startlen = b->count;
31402|  42.6M|    while (c < format_end) {
  ------------------
  |  Branch (31402:12): [True: 38.4M, False: 4.23M]
  ------------------
31403|  38.4M|        if (*c != '%') {
  ------------------
  |  Branch (31403:13): [True: 29.9M, False: 8.45M]
  ------------------
31404|  29.9M|            janet_buffer_push_u8(b, (uint8_t) *c++);
31405|  29.9M|        } else if (*++c == '%') {
  ------------------
  |  Branch (31405:20): [True: 0, False: 8.45M]
  ------------------
31406|      0|            janet_buffer_push_u8(b, (uint8_t) *c++);
31407|  8.45M|        } else {
31408|  8.45M|            char form[MAX_FORMAT], item[MAX_ITEM];
31409|  8.45M|            char width[3], precision[3];
31410|  8.45M|            int nb = 0; /* number of bytes in added item */
31411|  8.45M|            c = scanformat(c, form, width, precision);
31412|  8.45M|            switch (*c++) {
31413|      0|                case 'c': {
  ------------------
  |  Branch (31413:17): [True: 0, False: 8.45M]
  ------------------
31414|      0|                    int n = va_arg(args, int);
31415|      0|                    nb = snprintf(item, MAX_ITEM, form, n);
  ------------------
  |  |31321|      0|#define MAX_ITEM  256
  ------------------
31416|      0|                    break;
31417|      0|                }
31418|  4.23M|                case 'd':
  ------------------
  |  Branch (31418:17): [True: 4.23M, False: 4.21M]
  ------------------
31419|  4.23M|                case 'i': {
  ------------------
  |  Branch (31419:17): [True: 0, False: 8.45M]
  ------------------
31420|  4.23M|                    int64_t n = (int64_t) va_arg(args, int32_t);
31421|  4.23M|                    nb = snprintf(item, MAX_ITEM, form, n);
  ------------------
  |  |31321|  4.23M|#define MAX_ITEM  256
  ------------------
31422|  4.23M|                    break;
31423|  4.23M|                }
31424|      0|                case 'D':
  ------------------
  |  Branch (31424:17): [True: 0, False: 8.45M]
  ------------------
31425|      0|                case 'I': {
  ------------------
  |  Branch (31425:17): [True: 0, False: 8.45M]
  ------------------
31426|      0|                    int64_t n = va_arg(args, int64_t);
31427|      0|                    nb = snprintf(item, MAX_ITEM, form, n);
  ------------------
  |  |31321|      0|#define MAX_ITEM  256
  ------------------
31428|      0|                    break;
31429|      0|                }
31430|      0|                case 'x':
  ------------------
  |  Branch (31430:17): [True: 0, False: 8.45M]
  ------------------
31431|      0|                case 'X':
  ------------------
  |  Branch (31431:17): [True: 0, False: 8.45M]
  ------------------
31432|      0|                case 'o':
  ------------------
  |  Branch (31432:17): [True: 0, False: 8.45M]
  ------------------
31433|      0|                case 'u': {
  ------------------
  |  Branch (31433:17): [True: 0, False: 8.45M]
  ------------------
31434|      0|                    uint64_t n = va_arg(args, uint64_t);
31435|      0|                    nb = snprintf(item, MAX_ITEM, form, n);
  ------------------
  |  |31321|      0|#define MAX_ITEM  256
  ------------------
31436|      0|                    break;
31437|      0|                }
31438|      0|                case 'a':
  ------------------
  |  Branch (31438:17): [True: 0, False: 8.45M]
  ------------------
31439|      0|                case 'A':
  ------------------
  |  Branch (31439:17): [True: 0, False: 8.45M]
  ------------------
31440|      0|                case 'e':
  ------------------
  |  Branch (31440:17): [True: 0, False: 8.45M]
  ------------------
31441|      0|                case 'E':
  ------------------
  |  Branch (31441:17): [True: 0, False: 8.45M]
  ------------------
31442|      0|                case 'f':
  ------------------
  |  Branch (31442:17): [True: 0, False: 8.45M]
  ------------------
31443|      0|                case 'g':
  ------------------
  |  Branch (31443:17): [True: 0, False: 8.45M]
  ------------------
31444|      0|                case 'G': {
  ------------------
  |  Branch (31444:17): [True: 0, False: 8.45M]
  ------------------
31445|      0|                    double d = va_arg(args, double);
31446|      0|                    nb = snprintf(item, MAX_ITEM, form, d);
  ------------------
  |  |31321|      0|#define MAX_ITEM  256
  ------------------
31447|      0|                    break;
31448|      0|                }
31449|  21.9k|                case 's':
  ------------------
  |  Branch (31449:17): [True: 21.9k, False: 8.42M]
  ------------------
31450|  22.3k|                case 'S': {
  ------------------
  |  Branch (31450:17): [True: 397, False: 8.45M]
  ------------------
31451|  22.3k|                    const char *str = va_arg(args, const char *);
31452|  22.3k|                    int32_t len = (c[-1] == 's')
  ------------------
  |  Branch (31452:35): [True: 21.9k, False: 397]
  ------------------
31453|  22.3k|                                  ? (int32_t) strlen(str)
31454|  22.3k|                                  : janet_string_length((JanetString) str);
  ------------------
  |  | 1813|    397|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|    397|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
31455|  22.3k|                    if (form[2] == '\0')
  ------------------
  |  Branch (31455:25): [True: 22.3k, False: 0]
  ------------------
31456|  22.3k|                        janet_buffer_push_bytes(b, (const uint8_t *) str, len);
31457|      0|                    else {
31458|      0|                        if (len != (int32_t) strlen((const char *) str))
  ------------------
  |  Branch (31458:29): [True: 0, False: 0]
  ------------------
31459|      0|                            janet_panic("string contains zeros");
31460|      0|                        if (!strchr(form, '.') && len >= 100) {
  ------------------
  |  Branch (31460:29): [True: 0, False: 0]
  |  Branch (31460:51): [True: 0, False: 0]
  ------------------
31461|      0|                            janet_panic("no precision and string is too long to be formatted");
31462|      0|                        } else {
31463|      0|                            nb = snprintf(item, MAX_ITEM, form, str);
  ------------------
  |  |31321|      0|#define MAX_ITEM  256
  ------------------
31464|      0|                        }
31465|      0|                    }
31466|  22.3k|                    break;
31467|  22.3k|                }
31468|  22.3k|                case 'V':
  ------------------
  |  Branch (31468:17): [True: 0, False: 8.45M]
  ------------------
31469|      0|                    janet_to_string_b(b, va_arg(args, Janet));
31470|      0|                    break;
31471|    769|                case 'v':
  ------------------
  |  Branch (31471:17): [True: 769, False: 8.45M]
  ------------------
31472|    769|                    janet_description_b(b, va_arg(args, Janet));
31473|    769|                    break;
31474|      0|                case 't':
  ------------------
  |  Branch (31474:17): [True: 0, False: 8.45M]
  ------------------
31475|      0|                    janet_buffer_push_cstring(b, typestr(va_arg(args, Janet)));
31476|      0|                    break;
31477|      0|                case 'T': {
  ------------------
  |  Branch (31477:17): [True: 0, False: 8.45M]
  ------------------
31478|      0|                    int types = va_arg(args, int);
31479|      0|                    pushtypes(b, types);
31480|      0|                    break;
31481|  22.3k|                }
31482|      0|                case 'M':
  ------------------
  |  Branch (31482:17): [True: 0, False: 8.45M]
  ------------------
31483|  4.19M|                case 'm':
  ------------------
  |  Branch (31483:17): [True: 4.19M, False: 4.25M]
  ------------------
31484|  4.19M|                case 'N':
  ------------------
  |  Branch (31484:17): [True: 0, False: 8.45M]
  ------------------
31485|  4.19M|                case 'n':
  ------------------
  |  Branch (31485:17): [True: 0, False: 8.45M]
  ------------------
31486|  4.19M|                case 'Q':
  ------------------
  |  Branch (31486:17): [True: 0, False: 8.45M]
  ------------------
31487|  4.19M|                case 'q':
  ------------------
  |  Branch (31487:17): [True: 0, False: 8.45M]
  ------------------
31488|  4.19M|                case 'P':
  ------------------
  |  Branch (31488:17): [True: 0, False: 8.45M]
  ------------------
31489|  4.19M|                case 'p': { /* janet pretty , precision = depth */
  ------------------
  |  Branch (31489:17): [True: 2.79k, False: 8.44M]
  ------------------
31490|  4.19M|                    int depth = atoi(precision);
31491|  4.19M|                    if (depth < 1) depth = JANET_RECURSION_GUARD;
  ------------------
  |  |  296|  4.19M|#define JANET_RECURSION_GUARD 1024
  ------------------
  |  Branch (31491:25): [True: 4.19M, False: 0]
  ------------------
31492|  4.19M|                    char d = c[-1];
31493|  4.19M|                    int has_color = (d == 'P') || (d == 'Q') || (d == 'M') || (d == 'N');
  ------------------
  |  Branch (31493:37): [True: 0, False: 4.19M]
  |  Branch (31493:51): [True: 0, False: 4.19M]
  |  Branch (31493:65): [True: 0, False: 4.19M]
  |  Branch (31493:79): [True: 0, False: 4.19M]
  ------------------
31494|  4.19M|                    int has_oneline = (d == 'Q') || (d == 'q') || (d == 'N') || (d == 'n');
  ------------------
  |  Branch (31494:39): [True: 0, False: 4.19M]
  |  Branch (31494:53): [True: 0, False: 4.19M]
  |  Branch (31494:67): [True: 0, False: 4.19M]
  |  Branch (31494:81): [True: 0, False: 4.19M]
  ------------------
31495|  4.19M|                    int has_notrunc = (d == 'M') || (d == 'm') || (d == 'N') || (d == 'n');
  ------------------
  |  Branch (31495:39): [True: 0, False: 4.19M]
  |  Branch (31495:53): [True: 4.19M, False: 2.79k]
  |  Branch (31495:67): [True: 0, False: 2.79k]
  |  Branch (31495:81): [True: 0, False: 2.79k]
  ------------------
31496|  4.19M|                    int columns = atoi(width);
31497|  4.19M|                    if (columns == 0) {
  ------------------
  |  Branch (31497:25): [True: 4.19M, False: 0]
  ------------------
31498|  4.19M|                        columns = JANET_COLUMNS;
  ------------------
  |  |31234|  4.19M|#define JANET_COLUMNS 80
  ------------------
31499|  4.19M|                    } else if (columns < 0) {
  ------------------
  |  Branch (31499:32): [True: 0, False: 0]
  ------------------
31500|      0|                        has_oneline = 1;
31501|      0|                    }
31502|  4.19M|                    int flags = 0;
31503|  4.19M|                    flags |= has_color ? JANET_PRETTY_COLOR : 0;
  ------------------
  |  | 1967|      0|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (31503:30): [True: 0, False: 4.19M]
  ------------------
31504|  4.19M|                    flags |= has_oneline ? JANET_PRETTY_ONELINE : 0;
  ------------------
  |  | 1968|      0|#define JANET_PRETTY_ONELINE 2
  ------------------
  |  Branch (31504:30): [True: 0, False: 4.19M]
  ------------------
31505|  4.19M|                    flags |= has_notrunc ? JANET_PRETTY_NOTRUNC : 0;
  ------------------
  |  | 1969|  4.19M|#define JANET_PRETTY_NOTRUNC 4
  ------------------
  |  Branch (31505:30): [True: 4.19M, False: 2.79k]
  ------------------
31506|  4.19M|                    janet_pretty_(b, depth, columns, flags,
31507|  4.19M|                                  va_arg(args, Janet), startlen, b->count);
31508|  4.19M|                    break;
31509|  4.19M|                }
31510|      0|                case 'j': {
  ------------------
  |  Branch (31510:17): [True: 0, False: 8.45M]
  ------------------
31511|      0|                    int depth = atoi(precision);
31512|      0|                    if (depth < 1) {
  ------------------
  |  Branch (31512:25): [True: 0, False: 0]
  ------------------
31513|      0|                        depth = JANET_RECURSION_GUARD;
  ------------------
  |  |  296|      0|#define JANET_RECURSION_GUARD 1024
  ------------------
31514|      0|                    }
31515|      0|                    janet_jdn_(b, depth, va_arg(args, Janet), startlen, b->count);
31516|      0|                    break;
31517|  4.19M|                }
31518|      0|                default: {
  ------------------
  |  Branch (31518:17): [True: 0, False: 8.45M]
  ------------------
31519|       |                    /* also treat cases 'nLlh' */
31520|      0|                    janet_panicf("invalid conversion '%s' to 'format'",
31521|      0|                                 form);
31522|  4.19M|                }
31523|  8.45M|            }
31524|  8.45M|            if (nb >= MAX_ITEM)
  ------------------
  |  |31321|  8.45M|#define MAX_ITEM  256
  ------------------
  |  Branch (31524:17): [True: 0, False: 8.45M]
  ------------------
31525|      0|                janet_panic("format buffer overflow");
31526|  8.45M|            if (nb > 0)
  ------------------
  |  Branch (31526:17): [True: 4.23M, False: 4.21M]
  ------------------
31527|  4.23M|                janet_buffer_push_bytes(b, (uint8_t *) item, nb);
31528|  8.45M|        }
31529|       |
31530|  38.4M|    }
31531|  4.23M|}
janet_formatc:
31535|  1.33k|const uint8_t *janet_formatc(const char *format, ...) {
31536|  1.33k|    va_list args;
31537|  1.33k|    const uint8_t *ret;
31538|  1.33k|    JanetBuffer buffer;
31539|  1.33k|    int32_t len = 0;
31540|       |
31541|       |    /* Calculate length, init buffer and args */
31542|  36.7k|    while (format[len]) len++;
  ------------------
  |  Branch (31542:12): [True: 35.3k, False: 1.33k]
  ------------------
31543|  1.33k|    janet_buffer_init(&buffer, len);
31544|  1.33k|    va_start(args, format);
31545|       |
31546|       |    /* Run format */
31547|  1.33k|    janet_formatbv(&buffer, format, args);
31548|       |
31549|       |    /* Iterate length */
31550|  1.33k|    va_end(args);
31551|       |
31552|  1.33k|    ret = janet_string(buffer.data, buffer.count);
31553|  1.33k|    janet_buffer_deinit(&buffer);
31554|  1.33k|    return ret;
31555|  1.33k|}
janet_formatb:
31557|  1.45k|JanetBuffer *janet_formatb(JanetBuffer *buffer, const char *format, ...) {
31558|  1.45k|    va_list args;
31559|  1.45k|    va_start(args, format);
31560|  1.45k|    janet_formatbv(buffer, format, args);
31561|       |    va_end(args);
31562|  1.45k|    return buffer;
31563|  1.45k|}
janet_string:
33466|  12.0M|const uint8_t *janet_string(const uint8_t *buf, int32_t len) {
33467|  12.0M|    JanetStringHead *head = janet_gcalloc(JANET_MEMORY_STRING, sizeof(JanetStringHead) + (size_t) len + 1);
33468|  12.0M|    head->length = len;
33469|  12.0M|    head->hash = janet_string_calchash(buf, len);
33470|  12.0M|    uint8_t *data = (uint8_t *)head->data;
33471|  12.0M|    safe_memcpy(data, buf, len);
33472|  12.0M|    data[len] = 0;
33473|  12.0M|    return data;
33474|  12.0M|}
janet_string_compare:
33477|  21.8k|int janet_string_compare(const uint8_t *lhs, const uint8_t *rhs) {
33478|  21.8k|    int32_t xlen = janet_string_length(lhs);
  ------------------
  |  | 1813|  21.8k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|  21.8k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
33479|  21.8k|    int32_t ylen = janet_string_length(rhs);
  ------------------
  |  | 1813|  21.8k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|  21.8k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
33480|  21.8k|    int32_t len = xlen > ylen ? ylen : xlen;
  ------------------
  |  Branch (33480:19): [True: 3.64k, False: 18.1k]
  ------------------
33481|  21.8k|    int res = memcmp(lhs, rhs, len);
33482|  21.8k|    if (res) return res > 0 ? 1 : -1;
  ------------------
  |  Branch (33482:9): [True: 10.9k, False: 10.8k]
  |  Branch (33482:21): [True: 2.82k, False: 8.11k]
  ------------------
33483|  10.8k|    if (xlen == ylen) return 0;
  ------------------
  |  Branch (33483:9): [True: 10.7k, False: 148]
  ------------------
33484|    148|    return xlen < ylen ? -1 : 1;
  ------------------
  |  Branch (33484:12): [True: 60, False: 88]
  ------------------
33485|  10.8k|}
janet_string_equalconst:
33488|  42.8M|int janet_string_equalconst(const uint8_t *lhs, const uint8_t *rhs, int32_t rlen, int32_t rhash) {
33489|  42.8M|    int32_t lhash = janet_string_hash(lhs);
  ------------------
  |  | 1814|  42.8M|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  ------------------
  |  |  |  | 1812|  42.8M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
33490|  42.8M|    int32_t llen = janet_string_length(lhs);
  ------------------
  |  | 1813|  42.8M|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|  42.8M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
33491|  42.8M|    if (lhash != rhash || llen != rlen)
  ------------------
  |  Branch (33491:9): [True: 19.1M, False: 23.6M]
  |  Branch (33491:27): [True: 17, False: 23.6M]
  ------------------
33492|  19.1M|        return 0;
33493|  23.6M|    if (lhs == rhs)
  ------------------
  |  Branch (33493:9): [True: 13.4M, False: 10.2M]
  ------------------
33494|  13.4M|        return 1;
33495|  10.2M|    return !memcmp(lhs, rhs, rlen);
33496|  23.6M|}
janet_string_equal:
33499|  2.09k|int janet_string_equal(const uint8_t *lhs, const uint8_t *rhs) {
33500|  2.09k|    return janet_string_equalconst(lhs, rhs,
33501|  2.09k|                                   janet_string_length(rhs), janet_string_hash(rhs));
  ------------------
  |  | 1813|  2.09k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|  2.09k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
                                                 janet_string_length(rhs), janet_string_hash(rhs));
  ------------------
  |  | 1814|  2.09k|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  ------------------
  |  |  |  | 1812|  2.09k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
33502|  2.09k|}
janet_lib_string:
34074|  6.71k|void janet_lib_string(JanetTable *env) {
34075|  6.71k|    JanetRegExt string_cfuns[] = {
34076|  6.71k|        JANET_CORE_REG("string/slice", cfun_string_slice),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34077|  6.71k|        JANET_CORE_REG("keyword/slice", cfun_keyword_slice),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34078|  6.71k|        JANET_CORE_REG("symbol/slice", cfun_symbol_slice),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34079|  6.71k|        JANET_CORE_REG("string/repeat", cfun_string_repeat),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34080|  6.71k|        JANET_CORE_REG("string/bytes", cfun_string_bytes),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34081|  6.71k|        JANET_CORE_REG("string/from-bytes", cfun_string_frombytes),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34082|  6.71k|        JANET_CORE_REG("string/ascii-lower", cfun_string_asciilower),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34083|  6.71k|        JANET_CORE_REG("string/ascii-upper", cfun_string_asciiupper),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34084|  6.71k|        JANET_CORE_REG("string/reverse", cfun_string_reverse),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34085|  6.71k|        JANET_CORE_REG("string/find", cfun_string_find),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34086|  6.71k|        JANET_CORE_REG("string/find-all", cfun_string_findall),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34087|  6.71k|        JANET_CORE_REG("string/has-prefix?", cfun_string_hasprefix),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34088|  6.71k|        JANET_CORE_REG("string/has-suffix?", cfun_string_hassuffix),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34089|  6.71k|        JANET_CORE_REG("string/replace", cfun_string_replace),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34090|  6.71k|        JANET_CORE_REG("string/replace-all", cfun_string_replaceall),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34091|  6.71k|        JANET_CORE_REG("string/split", cfun_string_split),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34092|  6.71k|        JANET_CORE_REG("string/check-set", cfun_string_checkset),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34093|  6.71k|        JANET_CORE_REG("string/join", cfun_string_join),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34094|  6.71k|        JANET_CORE_REG("string/format", cfun_string_format),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34095|  6.71k|        JANET_CORE_REG("string/trim", cfun_string_trim),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34096|  6.71k|        JANET_CORE_REG("string/triml", cfun_string_triml),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34097|  6.71k|        JANET_CORE_REG("string/trimr", cfun_string_trimr),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34098|  6.71k|        JANET_REG_END
  ------------------
  |  | 2110|  6.71k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
34099|  6.71k|    };
34100|       |    janet_core_cfuns_ext(env, NULL, string_cfuns);
34101|  6.71k|}
janet_scan_number_base:
34362|  15.1k|    double *out) {
34363|  15.1k|    const uint8_t *end = str + len;
34364|  15.1k|    int seenadigit = 0;
34365|  15.1k|    int ex = 0;
34366|  15.1k|    int seenpoint = 0;
34367|  15.1k|    int foundexp = 0;
34368|  15.1k|    int neg = 0;
34369|  15.1k|    struct BigNat mant;
34370|  15.1k|    bignat_zero(&mant);
34371|       |
34372|       |    /* Prevent some kinds of overflow bugs relating to the exponent
34373|       |     * overflowing.  For example, if a string was passed 2GB worth of 0s after
34374|       |     * the decimal point, exponent could wrap around and become positive. It's
34375|       |     * easier to reject ridiculously large inputs than to check for overflows.
34376|       |     * */
34377|  15.1k|    if (len > JANET_NUMBER_LENGTH_RIDICULOUS) goto error;
  ------------------
  |  |34158|  15.1k|#define JANET_NUMBER_LENGTH_RIDICULOUS 0xFFFF
  ------------------
  |  Branch (34377:9): [True: 0, False: 15.1k]
  ------------------
34378|       |
34379|       |    /* Get sign */
34380|  15.1k|    if (str >= end) goto error;
  ------------------
  |  Branch (34380:9): [True: 0, False: 15.1k]
  ------------------
34381|  15.1k|    if (*str == '-') {
  ------------------
  |  Branch (34381:9): [True: 2.00k, False: 13.1k]
  ------------------
34382|  2.00k|        neg = 1;
34383|  2.00k|        str++;
34384|  13.1k|    } else if (*str == '+') {
  ------------------
  |  Branch (34384:16): [True: 1.26k, False: 11.8k]
  ------------------
34385|  1.26k|        str++;
34386|  1.26k|    }
34387|       |
34388|       |    /* Check for leading 0x or digit digit r */
34389|  15.1k|    if (base == 0) {
  ------------------
  |  Branch (34389:9): [True: 15.1k, False: 0]
  ------------------
34390|  15.1k|        if (str + 1 < end && str[0] == '0' && str[1] == 'x') {
  ------------------
  |  Branch (34390:13): [True: 7.40k, False: 7.76k]
  |  Branch (34390:30): [True: 1.36k, False: 6.03k]
  |  Branch (34390:47): [True: 173, False: 1.18k]
  ------------------
34391|    173|            base = 16;
34392|    173|            str += 2;
34393|  14.9k|        } else if (str + 1 < end  &&
  ------------------
  |  Branch (34393:20): [True: 7.22k, False: 7.76k]
  ------------------
34394|  7.22k|                   str[0] >= '0' && str[0] <= '9' &&
  ------------------
  |  Branch (34394:20): [True: 5.64k, False: 1.58k]
  |  Branch (34394:37): [True: 5.37k, False: 269]
  ------------------
34395|  5.37k|                   str[1] == 'r') {
  ------------------
  |  Branch (34395:20): [True: 82, False: 5.29k]
  ------------------
34396|     82|            base = str[0] - '0';
34397|     82|            str += 2;
34398|  14.9k|        } else if (str + 2 < end  &&
  ------------------
  |  Branch (34398:20): [True: 4.99k, False: 9.92k]
  ------------------
34399|  4.99k|                   str[0] >= '0' && str[0] <= '9' &&
  ------------------
  |  Branch (34399:20): [True: 4.04k, False: 951]
  |  Branch (34399:37): [True: 3.83k, False: 206]
  ------------------
34400|  3.83k|                   str[1] >= '0' && str[1] <= '9' &&
  ------------------
  |  Branch (34400:20): [True: 2.67k, False: 1.16k]
  |  Branch (34400:37): [True: 1.92k, False: 746]
  ------------------
34401|  1.92k|                   str[2] == 'r') {
  ------------------
  |  Branch (34401:20): [True: 200, False: 1.72k]
  ------------------
34402|    200|            base = 10 * (str[0] - '0') + (str[1] - '0');
34403|    200|            if (base < 2 || base > 36) goto error;
  ------------------
  |  Branch (34403:17): [True: 19, False: 181]
  |  Branch (34403:29): [True: 43, False: 138]
  ------------------
34404|    138|            str += 3;
34405|    138|        }
34406|  15.1k|    }
34407|       |
34408|       |    /* If still base is 0, set to default (10) */
34409|  15.1k|    if (base == 0) {
  ------------------
  |  Branch (34409:9): [True: 14.7k, False: 386]
  ------------------
34410|  14.7k|        base = 10;
34411|  14.7k|    }
34412|  15.1k|    int exp_base = base;
34413|       |
34414|       |    /* Skip leading zeros */
34415|  22.1k|    while (str < end && (*str == '0' || *str == '.')) {
  ------------------
  |  Branch (34415:12): [True: 17.6k, False: 4.48k]
  |  Branch (34415:26): [True: 5.00k, False: 12.6k]
  |  Branch (34415:41): [True: 2.29k, False: 10.3k]
  ------------------
34416|  7.29k|        if (seenpoint) ex--;
  ------------------
  |  Branch (34416:13): [True: 643, False: 6.65k]
  ------------------
34417|  7.29k|        if (*str == '.') {
  ------------------
  |  Branch (34417:13): [True: 2.29k, False: 5.00k]
  ------------------
34418|  2.29k|            if (seenpoint) goto error;
  ------------------
  |  Branch (34418:17): [True: 232, False: 2.05k]
  ------------------
34419|  2.05k|            seenpoint = 1;
34420|  5.00k|        } else {
34421|  5.00k|            seenadigit = 1;
34422|  5.00k|        }
34423|  7.06k|        str++;
34424|  7.06k|    }
34425|       |
34426|       |    /* Parse significant digits */
34427|  38.1k|    while (str < end) {
  ------------------
  |  Branch (34427:12): [True: 26.7k, False: 11.3k]
  ------------------
34428|  26.7k|        if (*str == '.') {
  ------------------
  |  Branch (34428:13): [True: 418, False: 26.3k]
  ------------------
34429|    418|            if (seenpoint) goto error;
  ------------------
  |  Branch (34429:17): [True: 63, False: 355]
  ------------------
34430|    355|            seenpoint = 1;
34431|  26.3k|        } else if (*str == '&') {
  ------------------
  |  Branch (34431:20): [True: 1.26k, False: 25.0k]
  ------------------
34432|  1.26k|            foundexp = 1;
34433|  1.26k|            break;
34434|  25.0k|        } else if (base == 16 && (*str == 'P' || *str == 'p')) { /* IEEE hex float */
  ------------------
  |  Branch (34434:20): [True: 1.08k, False: 23.9k]
  |  Branch (34434:35): [True: 22, False: 1.05k]
  |  Branch (34434:50): [True: 67, False: 991]
  ------------------
34435|     89|            foundexp = 1;
34436|     89|            exp_base = 10;
34437|     89|            base = 2;
34438|     89|            ex *= 4; /* We need to correct the current exponent after we change the base */
34439|     89|            break;
34440|  24.9k|        } else if (base == 10 && (*str == 'E' || *str == 'e')) {
  ------------------
  |  Branch (34440:20): [True: 21.7k, False: 3.27k]
  |  Branch (34440:35): [True: 579, False: 21.1k]
  |  Branch (34440:50): [True: 397, False: 20.7k]
  ------------------
34441|    976|            foundexp = 1;
34442|    976|            break;
34443|  24.0k|        } else if (*str == '_') {
  ------------------
  |  Branch (34443:20): [True: 823, False: 23.1k]
  ------------------
34444|    823|            if (!seenadigit) goto error;
  ------------------
  |  Branch (34444:17): [True: 148, False: 675]
  ------------------
34445|  23.1k|        } else {
34446|  23.1k|            int digit = digit_lookup[*str & 0x7F];
34447|  23.1k|            if (*str > 127 || digit >= base) goto error;
  ------------------
  |  Branch (34447:17): [True: 160, False: 23.0k]
  |  Branch (34447:31): [True: 787, False: 22.2k]
  ------------------
34448|  22.2k|            if (seenpoint) ex--;
  ------------------
  |  Branch (34448:17): [True: 3.97k, False: 18.2k]
  ------------------
34449|  22.2k|            bignat_muladd(&mant, base, digit);
34450|  22.2k|            seenadigit = 1;
34451|  22.2k|        }
34452|  23.2k|        str++;
34453|  23.2k|    }
34454|       |
34455|  13.7k|    if (!seenadigit)
  ------------------
  |  Branch (34455:9): [True: 1.88k, False: 11.8k]
  ------------------
34456|  1.88k|        goto error;
34457|       |
34458|       |    /* Read exponent */
34459|  11.8k|    if (str < end && foundexp) {
  ------------------
  |  Branch (34459:9): [True: 2.17k, False: 9.65k]
  |  Branch (34459:22): [True: 2.17k, False: 0]
  ------------------
34460|  2.17k|        int eneg = 0;
34461|  2.17k|        int32_t ee = 0;
34462|  2.17k|        seenadigit = 0;
34463|  2.17k|        str++;
34464|  2.17k|        if (str >= end) goto error;
  ------------------
  |  Branch (34464:13): [True: 61, False: 2.11k]
  ------------------
34465|  2.11k|        if (*str == '-') {
  ------------------
  |  Branch (34465:13): [True: 300, False: 1.81k]
  ------------------
34466|    300|            eneg = 1;
34467|    300|            str++;
34468|  1.81k|        } else if (*str == '+') {
  ------------------
  |  Branch (34468:20): [True: 84, False: 1.73k]
  ------------------
34469|     84|            str++;
34470|     84|        }
34471|       |        /* Skip leading 0s in exponent */
34472|  2.57k|        while (str < end && *str == '0') {
  ------------------
  |  Branch (34472:16): [True: 2.44k, False: 134]
  |  Branch (34472:29): [True: 462, False: 1.98k]
  ------------------
34473|    462|            str++;
34474|    462|            seenadigit = 1;
34475|    462|        }
34476|  7.04k|        while (str < end) {
  ------------------
  |  Branch (34476:16): [True: 5.02k, False: 2.01k]
  ------------------
34477|  5.02k|            int digit = digit_lookup[*str & 0x7F];
34478|  5.02k|            if (*str > 127 || digit >= exp_base) goto error;
  ------------------
  |  Branch (34478:17): [True: 32, False: 4.99k]
  |  Branch (34478:31): [True: 70, False: 4.92k]
  ------------------
34479|  4.92k|            if (ee < (INT32_MAX / 40)) {
  ------------------
  |  Branch (34479:17): [True: 4.43k, False: 489]
  ------------------
34480|  4.43k|                ee = exp_base * ee + digit;
34481|  4.43k|            }
34482|  4.92k|            str++;
34483|  4.92k|            seenadigit = 1;
34484|  4.92k|        }
34485|  2.01k|        if (eneg) ex -= ee;
  ------------------
  |  Branch (34485:13): [True: 298, False: 1.71k]
  ------------------
34486|  1.71k|        else ex += ee;
34487|  2.01k|    }
34488|       |
34489|  11.6k|    if (!seenadigit)
  ------------------
  |  Branch (34489:9): [True: 44, False: 11.6k]
  ------------------
34490|     44|        goto error;
34491|       |
34492|  11.6k|    *out = convert(neg, &mant, base, ex);
34493|  11.6k|    janet_free(mant.digits);
  ------------------
  |  | 2415|  11.6k|#define janet_free(X) free((X))
  ------------------
34494|  11.6k|    return 0;
34495|       |
34496|  3.54k|error:
34497|  3.54k|    janet_free(mant.digits);
  ------------------
  |  | 2415|  3.54k|#define janet_free(X) free((X))
  ------------------
34498|  3.54k|    return 1;
34499|  11.6k|}
janet_scan_int64:
34572|  1.73k|int janet_scan_int64(const uint8_t *str, int32_t len, int64_t *out) {
34573|  1.73k|    int neg;
34574|  1.73k|    uint64_t bi;
34575|  1.73k|    if (scan_uint64(str, len, &bi, &neg)) {
  ------------------
  |  Branch (34575:9): [True: 1.25k, False: 481]
  ------------------
34576|  1.25k|        if (neg && bi <= ((UINT64_MAX / 2) + 1)) {
  ------------------
  |  Branch (34576:13): [True: 346, False: 908]
  |  Branch (34576:20): [True: 330, False: 16]
  ------------------
34577|    330|            if (bi > INT64_MAX) {
  ------------------
  |  Branch (34577:17): [True: 10, False: 320]
  ------------------
34578|     10|                *out = INT64_MIN;
34579|    320|            } else {
34580|    320|                *out = -((int64_t) bi);
34581|    320|            }
34582|    330|            return 1;
34583|    330|        }
34584|    924|        if (!neg && bi <= INT64_MAX) {
  ------------------
  |  Branch (34584:13): [True: 908, False: 16]
  |  Branch (34584:21): [True: 842, False: 66]
  ------------------
34585|    842|            *out = (int64_t) bi;
34586|    842|            return 1;
34587|    842|        }
34588|    924|    }
34589|    563|    return 0;
34590|  1.73k|}
janet_scan_uint64:
34592|    833|int janet_scan_uint64(const uint8_t *str, int32_t len, uint64_t *out) {
34593|    833|    int neg;
34594|    833|    uint64_t bi;
34595|    833|    if (scan_uint64(str, len, &bi, &neg)) {
  ------------------
  |  Branch (34595:9): [True: 605, False: 228]
  ------------------
34596|    605|        if (!neg) {
  ------------------
  |  Branch (34596:13): [True: 563, False: 42]
  ------------------
34597|    563|            *out = bi;
34598|    563|            return 1;
34599|    563|        }
34600|    605|    }
34601|    270|    return 0;
34602|    833|}
janet_scan_numeric:
34609|  17.7k|    Janet *out) {
34610|  17.7k|    int result;
34611|  17.7k|    double num;
34612|  17.7k|    int64_t i64 = 0;
34613|  17.7k|    uint64_t u64 = 0;
34614|  17.7k|    if (len < 2 || str[len - 2] != ':') {
  ------------------
  |  Branch (34614:9): [True: 7.21k, False: 10.5k]
  |  Branch (34614:20): [True: 7.91k, False: 2.65k]
  ------------------
34615|  15.1k|        result = janet_scan_number_base(str, len, 0, &num);
34616|  15.1k|        *out = janet_wrap_number(num);
  ------------------
  |  |  835|  15.1k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
34617|  15.1k|        return result;
34618|  15.1k|    }
34619|  2.65k|    switch (str[len - 1]) {
34620|     55|        default:
  ------------------
  |  Branch (34620:9): [True: 55, False: 2.60k]
  ------------------
34621|     55|            return 1;
34622|     35|        case 'n':
  ------------------
  |  Branch (34622:9): [True: 35, False: 2.62k]
  ------------------
34623|     35|            result = janet_scan_number_base(str, len - 2, 0, &num);
34624|     35|            *out = janet_wrap_number(num);
  ------------------
  |  |  835|     35|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
34625|     35|            return result;
34626|       |        /* Condition is inverted janet_scan_int64 and janet_scan_uint64 */
34627|  1.73k|        case 's':
  ------------------
  |  Branch (34627:9): [True: 1.73k, False: 923]
  ------------------
34628|  1.73k|            result = !janet_scan_int64(str, len - 2, &i64);
34629|  1.73k|            *out = janet_wrap_s64(i64);
34630|  1.73k|            return result;
34631|    833|        case 'u':
  ------------------
  |  Branch (34631:9): [True: 833, False: 1.82k]
  ------------------
34632|    833|            result = !janet_scan_uint64(str, len - 2, &u64);
34633|    833|            *out = janet_wrap_u64(u64);
34634|    833|            return result;
34635|  2.65k|    }
34636|  2.65k|}
janet_struct_begin:
34690|  51.3k|JanetKV *janet_struct_begin(int32_t count) {
34691|       |    /* Calculate capacity as power of 2 after 2 * count. */
34692|  51.3k|    int32_t capacity = janet_tablen(2 * count);
34693|  51.3k|    if (capacity < 0) capacity = janet_tablen(count + 1);
  ------------------
  |  Branch (34693:9): [True: 0, False: 51.3k]
  ------------------
34694|       |
34695|  51.3k|    size_t size = sizeof(JanetStructHead) + (size_t) capacity * sizeof(JanetKV);
34696|  51.3k|    JanetStructHead *head = janet_gcalloc(JANET_MEMORY_STRUCT, size);
34697|  51.3k|    head->length = count;
34698|  51.3k|    head->capacity = capacity;
34699|  51.3k|    head->hash = 0;
34700|  51.3k|    head->proto = NULL;
34701|       |
34702|  51.3k|    JanetKV *st = (JanetKV *)(head->data);
34703|  51.3k|    janet_memempty(st, capacity);
34704|  51.3k|    return st;
34705|  51.3k|}
janet_struct_find:
34708|      1|const JanetKV *janet_struct_find(const JanetKV *st, Janet key) {
34709|       |    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)))
  |  |  ------------------
  ------------------
34710|      1|}
janet_struct_put_ext:
34720|   322k|void janet_struct_put_ext(JanetKV *st, Janet key, Janet value, int replace) {
34721|   322k|    int32_t cap = janet_struct_capacity(st);
  ------------------
  |  | 1849|   322k|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1846|   322k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
34722|   322k|    int32_t hash = janet_hash(key);
34723|   322k|    int32_t index = janet_maphash(cap, hash);
  ------------------
  |  |  396|   322k|#define janet_maphash(cap, hash) ((uint32_t)(hash) & (cap - 1))
  ------------------
34724|   322k|    int32_t i, j, dist;
34725|   322k|    int32_t bounds[4] = {index, cap, 0, index};
34726|   322k|    if (janet_checktype(key, JANET_NIL) || janet_checktype(value, JANET_NIL)) return;
  ------------------
  |  |  806|   644k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 116, False: 322k]
  |  |  |  Branch (806:6): [Folded, False: 322k]
  |  |  ------------------
  |  |  807|   644k|        ? 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|   644k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   322k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   322k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   322k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   322k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  if (janet_checktype(key, JANET_NIL) || janet_checktype(value, JANET_NIL)) return;
  ------------------
  |  |  806|   322k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 45, False: 322k]
  |  |  |  Branch (806:6): [Folded, False: 322k]
  |  |  ------------------
  |  |  807|   322k|        ? 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|   322k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   322k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   322k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   322k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   322k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34727|   322k|    if (janet_checktype(key, JANET_NUMBER) && isnan(janet_unwrap_number(key))) return;
  ------------------
  |  |  806|   644k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 1.08k, False: 320k]
  |  |  |  Branch (806:6): [True: 322k, Folded]
  |  |  ------------------
  |  |  807|   644k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|   322k|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 1.08k, False: 320k]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 320k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   644k|        : 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 (34727:47): [True: 0, False: 1.08k]
  ------------------
34728|       |    /* Avoid extra items */
34729|   322k|    if (janet_struct_hash(st) == janet_struct_length(st)) return;
  ------------------
  |  | 1850|   322k|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1846|   322k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                  if (janet_struct_hash(st) == janet_struct_length(st)) return;
  ------------------
  |  | 1848|   322k|#define janet_struct_length(t) (janet_struct_head(t)->length)
  |  |  ------------------
  |  |  |  | 1846|   322k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (34729:9): [True: 0, False: 322k]
  ------------------
34730|   322k|    for (dist = 0, j = 0; j < 4; j += 2)
  ------------------
  |  Branch (34730:27): [True: 322k, False: 0]
  ------------------
34731|   458k|        for (i = bounds[j]; i < bounds[j + 1]; i++, dist++) {
  ------------------
  |  Branch (34731:29): [True: 458k, False: 100]
  ------------------
34732|   458k|            int status;
34733|   458k|            int32_t otherhash;
34734|   458k|            int32_t otherindex, otherdist;
34735|   458k|            JanetKV *kv = st + i;
34736|       |            /* We found an empty slot, so just add key and value */
34737|   458k|            if (janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|   458k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 321k, False: 137k]
  |  |  |  Branch (806:6): [Folded, False: 458k]
  |  |  ------------------
  |  |  807|   458k|        ? 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|   458k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   458k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   458k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   458k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   458k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34738|   321k|                kv->key = key;
34739|   321k|                kv->value = value;
34740|       |                /* Update the temporary count */
34741|   321k|                janet_struct_hash(st)++;
  ------------------
  |  | 1850|   321k|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1846|   321k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
34742|   321k|                return;
34743|   321k|            }
34744|       |            /* Robinhood hashing - check if colliding kv pair
34745|       |             * is closer to their source than current. We use robinhood
34746|       |             * hashing to ensure that equivalent structs that are constructed
34747|       |             * with different order have the same internal layout, and therefor
34748|       |             * will compare properly - i.e., {1 2 3 4} should equal {3 4 1 2}.
34749|       |             * Collisions are resolved via an insertion sort insertion. */
34750|   137k|            otherhash = janet_hash(kv->key);
34751|   137k|            otherindex = janet_maphash(cap, otherhash);
  ------------------
  |  |  396|   137k|#define janet_maphash(cap, hash) ((uint32_t)(hash) & (cap - 1))
  ------------------
34752|   137k|            otherdist = (i + cap - otherindex) & (cap - 1);
34753|   137k|            if (dist < otherdist)
  ------------------
  |  Branch (34753:17): [True: 67.4k, False: 69.6k]
  ------------------
34754|  67.4k|                status = -1;
34755|  69.6k|            else if (otherdist < dist)
  ------------------
  |  Branch (34755:22): [True: 289, False: 69.3k]
  ------------------
34756|    289|                status = 1;
34757|  69.3k|            else if (hash < otherhash)
  ------------------
  |  Branch (34757:22): [True: 67.6k, False: 1.67k]
  ------------------
34758|  67.6k|                status = -1;
34759|  1.67k|            else if (otherhash < hash)
  ------------------
  |  Branch (34759:22): [True: 439, False: 1.23k]
  ------------------
34760|    439|                status = 1;
34761|  1.23k|            else
34762|  1.23k|                status = janet_compare(key, kv->key);
34763|       |            /* If other is closer to their ideal slot */
34764|   137k|            if (status == 1) {
  ------------------
  |  Branch (34764:17): [True: 799, False: 136k]
  ------------------
34765|       |                /* Swap current kv pair with pair in slot */
34766|    799|                JanetKV temp = *kv;
34767|    799|                kv->key = key;
34768|    799|                kv->value = value;
34769|    799|                key = temp.key;
34770|    799|                value = temp.value;
34771|       |                /* Save dist and hash of new kv pair */
34772|    799|                dist = otherdist;
34773|    799|                hash = otherhash;
34774|   136k|            } else if (status == 0) {
  ------------------
  |  Branch (34774:24): [True: 1.02k, False: 135k]
  ------------------
34775|  1.02k|                if (replace) {
  ------------------
  |  Branch (34775:21): [True: 1.02k, False: 0]
  ------------------
34776|       |                    /* A key was added to the struct more than once - replace old value */
34777|  1.02k|                    kv->value = value;
34778|  1.02k|                }
34779|  1.02k|                return;
34780|  1.02k|            }
34781|   137k|        }
34782|   322k|}
janet_struct_put:
34784|   322k|void janet_struct_put(JanetKV *st, Janet key, Janet value) {
34785|   322k|    janet_struct_put_ext(st, key, value, 1);
34786|   322k|}
janet_struct_end:
34789|  51.0k|const JanetKV *janet_struct_end(JanetKV *st) {
34790|  51.0k|    if (janet_struct_hash(st) != janet_struct_length(st)) {
  ------------------
  |  | 1850|  51.0k|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1846|  51.0k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                  if (janet_struct_hash(st) != janet_struct_length(st)) {
  ------------------
  |  | 1848|  51.0k|#define janet_struct_length(t) (janet_struct_head(t)->length)
  |  |  ------------------
  |  |  |  | 1846|  51.0k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (34790:9): [True: 294, False: 50.7k]
  ------------------
34791|       |        /* Error building struct, probably duplicate values. We need to rebuild
34792|       |         * the struct using only the values that went in. The second creation should always
34793|       |         * succeed. */
34794|    294|        JanetKV *newst = janet_struct_begin(janet_struct_hash(st));
  ------------------
  |  | 1850|    294|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1846|    294|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
34795|  7.91k|        for (int32_t i = 0; i < janet_struct_capacity(st); i++) {
  ------------------
  |  | 1849|  7.91k|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1846|  7.91k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (34795:29): [True: 7.62k, False: 294]
  ------------------
34796|  7.62k|            JanetKV *kv = st + i;
34797|  7.62k|            if (!janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|  7.62k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 7.62k]
  |  |  ------------------
  |  |  807|  7.62k|        ? 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.62k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  7.62k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  7.62k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  7.62k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  7.62k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (34797:17): [True: 1.22k, False: 6.39k]
  ------------------
34798|  1.22k|                janet_struct_put(newst, kv->key, kv->value);
34799|  1.22k|            }
34800|  7.62k|        }
34801|    294|        janet_struct_proto(newst) = janet_struct_proto(st);
  ------------------
  |  | 1851|    294|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1846|    294|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                      janet_struct_proto(newst) = janet_struct_proto(st);
  ------------------
  |  | 1851|    294|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1846|    294|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
34802|    294|        st = newst;
34803|    294|    }
34804|  51.0k|    janet_struct_hash(st) = janet_kv_calchash(st, janet_struct_capacity(st));
  ------------------
  |  | 1850|  51.0k|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1846|  51.0k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                  janet_struct_hash(st) = janet_kv_calchash(st, janet_struct_capacity(st));
  ------------------
  |  | 1849|  51.0k|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1846|  51.0k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
34805|  51.0k|    if (janet_struct_proto(st)) {
  ------------------
  |  | 1851|  51.0k|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1846|  51.0k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  |  |  |  Branch (1851:31): [True: 0, False: 51.0k]
  |  |  ------------------
  ------------------
34806|      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)))
  |  |  ------------------
  ------------------
34807|      0|    }
34808|  51.0k|    return (const JanetKV *)st;
34809|  51.0k|}
janet_struct_get:
34818|      1|Janet janet_struct_get(const JanetKV *st, Janet key) {
34819|      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 (34819:41): [True: 1, False: 1]
  |  Branch (34819:47): [True: 1, False: 0]
  ------------------
34820|      1|        const JanetKV *kv = janet_struct_find(st, key);
34821|      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 (34821:13): [True: 1, False: 0]
  |  Branch (34821:27): [True: 0, False: 1]
  ------------------
34822|      0|            return kv->value;
34823|      0|        }
34824|      1|    }
34825|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34826|      1|}
janet_lib_struct:
34956|  6.71k|void janet_lib_struct(JanetTable *env) {
34957|  6.71k|    JanetRegExt struct_cfuns[] = {
34958|  6.71k|        JANET_CORE_REG("struct/with-proto", cfun_struct_with_proto),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34959|  6.71k|        JANET_CORE_REG("struct/getproto", cfun_struct_getproto),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34960|  6.71k|        JANET_CORE_REG("struct/proto-flatten", cfun_struct_flatten),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34961|  6.71k|        JANET_CORE_REG("struct/to-table", cfun_struct_to_table),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34962|  6.71k|        JANET_CORE_REG("struct/rawget", cfun_struct_rawget),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34963|  6.71k|        JANET_REG_END
  ------------------
  |  | 2110|  6.71k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
34964|  6.71k|    };
34965|       |    janet_core_cfuns_ext(env, NULL, struct_cfuns);
34966|  6.71k|}
janet_symcache_init:
35011|  6.71k|void janet_symcache_init() {
35012|  6.71k|    janet_vm.cache_capacity = 1024;
35013|  6.71k|    janet_vm.cache = janet_calloc(1, (size_t) janet_vm.cache_capacity * sizeof(const uint8_t *));
  ------------------
  |  | 2412|  6.71k|#define janet_calloc(X, Y) calloc((X), (Y))
  ------------------
35014|  6.71k|    if (NULL == janet_vm.cache) {
  ------------------
  |  Branch (35014:9): [True: 0, False: 6.71k]
  ------------------
35015|      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]
  |  |  ------------------
  ------------------
35016|      0|    }
35017|  6.71k|    memset(&janet_vm.gensym_counter, '0', sizeof(janet_vm.gensym_counter));
35018|  6.71k|    janet_vm.gensym_counter[0] = '_';
35019|  6.71k|    janet_vm.cache_count = 0;
35020|  6.71k|    janet_vm.cache_deleted = 0;
35021|  6.71k|}
janet_symcache_deinit:
35024|  6.71k|void janet_symcache_deinit() {
35025|  6.71k|    janet_free((void *)janet_vm.cache);
  ------------------
  |  | 2415|  6.71k|#define janet_free(X) free((X))
  ------------------
35026|       |    janet_vm.cache = NULL;
35027|  6.71k|    janet_vm.cache_capacity = 0;
35028|  6.71k|    janet_vm.cache_count = 0;
35029|  6.71k|    janet_vm.cache_deleted = 0;
35030|  6.71k|}
janet_symbol_deinit:
35132|  13.4M|void janet_symbol_deinit(const uint8_t *sym) {
35133|  13.4M|    int status = 0;
35134|  13.4M|    const uint8_t **bucket = janet_symcache_find(sym, &status);
  ------------------
  |  |35087|  13.4M|    janet_symcache_findmem((str), janet_string_length(str), janet_string_hash(str), (success))
  |  |  ------------------
  |  |  |  | 1813|  13.4M|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1812|  13.4M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   janet_symcache_findmem((str), janet_string_length(str), janet_string_hash(str), (success))
  |  |  ------------------
  |  |  |  | 1814|  13.4M|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1812|  13.4M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35135|  13.4M|    if (status) {
  ------------------
  |  Branch (35135:9): [True: 13.4M, False: 0]
  ------------------
35136|  13.4M|        janet_vm.cache_count--;
35137|  13.4M|        janet_vm.cache_deleted++;
35138|  13.4M|        *bucket = JANET_SYMCACHE_DELETED;
35139|  13.4M|    }
35140|  13.4M|}
janet_symbol:
35143|  19.0M|const uint8_t *janet_symbol(const uint8_t *str, int32_t len) {
35144|  19.0M|    int32_t hash = janet_string_calchash(str, len);
35145|  19.0M|    uint8_t *newstr;
35146|  19.0M|    int success = 0;
35147|  19.0M|    const uint8_t **bucket = janet_symcache_findmem(str, len, hash, &success);
35148|  19.0M|    if (success)
  ------------------
  |  Branch (35148:9): [True: 5.61M, False: 13.4M]
  ------------------
35149|  5.61M|        return *bucket;
35150|  13.4M|    JanetStringHead *head = janet_gcalloc(JANET_MEMORY_SYMBOL, sizeof(JanetStringHead) + (size_t) len + 1);
35151|  13.4M|    head->hash = hash;
35152|  13.4M|    head->length = len;
35153|  13.4M|    newstr = (uint8_t *)(head->data);
35154|  13.4M|    safe_memcpy(newstr, str, len);
35155|  13.4M|    newstr[len] = 0;
35156|  13.4M|    janet_symcache_put((const uint8_t *)newstr, bucket);
35157|  13.4M|    return newstr;
35158|  19.0M|}
janet_csymbol:
35161|  2.50M|const uint8_t *janet_csymbol(const char *cstr) {
35162|  2.50M|    return janet_symbol((const uint8_t *)cstr, (int32_t) strlen(cstr));
35163|  2.50M|}
janet_table_init:
35287|  4.19M|JanetTable *janet_table_init(JanetTable *table, int32_t capacity) {
35288|  4.19M|    return janet_table_init_impl(table, capacity, 1);
35289|  4.19M|}
janet_table_init_raw:
35292|  20.1k|JanetTable *janet_table_init_raw(JanetTable *table, int32_t capacity) {
35293|  20.1k|    return janet_table_init_impl(table, capacity, 0);
35294|  20.1k|}
janet_table_deinit:
35297|  4.21M|void janet_table_deinit(JanetTable *table) {
35298|  4.21M|    if (table->gc.flags & JANET_TABLE_FLAG_STACK) {
  ------------------
  |  |35247|  4.21M|#define JANET_TABLE_FLAG_STACK 0x10000
  ------------------
  |  Branch (35298:9): [True: 4.19M, False: 20.1k]
  ------------------
35299|  4.19M|        janet_sfree(table->data);
35300|  4.19M|    } else {
35301|  20.1k|        janet_free(table->data);
  ------------------
  |  | 2415|  20.1k|#define janet_free(X) free((X))
  ------------------
35302|  20.1k|    }
35303|  4.21M|}
janet_table:
35307|  4.93M|JanetTable *janet_table(int32_t capacity) {
35308|  4.93M|    JanetTable *table = janet_gcalloc(JANET_MEMORY_TABLE, sizeof(JanetTable));
35309|  4.93M|    return janet_table_init_impl(table, capacity, 0);
35310|  4.93M|}
janet_table_find:
35329|  90.8M|JanetKV *janet_table_find(JanetTable *t, Janet key) {
35330|  90.8M|    return (JanetKV *) janet_dict_find(t->data, t->capacity, key);
35331|  90.8M|}
janet_table_get:
35365|  10.3M|Janet janet_table_get(JanetTable *t, Janet key) {
35366|  18.2M|    for (int i = JANET_MAX_PROTO_DEPTH; t && i; t = t->proto, --i) {
  ------------------
  |  |  299|  10.3M|#define JANET_MAX_PROTO_DEPTH 200
  ------------------
  |  Branch (35366:41): [True: 10.3M, False: 7.93M]
  |  Branch (35366:46): [True: 10.3M, False: 0]
  ------------------
35367|  10.3M|        JanetKV *bucket = janet_table_find(t, key);
35368|  10.3M|        if (NULL != bucket && !janet_checktype(bucket->key, JANET_NIL))
  ------------------
  |  |  806|  10.3M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 10.3M]
  |  |  ------------------
  |  |  807|  10.3M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  10.3M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  10.3M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  10.3M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  10.3M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  10.3M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35368:13): [True: 10.3M, False: 0]
  |  Branch (35368:31): [True: 2.40M, False: 7.93M]
  ------------------
35369|  2.40M|            return bucket->value;
35370|  10.3M|    }
35371|  7.93M|    return janet_wrap_nil();
  ------------------
  |  |  831|  7.93M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  7.93M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  7.93M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  7.93M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35372|  10.3M|}
janet_table_get_keyword:
35375|  80.5k|Janet janet_table_get_keyword(JanetTable *t, const char *keyword) {
35376|  80.5k|    int32_t keyword_len = (int32_t) strlen(keyword);
35377|   141k|    for (int i = JANET_MAX_PROTO_DEPTH; t && i; t = t->proto, --i) {
  ------------------
  |  |  299|  80.5k|#define JANET_MAX_PROTO_DEPTH 200
  ------------------
  |  Branch (35377:41): [True: 80.5k, False: 60.4k]
  |  Branch (35377:46): [True: 80.5k, False: 0]
  ------------------
35378|  80.5k|        JanetKV *bucket = (JanetKV *) janet_dict_find_keyword(t->data, t->capacity, (const uint8_t *) keyword, keyword_len);
35379|  80.5k|        if (NULL != bucket && !janet_checktype(bucket->key, JANET_NIL))
  ------------------
  |  |  806|  80.5k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 80.5k]
  |  |  ------------------
  |  |  807|  80.5k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  80.5k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  80.5k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  80.5k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  80.5k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  80.5k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35379:13): [True: 80.5k, False: 0]
  |  Branch (35379:31): [True: 20.1k, False: 60.4k]
  ------------------
35380|  20.1k|            return bucket->value;
35381|  80.5k|    }
35382|  60.4k|    return janet_wrap_nil();
  ------------------
  |  |  831|  60.4k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  60.4k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  60.4k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  60.4k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35383|  80.5k|}
janet_table_get_ex:
35386|     34|Janet janet_table_get_ex(JanetTable *t, Janet key, JanetTable **which) {
35387|     68|    for (int i = JANET_MAX_PROTO_DEPTH; t && i; t = t->proto, --i) {
  ------------------
  |  |  299|     34|#define JANET_MAX_PROTO_DEPTH 200
  ------------------
  |  Branch (35387:41): [True: 34, False: 34]
  |  Branch (35387:46): [True: 34, False: 0]
  ------------------
35388|     34|        JanetKV *bucket = janet_table_find(t, key);
35389|     34|        if (NULL != bucket && !janet_checktype(bucket->key, JANET_NIL)) {
  ------------------
  |  |  806|     34|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 34]
  |  |  ------------------
  |  |  807|     34|        ? 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|     34|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|     34|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|     34|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     34|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     34|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35389:13): [True: 34, False: 0]
  |  Branch (35389:31): [True: 0, False: 34]
  ------------------
35390|      0|            *which = t;
35391|      0|            return bucket->value;
35392|      0|        }
35393|     34|    }
35394|     34|    return janet_wrap_nil();
  ------------------
  |  |  831|     34|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|     34|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     34|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     34|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35395|     34|}
janet_table_rawget:
35398|  18.2k|Janet janet_table_rawget(JanetTable *t, Janet key) {
35399|  18.2k|    JanetKV *bucket = janet_table_find(t, key);
35400|  18.2k|    if (NULL != bucket && !janet_checktype(bucket->key, JANET_NIL))
  ------------------
  |  |  806|  18.2k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 18.2k]
  |  |  ------------------
  |  |  807|  18.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|  18.2k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  18.2k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  18.2k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  18.2k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  18.2k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35400:9): [True: 18.2k, False: 0]
  |  Branch (35400:27): [True: 146, False: 18.0k]
  ------------------
35401|    146|        return bucket->value;
35402|  18.0k|    else
35403|  18.0k|        return janet_wrap_nil();
  ------------------
  |  |  831|  18.0k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  18.0k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  18.0k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  18.0k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35404|  18.2k|}
janet_table_remove:
35408|  12.0M|Janet janet_table_remove(JanetTable *t, Janet key) {
35409|  12.0M|    JanetKV *bucket = janet_table_find(t, key);
35410|  12.0M|    if (NULL != bucket && !janet_checktype(bucket->key, JANET_NIL)) {
  ------------------
  |  |  806|  12.0M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 12.0M]
  |  |  ------------------
  |  |  807|  12.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|  12.0M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  12.0M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  12.0M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  12.0M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  12.0M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35410:9): [True: 12.0M, False: 0]
  |  Branch (35410:27): [True: 7.86M, False: 4.16M]
  ------------------
35411|  7.86M|        Janet ret = bucket->value;
35412|  7.86M|        t->count--;
35413|  7.86M|        t->deleted++;
35414|  7.86M|        bucket->key = janet_wrap_nil();
  ------------------
  |  |  831|  7.86M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  7.86M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  7.86M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  7.86M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35415|  7.86M|        bucket->value = janet_wrap_false();
  ------------------
  |  |  833|  7.86M|#define janet_wrap_false() janet_nanbox_from_payload(JANET_BOOLEAN, 0)
  |  |  ------------------
  |  |  |  |  822|  7.86M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  7.86M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  7.86M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35416|  7.86M|        return ret;
35417|  7.86M|    } else {
35418|  4.16M|        return janet_wrap_nil();
  ------------------
  |  |  831|  4.16M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  4.16M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  4.16M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  4.16M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35419|  4.16M|    }
35420|  12.0M|}
janet_table_put:
35423|  39.4M|void janet_table_put(JanetTable *t, Janet key, Janet value) {
35424|  39.4M|    if (janet_checktype(key, JANET_NIL)) return;
  ------------------
  |  |  806|  39.4M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 45, False: 39.4M]
  |  |  |  Branch (806:6): [Folded, False: 39.4M]
  |  |  ------------------
  |  |  807|  39.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|  39.4M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  39.4M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  39.4M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  39.4M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  39.4M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35425|  39.4M|    if (janet_checktype(key, JANET_NUMBER) && isnan(janet_unwrap_number(key))) return;
  ------------------
  |  |  806|  78.9M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 2.78k, False: 39.4M]
  |  |  |  Branch (806:6): [True: 39.4M, Folded]
  |  |  ------------------
  |  |  807|  78.9M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|  39.4M|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 2.78k, False: 39.4M]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 39.4M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  78.9M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35425:47): [True: 0, False: 2.78k]
  ------------------
35426|  39.4M|    if (janet_checktype(value, JANET_NIL)) {
  ------------------
  |  |  806|  39.4M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 70, False: 39.4M]
  |  |  |  Branch (806:6): [Folded, False: 39.4M]
  |  |  ------------------
  |  |  807|  39.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|  39.4M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  39.4M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  39.4M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  39.4M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  39.4M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35427|     70|        janet_table_remove(t, key);
35428|  39.4M|    } else {
35429|  39.4M|        JanetKV *bucket = janet_table_find(t, key);
35430|  39.4M|        if (NULL != bucket && !janet_checktype(bucket->key, JANET_NIL)) {
  ------------------
  |  |  806|  39.4M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 39.4M]
  |  |  ------------------
  |  |  807|  39.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|  39.4M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  39.4M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  39.4M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  39.4M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  39.4M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35430:13): [True: 39.4M, False: 0]
  |  Branch (35430:31): [True: 479, False: 39.4M]
  ------------------
35431|    479|            bucket->value = value;
35432|  39.4M|        } else {
35433|  39.4M|            if (NULL == bucket || 2 * (t->count + t->deleted + 1) > t->capacity) {
  ------------------
  |  Branch (35433:17): [True: 0, False: 39.4M]
  |  Branch (35433:35): [True: 4.72M, False: 34.7M]
  ------------------
35434|  4.72M|                janet_table_rehash(t, janet_tablen(2 * t->count + 2));
35435|  4.72M|                bucket = janet_table_find(t, key);
35436|  4.72M|            }
35437|  39.4M|            if (janet_checktype(bucket->value, JANET_BOOLEAN))
  ------------------
  |  |  806|  39.4M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 39.4M]
  |  |  |  Branch (806:6): [Folded, False: 39.4M]
  |  |  ------------------
  |  |  807|  39.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|  39.4M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  39.4M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  39.4M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  39.4M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  39.4M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35438|      0|                --t->deleted;
35439|  39.4M|            bucket->key = key;
35440|  39.4M|            bucket->value = value;
35441|  39.4M|            ++t->count;
35442|  39.4M|        }
35443|  39.4M|    }
35444|  39.4M|}
janet_table_clone:
35473|    127|JanetTable *janet_table_clone(JanetTable *table) {
35474|    127|    JanetTable *newTable = janet_gcalloc(JANET_MEMORY_TABLE, sizeof(JanetTable));
35475|    127|    newTable->count = table->count;
35476|    127|    newTable->capacity = table->capacity;
35477|    127|    newTable->deleted = table->deleted;
35478|    127|    newTable->proto = table->proto;
35479|    127|    newTable->data = array_allocate(sizeof(JanetKV), newTable->capacity);
35480|    127|    if (NULL == newTable->data) {
  ------------------
  |  Branch (35480:9): [True: 0, False: 127]
  ------------------
35481|      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]
  |  |  ------------------
  ------------------
35482|      0|    }
35483|    127|    memcpy(newTable->data, table->data, (size_t) table->capacity * sizeof(JanetKV));
35484|    127|    return newTable;
35485|    127|}
janet_lib_table:
35653|  6.71k|void janet_lib_table(JanetTable *env) {
35654|  6.71k|    JanetRegExt table_cfuns[] = {
35655|  6.71k|        JANET_CORE_REG("table/new", cfun_table_new),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35656|  6.71k|        JANET_CORE_REG("table/weak", cfun_table_weak),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35657|  6.71k|        JANET_CORE_REG("table/weak-keys", cfun_table_weak_keys),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35658|  6.71k|        JANET_CORE_REG("table/weak-values", cfun_table_weak_values),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35659|  6.71k|        JANET_CORE_REG("table/to-struct", cfun_table_tostruct),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35660|  6.71k|        JANET_CORE_REG("table/getproto", cfun_table_getproto),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35661|  6.71k|        JANET_CORE_REG("table/setproto", cfun_table_setproto),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35662|  6.71k|        JANET_CORE_REG("table/rawget", cfun_table_rawget),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35663|  6.71k|        JANET_CORE_REG("table/clone", cfun_table_clone),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35664|  6.71k|        JANET_CORE_REG("table/clear", cfun_table_clear),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35665|  6.71k|        JANET_CORE_REG("table/proto-flatten", cfun_table_proto_flatten),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35666|  6.71k|        JANET_REG_END
  ------------------
  |  | 2110|  6.71k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
35667|  6.71k|    };
35668|       |    janet_core_cfuns_ext(env, NULL, table_cfuns);
35669|  6.71k|}
janet_tuple_begin:
35708|  5.11M|Janet *janet_tuple_begin(int32_t length) {
35709|  5.11M|    size_t size = sizeof(JanetTupleHead) + ((size_t) length * sizeof(Janet));
35710|  5.11M|    JanetTupleHead *head = janet_gcalloc(JANET_MEMORY_TUPLE, size);
35711|  5.11M|    head->sm_line = -1;
35712|  5.11M|    head->sm_column = -1;
35713|  5.11M|    head->length = length;
35714|  5.11M|    return (Janet *)(head->data);
35715|  5.11M|}
janet_tuple_end:
35718|  5.11M|const Janet *janet_tuple_end(Janet *tuple) {
35719|  5.11M|    janet_tuple_hash(tuple) = janet_array_calchash(tuple, janet_tuple_length(tuple));
  ------------------
  |  | 1803|  5.11M|#define janet_tuple_hash(t) (janet_tuple_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1800|  5.11M|#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.11M|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1800|  5.11M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
35720|  5.11M|    return (const Janet *)tuple;
35721|  5.11M|}
janet_tuple_n:
35724|  15.2k|const Janet *janet_tuple_n(const Janet *values, int32_t n) {
35725|  15.2k|    Janet *t = janet_tuple_begin(n);
35726|  15.2k|    safe_memcpy(t, values, sizeof(Janet) * n);
35727|  15.2k|    return janet_tuple_end(t);
35728|  15.2k|}
janet_lib_tuple:
35828|  6.71k|void janet_lib_tuple(JanetTable *env) {
35829|  6.71k|    JanetRegExt tuple_cfuns[] = {
35830|  6.71k|        JANET_CORE_REG("tuple/brackets", cfun_tuple_brackets),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35831|  6.71k|        JANET_CORE_REG("tuple/slice", cfun_tuple_slice),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35832|  6.71k|        JANET_CORE_REG("tuple/type", cfun_tuple_type),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35833|  6.71k|        JANET_CORE_REG("tuple/sourcemap", cfun_tuple_sourcemap),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35834|  6.71k|        JANET_CORE_REG("tuple/setmap", cfun_tuple_setmap),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35835|  6.71k|        JANET_CORE_REG("tuple/join", cfun_tuple_join),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35836|  6.71k|        JANET_REG_END
  ------------------
  |  | 2110|  6.71k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
35837|  6.71k|    };
35838|       |    janet_core_cfuns_ext(env, NULL, tuple_cfuns);
35839|  6.71k|}
janet_hash_mix:
35965|  46.1M|uint32_t janet_hash_mix(uint32_t input, uint32_t more) {
35966|  46.1M|    uint32_t mix1 = (more + 0x9e3779b9 + (input << 6) + (input >> 2));
35967|  46.1M|    return input ^ (0x9e3779b9 + (mix1 << 6) + (mix1 >> 2));
35968|  46.1M|}
janet_string_calchash:
35972|  31.1M|int32_t janet_string_calchash(const uint8_t *str, int32_t len) {
35973|  31.1M|    if (NULL == str || len == 0) return 5381;
  ------------------
  |  Branch (35973:9): [True: 313, False: 31.1M]
  |  Branch (35973:24): [True: 1.64M, False: 29.4M]
  ------------------
35974|  29.4M|    const uint8_t *end = str + len;
35975|  29.4M|    uint32_t hash = 5381;
35976|  2.17G|    while (str < end)
  ------------------
  |  Branch (35976:12): [True: 2.14G, False: 29.4M]
  ------------------
35977|  2.14G|        hash = (hash << 5) + hash + *str++;
35978|  29.4M|    hash = janet_hash_mix(hash, (uint32_t) len);
35979|  29.4M|    return (int32_t) hash;
35980|  31.1M|}
janet_array_calchash:
36095|  5.11M|int32_t janet_array_calchash(const Janet *array, int32_t len) {
36096|  5.11M|    const Janet *end = array + len;
36097|  5.11M|    uint32_t hash = 33;
36098|  20.1M|    while (array < end) {
  ------------------
  |  Branch (36098:12): [True: 15.0M, False: 5.11M]
  ------------------
36099|  15.0M|        hash = janet_hash_mix(hash, janet_hash(*array++));
36100|  15.0M|    }
36101|  5.11M|    return (int32_t) hash;
36102|  5.11M|}
janet_kv_calchash:
36105|  51.0k|int32_t janet_kv_calchash(const JanetKV *kvs, int32_t len) {
36106|  51.0k|    const JanetKV *end = kvs + len;
36107|  51.0k|    uint32_t hash = 33;
36108|   880k|    while (kvs < end) {
  ------------------
  |  Branch (36108:12): [True: 829k, False: 51.0k]
  ------------------
36109|   829k|        hash = janet_hash_mix(hash, janet_hash(kvs->key));
36110|   829k|        hash = janet_hash_mix(hash, janet_hash(kvs->value));
36111|   829k|        kvs++;
36112|   829k|    }
36113|  51.0k|    return (int32_t) hash;
36114|  51.0k|}
janet_tablen:
36118|  13.9M|int32_t janet_tablen(int32_t n) {
36119|  13.9M|    if (n < 0) return 0;
  ------------------
  |  Branch (36119:9): [True: 0, False: 13.9M]
  ------------------
36120|  13.9M|    n |= n >> 1;
36121|  13.9M|    n |= n >> 2;
36122|  13.9M|    n |= n >> 4;
36123|  13.9M|    n |= n >> 8;
36124|  13.9M|    n |= n >> 16;
36125|  13.9M|    return n == INT32_MAX ? INT32_MAX : n + 1;
  ------------------
  |  Branch (36125:12): [True: 0, False: 13.9M]
  ------------------
36126|  13.9M|}
safe_memcpy:
36129|  25.4M|void safe_memcpy(void *dest, const void *src, size_t len) {
36130|  25.4M|    if (!len) return;
  ------------------
  |  Branch (36130:9): [True: 1.65M, False: 23.8M]
  ------------------
36131|  23.8M|    memcpy(dest, src, len);
36132|  23.8M|}
janet_dict_find_deep:
36136|  24.1M|const JanetKV *janet_dict_find_deep(const JanetKV *buckets, int32_t cap, Janet key) {
36137|  24.1M|    int32_t index = janet_maphash(cap, janet_hash(key));
  ------------------
  |  |  396|  24.1M|#define janet_maphash(cap, hash) ((uint32_t)(hash) & (cap - 1))
  ------------------
36138|  24.1M|    int32_t i;
36139|  24.1M|    const JanetKV *first_bucket = NULL;
36140|       |    /* Higher half */
36141|  29.8M|    for (i = index; i < cap; i++) {
  ------------------
  |  Branch (36141:21): [True: 29.0M, False: 738k]
  ------------------
36142|  29.0M|        const JanetKV *kv = buckets + i;
36143|  29.0M|        if (janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|  29.0M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 18.7M, False: 10.3M]
  |  |  |  Branch (806:6): [Folded, False: 29.0M]
  |  |  ------------------
  |  |  807|  29.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|  29.0M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  29.0M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  29.0M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  29.0M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  29.0M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36144|  18.7M|            if (janet_checktype(kv->value, JANET_NIL)) {
  ------------------
  |  |  806|  18.7M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 16.3M, False: 2.39M]
  |  |  |  Branch (806:6): [Folded, False: 18.7M]
  |  |  ------------------
  |  |  807|  18.7M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  18.7M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  18.7M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  18.7M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  18.7M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  18.7M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36145|  16.3M|                return kv;
36146|  16.3M|            } else if (NULL == first_bucket) {
  ------------------
  |  Branch (36146:24): [True: 1.53M, False: 857k]
  ------------------
36147|  1.53M|                first_bucket = kv;
36148|  1.53M|            }
36149|  18.7M|        } else if (janet_bitwise_same(kv->key, key) || janet_equals(kv->key, key)) {
  ------------------
  |  |  401|  20.6M|#define janet_bitwise_same(x, y) (janet_u64(x) == janet_u64(y))
  |  |  ------------------
  |  |  |  |  788|  10.3M|#define janet_u64(x) ((x).u64)
  |  |  ------------------
  |  |               #define janet_bitwise_same(x, y) (janet_u64(x) == janet_u64(y))
  |  |  ------------------
  |  |  |  |  788|  10.3M|#define janet_u64(x) ((x).u64)
  |  |  ------------------
  |  |  |  Branch (401:34): [True: 7.01M, False: 3.29M]
  |  |  ------------------
  ------------------
  |  Branch (36149:56): [True: 1.46k, False: 3.29M]
  ------------------
36150|  7.01M|            return buckets + i;
36151|  7.01M|        }
36152|  29.0M|    }
36153|       |    /* Lower half */
36154|  1.06M|    for (i = 0; i < index; i++) {
  ------------------
  |  Branch (36154:17): [True: 1.06M, False: 0]
  ------------------
36155|  1.06M|        const JanetKV *kv = buckets + i;
36156|  1.06M|        if (janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|  1.06M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 813k, False: 246k]
  |  |  |  Branch (806:6): [Folded, False: 1.06M]
  |  |  ------------------
  |  |  807|  1.06M|        ? 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.06M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  1.06M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  1.06M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.06M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.06M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36157|   813k|            if (janet_checktype(kv->value, JANET_NIL)) {
  ------------------
  |  |  806|   813k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 661k, False: 152k]
  |  |  |  Branch (806:6): [Folded, False: 813k]
  |  |  ------------------
  |  |  807|   813k|        ? 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|   813k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   813k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   813k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   813k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   813k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36158|   661k|                return kv;
36159|   661k|            } else if (NULL == first_bucket) {
  ------------------
  |  Branch (36159:24): [True: 103k, False: 48.2k]
  ------------------
36160|   103k|                first_bucket = kv;
36161|   103k|            }
36162|   813k|        } else if (janet_bitwise_same(kv->key, key) || janet_equals(kv->key, key)) {
  ------------------
  |  |  401|   493k|#define janet_bitwise_same(x, y) (janet_u64(x) == janet_u64(y))
  |  |  ------------------
  |  |  |  |  788|   246k|#define janet_u64(x) ((x).u64)
  |  |  ------------------
  |  |               #define janet_bitwise_same(x, y) (janet_u64(x) == janet_u64(y))
  |  |  ------------------
  |  |  |  |  788|   246k|#define janet_u64(x) ((x).u64)
  |  |  ------------------
  |  |  |  Branch (401:34): [True: 77.0k, False: 169k]
  |  |  ------------------
  ------------------
  |  Branch (36162:56): [True: 74, False: 169k]
  ------------------
36163|  77.1k|            return buckets + i;
36164|  77.1k|        }
36165|  1.06M|    }
36166|      0|    return first_bucket;
36167|   738k|}
janet_dict_find_keyword:
36173|  80.5k|    const uint8_t *cstr, int32_t cstr_len) {
36174|  80.5k|    int32_t hash = janet_string_calchash(cstr, cstr_len);
36175|  80.5k|    int32_t index = janet_maphash(cap, hash);
  ------------------
  |  |  396|  80.5k|#define janet_maphash(cap, hash) ((uint32_t)(hash) & (cap - 1))
  ------------------
36176|  80.5k|    int32_t i;
36177|  80.5k|    const JanetKV *first_bucket = NULL;
36178|       |    /* Higher half */
36179|   120k|    for (i = index; i < cap; i++) {
  ------------------
  |  Branch (36179:21): [True: 120k, False: 0]
  ------------------
36180|   120k|        const JanetKV *kv = buckets + i;
36181|   120k|        if (janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|   120k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 60.4k, False: 60.4k]
  |  |  |  Branch (806:6): [Folded, False: 120k]
  |  |  ------------------
  |  |  807|   120k|        ? 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|   120k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   120k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   120k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   120k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   120k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36182|  60.4k|            if (janet_checktype(kv->value, JANET_NIL)) {
  ------------------
  |  |  806|  60.4k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 60.4k, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 60.4k]
  |  |  ------------------
  |  |  807|  60.4k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  60.4k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  60.4k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  60.4k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  60.4k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  60.4k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36183|  60.4k|                return kv;
36184|  60.4k|            } else if (NULL == first_bucket) {
  ------------------
  |  Branch (36184:24): [True: 0, False: 0]
  ------------------
36185|      0|                first_bucket = kv;
36186|      0|            }
36187|  60.4k|        } else if (janet_checktype(kv->key, JANET_KEYWORD)) {
  ------------------
  |  |  806|  60.4k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 60.4k, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 60.4k]
  |  |  ------------------
  |  |  807|  60.4k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  60.4k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  60.4k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  60.4k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  60.4k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  60.4k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36188|       |            /* Works for symbol and keyword, too */
36189|  60.4k|            JanetString str = janet_unwrap_string(kv->key);
  ------------------
  |  |  863|  60.4k|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
36190|  60.4k|            int32_t len = janet_string_length(str);
  ------------------
  |  | 1813|  60.4k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|  60.4k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
36191|  60.4k|            if (hash == janet_string_hash(str) && len == cstr_len && !memcmp(str, cstr, len)) {
  ------------------
  |  | 1814|   120k|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  ------------------
  |  |  |  | 1812|  60.4k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (36191:17): [True: 20.1k, False: 40.2k]
  |  Branch (36191:51): [True: 20.1k, False: 0]
  |  Branch (36191:70): [True: 20.1k, False: 0]
  ------------------
36192|  20.1k|                return buckets + i;
36193|  20.1k|            }
36194|  60.4k|        }
36195|   120k|    }
36196|       |    /* Lower half */
36197|      0|    for (i = 0; i < index; i++) {
  ------------------
  |  Branch (36197:17): [True: 0, False: 0]
  ------------------
36198|      0|        const JanetKV *kv = buckets + i;
36199|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36200|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36201|      0|                return kv;
36202|      0|            } else if (NULL == first_bucket) {
  ------------------
  |  Branch (36202:24): [True: 0, False: 0]
  ------------------
36203|      0|                first_bucket = kv;
36204|      0|            }
36205|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36206|       |            /* Works for symbol and keyword, too */
36207|      0|            JanetString str = janet_unwrap_string(kv->key);
  ------------------
  |  |  863|      0|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
36208|      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)))
  |  |  ------------------
  ------------------
36209|      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 (36209:17): [True: 0, False: 0]
  |  Branch (36209:51): [True: 0, False: 0]
  |  Branch (36209:70): [True: 0, False: 0]
  ------------------
36210|      0|                return buckets + i;
36211|      0|            }
36212|      0|        }
36213|      0|    }
36214|      0|    return first_bucket;
36215|      0|}
janet_cstrcmp:
36240|  82.6k|int janet_cstrcmp(const uint8_t *str, const char *other) {
36241|  82.6k|    int32_t len = janet_string_length(str);
  ------------------
  |  | 1813|  82.6k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|  82.6k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
36242|  82.6k|    int32_t index;
36243|   156k|    for (index = 0; index < len; index++) {
  ------------------
  |  Branch (36243:21): [True: 139k, False: 16.0k]
  ------------------
36244|   139k|        uint8_t c = str[index];
36245|   139k|        uint8_t k = ((const uint8_t *)other)[index];
36246|   139k|        if (c < k) return -1;
  ------------------
  |  Branch (36246:13): [True: 22.3k, False: 117k]
  ------------------
36247|   117k|        if (c > k) return 1;
  ------------------
  |  Branch (36247:13): [True: 44.1k, False: 73.4k]
  ------------------
36248|  73.4k|        if (k == '\0') break;
  ------------------
  |  Branch (36248:13): [True: 0, False: 73.4k]
  ------------------
36249|  73.4k|    }
36250|  16.0k|    return (other[index] == '\0') ? 0 : -1;
  ------------------
  |  Branch (36250:12): [True: 15.7k, False: 270]
  ------------------
36251|  82.6k|}
janet_strbinsearch:
36260|  16.1k|    const uint8_t *key) {
36261|  16.1k|    size_t low = 0;
36262|  16.1k|    size_t hi = tabcount;
36263|  16.1k|    const char *t = (const char *)tab;
36264|  83.0k|    while (low < hi) {
  ------------------
  |  Branch (36264:12): [True: 82.6k, False: 397]
  ------------------
36265|  82.6k|        size_t mid = low + ((hi - low) / 2);
36266|  82.6k|        const char **item = (const char **)(t + mid * itemsize);
36267|  82.6k|        const char *name = *item;
36268|  82.6k|        int comp = janet_cstrcmp(key, name);
36269|  82.6k|        if (comp < 0) {
  ------------------
  |  Branch (36269:13): [True: 22.6k, False: 59.9k]
  ------------------
36270|  22.6k|            hi = mid;
36271|  59.9k|        } else if (comp > 0) {
  ------------------
  |  Branch (36271:20): [True: 44.1k, False: 15.7k]
  ------------------
36272|  44.1k|            low = mid + 1;
36273|  44.1k|        } else {
36274|  15.7k|            return (const void *)item;
36275|  15.7k|        }
36276|  82.6k|    }
36277|    397|    return NULL;
36278|  16.1k|}
janet_registry_put:
36340|  2.36M|    int32_t source_line) {
36341|  2.36M|    if (janet_vm.registry_count == janet_vm.registry_cap) {
  ------------------
  |  Branch (36341:9): [True: 6.71k, False: 2.35M]
  ------------------
36342|  6.71k|        size_t newcap = (janet_vm.registry_count + 1) * 2;
36343|       |        /* Size it nicely with core by default */
36344|  6.71k|        if (newcap < 512) {
  ------------------
  |  Branch (36344:13): [True: 6.71k, False: 0]
  ------------------
36345|  6.71k|            newcap = 512;
36346|  6.71k|        }
36347|  6.71k|        void *newmem = janet_realloc(janet_vm.registry, newcap * sizeof(JanetCFunRegistry));
  ------------------
  |  | 2409|  6.71k|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
36348|  6.71k|        if (NULL == newmem) {
  ------------------
  |  Branch (36348:13): [True: 0, False: 6.71k]
  ------------------
36349|      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]
  |  |  ------------------
  ------------------
36350|      0|        }
36351|  6.71k|        janet_vm.registry = newmem;
36352|  6.71k|        janet_vm.registry_cap = newcap;
36353|  6.71k|    }
36354|  2.36M|    JanetCFunRegistry value = {
36355|  2.36M|        key,
36356|  2.36M|        name,
36357|  2.36M|        name_prefix,
36358|  2.36M|        source_file,
36359|  2.36M|        source_line
36360|  2.36M|    };
36361|  2.36M|    janet_vm.registry[janet_vm.registry_count++] = value;
36362|  2.36M|    janet_vm.registry_dirty = 1;
36363|  2.36M|}
janet_register_abstract_type:
36489|  60.4k|void janet_register_abstract_type(const JanetAbstractType *at) {
36490|  60.4k|    janet_check_pointer_align((void *) at);
36491|  60.4k|    Janet sym = janet_csymbolv(at->name);
  ------------------
  |  | 1837|  60.4k|#define janet_csymbolv(cstr) janet_wrap_symbol(janet_csymbol(cstr))
  |  |  ------------------
  |  |  |  |  849|  60.4k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  60.4k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  60.4k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  60.4k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36492|  60.4k|    Janet check = janet_table_get(janet_vm.abstract_registry, sym);
36493|  60.4k|    if (!janet_checktype(check, JANET_NIL) && at != janet_unwrap_pointer(check)) {
  ------------------
  |  |  806|   120k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 60.4k]
  |  |  ------------------
  |  |  807|   120k|        ? 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|   120k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  60.4k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  60.4k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  60.4k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  60.4k|#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 (36493:9): [True: 0, False: 60.4k]
  |  Branch (36493:47): [True: 0, False: 0]
  ------------------
36494|      0|        janet_panicf("cannot register abstract type %s, "
36495|      0|                     "a type with the same name exists", at->name);
36496|      0|    }
36497|  60.4k|    janet_table_put(janet_vm.abstract_registry, sym, janet_wrap_pointer((void *) at));
  ------------------
  |  |  854|  60.4k|#define janet_wrap_pointer(s) janet_nanbox_wrap_((s), JANET_POINTER)
  |  |  ------------------
  |  |  |  |  825|  60.4k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  60.4k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  60.4k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36498|  60.4k|}
janet_core_def_sm:
36509|  20.1k|void janet_core_def_sm(JanetTable *env, const char *name, Janet x, const void *p, const void *sf, int32_t sl) {
36510|  20.1k|    (void) sf;
36511|  20.1k|    (void) sl;
36512|  20.1k|    (void) p;
36513|  20.1k|    Janet key = janet_csymbolv(name);
  ------------------
  |  | 1837|  20.1k|#define janet_csymbolv(cstr) janet_wrap_symbol(janet_csymbol(cstr))
  |  |  ------------------
  |  |  |  |  849|  20.1k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  20.1k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  20.1k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  20.1k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36514|  20.1k|    janet_table_put(env, key, x);
36515|  20.1k|    if (janet_checktype(x, JANET_CFUNCTION)) {
  ------------------
  |  |  806|  20.1k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 20.1k]
  |  |  |  Branch (806:6): [Folded, False: 20.1k]
  |  |  ------------------
  |  |  807|  20.1k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  20.1k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  20.1k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  20.1k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  20.1k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  20.1k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36516|      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))
  ------------------
36517|      0|    }
36518|  20.1k|}
janet_core_cfuns_ext:
36520|   147k|void janet_core_cfuns_ext(JanetTable *env, const char *regprefix, const JanetRegExt *cfuns) {
36521|   147k|    (void) regprefix;
36522|  2.51M|    while (cfuns->name) {
  ------------------
  |  Branch (36522:12): [True: 2.36M, False: 147k]
  ------------------
36523|  2.36M|        janet_check_pointer_align(cfuns->cfun);
36524|  2.36M|        Janet fun = janet_wrap_cfunction(cfuns->cfun);
  ------------------
  |  |  853|  2.36M|#define janet_wrap_cfunction(s) janet_nanbox_wrap_((s), JANET_CFUNCTION)
  |  |  ------------------
  |  |  |  |  825|  2.36M|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.36M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.36M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36525|  2.36M|        janet_table_put(env, janet_csymbolv(cfuns->name), fun);
  ------------------
  |  | 1837|  2.36M|#define janet_csymbolv(cstr) janet_wrap_symbol(janet_csymbol(cstr))
  |  |  ------------------
  |  |  |  |  849|  2.36M|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  2.36M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  2.36M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  2.36M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36526|  2.36M|        janet_registry_put(cfuns->cfun, cfuns->name, regprefix, cfuns->source_file, cfuns->source_line);
36527|  2.36M|        cfuns++;
36528|  2.36M|    }
36529|   147k|}
janet_binding_from_entry:
36532|  20.1k|JanetBinding janet_binding_from_entry(Janet entry) {
36533|  20.1k|    JanetTable *entry_table;
36534|  20.1k|    JanetBinding binding = {
36535|  20.1k|        JANET_BINDING_NONE,
36536|  20.1k|        janet_wrap_nil(),
  ------------------
  |  |  831|  20.1k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  20.1k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  20.1k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  20.1k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36537|  20.1k|        JANET_BINDING_DEP_NONE
36538|  20.1k|    };
36539|       |
36540|       |    /* Check environment for entry */
36541|  20.1k|    if (!janet_checktype(entry, JANET_TABLE))
  ------------------
  |  |  806|  20.1k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 20.1k]
  |  |  ------------------
  |  |  807|  20.1k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  20.1k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  20.1k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  20.1k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  20.1k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  20.1k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (36541:9): [True: 0, False: 20.1k]
  ------------------
36542|      0|        return binding;
36543|  20.1k|    entry_table = janet_unwrap_table(entry);
  ------------------
  |  |  861|  20.1k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
36544|       |
36545|  20.1k|    Janet deprecate = janet_table_get_keyword(entry_table, "deprecated");
36546|  20.1k|    int macro = janet_truthy(janet_table_get_keyword(entry_table, "macro"));
  ------------------
  |  |  818|  20.1k|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  806|  40.2k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 20.1k]
  |  |  |  |  ------------------
  |  |  |  |  807|  40.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|  40.2k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|  20.1k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|  20.1k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  20.1k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  20.1k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (818:6): [True: 0, False: 20.1k]
  |  |  ------------------
  |  |  819|  20.1k|     (!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]
  |  |  ------------------
  ------------------
36547|  20.1k|    Janet value = janet_table_get_keyword(entry_table, "value");
36548|  20.1k|    Janet ref = janet_table_get_keyword(entry_table, "ref");
36549|       |
36550|  20.1k|    if (janet_checktype(deprecate, JANET_KEYWORD)) {
  ------------------
  |  |  806|  20.1k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 20.1k]
  |  |  |  Branch (806:6): [Folded, False: 20.1k]
  |  |  ------------------
  |  |  807|  20.1k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  20.1k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  20.1k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  20.1k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  20.1k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  20.1k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36551|      0|        JanetKeyword depkw = janet_unwrap_keyword(deprecate);
  ------------------
  |  |  865|      0|#define janet_unwrap_keyword(x) ((const uint8_t *)janet_nanbox_to_pointer(x))
  ------------------
36552|      0|        if (!janet_cstrcmp(depkw, "relaxed")) {
  ------------------
  |  Branch (36552:13): [True: 0, False: 0]
  ------------------
36553|      0|            binding.deprecation = JANET_BINDING_DEP_RELAXED;
36554|      0|        } else if (!janet_cstrcmp(depkw, "normal")) {
  ------------------
  |  Branch (36554:20): [True: 0, False: 0]
  ------------------
36555|      0|            binding.deprecation = JANET_BINDING_DEP_NORMAL;
36556|      0|        } else if (!janet_cstrcmp(depkw, "strict")) {
  ------------------
  |  Branch (36556:20): [True: 0, False: 0]
  ------------------
36557|      0|            binding.deprecation = JANET_BINDING_DEP_STRICT;
36558|      0|        }
36559|  20.1k|    } else if (!janet_checktype(deprecate, JANET_NIL)) {
  ------------------
  |  |  806|  20.1k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 20.1k]
  |  |  ------------------
  |  |  807|  20.1k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  20.1k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  20.1k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  20.1k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  20.1k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  20.1k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (36559:16): [True: 0, False: 20.1k]
  ------------------
36560|      0|        binding.deprecation = JANET_BINDING_DEP_NORMAL;
36561|      0|    }
36562|       |
36563|  20.1k|    int ref_is_valid = janet_checktype(ref, JANET_ARRAY);
  ------------------
  |  |  806|  20.1k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 20.1k]
  |  |  ------------------
  |  |  807|  20.1k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  20.1k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  20.1k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  20.1k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  20.1k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  20.1k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36564|  20.1k|    int redef = ref_is_valid && janet_truthy(janet_table_get_keyword(entry_table, "redef"));
  ------------------
  |  |  818|  20.1k|    (!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|  20.1k|     (!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 (36564:17): [True: 0, False: 20.1k]
  ------------------
36565|       |
36566|  20.1k|    if (macro) {
  ------------------
  |  Branch (36566:9): [True: 0, False: 20.1k]
  ------------------
36567|      0|        binding.value = redef ? ref : value;
  ------------------
  |  Branch (36567:25): [True: 0, False: 0]
  ------------------
36568|      0|        binding.type = redef ? JANET_BINDING_DYNAMIC_MACRO : JANET_BINDING_MACRO;
  ------------------
  |  Branch (36568:24): [True: 0, False: 0]
  ------------------
36569|      0|        return binding;
36570|      0|    }
36571|       |
36572|  20.1k|    if (ref_is_valid) {
  ------------------
  |  Branch (36572:9): [True: 0, False: 20.1k]
  ------------------
36573|      0|        binding.value = ref;
36574|      0|        binding.type = redef ? JANET_BINDING_DYNAMIC_DEF : JANET_BINDING_VAR;
  ------------------
  |  Branch (36574:24): [True: 0, False: 0]
  ------------------
36575|  20.1k|    } else {
36576|  20.1k|        binding.value = value;
36577|  20.1k|        binding.type = JANET_BINDING_DEF;
36578|  20.1k|    }
36579|       |
36580|  20.1k|    return binding;
36581|  20.1k|}
janet_resolve_ext:
36636|  20.1k|JanetBinding janet_resolve_ext(JanetTable *env, const uint8_t *sym) {
36637|  20.1k|    Janet entry = janet_table_get(env, janet_wrap_symbol(sym));
  ------------------
  |  |  849|  20.1k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  ------------------
  |  |  |  |  828|  20.1k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  20.1k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  20.1k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36638|  20.1k|    return janet_binding_from_entry(entry);
36639|  20.1k|}
janet_resolve:
36641|  20.1k|JanetBindingType janet_resolve(JanetTable *env, const uint8_t *sym, Janet *out) {
36642|  20.1k|    JanetBinding binding = janet_resolve_ext(env, sym);
36643|  20.1k|    if (binding.type == JANET_BINDING_DYNAMIC_DEF || binding.type == JANET_BINDING_DYNAMIC_MACRO) {
  ------------------
  |  Branch (36643:9): [True: 0, False: 20.1k]
  |  Branch (36643:54): [True: 0, False: 20.1k]
  ------------------
36644|      0|        *out = janet_array_peek(janet_unwrap_array(binding.value));
  ------------------
  |  |  860|      0|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
36645|  20.1k|    } else {
36646|  20.1k|        *out = binding.value;
36647|  20.1k|    }
36648|  20.1k|    return binding.type;
36649|  20.1k|}
janet_resolve_core:
36652|  6.71k|Janet janet_resolve_core(const char *name) {
36653|  6.71k|    JanetTable *env = janet_core_env(NULL);
36654|  6.71k|    Janet out = janet_wrap_nil();
  ------------------
  |  |  831|  6.71k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  6.71k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  6.71k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  6.71k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36655|  6.71k|    janet_resolve(env, janet_csymbol(name), &out);
36656|  6.71k|    return out;
36657|  6.71k|}
janet_indexed_view:
36661|  2.86M|int janet_indexed_view(Janet seq, const Janet **data, int32_t *len) {
36662|  2.86M|    if (janet_checktype(seq, JANET_ARRAY)) {
  ------------------
  |  |  806|  2.86M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 42.6k, False: 2.81M]
  |  |  |  Branch (806:6): [Folded, False: 2.86M]
  |  |  ------------------
  |  |  807|  2.86M|        ? 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.86M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  2.86M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  2.86M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.86M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.86M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36663|  42.6k|        *data = janet_unwrap_array(seq)->data;
  ------------------
  |  |  860|  42.6k|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
36664|  42.6k|        *len = janet_unwrap_array(seq)->count;
  ------------------
  |  |  860|  42.6k|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
36665|  42.6k|        return 1;
36666|  2.81M|    } else if (janet_checktype(seq, JANET_TUPLE)) {
  ------------------
  |  |  806|  2.81M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 2.81M, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 2.81M]
  |  |  ------------------
  |  |  807|  2.81M|        ? 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.81M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  2.81M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  2.81M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.81M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.81M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36667|  2.81M|        *data = janet_unwrap_tuple(seq);
  ------------------
  |  |  858|  2.81M|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
36668|  2.81M|        *len = janet_tuple_length(janet_unwrap_tuple(seq));
  ------------------
  |  | 1802|  2.81M|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1800|  2.81M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
36669|  2.81M|        return 1;
36670|  2.81M|    }
36671|      0|    return 0;
36672|  2.86M|}
janet_bytes_view:
36676|  1.86k|int janet_bytes_view(Janet str, const uint8_t **data, int32_t *len) {
36677|  1.86k|    JanetType t = janet_type(str);
  ------------------
  |  |  795|  1.86k|    (isnan((x).number) \
  |  |  796|  1.86k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  1.86k|        : JANET_NUMBER)
  ------------------
  |  Branch (36677:19): [True: 1.86k, False: 0]
  ------------------
36678|  1.86k|    if (t == JANET_STRING || t == JANET_SYMBOL || t == JANET_KEYWORD) {
  ------------------
  |  Branch (36678:9): [True: 1.86k, False: 0]
  |  Branch (36678:30): [True: 0, False: 0]
  |  Branch (36678:51): [True: 0, False: 0]
  ------------------
36679|  1.86k|        *data = janet_unwrap_string(str);
  ------------------
  |  |  863|  1.86k|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
36680|  1.86k|        *len = janet_string_length(janet_unwrap_string(str));
  ------------------
  |  | 1813|  1.86k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|  1.86k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
36681|  1.86k|        return 1;
36682|  1.86k|    } else if (t == JANET_BUFFER) {
  ------------------
  |  Branch (36682:16): [True: 0, False: 0]
  ------------------
36683|      0|        *data = janet_unwrap_buffer(str)->data;
  ------------------
  |  |  862|      0|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
36684|      0|        *len = janet_unwrap_buffer(str)->count;
  ------------------
  |  |  862|      0|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
36685|      0|        return 1;
36686|      0|    } else if (t == JANET_ABSTRACT) {
  ------------------
  |  Branch (36686:16): [True: 0, False: 0]
  ------------------
36687|      0|        void *abst = janet_unwrap_abstract(str);
  ------------------
  |  |  866|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
36688|      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)))
  |  |  ------------------
  ------------------
36689|      0|        if (NULL == atype->bytes) {
  ------------------
  |  Branch (36689:13): [True: 0, False: 0]
  ------------------
36690|      0|            return 0;
36691|      0|        }
36692|      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)))
  |  |  ------------------
  ------------------
36693|      0|        *data = view.bytes;
36694|      0|        *len = view.len;
36695|      0|        return 1;
36696|      0|    }
36697|      0|    return 0;
36698|  1.86k|}
janet_dictionary_view:
36703|   402k|int janet_dictionary_view(Janet tab, const JanetKV **data, int32_t *len, int32_t *cap) {
36704|   402k|    if (janet_checktype(tab, JANET_TABLE)) {
  ------------------
  |  |  806|   402k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 169k, False: 232k]
  |  |  |  Branch (806:6): [Folded, False: 402k]
  |  |  ------------------
  |  |  807|   402k|        ? 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|   402k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   402k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   402k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   402k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   402k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36705|   169k|        *data = janet_unwrap_table(tab)->data;
  ------------------
  |  |  861|   169k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
36706|   169k|        *cap = janet_unwrap_table(tab)->capacity;
  ------------------
  |  |  861|   169k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
36707|   169k|        *len = janet_unwrap_table(tab)->count;
  ------------------
  |  |  861|   169k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
36708|   169k|        return 1;
36709|   232k|    } else if (janet_checktype(tab, JANET_STRUCT)) {
  ------------------
  |  |  806|   232k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 232k, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 232k]
  |  |  ------------------
  |  |  807|   232k|        ? 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|   232k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   232k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   232k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   232k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   232k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36710|   232k|        *data = janet_unwrap_struct(tab);
  ------------------
  |  |  857|   232k|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
36711|   232k|        *cap = janet_struct_capacity(janet_unwrap_struct(tab));
  ------------------
  |  | 1849|   232k|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1846|   232k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
36712|   232k|        *len = janet_struct_length(janet_unwrap_struct(tab));
  ------------------
  |  | 1848|   232k|#define janet_struct_length(t) (janet_struct_head(t)->length)
  |  |  ------------------
  |  |  |  | 1846|   232k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
36713|   232k|        return 1;
36714|   232k|    }
36715|      0|    return 0;
36716|   402k|}
janet_checkint:
36718|  20.9k|int janet_checkint(Janet x) {
36719|  20.9k|    if (!janet_checktype(x, JANET_NUMBER))
  ------------------
  |  |  806|  20.9k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [True: 20.9k, Folded]
  |  |  ------------------
  |  |  807|  20.9k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|  20.9k|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 4.63k, False: 16.3k]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 16.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  20.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 (36719:9): [True: 16.3k, False: 4.63k]
  ------------------
36720|  16.3k|        return 0;
36721|  4.63k|    double dval = janet_unwrap_number(x);
  ------------------
  |  |  839|  4.63k|#define janet_unwrap_number(x) ((x).number)
  ------------------
36722|       |    return janet_checkintrange(dval);
  ------------------
  |  |  962|  4.63k|#define janet_checkintrange(x) ((x) >= INT32_MIN && (x) <= INT32_MAX && (x) == (int32_t)(x))
  |  |  ------------------
  |  |  |  Branch (962:33): [True: 4.57k, False: 55]
  |  |  |  Branch (962:53): [True: 4.36k, False: 216]
  |  |  |  Branch (962:73): [True: 4.15k, False: 211]
  |  |  ------------------
  ------------------
36723|  20.9k|}
janet_sorted_keys:
36800|   402k|int32_t janet_sorted_keys(const JanetKV *dict, int32_t cap, int32_t *index_buffer) {
36801|       |
36802|       |    /* First, put populated indices into index_buffer */
36803|   402k|    int32_t next_index = 0;
36804|  1.44M|    for (int32_t i = 0; i < cap; i++) {
  ------------------
  |  Branch (36804:25): [True: 1.04M, False: 402k]
  ------------------
36805|  1.04M|        if (!janet_checktype(dict[i].key, JANET_NIL)) {
  ------------------
  |  |  806|  1.04M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 1.04M]
  |  |  ------------------
  |  |  807|  1.04M|        ? 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.04M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  1.04M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  1.04M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.04M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.04M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (36805:13): [True: 225k, False: 820k]
  ------------------
36806|   225k|            index_buffer[next_index++] = i;
36807|   225k|        }
36808|  1.04M|    }
36809|       |
36810|       |    /* Next, sort those (simple insertion sort here for now) */
36811|   479k|    for (int32_t i = 1; i < next_index; i++) {
  ------------------
  |  Branch (36811:25): [True: 77.1k, False: 402k]
  ------------------
36812|  77.1k|        int32_t index_to_insert = index_buffer[i];
36813|  77.1k|        Janet lhs = dict[index_to_insert].key;
36814|   132k|        for (int32_t j = i - 1; j >= 0; j--) {
  ------------------
  |  Branch (36814:33): [True: 105k, False: 26.7k]
  ------------------
36815|   105k|            index_buffer[j + 1] = index_buffer[j];
36816|   105k|            Janet rhs = dict[index_buffer[j]].key;
36817|   105k|            if (janet_compare(lhs, rhs) >= 0) {
  ------------------
  |  Branch (36817:17): [True: 50.3k, False: 55.3k]
  ------------------
36818|  50.3k|                index_buffer[j + 1] = index_to_insert;
36819|  50.3k|                break;
36820|  55.3k|            } else if (j == 0) {
  ------------------
  |  Branch (36820:24): [True: 26.7k, False: 28.6k]
  ------------------
36821|  26.7k|                index_buffer[0] = index_to_insert;
36822|  26.7k|            }
36823|   105k|        }
36824|  77.1k|    }
36825|       |
36826|       |    /* Return number of indices found */
36827|   402k|    return next_index;
36828|       |
36829|   402k|}
array_allocate:
37062|  26.6M|void *array_allocate(size_t element_size, int32_t count) {
37063|  26.6M|    if (count < 0) return NULL;
  ------------------
  |  Branch (37063:9): [True: 0, False: 26.6M]
  ------------------
37064|  26.6M|    if ((size_t) count > (SIZE_MAX / element_size)) return NULL;
  ------------------
  |  Branch (37064:9): [True: 0, False: 26.6M]
  ------------------
37065|  26.6M|    return janet_malloc(element_size * count);
  ------------------
  |  | 2406|  26.6M|#define janet_malloc(X) malloc((X))
  ------------------
37066|  26.6M|}
janet_equals:
37368|  3.46M|int janet_equals(Janet x, Janet y) {
37369|  3.46M|    if (janet_type(x) != janet_type(y)) return 0;
  ------------------
  |  |  795|  3.46M|    (isnan((x).number) \
  |  |  796|  3.46M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  3.46M|        : JANET_NUMBER)
  ------------------
                  if (janet_type(x) != janet_type(y)) return 0;
  ------------------
  |  |  795|  3.46M|    (isnan((x).number) \
  |  |  796|  3.46M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  3.46M|        : JANET_NUMBER)
  ------------------
  |  Branch (37369:9): [True: 3.46M, False: 873]
  |  Branch (37369:9): [True: 180k, False: 3.28M]
  |  Branch (37369:26): [True: 3.43M, False: 26.1k]
  ------------------
37370|  3.28M|    if (janet_checktypes(x, JANET_TFLAG_TUPLE | JANET_TFLAG_STRUCT)) return janet_equals_containers(x, y);
  ------------------
  |  |  969|  3.28M|#define janet_checktypes(x, tps) ((1 << janet_type(x)) & (tps))
  |  |  ------------------
  |  |  |  |  795|  3.28M|    (isnan((x).number) \
  |  |  |  |  796|  3.28M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  |  |  797|  3.28M|        : JANET_NUMBER)
  |  |  ------------------
  |  |  |  Branch (969:34): [True: 3.27M, False: 2.61k]
  |  |  ------------------
  ------------------
  |  Branch (37370:9): [True: 3.28M, False: 283]
  ------------------
37371|  2.61k|    return janet_equals_leaf(x, y);
37372|  3.28M|}
janet_hash:
37384|  53.6M|int32_t janet_hash(Janet x) {
37385|  53.6M|    int32_t hash = 0;
37386|  53.6M|    switch (janet_type(x)) {
  ------------------
  |  |  795|  53.6M|    (isnan((x).number) \
  |  |  796|  53.6M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  53.6M|        : JANET_NUMBER)
  ------------------
  |  Branch (37386:13): [True: 43.9M, False: 9.64M]
  ------------------
37387|  1.03M|        case JANET_NIL:
  ------------------
  |  Branch (37387:9): [True: 1.03M, False: 52.5M]
  ------------------
37388|  1.03M|            hash = 0;
37389|  1.03M|            break;
37390|  45.4k|        case JANET_BOOLEAN:
  ------------------
  |  Branch (37390:9): [True: 45.4k, False: 53.5M]
  ------------------
37391|  45.4k|            hash = janet_unwrap_boolean(x);
  ------------------
  |  |  838|  45.4k|#define janet_unwrap_boolean(x) ((x).u64 & 0x1)
  ------------------
37392|  45.4k|            break;
37393|  17.5M|        case JANET_STRING:
  ------------------
  |  Branch (37393:9): [True: 17.5M, False: 36.0M]
  ------------------
37394|  17.9M|        case JANET_SYMBOL:
  ------------------
  |  Branch (37394:9): [True: 347k, False: 53.2M]
  ------------------
37395|  18.5M|        case JANET_KEYWORD:
  ------------------
  |  Branch (37395:9): [True: 612k, False: 53.0M]
  ------------------
37396|  18.5M|            hash = janet_string_hash(janet_unwrap_string(x));
  ------------------
  |  | 1814|  18.5M|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  ------------------
  |  |  |  | 1812|  18.5M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
37397|  18.5M|            break;
37398|  11.2M|        case JANET_TUPLE:
  ------------------
  |  Branch (37398:9): [True: 11.2M, False: 42.4M]
  ------------------
37399|  11.2M|            hash = janet_tuple_hash(janet_unwrap_tuple(x));
  ------------------
  |  | 1803|  11.2M|#define janet_tuple_hash(t) (janet_tuple_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1800|  11.2M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
37400|  11.2M|            uint32_t inc = (janet_tuple_flag(janet_unwrap_tuple(x)) & JANET_TUPLE_FLAG_BRACKETCTOR) ? 1 : 0;
  ------------------
  |  | 1806|  11.2M|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1800|  11.2M|#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|  11.2M|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
  |  Branch (37400:28): [True: 50.3k, False: 11.1M]
  ------------------
37401|  11.2M|            hash = (int32_t)((uint32_t)hash + inc); /* avoid overflow undefined behavior */
37402|  11.2M|            break;
37403|   752k|        case JANET_STRUCT:
  ------------------
  |  Branch (37403:9): [True: 752k, False: 52.8M]
  ------------------
37404|   752k|            hash = janet_struct_hash(janet_unwrap_struct(x));
  ------------------
  |  | 1850|   752k|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1846|   752k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
37405|   752k|            break;
37406|  9.64M|        case JANET_NUMBER: {
  ------------------
  |  Branch (37406:9): [True: 9.64M, False: 43.9M]
  ------------------
37407|  9.64M|            union {
37408|  9.64M|                double d;
37409|  9.64M|                uint64_t u;
37410|  9.64M|            } as;
37411|  9.64M|            as.d = janet_unwrap_number(x);
  ------------------
  |  |  839|  9.64M|#define janet_unwrap_number(x) ((x).number)
  ------------------
37412|  9.64M|            as.d += 0.0; /* normalize negative 0 */
37413|  9.64M|            as.u = murmur64(as.u);
37414|  9.64M|            uint32_t hi = (uint32_t)(as.u >> 32);
37415|  9.64M|            hash = (int32_t)hi;
37416|  9.64M|            break;
37417|  17.9M|        }
37418|   189k|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (37418:9): [True: 189k, False: 53.4M]
  ------------------
37419|   189k|            JanetAbstract xx = janet_unwrap_abstract(x);
  ------------------
  |  |  866|   189k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
37420|   189k|            const JanetAbstractType *at = janet_abstract_type(xx);
  ------------------
  |  | 1899|   189k|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|   189k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
37421|   189k|            if (at->hash != NULL) {
  ------------------
  |  Branch (37421:17): [True: 149k, False: 40.2k]
  ------------------
37422|   149k|                hash = at->hash(xx, janet_abstract_size(xx));
  ------------------
  |  | 1900|   149k|#define janet_abstract_size(u) (janet_abstract_head(u)->size)
  |  |  ------------------
  |  |  |  | 1897|   149k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
37423|   149k|                break;
37424|   149k|            }
37425|   189k|        }
37426|       |        /* fallthrough */
37427|  12.2M|        default:
  ------------------
  |  Branch (37427:9): [True: 12.2M, False: 41.4M]
  ------------------
37428|  12.2M|            if (sizeof(double) == sizeof(void *)) {
  ------------------
  |  Branch (37428:17): [True: 12.2M, Folded]
  ------------------
37429|       |                /* Assuming 8 byte pointer (8 byte aligned) */
37430|  12.2M|                uint64_t i = murmur64(janet_u64(x));
  ------------------
  |  |  788|  12.2M|#define janet_u64(x) ((x).u64)
  ------------------
37431|  12.2M|                hash = (int32_t)(i >> 32);
37432|  12.2M|            } else {
37433|       |                /* Assuming 4 byte pointer (or smaller) */
37434|      0|                uintptr_t diff = (uintptr_t) janet_unwrap_pointer(x);
  ------------------
  |  |  867|      0|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
37435|      0|                uint32_t hilo = (uint32_t) diff * 2654435769u;
37436|      0|                hash = (int32_t)((hilo << 16) | (hilo >> 16));
37437|      0|            }
37438|  12.2M|            break;
37439|  53.6M|    }
37440|  53.6M|    return hash;
37441|  53.6M|}
janet_compare:
37446|   106k|int janet_compare(Janet x, Janet y) {
37447|   106k|    janet_vm.traversal = janet_vm.traversal_base;
37448|   106k|    int status;
37449|   130k|    do {
37450|   130k|        JanetType tx = janet_type(x);
  ------------------
  |  |  795|   130k|    (isnan((x).number) \
  |  |  796|   130k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|   130k|        : JANET_NUMBER)
  ------------------
  |  Branch (37450:24): [True: 127k, False: 2.87k]
  ------------------
37451|   130k|        JanetType ty = janet_type(y);
  ------------------
  |  |  795|   130k|    (isnan((x).number) \
  |  |  796|   130k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|   130k|        : JANET_NUMBER)
  ------------------
  |  Branch (37451:24): [True: 123k, False: 6.92k]
  ------------------
37452|   130k|        if (tx != ty) return tx < ty ? -1 : 1;
  ------------------
  |  Branch (37452:13): [True: 49.7k, False: 80.6k]
  |  Branch (37452:30): [True: 29.3k, False: 20.3k]
  ------------------
37453|  80.6k|        switch (tx) {
37454|  1.04k|            case JANET_NIL:
  ------------------
  |  Branch (37454:13): [True: 1.04k, False: 79.6k]
  ------------------
37455|  1.04k|                break;
37456|     18|            case JANET_BOOLEAN: {
  ------------------
  |  Branch (37456:13): [True: 18, False: 80.6k]
  ------------------
37457|     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)
  ------------------
37458|     18|                if (diff) return diff;
  ------------------
  |  Branch (37458:21): [True: 0, False: 18]
  ------------------
37459|     18|                break;
37460|     18|            }
37461|  1.93k|            case JANET_NUMBER: {
  ------------------
  |  Branch (37461:13): [True: 1.93k, False: 78.7k]
  ------------------
37462|  1.93k|                double xx = janet_unwrap_number(x);
  ------------------
  |  |  839|  1.93k|#define janet_unwrap_number(x) ((x).number)
  ------------------
37463|  1.93k|                double yy = janet_unwrap_number(y);
  ------------------
  |  |  839|  1.93k|#define janet_unwrap_number(x) ((x).number)
  ------------------
37464|  1.93k|                if (xx == yy) {
  ------------------
  |  Branch (37464:21): [True: 425, False: 1.51k]
  ------------------
37465|    425|                    break;
37466|  1.51k|                } else {
37467|  1.51k|                    return (xx < yy) ? -1 : 1;
  ------------------
  |  Branch (37467:28): [True: 1.36k, False: 148]
  ------------------
37468|  1.51k|                }
37469|  1.93k|            }
37470|    416|            case JANET_STRING:
  ------------------
  |  Branch (37470:13): [True: 416, False: 80.2k]
  ------------------
37471|  21.6k|            case JANET_SYMBOL:
  ------------------
  |  Branch (37471:13): [True: 21.2k, False: 59.4k]
  ------------------
37472|  21.8k|            case JANET_KEYWORD: {
  ------------------
  |  Branch (37472:13): [True: 143, False: 80.5k]
  ------------------
37473|  21.8k|                int diff = janet_string_compare(janet_unwrap_string(x), janet_unwrap_string(y));
  ------------------
  |  |  863|  21.8k|#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|  21.8k|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
37474|  21.8k|                if (diff) return diff;
  ------------------
  |  Branch (37474:21): [True: 11.0k, False: 10.7k]
  ------------------
37475|  10.7k|                break;
37476|  21.8k|            }
37477|  23.0k|            case JANET_ABSTRACT: {
  ------------------
  |  Branch (37477:13): [True: 23.0k, False: 57.6k]
  ------------------
37478|  23.0k|                int diff = janet_compare_abstract(janet_unwrap_abstract(x), janet_unwrap_abstract(y));
  ------------------
  |  |  866|  23.0k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
                              int diff = janet_compare_abstract(janet_unwrap_abstract(x), janet_unwrap_abstract(y));
  ------------------
  |  |  866|  23.0k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
37479|  23.0k|                if (diff) return diff;
  ------------------
  |  Branch (37479:21): [True: 22.9k, False: 124]
  ------------------
37480|    124|                break;
37481|  23.0k|            }
37482|  7.09k|            default: {
  ------------------
  |  Branch (37482:13): [True: 7.09k, False: 73.6k]
  ------------------
37483|  7.09k|                if (janet_unwrap_pointer(x) == janet_unwrap_pointer(y)) {
  ------------------
  |  |  867|  7.09k|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
                              if (janet_unwrap_pointer(x) == janet_unwrap_pointer(y)) {
  ------------------
  |  |  867|  7.09k|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (37483:21): [True: 0, False: 7.09k]
  ------------------
37484|      0|                    break;
37485|  7.09k|                } else {
37486|  7.09k|                    return janet_unwrap_pointer(x) > janet_unwrap_pointer(y) ? 1 : -1;
  ------------------
  |  |  867|  7.09k|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
                                  return janet_unwrap_pointer(x) > janet_unwrap_pointer(y) ? 1 : -1;
  ------------------
  |  |  867|  7.09k|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (37486:28): [True: 6.70k, False: 390]
  ------------------
37487|  7.09k|                }
37488|  7.09k|            }
37489|  25.0k|            case JANET_TUPLE: {
  ------------------
  |  Branch (37489:13): [True: 25.0k, False: 55.6k]
  ------------------
37490|  25.0k|                const Janet *lhs = janet_unwrap_tuple(x);
  ------------------
  |  |  858|  25.0k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
37491|  25.0k|                const Janet *rhs = janet_unwrap_tuple(y);
  ------------------
  |  |  858|  25.0k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
37492|  25.0k|                if (JANET_TUPLE_FLAG_BRACKETCTOR & (janet_tuple_flag(lhs) ^ janet_tuple_flag(rhs))) {
  ------------------
  |  | 1798|  25.0k|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
                              if (JANET_TUPLE_FLAG_BRACKETCTOR & (janet_tuple_flag(lhs) ^ janet_tuple_flag(rhs))) {
  ------------------
  |  | 1806|  25.0k|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1800|  25.0k|#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|  25.0k|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1800|  25.0k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (37492:21): [True: 13.2k, False: 11.8k]
  ------------------
37493|  13.2k|                    return (janet_tuple_flag(lhs) & JANET_TUPLE_FLAG_BRACKETCTOR) ? 1 : -1;
  ------------------
  |  | 1806|  13.2k|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1800|  13.2k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                                  return (janet_tuple_flag(lhs) & JANET_TUPLE_FLAG_BRACKETCTOR) ? 1 : -1;
  ------------------
  |  | 1798|  13.2k|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
  |  Branch (37493:28): [True: 2.44k, False: 10.7k]
  ------------------
37494|  13.2k|                }
37495|  11.8k|                push_traversal_node(janet_tuple_head(lhs), janet_tuple_head(rhs), 1);
  ------------------
  |  | 1800|  11.8k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  ------------------
                              push_traversal_node(janet_tuple_head(lhs), janet_tuple_head(rhs), 1);
  ------------------
  |  | 1800|  11.8k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  ------------------
37496|  11.8k|                break;
37497|  25.0k|            }
37498|    700|            case JANET_STRUCT: {
  ------------------
  |  Branch (37498:13): [True: 700, False: 79.9k]
  ------------------
37499|    700|                const JanetKV *lhs = janet_unwrap_struct(x);
  ------------------
  |  |  857|    700|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
37500|    700|                const JanetKV *rhs = janet_unwrap_struct(y);
  ------------------
  |  |  857|    700|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
37501|    700|                int32_t llen = janet_struct_capacity(lhs);
  ------------------
  |  | 1849|    700|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1846|    700|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
37502|    700|                int32_t rlen = janet_struct_capacity(rhs);
  ------------------
  |  | 1849|    700|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1846|    700|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
37503|    700|                int32_t lhash = janet_struct_hash(lhs);
  ------------------
  |  | 1850|    700|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1846|    700|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
37504|    700|                int32_t rhash = janet_struct_hash(rhs);
  ------------------
  |  | 1850|    700|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1846|    700|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
37505|    700|                if (llen < rlen) return -1;
  ------------------
  |  Branch (37505:21): [True: 80, False: 620]
  ------------------
37506|    620|                if (llen > rlen) return 1;
  ------------------
  |  Branch (37506:21): [True: 71, False: 549]
  ------------------
37507|    549|                if (lhash < rhash) return -1;
  ------------------
  |  Branch (37507:21): [True: 85, False: 464]
  ------------------
37508|    464|                if (lhash > rhash) return 1;
  ------------------
  |  Branch (37508:21): [True: 76, False: 388]
  ------------------
37509|    388|                push_traversal_node(janet_struct_head(lhs), janet_struct_head(rhs), 0);
  ------------------
  |  | 1846|    388|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  ------------------
                              push_traversal_node(janet_struct_head(lhs), janet_struct_head(rhs), 0);
  ------------------
  |  | 1846|    388|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  ------------------
37510|    388|                break;
37511|    464|            }
37512|  80.6k|        }
37513|  80.6k|    } while (!(status = traversal_next(&x, &y)));
  ------------------
  |  Branch (37513:14): [True: 23.4k, False: 1.08k]
  ------------------
37514|  1.08k|    return status - 2;
37515|   106k|}
janet_v_grow:
37919|   213k|void *janet_v_grow(void *v, int32_t increment, int32_t itemsize) {
37920|   213k|    int32_t dbl_cur = (NULL != v) ? 2 * janet_v__cap(v) : 0;
  ------------------
  |  |  765|   190k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  ------------------
  |  |  |  |  764|   190k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  ------------------
  |  Branch (37920:23): [True: 190k, False: 22.8k]
  ------------------
37921|   213k|    int32_t min_needed = janet_v_count(v) + increment;
  ------------------
  |  |  759|   213k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  766|   190k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|   190k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (759:34): [True: 190k, False: 22.8k]
  |  |  ------------------
  ------------------
37922|   213k|    int32_t m = dbl_cur > min_needed ? dbl_cur : min_needed;
  ------------------
  |  Branch (37922:17): [True: 167k, False: 45.4k]
  ------------------
37923|   213k|    size_t newsize = ((size_t) itemsize) * m + sizeof(int32_t) * 2;
37924|   213k|    int32_t *p = (int32_t *) janet_srealloc(v ? janet_v__raw(v) : 0, newsize);
  ------------------
  |  |  764|   190k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  ------------------
  |  Branch (37924:45): [True: 190k, False: 22.8k]
  ------------------
37925|   213k|    if (!v) p[1] = 0;
  ------------------
  |  Branch (37925:9): [True: 22.8k, False: 190k]
  ------------------
37926|   213k|    p[0] = m;
37927|   213k|    return p + 2;
37928|   213k|}
janet_try_init:
39435|  4.66k|void janet_try_init(JanetTryState *state) {
39436|  4.66k|    state->stackn = janet_vm.stackn++;
39437|  4.66k|    state->gc_handle = janet_vm.gc_suspend;
39438|  4.66k|    state->vm_fiber = janet_vm.fiber;
39439|  4.66k|    state->vm_jmp_buf = janet_vm.signal_buf;
39440|  4.66k|    state->vm_return_reg = janet_vm.return_reg;
39441|  4.66k|    state->coerce_error = janet_vm.coerce_error;
39442|  4.66k|    janet_vm.return_reg = &(state->payload);
39443|  4.66k|    janet_vm.signal_buf = &(state->buf);
39444|  4.66k|    janet_vm.coerce_error = 0;
39445|  4.66k|}
janet_restore:
39447|  4.66k|void janet_restore(JanetTryState *state) {
39448|  4.66k|    janet_vm.stackn = state->stackn;
39449|  4.66k|    janet_vm.gc_suspend = state->gc_handle;
39450|  4.66k|    janet_vm.fiber = state->vm_fiber;
39451|  4.66k|    janet_vm.signal_buf = state->vm_jmp_buf;
39452|  4.66k|    janet_vm.return_reg = state->vm_return_reg;
39453|  4.66k|    janet_vm.coerce_error = state->coerce_error;
39454|  4.66k|}
janet_init:
39609|  6.71k|int janet_init(void) {
39610|       |
39611|       |    /* Garbage collection */
39612|  6.71k|    janet_vm.blocks = NULL;
39613|  6.71k|    janet_vm.weak_blocks = NULL;
39614|  6.71k|    janet_vm.next_collection = 0;
39615|  6.71k|    janet_vm.gc_interval = 0x400000;
39616|  6.71k|    janet_vm.block_count = 0;
39617|  6.71k|    janet_vm.gc_mark_phase = 0;
39618|       |
39619|  6.71k|    janet_symcache_init();
39620|       |
39621|       |    /* Initialize gc roots */
39622|  6.71k|    janet_vm.roots = NULL;
39623|  6.71k|    janet_vm.root_count = 0;
39624|  6.71k|    janet_vm.root_capacity = 0;
39625|       |
39626|       |    /* Scratch memory */
39627|  6.71k|    janet_vm.user = NULL;
39628|  6.71k|    janet_vm.scratch_mem = NULL;
39629|  6.71k|    janet_vm.scratch_len = 0;
39630|  6.71k|    janet_vm.scratch_cap = 0;
39631|       |
39632|       |    /* Sandbox flags */
39633|  6.71k|    janet_vm.sandbox_flags = 0;
39634|       |
39635|       |    /* Initialize registry */
39636|  6.71k|    janet_vm.registry = NULL;
39637|  6.71k|    janet_vm.registry_cap = 0;
39638|  6.71k|    janet_vm.registry_count = 0;
39639|  6.71k|    janet_vm.registry_dirty = 0;
39640|       |
39641|       |    /* Initialize abstract registry */
39642|  6.71k|    janet_vm.abstract_registry = janet_table(0);
39643|  6.71k|    janet_gcroot(janet_wrap_table(janet_vm.abstract_registry));
  ------------------
  |  |  846|  6.71k|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  825|  6.71k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  6.71k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  6.71k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39644|       |
39645|       |    /* Traversal */
39646|  6.71k|    janet_vm.traversal = NULL;
39647|  6.71k|    janet_vm.traversal_base = NULL;
39648|  6.71k|    janet_vm.traversal_top = NULL;
39649|       |
39650|       |    /* Core env */
39651|  6.71k|    janet_vm.core_env = NULL;
39652|       |
39653|       |    /* Auto suspension */
39654|  6.71k|    janet_vm.auto_suspend = 0;
39655|       |
39656|       |    /* Dynamic bindings */
39657|  6.71k|    janet_vm.top_dyns = NULL;
39658|       |
39659|       |    /* Seed RNG */
39660|  6.71k|    janet_rng_seed(janet_default_rng(), 0);
39661|       |
39662|       |    /* Fibers */
39663|  6.71k|    janet_vm.fiber = NULL;
39664|  6.71k|    janet_vm.root_fiber = NULL;
39665|  6.71k|    janet_vm.stackn = 0;
39666|       |
39667|  6.71k|#ifdef JANET_EV
39668|  6.71k|    janet_ev_init();
39669|  6.71k|#endif
39670|  6.71k|#ifdef JANET_NET
39671|  6.71k|    janet_net_init();
39672|  6.71k|#endif
39673|  6.71k|    return 0;
39674|  6.71k|}
janet_deinit:
39689|  6.71k|void janet_deinit(void) {
39690|  6.71k|    janet_clear_memory();
39691|  6.71k|    janet_symcache_deinit();
39692|  6.71k|    janet_free(janet_vm.roots);
  ------------------
  |  | 2415|  6.71k|#define janet_free(X) free((X))
  ------------------
39693|  6.71k|    janet_vm.roots = NULL;
39694|  6.71k|    janet_vm.root_count = 0;
39695|  6.71k|    janet_vm.root_capacity = 0;
39696|  6.71k|    janet_vm.abstract_registry = NULL;
39697|  6.71k|    janet_vm.core_env = NULL;
39698|  6.71k|    janet_vm.top_dyns = NULL;
39699|  6.71k|    janet_vm.user = NULL;
39700|  6.71k|    janet_free(janet_vm.traversal_base);
  ------------------
  |  | 2415|  6.71k|#define janet_free(X) free((X))
  ------------------
39701|  6.71k|    janet_vm.fiber = NULL;
39702|  6.71k|    janet_vm.root_fiber = NULL;
39703|  6.71k|    janet_free(janet_vm.registry);
  ------------------
  |  | 2415|  6.71k|#define janet_free(X) free((X))
  ------------------
39704|       |    janet_vm.registry = NULL;
39705|  6.71k|#ifdef JANET_EV
39706|  6.71k|    janet_ev_deinit();
39707|  6.71k|#endif
39708|  6.71k|#ifdef JANET_NET
39709|  6.71k|    janet_net_deinit();
39710|  6.71k|#endif
39711|  6.71k|}
janet_memalloc_empty:
39879|  8.94M|void *janet_memalloc_empty(int32_t count) {
39880|  8.94M|    int32_t i;
39881|  8.94M|    void *mem = array_allocate(sizeof(JanetKV), count);
39882|  8.94M|    janet_vm.next_collection += (size_t) count * sizeof(JanetKV);
39883|  8.94M|    if (NULL == mem) {
  ------------------
  |  Branch (39883:9): [True: 0, False: 8.94M]
  ------------------
39884|      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]
  |  |  ------------------
  ------------------
39885|      0|    }
39886|  8.94M|    JanetKV *mmem = (JanetKV *)mem;
39887|   140M|    for (i = 0; i < count; i++) {
  ------------------
  |  Branch (39887:17): [True: 131M, False: 8.94M]
  ------------------
39888|   131M|        JanetKV *kv = mmem + i;
39889|   131M|        kv->key = janet_wrap_nil();
  ------------------
  |  |  831|   131M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   131M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   131M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   131M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39890|   131M|        kv->value = janet_wrap_nil();
  ------------------
  |  |  831|   131M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   131M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   131M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   131M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39891|   131M|    }
39892|  8.94M|    return mem;
39893|  8.94M|}
janet_memempty:
39895|  51.3k|void janet_memempty(JanetKV *mem, int32_t count) {
39896|  51.3k|    int32_t i;
39897|   888k|    for (i = 0; i < count; i++) {
  ------------------
  |  Branch (39897:17): [True: 836k, False: 51.3k]
  ------------------
39898|   836k|        mem[i].key = janet_wrap_nil();
  ------------------
  |  |  831|   836k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   836k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   836k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   836k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39899|   836k|        mem[i].value = janet_wrap_nil();
  ------------------
  |  |  831|   836k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   836k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   836k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   836k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39900|   836k|    }
39901|  51.3k|}
janet_wrap_number_safe:
39905|  47.0k|Janet janet_wrap_number_safe(double d) {
39906|  47.0k|    Janet ret;
39907|  47.0k|    ret.number = isnan(d) ? NAN : d;
  ------------------
  |  Branch (39907:18): [True: 6.71k, False: 40.2k]
  ------------------
39908|  47.0k|    return ret;
39909|  47.0k|}
janet_nanbox_to_pointer:
39911|   208M|void *janet_nanbox_to_pointer(Janet x) {
39912|   208M|    x.i64 &= JANET_NANBOX_PAYLOADBITS;
  ------------------
  |  |  791|   208M|#define JANET_NANBOX_PAYLOADBITS 0x00007FFFFFFFFFFFllu
  ------------------
39913|   208M|    x.u64 <<= JANET_NANBOX_64_POINTER_SHIFT; /* Alignment, usually 0 */
  ------------------
  |  |  341|   208M|#define JANET_NANBOX_64_POINTER_SHIFT 0
  ------------------
39914|   208M|    return x.pointer;
39915|   208M|}
janet_nanbox_from_pointer:
39917|  9.96M|Janet janet_nanbox_from_pointer(void *p, uint64_t tagmask) {
39918|  9.96M|    Janet ret;
39919|  9.96M|    ret.pointer = p;
39920|       |    /* Should be noop when pointer shift is 0 */
39921|       |    /*
39922|       |    janet_assert(!(ret.u64 & (uint64_t) ((1 << JANET_NANBOX_64_POINTER_SHIFT) - 1)), "unaligned pointer wrap");
39923|       |    */
39924|  9.96M|    ret.u64 >>= JANET_NANBOX_64_POINTER_SHIFT; /* Alignment, usually 0 */
  ------------------
  |  |  341|  9.96M|#define JANET_NANBOX_64_POINTER_SHIFT 0
  ------------------
39925|  9.96M|    ret.u64 |= tagmask;
39926|  9.96M|    return ret;
39927|  9.96M|}
janet_nanbox_from_cpointer:
39929|  36.2M|Janet janet_nanbox_from_cpointer(const void *p, uint64_t tagmask) {
39930|  36.2M|    Janet ret;
39931|  36.2M|    ret.pointer = (void *)p;
39932|       |    /* Should be noop when pointer shift is 0 */
39933|       |    /*
39934|       |    janet_assert(!(ret.u64 & (uint64_t) ((1 << JANET_NANBOX_64_POINTER_SHIFT) - 1)), "unaligned pointer wrap");
39935|       |    */
39936|  36.2M|    ret.u64 >>= JANET_NANBOX_64_POINTER_SHIFT; /* Alignment, usually 0 */
  ------------------
  |  |  341|  36.2M|#define JANET_NANBOX_64_POINTER_SHIFT 0
  ------------------
39937|  36.2M|    ret.u64 |= tagmask;
39938|  36.2M|    return ret;
39939|  36.2M|}
janet_nanbox_from_double:
39941|  87.5M|Janet janet_nanbox_from_double(double d) {
39942|  87.5M|    Janet ret;
39943|  87.5M|    ret.number = d;
39944|  87.5M|    return ret;
39945|  87.5M|}
janet_nanbox_from_bits:
39947|   497M|Janet janet_nanbox_from_bits(uint64_t bits) {
39948|   497M|    Janet ret;
39949|   497M|    ret.u64 = bits;
39950|   497M|    return ret;
39951|   497M|}
janet.c:janet_array_impl:
 1606|  24.3k|static void janet_array_impl(JanetArray *array, int32_t capacity) {
 1607|  24.3k|    Janet *data = NULL;
 1608|  24.3k|    if (capacity > 0) {
  ------------------
  |  Branch (1608:9): [True: 20.3k, False: 3.96k]
  ------------------
 1609|  20.3k|        janet_vm.next_collection += capacity * sizeof(Janet);
 1610|  20.3k|        data = (Janet *) array_allocate(sizeof(Janet), capacity);
 1611|  20.3k|        if (NULL == data) {
  ------------------
  |  Branch (1611:13): [True: 0, False: 20.3k]
  ------------------
 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.3k|    }
 1615|  24.3k|    array->count = 0;
 1616|  24.3k|    array->capacity = capacity;
 1617|  24.3k|    array->data = data;
 1618|  24.3k|}
janet.c:janet_buffer_init_impl:
 3196|  4.24M|static JanetBuffer *janet_buffer_init_impl(JanetBuffer *buffer, int32_t capacity) {
 3197|  4.24M|    uint8_t *data = NULL;
 3198|  4.24M|    if (capacity < 4) capacity = 4;
  ------------------
  |  Branch (3198:9): [True: 7.12k, False: 4.23M]
  ------------------
 3199|  4.24M|    janet_gcpressure(capacity);
 3200|  4.24M|    data = array_allocate(sizeof(uint8_t), capacity);
 3201|  4.24M|    if (NULL == data) {
  ------------------
  |  Branch (3201:9): [True: 0, False: 4.24M]
  ------------------
 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|  4.24M|    buffer->count = 0;
 3205|  4.24M|    buffer->capacity = capacity;
 3206|  4.24M|    buffer->data = data;
 3207|  4.24M|    return buffer;
 3208|  4.24M|}
janet.c:janet_buffer_can_realloc:
 3189|  3.53M|static void janet_buffer_can_realloc(JanetBuffer *buffer) {
 3190|  3.53M|    if (buffer->gc.flags & JANET_BUFFER_FLAG_NO_REALLOC) {
  ------------------
  |  | 1780|  3.53M|#define JANET_BUFFER_FLAG_NO_REALLOC 0x10000
  ------------------
  |  Branch (3190:9): [True: 0, False: 3.53M]
  ------------------
 3191|      0|        janet_panic("buffer cannot reallocate foreign memory");
 3192|      0|    }
 3193|  3.53M|}
janet.c:janet_load_libs:
 9373|  6.71k|static void janet_load_libs(JanetTable *env) {
 9374|  6.71k|    JanetRegExt corelib_cfuns[] = {
 9375|  6.71k|        JANET_CORE_REG("native", janet_core_native),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9376|  6.71k|        JANET_CORE_REG("describe", janet_core_describe),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9377|  6.71k|        JANET_CORE_REG("string", janet_core_string),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9378|  6.71k|        JANET_CORE_REG("symbol", janet_core_symbol),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9379|  6.71k|        JANET_CORE_REG("keyword", janet_core_keyword),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9380|  6.71k|        JANET_CORE_REG("buffer", janet_core_buffer),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9381|  6.71k|        JANET_CORE_REG("abstract?", janet_core_is_abstract),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9382|  6.71k|        JANET_CORE_REG("table", janet_core_table),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9383|  6.71k|        JANET_CORE_REG("array", janet_core_array),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9384|  6.71k|        JANET_CORE_REG("scan-number", janet_core_scannumber),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9385|  6.71k|        JANET_CORE_REG("tuple", janet_core_tuple),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9386|  6.71k|        JANET_CORE_REG("struct", janet_core_struct),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9387|  6.71k|        JANET_CORE_REG("gensym", janet_core_gensym),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9388|  6.71k|        JANET_CORE_REG("gccollect", janet_core_gccollect),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9389|  6.71k|        JANET_CORE_REG("gcsetinterval", janet_core_gcsetinterval),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9390|  6.71k|        JANET_CORE_REG("gcinterval", janet_core_gcinterval),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9391|  6.71k|        JANET_CORE_REG("type", janet_core_type),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9392|  6.71k|        JANET_CORE_REG("hash", janet_core_hash),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9393|  6.71k|        JANET_CORE_REG("getline", janet_core_getline),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9394|  6.71k|        JANET_CORE_REG("dyn", janet_core_dyn),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9395|  6.71k|        JANET_CORE_REG("setdyn", janet_core_setdyn),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9396|  6.71k|        JANET_CORE_REG("trace", janet_core_trace),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9397|  6.71k|        JANET_CORE_REG("untrace", janet_core_untrace),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9398|  6.71k|        JANET_CORE_REG("module/expand-path", janet_core_expand_path),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9399|  6.71k|        JANET_CORE_REG("int?", janet_core_check_int),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9400|  6.71k|        JANET_CORE_REG("nat?", janet_core_check_nat),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9401|  6.71k|        JANET_CORE_REG("bytes?", janet_core_is_bytes),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9402|  6.71k|        JANET_CORE_REG("indexed?", janet_core_is_indexed),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9403|  6.71k|        JANET_CORE_REG("dictionary?", janet_core_is_dictionary),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9404|  6.71k|        JANET_CORE_REG("lengthable?", janet_core_is_lengthable),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9405|  6.71k|        JANET_CORE_REG("slice", janet_core_slice),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9406|  6.71k|        JANET_CORE_REG("range", janet_core_range),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9407|  6.71k|        JANET_CORE_REG("signal", janet_core_signal),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9408|  6.71k|        JANET_CORE_REG("memcmp", janet_core_memcmp),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9409|  6.71k|        JANET_CORE_REG("getproto", janet_core_getproto),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9410|  6.71k|        JANET_CORE_REG("sandbox", janet_core_sandbox),
  ------------------
  |  |  518|  6.71k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.71k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9411|  6.71k|        JANET_REG_END
  ------------------
  |  | 2110|  6.71k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
 9412|  6.71k|    };
 9413|       |    janet_core_cfuns_ext(env, NULL, corelib_cfuns);
 9414|  6.71k|    janet_lib_io(env);
 9415|  6.71k|    janet_lib_math(env);
 9416|  6.71k|    janet_lib_array(env);
 9417|  6.71k|    janet_lib_tuple(env);
 9418|  6.71k|    janet_lib_buffer(env);
 9419|  6.71k|    janet_lib_table(env);
 9420|  6.71k|    janet_lib_struct(env);
 9421|  6.71k|    janet_lib_fiber(env);
 9422|  6.71k|    janet_lib_os(env);
 9423|  6.71k|    janet_lib_parse(env);
 9424|  6.71k|    janet_lib_compile(env);
 9425|  6.71k|    janet_lib_debug(env);
 9426|  6.71k|    janet_lib_string(env);
 9427|  6.71k|    janet_lib_marsh(env);
 9428|  6.71k|#ifdef JANET_PEG
 9429|  6.71k|    janet_lib_peg(env);
 9430|  6.71k|#endif
 9431|  6.71k|#ifdef JANET_ASSEMBLER
 9432|  6.71k|    janet_lib_asm(env);
 9433|  6.71k|#endif
 9434|  6.71k|#ifdef JANET_INT_TYPES
 9435|  6.71k|    janet_lib_inttypes(env);
 9436|  6.71k|#endif
 9437|  6.71k|#ifdef JANET_EV
 9438|  6.71k|    janet_lib_ev(env);
 9439|  6.71k|#ifdef JANET_FILEWATCH
 9440|  6.71k|    janet_lib_filewatch(env);
 9441|  6.71k|#endif
 9442|  6.71k|#endif
 9443|  6.71k|#ifdef JANET_NET
 9444|  6.71k|    janet_lib_net(env);
 9445|  6.71k|#endif
 9446|  6.71k|#ifdef JANET_FFI
 9447|  6.71k|    janet_lib_ffi(env);
 9448|  6.71k|#endif
 9449|  6.71k|}
janet.c:janet_q_init:
10684|  6.71k|static void janet_q_init(JanetQueue *q) {
10685|       |    q->data = NULL;
10686|  6.71k|    q->head = 0;
10687|  6.71k|    q->tail = 0;
10688|  6.71k|    q->capacity = 0;
10689|  6.71k|}
janet.c:peek_timeout:
10766|  6.71k|static int peek_timeout(JanetTimeout *out) {
10767|  6.71k|    if (janet_vm.tq_count == 0) return 0;
  ------------------
  |  Branch (10767:9): [True: 6.71k, False: 0]
  ------------------
10768|      0|    *out = janet_vm.tq[0];
10769|      0|    return 1;
10770|  6.71k|}
janet.c:janet_q_deinit:
10691|  6.71k|static void janet_q_deinit(JanetQueue *q) {
10692|  6.71k|    janet_free(q->data);
  ------------------
  |  | 2415|  6.71k|#define janet_free(X) free((X))
  ------------------
10693|  6.71k|}
janet.c:janet_ev_setup_selfpipe:
12253|  6.71k|static void janet_ev_setup_selfpipe(void) {
12254|  6.71k|    if (janet_make_pipe(janet_vm.selfpipe, 1)) {
  ------------------
  |  Branch (12254:9): [True: 0, False: 6.71k]
  ------------------
12255|       |        JANET_EXIT("failed to initialize self pipe in event loop");
  ------------------
  |  |  378|      0|#define JANET_EXIT(m) do { \
  |  |  379|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  380|      0|        __FILE__,\
  |  |  381|      0|        __LINE__,\
  |  |  382|      0|        (m));\
  |  |  383|      0|    abort();\
  |  |  384|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (384:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
12256|      0|    }
12257|  6.71k|}
janet.c:janet_ev_cleanup_selfpipe:
12276|  6.71k|static void janet_ev_cleanup_selfpipe(void) {
12277|  6.71k|    close(janet_vm.selfpipe[0]);
12278|  6.71k|    close(janet_vm.selfpipe[1]);
12279|  6.71k|}
janet.c:janet_deinit_block:
18286|  41.8M|static void janet_deinit_block(JanetGCObject *mem) {
18287|  41.8M|    switch (mem->flags & JANET_MEM_TYPEBITS) {
  ------------------
  |  |  675|  41.8M|#define JANET_MEM_TYPEBITS 0xFF
  ------------------
18288|  17.1M|        default:
  ------------------
  |  Branch (18288:9): [True: 17.1M, False: 24.6M]
  ------------------
18289|  19.7M|        case JANET_MEMORY_FUNCTION:
  ------------------
  |  Branch (18289:9): [True: 2.57M, False: 39.2M]
  ------------------
18290|  19.7M|            break; /* Do nothing for non gc types */
18291|  13.4M|        case JANET_MEMORY_SYMBOL:
  ------------------
  |  Branch (18291:9): [True: 13.4M, False: 28.3M]
  ------------------
18292|  13.4M|            janet_symbol_deinit(((JanetStringHead *) mem)->data);
18293|  13.4M|            break;
18294|  24.3k|        case JANET_MEMORY_ARRAY:
  ------------------
  |  Branch (18294:9): [True: 24.3k, False: 41.7M]
  ------------------
18295|  24.3k|        case JANET_MEMORY_ARRAY_WEAK:
  ------------------
  |  Branch (18295:9): [True: 0, False: 41.8M]
  ------------------
18296|  24.3k|            janet_free(((JanetArray *) mem)->data);
  ------------------
  |  | 2415|  24.3k|#define janet_free(X) free((X))
  ------------------
18297|  24.3k|            break;
18298|  4.93M|        case JANET_MEMORY_TABLE:
  ------------------
  |  Branch (18298:9): [True: 4.93M, False: 36.8M]
  ------------------
18299|  4.93M|        case JANET_MEMORY_TABLE_WEAKK:
  ------------------
  |  Branch (18299:9): [True: 0, False: 41.8M]
  ------------------
18300|  4.93M|        case JANET_MEMORY_TABLE_WEAKV:
  ------------------
  |  Branch (18300:9): [True: 0, False: 41.8M]
  ------------------
18301|  4.93M|        case JANET_MEMORY_TABLE_WEAKKV:
  ------------------
  |  Branch (18301:9): [True: 0, False: 41.8M]
  ------------------
18302|  4.93M|            janet_free(((JanetTable *) mem)->data);
  ------------------
  |  | 2415|  4.93M|#define janet_free(X) free((X))
  ------------------
18303|  4.93M|            break;
18304|      0|        case JANET_MEMORY_FIBER: {
  ------------------
  |  Branch (18304:9): [True: 0, False: 41.8M]
  ------------------
18305|      0|            JanetFiber *f = (JanetFiber *)mem;
18306|      0|#ifdef JANET_EV
18307|      0|            if (f->ev_state && !(f->flags & JANET_FIBER_EV_FLAG_IN_FLIGHT)) {
  ------------------
  |  |  847|      0|#define JANET_FIBER_EV_FLAG_IN_FLIGHT 0x1
  ------------------
  |  Branch (18307:17): [True: 0, False: 0]
  |  Branch (18307:32): [True: 0, False: 0]
  ------------------
18308|      0|                janet_ev_dec_refcount();
18309|      0|                janet_free(f->ev_state);
  ------------------
  |  | 2415|      0|#define janet_free(X) free((X))
  ------------------
18310|      0|            } else if (f->gc.flags & JANET_FIBER_EV_GCFLAG_SUSPENDED) {
  ------------------
  |  |  843|      0|#define JANET_FIBER_EV_GCFLAG_SUSPENDED 0x2000000
  ------------------
  |  Branch (18310:24): [True: 0, False: 0]
  ------------------
18311|      0|                janet_ev_dec_refcount();
18312|      0|            }
18313|      0|#endif
18314|      0|            janet_free(f->data);
  ------------------
  |  | 2415|      0|#define janet_free(X) free((X))
  ------------------
18315|      0|        }
18316|      0|        break;
18317|  12.4k|        case JANET_MEMORY_BUFFER:
  ------------------
  |  Branch (18317:9): [True: 12.4k, False: 41.8M]
  ------------------
18318|  12.4k|            janet_buffer_deinit((JanetBuffer *) mem);
18319|  12.4k|            break;
18320|  26.6k|        case JANET_MEMORY_ABSTRACT: {
  ------------------
  |  Branch (18320:9): [True: 26.6k, False: 41.7M]
  ------------------
18321|  26.6k|            JanetAbstractHead *head = (JanetAbstractHead *)mem;
18322|  26.6k|            if (head->type->gcperthread) {
  ------------------
  |  Branch (18322:17): [True: 0, False: 26.6k]
  ------------------
18323|      0|                janet_assert(!head->type->gcperthread(head->data, head->size), "per-thread finalizer failed");
  ------------------
  |  |  389|      0|#define janet_assert(c, m) do { \
  |  |  390|      0|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  378|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  379|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  380|      0|        __FILE__,\
  |  |  |  |  381|      0|        __LINE__,\
  |  |  |  |  382|      0|        (m));\
  |  |  |  |  383|      0|    abort();\
  |  |  |  |  384|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (384:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (390:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  391|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
18324|      0|            }
18325|  26.6k|            if (head->type->gc) {
  ------------------
  |  Branch (18325:17): [True: 20.1k, False: 6.49k]
  ------------------
18326|  20.1k|                janet_assert(!head->type->gc(head->data, head->size), "finalizer failed");
  ------------------
  |  |  389|  20.1k|#define janet_assert(c, m) do { \
  |  |  390|  20.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: 20.1k]
  |  |  ------------------
  |  |  391|  20.1k|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 20.1k]
  |  |  ------------------
  ------------------
18327|  20.1k|            }
18328|  26.6k|        }
18329|  26.6k|        break;
18330|  53.7k|        case JANET_MEMORY_FUNCENV: {
  ------------------
  |  Branch (18330:9): [True: 53.7k, False: 41.7M]
  ------------------
18331|  53.7k|            JanetFuncEnv *env = (JanetFuncEnv *)mem;
18332|  53.7k|            if (0 == env->offset)
  ------------------
  |  Branch (18332:17): [True: 53.7k, False: 0]
  ------------------
18333|  53.7k|                janet_free(env->as.values);
  ------------------
  |  | 2415|  53.7k|#define janet_free(X) free((X))
  ------------------
18334|  53.7k|        }
18335|  53.7k|        break;
18336|  3.59M|        case JANET_MEMORY_FUNCDEF: {
  ------------------
  |  Branch (18336:9): [True: 3.59M, False: 38.2M]
  ------------------
18337|  3.59M|            JanetFuncDef *def = (JanetFuncDef *)mem;
18338|       |            /* TODO - get this all with one alloc and one free */
18339|  3.59M|            janet_free(def->defs);
  ------------------
  |  | 2415|  3.59M|#define janet_free(X) free((X))
  ------------------
18340|  3.59M|            janet_free(def->environments);
  ------------------
  |  | 2415|  3.59M|#define janet_free(X) free((X))
  ------------------
18341|  3.59M|            janet_free(def->constants);
  ------------------
  |  | 2415|  3.59M|#define janet_free(X) free((X))
  ------------------
18342|  3.59M|            janet_free(def->bytecode);
  ------------------
  |  | 2415|  3.59M|#define janet_free(X) free((X))
  ------------------
18343|  3.59M|            janet_free(def->sourcemap);
  ------------------
  |  | 2415|  3.59M|#define janet_free(X) free((X))
  ------------------
18344|  3.59M|            janet_free(def->closure_bitset);
  ------------------
  |  | 2415|  3.59M|#define janet_free(X) free((X))
  ------------------
18345|  3.59M|            janet_free(def->symbolmap);
  ------------------
  |  | 2415|  3.59M|#define janet_free(X) free((X))
  ------------------
18346|  3.59M|        }
18347|  3.59M|        break;
18348|  41.8M|    }
18349|  41.8M|}
janet.c:janet_free_all_scratch:
18536|  6.71k|static void janet_free_all_scratch(void) {
18537|   133k|    for (size_t i = 0; i < janet_vm.scratch_len; i++) {
  ------------------
  |  Branch (18537:24): [True: 126k, False: 6.71k]
  ------------------
18538|   126k|        free_one_scratch(janet_vm.scratch_mem[i]);
18539|   126k|    }
18540|  6.71k|    janet_vm.scratch_len = 0;
18541|  6.71k|}
janet.c:janet_mem2scratch:
18543|  5.15M|static JanetScratch *janet_mem2scratch(void *mem) {
18544|  5.15M|    JanetScratch *s = (JanetScratch *)mem;
18545|  5.15M|    return s - 1;
18546|  5.15M|}
janet.c:free_one_scratch:
18528|  5.08M|static void free_one_scratch(JanetScratch *s) {
18529|  5.08M|    if (NULL != s->finalize) {
  ------------------
  |  Branch (18529:9): [True: 0, False: 5.08M]
  ------------------
18530|      0|        s->finalize((char *) s->mem);
18531|      0|    }
18532|  5.08M|    janet_free(s);
  ------------------
  |  | 2415|  5.08M|#define janet_free(X) free((X))
  ------------------
18533|  5.08M|}
janet.c:it_s64_tostring:
18829|  17.8k|static void it_s64_tostring(void *p, JanetBuffer *buffer) {
18830|  17.8k|    char str[32];
18831|       |    snprintf(str, sizeof(str), "%" PRId64, *((int64_t *)p));
18832|  17.8k|    janet_buffer_push_cstring(buffer, str);
18833|  17.8k|}
janet.c:janet_int64_compare:
18806|    467|static int janet_int64_compare(void *p1, void *p2) {
18807|    467|    int64_t x = *((int64_t *)p1);
18808|    467|    int64_t y = *((int64_t *)p2);
18809|    467|    return x == y ? 0 : x < y ? -1 : 1;
  ------------------
  |  Branch (18809:12): [True: 119, False: 348]
  |  Branch (18809:25): [True: 150, False: 198]
  ------------------
18810|    467|}
janet.c:janet_int64_hash:
18800|   149k|static int32_t janet_int64_hash(void *p1, size_t size) {
18801|   149k|    (void) size;
18802|   149k|    int32_t *words = p1;
18803|   149k|    return words[0] ^ words[1];
18804|   149k|}
janet.c:it_u64_tostring:
18835|  27.6k|static void it_u64_tostring(void *p, JanetBuffer *buffer) {
18836|  27.6k|    char str[32];
18837|       |    snprintf(str, sizeof(str), "%" PRIu64, *((uint64_t *)p));
18838|  27.6k|    janet_buffer_push_cstring(buffer, str);
18839|  27.6k|}
janet.c:janet_uint64_compare:
18812|  10.2k|static int janet_uint64_compare(void *p1, void *p2) {
18813|  10.2k|    uint64_t x = *((uint64_t *)p1);
18814|  10.2k|    uint64_t y = *((uint64_t *)p2);
18815|  10.2k|    return x == y ? 0 : x < y ? -1 : 1;
  ------------------
  |  Branch (18815:12): [True: 88, False: 10.1k]
  |  Branch (18815:25): [True: 71, False: 10.0k]
  ------------------
18816|  10.2k|}
janet.c:makef:
19558|  20.1k|static void *makef(FILE *f, int32_t flags, size_t bufsize) {
19559|  20.1k|    JanetFile *iof = (JanetFile *) janet_abstract(&janet_file_type, sizeof(JanetFile));
19560|  20.1k|    iof->file = f;
19561|  20.1k|    iof->flags = flags;
19562|  20.1k|    iof->vbufsize = bufsize;
19563|  20.1k|#if !(defined(JANET_WINDOWS) || defined(JANET_PLAN9))
19564|       |    /* While we would like fopen to set cloexec by default (like O_CLOEXEC) with the e flag, that is
19565|       |     * not standard. */
19566|  20.1k|    if (!(flags & JANET_FILE_NOT_CLOSEABLE))
  ------------------
  |  | 2278|  20.1k|#define JANET_FILE_NOT_CLOSEABLE 16
  ------------------
  |  Branch (19566:9): [True: 0, False: 20.1k]
  ------------------
19567|      0|        fcntl(fileno(f), F_SETFD, FD_CLOEXEC);
19568|  20.1k|#endif
19569|  20.1k|    return iof;
19570|  20.1k|}
janet.c:cfun_io_gc:
19766|  20.1k|static int cfun_io_gc(void *p, size_t len) {
19767|  20.1k|    (void) len;
19768|  20.1k|    JanetFile *iof = (JanetFile *)p;
19769|  20.1k|    janet_file_close(iof);
19770|  20.1k|    return 0;
19771|  20.1k|}
janet.c:readint:
21050|   455M|static int32_t readint(UnmarshalState *st, const uint8_t **atdata) {
21051|   455M|    const uint8_t *data = *atdata;
21052|   455M|    int32_t ret;
21053|   455M|    MARSH_EOS(st, data);
  ------------------
  |  |21045|   455M|#define MARSH_EOS(st, data) do { \
  |  |21046|   455M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21046:9): [True: 0, False: 455M]
  |  |  ------------------
  |  |21047|   455M|} while (0)
  |  |  ------------------
  |  |  |  Branch (21047:10): [Folded, False: 455M]
  |  |  ------------------
  ------------------
21054|   455M|    if (*data < 128) {
  ------------------
  |  Branch (21054:9): [True: 371M, False: 84.4M]
  ------------------
21055|   371M|        ret = *data++;
21056|   371M|    } else if (*data < 192) {
  ------------------
  |  Branch (21056:16): [True: 79.7M, False: 4.73M]
  ------------------
21057|  79.7M|        MARSH_EOS(st, data + 1);
  ------------------
  |  |21045|  79.7M|#define MARSH_EOS(st, data) do { \
  |  |21046|  79.7M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21046:9): [True: 0, False: 79.7M]
  |  |  ------------------
  |  |21047|  79.7M|} while (0)
  |  |  ------------------
  |  |  |  Branch (21047:10): [Folded, False: 79.7M]
  |  |  ------------------
  ------------------
21058|  79.7M|        uint32_t uret = ((data[0] & 0x3F) << 8) + data[1];
21059|       |        /* Sign extend 18 MSBs */
21060|  79.7M|        uret |= (uret >> 13) ? 0xFFFFC000 : 0;
  ------------------
  |  Branch (21060:17): [True: 22.3M, False: 57.4M]
  ------------------
21061|  79.7M|        ret = (int32_t)uret;
21062|  79.7M|        data += 2;
21063|  79.7M|    } else if (*data == LB_INTEGER) {
  ------------------
  |  Branch (21063:16): [True: 4.73M, False: 0]
  ------------------
21064|  4.73M|        MARSH_EOS(st, data + 4);
  ------------------
  |  |21045|  4.73M|#define MARSH_EOS(st, data) do { \
  |  |21046|  4.73M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21046:9): [True: 0, False: 4.73M]
  |  |  ------------------
  |  |21047|  4.73M|} while (0)
  |  |  ------------------
  |  |  |  Branch (21047:10): [Folded, False: 4.73M]
  |  |  ------------------
  ------------------
21065|  4.73M|        uint32_t ui = ((uint32_t)(data[1]) << 24) |
21066|  4.73M|                      ((uint32_t)(data[2]) << 16) |
21067|  4.73M|                      ((uint32_t)(data[3]) << 8) |
21068|  4.73M|                      (uint32_t)(data[4]);
21069|  4.73M|        ret = (int32_t)ui;
21070|  4.73M|        data += 5;
21071|  4.73M|    } else {
21072|      0|        janet_panicf("expected integer, got byte %x at index %d",
21073|      0|                     *data,
21074|      0|                     data - st->start);
21075|      0|        ret = 0;
21076|      0|    }
21077|   455M|    *atdata = data;
21078|   455M|    return ret;
21079|   455M|}
janet.c:unmarshal_one:
21659|   121M|    int flags) {
21660|   121M|    uint8_t lead;
21661|   121M|    MARSH_STACKCHECK;
  ------------------
  |  |20517|   121M|#define MARSH_STACKCHECK if ((flags & 0xFFFF) > JANET_RECURSION_GUARD) janet_panic("stack overflow")
  |  |  ------------------
  |  |  |  |  296|   121M|#define JANET_RECURSION_GUARD 1024
  |  |  ------------------
  |  |  |  Branch (20517:30): [True: 0, False: 121M]
  |  |  ------------------
  ------------------
21662|   121M|    MARSH_EOS(st, data);
  ------------------
  |  |21045|   121M|#define MARSH_EOS(st, data) do { \
  |  |21046|   121M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21046:9): [True: 0, False: 121M]
  |  |  ------------------
  |  |21047|   121M|} while (0)
  |  |  ------------------
  |  |  |  Branch (21047:10): [Folded, False: 121M]
  |  |  ------------------
  ------------------
21663|   121M|    lead = data[0];
21664|   121M|    if (lead < LB_REAL) {
  ------------------
  |  Branch (21664:9): [True: 9.28M, False: 112M]
  ------------------
21665|  9.28M|        *out = janet_wrap_integer(readint(st, &data));
  ------------------
  |  |  967|  9.28M|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|  9.28M|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
21666|  9.28M|        return data;
21667|  9.28M|    }
21668|   112M|    switch (lead) {
21669|   369k|        case LB_NIL:
  ------------------
  |  Branch (21669:9): [True: 369k, False: 112M]
  ------------------
21670|   369k|            *out = janet_wrap_nil();
  ------------------
  |  |  831|   369k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   369k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   369k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   369k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21671|   369k|            return data + 1;
21672|      0|        case LB_FALSE:
  ------------------
  |  Branch (21672:9): [True: 0, False: 112M]
  ------------------
21673|      0|            *out = janet_wrap_false();
  ------------------
  |  |  833|      0|#define janet_wrap_false() janet_nanbox_from_payload(JANET_BOOLEAN, 0)
  |  |  ------------------
  |  |  |  |  822|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21674|      0|            return data + 1;
21675|   893k|        case LB_TRUE:
  ------------------
  |  Branch (21675:9): [True: 893k, False: 111M]
  ------------------
21676|   893k|            *out = janet_wrap_true();
  ------------------
  |  |  832|   893k|#define janet_wrap_true() janet_nanbox_from_payload(JANET_BOOLEAN, 1)
  |  |  ------------------
  |  |  |  |  822|   893k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   893k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   893k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21677|   893k|            return data + 1;
21678|  20.1k|        case LB_INTEGER:
  ------------------
  |  Branch (21678:9): [True: 20.1k, False: 112M]
  ------------------
21679|       |            /* Long integer */
21680|  20.1k|            MARSH_EOS(st, data + 4);
  ------------------
  |  |21045|  20.1k|#define MARSH_EOS(st, data) do { \
  |  |21046|  20.1k|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21046:9): [True: 0, False: 20.1k]
  |  |  ------------------
  |  |21047|  20.1k|} while (0)
  |  |  ------------------
  |  |  |  Branch (21047:10): [Folded, False: 20.1k]
  |  |  ------------------
  ------------------
21681|  20.1k|            uint32_t ui = ((uint32_t)(data[4])) |
21682|  20.1k|                          ((uint32_t)(data[3]) << 8) |
21683|  20.1k|                          ((uint32_t)(data[2]) << 16) |
21684|  20.1k|                          ((uint32_t)(data[1]) << 24);
21685|  20.1k|            int32_t si = (int32_t)ui;
21686|  20.1k|            *out = janet_wrap_integer(si);
  ------------------
  |  |  967|  20.1k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|  20.1k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
21687|  20.1k|            return data + 5;
21688|  47.0k|        case LB_REAL:
  ------------------
  |  Branch (21688:9): [True: 47.0k, False: 112M]
  ------------------
21689|       |            /* Real */
21690|  47.0k|        {
21691|  47.0k|            union {
21692|  47.0k|                double d;
21693|  47.0k|                uint8_t bytes[8];
21694|  47.0k|            } u;
21695|  47.0k|            MARSH_EOS(st, data + 8);
  ------------------
  |  |21045|  47.0k|#define MARSH_EOS(st, data) do { \
  |  |21046|  47.0k|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21046:9): [True: 0, False: 47.0k]
  |  |  ------------------
  |  |21047|  47.0k|} while (0)
  |  |  ------------------
  |  |  |  Branch (21047:10): [Folded, False: 47.0k]
  |  |  ------------------
  ------------------
21696|       |#ifdef JANET_BIG_ENDIAN
21697|       |            u.bytes[0] = data[8];
21698|       |            u.bytes[1] = data[7];
21699|       |            u.bytes[2] = data[6];
21700|       |            u.bytes[3] = data[5];
21701|       |            u.bytes[4] = data[4];
21702|       |            u.bytes[5] = data[3];
21703|       |            u.bytes[6] = data[2];
21704|       |            u.bytes[7] = data[1];
21705|       |#else
21706|  47.0k|            memcpy(&u.bytes, data + 1, sizeof(double));
21707|  47.0k|#endif
21708|  47.0k|            *out = janet_wrap_number_safe(u.d);
21709|  47.0k|            janet_v_push(st->lookup, *out);
  ------------------
  |  |  757|  47.0k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|  47.0k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|  47.0k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|  47.0k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  47.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|  47.0k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  47.0k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 0, False: 47.0k]
  |  |  |  |  |  |  |  Branch (768:50): [True: 0, False: 47.0k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #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|  47.0k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  47.0k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21710|  47.0k|            return data + 9;
21711|  47.0k|        }
21712|  9.93M|        case LB_STRING:
  ------------------
  |  Branch (21712:9): [True: 9.93M, False: 102M]
  ------------------
21713|  22.4M|        case LB_SYMBOL:
  ------------------
  |  Branch (21713:9): [True: 12.5M, False: 100M]
  ------------------
21714|  22.4M|        case LB_BUFFER:
  ------------------
  |  Branch (21714:9): [True: 6.71k, False: 112M]
  ------------------
21715|  24.0M|        case LB_KEYWORD:
  ------------------
  |  Branch (21715:9): [True: 1.59M, False: 111M]
  ------------------
21716|  26.4M|        case LB_REGISTRY: {
  ------------------
  |  Branch (21716:9): [True: 2.38M, False: 110M]
  ------------------
21717|  26.4M|            data++;
21718|  26.4M|            int32_t len = readnat(st, &data);
21719|  26.4M|            MARSH_EOS(st, data - 1 + len);
  ------------------
  |  |21045|  26.4M|#define MARSH_EOS(st, data) do { \
  |  |21046|  26.4M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21046:9): [True: 0, False: 26.4M]
  |  |  ------------------
  |  |21047|  26.4M|} while (0)
  |  |  ------------------
  |  |  |  Branch (21047:10): [Folded, False: 26.4M]
  |  |  ------------------
  ------------------
21720|  26.4M|            if (lead == LB_STRING) {
  ------------------
  |  Branch (21720:17): [True: 9.93M, False: 16.5M]
  ------------------
21721|  9.93M|                const uint8_t *str = janet_string(data, len);
21722|  9.93M|                *out = janet_wrap_string(str);
  ------------------
  |  |  848|  9.93M|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|  9.93M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  9.93M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  9.93M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21723|  16.5M|            } else if (lead == LB_SYMBOL) {
  ------------------
  |  Branch (21723:24): [True: 12.5M, False: 3.98M]
  ------------------
21724|  12.5M|                const uint8_t *str = janet_symbol(data, len);
21725|  12.5M|                *out = janet_wrap_symbol(str);
  ------------------
  |  |  849|  12.5M|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  ------------------
  |  |  |  |  828|  12.5M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  12.5M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  12.5M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21726|  12.5M|            } else if (lead == LB_KEYWORD) {
  ------------------
  |  Branch (21726:24): [True: 1.59M, False: 2.39M]
  ------------------
21727|  1.59M|                const uint8_t *str = janet_keyword(data, len);
  ------------------
  |  | 1840|  1.59M|#define janet_keyword janet_symbol
  ------------------
21728|  1.59M|                *out = janet_wrap_keyword(str);
  ------------------
  |  |  850|  1.59M|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  ------------------
  |  |  |  |  828|  1.59M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.59M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.59M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21729|  2.39M|            } else if (lead == LB_REGISTRY) {
  ------------------
  |  Branch (21729:24): [True: 2.38M, False: 6.71k]
  ------------------
21730|  2.38M|                if (st->reg) {
  ------------------
  |  Branch (21730:21): [True: 2.38M, False: 0]
  ------------------
21731|  2.38M|                    Janet regkey = janet_symbolv(data, len);
  ------------------
  |  | 1836|  2.38M|#define janet_symbolv(str, len) janet_wrap_symbol(janet_symbol((str), (len)))
  |  |  ------------------
  |  |  |  |  849|  2.38M|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  2.38M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  2.38M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  2.38M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21732|  2.38M|                    *out = janet_table_get(st->reg, regkey);
21733|  2.38M|                } else {
21734|      0|                    *out = janet_wrap_nil();
  ------------------
  |  |  831|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21735|      0|                }
21736|  2.38M|            } else { /* (lead == LB_BUFFER) */
21737|  6.71k|                JanetBuffer *buffer = janet_buffer(len);
21738|  6.71k|                buffer->count = len;
21739|  6.71k|                safe_memcpy(buffer->data, data, len);
21740|  6.71k|                *out = janet_wrap_buffer(buffer);
  ------------------
  |  |  847|  6.71k|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  825|  6.71k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  6.71k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  6.71k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21741|  6.71k|            }
21742|  26.4M|            janet_v_push(st->lookup, *out);
  ------------------
  |  |  757|  26.4M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|  26.4M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|  26.4M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|  26.4M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  26.4M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  765|  26.4M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  26.4M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 0, False: 26.4M]
  |  |  |  |  |  |  |  Branch (768:50): [True: 80.5k, False: 26.3M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  770|  80.5k|#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.4M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  26.4M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21743|  26.4M|            return data + len;
21744|  26.4M|        }
21745|      0|        case LB_FIBER: {
  ------------------
  |  Branch (21745:9): [True: 0, False: 112M]
  ------------------
21746|      0|            JanetFiber *fiber;
21747|      0|            data = unmarshal_one_fiber(st, data + 1, &fiber, flags + 1);
21748|      0|            *out = janet_wrap_fiber(fiber);
  ------------------
  |  |  844|      0|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  825|      0|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21749|      0|            return data;
21750|  26.4M|        }
21751|  2.57M|        case LB_FUNCTION: {
  ------------------
  |  Branch (21751:9): [True: 2.57M, False: 110M]
  ------------------
21752|  2.57M|            JanetFunction *func;
21753|  2.57M|            JanetFuncDef *def;
21754|  2.57M|            data++;
21755|  2.57M|            int32_t len = readnat(st, &data);
21756|  2.57M|            if (len > 255) {
  ------------------
  |  Branch (21756:17): [True: 0, False: 2.57M]
  ------------------
21757|      0|                janet_panicf("invalid function - too many environments (%d)", len);
21758|      0|            }
21759|  2.57M|            func = janet_gcalloc(JANET_MEMORY_FUNCTION, sizeof(JanetFunction) +
21760|  2.57M|                                 len * sizeof(JanetFuncEnv));
21761|  2.57M|            func->def = NULL;
21762|  2.86M|            for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (21762:33): [True: 288k, False: 2.57M]
  ------------------
21763|   288k|                func->envs[i] = NULL;
21764|   288k|            }
21765|  2.57M|            *out = janet_wrap_function(func);
  ------------------
  |  |  852|  2.57M|#define janet_wrap_function(s) janet_nanbox_wrap_((s), JANET_FUNCTION)
  |  |  ------------------
  |  |  |  |  825|  2.57M|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.57M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.57M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21766|  2.57M|            janet_v_push(st->lookup, *out);
  ------------------
  |  |  757|  2.57M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|  2.57M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|  2.57M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|  2.57M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  2.57M|#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.57M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  2.57M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 0, False: 2.57M]
  |  |  |  |  |  |  |  Branch (768:50): [True: 0, False: 2.57M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #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.57M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  2.57M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21767|  2.57M|            data = unmarshal_one_def(st, data, &def, flags + 1);
21768|  2.57M|            func->def = def;
21769|  2.86M|            for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (21769:33): [True: 288k, False: 2.57M]
  ------------------
21770|   288k|                data = unmarshal_one_env(st, data, &(func->envs[i]), flags + 1);
21771|   288k|            }
21772|  2.57M|            return data;
21773|  2.57M|        }
21774|      0|        case LB_ABSTRACT: {
  ------------------
  |  Branch (21774:9): [True: 0, False: 112M]
  ------------------
21775|      0|            data++;
21776|      0|            return unmarshal_one_abstract(st, data, out, flags);
21777|  2.57M|        }
21778|  72.3M|        case LB_REFERENCE:
  ------------------
  |  Branch (21778:9): [True: 72.3M, False: 40.3M]
  ------------------
21779|  72.3M|        case LB_ARRAY:
  ------------------
  |  Branch (21779:9): [True: 20.1k, False: 112M]
  ------------------
21780|  72.3M|        case LB_ARRAY_WEAK:
  ------------------
  |  Branch (21780:9): [True: 0, False: 112M]
  ------------------
21781|  77.3M|        case LB_TUPLE:
  ------------------
  |  Branch (21781:9): [True: 5.04M, False: 107M]
  ------------------
21782|  77.4M|        case LB_STRUCT:
  ------------------
  |  Branch (21782:9): [True: 47.0k, False: 112M]
  ------------------
21783|  77.4M|        case LB_STRUCT_PROTO:
  ------------------
  |  Branch (21783:9): [True: 0, False: 112M]
  ------------------
21784|  82.3M|        case LB_TABLE:
  ------------------
  |  Branch (21784:9): [True: 4.90M, False: 107M]
  ------------------
21785|  82.3M|        case LB_TABLE_PROTO:
  ------------------
  |  Branch (21785:9): [True: 0, False: 112M]
  ------------------
21786|  82.3M|        case LB_TABLE_WEAKK:
  ------------------
  |  Branch (21786:9): [True: 0, False: 112M]
  ------------------
21787|  82.3M|        case LB_TABLE_WEAKV:
  ------------------
  |  Branch (21787:9): [True: 0, False: 112M]
  ------------------
21788|  82.3M|        case LB_TABLE_WEAKKV:
  ------------------
  |  Branch (21788:9): [True: 0, False: 112M]
  ------------------
21789|  82.3M|        case LB_TABLE_WEAKK_PROTO:
  ------------------
  |  Branch (21789:9): [True: 0, False: 112M]
  ------------------
21790|  82.3M|        case LB_TABLE_WEAKV_PROTO:
  ------------------
  |  Branch (21790:9): [True: 0, False: 112M]
  ------------------
21791|  82.3M|        case LB_TABLE_WEAKKV_PROTO:
  ------------------
  |  Branch (21791:9): [True: 0, False: 112M]
  ------------------
21792|       |            /* Things that open with integers */
21793|  82.3M|        {
21794|  82.3M|            data++;
21795|  82.3M|            int32_t len = readnat(st, &data);
21796|       |            /* DOS check */
21797|  82.3M|            if (lead != LB_REFERENCE) {
  ------------------
  |  Branch (21797:17): [True: 10.0M, False: 72.3M]
  ------------------
21798|  10.0M|                MARSH_EOS(st, data - 1 + len);
  ------------------
  |  |21045|  10.0M|#define MARSH_EOS(st, data) do { \
  |  |21046|  10.0M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21046:9): [True: 0, False: 10.0M]
  |  |  ------------------
  |  |21047|  10.0M|} while (0)
  |  |  ------------------
  |  |  |  Branch (21047:10): [Folded, False: 10.0M]
  |  |  ------------------
  ------------------
21799|  10.0M|            }
21800|  82.3M|            if (lead == LB_ARRAY || lead == LB_ARRAY_WEAK) {
  ------------------
  |  Branch (21800:17): [True: 20.1k, False: 82.3M]
  |  Branch (21800:37): [True: 0, False: 82.3M]
  ------------------
21801|       |                /* Array */
21802|  20.1k|                JanetArray *array = (lead == LB_ARRAY_WEAK) ? janet_array_weak(len) : janet_array(len);
  ------------------
  |  Branch (21802:37): [True: 0, False: 20.1k]
  ------------------
21803|  20.1k|                array->count = len;
21804|  20.1k|                *out = janet_wrap_array(array);
  ------------------
  |  |  845|  20.1k|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  825|  20.1k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  20.1k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  20.1k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21805|  20.1k|                janet_v_push(st->lookup, *out);
  ------------------
  |  |  757|  20.1k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|  20.1k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|  20.1k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|  20.1k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  20.1k|#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|  20.1k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  20.1k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 0, False: 20.1k]
  |  |  |  |  |  |  |  Branch (768:50): [True: 0, False: 20.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #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|  20.1k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  20.1k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21806|   174k|                for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (21806:37): [True: 154k, False: 20.1k]
  ------------------
21807|   154k|                    data = unmarshal_one(st, data, array->data + i, flags + 1);
21808|   154k|                }
21809|  82.3M|            } else if (lead == LB_TUPLE) {
  ------------------
  |  Branch (21809:24): [True: 5.04M, False: 77.2M]
  ------------------
21810|       |                /* Tuple */
21811|  5.04M|                Janet *tup = janet_tuple_begin(len);
21812|  5.04M|                int32_t flag = readint(st, &data);
21813|  5.04M|                janet_tuple_flag(tup) |= (int32_t)(((uint32_t) flag) << 16);  /* Avoid left shift of negative value */
  ------------------
  |  | 1806|  5.04M|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1800|  5.04M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
21814|  19.9M|                for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (21814:37): [True: 14.9M, False: 5.04M]
  ------------------
21815|  14.9M|                    data = unmarshal_one(st, data, tup + i, flags + 1);
21816|  14.9M|                }
21817|  5.04M|                *out = janet_wrap_tuple(janet_tuple_end(tup));
  ------------------
  |  |  843|  5.04M|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|  5.04M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  5.04M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  5.04M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21818|  5.04M|                janet_v_push(st->lookup, *out);
  ------------------
  |  |  757|  5.04M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|  5.04M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|  5.04M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|  5.04M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  5.04M|#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|  5.04M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  5.04M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 0, False: 5.04M]
  |  |  |  |  |  |  |  Branch (768:50): [True: 0, False: 5.04M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #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|  5.04M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  5.04M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21819|  77.2M|            } else if (lead == LB_STRUCT || lead == LB_STRUCT_PROTO) {
  ------------------
  |  Branch (21819:24): [True: 47.0k, False: 77.2M]
  |  Branch (21819:45): [True: 0, False: 77.2M]
  ------------------
21820|       |                /* Struct */
21821|  47.0k|                JanetKV *struct_ = janet_struct_begin(len);
21822|  47.0k|                if (lead == LB_STRUCT_PROTO) {
  ------------------
  |  Branch (21822:21): [True: 0, False: 47.0k]
  ------------------
21823|      0|                    Janet proto;
21824|      0|                    data = unmarshal_one(st, data, &proto, flags + 1);
21825|      0|                    janet_asserttype(proto, JANET_STRUCT, st);
21826|      0|                    janet_struct_proto(struct_) = janet_unwrap_struct(proto);
  ------------------
  |  | 1851|      0|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1846|      0|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                                  janet_struct_proto(struct_) = janet_unwrap_struct(proto);
  ------------------
  |  |  857|      0|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
21827|      0|                }
21828|   362k|                for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (21828:37): [True: 315k, False: 47.0k]
  ------------------
21829|   315k|                    Janet key, value;
21830|   315k|                    data = unmarshal_one(st, data, &key, flags + 1);
21831|   315k|                    data = unmarshal_one(st, data, &value, flags + 1);
21832|   315k|                    janet_struct_put(struct_, key, value);
21833|   315k|                }
21834|  47.0k|                *out = janet_wrap_struct(janet_struct_end(struct_));
  ------------------
  |  |  842|  47.0k|#define janet_wrap_struct(s) janet_nanbox_wrap_c((s), JANET_STRUCT)
  |  |  ------------------
  |  |  |  |  828|  47.0k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  47.0k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  47.0k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21835|  47.0k|                janet_v_push(st->lookup, *out);
  ------------------
  |  |  757|  47.0k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|  47.0k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|  47.0k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|  47.0k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  47.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|  47.0k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  47.0k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 0, False: 47.0k]
  |  |  |  |  |  |  |  Branch (768:50): [True: 0, False: 47.0k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #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|  47.0k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  47.0k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21836|  77.2M|            } else if (lead == LB_REFERENCE) {
  ------------------
  |  Branch (21836:24): [True: 72.3M, False: 4.90M]
  ------------------
21837|  72.3M|                if (len >= janet_v_count(st->lookup))
  ------------------
  |  |  759|  72.3M|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  766|  72.3M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  72.3M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (759:34): [True: 72.3M, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (21837:21): [True: 0, False: 72.3M]
  ------------------
21838|      0|                    janet_panicf("invalid reference %d", len);
21839|  72.3M|                *out = st->lookup[len];
21840|  72.3M|            } else {
21841|       |                /* Table */
21842|  4.90M|                JanetTable *t;
21843|  4.90M|                if (lead == LB_TABLE_WEAKK_PROTO || lead == LB_TABLE_WEAKK) {
  ------------------
  |  Branch (21843:21): [True: 0, False: 4.90M]
  |  Branch (21843:53): [True: 0, False: 4.90M]
  ------------------
21844|      0|                    t = janet_table_weakk(len);
21845|  4.90M|                } else if (lead == LB_TABLE_WEAKV_PROTO || lead == LB_TABLE_WEAKV) {
  ------------------
  |  Branch (21845:28): [True: 0, False: 4.90M]
  |  Branch (21845:60): [True: 0, False: 4.90M]
  ------------------
21846|      0|                    t = janet_table_weakv(len);
21847|  4.90M|                } else if (lead == LB_TABLE_WEAKKV_PROTO || lead == LB_TABLE_WEAKKV) {
  ------------------
  |  Branch (21847:28): [True: 0, False: 4.90M]
  |  Branch (21847:61): [True: 0, False: 4.90M]
  ------------------
21848|      0|                    t = janet_table_weakkv(len);
21849|  4.90M|                } else {
21850|  4.90M|                    t = janet_table(len);
21851|  4.90M|                }
21852|  4.90M|                *out = janet_wrap_table(t);
  ------------------
  |  |  846|  4.90M|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  825|  4.90M|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  4.90M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  4.90M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21853|  4.90M|                janet_v_push(st->lookup, *out);
  ------------------
  |  |  757|  4.90M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|  4.90M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|  4.90M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|  4.90M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  4.90M|#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.90M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  4.90M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 6.71k, False: 4.90M]
  |  |  |  |  |  |  |  Branch (768:50): [True: 6.71k, False: 4.89M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  770|  13.4k|#define janet_v__grow(v, n)      ((v) = janet_v_grow((v), (n), sizeof(*(v))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  766|  4.90M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  4.90M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21854|  4.90M|                if (lead == LB_TABLE_PROTO || lead == LB_TABLE_WEAKK_PROTO || lead == LB_TABLE_WEAKV_PROTO || lead == LB_TABLE_WEAKKV_PROTO) {
  ------------------
  |  Branch (21854:21): [True: 0, False: 4.90M]
  |  Branch (21854:47): [True: 0, False: 4.90M]
  |  Branch (21854:79): [True: 0, False: 4.90M]
  |  Branch (21854:111): [True: 0, False: 4.90M]
  ------------------
21855|      0|                    Janet proto;
21856|      0|                    data = unmarshal_one(st, data, &proto, flags + 1);
21857|      0|                    janet_asserttype(proto, JANET_TABLE, st);
21858|      0|                    t->proto = janet_unwrap_table(proto);
  ------------------
  |  |  861|      0|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
21859|      0|                }
21860|  29.6M|                for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (21860:37): [True: 24.7M, False: 4.90M]
  ------------------
21861|  24.7M|                    Janet key, value;
21862|  24.7M|                    data = unmarshal_one(st, data, &key, flags + 1);
21863|  24.7M|                    data = unmarshal_one(st, data, &value, flags + 1);
21864|  24.7M|                    janet_table_put(t, key, value);
21865|  24.7M|                }
21866|  4.90M|            }
21867|  82.3M|            return data;
21868|  82.3M|        }
21869|      0|        case LB_UNSAFE_POINTER: {
  ------------------
  |  Branch (21869:9): [True: 0, False: 112M]
  ------------------
21870|      0|            MARSH_EOS(st, data + sizeof(void *));
  ------------------
  |  |21045|      0|#define MARSH_EOS(st, data) do { \
  |  |21046|      0|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21046:9): [True: 0, False: 0]
  |  |  ------------------
  |  |21047|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (21047:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
21871|      0|            data++;
21872|      0|            if (!(flags & JANET_MARSHAL_UNSAFE)) {
  ------------------
  |  | 1911|      0|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (21872:17): [True: 0, False: 0]
  ------------------
21873|      0|                janet_panicf("unsafe flag not given, "
21874|      0|                             "will not unmarshal raw pointer at index %d",
21875|      0|                             (int)(data - st->start));
21876|      0|            }
21877|      0|            union {
21878|      0|                void *ptr;
21879|      0|                uint8_t bytes[sizeof(void *)];
21880|      0|            } u;
21881|      0|            memcpy(u.bytes, data, sizeof(void *));
21882|      0|            data += sizeof(void *);
21883|      0|            *out = janet_wrap_pointer(u.ptr);
  ------------------
  |  |  854|      0|#define janet_wrap_pointer(s) janet_nanbox_wrap_((s), JANET_POINTER)
  |  |  ------------------
  |  |  |  |  825|      0|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21884|      0|            janet_v_push(st->lookup, *out);
  ------------------
  |  |  757|      0|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|      0|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|      0|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|      0|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  765|      0|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (768:50): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  770|      0|#define janet_v__grow(v, n)      ((v) = janet_v_grow((v), (n), sizeof(*(v))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  766|      0|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21885|      0|            return data;
21886|      0|        }
21887|      0|#ifdef JANET_EV
21888|      0|        case LB_POINTER_BUFFER: {
  ------------------
  |  Branch (21888:9): [True: 0, False: 112M]
  ------------------
21889|      0|            data++;
21890|      0|            int32_t count = readnat(st, &data);
21891|      0|            int32_t capacity = readnat(st, &data);
21892|      0|            MARSH_EOS(st, data + sizeof(void *));
  ------------------
  |  |21045|      0|#define MARSH_EOS(st, data) do { \
  |  |21046|      0|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21046:9): [True: 0, False: 0]
  |  |  ------------------
  |  |21047|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (21047:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
21893|      0|            union {
21894|      0|                void *ptr;
21895|      0|                uint8_t bytes[sizeof(void *)];
21896|      0|            } u;
21897|      0|            if (!(flags & JANET_MARSHAL_UNSAFE)) {
  ------------------
  |  | 1911|      0|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (21897:17): [True: 0, False: 0]
  ------------------
21898|      0|                janet_panicf("unsafe flag not given, "
21899|      0|                             "will not unmarshal raw pointer at index %d",
21900|      0|                             (int)(data - st->start));
21901|      0|            }
21902|      0|            memcpy(u.bytes, data, sizeof(void *));
21903|      0|            data += sizeof(void *);
21904|      0|            JanetBuffer *buffer = janet_pointer_buffer_unsafe(u.ptr, capacity, count);
21905|      0|            *out = janet_wrap_buffer(buffer);
  ------------------
  |  |  847|      0|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  825|      0|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21906|      0|            janet_v_push(st->lookup, *out);
  ------------------
  |  |  757|      0|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|      0|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|      0|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|      0|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  765|      0|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (768:50): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  770|      0|#define janet_v__grow(v, n)      ((v) = janet_v_grow((v), (n), sizeof(*(v))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  766|      0|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21907|      0|            return data;
21908|      0|        }
21909|      0|#endif
21910|      0|        case LB_UNSAFE_CFUNCTION: {
  ------------------
  |  Branch (21910:9): [True: 0, False: 112M]
  ------------------
21911|      0|            MARSH_EOS(st, data + sizeof(JanetCFunction));
  ------------------
  |  |21045|      0|#define MARSH_EOS(st, data) do { \
  |  |21046|      0|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21046:9): [True: 0, False: 0]
  |  |  ------------------
  |  |21047|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (21047:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
21912|      0|            data++;
21913|      0|            if (!(flags & JANET_MARSHAL_UNSAFE)) {
  ------------------
  |  | 1911|      0|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (21913:17): [True: 0, False: 0]
  ------------------
21914|      0|                janet_panicf("unsafe flag not given, "
21915|      0|                             "will not unmarshal function pointer at index %d",
21916|      0|                             (int)(data - st->start));
21917|      0|            }
21918|      0|            union {
21919|      0|                JanetCFunction ptr;
21920|      0|                uint8_t bytes[sizeof(JanetCFunction)];
21921|      0|            } u;
21922|      0|            memcpy(u.bytes, data, sizeof(JanetCFunction));
21923|      0|            data += sizeof(JanetCFunction);
21924|      0|            *out = janet_wrap_cfunction(u.ptr);
  ------------------
  |  |  853|      0|#define janet_wrap_cfunction(s) janet_nanbox_wrap_((s), JANET_CFUNCTION)
  |  |  ------------------
  |  |  |  |  825|      0|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21925|      0|            janet_v_push(st->lookup, *out);
  ------------------
  |  |  757|      0|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|      0|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|      0|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|      0|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  765|      0|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (768:50): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  770|      0|#define janet_v__grow(v, n)      ((v) = janet_v_grow((v), (n), sizeof(*(v))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  766|      0|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21926|      0|            return data;
21927|      0|        }
21928|      0|#ifdef JANET_EV
21929|      0|        case LB_THREADED_ABSTRACT: {
  ------------------
  |  Branch (21929:9): [True: 0, False: 112M]
  ------------------
21930|      0|            MARSH_EOS(st, data + sizeof(void *));
  ------------------
  |  |21045|      0|#define MARSH_EOS(st, data) do { \
  |  |21046|      0|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21046:9): [True: 0, False: 0]
  |  |  ------------------
  |  |21047|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (21047:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
21931|      0|            data++;
21932|      0|            if (!(flags & JANET_MARSHAL_UNSAFE)) {
  ------------------
  |  | 1911|      0|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (21932:17): [True: 0, False: 0]
  ------------------
21933|      0|                janet_panicf("unsafe flag not given, "
21934|      0|                             "will not unmarshal threaded abstract pointer at index %d",
21935|      0|                             (int)(data - st->start));
21936|      0|            }
21937|      0|            union {
21938|      0|                void *ptr;
21939|      0|                uint8_t bytes[sizeof(void *)];
21940|      0|            } u;
21941|      0|            memcpy(u.bytes, data, sizeof(void *));
21942|      0|            data += sizeof(void *);
21943|       |
21944|      0|            if (flags & JANET_MARSHAL_DECREF) {
  ------------------
  |  |  387|      0|#define JANET_MARSHAL_DECREF 0x40000
  ------------------
  |  Branch (21944:17): [True: 0, False: 0]
  ------------------
21945|       |                /* Decrement immediately and don't bother putting into heap */
21946|      0|                janet_abstract_decref(u.ptr);
21947|      0|                *out = janet_wrap_nil();
  ------------------
  |  |  831|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21948|      0|            } else {
21949|      0|                *out = janet_wrap_abstract(u.ptr);
  ------------------
  |  |  851|      0|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|      0|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21950|      0|                Janet check = janet_table_get(&janet_vm.threaded_abstracts, *out);
21951|      0|                if (janet_checktype(check, JANET_NIL)) {
  ------------------
  |  |  806|      0|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 0]
  |  |  ------------------
  |  |  807|      0|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21952|       |                    /* Transfers reference from threaded channel buffer to current heap */
21953|      0|                    janet_table_put(&janet_vm.threaded_abstracts, *out, janet_wrap_false());
  ------------------
  |  |  833|      0|#define janet_wrap_false() janet_nanbox_from_payload(JANET_BOOLEAN, 0)
  |  |  ------------------
  |  |  |  |  822|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21954|      0|                } else {
21955|       |                    /* Heap reference already accounted for, remove threaded channel reference. */
21956|      0|                    janet_abstract_decref(u.ptr);
21957|      0|                }
21958|      0|            }
21959|       |
21960|      0|            janet_v_push(st->lookup, *out);
  ------------------
  |  |  757|      0|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|      0|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|      0|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|      0|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  765|      0|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (768:50): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  770|      0|#define janet_v__grow(v, n)      ((v) = janet_v_grow((v), (n), sizeof(*(v))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  766|      0|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21961|      0|            return data;
21962|      0|        }
21963|      0|#endif
21964|      0|        default: {
  ------------------
  |  Branch (21964:9): [True: 0, False: 112M]
  ------------------
21965|      0|            janet_panicf("unknown byte %x at index %d",
21966|      0|                         *data,
21967|      0|                         (int)(data - st->start));
21968|      0|            return NULL;
21969|      0|        }
21970|   112M|    }
21971|   112M|}
janet.c:readnat:
21082|   140M|static int32_t readnat(UnmarshalState *st, const uint8_t **atdata) {
21083|   140M|    int32_t ret = readint(st, atdata);
21084|   140M|    if (ret < 0) {
  ------------------
  |  Branch (21084:9): [True: 0, False: 140M]
  ------------------
21085|      0|        janet_panicf("expected integer >= 0, got %d", ret);
21086|      0|    }
21087|   140M|    return ret;
21088|   140M|}
janet.c:unmarshal_one_def:
21221|  3.61M|    int flags) {
21222|  3.61M|    MARSH_EOS(st, data);
  ------------------
  |  |21045|  3.61M|#define MARSH_EOS(st, data) do { \
  |  |21046|  3.61M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21046:9): [True: 0, False: 3.61M]
  |  |  ------------------
  |  |21047|  3.61M|} while (0)
  |  |  ------------------
  |  |  |  Branch (21047:10): [Folded, False: 3.61M]
  |  |  ------------------
  ------------------
21223|  3.61M|    if (*data == LB_FUNCDEF_REF) {
  ------------------
  |  Branch (21223:9): [True: 26.8k, False: 3.59M]
  ------------------
21224|  26.8k|        data++;
21225|  26.8k|        int32_t index = readint(st, &data);
21226|  26.8k|        if (index < 0 || index >= janet_v_count(st->lookup_defs))
  ------------------
  |  |  759|  26.8k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  766|  26.8k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  26.8k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (759:34): [True: 26.8k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (21226:13): [True: 0, False: 26.8k]
  |  Branch (21226:26): [True: 0, False: 26.8k]
  ------------------
21227|      0|            janet_panicf("invalid funcdef reference %d", index);
21228|  26.8k|        *out = st->lookup_defs[index];
21229|  3.59M|    } else {
21230|       |        /* Initialize with values that will not break garbage collection
21231|       |         * if unmarshalling fails. */
21232|  3.59M|        JanetFuncDef *def = janet_gcalloc(JANET_MEMORY_FUNCDEF, sizeof(JanetFuncDef));
21233|  3.59M|        def->environments_length = 0;
21234|  3.59M|        def->defs_length = 0;
21235|  3.59M|        def->constants_length = 0;
21236|  3.59M|        def->bytecode_length = 0;
21237|  3.59M|        def->name = NULL;
21238|  3.59M|        def->source = NULL;
21239|  3.59M|        def->closure_bitset = NULL;
21240|  3.59M|        def->defs = NULL;
21241|  3.59M|        def->environments = NULL;
21242|  3.59M|        def->constants = NULL;
21243|  3.59M|        def->bytecode = NULL;
21244|  3.59M|        def->sourcemap = NULL;
21245|  3.59M|        def->symbolmap = NULL;
21246|  3.59M|        def->symbolmap_length = 0;
21247|  3.59M|        def->named_args_count = 0;
21248|  3.59M|        janet_v_push(st->lookup_defs, def);
  ------------------
  |  |  757|  3.59M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|  3.59M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|  3.59M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|  3.58M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  3.58M|#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.58M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  3.58M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 6.71k, False: 3.58M]
  |  |  |  |  |  |  |  Branch (768:50): [True: 67.1k, False: 3.51M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  770|  73.8k|#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.59M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  3.59M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21249|       |
21250|       |        /* Set default lengths to zero */
21251|  3.59M|        int32_t bytecode_length = 0;
21252|  3.59M|        int32_t constants_length = 0;
21253|  3.59M|        int32_t environments_length = 0;
21254|  3.59M|        int32_t defs_length = 0;
21255|  3.59M|        int32_t symbolmap_length = 0;
21256|       |
21257|       |        /* Read flags and other fixed values */
21258|  3.59M|        def->flags = readint(st, &data);
21259|  3.59M|        def->slotcount = readnat(st, &data);
21260|  3.59M|        def->arity = readnat(st, &data);
21261|  3.59M|        def->min_arity = readnat(st, &data);
21262|  3.59M|        def->max_arity = readnat(st, &data);
21263|       |
21264|       |        /* Read some lengths */
21265|  3.59M|        constants_length = readnat(st, &data);
21266|  3.59M|        bytecode_length = readnat(st, &data);
21267|  3.59M|        if (def->flags & JANET_FUNCDEF_FLAG_NAMEDARGS)
  ------------------
  |  | 1107|  3.59M|#define JANET_FUNCDEF_FLAG_NAMEDARGS 0x4000000
  ------------------
  |  Branch (21267:13): [True: 13.4k, False: 3.57M]
  ------------------
21268|  13.4k|            def->named_args_count = readnat(st, &data);
21269|  3.59M|        if (def->flags & JANET_FUNCDEF_FLAG_HASENVS)
  ------------------
  |  | 1103|  3.59M|#define JANET_FUNCDEF_FLAG_HASENVS 0x400000
  ------------------
  |  Branch (21269:13): [True: 3.37M, False: 221k]
  ------------------
21270|  3.37M|            environments_length = readnat(st, &data);
21271|  3.59M|        if (def->flags & JANET_FUNCDEF_FLAG_HASDEFS)
  ------------------
  |  | 1102|  3.59M|#define JANET_FUNCDEF_FLAG_HASDEFS 0x200000
  ------------------
  |  Branch (21271:13): [True: 470k, False: 3.12M]
  ------------------
21272|   470k|            defs_length = readnat(st, &data);
21273|  3.59M|        if (def->flags & JANET_FUNCDEF_FLAG_HASSYMBOLMAP)
  ------------------
  |  | 1099|  3.59M|#define JANET_FUNCDEF_FLAG_HASSYMBOLMAP 0x40000
  ------------------
  |  Branch (21273:13): [True: 3.32M, False: 268k]
  ------------------
21274|  3.32M|            symbolmap_length = readnat(st, &data);
21275|       |
21276|       |        /* Check name and source (optional) */
21277|  3.59M|        if (def->flags & JANET_FUNCDEF_FLAG_HASNAME) {
  ------------------
  |  | 1100|  3.59M|#define JANET_FUNCDEF_FLAG_HASNAME 0x80000
  ------------------
  |  Branch (21277:13): [True: 3.36M, False: 228k]
  ------------------
21278|  3.36M|            Janet x;
21279|  3.36M|            data = unmarshal_one(st, data, &x, flags + 1);
21280|  3.36M|            janet_asserttype(x, JANET_STRING, st);
21281|  3.36M|            def->name = janet_unwrap_string(x);
  ------------------
  |  |  863|  3.36M|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
21282|  3.36M|        }
21283|  3.59M|        if (def->flags & JANET_FUNCDEF_FLAG_HASSOURCE) {
  ------------------
  |  | 1101|  3.59M|#define JANET_FUNCDEF_FLAG_HASSOURCE 0x100000
  ------------------
  |  Branch (21283:13): [True: 3.37M, False: 221k]
  ------------------
21284|  3.37M|            Janet x;
21285|  3.37M|            data = unmarshal_one(st, data, &x, flags + 1);
21286|  3.37M|            janet_asserttype(x, JANET_STRING, st);
21287|  3.37M|            def->source = janet_unwrap_string(x);
  ------------------
  |  |  863|  3.37M|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
21288|  3.37M|        }
21289|       |
21290|       |        /* Unmarshal constants */
21291|  3.59M|        if (constants_length) {
  ------------------
  |  Branch (21291:13): [True: 2.73M, False: 852k]
  ------------------
21292|  2.73M|            def->constants = array_allocate(sizeof(Janet), constants_length);
21293|  2.73M|            if (!def->constants) {
  ------------------
  |  Branch (21293:17): [True: 0, False: 2.73M]
  ------------------
21294|      0|                JANET_OUT_OF_MEMORY;
  ------------------
  |  |  419|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (419:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
21295|      0|            }
21296|  17.9M|            for (int32_t i = 0; i < constants_length; i++)
  ------------------
  |  Branch (21296:33): [True: 15.2M, False: 2.73M]
  ------------------
21297|  15.2M|                data = unmarshal_one(st, data, def->constants + i, flags + 1);
21298|  2.73M|        } else {
21299|   852k|            def->constants = NULL;
21300|   852k|        }
21301|  3.59M|        def->constants_length = constants_length;
21302|       |
21303|       |        /* Unmarshal symbol map, if needed */
21304|  3.59M|        if (def->flags & JANET_FUNCDEF_FLAG_HASSYMBOLMAP) {
  ------------------
  |  | 1099|  3.59M|#define JANET_FUNCDEF_FLAG_HASSYMBOLMAP 0x40000
  ------------------
  |  Branch (21304:13): [True: 3.32M, False: 268k]
  ------------------
21305|  3.32M|            def->symbolmap = array_allocate(sizeof(JanetSymbolMap), symbolmap_length);
21306|  3.32M|            if (def->symbolmap == NULL) {
  ------------------
  |  Branch (21306:17): [True: 0, False: 3.32M]
  ------------------
21307|      0|                JANET_OUT_OF_MEMORY;
  ------------------
  |  |  419|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (419:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
21308|      0|            }
21309|  37.4M|            for (int32_t i = 0; i < symbolmap_length; i++) {
  ------------------
  |  Branch (21309:33): [True: 34.1M, False: 3.32M]
  ------------------
21310|  34.1M|                def->symbolmap[i].birth_pc = (uint32_t) readint(st, &data);
21311|  34.1M|                def->symbolmap[i].death_pc = (uint32_t) readint(st, &data);
21312|  34.1M|                def->symbolmap[i].slot_index = (uint32_t) readint(st, &data);
21313|  34.1M|                Janet value;
21314|  34.1M|                data = unmarshal_one(st, data, &value, flags + 1);
21315|  34.1M|                if (!janet_checktype(value, JANET_SYMBOL)) {
  ------------------
  |  |  806|  34.1M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 34.1M]
  |  |  ------------------
  |  |  807|  34.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|  34.1M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  34.1M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  34.1M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  34.1M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  34.1M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (21315:21): [True: 0, False: 34.1M]
  ------------------
21316|      0|                    janet_panicf("corrupted symbolmap when unmarshalling debug info, got %v", value);
21317|      0|                }
21318|  34.1M|                def->symbolmap[i].symbol = janet_unwrap_symbol(value);
  ------------------
  |  |  864|  34.1M|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
21319|  34.1M|            }
21320|  3.32M|            def->symbolmap_length = (uint32_t) symbolmap_length;
21321|  3.32M|        }
21322|       |
21323|       |        /* Unmarshal bytecode */
21324|  3.59M|        def->bytecode = array_allocate(sizeof(uint32_t), bytecode_length);
21325|  3.59M|        if (!def->bytecode) {
  ------------------
  |  Branch (21325:13): [True: 0, False: 3.59M]
  ------------------
21326|      0|            JANET_OUT_OF_MEMORY;
  ------------------
  |  |  419|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (419:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
21327|      0|        }
21328|  3.59M|        data = janet_unmarshal_u32s(st, data, def->bytecode, bytecode_length);
21329|  3.59M|        def->bytecode_length = bytecode_length;
21330|       |
21331|       |        /* Unmarshal environments */
21332|  3.59M|        if (def->flags & JANET_FUNCDEF_FLAG_HASENVS) {
  ------------------
  |  | 1103|  3.59M|#define JANET_FUNCDEF_FLAG_HASENVS 0x400000
  ------------------
  |  Branch (21332:13): [True: 3.37M, False: 221k]
  ------------------
21333|  3.37M|            def->environments = janet_calloc(1, sizeof(int32_t) * (size_t) environments_length);
  ------------------
  |  | 2412|  3.37M|#define janet_calloc(X, Y) calloc((X), (Y))
  ------------------
21334|  3.37M|            if (!def->environments) {
  ------------------
  |  Branch (21334:17): [True: 0, False: 3.37M]
  ------------------
21335|      0|                JANET_OUT_OF_MEMORY;
  ------------------
  |  |  419|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (419:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
21336|      0|            }
21337|  4.69M|            for (int32_t i = 0; i < environments_length; i++) {
  ------------------
  |  Branch (21337:33): [True: 1.32M, False: 3.37M]
  ------------------
21338|  1.32M|                def->environments[i] = readint(st, &data);
21339|  1.32M|            }
21340|  3.37M|        } else {
21341|   221k|            def->environments = NULL;
21342|   221k|        }
21343|  3.59M|        def->environments_length = environments_length;
21344|       |
21345|       |        /* Unmarshal sub funcdefs */
21346|  3.59M|        if (def->flags & JANET_FUNCDEF_FLAG_HASDEFS) {
  ------------------
  |  | 1102|  3.59M|#define JANET_FUNCDEF_FLAG_HASDEFS 0x200000
  ------------------
  |  Branch (21346:13): [True: 470k, False: 3.12M]
  ------------------
21347|   470k|            def->defs = janet_calloc(1, sizeof(JanetFuncDef *) * (size_t) defs_length);
  ------------------
  |  | 2412|   470k|#define janet_calloc(X, Y) calloc((X), (Y))
  ------------------
21348|   470k|            if (!def->defs) {
  ------------------
  |  Branch (21348:17): [True: 0, False: 470k]
  ------------------
21349|      0|                JANET_OUT_OF_MEMORY;
  ------------------
  |  |  419|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (419:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
21350|      0|            }
21351|  1.51M|            for (int32_t i = 0; i < defs_length; i++) {
  ------------------
  |  Branch (21351:33): [True: 1.04M, False: 470k]
  ------------------
21352|  1.04M|                data = unmarshal_one_def(st, data, def->defs + i, flags + 1);
21353|  1.04M|            }
21354|  3.12M|        } else {
21355|  3.12M|            def->defs = NULL;
21356|  3.12M|        }
21357|  3.59M|        def->defs_length = defs_length;
21358|       |
21359|       |        /* Unmarshal source maps if needed */
21360|  3.59M|        if (def->flags & JANET_FUNCDEF_FLAG_HASSOURCEMAP) {
  ------------------
  |  | 1104|  3.59M|#define JANET_FUNCDEF_FLAG_HASSOURCEMAP 0x800000
  ------------------
  |  Branch (21360:13): [True: 3.37M, False: 221k]
  ------------------
21361|  3.37M|            int32_t current = 0;
21362|  3.37M|            def->sourcemap = array_allocate(sizeof(JanetSourceMapping), bytecode_length);
21363|  3.37M|            if (!def->sourcemap) {
  ------------------
  |  Branch (21363:17): [True: 0, False: 3.37M]
  ------------------
21364|      0|                JANET_OUT_OF_MEMORY;
  ------------------
  |  |  419|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (419:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
21365|      0|            }
21366|   100M|            for (int32_t i = 0; i < bytecode_length; i++) {
  ------------------
  |  Branch (21366:33): [True: 96.6M, False: 3.37M]
  ------------------
21367|  96.6M|                current += readint(st, &data);
21368|  96.6M|                def->sourcemap[i].line = current;
21369|  96.6M|                def->sourcemap[i].column = readint(st, &data);
21370|  96.6M|            }
21371|  3.37M|        } else {
21372|   221k|            def->sourcemap = NULL;
21373|   221k|        }
21374|       |
21375|       |        /* Unmarshal closure bitset if needed */
21376|  3.59M|        if (def->flags & JANET_FUNCDEF_FLAG_HASCLOBITSET) {
  ------------------
  |  | 1106|  3.59M|#define JANET_FUNCDEF_FLAG_HASCLOBITSET 0x2000000
  ------------------
  |  Branch (21376:13): [True: 396k, False: 3.19M]
  ------------------
21377|   396k|            int32_t n = ((def->slotcount - 1) >> 5) + 1;
21378|   396k|            def->closure_bitset = array_allocate(sizeof(uint32_t), n);
21379|   396k|            if (NULL == def->closure_bitset) {
  ------------------
  |  Branch (21379:17): [True: 0, False: 396k]
  ------------------
21380|      0|                JANET_OUT_OF_MEMORY;
  ------------------
  |  |  419|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (419:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
21381|      0|            }
21382|   396k|            data = janet_unmarshal_u32s(st, data, def->closure_bitset, n);
21383|   396k|        }
21384|       |
21385|       |        /* Validate */
21386|  3.59M|        int status;
21387|  3.59M|        if ((status = janet_verify(def))) {
  ------------------
  |  Branch (21387:13): [True: 0, False: 3.59M]
  ------------------
21388|      0|            janet_panicf("funcdef has invalid bytecode: %d", status);
21389|      0|        }
21390|       |
21391|       |        /* Set def */
21392|  3.59M|        *out = def;
21393|  3.59M|    }
21394|  3.61M|    return data;
21395|  3.61M|}
janet.c:janet_unmarshal_u32s:
21203|  3.98M|static const uint8_t *janet_unmarshal_u32s(UnmarshalState *st, const uint8_t *data, uint32_t *into, int32_t n) {
21204|   103M|    for (int32_t i = 0; i < n; i++) {
  ------------------
  |  Branch (21204:25): [True: 99.7M, False: 3.98M]
  ------------------
21205|  99.7M|        MARSH_EOS(st, data + 3);
  ------------------
  |  |21045|  99.7M|#define MARSH_EOS(st, data) do { \
  |  |21046|  99.7M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21046:9): [True: 0, False: 99.7M]
  |  |  ------------------
  |  |21047|  99.7M|} while (0)
  |  |  ------------------
  |  |  |  Branch (21047:10): [Folded, False: 99.7M]
  |  |  ------------------
  ------------------
21206|  99.7M|        into[i] =
21207|  99.7M|            (uint32_t)(data[0]) |
21208|  99.7M|            ((uint32_t)(data[1]) << 8) |
21209|  99.7M|            ((uint32_t)(data[2]) << 16) |
21210|  99.7M|            ((uint32_t)(data[3]) << 24);
21211|  99.7M|        data += 4;
21212|  99.7M|    }
21213|  3.98M|    return data;
21214|  3.98M|}
janet.c:unmarshal_one_env:
21159|   288k|    int flags) {
21160|   288k|    MARSH_EOS(st, data);
  ------------------
  |  |21045|   288k|#define MARSH_EOS(st, data) do { \
  |  |21046|   288k|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21046:9): [True: 0, False: 288k]
  |  |  ------------------
  |  |21047|   288k|} while (0)
  |  |  ------------------
  |  |  |  Branch (21047:10): [Folded, False: 288k]
  |  |  ------------------
  ------------------
21161|   288k|    if (*data == LB_FUNCENV_REF) {
  ------------------
  |  Branch (21161:9): [True: 235k, False: 53.7k]
  ------------------
21162|   235k|        data++;
21163|   235k|        int32_t index = readint(st, &data);
21164|   235k|        if (index < 0 || index >= janet_v_count(st->lookup_envs))
  ------------------
  |  |  759|   235k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  766|   235k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|   235k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (759:34): [True: 235k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (21164:13): [True: 0, False: 235k]
  |  Branch (21164:26): [True: 0, False: 235k]
  ------------------
21165|      0|            janet_panicf("invalid funcenv reference %d", index);
21166|   235k|        *out = st->lookup_envs[index];
21167|   235k|    } else {
21168|  53.7k|        JanetFuncEnv *env = janet_gcalloc(JANET_MEMORY_FUNCENV, sizeof(JanetFuncEnv));
21169|  53.7k|        env->length = 0;
21170|  53.7k|        env->offset = 0;
21171|  53.7k|        env->as.values = NULL;
21172|  53.7k|        janet_v_push(st->lookup_envs, env);
  ------------------
  |  |  757|  53.7k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|  53.7k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|  53.7k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|  47.0k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  47.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|  47.0k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  47.0k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 6.71k, False: 47.0k]
  |  |  |  |  |  |  |  Branch (768:50): [True: 26.8k, False: 20.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  770|  33.5k|#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.7k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  53.7k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21173|  53.7k|        int32_t offset = readnat(st, &data);
21174|  53.7k|        int32_t length = readnat(st, &data);
21175|  53.7k|        if (offset > 0) {
  ------------------
  |  Branch (21175:13): [True: 0, False: 53.7k]
  ------------------
21176|      0|            Janet fiberv;
21177|       |            /* On stack variant */
21178|      0|            data = unmarshal_one(st, data, &fiberv, flags);
21179|      0|            janet_asserttype(fiberv, JANET_FIBER, st);
21180|      0|            env->as.fiber = janet_unwrap_fiber(fiberv);
  ------------------
  |  |  859|      0|#define janet_unwrap_fiber(x) ((JanetFiber *)janet_nanbox_to_pointer(x))
  ------------------
21181|       |            /* Negative offset indicates untrusted input */
21182|      0|            env->offset = -offset;
21183|  53.7k|        } else {
21184|       |            /* Off stack variant */
21185|  53.7k|            if (length == 0) {
  ------------------
  |  Branch (21185:17): [True: 0, False: 53.7k]
  ------------------
21186|      0|                janet_panic("invalid funcenv length");
21187|      0|            }
21188|  53.7k|            env->as.values = array_allocate(sizeof(Janet), length);
21189|  53.7k|            if (!env->as.values) {
  ------------------
  |  Branch (21189:17): [True: 0, False: 53.7k]
  ------------------
21190|      0|                JANET_OUT_OF_MEMORY;
  ------------------
  |  |  419|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (419:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
21191|      0|            }
21192|  53.7k|            env->offset = 0;
21193|   664k|            for (int32_t i = 0; i < length; i++)
  ------------------
  |  Branch (21193:33): [True: 611k, False: 53.7k]
  ------------------
21194|   611k|                data = unmarshal_one(st, data, env->as.values + i, flags);
21195|  53.7k|        }
21196|  53.7k|        env->length = length;
21197|  53.7k|        *out = env;
21198|  53.7k|    }
21199|   288k|    return data;
21200|   288k|}
janet.c:janet_asserttype:
21121|  6.73M|static void janet_asserttype(Janet x, JanetType t, UnmarshalState *st) {
21122|  6.73M|    if (!janet_checktype(x, t)) {
  ------------------
  |  |  806|  6.73M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [True: 0, False: 6.73M]
  |  |  ------------------
  |  |  807|  6.73M|        ? 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.73M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  6.73M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  6.73M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  6.73M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  6.73M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (21122:9): [True: 0, False: 6.73M]
  ------------------
21123|       |#ifdef JANET_MARSHAL_DEBUG
21124|       |        dump_reference_table(st);
21125|       |#else
21126|      0|        (void) st;
21127|      0|#endif
21128|      0|        janet_panicf("expected type %T, got %v", 1 << t, x);
21129|      0|    }
21130|  6.73M|}
janet.c:janet_parser_checkdead:
27639|   268k|static void janet_parser_checkdead(JanetParser *parser) {
27640|   268k|    if (parser->flag) janet_panic("parser is dead, cannot consume");
  ------------------
  |  Branch (27640:9): [True: 0, False: 268k]
  ------------------
27641|   268k|    if (parser->error) janet_panic("parser has unchecked error, cannot consume");
  ------------------
  |  Branch (27641:9): [True: 0, False: 268k]
  ------------------
27642|   268k|}
janet.c:delim_error:
27149|  1.50k|static void delim_error(JanetParser *parser, size_t stack_index, char c, const char *msg) {
27150|  1.50k|    JanetParseState *s = parser->states + stack_index;
27151|  1.50k|    JanetBuffer *buffer = janet_buffer(40);
27152|  1.50k|    if (msg) {
  ------------------
  |  Branch (27152:9): [True: 1.50k, False: 0]
  ------------------
27153|  1.50k|        janet_buffer_push_cstring(buffer, msg);
27154|  1.50k|    }
27155|  1.50k|    if (c) {
  ------------------
  |  Branch (27155:9): [True: 71, False: 1.43k]
  ------------------
27156|     71|        janet_buffer_push_u8(buffer, c);
27157|     71|    }
27158|  1.50k|    if (stack_index > 0) {
  ------------------
  |  Branch (27158:9): [True: 1.45k, False: 53]
  ------------------
27159|  1.45k|        janet_buffer_push_cstring(buffer, ", ");
27160|  1.45k|        if (s->flags & PFLAG_PARENS) {
  ------------------
  |  |27085|  1.45k|#define PFLAG_PARENS 0x400
  ------------------
  |  Branch (27160:13): [True: 105, False: 1.34k]
  ------------------
27161|    105|            janet_buffer_push_u8(buffer, '(');
27162|  1.34k|        } else if (s->flags & PFLAG_SQRBRACKETS) {
  ------------------
  |  |27086|  1.34k|#define PFLAG_SQRBRACKETS 0x800
  ------------------
  |  Branch (27162:20): [True: 56, False: 1.29k]
  ------------------
27163|     56|            janet_buffer_push_u8(buffer, '[');
27164|  1.29k|        } else if (s->flags & PFLAG_CURLYBRACKETS) {
  ------------------
  |  |27087|  1.29k|#define PFLAG_CURLYBRACKETS 0x1000
  ------------------
  |  Branch (27164:20): [True: 106, False: 1.18k]
  ------------------
27165|    106|            janet_buffer_push_u8(buffer, '{');
27166|  1.18k|        } else if (s->flags & PFLAG_STRING) {
  ------------------
  |  |27088|  1.18k|#define PFLAG_STRING 0x2000
  ------------------
  |  Branch (27166:20): [True: 379, False: 806]
  ------------------
27167|    379|            janet_buffer_push_u8(buffer, '"');
27168|    806|        } else if (s->flags & PFLAG_LONGSTRING) {
  ------------------
  |  |27089|    806|#define PFLAG_LONGSTRING 0x4000
  ------------------
  |  Branch (27168:20): [True: 179, False: 627]
  ------------------
27169|    179|            int32_t i;
27170|  2.59k|            for (i = 0; i < s->argn; i++) {
  ------------------
  |  Branch (27170:25): [True: 2.41k, False: 179]
  ------------------
27171|  2.41k|                janet_buffer_push_u8(buffer, '`');
27172|  2.41k|            }
27173|    179|        }
27174|  1.45k|        janet_formatb(buffer, " opened at line %d, column %d", (int32_t) s->line, (int32_t) s->column);
27175|  1.45k|    }
27176|  1.50k|    parser->error = (const char *) janet_string(buffer->data, buffer->count);
27177|  1.50k|    parser->flag |= JANET_PARSER_GENERATED_ERROR;
  ------------------
  |  |26979|  1.50k|#define JANET_PARSER_GENERATED_ERROR 0x2
  ------------------
27178|  1.50k|}
janet.c:pushstate:
27095|   108k|static void pushstate(JanetParser *p, Consumer consumer, int flags) {
27096|   108k|    JanetParseState s;
27097|   108k|    s.counter = 0;
27098|   108k|    s.argn = 0;
27099|   108k|    s.flags = flags;
27100|   108k|    s.consumer = consumer;
27101|   108k|    s.line = p->line;
27102|   108k|    s.column = p->column;
27103|   108k|    _pushstate(p, s);
27104|   108k|}
janet.c:root:
27566|   139k|static int root(JanetParser *p, JanetParseState *state, uint8_t c) {
27567|   139k|    switch (c) {
27568|  63.9k|        default:
  ------------------
  |  Branch (27568:9): [True: 63.9k, False: 75.7k]
  ------------------
27569|  63.9k|            if (is_whitespace(c)) return 1;
  ------------------
  |  Branch (27569:17): [True: 30.6k, False: 33.3k]
  ------------------
27570|  33.3k|            if (!janet_is_symbol_char(c)) {
  ------------------
  |  Branch (27570:17): [True: 154, False: 33.1k]
  ------------------
27571|    154|                p->error = "unexpected character";
27572|    154|                return 1;
27573|    154|            }
27574|  33.1k|            pushstate(p, tokenchar, PFLAG_TOKEN);
  ------------------
  |  |27093|  33.1k|#define PFLAG_TOKEN 0x40000
  ------------------
27575|  33.1k|            return 0;
27576|  22.9k|        case '\'':
  ------------------
  |  Branch (27576:9): [True: 22.9k, False: 116k]
  ------------------
27577|  27.3k|        case ',':
  ------------------
  |  Branch (27577:9): [True: 4.35k, False: 135k]
  ------------------
27578|  32.6k|        case ';':
  ------------------
  |  Branch (27578:9): [True: 5.31k, False: 134k]
  ------------------
27579|  37.6k|        case '~':
  ------------------
  |  Branch (27579:9): [True: 4.99k, False: 134k]
  ------------------
27580|  43.1k|        case '|':
  ------------------
  |  Branch (27580:9): [True: 5.48k, False: 134k]
  ------------------
27581|  43.1k|            pushstate(p, root, PFLAG_READERMAC | c);
  ------------------
  |  |27090|  43.1k|#define PFLAG_READERMAC 0x8000
  ------------------
27582|  43.1k|            return 1;
27583|  3.94k|        case '"':
  ------------------
  |  Branch (27583:9): [True: 3.94k, False: 135k]
  ------------------
27584|  3.94k|            pushstate(p, stringchar, PFLAG_STRING);
  ------------------
  |  |27088|  3.94k|#define PFLAG_STRING 0x2000
  ------------------
27585|  3.94k|            return 1;
27586|    447|        case '#':
  ------------------
  |  Branch (27586:9): [True: 447, False: 139k]
  ------------------
27587|    447|            pushstate(p, comment, PFLAG_COMMENT);
  ------------------
  |  |27092|    447|#define PFLAG_COMMENT 0x20000
  ------------------
27588|    447|            return 1;
27589|  3.42k|        case '@':
  ------------------
  |  Branch (27589:9): [True: 3.42k, False: 136k]
  ------------------
27590|  3.42k|            pushstate(p, atsign, PFLAG_ATSYM);
  ------------------
  |  |27091|  3.42k|#define PFLAG_ATSYM 0x10000
  ------------------
27591|  3.42k|            return 1;
27592|  1.49k|        case '`':
  ------------------
  |  Branch (27592:9): [True: 1.49k, False: 138k]
  ------------------
27593|  1.49k|            pushstate(p, longstring, PFLAG_LONGSTRING);
  ------------------
  |  |27089|  1.49k|#define PFLAG_LONGSTRING 0x4000
  ------------------
27594|  1.49k|            return 1;
27595|  4.75k|        case ')':
  ------------------
  |  Branch (27595:9): [True: 4.75k, False: 134k]
  ------------------
27596|  5.65k|        case ']':
  ------------------
  |  Branch (27596:9): [True: 897, False: 138k]
  ------------------
27597|  11.0k|        case '}': {
  ------------------
  |  Branch (27597:9): [True: 5.39k, False: 134k]
  ------------------
27598|  11.0k|            Janet ds;
27599|  11.0k|            if (p->statecount == 1) {
  ------------------
  |  Branch (27599:17): [True: 53, False: 10.9k]
  ------------------
27600|     53|                delim_error(p, 0, c, "unexpected closing delimiter ");
27601|     53|                return 1;
27602|     53|            }
27603|  10.9k|            if ((c == ')' && (state->flags & PFLAG_PARENS)) ||
  ------------------
  |  |27085|  4.74k|#define PFLAG_PARENS 0x400
  ------------------
  |  Branch (27603:18): [True: 4.74k, False: 6.25k]
  |  Branch (27603:30): [True: 4.74k, False: 6]
  ------------------
27604|  6.25k|                    (c == ']' && (state->flags & PFLAG_SQRBRACKETS))) {
  ------------------
  |  |27086|    889|#define PFLAG_SQRBRACKETS 0x800
  ------------------
  |  Branch (27604:22): [True: 889, False: 5.37k]
  |  Branch (27604:34): [True: 886, False: 3]
  ------------------
27605|  5.62k|                if (state->flags & PFLAG_ATSYM) {
  ------------------
  |  |27091|  5.62k|#define PFLAG_ATSYM 0x10000
  ------------------
  |  Branch (27605:21): [True: 495, False: 5.13k]
  ------------------
27606|    495|                    ds = close_array(p, state);
27607|  5.13k|                } else {
27608|  5.13k|                    ds = close_tuple(p, state, c == ']' ? JANET_TUPLE_FLAG_BRACKETCTOR : 0);
  ------------------
  |  | 1798|    566|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
  |  Branch (27608:48): [True: 566, False: 4.56k]
  ------------------
27609|  5.13k|                }
27610|  5.62k|            } else if (c == '}' && (state->flags & PFLAG_CURLYBRACKETS)) {
  ------------------
  |  |27087|  5.36k|#define PFLAG_CURLYBRACKETS 0x1000
  ------------------
  |  Branch (27610:24): [True: 5.36k, False: 9]
  |  Branch (27610:36): [True: 5.35k, False: 9]
  ------------------
27611|  5.35k|                if (state->argn & 1) {
  ------------------
  |  Branch (27611:21): [True: 11, False: 5.34k]
  ------------------
27612|     11|                    p->error = "struct and table literals expect even number of arguments";
27613|     11|                    return 1;
27614|     11|                }
27615|  5.34k|                if (state->flags & PFLAG_ATSYM) {
  ------------------
  |  |27091|  5.34k|#define PFLAG_ATSYM 0x10000
  ------------------
  |  Branch (27615:21): [True: 1.27k, False: 4.07k]
  ------------------
27616|  1.27k|                    ds = close_table(p, state);
27617|  4.07k|                } else {
27618|  4.07k|                    ds = close_struct(p, state);
27619|  4.07k|                }
27620|  5.34k|            } else {
27621|     18|                delim_error(p, p->statecount - 1, c, "mismatched delimiter ");
27622|     18|                return 1;
27623|     18|            }
27624|  10.9k|            popstate(p, ds);
27625|  10.9k|        }
27626|      0|        return 1;
27627|  5.76k|        case '(':
  ------------------
  |  Branch (27627:9): [True: 5.76k, False: 133k]
  ------------------
27628|  5.76k|            pushstate(p, root, PFLAG_CONTAINER | PFLAG_PARENS);
  ------------------
  |  |27083|  5.76k|#define PFLAG_CONTAINER 0x100
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_PARENS);
  ------------------
  |  |27085|  5.76k|#define PFLAG_PARENS 0x400
  ------------------
27629|  5.76k|            return 1;
27630|  1.30k|        case '[':
  ------------------
  |  Branch (27630:9): [True: 1.30k, False: 138k]
  ------------------
27631|  1.30k|            pushstate(p, root, PFLAG_CONTAINER | PFLAG_SQRBRACKETS);
  ------------------
  |  |27083|  1.30k|#define PFLAG_CONTAINER 0x100
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_SQRBRACKETS);
  ------------------
  |  |27086|  1.30k|#define PFLAG_SQRBRACKETS 0x800
  ------------------
27632|  1.30k|            return 1;
27633|  5.21k|        case '{':
  ------------------
  |  Branch (27633:9): [True: 5.21k, False: 134k]
  ------------------
27634|  5.21k|            pushstate(p, root, PFLAG_CONTAINER | PFLAG_CURLYBRACKETS);
  ------------------
  |  |27083|  5.21k|#define PFLAG_CONTAINER 0x100
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_CURLYBRACKETS);
  ------------------
  |  |27087|  5.21k|#define PFLAG_CURLYBRACKETS 0x1000
  ------------------
27635|  5.21k|            return 1;
27636|   139k|    }
27637|   139k|}
janet.c:is_whitespace:
26982|  63.9k|static int is_whitespace(uint8_t c) {
26983|  63.9k|    return c == ' '
  ------------------
  |  Branch (26983:12): [True: 1.52k, False: 62.4k]
  ------------------
26984|  62.4k|           || c == '\t'
  ------------------
  |  Branch (26984:15): [True: 2.16k, False: 60.2k]
  ------------------
26985|  60.2k|           || c == '\n'
  ------------------
  |  Branch (26985:15): [True: 7.12k, False: 53.1k]
  ------------------
26986|  53.1k|           || c == '\r'
  ------------------
  |  Branch (26986:15): [True: 2.89k, False: 50.2k]
  ------------------
26987|  50.2k|           || c == '\0'
  ------------------
  |  Branch (26987:15): [True: 13.9k, False: 36.2k]
  ------------------
26988|  36.2k|           || c == '\v'
  ------------------
  |  Branch (26988:15): [True: 1.97k, False: 34.2k]
  ------------------
26989|  34.2k|           || c == '\f';
  ------------------
  |  Branch (26989:15): [True: 971, False: 33.3k]
  ------------------
26990|  63.9k|}
janet.c:stringchar:
27361|  19.0k|static int stringchar(JanetParser *p, JanetParseState *state, uint8_t c) {
27362|       |    /* Enter escape */
27363|  19.0k|    if (c == '\\') {
  ------------------
  |  Branch (27363:9): [True: 2.21k, False: 16.8k]
  ------------------
27364|  2.21k|        state->consumer = escape1;
27365|  2.21k|        return 1;
27366|  2.21k|    }
27367|       |    /* String end */
27368|  16.8k|    if (c == '"') {
  ------------------
  |  Branch (27368:9): [True: 3.73k, False: 13.0k]
  ------------------
27369|  3.73k|        return stringend(p, state);
27370|  3.73k|    }
27371|       |    /* normal char */
27372|  13.0k|    if (c != '\n' && c != '\r')
  ------------------
  |  Branch (27372:9): [True: 12.5k, False: 567]
  |  Branch (27372:22): [True: 12.2k, False: 246]
  ------------------
27373|  12.2k|        push_buf(p, c);
27374|  13.0k|    return 1;
27375|  16.8k|}
janet.c:escape1:
27276|  2.21k|static int escape1(JanetParser *p, JanetParseState *state, uint8_t c) {
27277|  2.21k|    int e = checkescape(c);
27278|  2.21k|    if (e < 0) {
  ------------------
  |  Branch (27278:9): [True: 45, False: 2.17k]
  ------------------
27279|     45|        p->error = "invalid string escape sequence";
27280|     45|        return 1;
27281|     45|    }
27282|  2.17k|    if (c == 'x') {
  ------------------
  |  Branch (27282:9): [True: 271, False: 1.90k]
  ------------------
27283|    271|        state->counter = 2;
27284|    271|        state->argn = 0;
27285|    271|        state->consumer = escapeh;
27286|  1.90k|    } else if (c == 'u' || c == 'U') {
  ------------------
  |  Branch (27286:16): [True: 442, False: 1.45k]
  |  Branch (27286:28): [True: 231, False: 1.22k]
  ------------------
27287|    673|        state->counter = c == 'u' ? 4 : 6;
  ------------------
  |  Branch (27287:26): [True: 442, False: 231]
  ------------------
27288|    673|        state->argn = 0;
27289|    673|        state->consumer = escapeu;
27290|  1.22k|    } else {
27291|  1.22k|        push_buf(p, (uint8_t) e);
27292|  1.22k|        state->consumer = stringchar;
27293|  1.22k|    }
27294|  2.17k|    return 1;
27295|  2.21k|}
janet.c:checkescape:
27180|  2.21k|static int checkescape(uint8_t c) {
27181|  2.21k|    switch (c) {
27182|     45|        default:
  ------------------
  |  Branch (27182:9): [True: 45, False: 2.17k]
  ------------------
27183|     45|            return -1;
27184|    271|        case 'x':
  ------------------
  |  Branch (27184:9): [True: 271, False: 1.94k]
  ------------------
27185|    713|        case 'u':
  ------------------
  |  Branch (27185:9): [True: 442, False: 1.77k]
  ------------------
27186|    944|        case 'U':
  ------------------
  |  Branch (27186:9): [True: 231, False: 1.98k]
  ------------------
27187|    944|            return 1;
27188|     76|        case 'n':
  ------------------
  |  Branch (27188:9): [True: 76, False: 2.14k]
  ------------------
27189|     76|            return '\n';
27190|     91|        case 't':
  ------------------
  |  Branch (27190:9): [True: 91, False: 2.12k]
  ------------------
27191|     91|            return '\t';
27192|     69|        case 'r':
  ------------------
  |  Branch (27192:9): [True: 69, False: 2.14k]
  ------------------
27193|     69|            return '\r';
27194|     83|        case '0':
  ------------------
  |  Branch (27194:9): [True: 83, False: 2.13k]
  ------------------
27195|     83|            return '\0';
27196|     82|        case 'z':
  ------------------
  |  Branch (27196:9): [True: 82, False: 2.13k]
  ------------------
27197|     82|            return '\0';
27198|     76|        case 'f':
  ------------------
  |  Branch (27198:9): [True: 76, False: 2.14k]
  ------------------
27199|     76|            return '\f';
27200|     75|        case 'v':
  ------------------
  |  Branch (27200:9): [True: 75, False: 2.14k]
  ------------------
27201|     75|            return '\v';
27202|     77|        case 'a':
  ------------------
  |  Branch (27202:9): [True: 77, False: 2.13k]
  ------------------
27203|     77|            return '\a';
27204|     72|        case 'b':
  ------------------
  |  Branch (27204:9): [True: 72, False: 2.14k]
  ------------------
27205|     72|            return '\b';
27206|     79|        case '\'':
  ------------------
  |  Branch (27206:9): [True: 79, False: 2.13k]
  ------------------
27207|     79|            return '\'';
27208|     79|        case '?':
  ------------------
  |  Branch (27208:9): [True: 79, False: 2.13k]
  ------------------
27209|     79|            return '?';
27210|     77|        case 'e':
  ------------------
  |  Branch (27210:9): [True: 77, False: 2.13k]
  ------------------
27211|     77|            return 27;
27212|     93|        case '"':
  ------------------
  |  Branch (27212:9): [True: 93, False: 2.12k]
  ------------------
27213|     93|            return '"';
27214|    198|        case '\\':
  ------------------
  |  Branch (27214:9): [True: 198, False: 2.01k]
  ------------------
27215|    198|            return '\\';
27216|  2.21k|    }
27217|  2.21k|}
janet.c:escapeh:
27240|    517|static int escapeh(JanetParser *p, JanetParseState *state, uint8_t c) {
27241|    517|    int digit = to_hex(c);
27242|    517|    if (digit < 0) {
  ------------------
  |  Branch (27242:9): [True: 39, False: 478]
  ------------------
27243|     39|        p->error = "invalid hex digit in hex escape";
27244|     39|        return 1;
27245|     39|    }
27246|    478|    state->argn = (state->argn << 4) + digit;
27247|    478|    state->counter--;
27248|    478|    if (!state->counter) {
  ------------------
  |  Branch (27248:9): [True: 232, False: 246]
  ------------------
27249|    232|        push_buf(p, (uint8_t)(state->argn & 0xFF));
27250|    232|        state->argn = 0;
27251|    232|        state->consumer = stringchar;
27252|    232|    }
27253|    478|    return 1;
27254|    517|}
janet.c:to_hex:
27045|  3.49k|static int to_hex(uint8_t c) {
27046|  3.49k|    if (c >= '0' && c <= '9') {
  ------------------
  |  Branch (27046:9): [True: 3.43k, False: 54]
  |  Branch (27046:21): [True: 1.87k, False: 1.56k]
  ------------------
27047|  1.87k|        return c - '0';
27048|  1.87k|    } else if (c >= 'A' && c <= 'F') {
  ------------------
  |  Branch (27048:16): [True: 1.55k, False: 61]
  |  Branch (27048:28): [True: 556, False: 1.00k]
  ------------------
27049|    556|        return 10 + c - 'A';
27050|  1.06k|    } else if (c >= 'a' && c <= 'f') {
  ------------------
  |  Branch (27050:16): [True: 990, False: 73]
  |  Branch (27050:28): [True: 949, False: 41]
  ------------------
27051|    949|        return 10 + c - 'a';
27052|    949|    } else {
27053|    114|        return -1;
27054|    114|    }
27055|  3.49k|}
janet.c:escapeu:
27256|  2.97k|static int escapeu(JanetParser *p, JanetParseState *state, uint8_t c) {
27257|  2.97k|    int digit = to_hex(c);
27258|  2.97k|    if (digit < 0) {
  ------------------
  |  Branch (27258:9): [True: 75, False: 2.89k]
  ------------------
27259|     75|        p->error = "invalid hex digit in unicode escape";
27260|     75|        return 1;
27261|     75|    }
27262|  2.89k|    state->argn = (state->argn << 4) + digit;
27263|  2.89k|    state->counter--;
27264|  2.89k|    if (!state->counter) {
  ------------------
  |  Branch (27264:9): [True: 598, False: 2.30k]
  ------------------
27265|    598|        if (state->argn > 0x10FFFF) {
  ------------------
  |  Branch (27265:13): [True: 6, False: 592]
  ------------------
27266|      6|            p->error = "invalid unicode codepoint";
27267|      6|            return 1;
27268|      6|        }
27269|    592|        write_codepoint(p, state->argn);
27270|    592|        state->argn = 0;
27271|    592|        state->consumer = stringchar;
27272|    592|    }
27273|  2.89k|    return 1;
27274|  2.89k|}
janet.c:write_codepoint:
27222|    592|static void write_codepoint(JanetParser *p, int32_t codepoint) {
27223|    592|    if (codepoint <= 0x7F) {
  ------------------
  |  Branch (27223:9): [True: 55, False: 537]
  ------------------
27224|     55|        push_buf(p, (uint8_t) codepoint);
27225|    537|    } else if (codepoint <= 0x7FF) {
  ------------------
  |  Branch (27225:16): [True: 138, False: 399]
  ------------------
27226|    138|        push_buf(p, (uint8_t)((codepoint >>  6) & 0x1F) | 0xC0);
27227|    138|        push_buf(p, (uint8_t)((codepoint >>  0) & 0x3F) | 0x80);
27228|    399|    } else if (codepoint <= 0xFFFF) {
  ------------------
  |  Branch (27228:16): [True: 212, False: 187]
  ------------------
27229|    212|        push_buf(p, (uint8_t)((codepoint >> 12) & 0x0F) | 0xE0);
27230|    212|        push_buf(p, (uint8_t)((codepoint >>  6) & 0x3F) | 0x80);
27231|    212|        push_buf(p, (uint8_t)((codepoint >>  0) & 0x3F) | 0x80);
27232|    212|    } else {
27233|    187|        push_buf(p, (uint8_t)((codepoint >> 18) & 0x07) | 0xF0);
27234|    187|        push_buf(p, (uint8_t)((codepoint >> 12) & 0x3F) | 0x80);
27235|    187|        push_buf(p, (uint8_t)((codepoint >>  6) & 0x3F) | 0x80);
27236|    187|        push_buf(p, (uint8_t)((codepoint >>  0) & 0x3F) | 0x80);
27237|    187|    }
27238|    592|}
janet.c:stringend:
27297|  5.29k|static int stringend(JanetParser *p, JanetParseState *state) {
27298|  5.29k|    Janet ret;
27299|  5.29k|    uint8_t *bufstart = p->buf;
27300|  5.29k|    int32_t buflen = (int32_t) p->bufcount;
27301|  5.29k|    if (state->flags & PFLAG_LONGSTRING) {
  ------------------
  |  |27089|  5.29k|#define PFLAG_LONGSTRING 0x4000
  ------------------
  |  Branch (27301:9): [True: 1.56k, False: 3.73k]
  ------------------
27302|       |        /* Post process to remove leading whitespace */
27303|  1.56k|        JanetParseState top = p->states[p->statecount - 1];
27304|  1.56k|        int32_t indent_col = (int32_t) top.column - 1;
27305|  1.56k|        uint8_t *r = bufstart, *end = r + buflen;
27306|       |        /* Unless there are only spaces before EOLs, disable reindenting */
27307|  1.56k|        int reindent = 1;
27308|  8.24k|        while (reindent && (r < end)) {
  ------------------
  |  Branch (27308:16): [True: 8.12k, False: 120]
  |  Branch (27308:28): [True: 6.67k, False: 1.44k]
  ------------------
27309|  6.67k|            if (*r++ == '\n') {
  ------------------
  |  Branch (27309:17): [True: 1.23k, False: 5.44k]
  ------------------
27310|  1.32k|                for (int32_t j = 0; (r < end) && (*r != '\n') && (j < indent_col); j++, r++) {
  ------------------
  |  Branch (27310:37): [True: 919, False: 404]
  |  Branch (27310:50): [True: 582, False: 337]
  |  Branch (27310:66): [True: 280, False: 302]
  ------------------
27311|    280|                    if (*r != ' ') {
  ------------------
  |  Branch (27311:25): [True: 189, False: 91]
  ------------------
27312|    189|                        reindent = 0;
27313|    189|                        break;
27314|    189|                    }
27315|    280|                }
27316|  1.23k|                if ((r + 1) < end && *r == '\r' && *(r + 1) == '\n') reindent = 1;
  ------------------
  |  Branch (27316:21): [True: 680, False: 552]
  |  Branch (27316:38): [True: 289, False: 391]
  |  Branch (27316:52): [True: 199, False: 90]
  ------------------
27317|  1.23k|            }
27318|  6.67k|        }
27319|       |        /* Now reindent if able */
27320|  1.56k|        if (reindent) {
  ------------------
  |  Branch (27320:13): [True: 1.44k, False: 120]
  ------------------
27321|  1.44k|            uint8_t *w = bufstart;
27322|  1.44k|            r = bufstart;
27323|  7.52k|            while (r < end) {
  ------------------
  |  Branch (27323:20): [True: 6.07k, False: 1.44k]
  ------------------
27324|  6.07k|                if (*r == '\n') {
  ------------------
  |  Branch (27324:21): [True: 1.03k, False: 5.04k]
  ------------------
27325|  1.03k|                    *w++ = *r++;
27326|  1.14k|                    for (int32_t j = 0; (r < end) && (*r != '\n') && (j < indent_col); j++, r++);
  ------------------
  |  Branch (27326:41): [True: 739, False: 404]
  |  Branch (27326:54): [True: 412, False: 327]
  |  Branch (27326:70): [True: 110, False: 302]
  ------------------
27327|  1.03k|                    if ((r + 1) < end && *r == '\r' && *(r + 1) == '\n') *w++ = *r++;
  ------------------
  |  Branch (27327:25): [True: 564, False: 469]
  |  Branch (27327:42): [True: 217, False: 347]
  |  Branch (27327:56): [True: 130, False: 87]
  ------------------
27328|  5.04k|                } else {
27329|  5.04k|                    *w++ = *r++;
27330|  5.04k|                }
27331|  6.07k|            }
27332|  1.44k|            buflen = (int32_t)(w - bufstart);
27333|  1.44k|        }
27334|       |        /* Check for leading EOL so we can remove it */
27335|  1.56k|        if (buflen > 1 && bufstart[0] == '\r' && bufstart[1] == '\n') { /* Windows EOL */
  ------------------
  |  Branch (27335:13): [True: 938, False: 624]
  |  Branch (27335:27): [True: 191, False: 747]
  |  Branch (27335:50): [True: 74, False: 117]
  ------------------
27336|     74|            buflen = buflen - 2;
27337|     74|            bufstart = bufstart + 2;
27338|  1.48k|        } else if (buflen > 0 && bufstart[0] == '\n') { /* Unix EOL */
  ------------------
  |  Branch (27338:20): [True: 1.48k, False: 0]
  |  Branch (27338:34): [True: 334, False: 1.15k]
  ------------------
27339|    334|            buflen--;
27340|    334|            bufstart++;
27341|    334|        }
27342|       |        /* Check for trailing EOL so we can remove it */
27343|  1.56k|        if (buflen > 1 && bufstart[buflen - 2] == '\r' && bufstart[buflen - 1] == '\n') { /* Windows EOL */
  ------------------
  |  Branch (27343:13): [True: 771, False: 791]
  |  Branch (27343:27): [True: 173, False: 598]
  |  Branch (27343:59): [True: 49, False: 124]
  ------------------
27344|     49|            buflen = buflen - 2;
27345|  1.51k|        } else if (buflen > 0 && bufstart[buflen - 1] == '\n') { /* Unix EOL */
  ------------------
  |  Branch (27345:20): [True: 1.27k, False: 237]
  |  Branch (27345:34): [True: 126, False: 1.15k]
  ------------------
27346|    126|            buflen--;
27347|    126|        }
27348|  1.56k|    }
27349|  5.29k|    if (state->flags & PFLAG_BUFFER) {
  ------------------
  |  |27084|  5.29k|#define PFLAG_BUFFER 0x200
  ------------------
  |  Branch (27349:9): [True: 494, False: 4.80k]
  ------------------
27350|    494|        JanetBuffer *b = janet_buffer(buflen);
27351|    494|        janet_buffer_push_bytes(b, bufstart, buflen);
27352|    494|        ret = janet_wrap_buffer(b);
  ------------------
  |  |  847|    494|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  825|    494|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    494|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    494|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27353|  4.80k|    } else {
27354|  4.80k|        ret = janet_wrap_string(janet_string(bufstart, buflen));
  ------------------
  |  |  848|  4.80k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|  4.80k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  4.80k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  4.80k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27355|  4.80k|    }
27356|  5.29k|    p->bufcount = 0;
27357|  5.29k|    popstate(p, ret);
27358|  5.29k|    return 1;
27359|  5.29k|}
janet.c:comment:
27443|  5.27k|static int comment(JanetParser *p, JanetParseState *state, uint8_t c) {
27444|  5.27k|    (void) state;
27445|  5.27k|    if (c == '\n') {
  ------------------
  |  Branch (27445:9): [True: 447, False: 4.82k]
  ------------------
27446|    447|        p->statecount--;
27447|    447|        p->bufcount = 0;
27448|  4.82k|    } else {
27449|  4.82k|        push_buf(p, c);
27450|  4.82k|    }
27451|  5.27k|    return 1;
27452|  5.27k|}
janet.c:atsign:
27538|  3.42k|static int atsign(JanetParser *p, JanetParseState *state, uint8_t c) {
27539|  3.42k|    (void) state;
27540|  3.42k|    p->statecount--;
27541|  3.42k|    switch (c) {
27542|  1.37k|        case '{':
  ------------------
  |  Branch (27542:9): [True: 1.37k, False: 2.05k]
  ------------------
27543|  1.37k|            pushstate(p, root, PFLAG_CONTAINER | PFLAG_CURLYBRACKETS | PFLAG_ATSYM);
  ------------------
  |  |27083|  1.37k|#define PFLAG_CONTAINER 0x100
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_CURLYBRACKETS | PFLAG_ATSYM);
  ------------------
  |  |27087|  1.37k|#define PFLAG_CURLYBRACKETS 0x1000
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_CURLYBRACKETS | PFLAG_ATSYM);
  ------------------
  |  |27091|  1.37k|#define PFLAG_ATSYM 0x10000
  ------------------
27544|  1.37k|            return 1;
27545|    268|        case '"':
  ------------------
  |  Branch (27545:9): [True: 268, False: 3.16k]
  ------------------
27546|    268|            pushstate(p, stringchar, PFLAG_BUFFER | PFLAG_STRING);
  ------------------
  |  |27084|    268|#define PFLAG_BUFFER 0x200
  ------------------
                          pushstate(p, stringchar, PFLAG_BUFFER | PFLAG_STRING);
  ------------------
  |  |27088|    268|#define PFLAG_STRING 0x2000
  ------------------
27547|    268|            return 1;
27548|    242|        case '`':
  ------------------
  |  Branch (27548:9): [True: 242, False: 3.18k]
  ------------------
27549|    242|            pushstate(p, longstring, PFLAG_BUFFER | PFLAG_LONGSTRING);
  ------------------
  |  |27084|    242|#define PFLAG_BUFFER 0x200
  ------------------
                          pushstate(p, longstring, PFLAG_BUFFER | PFLAG_LONGSTRING);
  ------------------
  |  |27089|    242|#define PFLAG_LONGSTRING 0x4000
  ------------------
27550|    242|            return 1;
27551|    396|        case '[':
  ------------------
  |  Branch (27551:9): [True: 396, False: 3.03k]
  ------------------
27552|    396|            pushstate(p, root, PFLAG_CONTAINER | PFLAG_SQRBRACKETS | PFLAG_ATSYM);
  ------------------
  |  |27083|    396|#define PFLAG_CONTAINER 0x100
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_SQRBRACKETS | PFLAG_ATSYM);
  ------------------
  |  |27086|    396|#define PFLAG_SQRBRACKETS 0x800
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_SQRBRACKETS | PFLAG_ATSYM);
  ------------------
  |  |27091|    396|#define PFLAG_ATSYM 0x10000
  ------------------
27553|    396|            return 1;
27554|    281|        case '(':
  ------------------
  |  Branch (27554:9): [True: 281, False: 3.14k]
  ------------------
27555|    281|            pushstate(p, root, PFLAG_CONTAINER | PFLAG_PARENS | PFLAG_ATSYM);
  ------------------
  |  |27083|    281|#define PFLAG_CONTAINER 0x100
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_PARENS | PFLAG_ATSYM);
  ------------------
  |  |27085|    281|#define PFLAG_PARENS 0x400
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_PARENS | PFLAG_ATSYM);
  ------------------
  |  |27091|    281|#define PFLAG_ATSYM 0x10000
  ------------------
27556|    281|            return 1;
27557|    869|        default:
  ------------------
  |  Branch (27557:9): [True: 869, False: 2.55k]
  ------------------
27558|    869|            break;
27559|  3.42k|    }
27560|    869|    pushstate(p, tokenchar, PFLAG_TOKEN);
  ------------------
  |  |27093|    869|#define PFLAG_TOKEN 0x40000
  ------------------
27561|    869|    push_buf(p, '@'); /* Push the leading at-sign that was dropped */
27562|    869|    return 0;
27563|  3.42k|}
janet.c:longstring:
27494|  14.4k|static int longstring(JanetParser *p, JanetParseState *state, uint8_t c) {
27495|  14.4k|    if (state->flags & PFLAG_INSTRING) {
  ------------------
  |  |27492|  14.4k|#define PFLAG_INSTRING 0x100000
  ------------------
  |  Branch (27495:9): [True: 8.13k, False: 6.29k]
  ------------------
27496|       |        /* We are inside the long string */
27497|  8.13k|        if (c == '`') {
  ------------------
  |  Branch (27497:13): [True: 1.77k, False: 6.35k]
  ------------------
27498|  1.77k|            state->flags |= PFLAG_END_CANDIDATE;
  ------------------
  |  |27493|  1.77k|#define PFLAG_END_CANDIDATE 0x200000
  ------------------
27499|  1.77k|            state->flags &= ~PFLAG_INSTRING;
  ------------------
  |  |27492|  1.77k|#define PFLAG_INSTRING 0x100000
  ------------------
27500|  1.77k|            state->counter = 1; /* Use counter to keep track of number of '=' seen */
27501|  1.77k|            return 1;
27502|  1.77k|        }
27503|  6.35k|        push_buf(p, c);
27504|  6.35k|        return 1;
27505|  8.13k|    } else if (state->flags & PFLAG_END_CANDIDATE) {
  ------------------
  |  |27493|  6.29k|#define PFLAG_END_CANDIDATE 0x200000
  ------------------
  |  Branch (27505:16): [True: 2.26k, False: 4.03k]
  ------------------
27506|  2.26k|        int i;
27507|       |        /* We are checking a potential end of the string */
27508|  2.26k|        if (state->counter == state->argn) {
  ------------------
  |  Branch (27508:13): [True: 1.56k, False: 703]
  ------------------
27509|  1.56k|            stringend(p, state);
27510|  1.56k|            return 0;
27511|  1.56k|        }
27512|    703|        if (c == '`' && state->counter < state->argn) {
  ------------------
  |  Branch (27512:13): [True: 486, False: 217]
  |  Branch (27512:25): [True: 486, False: 0]
  ------------------
27513|    486|            state->counter++;
27514|    486|            return 1;
27515|    486|        }
27516|       |        /* Failed end candidate */
27517|    870|        for (i = 0; i < state->counter; i++) {
  ------------------
  |  Branch (27517:21): [True: 653, False: 217]
  ------------------
27518|    653|            push_buf(p, '`');
27519|    653|        }
27520|    217|        push_buf(p, c);
27521|    217|        state->counter = 0;
27522|    217|        state->flags &= ~PFLAG_END_CANDIDATE;
  ------------------
  |  |27493|    217|#define PFLAG_END_CANDIDATE 0x200000
  ------------------
27523|    217|        state->flags |= PFLAG_INSTRING;
  ------------------
  |  |27492|    217|#define PFLAG_INSTRING 0x100000
  ------------------
27524|    217|        return 1;
27525|  4.03k|    } else {
27526|       |        /* We are at beginning of string */
27527|  4.03k|        state->argn++;
27528|  4.03k|        if (c != '`') {
  ------------------
  |  Branch (27528:13): [True: 1.74k, False: 2.28k]
  ------------------
27529|  1.74k|            state->flags |= PFLAG_INSTRING;
  ------------------
  |  |27492|  1.74k|#define PFLAG_INSTRING 0x100000
  ------------------
27530|  1.74k|            push_buf(p, c);
27531|  1.74k|        }
27532|  4.03k|        return 1;
27533|  4.03k|    }
27534|  14.4k|}
janet.c:close_array:
27462|    495|static Janet close_array(JanetParser *p, JanetParseState *state) {
27463|    495|    JanetArray *array = janet_array(state->argn);
27464|  1.49k|    for (int32_t i = state->argn - 1; i >= 0; i--)
  ------------------
  |  Branch (27464:39): [True: 995, False: 495]
  ------------------
27465|    995|        array->data[i] = p->args[--p->argcount];
27466|    495|    array->count = state->argn;
27467|    495|    return janet_wrap_array(array);
  ------------------
  |  |  845|    495|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  825|    495|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    495|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    495|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27468|    495|}
janet.c:close_tuple:
27454|  5.13k|static Janet close_tuple(JanetParser *p, JanetParseState *state, int32_t flag) {
27455|  5.13k|    Janet *ret = janet_tuple_begin(state->argn);
27456|  5.13k|    janet_tuple_flag(ret) |= flag;
  ------------------
  |  | 1806|  5.13k|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1800|  5.13k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
27457|  19.9k|    for (int32_t i = state->argn - 1; i >= 0; i--)
  ------------------
  |  Branch (27457:39): [True: 14.7k, False: 5.13k]
  ------------------
27458|  14.7k|        ret[i] = p->args[--p->argcount];
27459|  5.13k|    return janet_wrap_tuple(janet_tuple_end(ret));
  ------------------
  |  |  843|  5.13k|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|  5.13k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  5.13k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  5.13k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27460|  5.13k|}
janet.c:close_table:
27481|  1.27k|static Janet close_table(JanetParser *p, JanetParseState *state) {
27482|  1.27k|    JanetTable *table = janet_table(state->argn >> 1);
27483|  3.01k|    for (size_t i = p->argcount - state->argn; i < p->argcount; i += 2) {
  ------------------
  |  Branch (27483:48): [True: 1.74k, False: 1.27k]
  ------------------
27484|  1.74k|        Janet key = p->args[i];
27485|  1.74k|        Janet value = p->args[i + 1];
27486|  1.74k|        janet_table_put(table, key, value);
27487|  1.74k|    }
27488|  1.27k|    p->argcount -= state->argn;
27489|  1.27k|    return janet_wrap_table(table);
  ------------------
  |  |  846|  1.27k|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  825|  1.27k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.27k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.27k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27490|  1.27k|}
janet.c:close_struct:
27470|  4.07k|static Janet close_struct(JanetParser *p, JanetParseState *state) {
27471|  4.07k|    JanetKV *st = janet_struct_begin(state->argn >> 1);
27472|  9.48k|    for (size_t i = p->argcount - state->argn; i < p->argcount; i += 2) {
  ------------------
  |  Branch (27472:48): [True: 5.41k, False: 4.07k]
  ------------------
27473|  5.41k|        Janet key = p->args[i];
27474|  5.41k|        Janet value = p->args[i + 1];
27475|  5.41k|        janet_struct_put(st, key, value);
27476|  5.41k|    }
27477|  4.07k|    p->argcount -= state->argn;
27478|  4.07k|    return janet_wrap_struct(janet_struct_end(st));
  ------------------
  |  |  842|  4.07k|#define janet_wrap_struct(s) janet_nanbox_wrap_c((s), JANET_STRUCT)
  |  |  ------------------
  |  |  |  |  828|  4.07k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  4.07k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  4.07k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27479|  4.07k|}
janet.c:popstate:
27106|  49.5k|static void popstate(JanetParser *p, Janet val) {
27107|  91.5k|    for (;;) {
27108|  91.5k|        JanetParseState top = p->states[--p->statecount];
27109|  91.5k|        JanetParseState *newtop = p->states + p->statecount - 1;
27110|       |        /* Source mapping info */
27111|  91.5k|        if (janet_checktype(val, JANET_TUPLE)) {
  ------------------
  |  |  806|  91.5k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 47.1k, False: 44.4k]
  |  |  |  Branch (806:6): [Folded, False: 91.5k]
  |  |  ------------------
  |  |  807|  91.5k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  91.5k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  91.5k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  91.5k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  91.5k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  91.5k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27112|  47.1k|            janet_tuple_sm_line(janet_unwrap_tuple(val)) = (int32_t) top.line;
  ------------------
  |  | 1804|  47.1k|#define janet_tuple_sm_line(t) (janet_tuple_head(t)->sm_line)
  |  |  ------------------
  |  |  |  | 1800|  47.1k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
27113|  47.1k|            janet_tuple_sm_column(janet_unwrap_tuple(val)) = (int32_t) top.column;
  ------------------
  |  | 1805|  47.1k|#define janet_tuple_sm_column(t) (janet_tuple_head(t)->sm_column)
  |  |  ------------------
  |  |  |  | 1800|  47.1k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
27114|  47.1k|        }
27115|  91.5k|        if (newtop->flags & PFLAG_CONTAINER) {
  ------------------
  |  |27083|  91.5k|#define PFLAG_CONTAINER 0x100
  ------------------
  |  Branch (27115:13): [True: 49.5k, False: 42.0k]
  ------------------
27116|  49.5k|            newtop->argn++;
27117|       |            /* Keep track of number of values in the root state */
27118|  49.5k|            if (p->statecount == 1) {
  ------------------
  |  Branch (27118:17): [True: 15.2k, False: 34.3k]
  ------------------
27119|  15.2k|                p->pending++;
27120|       |                /* Root items are always wrapped in a tuple for source map info. */
27121|  15.2k|                const Janet *tup = janet_tuple_n(&val, 1);
27122|  15.2k|                janet_tuple_sm_line(tup) = (int32_t) top.line;
  ------------------
  |  | 1804|  15.2k|#define janet_tuple_sm_line(t) (janet_tuple_head(t)->sm_line)
  |  |  ------------------
  |  |  |  | 1800|  15.2k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
27123|  15.2k|                janet_tuple_sm_column(tup) = (int32_t) top.column;
  ------------------
  |  | 1805|  15.2k|#define janet_tuple_sm_column(t) (janet_tuple_head(t)->sm_column)
  |  |  ------------------
  |  |  |  | 1800|  15.2k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
27124|  15.2k|                val = janet_wrap_tuple(tup);
  ------------------
  |  |  843|  15.2k|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|  15.2k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  15.2k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  15.2k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27125|  15.2k|            }
27126|  49.5k|            push_arg(p, val);
27127|  49.5k|            return;
27128|  49.5k|        } else if (newtop->flags & PFLAG_READERMAC) {
  ------------------
  |  |27090|  42.0k|#define PFLAG_READERMAC 0x8000
  ------------------
  |  Branch (27128:20): [True: 42.0k, False: 0]
  ------------------
27129|  42.0k|            Janet *t = janet_tuple_begin(2);
27130|  42.0k|            int c = newtop->flags & 0xFF;
27131|  42.0k|            const char *which =
27132|  42.0k|                (c == '\'') ? "quote" :
  ------------------
  |  Branch (27132:17): [True: 22.5k, False: 19.5k]
  ------------------
27133|  42.0k|                (c == ',') ? "unquote" :
  ------------------
  |  Branch (27133:17): [True: 4.15k, False: 15.3k]
  ------------------
27134|  19.5k|                (c == ';') ? "splice" :
  ------------------
  |  Branch (27134:17): [True: 5.13k, False: 10.2k]
  ------------------
27135|  15.3k|                (c == '|') ? "short-fn" :
  ------------------
  |  Branch (27135:17): [True: 5.37k, False: 4.82k]
  ------------------
27136|  10.2k|                (c == '~') ? "quasiquote" : "<unknown>";
  ------------------
  |  Branch (27136:17): [True: 4.82k, False: 0]
  ------------------
27137|  42.0k|            t[0] = janet_csymbolv(which);
  ------------------
  |  | 1837|  42.0k|#define janet_csymbolv(cstr) janet_wrap_symbol(janet_csymbol(cstr))
  |  |  ------------------
  |  |  |  |  849|  42.0k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  42.0k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  42.0k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  42.0k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27138|  42.0k|            t[1] = val;
27139|       |            /* Quote source mapping info */
27140|  42.0k|            janet_tuple_sm_line(t) = (int32_t) newtop->line;
  ------------------
  |  | 1804|  42.0k|#define janet_tuple_sm_line(t) (janet_tuple_head(t)->sm_line)
  |  |  ------------------
  |  |  |  | 1800|  42.0k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
27141|  42.0k|            janet_tuple_sm_column(t) = (int32_t) newtop->column;
  ------------------
  |  | 1805|  42.0k|#define janet_tuple_sm_column(t) (janet_tuple_head(t)->sm_column)
  |  |  ------------------
  |  |  |  | 1800|  42.0k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
27142|  42.0k|            val = janet_wrap_tuple(janet_tuple_end(t));
  ------------------
  |  |  843|  42.0k|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|  42.0k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  42.0k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  42.0k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27143|  42.0k|        } else {
27144|      0|            return;
27145|      0|        }
27146|  91.5k|    }
27147|  49.5k|}
janet.c:tokenchar:
27390|   143k|static int tokenchar(JanetParser *p, JanetParseState *state, uint8_t c) {
27391|   143k|    Janet ret;
27392|   143k|    double numval;
27393|   143k|    int32_t blen;
27394|   143k|    if (janet_is_symbol_char(c)) {
  ------------------
  |  Branch (27394:9): [True: 109k, False: 34.0k]
  ------------------
27395|   109k|        push_buf(p, (uint8_t) c);
27396|   109k|        if (c > 127) state->argn = 1; /* Use to indicate non ascii */
  ------------------
  |  Branch (27396:13): [True: 4.89k, False: 104k]
  ------------------
27397|   109k|        return 1;
27398|   109k|    }
27399|       |    /* Token finished */
27400|  34.0k|    blen = (int32_t) p->bufcount;
27401|  34.0k|    int start_dig = p->buf[0] >= '0' && p->buf[0] <= '9';
  ------------------
  |  Branch (27401:21): [True: 24.8k, False: 9.13k]
  |  Branch (27401:41): [True: 11.6k, False: 13.2k]
  ------------------
27402|  34.0k|    int start_num = start_dig || p->buf[0] == '-' || p->buf[0] == '+' || p->buf[0] == '.';
  ------------------
  |  Branch (27402:21): [True: 11.6k, False: 22.3k]
  |  Branch (27402:34): [True: 2.88k, False: 19.4k]
  |  Branch (27402:54): [True: 1.37k, False: 18.1k]
  |  Branch (27402:74): [True: 1.88k, False: 16.2k]
  ------------------
27403|  34.0k|    if (p->buf[0] == ':') {
  ------------------
  |  Branch (27403:9): [True: 2.09k, False: 31.9k]
  ------------------
27404|       |        /* Don't do full utf-8 check unless we have seen non ascii characters. */
27405|  2.09k|        int valid = (!state->argn) || janet_valid_utf8(p->buf + 1, blen - 1);
  ------------------
  |  Branch (27405:21): [True: 1.92k, False: 169]
  |  Branch (27405:39): [True: 109, False: 60]
  ------------------
27406|  2.09k|        if (!valid) {
  ------------------
  |  Branch (27406:13): [True: 60, False: 2.03k]
  ------------------
27407|     60|            p->error = "invalid utf-8 in keyword";
27408|     60|            return 0;
27409|     60|        }
27410|  2.03k|        ret = janet_keywordv(p->buf + 1, blen - 1);
  ------------------
  |  | 1842|  2.03k|#define janet_keywordv(str, len) janet_wrap_keyword(janet_keyword((str), (len)))
  |  |  ------------------
  |  |  |  |  850|  2.03k|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  2.03k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  2.03k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  2.03k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27411|  2.03k|#ifdef JANET_INT_TYPES
27412|  31.9k|    } else if (start_num && !janet_scan_numeric(p->buf, blen, &ret)) {
  ------------------
  |  Branch (27412:16): [True: 17.7k, False: 14.1k]
  |  Branch (27412:29): [True: 13.3k, False: 4.43k]
  ------------------
27413|  13.3k|        (void) numval;
27414|       |#else
27415|       |    } else if (start_num && !janet_scan_number(p->buf, blen, &numval)) {
27416|       |        ret = janet_wrap_number(numval);
27417|       |#endif
27418|  18.5k|    } else if (!check_str_const("nil", p->buf, blen)) {
  ------------------
  |  Branch (27418:16): [True: 436, False: 18.1k]
  ------------------
27419|    436|        ret = janet_wrap_nil();
  ------------------
  |  |  831|    436|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|    436|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    436|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    436|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27420|  18.1k|    } else if (!check_str_const("false", p->buf, blen)) {
  ------------------
  |  Branch (27420:16): [True: 33, False: 18.1k]
  ------------------
27421|     33|        ret = janet_wrap_false();
  ------------------
  |  |  833|     33|#define janet_wrap_false() janet_nanbox_from_payload(JANET_BOOLEAN, 0)
  |  |  ------------------
  |  |  |  |  822|     33|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     33|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     33|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27422|  18.1k|    } else if (!check_str_const("true", p->buf, blen)) {
  ------------------
  |  Branch (27422:16): [True: 182, False: 17.9k]
  ------------------
27423|    182|        ret = janet_wrap_true();
  ------------------
  |  |  832|    182|#define janet_wrap_true() janet_nanbox_from_payload(JANET_BOOLEAN, 1)
  |  |  ------------------
  |  |  |  |  822|    182|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    182|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    182|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27424|  17.9k|    } else {
27425|  17.9k|        if (start_dig) {
  ------------------
  |  Branch (27425:13): [True: 360, False: 17.5k]
  ------------------
27426|    360|            p->error = "symbol literal cannot start with a digit";
27427|    360|            return 0;
27428|  17.5k|        } else {
27429|       |            /* Don't do full utf-8 check unless we have seen non ascii characters. */
27430|  17.5k|            int valid = (!state->argn) || janet_valid_utf8(p->buf, blen);
  ------------------
  |  Branch (27430:25): [True: 16.7k, False: 785]
  |  Branch (27430:43): [True: 481, False: 304]
  ------------------
27431|  17.5k|            if (!valid) {
  ------------------
  |  Branch (27431:17): [True: 304, False: 17.2k]
  ------------------
27432|    304|                p->error = "invalid utf-8 in symbol";
27433|    304|                return 0;
27434|    304|            }
27435|  17.2k|            ret = janet_symbolv(p->buf, blen);
  ------------------
  |  | 1836|  17.2k|#define janet_symbolv(str, len) janet_wrap_symbol(janet_symbol((str), (len)))
  |  |  ------------------
  |  |  |  |  849|  17.2k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  17.2k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  17.2k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  17.2k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27436|  17.2k|        }
27437|  17.9k|    }
27438|  33.2k|    p->bufcount = 0;
27439|  33.2k|    popstate(p, ret);
27440|  33.2k|    return 0;
27441|  34.0k|}
janet.c:check_str_const:
27378|  54.8k|static int check_str_const(const char *cstr, const uint8_t *str, int32_t len) {
27379|  54.8k|    int32_t index;
27380|  58.6k|    for (index = 0; index < len; index++) {
  ------------------
  |  Branch (27380:21): [True: 57.2k, False: 1.42k]
  ------------------
27381|  57.2k|        uint8_t c = str[index];
27382|  57.2k|        uint8_t k = ((const uint8_t *)cstr)[index];
27383|  57.2k|        if (c < k) return -1;
  ------------------
  |  Branch (27383:13): [True: 43.3k, False: 13.8k]
  ------------------
27384|  13.8k|        if (c > k) return 1;
  ------------------
  |  Branch (27384:13): [True: 9.99k, False: 3.88k]
  ------------------
27385|  3.88k|        if (k == '\0') break;
  ------------------
  |  Branch (27385:13): [True: 0, False: 3.88k]
  ------------------
27386|  3.88k|    }
27387|  1.42k|    return (cstr[index] == '\0') ? 0 : -1;
  ------------------
  |  Branch (27387:12): [True: 651, False: 769]
  ------------------
27388|  54.8k|}
janet.c:size_padded:
29916|  3.72k|static size_t size_padded(size_t offset, size_t size) {
29917|  3.72k|    size_t x = size + offset - 1;
29918|  3.72k|    return x - (x % size);
29919|  3.72k|}
janet.c:compile_peg:
30182|  4.66k|static JanetPeg *compile_peg(Janet x) {
30183|  4.66k|    Builder builder;
30184|  4.66k|    builder.grammar = janet_table(0);
30185|  4.66k|    builder.default_grammar = NULL;
30186|  4.66k|    {
30187|  4.66k|        Janet default_grammarv = janet_dyn("peg-grammar");
30188|  4.66k|        if (janet_checktype(default_grammarv, JANET_TABLE)) {
  ------------------
  |  |  806|  4.66k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 4.66k]
  |  |  |  Branch (806:6): [Folded, False: 4.66k]
  |  |  ------------------
  |  |  807|  4.66k|        ? 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.66k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  4.66k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  4.66k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  4.66k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  4.66k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30189|      0|            builder.default_grammar = janet_unwrap_table(default_grammarv);
  ------------------
  |  |  861|      0|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
30190|      0|        }
30191|  4.66k|    }
30192|  4.66k|    builder.tags = janet_table(0);
30193|  4.66k|    builder.constants = NULL;
30194|  4.66k|    builder.bytecode = NULL;
30195|  4.66k|    builder.nexttag = 1;
30196|  4.66k|    builder.form = x;
30197|  4.66k|    builder.depth = JANET_RECURSION_GUARD;
  ------------------
  |  |  296|  4.66k|#define JANET_RECURSION_GUARD 1024
  ------------------
30198|  4.66k|    builder.has_backref = 0;
30199|  4.66k|    peg_compile1(&builder, x);
30200|  4.66k|    JanetPeg *peg = make_peg(&builder);
30201|  4.66k|    builder_cleanup(&builder);
30202|  4.66k|    return peg;
30203|  4.66k|}
janet.c:peg_compile1:
29727|  23.5k|static uint32_t peg_compile1(Builder *b, Janet peg) {
29728|       |
29729|       |    /* Keep track of the form being compiled for error purposes */
29730|  23.5k|    Janet old_form = b->form;
29731|  23.5k|    JanetTable *old_grammar = b->grammar;
29732|  23.5k|    b->form = peg;
29733|       |
29734|       |    /* Resolve keyword references */
29735|  23.5k|    int i = JANET_RECURSION_GUARD;
  ------------------
  |  |  296|  23.5k|#define JANET_RECURSION_GUARD 1024
  ------------------
29736|  23.5k|    JanetTable *grammar = old_grammar;
29737|  23.5k|    for (; i > 0 && janet_checktype(peg, JANET_KEYWORD); --i) {
  ------------------
  |  |  806|  23.5k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 34, False: 23.5k]
  |  |  |  Branch (806:6): [Folded, False: 23.5k]
  |  |  ------------------
  |  |  807|  23.5k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  23.5k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  23.5k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  23.5k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  23.5k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  23.5k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (29737:12): [True: 23.5k, False: 0]
  ------------------
29738|     34|        Janet nextPeg = janet_table_get_ex(grammar, peg, &grammar);
29739|     34|        if (!grammar || janet_checktype(nextPeg, JANET_NIL)) {
  ------------------
  |  |  806|     34|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 34, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 34]
  |  |  ------------------
  |  |  807|     34|        ? 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|     34|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|     34|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|     34|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     34|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     34|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (29739:13): [True: 0, False: 34]
  ------------------
29740|     34|            nextPeg = (b->default_grammar == NULL)
  ------------------
  |  Branch (29740:23): [True: 34, False: 0]
  ------------------
29741|     34|                      ? janet_wrap_nil()
  ------------------
  |  |  831|     34|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|     34|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     34|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     34|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29742|     34|                      : janet_table_get(b->default_grammar, peg);
29743|     34|            if (janet_checktype(nextPeg, JANET_NIL)) {
  ------------------
  |  |  806|     34|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 34, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 34]
  |  |  ------------------
  |  |  807|     34|        ? 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|     34|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|     34|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|     34|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     34|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     34|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29744|     34|                peg_panic(b, "unknown rule");
29745|     34|            }
29746|     34|        }
29747|      0|        peg = nextPeg;
29748|      0|        b->form = peg;
29749|      0|        b->grammar = grammar;
29750|      0|    }
29751|  23.5k|    if (i == 0)
  ------------------
  |  Branch (29751:9): [True: 0, False: 23.5k]
  ------------------
29752|      0|        peg_panic(b, "reference chain too deep");
29753|       |
29754|       |    /* Check cache - for tuples we check only the local cache, as
29755|       |     * in a different grammar, the same tuple can compile to a different
29756|       |     * rule - for example, (+ :a :b) depends on whatever :a and :b are bound to. */
29757|  23.5k|    Janet check = janet_checktype(peg, JANET_TUPLE)
  ------------------
  |  |  806|  23.5k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 17.5k, False: 5.99k]
  |  |  |  Branch (806:6): [Folded, False: 23.5k]
  |  |  ------------------
  |  |  807|  23.5k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  23.5k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  23.5k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  23.5k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  23.5k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  23.5k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29758|  23.5k|                  ? janet_table_rawget(grammar, peg)
29759|  23.5k|                  : janet_table_get(grammar, peg);
29760|  23.5k|    if (!janet_checktype(check, JANET_NIL)) {
  ------------------
  |  |  806|  23.5k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 23.5k]
  |  |  ------------------
  |  |  807|  23.5k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  23.5k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  23.5k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  23.5k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  23.5k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  23.5k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (29760:9): [True: 1.42k, False: 22.0k]
  ------------------
29761|  1.42k|        b->form = old_form;
29762|  1.42k|        b->grammar = old_grammar;
29763|  1.42k|        return (uint32_t) janet_unwrap_number(check);
  ------------------
  |  |  839|  1.42k|#define janet_unwrap_number(x) ((x).number)
  ------------------
29764|  1.42k|    }
29765|       |
29766|       |    /* Check depth */
29767|  22.0k|    if (b->depth-- == 0)
  ------------------
  |  Branch (29767:9): [True: 0, False: 22.0k]
  ------------------
29768|      0|        peg_panic(b, "peg grammar recursed too deeply");
29769|       |
29770|       |    /* The final rule to return */
29771|  22.0k|    uint32_t rule = janet_v_count(b->bytecode);
  ------------------
  |  |  759|  22.0k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  766|  17.4k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  17.4k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (759:34): [True: 17.4k, False: 4.63k]
  |  |  ------------------
  ------------------
29772|       |
29773|       |    /* Add to cache. Do not cache structs, as we don't yet know
29774|       |     * what rule they will return! We can just as effectively cache
29775|       |     * the structs main rule. */
29776|  22.0k|    if (!janet_checktype(peg, JANET_STRUCT)) {
  ------------------
  |  |  806|  22.0k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 22.0k]
  |  |  ------------------
  |  |  807|  22.0k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  22.0k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  22.0k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  22.0k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  22.0k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  22.0k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (29776:9): [True: 21.5k, False: 579]
  ------------------
29777|  21.5k|        JanetTable *which_grammar = grammar;
29778|       |        /* If we are a primitive pattern, add to the global cache (root grammar table) */
29779|  21.5k|        if (!janet_checktype(peg, JANET_TUPLE)) {
  ------------------
  |  |  806|  21.5k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 21.5k]
  |  |  ------------------
  |  |  807|  21.5k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  21.5k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  21.5k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  21.5k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  21.5k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  21.5k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (29779:13): [True: 4.13k, False: 17.3k]
  ------------------
29780|  4.13k|            while (which_grammar->proto)
  ------------------
  |  Branch (29780:20): [True: 0, False: 4.13k]
  ------------------
29781|      0|                which_grammar = which_grammar->proto;
29782|  4.13k|        }
29783|  21.5k|        janet_table_put(which_grammar, peg, janet_wrap_number(rule));
  ------------------
  |  |  835|  21.5k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
29784|  21.5k|    }
29785|       |
29786|  22.0k|    switch (janet_type(peg)) {
  ------------------
  |  |  795|  22.0k|    (isnan((x).number) \
  |  |  796|  22.0k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  22.0k|        : JANET_NUMBER)
  ------------------
  |  Branch (29786:13): [True: 19.6k, False: 2.42k]
  ------------------
29787|    667|        default:
  ------------------
  |  Branch (29787:9): [True: 667, False: 21.4k]
  ------------------
29788|    667|            peg_panic(b, "unexpected peg source");
29789|      0|            return 0;
29790|       |
29791|     15|        case JANET_BOOLEAN: {
  ------------------
  |  Branch (29791:9): [True: 15, False: 22.0k]
  ------------------
29792|     15|            int n = janet_unwrap_boolean(peg);
  ------------------
  |  |  838|     15|#define janet_unwrap_boolean(x) ((x).u64 & 0x1)
  ------------------
29793|     15|            Reserve r = reserve(b, 2);
29794|     15|            emit_1(r, n ? RULE_NCHAR : RULE_NOTNCHAR, 0);
  ------------------
  |  Branch (29794:23): [True: 12, False: 3]
  ------------------
29795|     15|            break;
29796|      0|        }
29797|  2.42k|        case JANET_NUMBER: {
  ------------------
  |  Branch (29797:9): [True: 2.42k, False: 19.6k]
  ------------------
29798|  2.42k|            int32_t n = peg_getinteger(b, peg);
29799|  2.42k|            Reserve r = reserve(b, 2);
29800|  2.42k|            if (n < 0) {
  ------------------
  |  Branch (29800:17): [True: 116, False: 2.31k]
  ------------------
29801|    116|                if (n == INT32_MIN) {
  ------------------
  |  Branch (29801:21): [True: 2, False: 114]
  ------------------
29802|       |                    /* Since buffers can't hold this many characters, will
29803|       |                     * always match. Avoid undefined behavior negating INT32_MIN. */
29804|      2|                    emit_1(r, RULE_NCHAR, 0);
29805|    114|                } else {
29806|    114|                    emit_1(r, RULE_NOTNCHAR, -n);
29807|    114|                }
29808|  2.31k|            } else {
29809|  2.31k|                emit_1(r, RULE_NCHAR, n);
29810|  2.31k|            }
29811|  2.42k|            break;
29812|      0|        }
29813|    761|        case JANET_STRING: {
  ------------------
  |  Branch (29813:9): [True: 761, False: 21.3k]
  ------------------
29814|    761|            const uint8_t *str = janet_unwrap_string(peg);
  ------------------
  |  |  863|    761|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
29815|    761|            int32_t len = janet_string_length(str);
  ------------------
  |  | 1813|    761|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|    761|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
29816|    761|            emit_bytes(b, RULE_LITERAL, len, str);
29817|    761|            break;
29818|      0|        }
29819|    135|        case JANET_BUFFER: {
  ------------------
  |  Branch (29819:9): [True: 135, False: 21.9k]
  ------------------
29820|    135|            const JanetBuffer *buf = janet_unwrap_buffer(peg);
  ------------------
  |  |  862|    135|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
29821|    135|            emit_bytes(b, RULE_LITERAL, buf->count, buf->data);
29822|    135|            break;
29823|      0|        }
29824|    127|        case JANET_TABLE: {
  ------------------
  |  Branch (29824:9): [True: 127, False: 21.9k]
  ------------------
29825|       |            /* Build grammar table */
29826|    127|            JanetTable *new_grammar = janet_table_clone(janet_unwrap_table(peg));
  ------------------
  |  |  861|    127|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
29827|    127|            new_grammar->proto = grammar;
29828|    127|            b->grammar = grammar = new_grammar;
29829|       |            /* Run the main rule */
29830|    127|            Janet main_rule = janet_table_rawget(grammar, janet_ckeywordv("main"));
  ------------------
  |  | 1843|    127|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|    127|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|    127|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|    127|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|    127|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29831|    127|            if (janet_checktype(main_rule, JANET_NIL))
  ------------------
  |  |  806|    127|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 127, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 127]
  |  |  ------------------
  |  |  807|    127|        ? 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|    127|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|    127|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|    127|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    127|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    127|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29832|    127|                peg_panic(b, "grammar requires :main rule");
29833|      0|            rule = peg_compile1(b, main_rule);
29834|      0|            break;
29835|    127|        }
29836|    579|        case JANET_STRUCT: {
  ------------------
  |  Branch (29836:9): [True: 579, False: 21.5k]
  ------------------
29837|       |            /* Build grammar table */
29838|    579|            const JanetKV *st = janet_unwrap_struct(peg);
  ------------------
  |  |  857|    579|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
29839|    579|            JanetTable *new_grammar = janet_table(2 * janet_struct_capacity(st));
  ------------------
  |  | 1849|    579|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1846|    579|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
29840|  7.28k|            for (int32_t i = 0; i < janet_struct_capacity(st); i++) {
  ------------------
  |  | 1849|  7.28k|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1846|  7.28k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (29840:33): [True: 6.70k, False: 579]
  ------------------
29841|  6.70k|                if (janet_checktype(st[i].key, JANET_KEYWORD)) {
  ------------------
  |  |  806|  6.70k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 21, False: 6.68k]
  |  |  |  Branch (806:6): [Folded, False: 6.70k]
  |  |  ------------------
  |  |  807|  6.70k|        ? 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.70k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  6.70k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  6.70k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  6.70k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  6.70k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29842|     21|                    janet_table_put(new_grammar, st[i].key, st[i].value);
29843|     21|                }
29844|  6.70k|            }
29845|    579|            new_grammar->proto = grammar;
29846|    579|            b->grammar = grammar = new_grammar;
29847|       |            /* Run the main rule */
29848|    579|            Janet main_rule = janet_table_rawget(grammar, janet_ckeywordv("main"));
  ------------------
  |  | 1843|    579|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|    579|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|    579|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|    579|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|    579|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29849|    579|            if (janet_checktype(main_rule, JANET_NIL))
  ------------------
  |  |  806|    579|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 579, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 579]
  |  |  ------------------
  |  |  807|    579|        ? 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|    579|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|    579|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|    579|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    579|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    579|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29850|    579|                peg_panic(b, "grammar requires :main rule");
29851|      0|            rule = peg_compile1(b, main_rule);
29852|      0|            break;
29853|    579|        }
29854|  17.3k|        case JANET_TUPLE: {
  ------------------
  |  Branch (29854:9): [True: 17.3k, False: 4.71k]
  ------------------
29855|  17.3k|            const Janet *tup = janet_unwrap_tuple(peg);
  ------------------
  |  |  858|  17.3k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
29856|  17.3k|            int32_t len = janet_tuple_length(tup);
  ------------------
  |  | 1802|  17.3k|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1800|  17.3k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
29857|  17.3k|            if (len == 0) peg_panic(b, "tuple in grammar must have non-zero length");
  ------------------
  |  Branch (29857:17): [True: 17, False: 17.3k]
  ------------------
29858|  17.3k|            if (janet_checkint(tup[0])) {
  ------------------
  |  Branch (29858:17): [True: 996, False: 16.3k]
  ------------------
29859|    996|                int32_t n = janet_unwrap_integer(tup[0]);
  ------------------
  |  |  966|    996|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  839|    996|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
29860|    996|                if (n < 0) {
  ------------------
  |  Branch (29860:21): [True: 36, False: 960]
  ------------------
29861|     36|                    peg_panicf(b, "expected non-negative integer, got %d", n);
  ------------------
  |  |29168|     36|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29862|     36|                }
29863|    960|                spec_repeat(b, len, tup);
29864|    960|                break;
29865|    996|            }
29866|  16.3k|            if (!janet_checktype(tup[0], JANET_SYMBOL))
  ------------------
  |  |  806|  16.3k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 16.3k]
  |  |  ------------------
  |  |  807|  16.3k|        ? 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.3k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  16.3k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  16.3k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  16.3k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  16.3k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (29866:17): [True: 170, False: 16.1k]
  ------------------
29867|    170|                peg_panicf(b, "expected grammar command, found %v", tup[0]);
  ------------------
  |  |29168|    170|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29868|  16.1k|            const uint8_t *sym = janet_unwrap_symbol(tup[0]);
  ------------------
  |  |  864|  16.1k|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
29869|  16.1k|            const SpecialPair *sp = janet_strbinsearch(
29870|  16.1k|                                        &peg_specials,
29871|  16.1k|                                        sizeof(peg_specials) / sizeof(SpecialPair),
29872|  16.1k|                                        sizeof(SpecialPair),
29873|  16.1k|                                        sym);
29874|  16.1k|            if (sp) {
  ------------------
  |  Branch (29874:17): [True: 15.7k, False: 397]
  ------------------
29875|  15.7k|                sp->special(b, len - 1, tup + 1);
29876|  15.7k|            } else {
29877|    397|                peg_panicf(b, "unknown special %S", sym);
  ------------------
  |  |29168|    397|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29878|    397|            }
29879|  15.7k|            break;
29880|  16.1k|        }
29881|  22.0k|    }
29882|       |
29883|       |    /* Increase depth again */
29884|  15.6k|    b->depth++;
29885|  15.6k|    b->form = old_form;
29886|  15.6k|    b->grammar = old_grammar;
29887|  15.6k|    return rule;
29888|  22.0k|}
janet.c:peg_panic:
29163|  2.79k|JANET_NO_RETURN static void peg_panic(Builder *b, const char *msg) {
29164|  2.79k|    builder_cleanup(b);
29165|  2.79k|    janet_panicf("grammar error in %p, %s", b->form, msg);
29166|  2.79k|}
janet.c:reserve:
29254|  17.7k|static Reserve reserve(Builder *b, int32_t size) {
29255|  17.7k|    Reserve r;
29256|  17.7k|    r.index = janet_v_count(b->bytecode);
  ------------------
  |  |  759|  17.7k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  766|  15.6k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  15.6k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (759:34): [True: 15.6k, False: 2.05k]
  |  |  ------------------
  ------------------
29257|  17.7k|    r.builder = b;
29258|  17.7k|    r.size = size;
29259|  69.7k|    for (int32_t i = 0; i < size; i++)
  ------------------
  |  Branch (29259:25): [True: 51.9k, False: 17.7k]
  ------------------
29260|       |        janet_v_push(b->bytecode, 0);
  ------------------
  |  |  757|  51.9k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|  51.9k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|  51.9k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|  49.9k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  49.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|  49.9k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  49.9k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 2.05k, False: 49.9k]
  |  |  |  |  |  |  |  Branch (768:50): [True: 7.49k, False: 42.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  770|  9.55k|#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|  51.9k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  51.9k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29261|  17.7k|    return r;
29262|  17.7k|}
janet.c:emit_1:
29283|  2.36k|static void emit_1(Reserve r, uint32_t op, uint32_t arg) {
29284|  2.36k|    emit_rule(r, op, 1, &arg);
29285|  2.36k|}
janet.c:emit_rule:
29265|  13.8k|static void emit_rule(Reserve r, int32_t op, int32_t n, const uint32_t *body) {
29266|  13.8k|    janet_assert(r.size == n + 1, "bad reserve");
  ------------------
  |  |  389|  13.8k|#define janet_assert(c, m) do { \
  |  |  390|  13.8k|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  378|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  379|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  380|      0|        __FILE__,\
  |  |  |  |  381|      0|        __LINE__,\
  |  |  |  |  382|      0|        (m));\
  |  |  |  |  383|      0|    abort();\
  |  |  |  |  384|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (384:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (390:9): [True: 0, False: 13.8k]
  |  |  ------------------
  |  |  391|  13.8k|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 13.8k]
  |  |  ------------------
  ------------------
29267|  13.8k|    r.builder->bytecode[r.index] = op;
29268|  13.8k|    memcpy(r.builder->bytecode + r.index + 1, body, n * sizeof(uint32_t));
29269|  13.8k|}
janet.c:peg_getinteger:
29204|  3.61k|static int32_t peg_getinteger(Builder *b, Janet x) {
29205|  3.61k|    if (!janet_checkint(x))
  ------------------
  |  Branch (29205:9): [True: 457, False: 3.15k]
  ------------------
29206|    457|        peg_panicf(b, "expected integer, got %v", x);
  ------------------
  |  |29168|    457|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29207|  3.15k|    return janet_unwrap_integer(x);
  ------------------
  |  |  966|  3.15k|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  839|  3.15k|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
29208|  3.61k|}
janet.c:emit_bytes:
29272|    896|static void emit_bytes(Builder *b, uint32_t op, int32_t len, const uint8_t *bytes) {
29273|    896|    uint32_t next_rule = janet_v_count(b->bytecode);
  ------------------
  |  |  759|    896|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  766|    706|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|    706|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (759:34): [True: 706, False: 190]
  |  |  ------------------
  ------------------
29274|    896|    janet_v_push(b->bytecode, op);
  ------------------
  |  |  757|    896|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|    896|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|    896|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|    706|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|    706|#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|    706|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|    706|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 190, False: 706]
  |  |  |  |  |  |  |  Branch (768:50): [True: 54, False: 652]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  770|    244|#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|    896|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|    896|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29275|    896|    janet_v_push(b->bytecode, len);
  ------------------
  |  |  757|    896|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|    896|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|    896|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|    896|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|    896|#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|    896|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|    896|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 0, False: 896]
  |  |  |  |  |  |  |  Branch (768:50): [True: 247, False: 649]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  770|    247|#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|    896|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|    896|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29276|    896|    int32_t words = ((len + 3) >> 2);
29277|  2.42k|    for (int32_t i = 0; i < words; i++)
  ------------------
  |  Branch (29277:25): [True: 1.52k, False: 896]
  ------------------
29278|       |        janet_v_push(b->bytecode, 0);
  ------------------
  |  |  757|  1.52k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|  1.52k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|  1.52k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|  1.52k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  1.52k|#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.52k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  1.52k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 0, False: 1.52k]
  |  |  |  |  |  |  |  Branch (768:50): [True: 305, False: 1.22k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  770|    305|#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.52k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  1.52k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29279|    896|    memcpy(b->bytecode + next_rule + 2, bytes, len);
29280|    896|}
janet.c:spec_repeat:
29427|  1.01k|static void spec_repeat(Builder *b, int32_t argc, const Janet *argv) {
29428|  1.01k|    peg_fixarity(b, argc, 2);
29429|  1.01k|    Reserve r = reserve(b, 4);
29430|  1.01k|    int32_t n = peg_getnat(b, argv[0]);
29431|  1.01k|    uint32_t subrule = peg_compile1(b, argv[1]);
29432|  1.01k|    emit_3(r, RULE_BETWEEN, n, n, subrule);
29433|  1.01k|}
janet.c:peg_fixarity:
29170|  1.47k|static void peg_fixarity(Builder *b, int32_t argc, int32_t arity) {
29171|  1.47k|    if (argc != arity) {
  ------------------
  |  Branch (29171:9): [True: 55, False: 1.42k]
  ------------------
29172|     55|        peg_panicf(b, "expected %d argument%s, got %d",
  ------------------
  |  |29168|    110|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  |  |  ------------------
  |  |  |  Branch (29168:71): [True: 25, False: 30]
  |  |  ------------------
  ------------------
29173|     55|                   arity,
29174|     55|                   arity == 1 ? "" : "s",
29175|     55|                   argc);
29176|     55|    }
29177|  1.47k|}
janet.c:peg_getnat:
29210|  1.14k|static int32_t peg_getnat(Builder *b, Janet x) {
29211|  1.14k|    int32_t i = peg_getinteger(b, x);
29212|  1.14k|    if (i < 0)
  ------------------
  |  Branch (29212:9): [True: 76, False: 1.06k]
  ------------------
29213|     76|        peg_panicf(b, "expected non-negative integer, got %v", x);
  ------------------
  |  |29168|     76|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29214|  1.06k|    return i;
29215|  1.14k|}
janet.c:emit_3:
29290|  1.23k|static void emit_3(Reserve r, uint32_t op, uint32_t arg1, uint32_t arg2, uint32_t arg3) {
29291|  1.23k|    uint32_t arr[3] = {arg1, arg2, arg3};
29292|  1.23k|    emit_rule(r, op, 3, arr);
29293|  1.23k|}
janet.c:spec_not:
29443|     83|static void spec_not(Builder *b, int32_t argc, const Janet *argv) {
29444|     83|    spec_onerule(b, argc, argv, RULE_NOT);
29445|     83|}
janet.c:spec_onerule:
29436|    147|static void spec_onerule(Builder *b, int32_t argc, const Janet *argv, uint32_t op) {
29437|    147|    peg_fixarity(b, argc, 1);
29438|    147|    Reserve r = reserve(b, 2);
29439|    147|    uint32_t rule = peg_compile1(b, argv[0]);
29440|    147|    emit_1(r, op, rule);
29441|    147|}
janet.c:spec_position:
29535|     55|static void spec_position(Builder *b, int32_t argc, const Janet *argv) {
29536|     55|    spec_tag1(b, argc, argv, RULE_POSITION);
29537|     55|}
janet.c:spec_tag1:
29527|    236|static void spec_tag1(Builder *b, int32_t argc, const Janet *argv, uint32_t op) {
29528|    236|    peg_arity(b, argc, 0, 1);
29529|    236|    Reserve r = reserve(b, 2);
29530|    236|    uint32_t tag = (argc) ? emit_tag(b, argv[0]) : 0;
  ------------------
  |  Branch (29530:20): [True: 22, False: 214]
  ------------------
29531|    236|    (void) argv;
29532|    236|    emit_1(r, op, tag);
29533|    236|}
janet.c:peg_arity:
29179|  14.3k|static void peg_arity(Builder *b, int32_t arity, int32_t min, int32_t max) {
29180|  14.3k|    if (min >= 0 && arity < min)
  ------------------
  |  Branch (29180:9): [True: 14.3k, False: 0]
  |  Branch (29180:21): [True: 18, False: 14.3k]
  ------------------
29181|     18|        peg_panicf(b, "arity mismatch, expected at least %d, got %d", min, arity);
  ------------------
  |  |29168|     18|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29182|  14.3k|    if (max >= 0 && arity > max)
  ------------------
  |  Branch (29182:9): [True: 14.2k, False: 74]
  |  Branch (29182:21): [True: 28, False: 14.2k]
  ------------------
29183|     28|        peg_panicf(b, "arity mismatch, expected at most %d, got %d", max, arity);
  ------------------
  |  |29168|     28|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29184|  14.3k|}
janet.c:emit_tag:
29227|    134|static uint32_t emit_tag(Builder *b, Janet t) {
29228|    134|    if (!janet_checktype(t, JANET_KEYWORD))
  ------------------
  |  |  806|    134|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 134]
  |  |  ------------------
  |  |  807|    134|        ? 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|    134|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|    134|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|    134|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    134|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    134|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (29228:9): [True: 31, False: 103]
  ------------------
29229|     31|        peg_panicf(b, "expected keyword for capture tag, got %v", t);
  ------------------
  |  |29168|     31|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29230|    103|    Janet check = janet_table_get(b->tags, t);
29231|    103|    if (janet_checktype(check, JANET_NIL)) {
  ------------------
  |  |  806|    103|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 87, False: 16]
  |  |  |  Branch (806:6): [Folded, False: 103]
  |  |  ------------------
  |  |  807|    103|        ? 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|    103|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|    103|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|    103|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    103|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    103|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29232|     87|        uint32_t tag = b->nexttag++;
29233|     87|        if (tag > 255) {
  ------------------
  |  Branch (29233:13): [True: 0, False: 87]
  ------------------
29234|      0|            peg_panic(b, "too many tags - up to 255 tags are supported per peg");
29235|      0|        }
29236|     87|        Janet val = janet_wrap_number(tag);
  ------------------
  |  |  835|     87|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
29237|     87|        janet_table_put(b->tags, t, val);
29238|     87|        return tag;
29239|     87|    } else {
29240|     16|        return (uint32_t) janet_unwrap_number(check);
  ------------------
  |  |  839|     16|#define janet_unwrap_number(x) ((x).number)
  ------------------
29241|     16|    }
29242|    103|}
janet.c:spec_accumulate:
29480|    213|static void spec_accumulate(Builder *b, int32_t argc, const Janet *argv) {
29481|    213|    spec_cap1(b, argc, argv, RULE_ACCUMULATE);
29482|    213|}
janet.c:spec_cap1:
29469|  13.1k|static void spec_cap1(Builder *b, int32_t argc, const Janet *argv, uint32_t op) {
29470|  13.1k|    peg_arity(b, argc, 1, 2);
29471|  13.1k|    Reserve r = reserve(b, 3);
29472|  13.1k|    uint32_t tag = (argc == 2) ? emit_tag(b, argv[1]) : 0;
  ------------------
  |  Branch (29472:20): [True: 22, False: 13.1k]
  ------------------
29473|  13.1k|    uint32_t rule = peg_compile1(b, argv[0]);
29474|  13.1k|    emit_2(r, op, rule, tag);
29475|  13.1k|}
janet.c:emit_2:
29286|  10.0k|static void emit_2(Reserve r, uint32_t op, uint32_t arg1, uint32_t arg2) {
29287|  10.0k|    uint32_t arr[2] = {arg1, arg2};
29288|  10.0k|    emit_rule(r, op, 2, arr);
29289|  10.0k|}
janet.c:spec_sequence:
29358|    338|static void spec_sequence(Builder *b, int32_t argc, const Janet *argv) {
29359|    338|    spec_variadic(b, argc, argv, RULE_SEQUENCE);
29360|    338|}
janet.c:spec_variadic:
29343|    949|static void spec_variadic(Builder *b, int32_t argc, const Janet *argv, uint32_t op) {
29344|    949|    uint32_t rule = janet_v_count(b->bytecode);
  ------------------
  |  |  759|    949|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  766|    755|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|    755|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (759:34): [True: 755, False: 194]
  |  |  ------------------
  ------------------
29345|    949|    janet_v_push(b->bytecode, op);
  ------------------
  |  |  757|    949|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|    949|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|    949|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|    755|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|    755|#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|    755|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|    755|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 194, False: 755]
  |  |  |  |  |  |  |  Branch (768:50): [True: 149, False: 606]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  770|    343|#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|    949|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|    949|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29346|    949|    janet_v_push(b->bytecode, argc);
  ------------------
  |  |  757|    949|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|    949|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|    949|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|    949|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|    949|#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|    949|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|    949|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 0, False: 949]
  |  |  |  |  |  |  |  Branch (768:50): [True: 244, False: 705]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  770|    244|#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|    949|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|    949|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29347|  4.93k|    for (int32_t i = 0; i < argc; i++)
  ------------------
  |  Branch (29347:25): [True: 3.98k, False: 949]
  ------------------
29348|  3.98k|        janet_v_push(b->bytecode, 0);
  ------------------
  |  |  757|  3.98k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|  3.98k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|  3.98k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|  3.98k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  3.98k|#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.98k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|  3.98k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 0, False: 3.98k]
  |  |  |  |  |  |  |  Branch (768:50): [True: 607, False: 3.37k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  770|    607|#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.98k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  3.98k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29349|  4.72k|    for (int32_t i = 0; i < argc; i++) {
  ------------------
  |  Branch (29349:25): [True: 3.77k, False: 949]
  ------------------
29350|  3.77k|        uint32_t rulei = peg_compile1(b, argv[i]);
29351|  3.77k|        b->bytecode[rule + 2 + i] = rulei;
29352|  3.77k|    }
29353|    949|}
janet.c:spec_choice:
29355|    611|static void spec_choice(Builder *b, int32_t argc, const Janet *argv) {
29356|    611|    spec_variadic(b, argc, argv, RULE_CHOICE);
29357|    611|}
janet.c:spec_reference:
29518|     56|static void spec_reference(Builder *b, int32_t argc, const Janet *argv) {
29519|     56|    peg_arity(b, argc, 1, 2);
29520|     56|    Reserve r = reserve(b, 3);
29521|     56|    uint32_t search = emit_tag(b, argv[0]);
29522|     56|    uint32_t tag = (argc == 2) ? emit_tag(b, argv[1]) : 0;
  ------------------
  |  Branch (29522:20): [True: 4, False: 52]
  ------------------
29523|     56|    b->has_backref = 1;
29524|     56|    emit_2(r, RULE_GETTAG, search, tag);
29525|     56|}
janet.c:spec_replace:
29573|    294|static void spec_replace(Builder *b, int32_t argc, const Janet *argv) {
29574|    294|    peg_arity(b, argc, 2, 3);
29575|    294|    Reserve r = reserve(b, 4);
29576|    294|    uint32_t subrule = peg_compile1(b, argv[0]);
29577|    294|    uint32_t constant = emit_constant(b, argv[1]);
29578|    294|    uint32_t tag = (argc == 3) ? emit_tag(b, argv[2]) : 0;
  ------------------
  |  Branch (29578:20): [True: 24, False: 270]
  ------------------
29579|    294|    emit_3(r, RULE_REPLACE, subrule, constant, tag);
29580|    294|}
janet.c:emit_constant:
29221|    258|static uint32_t emit_constant(Builder *b, Janet c) {
29222|    258|    uint32_t cindex = (uint32_t) janet_v_count(b->constants);
  ------------------
  |  |  759|    258|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  766|     37|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|     37|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (759:34): [True: 37, False: 221]
  |  |  ------------------
  ------------------
29223|       |    janet_v_push(b->constants, c);
  ------------------
  |  |  757|    258|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  769|    258|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  768|    258|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  766|     37|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|     37|#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|     37|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  764|     37|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (768:35): [True: 221, False: 37]
  |  |  |  |  |  |  |  Branch (768:50): [True: 25, False: 12]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  770|    246|#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|    258|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|    258|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29224|    258|    return cindex;
29225|    258|}
janet.c:spec_capture:
29477|  12.9k|static void spec_capture(Builder *b, int32_t argc, const Janet *argv) {
29478|  12.9k|    spec_cap1(b, argc, argv, RULE_CAPTURE);
29479|  12.9k|}
janet.c:spec_look:
29333|    106|static void spec_look(Builder *b, int32_t argc, const Janet *argv) {
29334|    106|    peg_arity(b, argc, 1, 2);
29335|    106|    Reserve r = reserve(b, 3);
29336|    106|    int32_t rulearg = argc == 2 ? 1 : 0;
  ------------------
  |  Branch (29336:23): [True: 41, False: 65]
  ------------------
29337|    106|    int32_t offset = argc == 2 ? peg_getinteger(b, argv[0]) : 0;
  ------------------
  |  Branch (29337:22): [True: 41, False: 65]
  ------------------
29338|    106|    uint32_t subrule = peg_compile1(b, argv[rulearg]);
29339|    106|    emit_2(r, RULE_LOOK, (uint32_t) offset, subrule);
29340|    106|}
janet.c:spec_opt:
29420|     54|static void spec_opt(Builder *b, int32_t argc, const Janet *argv) {
29421|     54|    peg_fixarity(b, argc, 1);
29422|     54|    Reserve r = reserve(b, 4);
29423|     54|    uint32_t subrule = peg_compile1(b, argv[0]);
29424|     54|    emit_3(r, RULE_BETWEEN, 0, 1, subrule);
29425|     54|}
janet.c:spec_debug:
29565|    186|static void spec_debug(Builder *b, int32_t argc, const Janet *argv) {
29566|    186|    peg_arity(b, argc, 0, 0);
29567|    186|    Reserve r = reserve(b, 1);
29568|    186|    uint32_t empty = 0;
29569|    186|    (void) argv;
29570|    186|    emit_rule(r, RULE_DEBUG, 0, &empty);
29571|    186|}
janet.c:spec_any:
29400|     47|static void spec_any(Builder *b, int32_t argc, const Janet *argv) {
29401|     47|    spec_repeater(b, argc, argv, 0);
29402|     47|}
janet.c:spec_repeater:
29390|     47|static void spec_repeater(Builder *b, int32_t argc, const Janet *argv, int32_t min) {
29391|     47|    peg_fixarity(b, argc, 1);
29392|     47|    Reserve r = reserve(b, 4);
29393|     47|    uint32_t subrule = peg_compile1(b, argv[0]);
29394|       |    emit_3(r, RULE_BETWEEN, min, UINT32_MAX, subrule);
29395|     47|}
janet.c:spec_matchtime_splice:
29600|     14|static void spec_matchtime_splice(Builder *b, int32_t argc, const Janet *argv) {
29601|     14|    spec_matchtime_impl(b, argc, argv, RULE_MATCHSPLICE);
29602|     14|}
janet.c:spec_matchtime_impl:
29582|     54|static void spec_matchtime_impl(Builder *b, int32_t argc, const Janet *argv, uint32_t op) {
29583|     54|    peg_arity(b, argc, 2, 3);
29584|     54|    Reserve r = reserve(b, 4);
29585|     54|    uint32_t subrule = peg_compile1(b, argv[0]);
29586|     54|    Janet fun = argv[1];
29587|     54|    if (!janet_checktype(fun, JANET_FUNCTION) &&
  ------------------
  |  |  806|    108|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 54]
  |  |  ------------------
  |  |  807|    108|        ? 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|    108|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|     54|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|     54|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     54|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     54|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (29587:9): [True: 25, False: 29]
  ------------------
29588|     25|            !janet_checktype(fun, JANET_CFUNCTION)) {
  ------------------
  |  |  806|     25|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 25]
  |  |  ------------------
  |  |  807|     25|        ? 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|     25|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|     25|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|     25|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     25|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     25|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (29588:13): [True: 25, False: 0]
  ------------------
29589|     25|        peg_panicf(b, "expected function or cfunction, got %v", fun);
  ------------------
  |  |29168|     25|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29590|     25|    }
29591|     29|    uint32_t tag = (argc == 3) ? emit_tag(b, argv[2]) : 0;
  ------------------
  |  Branch (29591:20): [True: 0, False: 29]
  ------------------
29592|     29|    uint32_t cindex = emit_constant(b, fun);
29593|     29|    emit_3(r, op, subrule, cindex, tag);
29594|     29|}
janet.c:spec_matchtime:
29596|     40|static void spec_matchtime(Builder *b, int32_t argc, const Janet *argv) {
29597|     40|    spec_matchtime_impl(b, argc, argv, RULE_MATCHTIME);
29598|     40|}
janet.c:spec_column:
29541|      1|static void spec_column(Builder *b, int32_t argc, const Janet *argv) {
29542|      1|    spec_tag1(b, argc, argv, RULE_COLUMN);
29543|      1|}
janet.c:spec_error:
29446|     30|static void spec_error(Builder *b, int32_t argc, const Janet *argv) {
29447|     30|    if (argc == 0) {
  ------------------
  |  Branch (29447:9): [True: 8, False: 22]
  ------------------
29448|      8|        Reserve r = reserve(b, 2);
29449|      8|        uint32_t rule = peg_compile1(b, janet_wrap_number(0));
  ------------------
  |  |  835|      8|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
29450|      8|        emit_1(r, RULE_ERROR, rule);
29451|     22|    } else {
29452|     22|        spec_onerule(b, argc, argv, RULE_ERROR);
29453|     22|    }
29454|     30|}
janet.c:spec_if:
29371|     94|static void spec_if(Builder *b, int32_t argc, const Janet *argv) {
29372|     94|    spec_branch(b, argc, argv, RULE_IF);
29373|     94|}
janet.c:spec_branch:
29363|     94|static void spec_branch(Builder *b, int32_t argc, const Janet *argv, uint32_t rule) {
29364|     94|    peg_fixarity(b, argc, 2);
29365|     94|    Reserve r = reserve(b, 3);
29366|     94|    uint32_t rule_a = peg_compile1(b, argv[0]);
29367|     94|    uint32_t rule_b = peg_compile1(b, argv[1]);
29368|     94|    emit_2(r, rule, rule_a, rule_b);
29369|     94|}
janet.c:spec_int_le:
29648|    138|static void spec_int_le(Builder *b, int32_t argc, const Janet *argv) {
29649|    138|    spec_readint(b, argc, argv, 0x10u);
29650|    138|}
janet.c:spec_readint:
29634|    157|static void spec_readint(Builder *b, int32_t argc, const Janet *argv, uint32_t mask) {
29635|    157|    peg_arity(b, argc, 1, 2);
29636|    157|    Reserve r = reserve(b, 3);
29637|    157|    uint32_t tag = (argc == 2) ? emit_tag(b, argv[1]) : 0;
  ------------------
  |  Branch (29637:20): [True: 9, False: 148]
  ------------------
29638|    157|    int32_t width = peg_getnat(b, argv[0]);
29639|    157|    if ((width < 0) || (width > JANET_MAX_READINT_WIDTH)) {
  ------------------
  |  |29629|    109|#define JANET_MAX_READINT_WIDTH 8
  ------------------
  |  Branch (29639:9): [True: 48, False: 109]
  |  Branch (29639:24): [True: 30, False: 79]
  ------------------
29640|     30|        peg_panicf(b, "width must be between 0 and %d, got %d", JANET_MAX_READINT_WIDTH, width);
  ------------------
  |  |29168|     30|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29641|     30|    }
29642|    127|    emit_2(r, RULE_READINT, mask | ((uint32_t) width), tag);
29643|    127|}
janet.c:spec_line:
29538|    180|static void spec_line(Builder *b, int32_t argc, const Janet *argv) {
29539|    180|    spec_tag1(b, argc, argv, RULE_LINE);
29540|    180|}
janet.c:spec_range:
29303|     75|static void spec_range(Builder *b, int32_t argc, const Janet *argv) {
29304|     75|    peg_arity(b, argc, 1, -1);
29305|     75|    if (argc == 1) {
  ------------------
  |  Branch (29305:9): [True: 47, False: 28]
  ------------------
29306|     47|        Reserve r = reserve(b, 2);
29307|     47|        const uint8_t *str = peg_getrange(b, argv[0]);
29308|     47|        uint32_t arg = str[0] | (str[1] << 16);
29309|     47|        emit_1(r, RULE_RANGE, arg);
29310|     47|    } else {
29311|       |        /* Compile as a set */
29312|     28|        Reserve r = reserve(b, 9);
29313|     28|        uint32_t bitmap[8] = {0};
29314|     75|        for (int32_t i = 0; i < argc; i++) {
  ------------------
  |  Branch (29314:29): [True: 47, False: 28]
  ------------------
29315|     47|            const uint8_t *str = peg_getrange(b, argv[i]);
29316|  1.31k|            for (uint32_t c = str[0]; c <= str[1]; c++)
  ------------------
  |  Branch (29316:39): [True: 1.27k, False: 47]
  ------------------
29317|  1.27k|                bitmap_set(bitmap, c);
29318|     47|        }
29319|     28|        emit_rule(r, RULE_SET, 8, bitmap);
29320|     28|    }
29321|     75|}
janet.c:peg_getrange:
29193|     94|static const uint8_t *peg_getrange(Builder *b, Janet x) {
29194|     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 (29194:9): [True: 41, False: 53]
  ------------------
29195|     41|        peg_panic(b, "expected string for character range");
29196|     53|    const uint8_t *str = janet_unwrap_string(x);
  ------------------
  |  |  863|     53|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
29197|     53|    if (janet_string_length(str) != 2)
  ------------------
  |  | 1813|     53|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|     53|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (29197:9): [True: 8, False: 45]
  ------------------
29198|      8|        peg_panicf(b, "expected string to have length 2, got %v", x);
  ------------------
  |  |29168|      8|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29199|     45|    if (str[1] < str[0])
  ------------------
  |  Branch (29199:9): [True: 2, False: 43]
  ------------------
29200|      2|        peg_panicf(b, "range %v is empty", x);
  ------------------
  |  |29168|      2|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29201|     43|    return str;
29202|     45|}
janet.c:bitmap_set:
29299|  1.39k|static void bitmap_set(uint32_t *bitmap, uint8_t c) {
29300|  1.39k|    bitmap[c >> 5] |= ((uint32_t)1) << (c & 0x1F);
29301|  1.39k|}
janet.c:spec_set:
29323|     14|static void spec_set(Builder *b, int32_t argc, const Janet *argv) {
29324|     14|    peg_fixarity(b, argc, 1);
29325|     14|    Reserve r = reserve(b, 9);
29326|     14|    const uint8_t *str = peg_getset(b, argv[0]);
29327|     14|    uint32_t bitmap[8] = {0};
29328|    142|    for (int32_t i = 0; i < janet_string_length(str); i++)
  ------------------
  |  | 1813|    142|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|    142|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (29328:25): [True: 128, False: 14]
  ------------------
29329|    128|        bitmap_set(bitmap, str[i]);
29330|     14|    emit_rule(r, RULE_SET, 8, bitmap);
29331|     14|}
janet.c:peg_getset:
29186|     13|static const uint8_t *peg_getset(Builder *b, Janet x) {
29187|     13|    if (!janet_checktype(x, JANET_STRING))
  ------------------
  |  |  806|     13|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 13]
  |  |  ------------------
  |  |  807|     13|        ? 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|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|     13|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|     13|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     13|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     13|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (29187:9): [True: 1, False: 12]
  ------------------
29188|      1|        peg_panic(b, "expected string for character set");
29189|     12|    const uint8_t *str = janet_unwrap_string(x);
  ------------------
  |  |  863|     12|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
29190|     12|    return str;
29191|     13|}
janet.c:spec_sub:
29604|     12|static void spec_sub(Builder *b, int32_t argc, const Janet *argv) {
29605|     12|    peg_fixarity(b, argc, 2);
29606|     12|    Reserve r = reserve(b, 3);
29607|     12|    uint32_t subrule1 = peg_compile1(b, argv[0]);
29608|     12|    uint32_t subrule2 = peg_compile1(b, argv[1]);
29609|     12|    emit_2(r, RULE_SUB, subrule1, subrule2);
29610|     12|}
janet.c:spec_til:
29612|     94|static void spec_til(Builder *b, int32_t argc, const Janet *argv) {
29613|     94|    peg_fixarity(b, argc, 2);
29614|     94|    Reserve r = reserve(b, 3);
29615|     94|    uint32_t subrule1 = peg_compile1(b, argv[0]);
29616|     94|    uint32_t subrule2 = peg_compile1(b, argv[1]);
29617|     94|    emit_2(r, RULE_TIL, subrule1, subrule2);
29618|     94|}
janet.c:spec_to:
29455|     42|static void spec_to(Builder *b, int32_t argc, const Janet *argv) {
29456|     42|    spec_onerule(b, argc, argv, RULE_TO);
29457|     42|}
janet.c:spec_uint_le:
29645|     19|static void spec_uint_le(Builder *b, int32_t argc, const Janet *argv) {
29646|     19|    spec_readint(b, argc, argv, 0x0u);
29647|     19|}
janet.c:make_peg:
30163|  1.86k|static JanetPeg *make_peg(Builder *b) {
30164|  1.86k|    size_t bytecode_start = size_padded(sizeof(JanetPeg), sizeof(uint32_t));
30165|  1.86k|    size_t bytecode_size = janet_v_count(b->bytecode) * sizeof(uint32_t);
  ------------------
  |  |  759|  1.86k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  766|  1.86k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  1.86k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (759:34): [True: 1.86k, False: 0]
  |  |  ------------------
  ------------------
30166|  1.86k|    size_t constants_start = size_padded(bytecode_start + bytecode_size, sizeof(Janet));
30167|  1.86k|    size_t constants_size = janet_v_count(b->constants) * sizeof(Janet);
  ------------------
  |  |  759|  1.86k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  766|    214|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|    214|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (759:34): [True: 214, False: 1.64k]
  |  |  ------------------
  ------------------
30168|  1.86k|    size_t total_size = constants_start + constants_size;
30169|  1.86k|    char *mem = janet_abstract(&janet_peg_type, total_size);
30170|  1.86k|    JanetPeg *peg = (JanetPeg *)mem;
30171|  1.86k|    peg->bytecode = (uint32_t *)(mem + bytecode_start);
30172|  1.86k|    peg->constants = (Janet *)(mem + constants_start);
30173|  1.86k|    peg->num_constants = janet_v_count(b->constants);
  ------------------
  |  |  759|  1.86k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  766|    214|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|    214|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (759:34): [True: 214, False: 1.64k]
  |  |  ------------------
  ------------------
30174|  1.86k|    safe_memcpy(peg->bytecode, b->bytecode, bytecode_size);
30175|  1.86k|    safe_memcpy(peg->constants, b->constants, constants_size);
30176|       |    peg->bytecode_len = janet_v_count(b->bytecode);
  ------------------
  |  |  759|  1.86k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  766|  1.86k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  764|  1.86k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (759:34): [True: 1.86k, False: 0]
  |  |  ------------------
  ------------------
30177|  1.86k|    peg->has_backref = b->has_backref;
30178|  1.86k|    return peg;
30179|  1.86k|}
janet.c:builder_cleanup:
29158|  4.66k|static void builder_cleanup(Builder *b) {
29159|  4.66k|    janet_v_free(b->constants);
  ------------------
  |  |  756|  4.66k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  764|    221|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (756:34): [True: 221, False: 4.43k]
  |  |  ------------------
  ------------------
29160|       |    janet_v_free(b->bytecode);
  ------------------
  |  |  756|  4.66k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  764|  2.44k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (756:34): [True: 2.44k, False: 2.21k]
  |  |  ------------------
  ------------------
29161|  4.66k|}
janet.c:peg_cfun_init:
30229|  4.66k|static PegCall peg_cfun_init(int32_t argc, Janet *argv, int get_replace) {
30230|  4.66k|    PegCall ret;
30231|  4.66k|    int32_t min = get_replace ? 3 : 2;
  ------------------
  |  Branch (30231:19): [True: 0, False: 4.66k]
  ------------------
30232|  4.66k|    janet_arity(argc, min, -1);
30233|  4.66k|    if (janet_checktype(argv[0], JANET_ABSTRACT) &&
  ------------------
  |  |  806|  9.32k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 189, False: 4.47k]
  |  |  |  Branch (806:6): [Folded, False: 4.66k]
  |  |  ------------------
  |  |  807|  9.32k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  9.32k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  4.66k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  4.66k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  4.66k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  4.66k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30234|    189|            janet_abstract_type(janet_unwrap_abstract(argv[0])) == &janet_peg_type) {
  ------------------
  |  | 1899|    189|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|    189|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (30234:13): [True: 0, False: 189]
  ------------------
30235|      0|        ret.peg = janet_unwrap_abstract(argv[0]);
  ------------------
  |  |  866|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
30236|  4.66k|    } else {
30237|  4.66k|        ret.peg = compile_peg(argv[0]);
30238|  4.66k|    }
30239|  4.66k|    if (get_replace) {
  ------------------
  |  Branch (30239:9): [True: 0, False: 4.66k]
  ------------------
30240|      0|        ret.subst = argv[1];
30241|      0|        ret.bytes = janet_getbytes(argv, 2);
30242|  4.66k|    } else {
30243|  4.66k|        ret.bytes = janet_getbytes(argv, 1);
30244|  4.66k|    }
30245|  4.66k|    if (argc > min) {
  ------------------
  |  Branch (30245:9): [True: 0, False: 4.66k]
  ------------------
30246|      0|        ret.start = janet_gethalfrange(argv, min, ret.bytes.len, "offset");
30247|      0|        ret.s.extrac = argc - min - 1;
30248|      0|        ret.s.extrav = janet_tuple_n(argv + min + 1, argc - min - 1);
30249|  4.66k|    } else {
30250|  4.66k|        ret.start = 0;
30251|  4.66k|        ret.s.extrac = 0;
30252|  4.66k|        ret.s.extrav = NULL;
30253|  4.66k|    }
30254|  4.66k|    ret.s.mode = PEG_MODE_NORMAL;
30255|  4.66k|    ret.s.text_start = ret.bytes.bytes;
30256|  4.66k|    ret.s.text_end = ret.bytes.bytes + ret.bytes.len;
30257|  4.66k|    ret.s.outer_text_end = ret.s.text_end;
30258|  4.66k|    ret.s.depth = JANET_RECURSION_GUARD;
  ------------------
  |  |  296|  4.66k|#define JANET_RECURSION_GUARD 1024
  ------------------
30259|  4.66k|    ret.s.captures = janet_array(0);
30260|  4.66k|    ret.s.tagged_captures = janet_array(0);
30261|  4.66k|    ret.s.scratch = janet_buffer(10);
30262|  4.66k|    ret.s.tags = janet_buffer(10);
30263|  4.66k|    ret.s.constants = ret.peg->constants;
30264|  4.66k|    ret.s.bytecode = ret.peg->bytecode;
30265|       |    ret.s.linemap = NULL;
30266|  4.66k|    ret.s.linemaplen = -1;
30267|  4.66k|    ret.s.has_backref = ret.peg->has_backref;
30268|  4.66k|    return ret;
30269|  4.66k|}
janet.c:peg_rule:
28466|   326M|    const uint8_t *text) {
28467|   329M|tail:
28468|   329M|    switch (*rule) {
28469|      0|        default:
  ------------------
  |  Branch (28469:9): [True: 0, False: 329M]
  ------------------
28470|      0|            janet_panic("unexpected opcode");
28471|      0|            return NULL;
28472|       |
28473|  97.2k|        case RULE_LITERAL: {
  ------------------
  |  Branch (28473:9): [True: 97.2k, False: 329M]
  ------------------
28474|  97.2k|            uint32_t len = rule[1];
28475|  97.2k|            if (text + len > s->text_end) return NULL;
  ------------------
  |  Branch (28475:17): [True: 10.9k, False: 86.2k]
  ------------------
28476|  86.2k|            return memcmp(text, rule + 2, len) ? NULL : text + len;
  ------------------
  |  Branch (28476:20): [True: 1.67k, False: 84.5k]
  ------------------
28477|  97.2k|        }
28478|       |
28479|  19.1k|        case RULE_DEBUG: {
  ------------------
  |  Branch (28479:9): [True: 19.1k, False: 329M]
  ------------------
28480|  19.1k|            char buffer[32] = {0};
28481|  19.1k|            size_t len = (size_t)(s->outer_text_end - text);
28482|  19.1k|            memcpy(buffer, text, (len > 31 ? 31 : len));
  ------------------
  |  Branch (28482:35): [True: 381, False: 18.7k]
  ------------------
28483|  19.1k|            janet_eprintf("?? at [%s] (index %d)\n", buffer, (int32_t)(text - s->text_start));
  ------------------
  |  | 2195|  19.1k|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
28484|  19.1k|            int has_color = janet_truthy(janet_dyn("err-color"));
  ------------------
  |  |  818|  19.1k|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  806|  38.2k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 19.1k]
  |  |  |  |  ------------------
  |  |  |  |  807|  38.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|  38.2k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|  19.1k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|  19.1k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  19.1k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  19.1k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (818:6): [True: 0, False: 19.1k]
  |  |  ------------------
  |  |  819|  19.1k|     (!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]
  |  |  ------------------
  ------------------
28485|       |            /* Accumulate buffer */
28486|  19.1k|            if (s->scratch->count) {
  ------------------
  |  Branch (28486:17): [True: 0, False: 19.1k]
  ------------------
28487|      0|                janet_eprintf("accumulate buffer: %v\n", janet_wrap_buffer(s->scratch));
  ------------------
  |  | 2195|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
28488|      0|            }
28489|       |            /* Normal captures */
28490|  19.1k|            if (s->captures->count) {
  ------------------
  |  Branch (28490:17): [True: 16.9k, False: 2.12k]
  ------------------
28491|  16.9k|                janet_eprintf("stack [%d]:\n", s->captures->count);
  ------------------
  |  | 2195|  16.9k|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
28492|  4.21M|                for (int32_t i = 0; i < s->captures->count; i++) {
  ------------------
  |  Branch (28492:37): [True: 4.19M, False: 16.9k]
  ------------------
28493|  4.19M|                    if (has_color) {
  ------------------
  |  Branch (28493:25): [True: 0, False: 4.19M]
  ------------------
28494|      0|                        janet_eprintf("  [%d]: %M\n", i, s->captures->data[i]);
  ------------------
  |  | 2195|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
28495|  4.19M|                    } else {
28496|  4.19M|                        janet_eprintf("  [%d]: %m\n", i, s->captures->data[i]);
  ------------------
  |  | 2195|  4.19M|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
28497|  4.19M|                    }
28498|  4.19M|                }
28499|  16.9k|            }
28500|       |            /* Tagged captures */
28501|  19.1k|            if (s->tagged_captures->count) {
  ------------------
  |  Branch (28501:17): [True: 0, False: 19.1k]
  ------------------
28502|      0|                janet_eprintf("tag stack [%d]:\n", s->tagged_captures->count);
  ------------------
  |  | 2195|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
28503|      0|                for (int32_t i = 0; i < s->tagged_captures->count; i++) {
  ------------------
  |  Branch (28503:37): [True: 0, False: 0]
  ------------------
28504|      0|                    if (has_color) {
  ------------------
  |  Branch (28504:25): [True: 0, False: 0]
  ------------------
28505|      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__)
  ------------------
28506|      0|                    } else {
28507|      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__)
  ------------------
28508|      0|                    }
28509|      0|                }
28510|      0|            }
28511|  19.1k|            return text;
28512|  97.2k|        }
28513|       |
28514|   132M|        case RULE_NCHAR: {
  ------------------
  |  Branch (28514:9): [True: 132M, False: 197M]
  ------------------
28515|   132M|            uint32_t n = rule[1];
28516|   132M|            return (text + n > s->text_end) ? NULL : text + n;
  ------------------
  |  Branch (28516:20): [True: 3.15M, False: 129M]
  ------------------
28517|  97.2k|        }
28518|       |
28519|  2.98k|        case RULE_NOTNCHAR: {
  ------------------
  |  Branch (28519:9): [True: 2.98k, False: 329M]
  ------------------
28520|  2.98k|            uint32_t n = rule[1];
28521|  2.98k|            return (text + n > s->text_end) ? text : NULL;
  ------------------
  |  Branch (28521:20): [True: 2.69k, False: 288]
  ------------------
28522|  97.2k|        }
28523|       |
28524|     22|        case RULE_RANGE: {
  ------------------
  |  Branch (28524:9): [True: 22, False: 329M]
  ------------------
28525|     22|            uint8_t lo = rule[1] & 0xFF;
28526|     22|            uint8_t hi = (rule[1] >> 16) & 0xFF;
28527|     22|            return (text < s->text_end &&
  ------------------
  |  Branch (28527:21): [True: 22, False: 0]
  ------------------
28528|     22|                    text[0] >= lo &&
  ------------------
  |  Branch (28528:21): [True: 14, False: 8]
  ------------------
28529|     14|                    text[0] <= hi)
  ------------------
  |  Branch (28529:21): [True: 9, False: 5]
  ------------------
28530|     22|                   ? text + 1
28531|     22|                   : NULL;
28532|  97.2k|        }
28533|       |
28534|     13|        case RULE_SET: {
  ------------------
  |  Branch (28534:9): [True: 13, False: 329M]
  ------------------
28535|     13|            if (text >= s->text_end) return NULL;
  ------------------
  |  Branch (28535:17): [True: 0, False: 13]
  ------------------
28536|     13|            uint32_t word = rule[1 + (text[0] >> 5)];
28537|     13|            uint32_t mask = (uint32_t)1 << (text[0] & 0x1F);
28538|     13|            return (word & mask)
  ------------------
  |  Branch (28538:20): [True: 2, False: 11]
  ------------------
28539|     13|                   ? text + 1
28540|     13|                   : NULL;
28541|     13|        }
28542|       |
28543|  29.1k|        case RULE_LOOK: {
  ------------------
  |  Branch (28543:9): [True: 29.1k, False: 329M]
  ------------------
28544|  29.1k|            text += ((int32_t *)rule)[1];
28545|  29.1k|            if (text < s->text_start || text > s->text_end) return NULL;
  ------------------
  |  Branch (28545:17): [True: 2.39k, False: 26.7k]
  |  Branch (28545:41): [True: 220, False: 26.5k]
  ------------------
28546|  26.5k|            down1(s);
  ------------------
  |  |28451|  26.5k|#define down1(s) do { \
  |  |28452|  26.5k|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28452:9): [True: 0, False: 26.5k]
  |  |  ------------------
  |  |28453|  26.5k|} while (0)
  |  |  ------------------
  |  |  |  Branch (28453:10): [Folded, False: 26.5k]
  |  |  ------------------
  ------------------
28547|  26.5k|            const uint8_t *result = peg_rule(s, s->bytecode + rule[2], text);
28548|  26.5k|            up1(s);
  ------------------
  |  |28454|  26.5k|#define up1(s) ((s)->depth++)
  ------------------
28549|  26.5k|            text -= ((int32_t *)rule)[1];
28550|  26.5k|            return result ? text : NULL;
  ------------------
  |  Branch (28550:20): [True: 4.02k, False: 22.5k]
  ------------------
28551|  26.5k|        }
28552|       |
28553|  3.20M|        case RULE_CHOICE: {
  ------------------
  |  Branch (28553:9): [True: 3.20M, False: 326M]
  ------------------
28554|  3.20M|            uint32_t len = rule[1];
28555|  3.20M|            const uint32_t *args = rule + 2;
28556|  3.20M|            if (len == 0) return NULL;
  ------------------
  |  Branch (28556:17): [True: 3.31k, False: 3.20M]
  ------------------
28557|  3.20M|            down1(s);
  ------------------
  |  |28451|  3.20M|#define down1(s) do { \
  |  |28452|  3.20M|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28452:9): [True: 0, False: 3.20M]
  |  |  ------------------
  |  |28453|  3.20M|} while (0)
  |  |  ------------------
  |  |  |  Branch (28453:10): [Folded, False: 3.20M]
  |  |  ------------------
  ------------------
28558|  3.20M|            CapState cs = cap_save(s);
28559|  6.37M|            for (uint32_t i = 0; i < len - 1; i++) {
  ------------------
  |  Branch (28559:34): [True: 3.37M, False: 3.00M]
  ------------------
28560|  3.37M|                const uint8_t *result = peg_rule(s, s->bytecode + args[i], text);
28561|  3.37M|                if (result) {
  ------------------
  |  Branch (28561:21): [True: 198k, False: 3.17M]
  ------------------
28562|   198k|                    up1(s);
  ------------------
  |  |28454|   198k|#define up1(s) ((s)->depth++)
  ------------------
28563|   198k|                    return result;
28564|   198k|                }
28565|  3.17M|                cap_load(s, cs);
28566|  3.17M|            }
28567|  3.00M|            up1(s);
  ------------------
  |  |28454|  3.00M|#define up1(s) ((s)->depth++)
  ------------------
28568|  3.00M|            rule = s->bytecode + args[len - 1];
28569|  3.00M|            goto tail;
28570|  3.20M|        }
28571|       |
28572|   319k|        case RULE_SEQUENCE: {
  ------------------
  |  Branch (28572:9): [True: 319k, False: 329M]
  ------------------
28573|   319k|            uint32_t len = rule[1];
28574|   319k|            const uint32_t *args = rule + 2;
28575|   319k|            if (len == 0) return text;
  ------------------
  |  Branch (28575:17): [True: 401, False: 319k]
  ------------------
28576|   319k|            down1(s);
  ------------------
  |  |28451|   319k|#define down1(s) do { \
  |  |28452|   319k|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28452:9): [True: 0, False: 319k]
  |  |  ------------------
  |  |28453|   319k|} while (0)
  |  |  ------------------
  |  |  |  Branch (28453:10): [Folded, False: 319k]
  |  |  ------------------
  ------------------
28577|   645k|            for (uint32_t i = 0; text && i < len - 1; i++)
  ------------------
  |  Branch (28577:34): [True: 635k, False: 9.88k]
  |  Branch (28577:42): [True: 326k, False: 309k]
  ------------------
28578|   326k|                text = peg_rule(s, s->bytecode + args[i], text);
28579|   319k|            up1(s);
  ------------------
  |  |28454|   319k|#define up1(s) ((s)->depth++)
  ------------------
28580|   319k|            if (!text) return NULL;
  ------------------
  |  Branch (28580:17): [True: 9.88k, False: 309k]
  ------------------
28581|   309k|            rule = s->bytecode + args[len - 1];
28582|   309k|            goto tail;
28583|   319k|        }
28584|       |
28585|  17.1k|        case RULE_IF: {
  ------------------
  |  Branch (28585:9): [True: 17.1k, False: 329M]
  ------------------
28586|  17.1k|            const uint32_t *rule_a = s->bytecode + rule[1];
28587|  17.1k|            const uint32_t *rule_b = s->bytecode + rule[2];
28588|  17.1k|            down1(s);
  ------------------
  |  |28451|  17.1k|#define down1(s) do { \
  |  |28452|  17.1k|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28452:9): [True: 0, False: 17.1k]
  |  |  ------------------
  |  |28453|  17.1k|} while (0)
  |  |  ------------------
  |  |  |  Branch (28453:10): [Folded, False: 17.1k]
  |  |  ------------------
  ------------------
28589|  17.1k|            const uint8_t *result = peg_rule(s, rule_a, text);
28590|  17.1k|            up1(s);
  ------------------
  |  |28454|  17.1k|#define up1(s) ((s)->depth++)
  ------------------
28591|  17.1k|            if (!result) return NULL;
  ------------------
  |  Branch (28591:17): [True: 2.91k, False: 14.2k]
  ------------------
28592|  14.2k|            rule = rule_b;
28593|  14.2k|            goto tail;
28594|  17.1k|        }
28595|      0|        case RULE_IFNOT: {
  ------------------
  |  Branch (28595:9): [True: 0, False: 329M]
  ------------------
28596|      0|            const uint32_t *rule_a = s->bytecode + rule[1];
28597|      0|            const uint32_t *rule_b = s->bytecode + rule[2];
28598|      0|            down1(s);
  ------------------
  |  |28451|      0|#define down1(s) do { \
  |  |28452|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28452:9): [True: 0, False: 0]
  |  |  ------------------
  |  |28453|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (28453:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
28599|      0|            CapState cs = cap_save(s);
28600|      0|            const uint8_t *result = peg_rule(s, rule_a, text);
28601|      0|            if (!!result) {
  ------------------
  |  Branch (28601:17): [True: 0, False: 0]
  ------------------
28602|      0|                up1(s);
  ------------------
  |  |28454|      0|#define up1(s) ((s)->depth++)
  ------------------
28603|      0|                return NULL;
28604|      0|            } else {
28605|      0|                cap_load(s, cs);
28606|      0|                up1(s);
  ------------------
  |  |28454|      0|#define up1(s) ((s)->depth++)
  ------------------
28607|      0|                rule = rule_b;
28608|      0|                goto tail;
28609|      0|            }
28610|      0|        }
28611|       |
28612|  18.4k|        case RULE_NOT: {
  ------------------
  |  Branch (28612:9): [True: 18.4k, False: 329M]
  ------------------
28613|  18.4k|            const uint32_t *rule_a = s->bytecode + rule[1];
28614|  18.4k|            down1(s);
  ------------------
  |  |28451|  18.4k|#define down1(s) do { \
  |  |28452|  18.4k|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28452:9): [True: 0, False: 18.4k]
  |  |  ------------------
  |  |28453|  18.4k|} while (0)
  |  |  ------------------
  |  |  |  Branch (28453:10): [Folded, False: 18.4k]
  |  |  ------------------
  ------------------
28615|  18.4k|            CapState cs = cap_save(s);
28616|  18.4k|            const uint8_t *result = peg_rule(s, rule_a, text);
28617|  18.4k|            if (result) {
  ------------------
  |  Branch (28617:17): [True: 7.88k, False: 10.5k]
  ------------------
28618|  7.88k|                up1(s);
  ------------------
  |  |28454|  7.88k|#define up1(s) ((s)->depth++)
  ------------------
28619|  7.88k|                return NULL;
28620|  10.5k|            } else {
28621|  10.5k|                cap_load(s, cs);
28622|  10.5k|                up1(s);
  ------------------
  |  |28454|  10.5k|#define up1(s) ((s)->depth++)
  ------------------
28623|  10.5k|                return text;
28624|  10.5k|            }
28625|  18.4k|        }
28626|       |
28627|      0|        case RULE_THRU:
  ------------------
  |  Branch (28627:9): [True: 0, False: 329M]
  ------------------
28628|    739|        case RULE_TO: {
  ------------------
  |  Branch (28628:9): [True: 739, False: 329M]
  ------------------
28629|    739|            const uint32_t *rule_a = s->bytecode + rule[1];
28630|    739|            const uint8_t *next_text = NULL;
28631|    739|            CapState cs = cap_save(s);
28632|    739|            down1(s);
  ------------------
  |  |28451|    739|#define down1(s) do { \
  |  |28452|    739|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28452:9): [True: 0, False: 739]
  |  |  ------------------
  |  |28453|    739|} while (0)
  |  |  ------------------
  |  |  |  Branch (28453:10): [Folded, False: 739]
  |  |  ------------------
  ------------------
28633|  9.95k|            while (text <= s->text_end) {
  ------------------
  |  Branch (28633:20): [True: 9.75k, False: 206]
  ------------------
28634|  9.75k|                CapState cs2 = cap_save(s);
28635|  9.75k|                next_text = peg_rule(s, rule_a, text);
28636|  9.75k|                if (next_text) {
  ------------------
  |  Branch (28636:21): [True: 533, False: 9.21k]
  ------------------
28637|    533|                    if (rule[0] == RULE_TO) cap_load(s, cs2);
  ------------------
  |  Branch (28637:25): [True: 533, False: 0]
  ------------------
28638|    533|                    break;
28639|    533|                }
28640|  9.21k|                cap_load(s, cs2);
28641|  9.21k|                text++;
28642|  9.21k|            }
28643|    739|            up1(s);
  ------------------
  |  |28454|    739|#define up1(s) ((s)->depth++)
  ------------------
28644|    739|            if (text > s->text_end) {
  ------------------
  |  Branch (28644:17): [True: 206, False: 533]
  ------------------
28645|    206|                cap_load(s, cs);
28646|    206|                return NULL;
28647|    206|            }
28648|    533|            return rule[0] == RULE_TO ? text : next_text;
  ------------------
  |  Branch (28648:20): [True: 533, False: 0]
  ------------------
28649|    739|        }
28650|       |
28651|  29.7k|        case RULE_BETWEEN: {
  ------------------
  |  Branch (28651:9): [True: 29.7k, False: 329M]
  ------------------
28652|  29.7k|            uint32_t lo = rule[1];
28653|  29.7k|            uint32_t hi = rule[2];
28654|  29.7k|            const uint32_t *rule_a = s->bytecode + rule[3];
28655|  29.7k|            uint32_t captured = 0;
28656|  29.7k|            const uint8_t *next_text;
28657|  29.7k|            CapState cs = cap_save(s);
28658|  29.7k|            down1(s);
  ------------------
  |  |28451|  29.7k|#define down1(s) do { \
  |  |28452|  29.7k|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28452:9): [True: 0, False: 29.7k]
  |  |  ------------------
  |  |28453|  29.7k|} while (0)
  |  |  ------------------
  |  |  |  Branch (28453:10): [Folded, False: 29.7k]
  |  |  ------------------
  ------------------
28659|   199M|            while (captured < hi) {
  ------------------
  |  Branch (28659:20): [True: 199M, False: 3.43k]
  ------------------
28660|   199M|                CapState cs2 = cap_save(s);
28661|   199M|                next_text = peg_rule(s, rule_a, text);
28662|   199M|                if (!next_text || ((next_text == text) && (hi == UINT32_MAX))) {
  ------------------
  |  Branch (28662:21): [True: 10.3k, False: 199M]
  |  Branch (28662:36): [True: 197M, False: 1.62M]
  |  Branch (28662:59): [True: 15.9k, False: 197M]
  ------------------
28663|  26.2k|                    cap_load(s, cs2);
28664|  26.2k|                    break;
28665|  26.2k|                }
28666|   199M|                captured++;
28667|   199M|                text = next_text;
28668|   199M|            }
28669|  29.7k|            up1(s);
  ------------------
  |  |28454|  29.7k|#define up1(s) ((s)->depth++)
  ------------------
28670|  29.7k|            if (captured < lo) {
  ------------------
  |  Branch (28670:17): [True: 9.54k, False: 20.1k]
  ------------------
28671|  9.54k|                cap_load(s, cs);
28672|  9.54k|                return NULL;
28673|  9.54k|            }
28674|  20.1k|            return text;
28675|  29.7k|        }
28676|       |
28677|       |        /* Capturing rules */
28678|       |
28679|   134k|        case RULE_GETTAG: {
  ------------------
  |  Branch (28679:9): [True: 134k, False: 329M]
  ------------------
28680|   134k|            uint32_t search = rule[1];
28681|   134k|            uint32_t tag = rule[2];
28682|  15.3M|            for (int32_t i = s->tags->count - 1; i >= 0; i--) {
  ------------------
  |  Branch (28682:50): [True: 15.2M, False: 22.4k]
  ------------------
28683|  15.2M|                if (s->tags->data[i] == search) {
  ------------------
  |  Branch (28683:21): [True: 112k, False: 15.1M]
  ------------------
28684|   112k|                    pushcap(s, s->tagged_captures->data[i], tag);
28685|   112k|                    return text;
28686|   112k|                }
28687|  15.2M|            }
28688|  22.4k|            return NULL;
28689|   134k|        }
28690|       |
28691|  67.0M|        case RULE_POSITION: {
  ------------------
  |  Branch (28691:9): [True: 67.0M, False: 262M]
  ------------------
28692|  67.0M|            pushcap(s, janet_wrap_number((double)(text - s->text_start)), rule[1]);
  ------------------
  |  |  835|  67.0M|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
28693|  67.0M|            return text;
28694|   134k|        }
28695|       |
28696|  3.36M|        case RULE_LINE: {
  ------------------
  |  Branch (28696:9): [True: 3.36M, False: 326M]
  ------------------
28697|  3.36M|            LineCol lc = get_linecol_from_position(s, (int32_t)(text - s->text_start));
28698|  3.36M|            pushcap(s, janet_wrap_number((double)(lc.line)), rule[1]);
  ------------------
  |  |  835|  3.36M|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
28699|  3.36M|            return text;
28700|   134k|        }
28701|       |
28702|      1|        case RULE_COLUMN: {
  ------------------
  |  Branch (28702:9): [True: 1, False: 329M]
  ------------------
28703|      1|            LineCol lc = get_linecol_from_position(s, (int32_t)(text - s->text_start));
28704|      1|            pushcap(s, janet_wrap_number((double)(lc.col)), rule[1]);
  ------------------
  |  |  835|      1|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
28705|      1|            return text;
28706|   134k|        }
28707|       |
28708|      0|        case RULE_ARGUMENT: {
  ------------------
  |  Branch (28708:9): [True: 0, False: 329M]
  ------------------
28709|      0|            int32_t index = ((int32_t *)rule)[1];
28710|      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 (28710:29): [True: 0, False: 0]
  ------------------
28711|      0|            pushcap(s, capture, rule[2]);
28712|      0|            return text;
28713|   134k|        }
28714|       |
28715|      0|        case RULE_CONSTANT: {
  ------------------
  |  Branch (28715:9): [True: 0, False: 329M]
  ------------------
28716|      0|            pushcap(s, s->constants[rule[1]], rule[2]);
28717|      0|            return text;
28718|   134k|        }
28719|       |
28720|  78.8M|        case RULE_CAPTURE: {
  ------------------
  |  Branch (28720:9): [True: 78.8M, False: 251M]
  ------------------
28721|  78.8M|            down1(s);
  ------------------
  |  |28451|  78.8M|#define down1(s) do { \
  |  |28452|  78.8M|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28452:9): [True: 0, False: 78.8M]
  |  |  ------------------
  |  |28453|  78.8M|} while (0)
  |  |  ------------------
  |  |  |  Branch (28453:10): [Folded, False: 78.8M]
  |  |  ------------------
  ------------------
28722|  78.8M|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
28723|  78.8M|            up1(s);
  ------------------
  |  |28454|  78.8M|#define up1(s) ((s)->depth++)
  ------------------
28724|  78.8M|            if (!result) return NULL;
  ------------------
  |  Branch (28724:17): [True: 3.08M, False: 75.7M]
  ------------------
28725|       |            /* Specialized pushcap - avoid intermediate string creation */
28726|  75.7M|            if (!s->has_backref && s->mode == PEG_MODE_ACCUMULATE) {
  ------------------
  |  Branch (28726:17): [True: 75.4M, False: 236k]
  |  Branch (28726:36): [True: 73.7M, False: 1.76M]
  ------------------
28727|  73.7M|                janet_buffer_push_bytes(s->scratch, text, (int32_t)(result - text));
28728|  73.7M|            } else {
28729|  2.00M|                uint32_t tag = rule[2];
28730|  2.00M|                pushcap(s, janet_stringv(text, (int32_t)(result - text)), tag);
  ------------------
  |  | 1827|  2.00M|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  848|  2.00M|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  2.00M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  2.00M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  2.00M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28731|  2.00M|            }
28732|  75.7M|            return result;
28733|  78.8M|        }
28734|       |
28735|      0|        case RULE_CAPTURE_NUM: {
  ------------------
  |  Branch (28735:9): [True: 0, False: 329M]
  ------------------
28736|      0|            down1(s);
  ------------------
  |  |28451|      0|#define down1(s) do { \
  |  |28452|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28452:9): [True: 0, False: 0]
  |  |  ------------------
  |  |28453|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (28453:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
28737|      0|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
28738|      0|            up1(s);
  ------------------
  |  |28454|      0|#define up1(s) ((s)->depth++)
  ------------------
28739|      0|            if (!result) return NULL;
  ------------------
  |  Branch (28739:17): [True: 0, False: 0]
  ------------------
28740|       |            /* check number parsing */
28741|      0|            double x = 0.0;
28742|      0|            int32_t base = (int32_t) rule[2];
28743|      0|            if (janet_scan_number_base(text, (int32_t)(result - text), base, &x)) return NULL;
  ------------------
  |  Branch (28743:17): [True: 0, False: 0]
  ------------------
28744|       |            /* Specialized pushcap - avoid intermediate string creation */
28745|      0|            if (!s->has_backref && s->mode == PEG_MODE_ACCUMULATE) {
  ------------------
  |  Branch (28745:17): [True: 0, False: 0]
  |  Branch (28745:36): [True: 0, False: 0]
  ------------------
28746|      0|                janet_buffer_push_bytes(s->scratch, text, (int32_t)(result - text));
28747|      0|            } else {
28748|      0|                uint32_t tag = rule[3];
28749|      0|                pushcap(s, janet_wrap_number(x), tag);
  ------------------
  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
28750|      0|            }
28751|      0|            return result;
28752|      0|        }
28753|       |
28754|  60.9k|        case RULE_ACCUMULATE: {
  ------------------
  |  Branch (28754:9): [True: 60.9k, False: 329M]
  ------------------
28755|  60.9k|            uint32_t tag = rule[2];
28756|  60.9k|            int oldmode = s->mode;
28757|  60.9k|            if (!tag && oldmode == PEG_MODE_ACCUMULATE) {
  ------------------
  |  Branch (28757:17): [True: 3.63k, False: 57.2k]
  |  Branch (28757:25): [True: 555, False: 3.07k]
  ------------------
28758|    555|                rule = s->bytecode + rule[1];
28759|    555|                goto tail;
28760|    555|            }
28761|  60.3k|            CapState cs = cap_save(s);
28762|  60.3k|            s->mode = PEG_MODE_ACCUMULATE;
28763|  60.3k|            down1(s);
  ------------------
  |  |28451|  60.3k|#define down1(s) do { \
  |  |28452|  60.3k|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28452:9): [True: 0, False: 60.3k]
  |  |  ------------------
  |  |28453|  60.3k|} while (0)
  |  |  ------------------
  |  |  |  Branch (28453:10): [Folded, False: 60.3k]
  |  |  ------------------
  ------------------
28764|  60.3k|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
28765|  60.3k|            up1(s);
  ------------------
  |  |28454|  60.3k|#define up1(s) ((s)->depth++)
  ------------------
28766|  60.3k|            s->mode = oldmode;
28767|  60.3k|            if (!result) return NULL;
  ------------------
  |  Branch (28767:17): [True: 1.12k, False: 59.2k]
  ------------------
28768|  59.2k|            Janet cap = janet_stringv(s->scratch->data + cs.scratch,
  ------------------
  |  | 1827|  59.2k|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  848|  59.2k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  59.2k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  59.2k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  59.2k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28769|  59.2k|                                      s->scratch->count - cs.scratch);
28770|  59.2k|            cap_load_keept(s, cs);
28771|  59.2k|            pushcap(s, cap, tag);
28772|  59.2k|            return result;
28773|  60.3k|        }
28774|       |
28775|      0|        case RULE_DROP: {
  ------------------
  |  Branch (28775:9): [True: 0, False: 329M]
  ------------------
28776|      0|            CapState cs = cap_save(s);
28777|      0|            down1(s);
  ------------------
  |  |28451|      0|#define down1(s) do { \
  |  |28452|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28452:9): [True: 0, False: 0]
  |  |  ------------------
  |  |28453|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (28453:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
28778|      0|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
28779|      0|            up1(s);
  ------------------
  |  |28454|      0|#define up1(s) ((s)->depth++)
  ------------------
28780|      0|            if (!result) return NULL;
  ------------------
  |  Branch (28780:17): [True: 0, False: 0]
  ------------------
28781|      0|            cap_load(s, cs);
28782|      0|            return result;
28783|      0|        }
28784|       |
28785|      0|        case RULE_ONLY_TAGS: {
  ------------------
  |  Branch (28785:9): [True: 0, False: 329M]
  ------------------
28786|      0|            CapState cs = cap_save(s);
28787|      0|            down1(s);
  ------------------
  |  |28451|      0|#define down1(s) do { \
  |  |28452|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28452:9): [True: 0, False: 0]
  |  |  ------------------
  |  |28453|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (28453:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
28788|      0|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
28789|      0|            up1(s);
  ------------------
  |  |28454|      0|#define up1(s) ((s)->depth++)
  ------------------
28790|      0|            if (!result) return NULL;
  ------------------
  |  Branch (28790:17): [True: 0, False: 0]
  ------------------
28791|      0|            cap_load_keept(s, cs);
28792|      0|            return result;
28793|      0|        }
28794|       |
28795|      0|        case RULE_GROUP: {
  ------------------
  |  Branch (28795:9): [True: 0, False: 329M]
  ------------------
28796|      0|            uint32_t tag = rule[2];
28797|      0|            int oldmode = s->mode;
28798|      0|            CapState cs = cap_save(s);
28799|      0|            s->mode = PEG_MODE_NORMAL;
28800|      0|            down1(s);
  ------------------
  |  |28451|      0|#define down1(s) do { \
  |  |28452|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28452:9): [True: 0, False: 0]
  |  |  ------------------
  |  |28453|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (28453:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
28801|      0|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
28802|      0|            up1(s);
  ------------------
  |  |28454|      0|#define up1(s) ((s)->depth++)
  ------------------
28803|      0|            s->mode = oldmode;
28804|      0|            if (!result) return NULL;
  ------------------
  |  Branch (28804:17): [True: 0, False: 0]
  ------------------
28805|      0|            int32_t num_sub_captures = s->captures->count - cs.cap;
28806|      0|            JanetArray *sub_captures = janet_array(num_sub_captures);
28807|      0|            safe_memcpy(sub_captures->data,
28808|      0|                        s->captures->data + cs.cap,
28809|      0|                        sizeof(Janet) * num_sub_captures);
28810|      0|            sub_captures->count = num_sub_captures;
28811|      0|            cap_load_keept(s, cs);
28812|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28813|      0|            return result;
28814|      0|        }
28815|       |
28816|      0|        case RULE_NTH: {
  ------------------
  |  Branch (28816:9): [True: 0, False: 329M]
  ------------------
28817|      0|            uint32_t nth = rule[1];
28818|      0|            if (nth > INT32_MAX) nth = INT32_MAX;
  ------------------
  |  Branch (28818:17): [True: 0, False: 0]
  ------------------
28819|      0|            uint32_t tag = rule[3];
28820|      0|            int oldmode = s->mode;
28821|      0|            CapState cs = cap_save(s);
28822|      0|            s->mode = PEG_MODE_NORMAL;
28823|      0|            down1(s);
  ------------------
  |  |28451|      0|#define down1(s) do { \
  |  |28452|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28452:9): [True: 0, False: 0]
  |  |  ------------------
  |  |28453|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (28453:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
28824|      0|            const uint8_t *result = peg_rule(s, s->bytecode + rule[2], text);
28825|      0|            up1(s);
  ------------------
  |  |28454|      0|#define up1(s) ((s)->depth++)
  ------------------
28826|      0|            s->mode = oldmode;
28827|      0|            if (!result) return NULL;
  ------------------
  |  Branch (28827:17): [True: 0, False: 0]
  ------------------
28828|      0|            int32_t num_sub_captures = s->captures->count - cs.cap;
28829|      0|            Janet cap;
28830|      0|            if (num_sub_captures > (int32_t) nth) {
  ------------------
  |  Branch (28830:17): [True: 0, False: 0]
  ------------------
28831|      0|                cap = s->captures->data[cs.cap + nth];
28832|      0|            } else {
28833|      0|                return NULL;
28834|      0|            }
28835|      0|            cap_load_keept(s, cs);
28836|      0|            pushcap(s, cap, tag);
28837|      0|            return result;
28838|      0|        }
28839|       |
28840|      8|        case RULE_SUB: {
  ------------------
  |  Branch (28840:9): [True: 8, False: 329M]
  ------------------
28841|      8|            const uint8_t *text_start = text;
28842|      8|            const uint32_t *rule_window = s->bytecode + rule[1];
28843|      8|            const uint32_t *rule_subpattern = s->bytecode + rule[2];
28844|      8|            down1(s);
  ------------------
  |  |28451|      8|#define down1(s) do { \
  |  |28452|      8|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28452:9): [True: 0, False: 8]
  |  |  ------------------
  |  |28453|      8|} while (0)
  |  |  ------------------
  |  |  |  Branch (28453:10): [Folded, False: 8]
  |  |  ------------------
  ------------------
28845|      8|            const uint8_t *window_end = peg_rule(s, rule_window, text);
28846|      8|            up1(s);
  ------------------
  |  |28454|      8|#define up1(s) ((s)->depth++)
  ------------------
28847|      8|            if (!window_end) {
  ------------------
  |  Branch (28847:17): [True: 4, False: 4]
  ------------------
28848|      4|                return NULL;
28849|      4|            }
28850|      4|            const uint8_t *saved_end = s->text_end;
28851|      4|            s->text_end = window_end;
28852|      4|            down1(s);
  ------------------
  |  |28451|      4|#define down1(s) do { \
  |  |28452|      4|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28452:9): [True: 0, False: 4]
  |  |  ------------------
  |  |28453|      4|} while (0)
  |  |  ------------------
  |  |  |  Branch (28453:10): [Folded, False: 4]
  |  |  ------------------
  ------------------
28853|      4|            const uint8_t *next_text = peg_rule(s, rule_subpattern, text_start);
28854|      4|            up1(s);
  ------------------
  |  |28454|      4|#define up1(s) ((s)->depth++)
  ------------------
28855|      4|            s->text_end = saved_end;
28856|       |
28857|      4|            if (!next_text) {
  ------------------
  |  Branch (28857:17): [True: 2, False: 2]
  ------------------
28858|      2|                return NULL;
28859|      2|            }
28860|       |
28861|      2|            return window_end;
28862|      4|        }
28863|       |
28864|    799|        case RULE_TIL: {
  ------------------
  |  Branch (28864:9): [True: 799, False: 329M]
  ------------------
28865|    799|            const uint32_t *rule_terminus = s->bytecode + rule[1];
28866|    799|            const uint32_t *rule_subpattern = s->bytecode + rule[2];
28867|       |
28868|    799|            const uint8_t *terminus_start = text;
28869|    799|            const uint8_t *terminus_end = NULL;
28870|    799|            down1(s);
  ------------------
  |  |28451|    799|#define down1(s) do { \
  |  |28452|    799|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28452:9): [True: 0, False: 799]
  |  |  ------------------
  |  |28453|    799|} while (0)
  |  |  ------------------
  |  |  |  Branch (28453:10): [Folded, False: 799]
  |  |  ------------------
  ------------------
28871|  10.3k|            while (terminus_start <= s->text_end) {
  ------------------
  |  Branch (28871:20): [True: 10.0k, False: 310]
  ------------------
28872|  10.0k|                CapState cs2 = cap_save(s);
28873|  10.0k|                terminus_end = peg_rule(s, rule_terminus, terminus_start);
28874|  10.0k|                cap_load(s, cs2);
28875|  10.0k|                if (terminus_end) {
  ------------------
  |  Branch (28875:21): [True: 489, False: 9.58k]
  ------------------
28876|    489|                    break;
28877|    489|                }
28878|  9.58k|                terminus_start++;
28879|  9.58k|            }
28880|    799|            up1(s);
  ------------------
  |  |28454|    799|#define up1(s) ((s)->depth++)
  ------------------
28881|       |
28882|    799|            if (!terminus_end) {
  ------------------
  |  Branch (28882:17): [True: 310, False: 489]
  ------------------
28883|    310|                return NULL;
28884|    310|            }
28885|       |
28886|    489|            const uint8_t *saved_end = s->text_end;
28887|    489|            s->text_end = terminus_start;
28888|    489|            down1(s);
  ------------------
  |  |28451|    489|#define down1(s) do { \
  |  |28452|    489|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28452:9): [True: 0, False: 489]
  |  |  ------------------
  |  |28453|    489|} while (0)
  |  |  ------------------
  |  |  |  Branch (28453:10): [Folded, False: 489]
  |  |  ------------------
  ------------------
28889|    489|            const uint8_t *matched = peg_rule(s, rule_subpattern, text);
28890|    489|            up1(s);
  ------------------
  |  |28454|    489|#define up1(s) ((s)->depth++)
  ------------------
28891|    489|            s->text_end = saved_end;
28892|       |
28893|    489|            if (!matched) {
  ------------------
  |  Branch (28893:17): [True: 207, False: 282]
  ------------------
28894|    207|                return NULL;
28895|    207|            }
28896|       |
28897|    282|            return terminus_end;
28898|    489|        }
28899|       |
28900|      0|        case RULE_SPLIT: {
  ------------------
  |  Branch (28900:9): [True: 0, False: 329M]
  ------------------
28901|      0|            const uint8_t *saved_end = s->text_end;
28902|      0|            const uint32_t *rule_separator = s->bytecode + rule[1];
28903|      0|            const uint32_t *rule_subpattern = s->bytecode + rule[2];
28904|       |
28905|      0|            const uint8_t *chunk_start = text;
28906|      0|            const uint8_t *chunk_end = NULL;
28907|       |
28908|      0|            while (text <= saved_end) {
  ------------------
  |  Branch (28908:20): [True: 0, False: 0]
  ------------------
28909|       |                /* Find next split (or end of text) */
28910|      0|                CapState cs = cap_save(s);
28911|      0|                down1(s);
  ------------------
  |  |28451|      0|#define down1(s) do { \
  |  |28452|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28452:9): [True: 0, False: 0]
  |  |  ------------------
  |  |28453|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (28453:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
28912|      0|                while (text <= saved_end) {
  ------------------
  |  Branch (28912:24): [True: 0, False: 0]
  ------------------
28913|      0|                    chunk_end = text;
28914|      0|                    const uint8_t *check = peg_rule(s, rule_separator, text);
28915|      0|                    cap_load(s, cs);
28916|      0|                    if (check) {
  ------------------
  |  Branch (28916:25): [True: 0, False: 0]
  ------------------
28917|      0|                        text = check;
28918|      0|                        break;
28919|      0|                    }
28920|      0|                    text++;
28921|      0|                }
28922|      0|                up1(s);
  ------------------
  |  |28454|      0|#define up1(s) ((s)->depth++)
  ------------------
28923|       |
28924|       |                /* Match between splits */
28925|      0|                s->text_end = chunk_end;
28926|      0|                down1(s);
  ------------------
  |  |28451|      0|#define down1(s) do { \
  |  |28452|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28452:9): [True: 0, False: 0]
  |  |  ------------------
  |  |28453|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (28453:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
28927|      0|                const uint8_t *subpattern_end = peg_rule(s, rule_subpattern, chunk_start);
28928|      0|                up1(s);
  ------------------
  |  |28454|      0|#define up1(s) ((s)->depth++)
  ------------------
28929|      0|                s->text_end = saved_end;
28930|      0|                if (!subpattern_end) return NULL; /* Don't match anything */
  ------------------
  |  Branch (28930:21): [True: 0, False: 0]
  ------------------
28931|       |
28932|       |                /* Ensure forward progress */
28933|      0|                if (text == chunk_start) return NULL;
  ------------------
  |  Branch (28933:21): [True: 0, False: 0]
  ------------------
28934|      0|                chunk_start = text;
28935|      0|            }
28936|       |
28937|      0|            s->text_end = saved_end;
28938|      0|            return s->text_end;
28939|      0|        }
28940|       |
28941|  44.3M|        case RULE_REPLACE:
  ------------------
  |  Branch (28941:9): [True: 44.3M, False: 285M]
  ------------------
28942|  44.3M|        case RULE_MATCHSPLICE:
  ------------------
  |  Branch (28942:9): [True: 0, False: 329M]
  ------------------
28943|  44.3M|        case RULE_MATCHTIME: {
  ------------------
  |  Branch (28943:9): [True: 0, False: 329M]
  ------------------
28944|  44.3M|            uint32_t tag = rule[3];
28945|  44.3M|            int oldmode = s->mode;
28946|  44.3M|            CapState cs = cap_save(s);
28947|  44.3M|            s->mode = PEG_MODE_NORMAL;
28948|  44.3M|            down1(s);
  ------------------
  |  |28451|  44.3M|#define down1(s) do { \
  |  |28452|  44.3M|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28452:9): [True: 0, False: 44.3M]
  |  |  ------------------
  |  |28453|  44.3M|} while (0)
  |  |  ------------------
  |  |  |  Branch (28453:10): [Folded, False: 44.3M]
  |  |  ------------------
  ------------------
28949|  44.3M|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
28950|  44.3M|            up1(s);
  ------------------
  |  |28454|  44.3M|#define up1(s) ((s)->depth++)
  ------------------
28951|  44.3M|            s->mode = oldmode;
28952|  44.3M|            if (!result) return NULL;
  ------------------
  |  Branch (28952:17): [True: 872, False: 44.3M]
  ------------------
28953|       |
28954|  44.3M|            Janet cap = janet_wrap_nil();
  ------------------
  |  |  831|  44.3M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  44.3M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  44.3M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  44.3M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28955|  44.3M|            Janet constant = s->constants[rule[2]];
28956|  44.3M|            switch (janet_type(constant)) {
  ------------------
  |  |  795|  44.3M|    (isnan((x).number) \
  |  |  796|  44.3M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  44.3M|        : JANET_NUMBER)
  ------------------
  |  Branch (28956:21): [True: 44.3M, False: 11.7k]
  ------------------
28957|  44.3M|                default:
  ------------------
  |  Branch (28957:17): [True: 44.3M, False: 2]
  ------------------
28958|  44.3M|                    cap = constant;
28959|  44.3M|                    break;
28960|      2|                case JANET_STRUCT:
  ------------------
  |  Branch (28960:17): [True: 2, False: 44.3M]
  ------------------
28961|      2|                    if (s->captures->count) {
  ------------------
  |  Branch (28961:25): [True: 1, False: 1]
  ------------------
28962|      1|                        cap = janet_struct_get(janet_unwrap_struct(constant),
  ------------------
  |  |  857|      1|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
28963|      1|                                               s->captures->data[s->captures->count - 1]);
28964|      1|                    }
28965|      2|                    break;
28966|      0|                case JANET_TABLE:
  ------------------
  |  Branch (28966:17): [True: 0, False: 44.3M]
  ------------------
28967|      0|                    if (s->captures->count) {
  ------------------
  |  Branch (28967:25): [True: 0, False: 0]
  ------------------
28968|      0|                        cap = janet_table_get(janet_unwrap_table(constant),
  ------------------
  |  |  861|      0|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
28969|      0|                                              s->captures->data[s->captures->count - 1]);
28970|      0|                    }
28971|      0|                    break;
28972|      0|                case JANET_CFUNCTION:
  ------------------
  |  Branch (28972:17): [True: 0, False: 44.3M]
  ------------------
28973|      0|                    cap = janet_unwrap_cfunction(constant)(s->captures->count - cs.cap,
  ------------------
  |  |  869|      0|#define janet_unwrap_cfunction(x) ((JanetCFunction)janet_nanbox_to_pointer(x))
  ------------------
28974|      0|                                                           s->captures->data + cs.cap);
28975|      0|                    break;
28976|      0|                case JANET_FUNCTION:
  ------------------
  |  Branch (28976:17): [True: 0, False: 44.3M]
  ------------------
28977|      0|                    cap = janet_call(janet_unwrap_function(constant),
  ------------------
  |  |  868|      0|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
28978|      0|                                     s->captures->count - cs.cap,
28979|      0|                                     s->captures->data + cs.cap);
28980|      0|                    break;
28981|  44.3M|            }
28982|  44.3M|            cap_load_keept(s, cs);
28983|  44.3M|            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 (28983:17): [True: 0, False: 44.3M]
  ------------------
28984|  44.3M|            const Janet *elements = NULL;
28985|  44.3M|            int32_t len = 0;
28986|  44.3M|            if ((rule[0] == RULE_MATCHSPLICE) && janet_indexed_view(cap, &elements, &len)) {
  ------------------
  |  Branch (28986:17): [True: 0, False: 44.3M]
  |  Branch (28986:50): [True: 0, False: 0]
  ------------------
28987|       |                /* unpack and flatten capture */
28988|      0|                for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (28988:37): [True: 0, False: 0]
  ------------------
28989|      0|                    pushcap(s, elements[i], tag);
28990|      0|                }
28991|  44.3M|            } else {
28992|  44.3M|                pushcap(s, cap, tag);
28993|  44.3M|            }
28994|  44.3M|            return result;
28995|  44.3M|        }
28996|       |
28997|     23|        case RULE_ERROR: {
  ------------------
  |  Branch (28997:9): [True: 23, False: 329M]
  ------------------
28998|     23|            int oldmode = s->mode;
28999|     23|            s->mode = PEG_MODE_NORMAL;
29000|     23|            int32_t old_cap = s->captures->count;
29001|     23|            down1(s);
  ------------------
  |  |28451|     23|#define down1(s) do { \
  |  |28452|     23|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28452:9): [True: 0, False: 23]
  |  |  ------------------
  |  |28453|     23|} while (0)
  |  |  ------------------
  |  |  |  Branch (28453:10): [Folded, False: 23]
  |  |  ------------------
  ------------------
29002|     23|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
29003|     23|            up1(s);
  ------------------
  |  |28454|     23|#define up1(s) ((s)->depth++)
  ------------------
29004|     23|            s->mode = oldmode;
29005|     23|            if (!result) return NULL;
  ------------------
  |  Branch (29005:17): [True: 6, False: 17]
  ------------------
29006|     17|            if (s->captures->count > old_cap) {
  ------------------
  |  Branch (29006:17): [True: 6, False: 11]
  ------------------
29007|       |                /* Throw last capture */
29008|      6|                janet_panicv(s->captures->data[s->captures->count - 1]);
29009|     11|            } else {
29010|       |                /* Throw generic error */
29011|     11|                int32_t start = (int32_t)(text - s->text_start);
29012|     11|                LineCol lc = get_linecol_from_position(s, start);
29013|     11|                janet_panicf("match error at line %d, column %d", lc.line, lc.col);
29014|     11|            }
29015|      0|            return NULL;
29016|     17|        }
29017|       |
29018|      0|        case RULE_BACKMATCH: {
  ------------------
  |  Branch (29018:9): [True: 0, False: 329M]
  ------------------
29019|      0|            uint32_t search = rule[1];
29020|      0|            for (int32_t i = s->tags->count - 1; i >= 0; i--) {
  ------------------
  |  Branch (29020:50): [True: 0, False: 0]
  ------------------
29021|      0|                if (s->tags->data[i] == search) {
  ------------------
  |  Branch (29021:21): [True: 0, False: 0]
  ------------------
29022|      0|                    Janet capture = s->tagged_captures->data[i];
29023|      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 (29023:25): [True: 0, False: 0]
  ------------------
29024|      0|                        return NULL;
29025|      0|                    const uint8_t *bytes = janet_unwrap_string(capture);
  ------------------
  |  |  863|      0|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
29026|      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)))
  |  |  ------------------
  ------------------
29027|      0|                    if (text + len > s->text_end)
  ------------------
  |  Branch (29027:25): [True: 0, False: 0]
  ------------------
29028|      0|                        return NULL;
29029|      0|                    return memcmp(text, bytes, len) ? NULL : text + len;
  ------------------
  |  Branch (29029:28): [True: 0, False: 0]
  ------------------
29030|      0|                }
29031|      0|            }
29032|      0|            return NULL;
29033|      0|        }
29034|       |
29035|      0|        case RULE_LENPREFIX: {
  ------------------
  |  Branch (29035:9): [True: 0, False: 329M]
  ------------------
29036|      0|            int oldmode = s->mode;
29037|      0|            s->mode = PEG_MODE_NORMAL;
29038|      0|            const uint8_t *next_text;
29039|      0|            CapState cs = cap_save(s);
29040|      0|            down1(s);
  ------------------
  |  |28451|      0|#define down1(s) do { \
  |  |28452|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28452:9): [True: 0, False: 0]
  |  |  ------------------
  |  |28453|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (28453:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
29041|      0|            next_text = peg_rule(s, s->bytecode + rule[1], text);
29042|      0|            up1(s);
  ------------------
  |  |28454|      0|#define up1(s) ((s)->depth++)
  ------------------
29043|      0|            if (NULL == next_text) return NULL;
  ------------------
  |  Branch (29043:17): [True: 0, False: 0]
  ------------------
29044|      0|            s->mode = oldmode;
29045|      0|            int32_t num_sub_captures = s->captures->count - cs.cap;
29046|      0|            Janet lencap;
29047|      0|            if (num_sub_captures <= 0 ||
  ------------------
  |  Branch (29047:17): [True: 0, False: 0]
  ------------------
29048|      0|                    (lencap = s->captures->data[cs.cap], !janet_checkint(lencap))) {
  ------------------
  |  Branch (29048:21): [True: 0, False: 0]
  ------------------
29049|      0|                cap_load(s, cs);
29050|      0|                return NULL;
29051|      0|            }
29052|      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)
  |  |  ------------------
  ------------------
29053|       |            /* drop captures from len pattern */
29054|      0|            cap_load(s, cs);
29055|      0|            for (int32_t i = 0; i < nrep; i++) {
  ------------------
  |  Branch (29055:33): [True: 0, False: 0]
  ------------------
29056|      0|                down1(s);
  ------------------
  |  |28451|      0|#define down1(s) do { \
  |  |28452|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28452:9): [True: 0, False: 0]
  |  |  ------------------
  |  |28453|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (28453:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
29057|      0|                next_text = peg_rule(s, s->bytecode + rule[2], next_text);
29058|      0|                up1(s);
  ------------------
  |  |28454|      0|#define up1(s) ((s)->depth++)
  ------------------
29059|      0|                if (NULL == next_text) {
  ------------------
  |  Branch (29059:21): [True: 0, False: 0]
  ------------------
29060|      0|                    cap_load(s, cs);
29061|      0|                    return NULL;
29062|      0|                }
29063|      0|            }
29064|      0|            return next_text;
29065|      0|        }
29066|       |
29067|  16.2k|        case RULE_READINT: {
  ------------------
  |  Branch (29067:9): [True: 16.2k, False: 329M]
  ------------------
29068|  16.2k|            uint32_t tag = rule[2];
29069|  16.2k|            uint32_t signedness = rule[1] & 0x10;
29070|  16.2k|            uint32_t endianness = rule[1] & 0x20;
29071|  16.2k|            int width = (int)(rule[1] & 0xF);
29072|  16.2k|            if (text + width > s->text_end) return NULL;
  ------------------
  |  Branch (29072:17): [True: 3.04k, False: 13.2k]
  ------------------
29073|  13.2k|            uint64_t accum = 0;
29074|  13.2k|            if (endianness) {
  ------------------
  |  Branch (29074:17): [True: 0, False: 13.2k]
  ------------------
29075|       |                /* BE */
29076|      0|                for (int i = 0; i < width; i++) accum = (accum << 8) | text[i];
  ------------------
  |  Branch (29076:33): [True: 0, False: 0]
  ------------------
29077|  13.2k|            } else {
29078|       |                /* LE */
29079|  49.9k|                for (int i = width - 1; i >= 0; i--) accum = (accum << 8) | text[i];
  ------------------
  |  Branch (29079:41): [True: 36.6k, False: 13.2k]
  ------------------
29080|  13.2k|            }
29081|       |
29082|  13.2k|            Janet capture_value;
29083|       |            /* We can only parse integeres of greater than 6 bytes reliable if int-types are enabled.
29084|       |             * Otherwise, we may lose precision, so 6 is the maximum size when int-types are disabled. */
29085|  13.2k|#ifdef JANET_INT_TYPES
29086|  13.2k|            if (width > 6) {
  ------------------
  |  Branch (29086:17): [True: 2.06k, False: 11.1k]
  ------------------
29087|  2.06k|                if (signedness) {
  ------------------
  |  Branch (29087:21): [True: 1.54k, False: 517]
  ------------------
29088|  1.54k|                    capture_value = janet_wrap_s64(peg_convert_u64_s64(accum, width));
29089|  1.54k|                } else {
29090|    517|                    capture_value = janet_wrap_u64(accum);
29091|    517|                }
29092|  2.06k|            } else
29093|  11.1k|#endif
29094|  11.1k|            {
29095|  11.1k|                double double_value;
29096|  11.1k|                if (signedness) {
  ------------------
  |  Branch (29096:21): [True: 10.6k, False: 576]
  ------------------
29097|  10.6k|                    double_value = (double)(peg_convert_u64_s64(accum, width));
29098|  10.6k|                } else {
29099|    576|                    double_value = (double)accum;
29100|    576|                }
29101|  11.1k|                capture_value = janet_wrap_number(double_value);
  ------------------
  |  |  835|  11.1k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
29102|  11.1k|            }
29103|       |
29104|  13.2k|            pushcap(s, capture_value, tag);
29105|  13.2k|            return text + width;
29106|  16.2k|        }
29107|       |
29108|      0|        case RULE_UNREF: {
  ------------------
  |  Branch (29108:9): [True: 0, False: 329M]
  ------------------
29109|      0|            int32_t tcap = s->tags->count;
29110|      0|            down1(s);
  ------------------
  |  |28451|      0|#define down1(s) do { \
  |  |28452|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28452:9): [True: 0, False: 0]
  |  |  ------------------
  |  |28453|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (28453:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
29111|      0|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
29112|      0|            up1(s);
  ------------------
  |  |28454|      0|#define up1(s) ((s)->depth++)
  ------------------
29113|      0|            if (!result) return NULL;
  ------------------
  |  Branch (29113:17): [True: 0, False: 0]
  ------------------
29114|      0|            int32_t final_tcap = s->tags->count;
29115|       |            /* Truncate tagged captures to not include items of the given tag */
29116|      0|            int32_t w = tcap;
29117|       |            /* If no tag is given, drop ALL tagged captures */
29118|      0|            if (rule[2]) {
  ------------------
  |  Branch (29118:17): [True: 0, False: 0]
  ------------------
29119|      0|                for (int32_t i = tcap; i < final_tcap; i++) {
  ------------------
  |  Branch (29119:40): [True: 0, False: 0]
  ------------------
29120|      0|                    if (s->tags->data[i] != (0xFF & rule[2])) {
  ------------------
  |  Branch (29120:25): [True: 0, False: 0]
  ------------------
29121|      0|                        s->tags->data[w] = s->tags->data[i];
29122|      0|                        s->tagged_captures->data[w] = s->tagged_captures->data[i];
29123|      0|                        w++;
29124|      0|                    }
29125|      0|                }
29126|      0|            }
29127|      0|            s->tags->count = w;
29128|      0|            s->tagged_captures->count = w;
29129|      0|            return result;
29130|      0|        }
29131|       |
29132|   329M|    }
29133|   329M|}
janet.c:cap_save:
28355|   247M|static CapState cap_save(PegState *s) {
28356|   247M|    CapState cs;
28357|   247M|    cs.scratch = s->scratch->count;
28358|   247M|    cs.cap = s->captures->count;
28359|   247M|    cs.tcap = s->tagged_captures->count;
28360|   247M|    return cs;
28361|   247M|}
janet.c:cap_load:
28364|  3.24M|static void cap_load(PegState *s, CapState cs) {
28365|  3.24M|    s->scratch->count = cs.scratch;
28366|  3.24M|    s->captures->count = cs.cap;
28367|  3.24M|    s->tags->count = cs.tcap;
28368|  3.24M|    s->tagged_captures->count = cs.tcap;
28369|  3.24M|}
janet.c:pushcap:
28379|   116M|static void pushcap(PegState *s, Janet capture, uint32_t tag) {
28380|   116M|    if (s->mode == PEG_MODE_ACCUMULATE) {
  ------------------
  |  Branch (28380:9): [True: 44.4M, False: 72.4M]
  ------------------
28381|  44.4M|        janet_to_string_b(s->scratch, capture);
28382|  44.4M|    }
28383|   116M|    if (s->mode == PEG_MODE_NORMAL) {
  ------------------
  |  Branch (28383:9): [True: 72.4M, False: 44.4M]
  ------------------
28384|  72.4M|        janet_array_push(s->captures, capture);
28385|  72.4M|    }
28386|   116M|    if (s->has_backref) {
  ------------------
  |  Branch (28386:9): [True: 465k, False: 116M]
  ------------------
28387|   465k|        janet_array_push(s->tagged_captures, capture);
28388|   465k|        janet_buffer_push_u8(s->tags, tag);
28389|   465k|    }
28390|   116M|}
janet.c:get_linecol_from_position:
28398|  3.36M|static LineCol get_linecol_from_position(PegState *s, int32_t position) {
28399|       |    /* Generate if not made yet */
28400|  3.36M|    if (s->linemaplen < 0) {
  ------------------
  |  Branch (28400:9): [True: 188, False: 3.36M]
  ------------------
28401|    188|        int32_t newline_count = 0;
28402|  5.15M|        for (const uint8_t *c = s->text_start; c < s->outer_text_end; c++) {
  ------------------
  |  Branch (28402:48): [True: 5.15M, False: 188]
  ------------------
28403|  5.15M|            if (*c == '\n') newline_count++;
  ------------------
  |  Branch (28403:17): [True: 1.10M, False: 4.04M]
  ------------------
28404|  5.15M|        }
28405|    188|        int32_t *mem = janet_smalloc(sizeof(int32_t) * newline_count);
28406|    188|        size_t index = 0;
28407|  5.15M|        for (const uint8_t *c = s->text_start; c < s->outer_text_end; c++) {
  ------------------
  |  Branch (28407:48): [True: 5.15M, False: 188]
  ------------------
28408|  5.15M|            if (*c == '\n') mem[index++] = (int32_t)(c - s->text_start);
  ------------------
  |  Branch (28408:17): [True: 1.10M, False: 4.04M]
  ------------------
28409|  5.15M|        }
28410|    188|        s->linemaplen = newline_count;
28411|    188|        s->linemap = mem;
28412|    188|    }
28413|       |    /* Do binary search for line. Slightly modified from classic binary search:
28414|       |     * - if we find that our current character is a line break, just return immediately.
28415|       |     *   a newline character is consider to be on the same line as the character before
28416|       |     *   (\n is line terminator, not line separator).
28417|       |     * - in the not-found case, we still want to find the greatest-indexed newline that
28418|       |     *   is before position. we use that to calculate the line and column.
28419|       |     * - in the case that lo = 0 and s->linemap[0] is still greater than position, we
28420|       |     *   are on the first line and our column is position + 1. */
28421|  3.36M|    int32_t hi = s->linemaplen; /* hi is greater than the actual line */
28422|  3.36M|    int32_t lo = 0; /* lo is less than or equal to the actual line */
28423|  3.36M|    LineCol ret;
28424|  34.8M|    while (lo + 1 < hi) {
  ------------------
  |  Branch (28424:12): [True: 31.4M, False: 3.36M]
  ------------------
28425|  31.4M|        int32_t mid = lo + (hi - lo) / 2;
28426|  31.4M|        if (s->linemap[mid] >= position) {
  ------------------
  |  Branch (28426:13): [True: 4.32M, False: 27.1M]
  ------------------
28427|  4.32M|            hi = mid;
28428|  27.1M|        } else {
28429|  27.1M|            lo = mid;
28430|  27.1M|        }
28431|  31.4M|    }
28432|       |    /* first line case */
28433|  3.36M|    if (s->linemaplen == 0 || (lo == 0 && s->linemap[0] >= position)) {
  ------------------
  |  Branch (28433:9): [True: 136k, False: 3.23M]
  |  Branch (28433:32): [True: 225k, False: 3.00M]
  |  Branch (28433:43): [True: 93.3k, False: 132k]
  ------------------
28434|   229k|        ret.line = 1;
28435|   229k|        ret.col = position + 1;
28436|  3.13M|    } else {
28437|  3.13M|        ret.line = lo + 2;
28438|  3.13M|        ret.col = position - s->linemap[lo];
28439|  3.13M|    }
28440|  3.36M|    return ret;
28441|  3.36M|}
janet.c:cap_load_keept:
28373|  44.3M|static void cap_load_keept(PegState *s, CapState cs) {
28374|  44.3M|    s->scratch->count = cs.scratch;
28375|  44.3M|    s->captures->count = cs.cap;
28376|  44.3M|}
janet.c:peg_convert_u64_s64:
28444|  12.1k|static int64_t peg_convert_u64_s64(uint64_t from, int width) {
28445|  12.1k|    if (width == 0) return 0; /* Avoid undefined shift */
  ------------------
  |  Branch (28445:9): [True: 530, False: 11.6k]
  ------------------
28446|  11.6k|    int shift = 8 * (8 - width);
28447|  11.6k|    return ((int64_t)(from << shift)) >> shift;
28448|  12.1k|}
janet.c:number_to_string_b:
30448|   486k|static void number_to_string_b(JanetBuffer *buffer, double x) {
30449|   486k|    janet_buffer_extra(buffer, BUFSIZE);
  ------------------
  |  |30442|   486k|#define BUFSIZE 64
  ------------------
30450|   486k|    const char *fmt = (x == floor(x) &&
  ------------------
  |  Branch (30450:24): [True: 467k, False: 18.9k]
  ------------------
30451|   467k|                       x <= JANET_INTMAX_DOUBLE &&
  ------------------
  |  |  165|   953k|#define JANET_INTMAX_DOUBLE 9007199254740992.0
  ------------------
  |  Branch (30451:24): [True: 457k, False: 9.79k]
  ------------------
30452|   457k|                       x >= JANET_INTMIN_DOUBLE) ? "%.0f" : ("%." STR(DBL_DIG) "g");
  ------------------
  |  |  166|   457k|#define JANET_INTMIN_DOUBLE (-9007199254740992.0)
  ------------------
  |  Branch (30452:24): [True: 457k, False: 135]
  ------------------
30453|   486k|    int count;
30454|   486k|    if (x == 0.0) {
  ------------------
  |  Branch (30454:9): [True: 64.9k, False: 421k]
  ------------------
30455|       |        /* Prevent printing of '-0' */
30456|  64.9k|        count = 1;
30457|  64.9k|        buffer->data[buffer->count] = '0';
30458|   421k|    } else {
30459|   421k|        count = snprintf((char *) buffer->data + buffer->count, BUFSIZE, fmt, x);
  ------------------
  |  |30442|   421k|#define BUFSIZE 64
  ------------------
30460|   421k|    }
30461|   486k|    buffer->count += count;
30462|   486k|}
janet.c:string_description_b:
30508|  44.1M|static void string_description_b(JanetBuffer *buffer, const char *title, void *pointer) {
30509|  44.1M|    janet_buffer_extra(buffer, BUFSIZE);
  ------------------
  |  |30442|  44.1M|#define BUFSIZE 64
  ------------------
30510|  44.1M|    uint8_t *c = buffer->data + buffer->count;
30511|  44.1M|    int32_t i;
30512|  44.1M|    union {
30513|  44.1M|        uint8_t bytes[sizeof(void *)];
30514|  44.1M|        void *p;
30515|  44.1M|    } pbuf;
30516|       |
30517|  44.1M|    pbuf.p = pointer;
30518|  44.1M|    *c++ = '<';
30519|       |    /* Maximum of 32 bytes for abstract type name */
30520|   264M|    for (i = 0; i < 32 && title[i]; ++i)
  ------------------
  |  Branch (30520:17): [True: 264M, False: 0]
  |  Branch (30520:27): [True: 220M, False: 44.1M]
  ------------------
30521|   220M|        *c++ = ((uint8_t *)title) [i];
30522|  44.1M|    *c++ = ' ';
30523|  44.1M|    *c++ = '0';
30524|  44.1M|    *c++ = 'x';
30525|  44.1M|#if defined(JANET_NANBOX_64)
30526|  44.1M|#define POINTSIZE 6
30527|       |#else
30528|       |#define POINTSIZE (sizeof(void *))
30529|       |#endif
30530|   309M|    for (i = POINTSIZE; i > 0; --i) {
  ------------------
  |  |30526|  44.1M|#define POINTSIZE 6
  ------------------
  |  Branch (30530:25): [True: 264M, False: 44.1M]
  ------------------
30531|   264M|        uint8_t byte = pbuf.bytes[i - 1];
30532|   264M|        *c++ = HEX(byte >> 4);
  ------------------
  |  |30504|   264M|#define HEX(i) (((uint8_t *) janet_base64)[(i)])
  ------------------
30533|   264M|        *c++ = HEX(byte & 0xF);
  ------------------
  |  |30504|   264M|#define HEX(i) (((uint8_t *) janet_base64)[(i)])
  ------------------
30534|   264M|    }
30535|  44.1M|    *c++ = '>';
30536|  44.1M|    buffer->count = (int32_t)(c - buffer->data);
30537|  44.1M|#undef POINTSIZE
30538|  44.1M|}
janet.c:janet_escape_string_b:
30610|  3.99M|static void janet_escape_string_b(JanetBuffer *buffer, const uint8_t *str) {
30611|       |    janet_escape_string_impl(buffer, str, janet_string_length(str));
  ------------------
  |  | 1813|  3.99M|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|  3.99M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
30612|  3.99M|}
janet.c:janet_escape_string_impl:
30540|  4.01M|static int janet_escape_string_impl(JanetBuffer *buffer, const uint8_t *str, int32_t len) {
30541|  4.01M|    janet_buffer_push_u8(buffer, '"');
30542|  4.01M|    int align = 1;
30543|  4.60M|    for (int32_t i = 0; i < len; ++i) {
  ------------------
  |  Branch (30543:25): [True: 591k, False: 4.01M]
  ------------------
30544|   591k|        uint8_t c = str[i];
30545|   591k|        switch (c) {
30546|  1.37k|            case '"':
  ------------------
  |  Branch (30546:13): [True: 1.37k, False: 590k]
  ------------------
30547|  1.37k|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\\"", 2);
30548|  1.37k|                align += 2;
30549|  1.37k|                break;
30550|  3.05k|            case '\n':
  ------------------
  |  Branch (30550:13): [True: 3.05k, False: 588k]
  ------------------
30551|  3.05k|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\n", 2);
30552|  3.05k|                align += 2;
30553|  3.05k|                break;
30554|  1.53k|            case '\r':
  ------------------
  |  Branch (30554:13): [True: 1.53k, False: 590k]
  ------------------
30555|  1.53k|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\r", 2);
30556|  1.53k|                align += 2;
30557|  1.53k|                break;
30558|   188k|            case '\0':
  ------------------
  |  Branch (30558:13): [True: 188k, False: 403k]
  ------------------
30559|   188k|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\0", 2);
30560|   188k|                align += 2;
30561|   188k|                break;
30562|    310|            case '\f':
  ------------------
  |  Branch (30562:13): [True: 310, False: 591k]
  ------------------
30563|    310|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\f", 2);
30564|    310|                align += 2;
30565|    310|                break;
30566|  1.36k|            case '\v':
  ------------------
  |  Branch (30566:13): [True: 1.36k, False: 590k]
  ------------------
30567|  1.36k|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\v", 2);
30568|  1.36k|                align += 2;
30569|  1.36k|                break;
30570|    528|            case '\a':
  ------------------
  |  Branch (30570:13): [True: 528, False: 591k]
  ------------------
30571|    528|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\a", 2);
30572|    528|                align += 2;
30573|    528|                break;
30574|    679|            case '\b':
  ------------------
  |  Branch (30574:13): [True: 679, False: 591k]
  ------------------
30575|    679|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\b", 2);
30576|    679|                align += 2;
30577|    679|                break;
30578|    259|            case 27:
  ------------------
  |  Branch (30578:13): [True: 259, False: 591k]
  ------------------
30579|    259|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\e", 2);
30580|    259|                align += 2;
30581|    259|                break;
30582|    784|            case '\\':
  ------------------
  |  Branch (30582:13): [True: 784, False: 591k]
  ------------------
30583|    784|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\\\", 2);
30584|    784|                align += 2;
30585|    784|                break;
30586|  7.57k|            case '\t':
  ------------------
  |  Branch (30586:13): [True: 7.57k, False: 584k]
  ------------------
30587|  7.57k|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\t", 2);
30588|  7.57k|                align += 2;
30589|  7.57k|                break;
30590|   385k|            default:
  ------------------
  |  Branch (30590:13): [True: 385k, False: 206k]
  ------------------
30591|   385k|                if (c < 32 || c > 126) {
  ------------------
  |  Branch (30591:21): [True: 11.8k, False: 373k]
  |  Branch (30591:31): [True: 162k, False: 211k]
  ------------------
30592|   174k|                    uint8_t buf[4];
30593|   174k|                    buf[0] = '\\';
30594|   174k|                    buf[1] = 'x';
30595|   174k|                    buf[2] = janet_base64[(c >> 4) & 0xF];
30596|   174k|                    buf[3] = janet_base64[c & 0xF];
30597|   174k|                    janet_buffer_push_bytes(buffer, buf, 4);
30598|   174k|                    align += 4;
30599|   211k|                } else {
30600|   211k|                    janet_buffer_push_u8(buffer, c);
30601|   211k|                    align++;
30602|   211k|                }
30603|   385k|                break;
30604|   591k|        }
30605|   591k|    }
30606|  4.01M|    janet_buffer_push_u8(buffer, '"');
30607|  4.01M|    return align + 1;
30608|  4.01M|}
janet.c:janet_escape_buffer_b:
30614|  14.9k|static void janet_escape_buffer_b(JanetBuffer *buffer, JanetBuffer *bx) {
30615|  14.9k|    if (bx == buffer) {
  ------------------
  |  Branch (30615:9): [True: 0, False: 14.9k]
  ------------------
30616|       |        /* Ensures buffer won't resize while escaping */
30617|      0|        int64_t new_size = 6 * (int64_t) bx->count + 3;
30618|      0|        if (new_size > INT32_MAX) janet_panic("buffer overflow");
  ------------------
  |  Branch (30618:13): [True: 0, False: 0]
  ------------------
30619|      0|        janet_buffer_ensure(bx, (int32_t) new_size, 1);
30620|      0|    }
30621|  14.9k|    janet_buffer_push_u8(buffer, '@');
30622|  14.9k|    janet_escape_string_impl(buffer, bx->data, bx->count);
30623|  14.9k|}
janet.c:janet_pretty_:
31237|  4.19M|                                  int flags, Janet x, int32_t startlen, int32_t lookback_barrier) {
31238|  4.19M|    struct pretty S;
31239|  4.19M|    if (NULL == buffer) {
  ------------------
  |  Branch (31239:9): [True: 0, False: 4.19M]
  ------------------
31240|      0|        buffer = janet_buffer(0);
31241|      0|    }
31242|  4.19M|    S.buffer = buffer;
31243|  4.19M|    S.depth = depth;
31244|  4.19M|    S.width = width;
31245|  4.19M|    S.align = 0;
31246|  4.19M|    S.flags = flags;
31247|  4.19M|    S.bufstartlen = startlen;
31248|  4.19M|    S.lookback_barrier = lookback_barrier;
31249|  4.19M|    S.keysort_capacity = 0;
31250|       |    S.keysort_buffer = NULL;
31251|  4.19M|    S.keysort_start = 0;
31252|  4.19M|    janet_table_init(&S.seen, 10);
31253|  4.19M|    janet_pretty_one(&S, x);
31254|  4.19M|    backtrack_newlines(&S);
31255|  4.19M|    janet_table_deinit(&S.seen);
31256|  4.19M|    return S.buffer;
31257|  4.19M|}
janet.c:janet_pretty_one:
31004|  12.0M|static void janet_pretty_one(struct pretty *S, Janet x) {
31005|       |    /* Add to seen */
31006|  12.0M|    switch (janet_type(x)) {
  ------------------
  |  |  795|  12.0M|    (isnan((x).number) \
  |  |  796|  12.0M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  12.0M|        : JANET_NUMBER)
  ------------------
  |  Branch (31006:13): [True: 11.6M, False: 341k]
  ------------------
31007|  4.12k|        case JANET_NIL:
  ------------------
  |  Branch (31007:9): [True: 4.12k, False: 12.0M]
  ------------------
31008|   345k|        case JANET_NUMBER:
  ------------------
  |  Branch (31008:9): [True: 341k, False: 11.6M]
  ------------------
31009|  4.15M|        case JANET_SYMBOL:
  ------------------
  |  Branch (31009:9): [True: 3.81M, False: 8.21M]
  ------------------
31010|  4.16M|        case JANET_BOOLEAN:
  ------------------
  |  Branch (31010:9): [True: 4.88k, False: 12.0M]
  ------------------
31011|  4.16M|            break;
31012|  7.86M|        default: {
  ------------------
  |  Branch (31012:9): [True: 7.86M, False: 4.16M]
  ------------------
31013|  7.86M|            Janet seenid = janet_table_get(&S->seen, x);
31014|  7.86M|            if (janet_checktype(seenid, JANET_NUMBER)) {
  ------------------
  |  |  806|  7.86M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 7.86M]
  |  |  |  Branch (806:6): [True: 7.86M, Folded]
  |  |  ------------------
  |  |  807|  7.86M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|  7.86M|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 7.86M]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 7.86M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  7.86M|        : 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31015|      0|                if (S->flags & JANET_PRETTY_COLOR) {
  ------------------
  |  | 1967|      0|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (31015:21): [True: 0, False: 0]
  ------------------
31016|      0|                    janet_buffer_push_cstring(S->buffer, janet_cycle_color);
31017|      0|                }
31018|      0|                janet_buffer_push_cstring(S->buffer, "<cycle ");
31019|      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)
  |  |  ------------------
  ------------------
31020|      0|                janet_buffer_push_u8(S->buffer, '>');
31021|      0|                if (S->flags & JANET_PRETTY_COLOR) {
  ------------------
  |  | 1967|      0|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (31021:21): [True: 0, False: 0]
  ------------------
31022|      0|                    janet_buffer_push_cstring(S->buffer, "\x1B[0m");
31023|      0|                }
31024|      0|                return;
31025|  7.86M|            } else {
31026|  7.86M|                janet_table_put(&S->seen, x, janet_wrap_integer(S->seen.count));
  ------------------
  |  |  967|  7.86M|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|  7.86M|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
31027|  7.86M|                break;
31028|  7.86M|            }
31029|  7.86M|        }
31030|  12.0M|    }
31031|       |
31032|  12.0M|    switch (janet_type(x)) {
  ------------------
  |  |  795|  12.0M|    (isnan((x).number) \
  |  |  796|  12.0M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  12.0M|        : JANET_NUMBER)
  ------------------
  |  Branch (31032:13): [True: 11.6M, False: 341k]
  ------------------
31033|  8.76M|        default: {
  ------------------
  |  Branch (31033:9): [True: 8.76M, False: 3.26M]
  ------------------
31034|  8.76M|            const char *color = janet_pretty_colors[janet_type(x)];
  ------------------
  |  |  795|  8.76M|    (isnan((x).number) \
  |  |  796|  8.76M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  8.76M|        : JANET_NUMBER)
  ------------------
  |  Branch (31034:53): [True: 8.42M, False: 341k]
  ------------------
31035|  8.76M|            if (color && (S->flags & JANET_PRETTY_COLOR)) {
  ------------------
  |  | 1967|  8.76M|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (31035:17): [True: 8.76M, False: 0]
  |  Branch (31035:26): [True: 0, False: 8.76M]
  ------------------
31036|      0|                janet_buffer_push_cstring(S->buffer, color);
31037|      0|            }
31038|  8.76M|            if (janet_checktype(x, JANET_BUFFER) && janet_unwrap_buffer(x) == S->buffer) {
  ------------------
  |  |  806|  17.5M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 14.9k, False: 8.75M]
  |  |  |  Branch (806:6): [Folded, False: 8.76M]
  |  |  ------------------
  |  |  807|  17.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|  17.5M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  8.76M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  8.76M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  8.76M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  8.76M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                          if (janet_checktype(x, JANET_BUFFER) && janet_unwrap_buffer(x) == S->buffer) {
  ------------------
  |  |  862|  14.9k|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (31038:53): [True: 0, False: 14.9k]
  ------------------
31039|      0|                int64_t new_size = (int64_t) S->buffer->count + S->bufstartlen * 4 + 3;
31040|      0|                if (new_size > INT32_MAX) janet_panic("buffer overflow");
  ------------------
  |  Branch (31040:21): [True: 0, False: 0]
  ------------------
31041|      0|                janet_buffer_ensure(S->buffer, (int32_t) new_size, 1);
31042|      0|                janet_buffer_push_u8(S->buffer, '@');
31043|       |                /* Use start len to print to self better */
31044|      0|                S->align += 1 + janet_escape_string_impl(S->buffer, S->buffer->data, S->bufstartlen);
31045|  8.76M|            } else {
31046|  8.76M|                S->align -= S->buffer->count;
31047|  8.76M|                janet_description_b(S->buffer, x);
31048|  8.76M|                S->align += S->buffer->count;
31049|  8.76M|            }
31050|  8.76M|            if (color && (S->flags & JANET_PRETTY_COLOR)) {
  ------------------
  |  | 1967|  8.76M|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (31050:17): [True: 8.76M, False: 0]
  |  Branch (31050:26): [True: 0, False: 8.76M]
  ------------------
31051|      0|                janet_buffer_push_cstring(S->buffer, "\x1B[0m");
31052|      0|            }
31053|  8.76M|            break;
31054|  8.76M|        }
31055|  42.6k|        case JANET_ARRAY:
  ------------------
  |  Branch (31055:9): [True: 42.6k, False: 11.9M]
  ------------------
31056|  2.86M|        case JANET_TUPLE: {
  ------------------
  |  Branch (31056:9): [True: 2.81M, False: 9.21M]
  ------------------
31057|  2.86M|            int32_t i = 0, len = 0;
31058|  2.86M|            const Janet *arr = NULL;
31059|  2.86M|            int isarray = janet_checktype(x, JANET_ARRAY);
  ------------------
  |  |  806|  2.86M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 2.86M]
  |  |  ------------------
  |  |  807|  2.86M|        ? 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.86M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  2.86M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  2.86M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.86M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.86M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31060|  2.86M|            janet_indexed_view(x, &arr, &len);
31061|  2.86M|            int hasbrackets = !isarray && (janet_tuple_flag(arr) & JANET_TUPLE_FLAG_BRACKETCTOR);
  ------------------
  |  | 1806|  2.81M|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1800|  2.81M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                          int hasbrackets = !isarray && (janet_tuple_flag(arr) & JANET_TUPLE_FLAG_BRACKETCTOR);
  ------------------
  |  | 1798|  2.81M|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
  |  Branch (31061:31): [True: 2.81M, False: 42.6k]
  |  Branch (31061:43): [True: 14.1k, False: 2.80M]
  ------------------
31062|  2.86M|            const char *startstr = isarray ? "@[" : hasbrackets ? "[" : "(";
  ------------------
  |  Branch (31062:36): [True: 42.6k, False: 2.81M]
  |  Branch (31062:53): [True: 14.1k, False: 2.80M]
  ------------------
31063|  2.86M|            const char endchar = isarray ? ']' : hasbrackets ? ']' : ')';
  ------------------
  |  Branch (31063:34): [True: 42.6k, False: 2.81M]
  |  Branch (31063:50): [True: 14.1k, False: 2.80M]
  ------------------
31064|  2.86M|            janet_buffer_push_cstring(S->buffer, startstr);
31065|  2.86M|            S->align += (int32_t) strlen(startstr);
31066|  2.86M|            const int align = S->leaf_align = S->align;
31067|  2.86M|            S->depth--;
31068|  2.86M|            if (S->depth == 0) {
  ------------------
  |  Branch (31068:17): [True: 0, False: 2.86M]
  ------------------
31069|      0|                janet_buffer_push_cstring(S->buffer, "...");
31070|      0|                S->align += 3;
31071|  2.86M|            } else {
31072|  2.86M|                if (len > JANET_PRETTY_ARRAY_LIMIT && !(S->flags & JANET_PRETTY_NOTRUNC)) {
  ------------------
  |  |31001|  5.72M|#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 (31072:21): [True: 0, False: 2.86M]
  |  Branch (31072:55): [True: 0, False: 0]
  ------------------
31073|      0|                    for (i = 0; i < 3; i++) {
  ------------------
  |  Branch (31073:33): [True: 0, False: 0]
  ------------------
31074|      0|                        if (i) print_newline(S, align);
  ------------------
  |  Branch (31074:29): [True: 0, False: 0]
  ------------------
31075|      0|                        janet_pretty_one(S, arr[i]);
31076|      0|                    }
31077|      0|                    print_newline(S, align);
31078|      0|                    janet_buffer_push_cstring(S->buffer, "...");
31079|      0|                    S->align += 3;
31080|      0|                    for (i = len - 3; i < len; i++) {
  ------------------
  |  Branch (31080:39): [True: 0, False: 0]
  ------------------
31081|      0|                        print_newline(S, align);
31082|      0|                        janet_pretty_one(S, arr[i]);
31083|      0|                    }
31084|  2.86M|                } else {
31085|  10.2M|                    for (i = 0; i < len; i++) {
  ------------------
  |  Branch (31085:33): [True: 7.38M, False: 2.86M]
  ------------------
31086|  7.38M|                        if (i) print_newline(S, align);
  ------------------
  |  Branch (31086:29): [True: 4.57M, False: 2.80M]
  ------------------
31087|  7.38M|                        janet_pretty_one(S, arr[i]);
31088|  7.38M|                    }
31089|  2.86M|                }
31090|  2.86M|            }
31091|  2.86M|            S->depth++;
31092|  2.86M|            janet_buffer_push_u8(S->buffer, endchar);
31093|  2.86M|            S->align++;
31094|  2.86M|            break;
31095|  42.6k|        }
31096|   232k|        case JANET_STRUCT:
  ------------------
  |  Branch (31096:9): [True: 232k, False: 11.7M]
  ------------------
31097|   402k|        case JANET_TABLE: {
  ------------------
  |  Branch (31097:9): [True: 169k, False: 11.8M]
  ------------------
31098|   402k|            int istable = janet_checktype(x, JANET_TABLE);
  ------------------
  |  |  806|   402k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 402k]
  |  |  ------------------
  |  |  807|   402k|        ? 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|   402k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   402k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   402k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   402k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   402k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31099|       |
31100|       |            /* For object-like tables, print class name */
31101|   402k|            if (istable) {
  ------------------
  |  Branch (31101:17): [True: 169k, False: 232k]
  ------------------
31102|   169k|                JanetTable *t = janet_unwrap_table(x);
  ------------------
  |  |  861|   169k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
31103|   169k|                JanetTable *proto = t->proto;
31104|   169k|                S->align++;
31105|   169k|                janet_buffer_push_cstring(S->buffer, "@");
31106|   169k|                if (NULL != proto) {
  ------------------
  |  Branch (31106:21): [True: 0, False: 169k]
  ------------------
31107|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31108|      0|                    const uint8_t *n;
31109|      0|                    int32_t len;
31110|      0|                    if (janet_bytes_view(name, &n, &len)) {
  ------------------
  |  Branch (31110:25): [True: 0, False: 0]
  ------------------
31111|      0|                        if (S->flags & JANET_PRETTY_COLOR) {
  ------------------
  |  | 1967|      0|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (31111:29): [True: 0, False: 0]
  ------------------
31112|      0|                            janet_buffer_push_cstring(S->buffer, janet_class_color);
31113|      0|                        }
31114|      0|                        janet_buffer_push_bytes(S->buffer, n, len);
31115|      0|                        S->align += len;
31116|      0|                        if (S->flags & JANET_PRETTY_COLOR) {
  ------------------
  |  | 1967|      0|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (31116:29): [True: 0, False: 0]
  ------------------
31117|      0|                            janet_buffer_push_cstring(S->buffer, "\x1B[0m");
31118|      0|                        }
31119|      0|                    }
31120|      0|                }
31121|   232k|            } else {
31122|   232k|                JanetStruct st = janet_unwrap_struct(x);
  ------------------
  |  |  857|   232k|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
31123|   232k|                JanetStruct proto = janet_struct_proto(st);
  ------------------
  |  | 1851|   232k|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1846|   232k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
31124|   232k|                if (NULL != proto) {
  ------------------
  |  Branch (31124:21): [True: 0, False: 232k]
  ------------------
31125|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31126|      0|                    const uint8_t *n;
31127|      0|                    int32_t len;
31128|      0|                    if (janet_bytes_view(name, &n, &len)) {
  ------------------
  |  Branch (31128:25): [True: 0, False: 0]
  ------------------
31129|      0|                        if (S->flags & JANET_PRETTY_COLOR) {
  ------------------
  |  | 1967|      0|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (31129:29): [True: 0, False: 0]
  ------------------
31130|      0|                            janet_buffer_push_cstring(S->buffer, janet_class_color);
31131|      0|                        }
31132|      0|                        janet_buffer_push_bytes(S->buffer, n, len);
31133|      0|                        S->align += len;
31134|      0|                        if (S->flags & JANET_PRETTY_COLOR) {
  ------------------
  |  | 1967|      0|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (31134:29): [True: 0, False: 0]
  ------------------
31135|      0|                            janet_buffer_push_cstring(S->buffer, "\x1B[0m");
31136|      0|                        }
31137|      0|                    }
31138|      0|                }
31139|   232k|            }
31140|   402k|            janet_buffer_push_u8(S->buffer, '{');
31141|   402k|            const int align = S->leaf_align = ++S->align;
31142|       |
31143|   402k|            S->depth--;
31144|   402k|            if (S->depth == 0) {
  ------------------
  |  Branch (31144:17): [True: 0, False: 402k]
  ------------------
31145|      0|                janet_buffer_push_cstring(S->buffer, "...");
31146|      0|                S->align += 3;
31147|   402k|            } else {
31148|   402k|                int32_t len = 0, cap = 0;
31149|   402k|                const JanetKV *kvs = NULL;
31150|   402k|                janet_dictionary_view(x, &kvs, &len, &cap);
31151|   402k|                int32_t ks_start = S->keysort_start;
31152|   402k|                int truncated = 0;
31153|       |
31154|       |                /* Shortcut for huge dictionaries, don't bother sorting keys */
31155|   402k|                if (len > JANET_PRETTY_DICT_KEYSORT_LIMIT) {
  ------------------
  |  |31000|   402k|#define JANET_PRETTY_DICT_KEYSORT_LIMIT 2000
  ------------------
  |  Branch (31155:21): [True: 0, False: 402k]
  ------------------
31156|      0|                    if (!(S->flags & JANET_PRETTY_NOTRUNC)) {
  ------------------
  |  | 1969|      0|#define JANET_PRETTY_NOTRUNC 4
  ------------------
  |  Branch (31156:25): [True: 0, False: 0]
  ------------------
31157|      0|                        len = JANET_PRETTY_DICT_LIMIT;
  ------------------
  |  |30999|      0|#define JANET_PRETTY_DICT_LIMIT 30
  ------------------
31158|      0|                        truncated = 1;
31159|      0|                    }
31160|      0|                    int32_t j = 0;
31161|      0|                    for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (31161:41): [True: 0, False: 0]
  ------------------
31162|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31163|      0|                        if (i) print_newline(S, align);
  ------------------
  |  Branch (31163:29): [True: 0, False: 0]
  ------------------
31164|      0|                        janet_pretty_one(S, kvs[j].key);
31165|      0|                        janet_buffer_push_u8(S->buffer, ' ');
31166|      0|                        S->align++;
31167|      0|                        janet_pretty_one(S, kvs[j].value);
31168|      0|                        j++;
31169|      0|                    }
31170|      0|                    if (truncated) {
  ------------------
  |  Branch (31170:25): [True: 0, False: 0]
  ------------------
31171|      0|                        print_newline(S, align);
31172|      0|                        janet_buffer_push_cstring(S->buffer, "...");
31173|      0|                        S->align += 3;
31174|      0|                    }
31175|   402k|                } else {
31176|       |                    /* Sorted keys dictionaries */
31177|       |
31178|       |                    /* Ensure buffer is large enough to sort keys. */
31179|   402k|                    int64_t mincap = (int64_t) len + (int64_t) ks_start;
31180|   402k|                    if (mincap > INT32_MAX) {
  ------------------
  |  Branch (31180:25): [True: 0, False: 402k]
  ------------------
31181|      0|                        truncated = 1;
31182|      0|                        len = 0;
31183|      0|                        mincap = ks_start;
31184|      0|                    }
31185|       |
31186|   402k|                    if (S->keysort_capacity < mincap) {
  ------------------
  |  Branch (31186:25): [True: 137k, False: 264k]
  ------------------
31187|   137k|                        if (mincap >= INT32_MAX / 2) {
  ------------------
  |  Branch (31187:29): [True: 0, False: 137k]
  ------------------
31188|      0|                            S->keysort_capacity = INT32_MAX;
31189|   137k|                        } else {
31190|   137k|                            S->keysort_capacity = (int32_t)(mincap * 2);
31191|   137k|                        }
31192|   137k|                        S->keysort_buffer = janet_srealloc(S->keysort_buffer, sizeof(int32_t) * S->keysort_capacity);
31193|   137k|                        if (NULL == S->keysort_buffer) {
  ------------------
  |  Branch (31193:29): [True: 0, False: 137k]
  ------------------
31194|      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]
  |  |  ------------------
  ------------------
31195|      0|                        }
31196|   137k|                    }
31197|       |
31198|   402k|                    janet_sorted_keys(kvs, cap, S->keysort_buffer == NULL ? NULL : S->keysort_buffer + ks_start);
  ------------------
  |  Branch (31198:49): [True: 52.3k, False: 349k]
  ------------------
31199|   402k|                    S->keysort_start += len;
31200|   402k|                    if (!(S->flags & JANET_PRETTY_NOTRUNC) && (len > JANET_PRETTY_DICT_LIMIT)) {
  ------------------
  |  | 1969|   402k|#define JANET_PRETTY_NOTRUNC 4
  ------------------
                                  if (!(S->flags & JANET_PRETTY_NOTRUNC) && (len > JANET_PRETTY_DICT_LIMIT)) {
  ------------------
  |  |30999|  2.39k|#define JANET_PRETTY_DICT_LIMIT 30
  ------------------
  |  Branch (31200:25): [True: 2.39k, False: 399k]
  |  Branch (31200:63): [True: 0, False: 2.39k]
  ------------------
31201|      0|                        len = JANET_PRETTY_DICT_LIMIT;
  ------------------
  |  |30999|      0|#define JANET_PRETTY_DICT_LIMIT 30
  ------------------
31202|      0|                        truncated = 1;
31203|      0|                    }
31204|       |
31205|   627k|                    for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (31205:41): [True: 225k, False: 402k]
  ------------------
31206|   225k|                        if (i) print_newline(S, align);
  ------------------
  |  Branch (31206:29): [True: 77.1k, False: 148k]
  ------------------
31207|   225k|                        int32_t j = S->keysort_buffer[i + ks_start];
31208|   225k|                        janet_pretty_one(S, kvs[j].key);
31209|   225k|                        janet_buffer_push_u8(S->buffer, ' ');
31210|   225k|                        S->align++;
31211|   225k|                        janet_pretty_one(S, kvs[j].value);
31212|   225k|                    }
31213|       |
31214|   402k|                    if (truncated) {
  ------------------
  |  Branch (31214:25): [True: 0, False: 402k]
  ------------------
31215|      0|                        print_newline(S, align);
31216|      0|                        janet_buffer_push_cstring(S->buffer, "...");
31217|      0|                        S->align += 3;
31218|      0|                    }
31219|       |
31220|   402k|                }
31221|   402k|                S->keysort_start = ks_start;
31222|   402k|            }
31223|   402k|            S->depth++;
31224|   402k|            janet_buffer_push_u8(S->buffer, '}');
31225|   402k|            S->align++;
31226|   402k|            break;
31227|   402k|        }
31228|  12.0M|    }
31229|       |    /* Remove from seen */
31230|  12.0M|    janet_table_remove(&S->seen, x);
31231|  12.0M|    return;
31232|  12.0M|}
janet.c:print_newline:
30963|  4.65M|static void print_newline(struct pretty *S, int align) {
30964|  4.65M|    int i;
30965|  4.65M|    if (S->flags & JANET_PRETTY_ONELINE) {
  ------------------
  |  | 1968|  4.65M|#define JANET_PRETTY_ONELINE 2
  ------------------
  |  Branch (30965:9): [True: 0, False: 4.65M]
  ------------------
30966|      0|        janet_buffer_push_u8(S->buffer, ' ');
30967|      0|        return;
30968|      0|    }
30969|  4.65M|    backtrack_newlines(S);
30970|  4.65M|    janet_buffer_push_u8(S->buffer, '\n');
30971|  4.65M|    S->leaf_align = S->align = align;
30972|  23.5M|    for (i = 0; i < S->align; i++) {
  ------------------
  |  Branch (30972:17): [True: 18.8M, False: 4.65M]
  ------------------
30973|  18.8M|        janet_buffer_push_u8(S->buffer, ' ');
30974|  18.8M|    }
30975|  4.65M|}
janet.c:backtrack_newlines:
30903|  8.84M|static void backtrack_newlines(const struct pretty *S) {
30904|  8.84M|    if (S->flags & JANET_PRETTY_ONELINE || S->buffer->count <= 0)
  ------------------
  |  | 1968|  17.6M|#define JANET_PRETTY_ONELINE 2
  ------------------
  |  Branch (30904:9): [True: 0, False: 8.84M]
  |  Branch (30904:44): [True: 0, False: 8.84M]
  ------------------
30905|      0|        return;
30906|  8.84M|    switch (S->buffer->data[S->buffer->count - 1]) {
30907|  1.23M|        case ')':
  ------------------
  |  Branch (30907:9): [True: 1.23M, False: 7.60M]
  ------------------
30908|  1.46M|        case '}':
  ------------------
  |  Branch (30908:9): [True: 225k, False: 8.62M]
  ------------------
30909|  1.49M|        case ']':
  ------------------
  |  Branch (30909:9): [True: 29.5k, False: 8.81M]
  ------------------
30910|  1.49M|            break;
30911|  7.35M|        default:
  ------------------
  |  Branch (30911:9): [True: 7.35M, False: 1.49M]
  ------------------
30912|  7.35M|            return;
30913|  8.84M|    }
30914|  1.49M|    int32_t removed = 0;
30915|  1.49M|    int32_t old_count = S->buffer->count;
30916|  1.49M|    int32_t offset = old_count;
30917|  1.49M|    int32_t b0 = S->lookback_barrier;
30918|  1.49M|    int32_t columns = S->width;
30919|  1.49M|    int32_t align = 0;
30920|  33.5M|    while (--offset >= b0) {
  ------------------
  |  Branch (30920:12): [True: 33.4M, False: 35.1k]
  ------------------
30921|  33.4M|        const char *s = (const char *)S->buffer->data + offset;
30922|  33.4M|        if (*s == '\n') {
  ------------------
  |  Branch (30922:13): [True: 3.12M, False: 30.3M]
  ------------------
30923|  3.12M|            if (align < S->leaf_align) {
  ------------------
  |  Branch (30923:17): [True: 1.37M, False: 1.74M]
  ------------------
30924|  1.37M|                break;
30925|  1.37M|            }
30926|  1.74M|            columns += align;
30927|  1.74M|            removed += align;
30928|  1.74M|            align = 0;
30929|  30.3M|        } else if (*s == ' ') {
  ------------------
  |  Branch (30929:20): [True: 8.50M, False: 21.8M]
  ------------------
30930|  8.50M|            align++;
30931|  21.8M|        } else {
30932|  21.8M|            align = 0;
30933|       |            /* Don't count color sequences: \x1B(0|3\d)m */
30934|  21.8M|            if (S->flags & JANET_PRETTY_COLOR && *s == 'm') {
  ------------------
  |  | 1967|  43.6M|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (30934:17): [True: 0, False: 21.8M]
  |  Branch (30934:50): [True: 0, False: 0]
  ------------------
30935|      0|                if (offset >= (3 + b0) && strncmp("\x1B[0m", s - 3, 4) == 0) {
  ------------------
  |  Branch (30935:21): [True: 0, False: 0]
  |  Branch (30935:43): [True: 0, False: 0]
  ------------------
30936|      0|                    offset -= 3;
30937|      0|                    columns++;
30938|      0|                } else if (offset >= (4 + b0) && strncmp("\x1B[3", s - 4, 3) == 0) {
  ------------------
  |  Branch (30938:28): [True: 0, False: 0]
  |  Branch (30938:50): [True: 0, False: 0]
  ------------------
30939|      0|                    offset -= 4;
30940|      0|                    columns++;
30941|      0|                }
30942|      0|            }
30943|  21.8M|        }
30944|  32.1M|        if (--columns <= 0) {
  ------------------
  |  Branch (30944:13): [True: 77.7k, False: 32.0M]
  ------------------
30945|  77.7k|            return;
30946|  77.7k|        }
30947|  32.1M|    }
30948|  1.41M|    offset++; /* Don't mess with the last newline we found */
30949|  1.41M|    janet_assert(offset >= b0, "bad buffer index");
  ------------------
  |  |  389|  1.41M|#define janet_assert(c, m) do { \
  |  |  390|  1.41M|    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: 1.41M]
  |  |  ------------------
  |  |  391|  1.41M|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 1.41M]
  |  |  ------------------
  ------------------
30950|  1.41M|    S->buffer->count -= removed;
30951|  22.2M|    for (int32_t i = offset; i < S->buffer->count; i++) {
  ------------------
  |  Branch (30951:30): [True: 20.8M, False: 1.41M]
  ------------------
30952|  20.8M|        if (S->buffer->data[offset] == '\n') {
  ------------------
  |  Branch (30952:13): [True: 1.16M, False: 19.7M]
  ------------------
30953|  1.16M|            S->buffer->data[i] = ' ';
30954|  5.11M|            while (S->buffer->data[++offset] == ' ') {
  ------------------
  |  Branch (30954:20): [True: 3.95M, False: 1.16M]
  ------------------
30955|  3.95M|                janet_assert(offset < old_count, "bad replacement of newline");
  ------------------
  |  |  389|  3.95M|#define janet_assert(c, m) do { \
  |  |  390|  3.95M|    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: 3.95M]
  |  |  ------------------
  |  |  391|  3.95M|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 3.95M]
  |  |  ------------------
  ------------------
30956|  3.95M|            }
30957|  19.7M|        } else {
30958|  19.7M|            S->buffer->data[i] = S->buffer->data[offset++];
30959|  19.7M|        }
30960|  20.8M|    }
30961|  1.41M|}
janet.c:scanformat:
31356|  8.45M|    char precision[3]) {
31357|  8.45M|    const char *p = strfrmt;
31358|       |
31359|       |    /* Parse strfrmt */
31360|  8.45M|    memset(width, '\0', 3);
31361|  8.45M|    memset(precision, '\0', 3);
31362|  8.45M|    while (*p != '\0' && strchr(FMT_FLAGS, *p) != NULL)
  ------------------
  |  |31322|  8.45M|#define FMT_FLAGS "-+ #0"
  ------------------
  |  Branch (31362:12): [True: 8.45M, False: 0]
  |  Branch (31362:26): [True: 0, False: 8.45M]
  ------------------
31363|      0|        p++; /* skip flags */
31364|  8.45M|    if ((size_t)(p - strfrmt) >= sizeof(FMT_FLAGS)) janet_panic("invalid format (repeated flags)");
  ------------------
  |  |31322|  8.45M|#define FMT_FLAGS "-+ #0"
  ------------------
  |  Branch (31364:9): [True: 0, False: 8.45M]
  ------------------
31365|  8.45M|    if (isdigit((int)(*p)))
  ------------------
  |  Branch (31365:9): [True: 0, False: 8.45M]
  ------------------
31366|      0|        width[0] = *p++; /* skip width */
31367|  8.45M|    if (isdigit((int)(*p)))
  ------------------
  |  Branch (31367:9): [True: 0, False: 8.45M]
  ------------------
31368|      0|        width[1] = *p++; /* (2 digits at most) */
31369|  8.45M|    if (*p == '.') {
  ------------------
  |  Branch (31369:9): [True: 0, False: 8.45M]
  ------------------
31370|      0|        p++;
31371|      0|        if (isdigit((int)(*p)))
  ------------------
  |  Branch (31371:13): [True: 0, False: 0]
  ------------------
31372|      0|            precision[0] = *p++; /* skip precision */
31373|      0|        if (isdigit((int)(*p)))
  ------------------
  |  Branch (31373:13): [True: 0, False: 0]
  ------------------
31374|      0|            precision[1] = *p++; /* (2 digits at most) */
31375|      0|    }
31376|  8.45M|    if (isdigit((int)(*p)))
  ------------------
  |  Branch (31376:9): [True: 0, False: 8.45M]
  ------------------
31377|      0|        janet_panic("invalid format (width or precision too long)");
31378|       |
31379|       |    /* Write to form - replace characters with fixed size stuff */
31380|  8.45M|    *(form++) = '%';
31381|  8.45M|    const char *p2 = strfrmt;
31382|  16.9M|    while (p2 <= p) {
  ------------------
  |  Branch (31382:12): [True: 8.45M, False: 8.45M]
  ------------------
31383|  8.45M|        char *loc = strchr(FMT_REPLACE_INTTYPES, *p2);
  ------------------
  |  |31323|  8.45M|#define FMT_REPLACE_INTTYPES "diouxX"
  ------------------
31384|  8.45M|        if (loc != NULL && *loc != '\0') {
  ------------------
  |  Branch (31384:13): [True: 4.23M, False: 4.21M]
  |  Branch (31384:28): [True: 4.23M, False: 0]
  ------------------
31385|  4.23M|            const char *mapping = get_fmt_mapping(*p2++);
31386|  4.23M|            size_t len = strlen(mapping);
31387|  4.23M|            memcpy(form, mapping, len);
31388|  4.23M|            form += len;
31389|  4.23M|        } else {
31390|  4.21M|            *(form++) = *(p2++);
31391|  4.21M|        }
31392|  8.45M|    }
31393|  8.45M|    *form = '\0';
31394|       |
31395|  8.45M|    return p;
31396|  8.45M|}
janet.c:get_fmt_mapping:
31344|  4.23M|static const char *get_fmt_mapping(char c) {
31345|  12.6M|    for (size_t i = 0; i < (sizeof(format_mappings) / sizeof(struct FmtMapping)); i++) {
  ------------------
  |  Branch (31345:24): [True: 12.6M, False: 0]
  ------------------
31346|  12.6M|        if (format_mappings[i].c == c)
  ------------------
  |  Branch (31346:13): [True: 4.23M, False: 8.46M]
  ------------------
31347|  4.23M|            return format_mappings[i].mapping;
31348|  12.6M|    }
31349|      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]
  |  |  ------------------
  ------------------
31350|      0|}
janet.c:bignat_zero:
34185|  15.1k|static void bignat_zero(struct BigNat *x) {
34186|  15.1k|    x->first_digit = 0;
34187|  15.1k|    x->n = 0;
34188|  15.1k|    x->cap = 0;
34189|       |    x->digits = NULL;
34190|  15.1k|}
janet.c:bignat_muladd:
34217|  45.4k|static void bignat_muladd(struct BigNat *mant, uint32_t factor, uint32_t term) {
34218|  45.4k|    int32_t i;
34219|  45.4k|    uint64_t carry = ((uint64_t) mant->first_digit) * factor + term;
34220|  45.4k|    mant->first_digit = carry % BIGNAT_BASE;
  ------------------
  |  |34174|  45.4k|#define BIGNAT_BASE 0x80000000U
  ------------------
34221|  45.4k|    carry /= BIGNAT_BASE;
  ------------------
  |  |34174|  45.4k|#define BIGNAT_BASE 0x80000000U
  ------------------
34222|   324k|    for (i = 0; i < mant->n; i++) {
  ------------------
  |  Branch (34222:17): [True: 278k, False: 45.4k]
  ------------------
34223|   278k|        carry += ((uint64_t) mant->digits[i]) * factor;
34224|   278k|        mant->digits[i] = carry % BIGNAT_BASE;
  ------------------
  |  |34174|   278k|#define BIGNAT_BASE 0x80000000U
  ------------------
34225|   278k|        carry /= BIGNAT_BASE;
  ------------------
  |  |34174|   278k|#define BIGNAT_BASE 0x80000000U
  ------------------
34226|   278k|    }
34227|  45.4k|    if (carry) bignat_append(mant, (uint32_t) carry);
  ------------------
  |  Branch (34227:9): [True: 9.69k, False: 35.7k]
  ------------------
34228|  45.4k|}
janet.c:bignat_append:
34210|  9.69k|static void bignat_append(struct BigNat *mant, uint32_t dig) {
34211|  9.69k|    bignat_extra(mant, 1)[0] = dig;
34212|  9.69k|}
janet.c:bignat_extra:
34193|  10.8k|static uint32_t *bignat_extra(struct BigNat *mant, int32_t n) {
34194|  10.8k|    int32_t oldn = mant->n;
34195|  10.8k|    int32_t newn = oldn + n;
34196|  10.8k|    if (mant->cap < newn) {
  ------------------
  |  Branch (34196:9): [True: 3.68k, False: 7.19k]
  ------------------
34197|  3.68k|        int32_t newcap = 2 * newn;
34198|  3.68k|        uint32_t *mem = janet_realloc(mant->digits, (size_t) newcap * sizeof(uint32_t));
  ------------------
  |  | 2409|  3.68k|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
34199|  3.68k|        if (NULL == mem) {
  ------------------
  |  Branch (34199:13): [True: 0, False: 3.68k]
  ------------------
34200|      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]
  |  |  ------------------
  ------------------
34201|      0|        }
34202|  3.68k|        mant->cap = newcap;
34203|  3.68k|        mant->digits = mem;
34204|  3.68k|    }
34205|  10.8k|    mant->n = newn;
34206|  10.8k|    return mant->digits + oldn;
34207|  10.8k|}
janet.c:convert:
34313|  11.6k|    int32_t exponent) {
34314|       |
34315|  11.6k|    int32_t exponent2 = 0;
34316|       |
34317|       |    /* Approximate exponent in base 2 of mant and exponent. This should get us a good estimate of the final size of the
34318|       |     * number, within * 2^32 or so. */
34319|  11.6k|    int64_t mant_exp2_approx = mant->n * 32 + 16;
34320|  11.6k|    int64_t exp_exp2_approx = (int64_t)(floor(log2(base) * exponent));
34321|  11.6k|    int64_t exp2_approx = mant_exp2_approx + exp_exp2_approx;
34322|       |
34323|       |    /* Short circuit zero, huge, and small numbers. We use the exponent range of valid IEEE754 doubles (-1022, 1023)
34324|       |     * with a healthy buffer to allow for inaccuracies in the approximation and denormailzed numbers. */
34325|  11.6k|    if (mant->n == 0 && mant->first_digit == 0)
  ------------------
  |  Branch (34325:9): [True: 11.3k, False: 310]
  |  Branch (34325:25): [True: 2.94k, False: 8.36k]
  ------------------
34326|  2.94k|        return negative ? -0.0 : 0.0;
  ------------------
  |  Branch (34326:16): [True: 61, False: 2.88k]
  ------------------
34327|  8.67k|    if (exp2_approx > 1176)
  ------------------
  |  Branch (34327:9): [True: 112, False: 8.56k]
  ------------------
34328|    112|        return negative ? -INFINITY : INFINITY;
  ------------------
  |  Branch (34328:16): [True: 18, False: 94]
  ------------------
34329|  8.56k|    if (exp2_approx < -1175)
  ------------------
  |  Branch (34329:9): [True: 76, False: 8.49k]
  ------------------
34330|     76|        return negative ? -0.0 : 0.0;
  ------------------
  |  Branch (34330:16): [True: 6, False: 70]
  ------------------
34331|       |
34332|       |    /* Final value is X = mant * base ^ exponent * 2 ^ exponent2
34333|       |     * Get exponent to zero while holding X constant. */
34334|       |
34335|       |    /* Positive exponents are simple */
34336|  30.0k|    for (; exponent > 3; exponent -= 4) bignat_muladd(mant, base * base * base * base, 0);
  ------------------
  |  Branch (34336:12): [True: 21.5k, False: 8.49k]
  ------------------
34337|  9.31k|    for (; exponent > 1; exponent -= 2) bignat_muladd(mant, base * base, 0);
  ------------------
  |  Branch (34337:12): [True: 823, False: 8.49k]
  ------------------
34338|  9.26k|    for (; exponent > 0; exponent -= 1) bignat_muladd(mant, base, 0);
  ------------------
  |  Branch (34338:12): [True: 778, False: 8.49k]
  ------------------
34339|       |
34340|       |    /* Negative exponents are tricky - we don't want to loose bits
34341|       |     * from integer division, so we need to premultiply. */
34342|  8.49k|    if (exponent < 0) {
  ------------------
  |  Branch (34342:9): [True: 1.17k, False: 7.31k]
  ------------------
34343|  1.17k|        int32_t shamt = 5 - exponent / 4;
34344|  1.17k|        bignat_lshift_n(mant, shamt);
34345|  1.17k|        exponent2 -= shamt * BIGNAT_NBIT;
  ------------------
  |  |34173|  1.17k|#define BIGNAT_NBIT 31
  ------------------
34346|  7.10k|        for (; exponent < -3; exponent += 4) bignat_div(mant, base * base * base * base);
  ------------------
  |  Branch (34346:16): [True: 5.93k, False: 1.17k]
  ------------------
34347|  1.74k|        for (; exponent < -1; exponent += 2) bignat_div(mant, base * base);
  ------------------
  |  Branch (34347:16): [True: 566, False: 1.17k]
  ------------------
34348|  1.87k|        for (; exponent <  0; exponent += 1) bignat_div(mant, base);
  ------------------
  |  Branch (34348:16): [True: 700, False: 1.17k]
  ------------------
34349|  1.17k|    }
34350|       |
34351|  8.49k|    return negative
  ------------------
  |  Branch (34351:12): [True: 939, False: 7.55k]
  ------------------
34352|  8.49k|           ? -bignat_extract(mant, exponent2)
34353|  8.49k|           : bignat_extract(mant, exponent2);
34354|  8.56k|}
janet.c:bignat_lshift_n:
34249|  1.17k|static void bignat_lshift_n(struct BigNat *mant, int n) {
34250|  1.17k|    if (!n) return;
  ------------------
  |  Branch (34250:9): [True: 0, False: 1.17k]
  ------------------
34251|  1.17k|    int32_t oldn = mant->n;
34252|  1.17k|    bignat_extra(mant, n);
34253|  1.17k|    memmove(mant->digits + n, mant->digits, sizeof(uint32_t) * oldn);
34254|  1.17k|    memset(mant->digits, 0, sizeof(uint32_t) * (n - 1));
34255|  1.17k|    mant->digits[n - 1] = mant->first_digit;
34256|  1.17k|    mant->first_digit = 0;
34257|  1.17k|}
janet.c:bignat_div:
34231|  7.19k|static void bignat_div(struct BigNat *mant, uint32_t divisor) {
34232|  7.19k|    int32_t i;
34233|  7.19k|    uint32_t quotient, remainder;
34234|  7.19k|    uint64_t dividend;
34235|  7.19k|    remainder = 0, quotient = 0;
34236|   548k|    for (i = mant->n - 1; i >= 0; i--) {
  ------------------
  |  Branch (34236:27): [True: 541k, False: 7.19k]
  ------------------
34237|   541k|        dividend = ((uint64_t)remainder * BIGNAT_BASE) + mant->digits[i];
  ------------------
  |  |34174|   541k|#define BIGNAT_BASE 0x80000000U
  ------------------
34238|   541k|        if (i < mant->n - 1) mant->digits[i + 1] = quotient;
  ------------------
  |  Branch (34238:13): [True: 533k, False: 7.19k]
  ------------------
34239|   541k|        quotient = (uint32_t)(dividend / divisor);
34240|   541k|        remainder = (uint32_t)(dividend % divisor);
34241|   541k|        mant->digits[i] = remainder;
34242|   541k|    }
34243|  7.19k|    dividend = ((uint64_t)remainder * BIGNAT_BASE) + mant->first_digit;
  ------------------
  |  |34174|  7.19k|#define BIGNAT_BASE 0x80000000U
  ------------------
34244|  7.19k|    if (mant->n && mant->digits[mant->n - 1] == 0) mant->n--;
  ------------------
  |  Branch (34244:9): [True: 7.19k, False: 0]
  |  Branch (34244:20): [True: 2.80k, False: 4.39k]
  ------------------
34245|  7.19k|    mant->first_digit = (uint32_t)(dividend / divisor);
34246|  7.19k|}
janet.c:bignat_extract:
34274|  8.49k|static double bignat_extract(struct BigNat *mant, int32_t exponent2) {
34275|  8.49k|    uint64_t top53;
34276|  8.49k|    int32_t n = mant->n;
34277|       |    /* Get most significant 53 bits from mant. Bit 52 (0 indexed) should
34278|       |     * always be 1. This is essentially a large right shift on mant.*/
34279|  8.49k|    if (n) {
  ------------------
  |  Branch (34279:9): [True: 2.41k, False: 6.07k]
  ------------------
34280|       |        /* Two or more digits */
34281|  2.41k|        uint64_t d1 = mant->digits[n - 1]; /* MSD (non-zero) */
34282|  2.41k|        uint64_t d2 = (n == 1) ? mant->first_digit : mant->digits[n - 2];
  ------------------
  |  Branch (34282:23): [True: 388, False: 2.02k]
  ------------------
34283|  2.41k|        uint64_t d3 = (n > 2) ? mant->digits[n - 3] : (n == 2) ? mant->first_digit : 0;
  ------------------
  |  Branch (34283:23): [True: 1.58k, False: 832]
  |  Branch (34283:55): [True: 444, False: 388]
  ------------------
34284|  2.41k|        int lz = clz((uint32_t) d1);
  ------------------
  |  |34260|  2.41k|#define clz(x) __builtin_clz(x)
  ------------------
34285|  2.41k|        int nbits = 32 - lz;
34286|       |        /* First get 54 bits */
34287|  2.41k|        top53 = (d2 << (54 - BIGNAT_NBIT)) + (d3 >> (2 * BIGNAT_NBIT - 54));
  ------------------
  |  |34173|  2.41k|#define BIGNAT_NBIT 31
  ------------------
                      top53 = (d2 << (54 - BIGNAT_NBIT)) + (d3 >> (2 * BIGNAT_NBIT - 54));
  ------------------
  |  |34173|  2.41k|#define BIGNAT_NBIT 31
  ------------------
34288|  2.41k|        top53 >>= nbits;
34289|  2.41k|        top53 |= (d1 << (54 - nbits));
34290|       |        /* Rounding based on lowest bit of 54 */
34291|  2.41k|        if (top53 & 1) top53++;
  ------------------
  |  Branch (34291:13): [True: 935, False: 1.47k]
  ------------------
34292|  2.41k|        top53 >>= 1;
34293|  2.41k|        if (top53 > 0x1FffffFFFFffffUL) {
  ------------------
  |  Branch (34293:13): [True: 31, False: 2.38k]
  ------------------
34294|     31|            top53 >>= 1;
34295|     31|            exponent2++;
34296|     31|        }
34297|       |        /* Correct exponent - to correct for large right shift to mantissa. */
34298|  2.41k|        exponent2 += (nbits - 53) + BIGNAT_NBIT * n;
  ------------------
  |  |34173|  2.41k|#define BIGNAT_NBIT 31
  ------------------
34299|  6.07k|    } else {
34300|       |        /* One digit */
34301|  6.07k|        top53 = mant->first_digit;
34302|  6.07k|    }
34303|  8.49k|    return ldexp((double)top53, exponent2);
34304|  8.49k|}
janet.c:scan_uint64:
34514|  2.56k|    int *neg) {
34515|  2.56k|    const uint8_t *end = str + len;
34516|  2.56k|    int seenadigit = 0;
34517|  2.56k|    int base = 10;
34518|  2.56k|    *neg = 0;
34519|  2.56k|    *out = 0;
34520|  2.56k|    uint64_t accum = 0;
34521|  2.56k|    if (len > JANET_NUMBER_LENGTH_RIDICULOUS) return 0;
  ------------------
  |  |34158|  2.56k|#define JANET_NUMBER_LENGTH_RIDICULOUS 0xFFFF
  ------------------
  |  Branch (34521:9): [True: 0, False: 2.56k]
  ------------------
34522|       |    /* Get sign */
34523|  2.56k|    if (str >= end) return 0;
  ------------------
  |  Branch (34523:9): [True: 0, False: 2.56k]
  ------------------
34524|  2.56k|    if (*str == '-') {
  ------------------
  |  Branch (34524:9): [True: 842, False: 1.72k]
  ------------------
34525|    842|        *neg = 1;
34526|    842|        str++;
34527|  1.72k|    } else if (*str == '+') {
  ------------------
  |  Branch (34527:16): [True: 110, False: 1.61k]
  ------------------
34528|    110|        str++;
34529|    110|    }
34530|       |    /* Check for leading 0x or digit digit r */
34531|  2.56k|    if (str + 1 < end && str[0] == '0' && str[1] == 'x') {
  ------------------
  |  Branch (34531:9): [True: 1.44k, False: 1.12k]
  |  Branch (34531:26): [True: 321, False: 1.11k]
  |  Branch (34531:43): [True: 29, False: 292]
  ------------------
34532|     29|        base = 16;
34533|     29|        str += 2;
34534|  2.53k|    } else if (str + 1 < end  &&
  ------------------
  |  Branch (34534:16): [True: 1.41k, False: 1.12k]
  ------------------
34535|  1.41k|               str[0] >= '0' && str[0] <= '9' &&
  ------------------
  |  Branch (34535:16): [True: 1.30k, False: 109]
  |  Branch (34535:33): [True: 1.18k, False: 113]
  ------------------
34536|  1.18k|               str[1] == 'r') {
  ------------------
  |  Branch (34536:16): [True: 46, False: 1.14k]
  ------------------
34537|     46|        base = str[0] - '0';
34538|     46|        str += 2;
34539|  2.49k|    } else if (str + 2 < end  &&
  ------------------
  |  Branch (34539:16): [True: 1.05k, False: 1.43k]
  ------------------
34540|  1.05k|               str[0] >= '0' && str[0] <= '9' &&
  ------------------
  |  Branch (34540:16): [True: 987, False: 68]
  |  Branch (34540:33): [True: 921, False: 66]
  ------------------
34541|    921|               str[1] >= '0' && str[1] <= '9' &&
  ------------------
  |  Branch (34541:16): [True: 899, False: 22]
  |  Branch (34541:33): [True: 828, False: 71]
  ------------------
34542|    828|               str[2] == 'r') {
  ------------------
  |  Branch (34542:16): [True: 101, False: 727]
  ------------------
34543|    101|        base = 10 * (str[0] - '0') + (str[1] - '0');
34544|    101|        if (base < 2 || base > 36) return 0;
  ------------------
  |  Branch (34544:13): [True: 18, False: 83]
  |  Branch (34544:25): [True: 18, False: 65]
  ------------------
34545|     65|        str += 3;
34546|     65|    }
34547|       |
34548|       |    /* Skip leading zeros */
34549|  3.85k|    while (str < end && *str == '0') {
  ------------------
  |  Branch (34549:12): [True: 3.15k, False: 699]
  |  Branch (34549:25): [True: 1.32k, False: 1.83k]
  ------------------
34550|  1.32k|        seenadigit = 1;
34551|  1.32k|        str++;
34552|  1.32k|    }
34553|       |    /* Parse significant digits */
34554|  12.7k|    while (str < end) {
  ------------------
  |  Branch (34554:12): [True: 10.7k, False: 2.01k]
  ------------------
34555|  10.7k|        if (*str == '_') {
  ------------------
  |  Branch (34555:13): [True: 441, False: 10.3k]
  ------------------
34556|    441|            if (!seenadigit) return 0;
  ------------------
  |  Branch (34556:17): [True: 54, False: 387]
  ------------------
34557|  10.3k|        } else {
34558|  10.3k|            int digit = digit_lookup[*str & 0x7F];
34559|  10.3k|            if (*str > 127 || digit >= base) return 0;
  ------------------
  |  Branch (34559:17): [True: 54, False: 10.2k]
  |  Branch (34559:31): [True: 334, False: 9.93k]
  ------------------
34560|  9.93k|            if (accum > (UINT64_MAX - digit) / base) return 0;
  ------------------
  |  Branch (34560:17): [True: 72, False: 9.86k]
  ------------------
34561|  9.86k|            accum = accum * base + digit;
34562|  9.86k|            seenadigit = 1;
34563|  9.86k|        }
34564|  10.2k|        str++;
34565|  10.2k|    }
34566|       |
34567|  2.01k|    if (!seenadigit) return 0;
  ------------------
  |  Branch (34567:9): [True: 159, False: 1.85k]
  ------------------
34568|  1.85k|    *out = accum;
34569|  1.85k|    return 1;
34570|  2.01k|}
janet.c:janet_dict_find:
  433|  90.8M|static inline const JanetKV *janet_dict_find(const JanetKV *buckets, int32_t cap, Janet key) {
  434|  90.8M|    int32_t hash;
  435|  90.8M|    if (janet_checktype(key, JANET_KEYWORD) || janet_checktype(key, JANET_SYMBOL)) {
  ------------------
  |  |  806|   181M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 29.2M, False: 61.5M]
  |  |  |  Branch (806:6): [Folded, False: 90.8M]
  |  |  ------------------
  |  |  807|   181M|        ? 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|   181M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  90.8M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  90.8M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  90.8M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  90.8M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  if (janet_checktype(key, JANET_KEYWORD) || janet_checktype(key, JANET_SYMBOL)) {
  ------------------
  |  |  806|  61.5M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 25.1M, False: 36.4M]
  |  |  |  Branch (806:6): [Folded, False: 61.5M]
  |  |  ------------------
  |  |  807|  61.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|  61.5M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  61.5M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  61.5M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  61.5M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  61.5M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  436|  54.3M|        hash = janet_string_hash(janet_unwrap_string(key));
  ------------------
  |  | 1814|  54.3M|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  ------------------
  |  |  |  | 1812|  54.3M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
  437|  54.3M|    } else if (janet_checktypes(key, JANET_TFLAG_NIL | JANET_TFLAG_STRING | JANET_TFLAG_TUPLE | JANET_TFLAG_STRUCT | JANET_TFLAG_ABSTRACT) ||
  ------------------
  |  |  969|  72.9M|#define janet_checktypes(x, tps) ((1 << janet_type(x)) & (tps))
  |  |  ------------------
  |  |  |  |  795|  36.4M|    (isnan((x).number) \
  |  |  |  |  796|  36.4M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  |  |  797|  36.4M|        : JANET_NUMBER)
  |  |  ------------------
  |  |  |  Branch (969:34): [True: 24.0M, False: 12.4M]
  |  |  ------------------
  ------------------
  |  Branch (437:16): [True: 36.1M, False: 348k]
  ------------------
  438|  24.1M|               (janet_checktype(key, JANET_NUMBER) && janet_unwrap_number(key) == 0)) {
  ------------------
  |  |  806|  24.8M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 348k, False: 12.0M]
  |  |  |  Branch (806:6): [True: 12.4M, Folded]
  |  |  ------------------
  |  |  807|  24.8M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|  12.4M|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 348k, False: 12.0M]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 12.0M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  24.8M|        : 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|   348k|#define janet_unwrap_number(x) ((x).number)
  ------------------
  |  Branch (438:55): [True: 64.9k, False: 283k]
  ------------------
  439|  24.1M|        return janet_dict_find_deep(buckets, cap, key);
  440|  24.1M|    } else {
  441|  12.3M|        hash = janet_hash(key);
  442|  12.3M|    }
  443|  66.7M|    uint32_t mask = (uint32_t) cap - 1;
  444|  66.7M|    uint32_t i = (uint32_t) hash & mask;
  445|  66.7M|    const JanetKV *first_bucket = NULL;
  446|  88.3M|    for (int32_t n = 0; n < cap; n++, i = (i + 1) & mask) {
  ------------------
  |  Branch (446:25): [True: 88.3M, False: 0]
  ------------------
  447|  88.3M|        const JanetKV *kv = buckets + i;
  448|  88.3M|        if (janet_bitwise_same(kv->key, key)) return kv;
  ------------------
  |  |  401|  88.3M|#define janet_bitwise_same(x, y) (janet_u64(x) == janet_u64(y))
  |  |  ------------------
  |  |  |  |  788|  88.3M|#define janet_u64(x) ((x).u64)
  |  |  ------------------
  |  |               #define janet_bitwise_same(x, y) (janet_u64(x) == janet_u64(y))
  |  |  ------------------
  |  |  |  |  788|  88.3M|#define janet_u64(x) ((x).u64)
  |  |  ------------------
  |  |  |  Branch (401:34): [True: 3.17M, False: 85.1M]
  |  |  ------------------
  ------------------
  449|  85.1M|        if (janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|  85.1M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 65.5M, False: 19.6M]
  |  |  |  Branch (806:6): [Folded, False: 85.1M]
  |  |  ------------------
  |  |  807|  85.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|  85.1M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  85.1M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  85.1M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  85.1M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  85.1M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  450|  65.5M|            if (janet_checktype(kv->value, JANET_NIL)) return kv;
  ------------------
  |  |  806|  65.5M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 63.5M, False: 1.99M]
  |  |  |  Branch (806:6): [Folded, False: 65.5M]
  |  |  ------------------
  |  |  807|  65.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|  65.5M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  65.5M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  65.5M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  65.5M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  65.5M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  451|  1.99M|            if (NULL == first_bucket) first_bucket = kv;
  ------------------
  |  Branch (451:17): [True: 1.34M, False: 644k]
  ------------------
  452|  1.99M|        }
  453|  85.1M|    }
  454|      0|    return first_bucket;
  455|  66.7M|}
janet.c:janet_symcache_findmem:
35042|  42.8M|    int *success) {
35043|  42.8M|    uint32_t bounds[4];
35044|  42.8M|    uint32_t i, j, index;
35045|  42.8M|    const uint8_t **firstEmpty = NULL;
35046|       |
35047|       |    /* We will search two ranges - index to the end,
35048|       |     * and 0 to the index. */
35049|  42.8M|    index = (uint32_t)hash & (janet_vm.cache_capacity - 1);
35050|  42.8M|    bounds[0] = index;
35051|  42.8M|    bounds[1] = janet_vm.cache_capacity;
35052|  42.8M|    bounds[2] = 0;
35053|  42.8M|    bounds[3] = index;
35054|  42.8M|    for (j = 0; j < 4; j += 2)
  ------------------
  |  Branch (35054:17): [True: 42.8M, False: 0]
  ------------------
35055|  66.6M|        for (i = bounds[j]; i < bounds[j + 1]; ++i) {
  ------------------
  |  Branch (35055:29): [True: 66.6M, False: 13.5k]
  ------------------
35056|  66.6M|            const uint8_t *test = janet_vm.cache[i];
35057|       |            /* Check empty spots */
35058|  66.6M|            if (NULL == test) {
  ------------------
  |  Branch (35058:17): [True: 23.7M, False: 42.8M]
  ------------------
35059|  23.7M|                if (NULL == firstEmpty)
  ------------------
  |  Branch (35059:21): [True: 23.7M, False: 0]
  ------------------
35060|  23.7M|                    firstEmpty = janet_vm.cache + i;
35061|  23.7M|                goto notfound;
35062|  23.7M|            }
35063|       |            /* Check for marked deleted */
35064|  42.8M|            if (JANET_SYMCACHE_DELETED == test) {
  ------------------
  |  Branch (35064:17): [True: 6.73k, False: 42.8M]
  ------------------
35065|  6.73k|                if (firstEmpty == NULL)
  ------------------
  |  Branch (35065:21): [True: 6.71k, False: 18]
  ------------------
35066|  6.71k|                    firstEmpty = janet_vm.cache + i;
35067|  6.73k|                continue;
35068|  6.73k|            }
35069|  42.8M|            if (janet_string_equalconst(test, str, len, hash)) {
  ------------------
  |  Branch (35069:17): [True: 19.0M, False: 23.7M]
  ------------------
35070|       |                /* Replace first deleted */
35071|  19.0M|                *success = 1;
35072|  19.0M|                if (firstEmpty != NULL) {
  ------------------
  |  Branch (35072:21): [True: 6.71k, False: 19.0M]
  ------------------
35073|  6.71k|                    *firstEmpty = test;
35074|  6.71k|                    janet_vm.cache[i] = JANET_SYMCACHE_DELETED;
35075|  6.71k|                    return firstEmpty;
35076|  6.71k|                }
35077|  19.0M|                return janet_vm.cache + i;
35078|  19.0M|            }
35079|  42.8M|        }
35080|  23.7M|notfound:
35081|  23.7M|    *success = 0;
35082|  23.7M|    janet_assert(firstEmpty != NULL, "symcache failed to get memory");
  ------------------
  |  |  389|  23.7M|#define janet_assert(c, m) do { \
  |  |  390|  23.7M|    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.7M]
  |  |  ------------------
  |  |  391|  23.7M|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 23.7M]
  |  |  ------------------
  ------------------
35083|  23.7M|    return firstEmpty;
35084|  23.7M|}
janet.c:janet_symcache_put:
35120|  13.4M|static void janet_symcache_put(const uint8_t *x, const uint8_t **bucket) {
35121|  13.4M|    if ((janet_vm.cache_count + janet_vm.cache_deleted) * 2 > janet_vm.cache_capacity) {
  ------------------
  |  Branch (35121:9): [True: 13.4k, False: 13.4M]
  ------------------
35122|  13.4k|        int status;
35123|  13.4k|        janet_cache_resize(janet_tablen((2 * janet_vm.cache_count + 1)));
35124|  13.4k|        bucket = janet_symcache_find(x, &status);
  ------------------
  |  |35087|  13.4k|    janet_symcache_findmem((str), janet_string_length(str), janet_string_hash(str), (success))
  |  |  ------------------
  |  |  |  | 1813|  13.4k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1812|  13.4k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   janet_symcache_findmem((str), janet_string_length(str), janet_string_hash(str), (success))
  |  |  ------------------
  |  |  |  | 1814|  13.4k|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1812|  13.4k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35125|  13.4k|    }
35126|       |    /* Add x to the cache */
35127|  13.4M|    janet_vm.cache_count++;
35128|  13.4M|    *bucket = x;
35129|  13.4M|}
janet.c:janet_cache_resize:
35090|  13.4k|static void janet_cache_resize(uint32_t newCapacity) {
35091|  13.4k|    uint32_t i, oldCapacity;
35092|  13.4k|    const uint8_t **oldCache = janet_vm.cache;
35093|  13.4k|    const uint8_t **newCache = janet_calloc(1, (size_t) newCapacity * sizeof(const uint8_t *));
  ------------------
  |  | 2412|  13.4k|#define janet_calloc(X, Y) calloc((X), (Y))
  ------------------
35094|  13.4k|    if (newCache == NULL) {
  ------------------
  |  Branch (35094:9): [True: 0, False: 13.4k]
  ------------------
35095|      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]
  |  |  ------------------
  ------------------
35096|      0|    }
35097|  13.4k|    oldCapacity = janet_vm.cache_capacity;
35098|  13.4k|    janet_vm.cache = newCache;
35099|  13.4k|    janet_vm.cache_capacity = newCapacity;
35100|  13.4k|    janet_vm.cache_deleted = 0;
35101|       |    /* Add all of the old cache entries back */
35102|  20.6M|    for (i = 0; i < oldCapacity; ++i) {
  ------------------
  |  Branch (35102:17): [True: 20.6M, False: 13.4k]
  ------------------
35103|  20.6M|        int status;
35104|  20.6M|        const uint8_t **bucket;
35105|  20.6M|        const uint8_t *x = oldCache[i];
35106|  20.6M|        if (x != NULL && x != JANET_SYMCACHE_DELETED) {
  ------------------
  |  Branch (35106:13): [True: 10.3M, False: 10.3M]
  |  Branch (35106:26): [True: 10.3M, False: 0]
  ------------------
35107|  10.3M|            bucket = janet_symcache_find(x, &status);
  ------------------
  |  |35087|  10.3M|    janet_symcache_findmem((str), janet_string_length(str), janet_string_hash(str), (success))
  |  |  ------------------
  |  |  |  | 1813|  10.3M|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1812|  10.3M|#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.3M|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1812|  10.3M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35108|  10.3M|            if (status || bucket == NULL) {
  ------------------
  |  Branch (35108:17): [True: 0, False: 10.3M]
  |  Branch (35108:27): [True: 0, False: 10.3M]
  ------------------
35109|       |                /* there was a problem with the algorithm. */
35110|      0|                break;
35111|      0|            }
35112|  10.3M|            *bucket = x;
35113|  10.3M|        }
35114|  20.6M|    }
35115|       |    /* Free the old cache */
35116|  13.4k|    janet_free((void *)oldCache);
  ------------------
  |  | 2415|  13.4k|#define janet_free(X) free((X))
  ------------------
35117|  13.4k|}
janet.c:janet_table_init_impl:
35261|  9.14M|static JanetTable *janet_table_init_impl(JanetTable *table, int32_t capacity, int stackalloc) {
35262|  9.14M|    JanetKV *data;
35263|  9.14M|    capacity = janet_tablen(capacity);
35264|  9.14M|    if (stackalloc) table->gc.flags = JANET_TABLE_FLAG_STACK;
  ------------------
  |  |35247|  4.19M|#define JANET_TABLE_FLAG_STACK 0x10000
  ------------------
  |  Branch (35264:9): [True: 4.19M, False: 4.95M]
  ------------------
35265|  9.14M|    if (capacity) {
  ------------------
  |  Branch (35265:9): [True: 9.14M, False: 0]
  ------------------
35266|  9.14M|        if (stackalloc) {
  ------------------
  |  Branch (35266:13): [True: 4.19M, False: 4.95M]
  ------------------
35267|  4.19M|            data = janet_memalloc_empty_local(capacity);
35268|  4.95M|        } else {
35269|  4.95M|            data = (JanetKV *) janet_memalloc_empty(capacity);
35270|  4.95M|            if (NULL == data) {
  ------------------
  |  Branch (35270:17): [True: 0, False: 4.95M]
  ------------------
35271|      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]
  |  |  ------------------
  ------------------
35272|      0|            }
35273|  4.95M|        }
35274|  9.14M|        table->data = data;
35275|  9.14M|        table->capacity = capacity;
35276|  9.14M|    } else {
35277|      0|        table->data = NULL;
35278|      0|        table->capacity = 0;
35279|      0|    }
35280|  9.14M|    table->count = 0;
35281|  9.14M|    table->deleted = 0;
35282|       |    table->proto = NULL;
35283|  9.14M|    return table;
35284|  9.14M|}
janet.c:janet_memalloc_empty_local:
35249|  4.93M|static void *janet_memalloc_empty_local(int32_t count) {
35250|  4.93M|    int32_t i;
35251|  4.93M|    void *mem = janet_smalloc((size_t) count * sizeof(JanetKV));
35252|  4.93M|    JanetKV *mmem = (JanetKV *)mem;
35253|  82.0M|    for (i = 0; i < count; i++) {
  ------------------
  |  Branch (35253:17): [True: 77.0M, False: 4.93M]
  ------------------
35254|  77.0M|        JanetKV *kv = mmem + i;
35255|  77.0M|        kv->key = janet_wrap_nil();
  ------------------
  |  |  831|  77.0M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  77.0M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  77.0M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  77.0M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35256|  77.0M|        kv->value = janet_wrap_nil();
  ------------------
  |  |  831|  77.0M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  77.0M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  77.0M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  77.0M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35257|  77.0M|    }
35258|  4.93M|    return mem;
35259|  4.93M|}
janet.c:janet_table_rehash:
35334|  4.72M|static void janet_table_rehash(JanetTable *t, int32_t size) {
35335|  4.72M|    JanetKV *olddata = t->data;
35336|  4.72M|    JanetKV *newdata;
35337|  4.72M|    int islocal = t->gc.flags & JANET_TABLE_FLAG_STACK;
  ------------------
  |  |35247|  4.72M|#define JANET_TABLE_FLAG_STACK 0x10000
  ------------------
35338|  4.72M|    if (islocal) {
  ------------------
  |  Branch (35338:9): [True: 736k, False: 3.98M]
  ------------------
35339|   736k|        newdata = (JanetKV *) janet_memalloc_empty_local(size);
35340|  3.98M|    } else {
35341|  3.98M|        newdata = (JanetKV *) janet_memalloc_empty(size);
35342|  3.98M|        if (NULL == newdata) {
  ------------------
  |  Branch (35342:13): [True: 0, False: 3.98M]
  ------------------
35343|      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]
  |  |  ------------------
  ------------------
35344|      0|        }
35345|  3.98M|    }
35346|  4.72M|    int32_t oldcapacity = t->capacity;
35347|  4.72M|    t->data = newdata;
35348|  4.72M|    t->capacity = size;
35349|  4.72M|    t->deleted = 0;
35350|  58.5M|    for (int32_t i = 0; i < oldcapacity; i++) {
  ------------------
  |  Branch (35350:25): [True: 53.8M, False: 4.72M]
  ------------------
35351|  53.8M|        JanetKV *kv = olddata + i;
35352|  53.8M|        if (!janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|  53.8M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 53.8M]
  |  |  ------------------
  |  |  807|  53.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|  53.8M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  53.8M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  53.8M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  53.8M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  53.8M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35352:13): [True: 24.2M, False: 29.6M]
  ------------------
35353|  24.2M|            JanetKV *newkv = janet_table_find(t, kv->key);
35354|  24.2M|            *newkv = *kv;
35355|  24.2M|        }
35356|  53.8M|    }
35357|  4.72M|    if (islocal) {
  ------------------
  |  Branch (35357:9): [True: 736k, False: 3.98M]
  ------------------
35358|   736k|        janet_sfree(olddata);
35359|  3.98M|    } else {
35360|  3.98M|        janet_free(olddata);
  ------------------
  |  | 2415|  3.98M|#define janet_free(X) free((X))
  ------------------
35361|  3.98M|    }
35362|  4.72M|}
janet.c:janet_check_pointer_align:
36423|  2.42M|static void janet_check_pointer_align(void *p) {
36424|  2.42M|    (void) p;
36425|       |#if defined(JANET_NANBOX_64) && JANET_NANBOX_64_POINTER_SHIFT != 0
36426|       |    union {
36427|       |        void *p;
36428|       |        uintptr_t u;
36429|       |    } un;
36430|       |    un.p = p;
36431|       |    janet_assert(!(un.u & (uintptr_t)((1 << JANET_NANBOX_64_POINTER_SHIFT) - 1)),
36432|       |                 "unaligned pointer wrap - cfunction pointers and abstract types must be aligned with this nanboxing configuration.");
36433|       |#endif
36434|  2.42M|}
janet.c:janet_equals_containers:
37334|  3.27M|static int janet_equals_containers(Janet x, Janet y) {
37335|  3.27M|    janet_vm.traversal = janet_vm.traversal_base;
37336|  3.29M|    do {
37337|  3.29M|        if (janet_type(x) != janet_type(y)) return 0;
  ------------------
  |  |  795|  3.29M|    (isnan((x).number) \
  |  |  796|  3.29M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  3.29M|        : JANET_NUMBER)
  ------------------
                      if (janet_type(x) != janet_type(y)) return 0;
  ------------------
  |  |  795|  3.29M|    (isnan((x).number) \
  |  |  796|  3.29M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  3.29M|        : JANET_NUMBER)
  ------------------
  |  Branch (37337:13): [True: 3.29M, False: 370]
  |  Branch (37337:13): [True: 311, False: 3.29M]
  |  Branch (37337:30): [True: 3.29M, False: 148]
  ------------------
37338|  3.29M|        switch (janet_type(x)) {
  ------------------
  |  |  795|  3.29M|    (isnan((x).number) \
  |  |  796|  3.29M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  3.29M|        : JANET_NUMBER)
  ------------------
  |  Branch (37338:17): [True: 3.29M, False: 146]
  ------------------
37339|  7.81k|            default:
  ------------------
  |  Branch (37339:13): [True: 7.81k, False: 3.28M]
  ------------------
37340|  7.81k|                if (!janet_equals_leaf(x, y)) return 0;
  ------------------
  |  Branch (37340:21): [True: 65, False: 7.75k]
  ------------------
37341|  7.75k|                break;
37342|  3.28M|            case JANET_TUPLE: {
  ------------------
  |  Branch (37342:13): [True: 3.28M, False: 8.96k]
  ------------------
37343|  3.28M|                const Janet *t1 = janet_unwrap_tuple(x);
  ------------------
  |  |  858|  3.28M|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
37344|  3.28M|                const Janet *t2 = janet_unwrap_tuple(y);
  ------------------
  |  |  858|  3.28M|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
37345|  3.28M|                if (t1 == t2) break;
  ------------------
  |  Branch (37345:21): [True: 0, False: 3.28M]
  ------------------
37346|  3.28M|                if (JANET_TUPLE_FLAG_BRACKETCTOR & (janet_tuple_flag(t1) ^ janet_tuple_flag(t2))) return 0;
  ------------------
  |  | 1798|  3.28M|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
                              if (JANET_TUPLE_FLAG_BRACKETCTOR & (janet_tuple_flag(t1) ^ janet_tuple_flag(t2))) return 0;
  ------------------
  |  | 1806|  3.28M|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1800|  3.28M|#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|  3.28M|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1800|  3.28M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (37346:21): [True: 4.72k, False: 3.27M]
  ------------------
37347|  3.27M|                if (janet_tuple_hash(t1) != janet_tuple_hash(t2)) return 0;
  ------------------
  |  | 1803|  3.27M|#define janet_tuple_hash(t) (janet_tuple_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1800|  3.27M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                              if (janet_tuple_hash(t1) != janet_tuple_hash(t2)) return 0;
  ------------------
  |  | 1803|  3.27M|#define janet_tuple_hash(t) (janet_tuple_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1800|  3.27M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (37347:21): [True: 3.27M, False: 7.16k]
  ------------------
37348|  7.16k|                if (janet_tuple_length(t1) != janet_tuple_length(t2)) return 0;
  ------------------
  |  | 1802|  7.16k|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1800|  7.16k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                              if (janet_tuple_length(t1) != janet_tuple_length(t2)) return 0;
  ------------------
  |  | 1802|  7.16k|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1800|  7.16k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (37348:21): [True: 0, False: 7.16k]
  ------------------
37349|  7.16k|                push_traversal_node(janet_tuple_head(t1), janet_tuple_head(t2), 0);
  ------------------
  |  | 1800|  7.16k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  ------------------
                              push_traversal_node(janet_tuple_head(t1), janet_tuple_head(t2), 0);
  ------------------
  |  | 1800|  7.16k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  ------------------
37350|  7.16k|                break;
37351|  7.16k|            }
37352|  1.14k|            case JANET_STRUCT: {
  ------------------
  |  Branch (37352:13): [True: 1.14k, False: 3.29M]
  ------------------
37353|  1.14k|                const JanetKV *s1 = janet_unwrap_struct(x);
  ------------------
  |  |  857|  1.14k|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
37354|  1.14k|                const JanetKV *s2 = janet_unwrap_struct(y);
  ------------------
  |  |  857|  1.14k|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
37355|  1.14k|                if (s1 == s2) break;
  ------------------
  |  Branch (37355:21): [True: 0, False: 1.14k]
  ------------------
37356|  1.14k|                if (janet_struct_hash(s1) != janet_struct_hash(s2)) return 0;
  ------------------
  |  | 1850|  1.14k|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1846|  1.14k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                              if (janet_struct_hash(s1) != janet_struct_hash(s2)) return 0;
  ------------------
  |  | 1850|  1.14k|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1846|  1.14k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (37356:21): [True: 1.01k, False: 127]
  ------------------
37357|    127|                if (janet_struct_length(s1) != janet_struct_length(s2)) return 0;
  ------------------
  |  | 1848|    127|#define janet_struct_length(t) (janet_struct_head(t)->length)
  |  |  ------------------
  |  |  |  | 1846|    127|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                              if (janet_struct_length(s1) != janet_struct_length(s2)) return 0;
  ------------------
  |  | 1848|    127|#define janet_struct_length(t) (janet_struct_head(t)->length)
  |  |  ------------------
  |  |  |  | 1846|    127|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (37357:21): [True: 0, False: 127]
  ------------------
37358|    127|                if (janet_struct_proto(s1) && !janet_struct_proto(s2)) return 0;
  ------------------
  |  | 1851|    254|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1846|    127|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  |  |  |  Branch (1851:31): [True: 0, False: 127]
  |  |  ------------------
  ------------------
                              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 (37358:47): [True: 0, False: 0]
  ------------------
37359|    127|                if (!janet_struct_proto(s1) && janet_struct_proto(s2)) return 0;
  ------------------
  |  | 1851|    254|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1846|    127|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                              if (!janet_struct_proto(s1) && janet_struct_proto(s2)) return 0;
  ------------------
  |  | 1851|    127|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1846|    127|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  |  |  |  Branch (1851:31): [True: 0, False: 127]
  |  |  ------------------
  ------------------
  |  Branch (37359:21): [True: 127, False: 0]
  ------------------
37360|    127|                push_traversal_node(janet_struct_head(s1), janet_struct_head(s2), 0);
  ------------------
  |  | 1846|    127|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  ------------------
                              push_traversal_node(janet_struct_head(s1), janet_struct_head(s2), 0);
  ------------------
  |  | 1846|    127|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  ------------------
37361|    127|                break;
37362|    127|            }
37363|  3.29M|        }
37364|  3.29M|    } while (!traversal_next(&x, &y));
  ------------------
  |  Branch (37364:14): [True: 14.6k, False: 396]
  ------------------
37365|    396|    return 1;
37366|  3.27M|}
janet.c:janet_equals_leaf:
37321|  10.4k|static int janet_equals_leaf(Janet x, Janet y) {
37322|  10.4k|    switch (janet_type(x)) {
  ------------------
  |  |  795|  10.4k|    (isnan((x).number) \
  |  |  796|  10.4k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  10.4k|        : JANET_NUMBER)
  ------------------
  |  Branch (37322:13): [True: 10.0k, False: 429]
  ------------------
37323|    429|        case JANET_NUMBER:
  ------------------
  |  Branch (37323:9): [True: 429, False: 10.0k]
  ------------------
37324|    429|            return janet_unwrap_number(x) == janet_unwrap_number(y);
  ------------------
  |  |  839|    429|#define janet_unwrap_number(x) ((x).number)
  ------------------
                          return janet_unwrap_number(x) == janet_unwrap_number(y);
  ------------------
  |  |  839|    429|#define janet_unwrap_number(x) ((x).number)
  ------------------
37325|  2.09k|        case JANET_STRING:
  ------------------
  |  Branch (37325:9): [True: 2.09k, False: 8.33k]
  ------------------
37326|  2.09k|            return janet_string_equal(janet_unwrap_string(x), janet_unwrap_string(y));
  ------------------
  |  |  863|  2.09k|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
                          return janet_string_equal(janet_unwrap_string(x), janet_unwrap_string(y));
  ------------------
  |  |  863|  2.09k|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
37327|    398|        case JANET_ABSTRACT:
  ------------------
  |  Branch (37327:9): [True: 398, False: 10.0k]
  ------------------
37328|    398|            return !janet_compare_abstract(janet_unwrap_abstract(x), janet_unwrap_abstract(y));
  ------------------
  |  |  866|    398|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
                          return !janet_compare_abstract(janet_unwrap_abstract(x), janet_unwrap_abstract(y));
  ------------------
  |  |  866|    398|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
37329|  7.51k|        default:
  ------------------
  |  Branch (37329:9): [True: 7.51k, False: 2.92k]
  ------------------
37330|  7.51k|            return janet_bitwise_same(x, y);
  ------------------
  |  |  401|  7.51k|#define janet_bitwise_same(x, y) (janet_u64(x) == janet_u64(y))
  |  |  ------------------
  |  |  |  |  788|  7.51k|#define janet_u64(x) ((x).u64)
  |  |  ------------------
  |  |               #define janet_bitwise_same(x, y) (janet_u64(x) == janet_u64(y))
  |  |  ------------------
  |  |  |  |  788|  7.51k|#define janet_u64(x) ((x).u64)
  |  |  ------------------
  ------------------
37331|  10.4k|    }
37332|  10.4k|}
janet.c:murmur64:
37374|  21.9M|static uint64_t murmur64(uint64_t h) {
37375|  21.9M|    h ^= h >> 33;
37376|  21.9M|    h *= 0xff51afd7ed558ccdUL;
37377|  21.9M|    h ^= h >> 33;
37378|  21.9M|    h *= 0xc4ceb9fe1a85ec53UL;
37379|  21.9M|    h ^= h >> 33;
37380|  21.9M|    return h;
37381|  21.9M|}
janet.c:janet_compare_abstract:
37307|  23.4k|static int janet_compare_abstract(JanetAbstract xx, JanetAbstract yy) {
37308|  23.4k|    if (xx == yy) return 0;
  ------------------
  |  Branch (37308:9): [True: 0, False: 23.4k]
  ------------------
37309|  23.4k|    const JanetAbstractType *xt = janet_abstract_type(xx);
  ------------------
  |  | 1899|  23.4k|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|  23.4k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
37310|  23.4k|    const JanetAbstractType *yt = janet_abstract_type(yy);
  ------------------
  |  | 1899|  23.4k|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|  23.4k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
37311|  23.4k|    if (xt != yt) {
  ------------------
  |  Branch (37311:9): [True: 12.6k, False: 10.7k]
  ------------------
37312|  12.6k|        return xt > yt ? 1 : -1;
  ------------------
  |  Branch (37312:16): [True: 7.54k, False: 5.12k]
  ------------------
37313|  12.6k|    }
37314|  10.7k|    if (xt->compare == NULL) {
  ------------------
  |  Branch (37314:9): [True: 61, False: 10.7k]
  ------------------
37315|     61|        return xx > yy ? 1 : -1;
  ------------------
  |  Branch (37315:16): [True: 8, False: 53]
  ------------------
37316|     61|    }
37317|  10.7k|    return xt->compare(xx, yy);
37318|  10.7k|}
janet.c:push_traversal_node:
37105|  19.4k|static void push_traversal_node(void *lhs, void *rhs, int32_t index2) {
37106|  19.4k|    JanetTraversalNode node;
37107|  19.4k|    node.self = (JanetGCObject *) lhs;
37108|  19.4k|    node.other = (JanetGCObject *) rhs;
37109|  19.4k|    node.index = 0;
37110|  19.4k|    node.index2 = index2;
37111|  19.4k|    int is_new = janet_vm.traversal_base == NULL;
37112|  19.4k|    if (is_new || (janet_vm.traversal + 1 >= janet_vm.traversal_top)) {
  ------------------
  |  Branch (37112:9): [True: 370, False: 19.1k]
  |  Branch (37112:19): [True: 0, False: 19.1k]
  ------------------
37113|    370|        size_t oldsize = is_new ? 0 : (janet_vm.traversal - janet_vm.traversal_base);
  ------------------
  |  Branch (37113:26): [True: 370, False: 0]
  ------------------
37114|    370|        size_t newsize = 2 * oldsize + 1;
37115|    370|        if (newsize < 128) {
  ------------------
  |  Branch (37115:13): [True: 370, False: 0]
  ------------------
37116|    370|            newsize = 128;
37117|    370|        }
37118|    370|        JanetTraversalNode *tn = janet_realloc(janet_vm.traversal_base, newsize * sizeof(JanetTraversalNode));
  ------------------
  |  | 2409|    370|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
37119|    370|        if (tn == NULL) {
  ------------------
  |  Branch (37119:13): [True: 0, False: 370]
  ------------------
37120|      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]
  |  |  ------------------
  ------------------
37121|      0|        }
37122|    370|        janet_vm.traversal_base = tn;
37123|    370|        janet_vm.traversal_top = janet_vm.traversal_base + newsize;
37124|    370|        janet_vm.traversal = janet_vm.traversal_base + oldsize;
37125|    370|    }
37126|  19.4k|    *(++janet_vm.traversal) = node;
37127|  19.4k|}
janet.c:traversal_next:
37137|  39.5k|static int traversal_next(Janet *x, Janet *y) {
37138|  39.5k|    JanetTraversalNode *t = janet_vm.traversal;
37139|  40.9k|    while (t && t > janet_vm.traversal_base) {
  ------------------
  |  Branch (37139:12): [True: 40.4k, False: 499]
  |  Branch (37139:17): [True: 39.5k, False: 919]
  ------------------
37140|  39.5k|        JanetGCObject *self = t->self;
37141|  39.5k|        JanetTupleHead *tself = (JanetTupleHead *)self;
37142|  39.5k|        JanetStructHead *sself = (JanetStructHead *)self;
37143|  39.5k|        JanetGCObject *other = t->other;
37144|  39.5k|        JanetTupleHead *tother = (JanetTupleHead *)other;
37145|  39.5k|        JanetStructHead *sother = (JanetStructHead *)other;
37146|  39.5k|        if ((self->flags & JANET_MEM_TYPEBITS) == JANET_MEMORY_TUPLE) {
  ------------------
  |  |  675|  39.5k|#define JANET_MEM_TYPEBITS 0xFF
  ------------------
  |  Branch (37146:13): [True: 37.5k, False: 1.99k]
  ------------------
37147|       |            /* Node is a tuple at index t->index */
37148|  37.5k|            if (t->index < tself->length && t->index < tother->length) {
  ------------------
  |  Branch (37148:17): [True: 36.5k, False: 911]
  |  Branch (37148:45): [True: 36.5k, False: 37]
  ------------------
37149|  36.5k|                int32_t index = t->index++;
37150|  36.5k|                *x = tself->data[index];
37151|  36.5k|                *y = tother->data[index];
37152|  36.5k|                janet_vm.traversal = t;
37153|  36.5k|                return 0;
37154|  36.5k|            }
37155|    948|            if (t->index2 && tself->length != tother->length) {
  ------------------
  |  Branch (37155:17): [True: 358, False: 590]
  |  Branch (37155:30): [True: 66, False: 292]
  ------------------
37156|     66|                return tself->length > tother->length ? 3 : 1;
  ------------------
  |  Branch (37156:24): [True: 37, False: 29]
  ------------------
37157|     66|            }
37158|  1.99k|        } else {
37159|       |            /* Node is a struct at index t->index: if t->index2 is true, we should return the values. */
37160|  1.99k|            if (t->index2) {
  ------------------
  |  Branch (37160:17): [True: 769, False: 1.22k]
  ------------------
37161|    769|                t->index2 = 0;
37162|    769|                int32_t index = t->index++;
37163|    769|                *x = sself->data[index].value;
37164|    769|                *y = sother->data[index].value;
37165|    769|                janet_vm.traversal = t;
37166|    769|                return 0;
37167|    769|            }
37168|  1.22k|            for (int32_t i = t->index; i < sself->capacity; i++) {
  ------------------
  |  Branch (37168:40): [True: 769, False: 457]
  ------------------
37169|    769|                t->index2 = 1;
37170|    769|                *x = sself->data[t->index].key;
37171|    769|                *y = sother->data[t->index].key;
37172|    769|                janet_vm.traversal = t;
37173|    769|                return 0;
37174|    769|            }
37175|       |            /* Traverse prototype */
37176|    457|            JanetStruct sproto = sself->proto;
37177|    457|            JanetStruct oproto = sother->proto;
37178|    457|            if (sproto && !oproto) return 3;
  ------------------
  |  Branch (37178:17): [True: 0, False: 457]
  |  Branch (37178:27): [True: 0, False: 0]
  ------------------
37179|    457|            if (!sproto && oproto) return 1;
  ------------------
  |  Branch (37179:17): [True: 457, False: 0]
  |  Branch (37179:28): [True: 0, False: 457]
  ------------------
37180|    457|            if (oproto && sproto) {
  ------------------
  |  Branch (37180:17): [True: 0, False: 457]
  |  Branch (37180:27): [True: 0, False: 0]
  ------------------
37181|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37182|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37183|      0|                janet_vm.traversal = t - 1;
37184|      0|                return 0;
37185|      0|            }
37186|    457|        }
37187|  1.33k|        t--;
37188|  1.33k|    }
37189|  1.41k|    janet_vm.traversal = t;
37190|  1.41k|    return 2;
37191|  39.5k|}

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

