janet_abstract_begin:
 1366|  27.4k|void *janet_abstract_begin(const JanetAbstractType *atype, size_t size) {
 1367|  27.4k|    JanetAbstractHead *header = janet_gcalloc(JANET_MEMORY_NONE,
 1368|  27.4k|        sizeof(JanetAbstractHead) + size);
 1369|  27.4k|    header->size = size;
 1370|  27.4k|    header->type = atype;
 1371|  27.4k|    return (void *) & (header->data);
 1372|  27.4k|}
janet_abstract_end:
 1374|  27.4k|void *janet_abstract_end(void *x) {
 1375|  27.4k|    janet_gc_settype((void *)(janet_abstract_head(x)), JANET_MEMORY_ABSTRACT);
  ------------------
  |  |  656|  27.4k|#define janet_gc_settype(m, t) ((janet_gc_header(m)->flags |= (0xFF & (t))))
  |  |  ------------------
  |  |  |  |  650|  27.4k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  ------------------
 1376|  27.4k|    return x;
 1377|  27.4k|}
janet_abstract:
 1379|  27.4k|void *janet_abstract(const JanetAbstractType *atype, size_t size) {
 1380|  27.4k|    return janet_abstract_end(janet_abstract_begin(atype, size));
 1381|  27.4k|}
janet_array:
 1604|  25.6k|JanetArray *janet_array(int32_t capacity) {
 1605|  25.6k|    JanetArray *array = janet_gcalloc(JANET_MEMORY_ARRAY, sizeof(JanetArray));
 1606|  25.6k|    janet_array_impl(array, capacity);
 1607|  25.6k|    return array;
 1608|  25.6k|}
janet_array_ensure:
 1631|   323M|void janet_array_ensure(JanetArray *array, int32_t capacity, int32_t growth) {
 1632|   323M|    Janet *newData;
 1633|   323M|    Janet *old = array->data;
 1634|   323M|    if (capacity <= array->capacity) return;
  ------------------
  |  Branch (1634:9): [True: 323M, False: 6.94k]
  ------------------
 1635|  6.94k|    int64_t new_capacity = ((int64_t) capacity) * growth;
 1636|  6.94k|    if (new_capacity > MAX_ARRAY_CAPACITY) new_capacity = MAX_ARRAY_CAPACITY;
  ------------------
  |  | 1584|  6.94k|#define MAX_ARRAY_CAPACITY INT32_MAX
  ------------------
                  if (new_capacity > MAX_ARRAY_CAPACITY) new_capacity = MAX_ARRAY_CAPACITY;
  ------------------
  |  | 1584|      0|#define MAX_ARRAY_CAPACITY INT32_MAX
  ------------------
  |  Branch (1636:9): [True: 0, False: 6.94k]
  ------------------
 1637|  6.94k|    capacity = (int32_t) new_capacity;
 1638|  6.94k|    newData = janet_realloc(old, capacity * sizeof(Janet));
  ------------------
  |  | 2409|  6.94k|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
 1639|  6.94k|    if (NULL == newData) {
  ------------------
  |  Branch (1639:9): [True: 0, False: 6.94k]
  ------------------
 1640|      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]
  |  |  ------------------
  ------------------
 1641|      0|    }
 1642|  6.94k|    janet_vm.next_collection += (capacity - array->capacity) * sizeof(Janet);
 1643|  6.94k|    array->data = newData;
 1644|  6.94k|    array->capacity = capacity;
 1645|  6.94k|}
janet_array_push:
 1662|   323M|void janet_array_push(JanetArray *array, Janet x) {
 1663|   323M|    if (array->count == MAX_ARRAY_CAPACITY) {
  ------------------
  |  | 1584|   323M|#define MAX_ARRAY_CAPACITY INT32_MAX
  ------------------
  |  Branch (1663:9): [True: 0, False: 323M]
  ------------------
 1664|      0|        janet_panic("array overflow");
 1665|      0|    }
 1666|   323M|    int32_t newcount = array->count + 1;
 1667|   323M|    janet_array_ensure(array, newcount, 2);
 1668|   323M|    array->data[array->count] = x;
 1669|   323M|    array->count = newcount;
 1670|   323M|}
janet_lib_array:
 1962|  6.86k|void janet_lib_array(JanetTable *env) {
 1963|  6.86k|    JanetRegExt array_cfuns[] = {
 1964|  6.86k|        JANET_CORE_REG("array/new", cfun_array_new),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1965|  6.86k|        JANET_CORE_REG("array/weak", cfun_array_weak),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1966|  6.86k|        JANET_CORE_REG("array/new-filled", cfun_array_new_filled),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1967|  6.86k|        JANET_CORE_REG("array/fill", cfun_array_fill),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1968|  6.86k|        JANET_CORE_REG("array/pop", cfun_array_pop),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1969|  6.86k|        JANET_CORE_REG("array/peek", cfun_array_peek),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1970|  6.86k|        JANET_CORE_REG("array/push", cfun_array_push),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1971|  6.86k|        JANET_CORE_REG("array/ensure", cfun_array_ensure),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1972|  6.86k|        JANET_CORE_REG("array/slice", cfun_array_slice),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1973|  6.86k|        JANET_CORE_REG("array/concat", cfun_array_concat),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1974|  6.86k|        JANET_CORE_REG("array/insert", cfun_array_insert),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1975|  6.86k|        JANET_CORE_REG("array/remove", cfun_array_remove),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1976|  6.86k|        JANET_CORE_REG("array/trim", cfun_array_trim),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1977|  6.86k|        JANET_CORE_REG("array/clear", cfun_array_clear),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1978|  6.86k|        JANET_CORE_REG("array/join", cfun_array_join),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1979|  6.86k|        JANET_REG_END
  ------------------
  |  | 2110|  6.86k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
 1980|  6.86k|    };
 1981|       |    janet_core_cfuns_ext(env, NULL, array_cfuns);
 1982|  6.86k|}
janet_lib_asm:
 3136|  6.86k|void janet_lib_asm(JanetTable *env) {
 3137|  6.86k|    JanetRegExt asm_cfuns[] = {
 3138|  6.86k|        JANET_CORE_REG("asm", cfun_asm),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3139|  6.86k|        JANET_CORE_REG("disasm", cfun_disasm),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3140|  6.86k|        JANET_REG_END
  ------------------
  |  | 2110|  6.86k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
 3141|  6.86k|    };
 3142|       |    janet_core_cfuns_ext(env, NULL, asm_cfuns);
 3143|  6.86k|}
janet_buffer_init:
 3204|  16.6M|JanetBuffer *janet_buffer_init(JanetBuffer *buffer, int32_t capacity) {
 3205|  16.6M|    janet_buffer_init_impl(buffer, capacity);
 3206|  16.6M|    buffer->gc.data.next = NULL;
 3207|  16.6M|    buffer->gc.flags = JANET_MEM_DISABLED;
  ------------------
  |  |  654|  16.6M|#define JANET_MEM_DISABLED 0x200
  ------------------
 3208|  16.6M|    return buffer;
 3209|  16.6M|}
janet_buffer_deinit:
 3224|  16.6M|void janet_buffer_deinit(JanetBuffer *buffer) {
 3225|  16.6M|    if (!(buffer->gc.flags & JANET_BUFFER_FLAG_NO_REALLOC)) {
  ------------------
  |  | 1780|  16.6M|#define JANET_BUFFER_FLAG_NO_REALLOC 0x10000
  ------------------
  |  Branch (3225:9): [True: 16.6M, False: 0]
  ------------------
 3226|  16.6M|        janet_free(buffer->data);
  ------------------
  |  | 2415|  16.6M|#define janet_free(X) free((X))
  ------------------
 3227|       |        buffer->data = NULL;
 3228|  16.6M|    }
 3229|  16.6M|}
janet_buffer:
 3232|  13.3k|JanetBuffer *janet_buffer(int32_t capacity) {
 3233|  13.3k|    JanetBuffer *buffer = janet_gcalloc(JANET_MEMORY_BUFFER, sizeof(JanetBuffer));
 3234|  13.3k|    return janet_buffer_init_impl(buffer, capacity);
 3235|  13.3k|}
janet_buffer_extra:
 3268|   405M|void janet_buffer_extra(JanetBuffer *buffer, int32_t n) {
 3269|       |    /* Check for buffer overflow */
 3270|   405M|    if ((int64_t)n + buffer->count > INT32_MAX) {
  ------------------
  |  Branch (3270:9): [True: 0, False: 405M]
  ------------------
 3271|      0|        janet_panic("buffer overflow");
 3272|      0|    }
 3273|   405M|    int32_t new_size = buffer->count + n;
 3274|   405M|    if (new_size > buffer->capacity) {
  ------------------
  |  Branch (3274:9): [True: 18.7M, False: 386M]
  ------------------
 3275|  18.7M|        janet_buffer_can_realloc(buffer);
 3276|  18.7M|        int32_t new_capacity = (new_size > (INT32_MAX / 2)) ? INT32_MAX : (new_size * 2);
  ------------------
  |  Branch (3276:32): [True: 0, False: 18.7M]
  ------------------
 3277|  18.7M|        uint8_t *new_data = janet_realloc(buffer->data, new_capacity * sizeof(uint8_t));
  ------------------
  |  | 2409|  18.7M|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
 3278|  18.7M|        janet_gcpressure(new_capacity - buffer->capacity);
 3279|  18.7M|        if (NULL == new_data) {
  ------------------
  |  Branch (3279:13): [True: 0, False: 18.7M]
  ------------------
 3280|      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]
  |  |  ------------------
  ------------------
 3281|      0|        }
 3282|  18.7M|        buffer->data = new_data;
 3283|  18.7M|        buffer->capacity = new_capacity;
 3284|  18.7M|    }
 3285|   405M|}
janet_buffer_push_cstring:
 3288|  15.6M|void janet_buffer_push_cstring(JanetBuffer *buffer, const char *cstring) {
 3289|  15.6M|    int32_t len = (int32_t) strlen(cstring);
 3290|  15.6M|    janet_buffer_push_bytes(buffer, (const uint8_t *) cstring, len);
 3291|  15.6M|}
janet_buffer_push_bytes:
 3294|   110M|void janet_buffer_push_bytes(JanetBuffer *buffer, const uint8_t *string, int32_t length) {
 3295|   110M|    if (0 == length) return;
  ------------------
  |  Branch (3295:9): [True: 23.8M, False: 86.4M]
  ------------------
 3296|  86.4M|    janet_buffer_extra(buffer, length);
 3297|  86.4M|    memcpy(buffer->data + buffer->count, string, length);
 3298|  86.4M|    buffer->count += length;
 3299|  86.4M|}
janet_buffer_push_u8:
 3306|   258M|void janet_buffer_push_u8(JanetBuffer *buffer, uint8_t byte) {
 3307|   258M|    janet_buffer_extra(buffer, 1);
 3308|   258M|    buffer->data[buffer->count] = byte;
 3309|   258M|    buffer->count++;
 3310|   258M|}
janet_lib_buffer:
 3830|  6.86k|void janet_lib_buffer(JanetTable *env) {
 3831|  6.86k|    JanetRegExt buffer_cfuns[] = {
 3832|  6.86k|        JANET_CORE_REG("buffer/new", cfun_buffer_new),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3833|  6.86k|        JANET_CORE_REG("buffer/new-filled", cfun_buffer_new_filled),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3834|  6.86k|        JANET_CORE_REG("buffer/from-bytes", cfun_buffer_frombytes),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3835|  6.86k|        JANET_CORE_REG("buffer/fill", cfun_buffer_fill),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3836|  6.86k|        JANET_CORE_REG("buffer/trim", cfun_buffer_trim),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3837|  6.86k|        JANET_CORE_REG("buffer/push-byte", cfun_buffer_u8),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3838|  6.86k|        JANET_CORE_REG("buffer/push-word", cfun_buffer_word),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3839|  6.86k|        JANET_CORE_REG("buffer/push-string", cfun_buffer_chars),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3840|  6.86k|        JANET_CORE_REG("buffer/push-uint16", cfun_buffer_push_uint16),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3841|  6.86k|        JANET_CORE_REG("buffer/push-uint32", cfun_buffer_push_uint32),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3842|  6.86k|        JANET_CORE_REG("buffer/push-uint64", cfun_buffer_push_uint64),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3843|  6.86k|        JANET_CORE_REG("buffer/push-float32", cfun_buffer_push_float32),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3844|  6.86k|        JANET_CORE_REG("buffer/push-float64", cfun_buffer_push_float64),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3845|  6.86k|        JANET_CORE_REG("buffer/push", cfun_buffer_push),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3846|  6.86k|        JANET_CORE_REG("buffer/push-at", cfun_buffer_push_at),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3847|  6.86k|        JANET_CORE_REG("buffer/popn", cfun_buffer_popn),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3848|  6.86k|        JANET_CORE_REG("buffer/clear", cfun_buffer_clear),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3849|  6.86k|        JANET_CORE_REG("buffer/slice", cfun_buffer_slice),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3850|  6.86k|        JANET_CORE_REG("buffer/bit-set", cfun_buffer_bitset),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3851|  6.86k|        JANET_CORE_REG("buffer/bit-clear", cfun_buffer_bitclear),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3852|  6.86k|        JANET_CORE_REG("buffer/bit", cfun_buffer_bitget),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3853|  6.86k|        JANET_CORE_REG("buffer/bit-toggle", cfun_buffer_bittoggle),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3854|  6.86k|        JANET_CORE_REG("buffer/blit", cfun_buffer_blit),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3855|  6.86k|        JANET_CORE_REG("buffer/format", cfun_buffer_format),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3856|  6.86k|        JANET_CORE_REG("buffer/format-at", cfun_buffer_format_at),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3857|  6.86k|        JANET_REG_END
  ------------------
  |  | 2110|  6.86k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
 3858|  6.86k|    };
 3859|       |    janet_core_cfuns_ext(env, NULL, buffer_cfuns);
 3860|  6.86k|}
janet_verify:
 5637|  3.68M|int janet_verify(JanetFuncDef *def) {
 5638|       |    /* vararg, structarg and namedargs each reserve a tuple slot at index arity */
 5639|  3.68M|    int vargs = !!(def->flags & (JANET_FUNCDEF_FLAG_VARARG | JANET_FUNCDEF_FLAG_STRUCTARG | JANET_FUNCDEF_FLAG_NAMEDARGS));
  ------------------
  |  | 1097|  3.68M|#define JANET_FUNCDEF_FLAG_VARARG 0x10000
  ------------------
                  int vargs = !!(def->flags & (JANET_FUNCDEF_FLAG_VARARG | JANET_FUNCDEF_FLAG_STRUCTARG | JANET_FUNCDEF_FLAG_NAMEDARGS));
  ------------------
  |  | 1105|  3.68M|#define JANET_FUNCDEF_FLAG_STRUCTARG 0x1000000
  ------------------
                  int vargs = !!(def->flags & (JANET_FUNCDEF_FLAG_VARARG | JANET_FUNCDEF_FLAG_STRUCTARG | JANET_FUNCDEF_FLAG_NAMEDARGS));
  ------------------
  |  | 1107|  3.68M|#define JANET_FUNCDEF_FLAG_NAMEDARGS 0x4000000
  ------------------
 5640|  3.68M|    int32_t i;
 5641|  3.68M|    int32_t maxslot = def->arity + vargs;
 5642|  3.68M|    int32_t sc = def->slotcount;
 5643|       |
 5644|  3.68M|    if (def->environments_length > 256) return 15;
  ------------------
  |  Branch (5644:9): [True: 0, False: 3.68M]
  ------------------
 5645|  3.68M|    if (def->bytecode_length == 0) return 1;
  ------------------
  |  Branch (5645:9): [True: 0, False: 3.68M]
  ------------------
 5646|       |
 5647|       |    /* Named args are the first named_args_count constants, so the count must fit the constant array */
 5648|  3.68M|    if ((def->flags & JANET_FUNCDEF_FLAG_NAMEDARGS) &&
  ------------------
  |  | 1107|  3.68M|#define JANET_FUNCDEF_FLAG_NAMEDARGS 0x4000000
  ------------------
  |  Branch (5648:9): [True: 13.7k, False: 3.67M]
  ------------------
 5649|  13.7k|            (def->named_args_count < 0 || def->named_args_count > def->constants_length))
  ------------------
  |  Branch (5649:14): [True: 0, False: 13.7k]
  |  Branch (5649:43): [True: 0, False: 13.7k]
  ------------------
 5650|      0|        return 17;
 5651|       |
 5652|       |    /* Environment indices must be -1 or non-negative */
 5653|  5.05M|    for (i = 0; i < def->environments_length; i++) {
  ------------------
  |  Branch (5653:17): [True: 1.36M, False: 3.68M]
  ------------------
 5654|  1.36M|        if (def->environments[i] < -1) return 16;
  ------------------
  |  Branch (5654:13): [True: 0, False: 1.36M]
  ------------------
 5655|  1.36M|    }
 5656|       |
 5657|  3.68M|    if (maxslot > sc) return 2;
  ------------------
  |  Branch (5657:9): [True: 0, False: 3.68M]
  ------------------
 5658|       |
 5659|       |    /* Verify each instruction */
 5660|   105M|    for (i = 0; i < def->bytecode_length; i++) {
  ------------------
  |  Branch (5660:17): [True: 101M, False: 3.68M]
  ------------------
 5661|   101M|        uint32_t instr = def->bytecode[i];
 5662|       |        /* Check for invalid instructions */
 5663|   101M|        if ((instr & 0x7F) >= JOP_INSTRUCTION_COUNT) {
  ------------------
  |  Branch (5663:13): [True: 0, False: 101M]
  ------------------
 5664|      0|            return 3;
 5665|      0|        }
 5666|   101M|        enum JanetInstructionType type = janet_instructions[instr & 0x7F];
 5667|   101M|        switch (type) {
  ------------------
  |  Branch (5667:17): [True: 101M, False: 0]
  ------------------
 5668|   535k|            case JINT_0:
  ------------------
  |  Branch (5668:13): [True: 535k, False: 101M]
  ------------------
 5669|   535k|                continue;
 5670|  19.5M|            case JINT_S: {
  ------------------
  |  Branch (5670:13): [True: 19.5M, False: 82.3M]
  ------------------
 5671|  19.5M|                if ((int32_t)(instr >> 8) >= sc) return 4;
  ------------------
  |  Branch (5671:21): [True: 0, False: 19.5M]
  ------------------
 5672|  19.5M|                continue;
 5673|  19.5M|            }
 5674|  19.5M|            case JINT_SI:
  ------------------
  |  Branch (5674:13): [True: 2.32M, False: 99.5M]
  ------------------
 5675|  2.32M|            case JINT_SU:
  ------------------
  |  Branch (5675:13): [True: 0, False: 101M]
  ------------------
 5676|  2.32M|            case JINT_ST: {
  ------------------
  |  Branch (5676:13): [True: 0, False: 101M]
  ------------------
 5677|  2.32M|                if ((int32_t)((instr >> 8) & 0xFF) >= sc) return 4;
  ------------------
  |  Branch (5677:21): [True: 0, False: 2.32M]
  ------------------
 5678|  2.32M|                continue;
 5679|  2.32M|            }
 5680|  4.27M|            case JINT_L: {
  ------------------
  |  Branch (5680:13): [True: 4.27M, False: 97.6M]
  ------------------
 5681|  4.27M|                int32_t jumpdest = i + (((int32_t)instr) >> 8);
 5682|  4.27M|                if (jumpdest < 0 || jumpdest >= def->bytecode_length) return 5;
  ------------------
  |  Branch (5682:21): [True: 0, False: 4.27M]
  |  Branch (5682:37): [True: 0, False: 4.27M]
  ------------------
 5683|  4.27M|                continue;
 5684|  4.27M|            }
 5685|  27.2M|            case JINT_SS: {
  ------------------
  |  Branch (5685:13): [True: 27.2M, False: 74.6M]
  ------------------
 5686|  27.2M|                if ((int32_t)((instr >> 8) & 0xFF) >= sc ||
  ------------------
  |  Branch (5686:21): [True: 0, False: 27.2M]
  ------------------
 5687|  27.2M|                        (int32_t)(instr >> 16) >= sc) return 4;
  ------------------
  |  Branch (5687:25): [True: 0, False: 27.2M]
  ------------------
 5688|  27.2M|                continue;
 5689|  27.2M|            }
 5690|  27.2M|            case JINT_SSI:
  ------------------
  |  Branch (5690:13): [True: 1.79M, False: 100M]
  ------------------
 5691|  2.85M|            case JINT_SSU: {
  ------------------
  |  Branch (5691:13): [True: 1.06M, False: 100M]
  ------------------
 5692|  2.85M|                if ((int32_t)((instr >> 8) & 0xFF) >= sc ||
  ------------------
  |  Branch (5692:21): [True: 0, False: 2.85M]
  ------------------
 5693|  2.85M|                        (int32_t)((instr >> 16) & 0xFF) >= sc) return 4;
  ------------------
  |  Branch (5693:25): [True: 0, False: 2.85M]
  ------------------
 5694|  2.85M|                continue;
 5695|  2.85M|            }
 5696|  7.43M|            case JINT_SL: {
  ------------------
  |  Branch (5696:13): [True: 7.43M, False: 94.4M]
  ------------------
 5697|  7.43M|                int32_t jumpdest = i + (((int32_t)instr) >> 16);
 5698|  7.43M|                if ((int32_t)((instr >> 8) & 0xFF) >= sc) return 4;
  ------------------
  |  Branch (5698:21): [True: 0, False: 7.43M]
  ------------------
 5699|  7.43M|                if (jumpdest < 0 || jumpdest >= def->bytecode_length) return 5;
  ------------------
  |  Branch (5699:21): [True: 0, False: 7.43M]
  |  Branch (5699:37): [True: 0, False: 7.43M]
  ------------------
 5700|  7.43M|                continue;
 5701|  7.43M|            }
 5702|  13.6M|            case JINT_SSS: {
  ------------------
  |  Branch (5702:13): [True: 13.6M, False: 88.1M]
  ------------------
 5703|  13.6M|                if (((int32_t)(instr >> 8) & 0xFF) >= sc ||
  ------------------
  |  Branch (5703:21): [True: 0, False: 13.6M]
  ------------------
 5704|  13.6M|                        ((int32_t)(instr >> 16) & 0xFF) >= sc ||
  ------------------
  |  Branch (5704:25): [True: 0, False: 13.6M]
  ------------------
 5705|  13.6M|                        ((int32_t)(instr >> 24) & 0xFF) >= sc) return 4;
  ------------------
  |  Branch (5705:25): [True: 0, False: 13.6M]
  ------------------
 5706|  13.6M|                continue;
 5707|  13.6M|            }
 5708|  13.6M|            case JINT_SD: {
  ------------------
  |  Branch (5708:13): [True: 1.08M, False: 100M]
  ------------------
 5709|  1.08M|                if ((int32_t)((instr >> 8) & 0xFF) >= sc) return 4;
  ------------------
  |  Branch (5709:21): [True: 0, False: 1.08M]
  ------------------
 5710|  1.08M|                if ((int32_t)(instr >> 16) >= def->defs_length) return 6;
  ------------------
  |  Branch (5710:21): [True: 0, False: 1.08M]
  ------------------
 5711|  1.08M|                continue;
 5712|  1.08M|            }
 5713|  18.6M|            case JINT_SC: {
  ------------------
  |  Branch (5713:13): [True: 18.6M, False: 83.2M]
  ------------------
 5714|  18.6M|                if ((int32_t)((instr >> 8) & 0xFF) >= sc) return 4;
  ------------------
  |  Branch (5714:21): [True: 0, False: 18.6M]
  ------------------
 5715|  18.6M|                if ((int32_t)(instr >> 16) >= def->constants_length) return 7;
  ------------------
  |  Branch (5715:21): [True: 0, False: 18.6M]
  ------------------
 5716|  18.6M|                continue;
 5717|  18.6M|            }
 5718|  18.6M|            case JINT_SES: {
  ------------------
  |  Branch (5718:13): [True: 4.24M, False: 97.6M]
  ------------------
 5719|       |                /* How can we check the last slot index? We need info parent funcdefs. Resort
 5720|       |                 * to runtime checks for now. Maybe invalid upvalue references could be defaulted
 5721|       |                 * to nil? (don't commit to this in the long term, though) */
 5722|  4.24M|                if ((int32_t)((instr >> 8) & 0xFF) >= sc) return 4;
  ------------------
  |  Branch (5722:21): [True: 0, False: 4.24M]
  ------------------
 5723|  4.24M|                if ((int32_t)((instr >> 16) & 0xFF) >= def->environments_length) return 8;
  ------------------
  |  Branch (5723:21): [True: 0, False: 4.24M]
  ------------------
 5724|  4.24M|                continue;
 5725|  4.24M|            }
 5726|   101M|        }
 5727|   101M|    }
 5728|       |
 5729|       |    /* Verify last instruction is either a jump, return, return-nil, or tailcall. Eventually,
 5730|       |     * some real flow analysis would be ideal, but this should be very effective. Will completely
 5731|       |     * prevent running over the end of bytecode. However, valid functions with dead code will
 5732|       |     * be rejected. */
 5733|  3.68M|    {
 5734|  3.68M|        uint32_t lastop = def->bytecode[def->bytecode_length - 1] & 0xFF;
 5735|  3.68M|        switch (lastop) {
 5736|      0|            default:
  ------------------
  |  Branch (5736:13): [True: 0, False: 3.68M]
  ------------------
 5737|      0|                return 9;
 5738|  2.16M|            case JOP_RETURN:
  ------------------
  |  Branch (5738:13): [True: 2.16M, False: 1.52M]
  ------------------
 5739|  2.44M|            case JOP_RETURN_NIL:
  ------------------
  |  Branch (5739:13): [True: 281k, False: 3.40M]
  ------------------
 5740|  2.45M|            case JOP_JUMP:
  ------------------
  |  Branch (5740:13): [True: 6.86k, False: 3.67M]
  ------------------
 5741|  2.49M|            case JOP_ERROR:
  ------------------
  |  Branch (5741:13): [True: 48.0k, False: 3.63M]
  ------------------
 5742|  3.68M|            case JOP_TAILCALL:
  ------------------
  |  Branch (5742:13): [True: 1.18M, False: 2.49M]
  ------------------
 5743|  3.68M|                break;
 5744|  3.68M|        }
 5745|  3.68M|    }
 5746|       |
 5747|       |    /* Verify debug info - slotmapping, etc. */
 5748|  38.6M|    for (int32_t i = def->symbolmap_length - 1; i >= 0; i--) {
  ------------------
  |  Branch (5748:49): [True: 34.9M, False: 3.68M]
  ------------------
 5749|  34.9M|        JanetSymbolMap jsm = def->symbolmap[i];
 5750|  34.9M|        if (jsm.birth_pc == UINT32_MAX) {
  ------------------
  |  Branch (5750:13): [True: 18.0M, False: 16.9M]
  ------------------
 5751|  18.0M|            if (jsm.death_pc >= (uint32_t) def->environments_length) {
  ------------------
  |  Branch (5751:17): [True: 0, False: 18.0M]
  ------------------
 5752|      0|                return 10;
 5753|       |                /* We should also check jsm.slot_index */
 5754|      0|            }
 5755|  18.0M|        } else {
 5756|  16.9M|            if (jsm.slot_index >= (uint32_t) def->slotcount) {
  ------------------
  |  Branch (5756:17): [True: 0, False: 16.9M]
  ------------------
 5757|      0|                return 11;
 5758|      0|            }
 5759|  16.9M|            if (jsm.birth_pc != UINT32_MAX && jsm.birth_pc >= (uint32_t) def->bytecode_length) {
  ------------------
  |  Branch (5759:17): [True: 16.9M, False: 0]
  |  Branch (5759:47): [True: 0, False: 16.9M]
  ------------------
 5760|      0|                return 12;
 5761|      0|            }
 5762|  16.9M|            if (jsm.death_pc != UINT32_MAX && jsm.death_pc > (uint32_t) def->bytecode_length) {
  ------------------
  |  Branch (5762:17): [True: 16.9M, False: 0]
  |  Branch (5762:47): [True: 0, False: 16.9M]
  ------------------
 5763|      0|                return 13;
 5764|      0|            }
 5765|  16.9M|        }
 5766|  34.9M|        if (jsm.symbol == NULL) {
  ------------------
  |  Branch (5766:13): [True: 0, False: 34.9M]
  ------------------
 5767|      0|            return 14;
 5768|      0|        }
 5769|  34.9M|    }
 5770|       |
 5771|  3.68M|    return 0;
 5772|  3.68M|}
janet_signalv:
 5882|  2.69k|void janet_signalv(JanetSignal sig, Janet message) {
 5883|  2.69k|    if (janet_vm.return_reg != NULL) {
  ------------------
  |  Branch (5883:9): [True: 2.69k, False: 0]
  ------------------
 5884|       |        /* Should match logic in janet_call for coercing everything not ok to an error (no awaits, yields, etc.) */
 5885|  2.69k|        if (janet_vm.coerce_error && sig != JANET_SIGNAL_OK) {
  ------------------
  |  Branch (5885:13): [True: 0, False: 2.69k]
  |  Branch (5885:38): [True: 0, False: 0]
  ------------------
 5886|      0|#ifdef JANET_EV
 5887|      0|            if (NULL != janet_vm.root_fiber && sig == JANET_SIGNAL_EVENT) {
  ------------------
  |  Branch (5887:17): [True: 0, False: 0]
  |  Branch (5887:48): [True: 0, False: 0]
  ------------------
 5888|      0|                janet_vm.root_fiber->sched_id++;
 5889|      0|            }
 5890|      0|#endif
 5891|      0|            if (sig != JANET_SIGNAL_ERROR) {
  ------------------
  |  Branch (5891:17): [True: 0, False: 0]
  ------------------
 5892|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5893|      0|            }
 5894|      0|            sig = JANET_SIGNAL_ERROR;
 5895|      0|        }
 5896|  2.69k|        *janet_vm.return_reg = message;
 5897|  2.69k|        if (NULL != janet_vm.fiber) {
  ------------------
  |  Branch (5897:13): [True: 0, False: 2.69k]
  ------------------
 5898|      0|            janet_vm.fiber->flags |= JANET_FIBER_DID_LONGJUMP;
  ------------------
  |  |  814|      0|#define JANET_FIBER_DID_LONGJUMP     0x8000000
  ------------------
 5899|      0|        }
 5900|       |#if defined(JANET_BSD) || defined(JANET_APPLE)
 5901|       |        _longjmp(*janet_vm.signal_buf, sig);
 5902|       |#else
 5903|  2.69k|        longjmp(*janet_vm.signal_buf, sig);
 5904|  2.69k|#endif
 5905|  2.69k|    } else {
 5906|      0|        const char *str = (const char *)janet_formatc("janet top level signal - %v\n", message);
 5907|      0|        janet_top_level_signal(str);
 5908|      0|    }
 5909|  2.69k|}
janet_panicv:
 5911|  2.69k|void janet_panicv(Janet message) {
 5912|  2.69k|    janet_signalv(JANET_SIGNAL_ERROR, message);
 5913|  2.69k|}
janet_panicf:
 5915|  2.66k|void janet_panicf(const char *format, ...) {
 5916|  2.66k|    va_list args;
 5917|  2.66k|    const uint8_t *ret;
 5918|  2.66k|    JanetBuffer buffer;
 5919|  2.66k|    int32_t len = 0;
 5920|  64.0k|    while (format[len]) len++;
  ------------------
  |  Branch (5920:12): [True: 61.4k, False: 2.66k]
  ------------------
 5921|  2.66k|    janet_buffer_init(&buffer, len);
 5922|  2.66k|    va_start(args, format);
 5923|  2.66k|    janet_formatbv(&buffer, format, args);
 5924|       |    va_end(args);
 5925|  2.66k|    ret = janet_string(buffer.data, buffer.count);
 5926|  2.66k|    janet_buffer_deinit(&buffer);
 5927|  2.66k|    janet_panics(ret);
 5928|  2.66k|}
janet_panics:
 5934|  2.66k|void janet_panics(const uint8_t *message) {
 5935|  2.66k|    janet_panicv(janet_wrap_string(message));
  ------------------
  |  |  848|  2.66k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|  2.66k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.66k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.66k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5936|  2.66k|}
janet_arity:
 5951|  4.85k|void janet_arity(int32_t arity, int32_t min, int32_t max) {
 5952|  4.85k|    if (min >= 0 && arity < min)
  ------------------
  |  Branch (5952:9): [True: 4.85k, False: 0]
  |  Branch (5952:21): [True: 0, False: 4.85k]
  ------------------
 5953|      0|        janet_panicf("arity mismatch, expected at least %d, got %d", min, arity);
 5954|  4.85k|    if (max >= 0 && arity > max)
  ------------------
  |  Branch (5954:9): [True: 0, False: 4.85k]
  |  Branch (5954:21): [True: 0, False: 0]
  ------------------
 5955|      0|        janet_panicf("arity mismatch, expected at most %d, got %d", max, arity);
 5956|  4.85k|}
janet_getbytes:
 6250|  2.18k|JanetByteView janet_getbytes(const Janet *argv, int32_t n) {
 6251|  2.18k|    Janet x = argv[n];
 6252|  2.18k|    JanetByteView view;
 6253|  2.18k|    if (!janet_bytes_view(x, &view.bytes, &view.len)) {
  ------------------
  |  Branch (6253:9): [True: 0, False: 2.18k]
  ------------------
 6254|      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)
  |  |  ------------------
  ------------------
 6255|      0|    }
 6256|  2.18k|    return view;
 6257|  2.18k|}
janet_dyn:
 6291|  16.6M|Janet janet_dyn(const char *name) {
 6292|  16.6M|    if (!janet_vm.fiber) {
  ------------------
  |  Branch (6292:9): [True: 16.6M, False: 0]
  ------------------
 6293|  16.6M|        if (!janet_vm.top_dyns) return janet_wrap_nil();
  ------------------
  |  |  831|  16.6M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  16.6M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  16.6M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  16.6M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (6293:13): [True: 16.6M, False: 0]
  ------------------
 6294|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6295|  16.6M|    }
 6296|      0|    if (janet_vm.fiber->env) {
  ------------------
  |  Branch (6296:9): [True: 0, False: 0]
  ------------------
 6297|      0|        return janet_table_get_keyword(janet_vm.fiber->env, name);
 6298|      0|    } else {
 6299|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6300|      0|    }
 6301|      0|}
janet_lib_compile:
 8278|  6.86k|void janet_lib_compile(JanetTable *env) {
 8279|  6.86k|    JanetRegExt cfuns[] = {
 8280|  6.86k|        JANET_CORE_REG("compile", cfun_compile),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 8281|  6.86k|        JANET_REG_END
  ------------------
  |  | 2110|  6.86k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
 8282|  6.86k|    };
 8283|       |    janet_core_cfuns_ext(env, NULL, cfuns);
 8284|  6.86k|}
janet_core_env:
 9689|  6.86k|JanetTable *janet_core_env(JanetTable *replacements) {
 9690|       |    /* Memoize core env, ignoring replacements the second time around. */
 9691|  6.86k|    if (NULL != janet_vm.core_env) {
  ------------------
  |  Branch (9691:9): [True: 0, False: 6.86k]
  ------------------
 9692|      0|        return janet_vm.core_env;
 9693|      0|    }
 9694|       |
 9695|  6.86k|    JanetTable *dict = janet_core_lookup_table(replacements);
 9696|       |
 9697|       |    /* Unmarshal bytecode */
 9698|  6.86k|    Janet marsh_out = janet_unmarshal(
 9699|  6.86k|                          janet_core_image,
 9700|  6.86k|                          janet_core_image_size,
 9701|  6.86k|                          0,
 9702|  6.86k|                          dict,
 9703|  6.86k|                          NULL);
 9704|       |
 9705|       |    /* Memoize */
 9706|  6.86k|    janet_gcroot(marsh_out);
 9707|  6.86k|    JanetTable *env = janet_unwrap_table(marsh_out);
  ------------------
  |  |  861|  6.86k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
 9708|  6.86k|    janet_vm.core_env = env;
 9709|       |
 9710|       |    /* Invert image dict manually here. We can't do this in boot.janet as it
 9711|       |     * breaks deterministic builds */
 9712|  6.86k|    Janet lidv, midv;
 9713|  6.86k|    lidv = midv = janet_wrap_nil();
  ------------------
  |  |  831|  6.86k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  6.86k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  6.86k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  6.86k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 9714|  6.86k|    janet_resolve(env, janet_csymbol("load-image-dict"), &lidv);
 9715|  6.86k|    janet_resolve(env, janet_csymbol("make-image-dict"), &midv);
 9716|       |
 9717|       |    /* Check that we actually got tables - if we are using a smaller corelib, may not exist */
 9718|  6.86k|    if (janet_checktype(lidv, JANET_TABLE) && janet_checktype(midv, JANET_TABLE)) {
  ------------------
  |  |  806|  13.7k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 6.86k, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 6.86k]
  |  |  ------------------
  |  |  807|  13.7k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  13.7k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  6.86k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  6.86k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  6.86k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  6.86k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  if (janet_checktype(lidv, JANET_TABLE) && janet_checktype(midv, JANET_TABLE)) {
  ------------------
  |  |  806|  6.86k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 6.86k, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 6.86k]
  |  |  ------------------
  |  |  807|  6.86k|        ? 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.86k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  6.86k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  6.86k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  6.86k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  6.86k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 9719|  6.86k|        JanetTable *lid = janet_unwrap_table(lidv);
  ------------------
  |  |  861|  6.86k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
 9720|  6.86k|        JanetTable *mid = janet_unwrap_table(midv);
  ------------------
  |  |  861|  6.86k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
 9721|  14.0M|        for (int32_t i = 0; i < lid->capacity; i++) {
  ------------------
  |  Branch (9721:29): [True: 14.0M, False: 6.86k]
  ------------------
 9722|  14.0M|            const JanetKV *kv = lid->data + i;
 9723|  14.0M|            if (!janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|  14.0M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 14.0M]
  |  |  ------------------
  |  |  807|  14.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|  14.0M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  14.0M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  14.0M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  14.0M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  14.0M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (9723:17): [True: 4.52M, False: 9.53M]
  ------------------
 9724|  4.52M|                janet_table_put(mid, kv->value, kv->key);
 9725|  4.52M|            }
 9726|  14.0M|        }
 9727|  6.86k|    }
 9728|       |
 9729|  6.86k|    return env;
 9730|  6.86k|}
janet_core_lookup_table:
 9734|  6.86k|JanetTable *janet_core_lookup_table(JanetTable *replacements) {
 9735|  6.86k|    JanetTable *dict = janet_table(512);
 9736|  6.86k|    janet_load_libs(dict);
 9737|       |
 9738|       |    /* Add replacements */
 9739|  6.86k|    if (replacements != NULL) {
  ------------------
  |  Branch (9739:9): [True: 0, False: 6.86k]
  ------------------
 9740|      0|        for (int32_t i = 0; i < replacements->capacity; i++) {
  ------------------
  |  Branch (9740:29): [True: 0, False: 0]
  ------------------
 9741|      0|            JanetKV kv = replacements->data[i];
 9742|      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 (9742:17): [True: 0, False: 0]
  ------------------
 9743|      0|                janet_table_put(dict, kv.key, kv.value);
 9744|       |                /* Add replacement functions to registry? */
 9745|      0|            }
 9746|      0|        }
 9747|      0|    }
 9748|       |
 9749|  6.86k|    return dict;
 9750|  6.86k|}
janet_lib_debug:
10204|  6.86k|void janet_lib_debug(JanetTable *env) {
10205|  6.86k|    JanetRegExt debug_cfuns[] = {
10206|  6.86k|        JANET_CORE_REG("debug/break", cfun_debug_break),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
10207|  6.86k|        JANET_CORE_REG("debug/unbreak", cfun_debug_unbreak),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
10208|  6.86k|        JANET_CORE_REG("debug/fbreak", cfun_debug_fbreak),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
10209|  6.86k|        JANET_CORE_REG("debug/unfbreak", cfun_debug_unfbreak),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
10210|  6.86k|        JANET_CORE_REG("debug/arg-stack", cfun_debug_argstack),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
10211|  6.86k|        JANET_CORE_REG("debug/stack", cfun_debug_stack),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
10212|  6.86k|        JANET_CORE_REG("debug/stacktrace", cfun_debug_stacktrace),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
10213|  6.86k|        JANET_CORE_REG("debug/lineage", cfun_debug_lineage),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
10214|  6.86k|        JANET_CORE_REG("debug/step", cfun_debug_step),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
10215|  6.86k|        JANET_REG_END
  ------------------
  |  | 2110|  6.86k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
10216|  6.86k|    };
10217|       |    janet_core_cfuns_ext(env, NULL, debug_cfuns);
10218|  6.86k|}
janet_ev_init_common:
11184|  6.86k|void janet_ev_init_common(void) {
11185|  6.86k|    janet_q_init(&janet_vm.spawn);
11186|  6.86k|    janet_vm.tq = NULL;
11187|  6.86k|    janet_vm.tq_count = 0;
11188|  6.86k|    janet_vm.tq_capacity = 0;
11189|  6.86k|    janet_table_init_raw(&janet_vm.threaded_abstracts, 0);
11190|  6.86k|    janet_table_init_raw(&janet_vm.active_tasks, 0);
11191|  6.86k|    janet_table_init_raw(&janet_vm.signal_handlers, 0);
11192|  6.86k|    janet_rng_seed(&janet_vm.ev_rng, 0);
11193|  6.86k|#ifndef JANET_WINDOWS
11194|  6.86k|    pthread_attr_init(&janet_vm.new_thread_attr);
11195|       |    pthread_attr_setdetachstate(&janet_vm.new_thread_attr, PTHREAD_CREATE_DETACHED);
11196|  6.86k|#endif
11197|  6.86k|}
janet_ev_deinit_common:
11230|  6.86k|void janet_ev_deinit_common(void) {
11231|  6.86k|    JanetTimeout to;
11232|  6.86k|    while (peek_timeout(&to)) {
  ------------------
  |  Branch (11232:12): [True: 0, False: 6.86k]
  ------------------
11233|      0|        handle_timeout_worker(to, 1);
11234|      0|        pop_timeout(0);
11235|      0|    }
11236|  6.86k|    janet_q_deinit(&janet_vm.spawn);
11237|  6.86k|    janet_free(janet_vm.tq);
  ------------------
  |  | 2415|  6.86k|#define janet_free(X) free((X))
  ------------------
11238|  6.86k|    janet_table_deinit(&janet_vm.threaded_abstracts);
11239|  6.86k|    janet_table_deinit(&janet_vm.active_tasks);
11240|  6.86k|    janet_table_deinit(&janet_vm.signal_handlers);
11241|  6.86k|#ifndef JANET_WINDOWS
11242|  6.86k|    pthread_attr_destroy(&janet_vm.new_thread_attr);
11243|  6.86k|#endif
11244|  6.86k|}
janet_ev_init:
12522|  6.86k|void janet_ev_init(void) {
12523|  6.86k|    janet_ev_init_common();
12524|  6.86k|    janet_ev_setup_selfpipe();
12525|  6.86k|    janet_vm.epoll = epoll_create1(EPOLL_CLOEXEC);
12526|  6.86k|    janet_vm.timerfd = timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC | TFD_NONBLOCK);
12527|  6.86k|    janet_vm.timer_enabled = 0;
12528|  6.86k|    if (janet_vm.epoll == -1 || janet_vm.timerfd == -1) goto error;
  ------------------
  |  Branch (12528:9): [True: 0, False: 6.86k]
  |  Branch (12528:33): [True: 0, False: 6.86k]
  ------------------
12529|  6.86k|    struct epoll_event ev;
12530|  6.86k|    ev.events = EPOLLIN | EPOLLET;
12531|  6.86k|    ev.data.ptr = &janet_vm.timerfd;
12532|  6.86k|    if (-1 == epoll_ctl(janet_vm.epoll, EPOLL_CTL_ADD, janet_vm.timerfd, &ev)) goto error;
  ------------------
  |  Branch (12532:9): [True: 0, False: 6.86k]
  ------------------
12533|  6.86k|    ev.events = EPOLLIN | EPOLLET;
12534|  6.86k|    ev.data.ptr = janet_vm.selfpipe;
12535|  6.86k|    if (-1 == epoll_ctl(janet_vm.epoll, EPOLL_CTL_ADD, janet_vm.selfpipe[0], &ev)) goto error;
  ------------------
  |  Branch (12535:9): [True: 0, False: 6.86k]
  ------------------
12536|  6.86k|    return;
12537|  6.86k|error:
12538|       |    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]
  |  |  ------------------
  ------------------
12539|      0|}
janet_ev_deinit:
12541|  6.86k|void janet_ev_deinit(void) {
12542|  6.86k|    janet_ev_deinit_common();
12543|  6.86k|    close(janet_vm.epoll);
12544|  6.86k|    close(janet_vm.timerfd);
12545|  6.86k|    janet_ev_cleanup_selfpipe();
12546|  6.86k|    janet_vm.epoll = 0;
12547|  6.86k|}
janet_make_pipe:
13644|  6.86k|int janet_make_pipe(JanetHandle handles[2], int mode) {
13645|       |#ifdef JANET_WINDOWS
13646|       |    /*
13647|       |     * On windows, the built in CreatePipe function doesn't support overlapped IO
13648|       |     * so we lift from the windows source code and modify for our own version.
13649|       |     */
13650|       |    JanetHandle shandle, chandle;
13651|       |    CHAR PipeNameBuffer[MAX_PATH];
13652|       |    SECURITY_ATTRIBUTES saAttr;
13653|       |    memset(&saAttr, 0, sizeof(saAttr));
13654|       |    saAttr.nLength = sizeof(saAttr);
13655|       |    saAttr.bInheritHandle = TRUE;
13656|       |    if (mode == 3) {
13657|       |        /* No overlapped IO involved, just call CreatePipe */
13658|       |        if (!CreatePipe(handles, handles + 1, &saAttr, 0)) return -1;
13659|       |        return 0;
13660|       |    }
13661|       |    snprintf(PipeNameBuffer,
13662|       |             sizeof(PipeNameBuffer),
13663|       |             "\\\\.\\Pipe\\JanetPipeFile.%08x.%08x",
13664|       |             (unsigned int) GetCurrentProcessId(),
13665|       |             (unsigned int) InterlockedIncrement(&PipeSerialNumber));
13666|       |
13667|       |    /* server handle goes to subprocess */
13668|       |    shandle = CreateNamedPipeA(
13669|       |                  PipeNameBuffer,
13670|       |                  (mode == 2 ? PIPE_ACCESS_INBOUND : PIPE_ACCESS_OUTBOUND) | FILE_FLAG_OVERLAPPED,
13671|       |                  PIPE_TYPE_BYTE | PIPE_WAIT,
13672|       |                  255,           /* Max number of pipes for duplication. */
13673|       |                  4096,          /* Out buffer size */
13674|       |                  4096,          /* In buffer size */
13675|       |                  120 * 1000,    /* Timeout in ms */
13676|       |                  &saAttr);
13677|       |    if (shandle == INVALID_HANDLE_VALUE) {
13678|       |        return -1;
13679|       |    }
13680|       |
13681|       |    /* we keep client handle */
13682|       |    chandle = CreateFileA(
13683|       |                  PipeNameBuffer,
13684|       |                  (mode == 2 ? GENERIC_WRITE : GENERIC_READ),
13685|       |                  0,
13686|       |                  &saAttr,
13687|       |                  OPEN_EXISTING,
13688|       |                  FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED,
13689|       |                  NULL);
13690|       |
13691|       |    if (chandle == INVALID_HANDLE_VALUE) {
13692|       |        CloseHandle(shandle);
13693|       |        return -1;
13694|       |    }
13695|       |    if (mode == 2) {
13696|       |        handles[0] = shandle;
13697|       |        handles[1] = chandle;
13698|       |    } else {
13699|       |        handles[0] = chandle;
13700|       |        handles[1] = shandle;
13701|       |    }
13702|       |    return 0;
13703|       |#else
13704|  6.86k|    if (pipe(handles)) return -1;
  ------------------
  |  Branch (13704:9): [True: 0, False: 6.86k]
  ------------------
13705|  6.86k|    if (mode != 2 && fcntl(handles[0], F_SETFD, FD_CLOEXEC)) goto error;
  ------------------
  |  Branch (13705:9): [True: 6.86k, False: 0]
  |  Branch (13705:22): [True: 0, False: 6.86k]
  ------------------
13706|  6.86k|    if (mode != 1 && fcntl(handles[1], F_SETFD, FD_CLOEXEC)) goto error;
  ------------------
  |  Branch (13706:9): [True: 0, False: 6.86k]
  |  Branch (13706:22): [True: 0, False: 0]
  ------------------
13707|  6.86k|    if (mode != 2 && mode != 3 && fcntl(handles[0], F_SETFL, O_NONBLOCK)) goto error;
  ------------------
  |  Branch (13707:9): [True: 6.86k, False: 0]
  |  Branch (13707:22): [True: 6.86k, False: 0]
  |  Branch (13707:35): [True: 0, False: 6.86k]
  ------------------
13708|  6.86k|    if (mode != 1 && mode != 3 && fcntl(handles[1], F_SETFL, O_NONBLOCK)) goto error;
  ------------------
  |  Branch (13708:9): [True: 0, False: 6.86k]
  |  Branch (13708:22): [True: 0, False: 0]
  |  Branch (13708:35): [True: 0, False: 0]
  ------------------
13709|  6.86k|    return 0;
13710|      0|error:
13711|      0|    close(handles[0]);
13712|      0|    close(handles[1]);
13713|      0|    return -1;
13714|  6.86k|#endif
13715|  6.86k|}
janet_lib_ev:
14300|  6.86k|void janet_lib_ev(JanetTable *env) {
14301|  6.86k|    JanetRegExt ev_cfuns_ext[] = {
14302|  6.86k|        JANET_CORE_REG("ev/give", cfun_channel_push),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14303|  6.86k|        JANET_CORE_REG("ev/take", cfun_channel_pop),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14304|  6.86k|        JANET_CORE_REG("ev/full", cfun_channel_full),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14305|  6.86k|        JANET_CORE_REG("ev/capacity", cfun_channel_capacity),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14306|  6.86k|        JANET_CORE_REG("ev/count", cfun_channel_count),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14307|  6.86k|        JANET_CORE_REG("ev/select", cfun_channel_choice),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14308|  6.86k|        JANET_CORE_REG("ev/rselect", cfun_channel_rchoice),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14309|  6.86k|        JANET_CORE_REG("ev/chan", cfun_channel_new),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14310|  6.86k|        JANET_CORE_REG("ev/thread-chan", cfun_channel_new_threaded),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14311|  6.86k|        JANET_CORE_REG("ev/chan-close", cfun_channel_close),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14312|  6.86k|        JANET_CORE_REG("ev/go", cfun_ev_go),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14313|  6.86k|        JANET_CORE_REG("ev/thread", cfun_ev_thread),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14314|  6.86k|        JANET_CORE_REG("ev/give-supervisor", cfun_ev_give_supervisor),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14315|  6.86k|        JANET_CORE_REG("ev/sleep", cfun_ev_sleep),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14316|  6.86k|        JANET_CORE_REG("ev/deadline", cfun_ev_deadline),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14317|  6.86k|        JANET_CORE_REG("ev/cancel", cfun_ev_cancel),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14318|  6.86k|        JANET_CORE_REG("ev/close", janet_cfun_stream_close),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14319|  6.86k|        JANET_CORE_REG("ev/read", janet_cfun_stream_read),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14320|  6.86k|        JANET_CORE_REG("ev/chunk", janet_cfun_stream_chunk),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14321|  6.86k|        JANET_CORE_REG("ev/write", janet_cfun_stream_write),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14322|  6.86k|        JANET_CORE_REG("ev/lock", janet_cfun_mutex),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14323|  6.86k|        JANET_CORE_REG("ev/acquire-lock", janet_cfun_mutex_acquire),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14324|  6.86k|        JANET_CORE_REG("ev/release-lock", janet_cfun_mutex_release),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14325|  6.86k|        JANET_CORE_REG("ev/rwlock", janet_cfun_rwlock),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14326|  6.86k|        JANET_CORE_REG("ev/acquire-rlock", janet_cfun_rwlock_read_lock),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14327|  6.86k|        JANET_CORE_REG("ev/acquire-wlock", janet_cfun_rwlock_write_lock),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14328|  6.86k|        JANET_CORE_REG("ev/release-rlock", janet_cfun_rwlock_read_release),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14329|  6.86k|        JANET_CORE_REG("ev/release-wlock", janet_cfun_rwlock_write_release),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14330|  6.86k|        JANET_CORE_REG("ev/to-file", janet_cfun_to_file),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14331|  6.86k|        JANET_CORE_REG("ev/all-tasks", janet_cfun_ev_all_tasks),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14332|  6.86k|        JANET_REG_END
  ------------------
  |  | 2110|  6.86k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
14333|  6.86k|    };
14334|       |
14335|       |    janet_core_cfuns_ext(env, NULL, ev_cfuns_ext);
14336|  6.86k|    janet_register_abstract_type(&janet_stream_type);
14337|  6.86k|    janet_register_abstract_type(&janet_channel_type);
14338|  6.86k|    janet_register_abstract_type(&janet_mutex_type);
14339|  6.86k|    janet_register_abstract_type(&janet_rwlock_type);
14340|  6.86k|}
janet_lib_ffi:
16273|  6.86k|void janet_lib_ffi(JanetTable *env) {
16274|  6.86k|    JanetRegExt ffi_cfuns[] = {
16275|  6.86k|        JANET_CORE_REG("ffi/native", janet_core_raw_native),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16276|  6.86k|        JANET_CORE_REG("ffi/lookup", janet_core_native_lookup),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16277|  6.86k|        JANET_CORE_REG("ffi/close", janet_core_native_close),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16278|  6.86k|        JANET_CORE_REG("ffi/signature", cfun_ffi_signature),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16279|  6.86k|        JANET_CORE_REG("ffi/call", cfun_ffi_call),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16280|  6.86k|        JANET_CORE_REG("ffi/struct", cfun_ffi_struct),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16281|  6.86k|        JANET_CORE_REG("ffi/write", cfun_ffi_buffer_write),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16282|  6.86k|        JANET_CORE_REG("ffi/read", cfun_ffi_buffer_read),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16283|  6.86k|        JANET_CORE_REG("ffi/size", cfun_ffi_size),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16284|  6.86k|        JANET_CORE_REG("ffi/align", cfun_ffi_align),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16285|  6.86k|        JANET_CORE_REG("ffi/trampoline", cfun_ffi_get_callback_trampoline),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16286|  6.86k|        JANET_CORE_REG("ffi/jitfn", cfun_ffi_jitfn),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16287|  6.86k|        JANET_CORE_REG("ffi/malloc", cfun_ffi_malloc),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16288|  6.86k|        JANET_CORE_REG("ffi/free", cfun_ffi_free),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16289|  6.86k|        JANET_CORE_REG("ffi/pointer-buffer", cfun_ffi_pointer_buffer),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16290|  6.86k|        JANET_CORE_REG("ffi/pointer-cfunction", cfun_ffi_pointer_cfunction),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16291|  6.86k|        JANET_CORE_REG("ffi/calling-conventions", cfun_ffi_supported_calling_conventions),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16292|  6.86k|        JANET_REG_END
  ------------------
  |  | 2110|  6.86k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
16293|  6.86k|    };
16294|       |    janet_core_cfuns_ext(env, NULL, ffi_cfuns);
16295|  6.86k|}
janet_lib_fiber:
16975|  6.86k|void janet_lib_fiber(JanetTable *env) {
16976|  6.86k|    JanetRegExt fiber_cfuns[] = {
16977|  6.86k|        JANET_CORE_REG("fiber/new", cfun_fiber_new),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16978|  6.86k|        JANET_CORE_REG("fiber/status", cfun_fiber_status),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16979|  6.86k|        JANET_CORE_REG("fiber/root", cfun_fiber_root),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16980|  6.86k|        JANET_CORE_REG("fiber/current", cfun_fiber_current),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16981|  6.86k|        JANET_CORE_REG("fiber/maxstack", cfun_fiber_maxstack),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16982|  6.86k|        JANET_CORE_REG("fiber/setmaxstack", cfun_fiber_setmaxstack),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16983|  6.86k|        JANET_CORE_REG("fiber/getenv", cfun_fiber_getenv),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16984|  6.86k|        JANET_CORE_REG("fiber/setenv", cfun_fiber_setenv),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16985|  6.86k|        JANET_CORE_REG("fiber/can-resume?", cfun_fiber_can_resume),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16986|  6.86k|        JANET_CORE_REG("fiber/last-value", cfun_fiber_last_value),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16987|  6.86k|        JANET_REG_END
  ------------------
  |  | 2110|  6.86k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
16988|  6.86k|    };
16989|       |    janet_core_cfuns_ext(env, NULL, fiber_cfuns);
16990|  6.86k|}
janet_lib_filewatch:
17985|  6.86k|void janet_lib_filewatch(JanetTable *env) {
17986|  6.86k|    JanetRegExt cfuns[] = {
17987|  6.86k|        JANET_CORE_REG("filewatch/new", cfun_filewatch_make),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
17988|  6.86k|        JANET_CORE_REG("filewatch/add", cfun_filewatch_add),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
17989|  6.86k|        JANET_CORE_REG("filewatch/remove", cfun_filewatch_remove),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
17990|  6.86k|        JANET_CORE_REG("filewatch/listen", cfun_filewatch_listen),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
17991|  6.86k|        JANET_CORE_REG("filewatch/unlisten", cfun_filewatch_unlisten),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
17992|  6.86k|        JANET_REG_END
  ------------------
  |  | 2110|  6.86k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
17993|  6.86k|    };
17994|       |    janet_core_cfuns_ext(env, NULL, cfuns);
17995|  6.86k|}
janet_gcpressure:
18055|  35.4M|void janet_gcpressure(size_t s) {
18056|  35.4M|    janet_vm.next_collection += s;
18057|  35.4M|}
janet_gcalloc:
18529|   131M|void *janet_gcalloc(enum JanetMemoryType type, size_t size) {
18530|   131M|    JanetGCObject *mem;
18531|       |
18532|       |    /* Make sure everything is inited */
18533|   131M|    janet_assert(NULL != janet_vm.cache, "please initialize janet before use");
  ------------------
  |  |  389|   131M|#define janet_assert(c, m) do { \
  |  |  390|   131M|    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: 131M]
  |  |  ------------------
  |  |  391|   131M|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 131M]
  |  |  ------------------
  ------------------
18534|   131M|    mem = janet_malloc(size);
  ------------------
  |  | 2406|   131M|#define janet_malloc(X) malloc((X))
  ------------------
18535|       |
18536|       |    /* Check for bad malloc */
18537|   131M|    if (NULL == mem) {
  ------------------
  |  Branch (18537:9): [True: 0, False: 131M]
  ------------------
18538|      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]
  |  |  ------------------
  ------------------
18539|      0|    }
18540|       |
18541|       |    /* Configure block */
18542|   131M|    mem->flags = type;
18543|       |
18544|       |    /* Prepend block to heap list */
18545|   131M|    janet_vm.next_collection += size;
18546|   131M|    if (type < JANET_MEMORY_TABLE_WEAKK) {
  ------------------
  |  Branch (18546:9): [True: 131M, False: 0]
  ------------------
18547|       |        /* normal heap */
18548|   131M|        mem->data.next = janet_vm.blocks;
18549|   131M|        janet_vm.blocks = mem;
18550|   131M|    } else {
18551|       |        /* weak heap */
18552|      0|        mem->data.next = janet_vm.weak_blocks;
18553|      0|        janet_vm.weak_blocks = mem;
18554|      0|    }
18555|   131M|    janet_vm.block_count++;
18556|       |
18557|   131M|    return (void *)mem;
18558|   131M|}
janet_gcroot:
18619|  13.7k|void janet_gcroot(Janet root) {
18620|  13.7k|    size_t newcount = janet_vm.root_count + 1;
18621|  13.7k|    if (newcount > janet_vm.root_capacity) {
  ------------------
  |  Branch (18621:9): [True: 6.86k, False: 6.86k]
  ------------------
18622|  6.86k|        size_t newcap = 2 * newcount;
18623|  6.86k|        janet_vm.roots = janet_realloc(janet_vm.roots, sizeof(Janet) * newcap);
  ------------------
  |  | 2409|  6.86k|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
18624|  6.86k|        if (NULL == janet_vm.roots) {
  ------------------
  |  Branch (18624:13): [True: 0, False: 6.86k]
  ------------------
18625|      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]
  |  |  ------------------
  ------------------
18626|      0|        }
18627|  6.86k|        janet_vm.root_capacity = newcap;
18628|  6.86k|    }
18629|  13.7k|    janet_vm.roots[janet_vm.root_count] = root;
18630|  13.7k|    janet_vm.root_count = newcount;
18631|  13.7k|}
janet_clear_memory:
18677|  6.86k|void janet_clear_memory(void) {
18678|  6.86k|#ifdef JANET_EV
18679|  6.86k|    JanetKV *items = janet_vm.threaded_abstracts.data;
18680|  13.7k|    for (int32_t i = 0; i < janet_vm.threaded_abstracts.capacity; i++) {
  ------------------
  |  Branch (18680:25): [True: 6.86k, False: 6.86k]
  ------------------
18681|  6.86k|        if (janet_checktype(items[i].key, JANET_ABSTRACT)) {
  ------------------
  |  |  806|  6.86k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 6.86k]
  |  |  |  Branch (806:6): [Folded, False: 6.86k]
  |  |  ------------------
  |  |  807|  6.86k|        ? 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.86k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  6.86k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  6.86k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  6.86k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  6.86k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18682|      0|            void *abst = janet_unwrap_abstract(items[i].key);
  ------------------
  |  |  866|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
18683|      0|            JanetAbstractHead *head = janet_abstract_head(abst);
  ------------------
  |  | 1897|      0|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  ------------------
18684|      0|            if (head->type->gcperthread) {
  ------------------
  |  Branch (18684:17): [True: 0, False: 0]
  ------------------
18685|      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]
  |  |  ------------------
  ------------------
18686|      0|            }
18687|      0|            janet_abstract_decref_maybe_free(abst);
18688|      0|        }
18689|  6.86k|    }
18690|  6.86k|#endif
18691|  6.86k|    JanetGCObject *current = janet_vm.blocks;
18692|   131M|    while (NULL != current) {
  ------------------
  |  Branch (18692:12): [True: 131M, False: 6.86k]
  ------------------
18693|   131M|        janet_deinit_block(current);
18694|   131M|        JanetGCObject *next = current->data.next;
18695|   131M|        janet_free(current);
  ------------------
  |  | 2415|   131M|#define janet_free(X) free((X))
  ------------------
18696|   131M|        current = next;
18697|   131M|    }
18698|  6.86k|    janet_vm.blocks = NULL;
18699|  6.86k|    janet_free_all_scratch();
18700|  6.86k|    janet_free(janet_vm.scratch_mem);
  ------------------
  |  | 2415|  6.86k|#define janet_free(X) free((X))
  ------------------
18701|  6.86k|}
janet_smalloc:
18715|  19.3M|void *janet_smalloc(size_t size) {
18716|  19.3M|    JanetScratch *s = janet_malloc(sizeof(JanetScratch) + size);
  ------------------
  |  | 2406|  19.3M|#define janet_malloc(X) malloc((X))
  ------------------
18717|  19.3M|    if (NULL == s) {
  ------------------
  |  Branch (18717:9): [True: 0, False: 19.3M]
  ------------------
18718|      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]
  |  |  ------------------
  ------------------
18719|      0|    }
18720|  19.3M|    s->finalize = NULL;
18721|  19.3M|    if (janet_vm.scratch_len == janet_vm.scratch_cap) {
  ------------------
  |  Branch (18721:9): [True: 14.3k, False: 19.3M]
  ------------------
18722|  14.3k|        size_t newcap = 2 * janet_vm.scratch_cap + 2;
18723|  14.3k|        JanetScratch **newmem = (JanetScratch **) janet_realloc(janet_vm.scratch_mem, newcap * sizeof(JanetScratch));
  ------------------
  |  | 2409|  14.3k|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
18724|  14.3k|        if (NULL == newmem) {
  ------------------
  |  Branch (18724:13): [True: 0, False: 14.3k]
  ------------------
18725|      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]
  |  |  ------------------
  ------------------
18726|      0|        }
18727|  14.3k|        janet_vm.scratch_cap = newcap;
18728|  14.3k|        janet_vm.scratch_mem = newmem;
18729|  14.3k|    }
18730|  19.3M|    janet_vm.scratch_mem[janet_vm.scratch_len++] = s;
18731|  19.3M|    return (char *)(s->mem);
18732|  19.3M|}
janet_srealloc:
18744|  1.85M|void *janet_srealloc(void *mem, size_t size) {
18745|  1.85M|    if (NULL == mem) return janet_smalloc(size);
  ------------------
  |  Branch (18745:9): [True: 1.64M, False: 213k]
  ------------------
18746|   213k|    JanetScratch *s = janet_mem2scratch(mem);
18747|   213k|    if (janet_vm.scratch_len) {
  ------------------
  |  Branch (18747:9): [True: 213k, False: 0]
  ------------------
18748|   343k|        for (size_t i = janet_vm.scratch_len - 1; ; i--) {
18749|   343k|            if (janet_vm.scratch_mem[i] == s) {
  ------------------
  |  Branch (18749:17): [True: 213k, False: 130k]
  ------------------
18750|   213k|                JanetScratch *news = janet_realloc(s, size + sizeof(JanetScratch));
  ------------------
  |  | 2409|   213k|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
18751|   213k|                if (NULL == news) {
  ------------------
  |  Branch (18751:21): [True: 0, False: 213k]
  ------------------
18752|      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]
  |  |  ------------------
  ------------------
18753|      0|                }
18754|   213k|                janet_vm.scratch_mem[i] = news;
18755|   213k|                return (char *)(news->mem);
18756|   213k|            }
18757|   130k|            if (i == 0) break;
  ------------------
  |  Branch (18757:17): [True: 0, False: 130k]
  ------------------
18758|   130k|        }
18759|   213k|    }
18760|      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]
  |  |  ------------------
  ------------------
18761|      0|}
janet_sfree:
18768|  17.7M|void janet_sfree(void *mem) {
18769|  17.7M|    if (NULL == mem) return;
  ------------------
  |  Branch (18769:9): [True: 0, False: 17.7M]
  ------------------
18770|  17.7M|    JanetScratch *s = janet_mem2scratch(mem);
18771|  17.7M|    if (janet_vm.scratch_len) {
  ------------------
  |  Branch (18771:9): [True: 17.7M, False: 0]
  ------------------
18772|  21.2M|        for (size_t i = janet_vm.scratch_len - 1; ; i--) {
18773|  21.2M|            if (janet_vm.scratch_mem[i] == s) {
  ------------------
  |  Branch (18773:17): [True: 17.7M, False: 3.53M]
  ------------------
18774|  17.7M|                janet_vm.scratch_mem[i] = janet_vm.scratch_mem[--janet_vm.scratch_len];
18775|  17.7M|                free_one_scratch(s);
18776|  17.7M|                return;
18777|  17.7M|            }
18778|  3.53M|            if (i == 0) break;
  ------------------
  |  Branch (18778:17): [True: 0, False: 3.53M]
  ------------------
18779|  3.53M|        }
18780|  17.7M|    }
18781|      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]
  |  |  ------------------
  ------------------
18782|      0|}
janet_wrap_s64:
18967|  2.14k|Janet janet_wrap_s64(int64_t x) {
18968|  2.14k|    int64_t *box = janet_abstract(&janet_s64_type, sizeof(int64_t));
18969|  2.14k|    *box = (int64_t)x;
18970|  2.14k|    return janet_wrap_abstract(box);
  ------------------
  |  |  851|  2.14k|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|  2.14k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.14k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.14k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18971|  2.14k|}
janet_wrap_u64:
18973|  2.49k|Janet janet_wrap_u64(uint64_t x) {
18974|  2.49k|    uint64_t *box = janet_abstract(&janet_u64_type, sizeof(uint64_t));
18975|  2.49k|    *box = (uint64_t)x;
18976|  2.49k|    return janet_wrap_abstract(box);
  ------------------
  |  |  851|  2.49k|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|  2.49k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.49k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.49k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18977|  2.49k|}
janet_lib_inttypes:
19465|  6.86k|void janet_lib_inttypes(JanetTable *env) {
19466|  6.86k|    JanetRegExt it_cfuns[] = {
19467|  6.86k|        JANET_CORE_REG("int/s64", cfun_it_s64_new),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
19468|  6.86k|        JANET_CORE_REG("int/u64", cfun_it_u64_new),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
19469|  6.86k|        JANET_CORE_REG("int/to-number", cfun_to_number),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
19470|  6.86k|        JANET_CORE_REG("int/to-bytes", cfun_to_bytes),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
19471|  6.86k|        JANET_REG_END
  ------------------
  |  | 2110|  6.86k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
19472|  6.86k|    };
19473|       |    janet_core_cfuns_ext(env, NULL, it_cfuns);
19474|  6.86k|    janet_register_abstract_type(&janet_s64_type);
19475|  6.86k|    janet_register_abstract_type(&janet_u64_type);
19476|  6.86k|}
janet_file_close:
19792|  20.5k|int janet_file_close(JanetFile *file) {
19793|  20.5k|    int ret = 0;
19794|  20.5k|    if (!(file->flags & (JANET_FILE_NOT_CLOSEABLE | JANET_FILE_CLOSED))) {
  ------------------
  |  | 2278|  20.5k|#define JANET_FILE_NOT_CLOSEABLE 16
  ------------------
                  if (!(file->flags & (JANET_FILE_NOT_CLOSEABLE | JANET_FILE_CLOSED))) {
  ------------------
  |  | 2279|  20.5k|#define JANET_FILE_CLOSED 32
  ------------------
  |  Branch (19794:9): [True: 0, False: 20.5k]
  ------------------
19795|      0|        ret = fclose(file->file);
19796|      0|        file->flags |= JANET_FILE_CLOSED;
  ------------------
  |  | 2279|      0|#define JANET_FILE_CLOSED 32
  ------------------
19797|      0|        file->file = NULL; /* NULL dereference is easier to debug then other problems */
19798|      0|        return ret;
19799|      0|    }
19800|  20.5k|    return 0;
19801|  20.5k|}
janet_dynprintf:
20230|  16.6M|void janet_dynprintf(const char *name, FILE *dflt_file, const char *format, ...) {
20231|  16.6M|    va_list args;
20232|  16.6M|    va_start(args, format);
20233|  16.6M|    JanetType xtype;
20234|  16.6M|    Janet x;
20235|  16.6M|    if (!name || name[0] == '\0') { /* Allow NULL or empty string to just use dflt_file directly */
  ------------------
  |  Branch (20235:9): [True: 0, False: 16.6M]
  |  Branch (20235:18): [True: 0, False: 16.6M]
  ------------------
20236|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20237|      0|        xtype = JANET_NIL;
20238|  16.6M|    } else {
20239|  16.6M|        x = janet_dyn(name);
20240|  16.6M|        xtype = janet_type(x);
  ------------------
  |  |  795|  16.6M|    (isnan((x).number) \
  |  |  796|  16.6M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  16.6M|        : JANET_NUMBER)
  ------------------
  |  Branch (20240:17): [True: 16.6M, False: 0]
  ------------------
20241|  16.6M|    }
20242|  16.6M|    switch (xtype) {
20243|      0|        default:
  ------------------
  |  Branch (20243:9): [True: 0, False: 16.6M]
  ------------------
20244|       |            /* Other values simply do nothing */
20245|      0|            break;
20246|  16.6M|        case JANET_NIL:
  ------------------
  |  Branch (20246:9): [True: 16.6M, False: 0]
  ------------------
20247|  16.6M|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (20247:9): [True: 0, False: 16.6M]
  ------------------
20248|  16.6M|            FILE *f = dflt_file;
20249|  16.6M|            JanetBuffer buffer;
20250|  16.6M|            int32_t len = 0;
20251|   209M|            while (format[len]) len++;
  ------------------
  |  Branch (20251:20): [True: 192M, False: 16.6M]
  ------------------
20252|  16.6M|            janet_buffer_init(&buffer, len);
20253|  16.6M|            janet_formatbv(&buffer, format, args);
20254|  16.6M|            if (xtype == JANET_ABSTRACT) {
  ------------------
  |  Branch (20254:17): [True: 0, False: 16.6M]
  ------------------
20255|      0|                void *abstract = janet_unwrap_abstract(x);
  ------------------
  |  |  866|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
20256|      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 (20256:21): [True: 0, False: 0]
  ------------------
20257|      0|                    break;
20258|      0|                JanetFile *iofile = abstract;
20259|      0|                io_assert_writeable(iofile);
20260|      0|                f = iofile->file;
20261|      0|            }
20262|  16.6M|            fwrite(buffer.data, buffer.count, 1, f);
20263|  16.6M|            janet_buffer_deinit(&buffer);
20264|  16.6M|            break;
20265|  16.6M|        }
20266|      0|        case JANET_FUNCTION: {
  ------------------
  |  Branch (20266:9): [True: 0, False: 16.6M]
  ------------------
20267|      0|            JanetFunction *fun = janet_unwrap_function(x);
  ------------------
  |  |  868|      0|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
20268|      0|            int32_t len = 0;
20269|      0|            while (format[len]) len++;
  ------------------
  |  Branch (20269:20): [True: 0, False: 0]
  ------------------
20270|      0|            JanetBuffer *buf = janet_buffer(len);
20271|      0|            janet_formatbv(buf, format, args);
20272|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20273|      0|            janet_call(fun, 1, args);
20274|      0|            break;
20275|  16.6M|        }
20276|      0|        case JANET_BUFFER:
  ------------------
  |  Branch (20276:9): [True: 0, False: 16.6M]
  ------------------
20277|      0|            janet_formatbv(janet_unwrap_buffer(x), format, args);
  ------------------
  |  |  862|      0|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
20278|      0|            break;
20279|  16.6M|    }
20280|  16.6M|    va_end(args);
20281|  16.6M|    return;
20282|  16.6M|}
janet_makefile:
20300|  20.5k|Janet janet_makefile(FILE *f, int32_t flags) {
20301|  20.5k|    return janet_wrap_abstract(makef(f, flags, BUFSIZ));
  ------------------
  |  |  851|  20.5k|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|  20.5k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  20.5k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  20.5k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20302|  20.5k|}
janet_lib_io:
20315|  6.86k|void janet_lib_io(JanetTable *env) {
20316|  6.86k|    JanetRegExt io_cfuns[] = {
20317|  6.86k|        JANET_CORE_REG("print", cfun_io_print),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20318|  6.86k|        JANET_CORE_REG("prin", cfun_io_prin),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20319|  6.86k|        JANET_CORE_REG("printf", cfun_io_printf),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20320|  6.86k|        JANET_CORE_REG("prinf", cfun_io_prinf),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20321|  6.86k|        JANET_CORE_REG("eprin", cfun_io_eprin),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20322|  6.86k|        JANET_CORE_REG("eprint", cfun_io_eprint),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20323|  6.86k|        JANET_CORE_REG("eprintf", cfun_io_eprintf),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20324|  6.86k|        JANET_CORE_REG("eprinf", cfun_io_eprinf),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20325|  6.86k|        JANET_CORE_REG("xprint", cfun_io_xprint),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20326|  6.86k|        JANET_CORE_REG("xprin", cfun_io_xprin),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20327|  6.86k|        JANET_CORE_REG("xprintf", cfun_io_xprintf),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20328|  6.86k|        JANET_CORE_REG("xprinf", cfun_io_xprinf),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20329|  6.86k|        JANET_CORE_REG("flush", cfun_io_flush),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20330|  6.86k|        JANET_CORE_REG("eflush", cfun_io_eflush),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20331|  6.86k|        JANET_CORE_REG("file/temp", cfun_io_temp),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20332|  6.86k|        JANET_CORE_REG("file/open", cfun_io_fopen),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20333|  6.86k|        JANET_CORE_REG("file/close", cfun_io_fclose),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20334|  6.86k|        JANET_CORE_REG("file/read", cfun_io_fread),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20335|  6.86k|        JANET_CORE_REG("file/write", cfun_io_fwrite),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20336|  6.86k|        JANET_CORE_REG("file/flush", cfun_io_fflush),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20337|  6.86k|        JANET_CORE_REG("file/seek", cfun_io_fseek),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20338|  6.86k|        JANET_CORE_REG("file/tell", cfun_io_ftell),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20339|  6.86k|        JANET_REG_END
  ------------------
  |  | 2110|  6.86k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
20340|  6.86k|    };
20341|  6.86k|    janet_core_cfuns_ext(env, NULL, io_cfuns);
20342|  6.86k|    janet_register_abstract_type(&janet_file_type);
20343|  6.86k|    int default_flags = JANET_FILE_NOT_CLOSEABLE | JANET_FILE_SERIALIZABLE;
  ------------------
  |  | 2278|  6.86k|#define JANET_FILE_NOT_CLOSEABLE 16
  ------------------
                  int default_flags = JANET_FILE_NOT_CLOSEABLE | JANET_FILE_SERIALIZABLE;
  ------------------
  |  | 2281|  6.86k|#define JANET_FILE_SERIALIZABLE 128
  ------------------
20344|       |    /* stdout */
20345|  6.86k|    JANET_CORE_DEF(env, "stdout",
  ------------------
  |  |  491|  6.86k|#define JANET_CORE_DEF(ENV, NAME, X, DOC) janet_core_def_sm(ENV, NAME, X, DOC, NULL, 0)
  ------------------
20346|  6.86k|                   janet_makefile(stdout, JANET_FILE_APPEND | default_flags),
20347|  6.86k|                   "The standard output file.");
20348|       |    /* stderr */
20349|  6.86k|    JANET_CORE_DEF(env, "stderr",
  ------------------
  |  |  491|  6.86k|#define JANET_CORE_DEF(ENV, NAME, X, DOC) janet_core_def_sm(ENV, NAME, X, DOC, NULL, 0)
  ------------------
20350|  6.86k|                   janet_makefile(stderr, JANET_FILE_APPEND | default_flags),
20351|  6.86k|                   "The standard error file.");
20352|       |    /* stdin */
20353|  6.86k|    JANET_CORE_DEF(env, "stdin",
  ------------------
  |  |  491|  6.86k|#define JANET_CORE_DEF(ENV, NAME, X, DOC) janet_core_def_sm(ENV, NAME, X, DOC, NULL, 0)
  ------------------
20354|  6.86k|                   janet_makefile(stdin, JANET_FILE_READ | default_flags),
20355|  6.86k|                   "The standard input file.");
20356|       |
20357|  6.86k|}
janet_unmarshal:
22033|  6.86k|    const uint8_t **next) {
22034|  6.86k|    UnmarshalState st;
22035|  6.86k|    st.start = bytes;
22036|  6.86k|    st.end = bytes + len;
22037|  6.86k|    st.lookup_defs = NULL;
22038|  6.86k|    st.lookup_envs = NULL;
22039|  6.86k|    st.lookup = NULL;
22040|  6.86k|    st.reg = reg;
22041|  6.86k|    Janet out;
22042|  6.86k|    const uint8_t *nextbytes = unmarshal_one(&st, bytes, &out, flags);
22043|  6.86k|    if (next) *next = nextbytes;
  ------------------
  |  Branch (22043:9): [True: 0, False: 6.86k]
  ------------------
22044|  6.86k|    janet_v_free(st.lookup_defs);
  ------------------
  |  |  733|  6.86k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  741|  6.86k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (733:34): [True: 6.86k, False: 0]
  |  |  ------------------
  ------------------
22045|  6.86k|    janet_v_free(st.lookup_envs);
  ------------------
  |  |  733|  6.86k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  741|  6.86k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (733:34): [True: 6.86k, False: 0]
  |  |  ------------------
  ------------------
22046|       |    janet_v_free(st.lookup);
  ------------------
  |  |  733|  6.86k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  741|  6.86k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (733:34): [True: 6.86k, False: 0]
  |  |  ------------------
  ------------------
22047|  6.86k|    return out;
22048|  6.86k|}
janet_lib_marsh:
22109|  6.86k|void janet_lib_marsh(JanetTable *env) {
22110|  6.86k|    JanetRegExt marsh_cfuns[] = {
22111|  6.86k|        JANET_CORE_REG("marshal", cfun_marshal),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22112|  6.86k|        JANET_CORE_REG("unmarshal", cfun_unmarshal),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22113|  6.86k|        JANET_CORE_REG("env-lookup", cfun_env_lookup),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22114|  6.86k|        JANET_REG_END
  ------------------
  |  | 2110|  6.86k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
22115|  6.86k|    };
22116|       |    janet_core_cfuns_ext(env, NULL, marsh_cfuns);
22117|  6.86k|}
janet_default_rng:
22192|  6.86k|JanetRNG *janet_default_rng(void) {
22193|  6.86k|    return &janet_vm.rng;
22194|  6.86k|}
janet_rng_seed:
22196|  13.7k|void janet_rng_seed(JanetRNG *rng, uint32_t seed) {
22197|  13.7k|    rng->a = seed;
22198|  13.7k|    rng->b = 0x97654321u;
22199|  13.7k|    rng->c = 123871873u;
22200|  13.7k|    rng->d = 0xf23f56c8u;
22201|  13.7k|    rng->counter = 0u;
22202|       |    /* First several numbers aren't that random. */
22203|   233k|    for (int i = 0; i < 16; i++) janet_rng_u32(rng);
  ------------------
  |  Branch (22203:21): [True: 219k, False: 13.7k]
  ------------------
22204|  13.7k|}
janet_rng_u32:
22220|   219k|uint32_t janet_rng_u32(JanetRNG *rng) {
22221|       |    /* Algorithm "xorwow" from p. 5 of Marsaglia, "Xorshift RNGs" */
22222|   219k|    uint32_t t = rng->d;
22223|   219k|    uint32_t const s = rng->a;
22224|   219k|    rng->d = rng->c;
22225|   219k|    rng->c = rng->b;
22226|   219k|    rng->b = s;
22227|   219k|    t ^= t >> 2;
22228|   219k|    t ^= t << 1;
22229|   219k|    t ^= s ^ (s << 4);
22230|   219k|    rng->a = t;
22231|   219k|    rng->counter += 362437;
22232|   219k|    return t + rng->counter;
22233|   219k|}
janet_lib_math:
22500|  6.86k|void janet_lib_math(JanetTable *env) {
22501|  6.86k|    JanetRegExt math_cfuns[] = {
22502|  6.86k|        JANET_CORE_REG("not", janet_not),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22503|  6.86k|        JANET_CORE_REG("math/random", janet_rand),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22504|  6.86k|        JANET_CORE_REG("math/seedrandom", janet_srand),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22505|  6.86k|        JANET_CORE_REG("math/cos", janet_cos),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22506|  6.86k|        JANET_CORE_REG("math/sin", janet_sin),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22507|  6.86k|        JANET_CORE_REG("math/tan", janet_tan),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22508|  6.86k|        JANET_CORE_REG("math/acos", janet_acos),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22509|  6.86k|        JANET_CORE_REG("math/asin", janet_asin),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22510|  6.86k|        JANET_CORE_REG("math/atan", janet_atan),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22511|  6.86k|        JANET_CORE_REG("math/exp", janet_exp),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22512|  6.86k|        JANET_CORE_REG("math/log", janet_log),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22513|  6.86k|        JANET_CORE_REG("math/log10", janet_log10),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22514|  6.86k|        JANET_CORE_REG("math/log2", janet_log2),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22515|  6.86k|        JANET_CORE_REG("math/sqrt", janet_sqrt),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22516|  6.86k|#ifndef JANET_PLAN9
22517|  6.86k|        JANET_CORE_REG("math/cbrt", janet_cbrt),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22518|  6.86k|        JANET_CORE_REG("math/gamma", janet_tgamma),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22519|  6.86k|        JANET_CORE_REG("math/log-gamma", janet_lgamma),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22520|  6.86k|        JANET_CORE_REG("math/erfc", janet_erfc),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22521|  6.86k|        JANET_CORE_REG("math/erf", janet_erf),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22522|  6.86k|        JANET_CORE_REG("math/expm1", janet_expm1),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22523|  6.86k|        JANET_CORE_REG("math/atanh", janet_atanh),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22524|  6.86k|        JANET_CORE_REG("math/asinh", janet_asinh),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22525|  6.86k|        JANET_CORE_REG("math/next", janet_nextafter),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22526|  6.86k|#endif
22527|  6.86k|        JANET_CORE_REG("math/floor", janet_floor),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22528|  6.86k|        JANET_CORE_REG("math/ceil", janet_ceil),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22529|  6.86k|        JANET_CORE_REG("math/pow", janet_pow),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22530|  6.86k|        JANET_CORE_REG("math/abs", janet_fabs),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22531|  6.86k|        JANET_CORE_REG("math/sinh", janet_sinh),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22532|  6.86k|        JANET_CORE_REG("math/cosh", janet_cosh),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22533|  6.86k|        JANET_CORE_REG("math/tanh", janet_tanh),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22534|  6.86k|        JANET_CORE_REG("math/acosh", janet_acosh),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22535|  6.86k|        JANET_CORE_REG("math/atan2", janet_atan2),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22536|  6.86k|        JANET_CORE_REG("math/rng", cfun_rng_make),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22537|  6.86k|        JANET_CORE_REG("math/rng-uniform", cfun_rng_uniform),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22538|  6.86k|        JANET_CORE_REG("math/rng-int", cfun_rng_int),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22539|  6.86k|        JANET_CORE_REG("math/rng-buffer", cfun_rng_buffer),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22540|  6.86k|        JANET_CORE_REG("math/hypot", janet_hypot),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22541|  6.86k|        JANET_CORE_REG("math/exp2", janet_exp2),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22542|  6.86k|        JANET_CORE_REG("math/log1p", janet_log1p),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22543|  6.86k|        JANET_CORE_REG("math/trunc", janet_trunc),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22544|  6.86k|        JANET_CORE_REG("math/round", janet_round),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22545|  6.86k|        JANET_CORE_REG("math/gcd", janet_cfun_gcd),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22546|  6.86k|        JANET_CORE_REG("math/lcm", janet_cfun_lcm),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22547|  6.86k|        JANET_CORE_REG("math/frexp", janet_cfun_frexp),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22548|  6.86k|        JANET_CORE_REG("math/ldexp", janet_cfun_ldexp),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22549|  6.86k|        JANET_REG_END
  ------------------
  |  | 2110|  6.86k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
22550|  6.86k|    };
22551|  6.86k|    janet_core_cfuns_ext(env, NULL, math_cfuns);
22552|  6.86k|    janet_register_abstract_type(&janet_rng_type);
22553|       |#ifdef JANET_BOOTSTRAP
22554|       |    JANET_CORE_DEF(env, "math/pi", janet_wrap_number(3.1415926535897931),
22555|       |                   "The value pi.");
22556|       |    JANET_CORE_DEF(env, "math/e", janet_wrap_number(2.7182818284590451),
22557|       |                   "The base of the natural log.");
22558|       |    JANET_CORE_DEF(env, "math/inf", janet_wrap_number(INFINITY),
22559|       |                   "The number representing positive infinity");
22560|       |    JANET_CORE_DEF(env, "math/-inf", janet_wrap_number(-INFINITY),
22561|       |                   "The number representing negative infinity");
22562|       |    JANET_CORE_DEF(env, "math/int32-min", janet_wrap_number(INT32_MIN),
22563|       |                   "The minimum contiguous integer representable by a 32 bit signed integer");
22564|       |    JANET_CORE_DEF(env, "math/int32-max", janet_wrap_number(INT32_MAX),
22565|       |                   "The maximum contiguous integer representable by a 32 bit signed integer");
22566|       |    JANET_CORE_DEF(env, "math/int-min", janet_wrap_number(JANET_INTMIN_DOUBLE),
22567|       |                   "The minimum contiguous integer representable by a double (-(2^53))");
22568|       |    JANET_CORE_DEF(env, "math/int-max", janet_wrap_number(JANET_INTMAX_DOUBLE),
22569|       |                   "The maximum contiguous integer representable by a double (2^53)");
22570|       |#ifdef NAN
22571|       |    JANET_CORE_DEF(env, "math/nan", janet_wrap_number(NAN), "Not a number (IEEE-754 NaN)");
22572|       |#else
22573|       |    JANET_CORE_DEF(env, "math/nan", janet_wrap_number(0.0 / 0.0), "Not a number (IEEE-754 NaN)");
22574|       |#endif
22575|       |#endif
22576|  6.86k|}
janet_lib_net:
23861|  6.86k|void janet_lib_net(JanetTable *env) {
23862|  6.86k|    JanetRegExt net_cfuns[] = {
23863|  6.86k|        JANET_CORE_REG("net/address", cfun_net_sockaddr),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23864|  6.86k|        JANET_CORE_REG("net/listen", cfun_net_listen),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23865|  6.86k|        JANET_CORE_REG("net/socket", cfun_net_socket),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23866|  6.86k|        JANET_CORE_REG("net/accept", cfun_stream_accept),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23867|  6.86k|        JANET_CORE_REG("net/accept-loop", cfun_stream_accept_loop),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23868|  6.86k|        JANET_CORE_REG("net/read", cfun_stream_read),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23869|  6.86k|        JANET_CORE_REG("net/chunk", cfun_stream_chunk),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23870|  6.86k|        JANET_CORE_REG("net/write", cfun_stream_write),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23871|  6.86k|        JANET_CORE_REG("net/send-to", cfun_stream_send_to),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23872|  6.86k|        JANET_CORE_REG("net/recv-from", cfun_stream_recv_from),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23873|  6.86k|        JANET_CORE_REG("net/flush", cfun_stream_flush),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23874|  6.86k|        JANET_CORE_REG("net/connect", cfun_net_connect),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23875|  6.86k|        JANET_CORE_REG("net/shutdown", cfun_net_shutdown),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23876|  6.86k|        JANET_CORE_REG("net/peername", cfun_net_getpeername),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23877|  6.86k|        JANET_CORE_REG("net/localname", cfun_net_getsockname),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23878|  6.86k|        JANET_CORE_REG("net/address-unpack", cfun_net_address_unpack),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23879|  6.86k|        JANET_CORE_REG("net/setsockopt", cfun_net_setsockopt),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23880|  6.86k|        JANET_REG_END
  ------------------
  |  | 2110|  6.86k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
23881|  6.86k|    };
23882|       |    janet_core_cfuns_ext(env, NULL, net_cfuns);
23883|  6.86k|}
janet_net_init:
23885|  6.86k|void janet_net_init(void) {
23886|       |#ifdef JANET_WINDOWS
23887|       |    WSADATA wsaData;
23888|       |    janet_assert(!WSAStartup(MAKEWORD(2, 2), &wsaData), "could not start winsock");
23889|       |    janet_vm.connect_ex_loaded = 0;
23890|       |    janet_vm.connect_ex = NULL;
23891|       |#endif
23892|  6.86k|}
janet_net_deinit:
23894|  6.86k|void janet_net_deinit(void) {
23895|       |#ifdef JANET_WINDOWS
23896|       |    WSACleanup();
23897|       |#endif
23898|  6.86k|}
janet_lib_os:
26913|  6.86k|void janet_lib_os(JanetTable *env) {
26914|       |#if !defined(JANET_REDUCED_OS) && defined(JANET_WINDOWS) && defined(JANET_THREADS)
26915|       |    /* During start up, the top-most abstract machine (thread)
26916|       |     * in the thread tree sets up the critical section. */
26917|       |    static volatile long env_lock_initializing = 0;
26918|       |    static volatile long env_lock_initialized = 0;
26919|       |    if (!InterlockedExchange(&env_lock_initializing, 1)) {
26920|       |        InitializeCriticalSection(&env_lock);
26921|       |        InterlockedOr(&env_lock_initialized, 1);
26922|       |    } else {
26923|       |        while (!InterlockedOr(&env_lock_initialized, 0)) {
26924|       |            Sleep(0);
26925|       |        }
26926|       |    }
26927|       |
26928|       |#endif
26929|  6.86k|#ifndef JANET_NO_PROCESSES
26930|  6.86k|#endif
26931|  6.86k|    JanetRegExt os_cfuns[] = {
26932|  6.86k|        JANET_CORE_REG("os/exit", os_exit),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26933|  6.86k|        JANET_CORE_REG("os/which", os_which),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26934|  6.86k|        JANET_CORE_REG("os/arch", os_arch),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26935|  6.86k|        JANET_CORE_REG("os/compiler", os_compiler),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26936|  6.86k|#ifndef JANET_REDUCED_OS
26937|       |
26938|       |        /* misc (un-sandboxed) */
26939|  6.86k|        JANET_CORE_REG("os/cpu-count", os_cpu_count),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26940|  6.86k|        JANET_CORE_REG("os/cwd", os_cwd),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26941|  6.86k|        JANET_CORE_REG("os/cryptorand", os_cryptorand),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26942|  6.86k|        JANET_CORE_REG("os/perm-string", os_permission_string),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26943|  6.86k|        JANET_CORE_REG("os/perm-int", os_permission_int),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26944|  6.86k|        JANET_CORE_REG("os/mktime", os_mktime),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26945|  6.86k|        JANET_CORE_REG("os/time", os_time), /* not high resolution */
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26946|  6.86k|        JANET_CORE_REG("os/date", os_date), /* not high resolution */
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26947|  6.86k|        JANET_CORE_REG("os/strftime", os_strftime),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26948|  6.86k|        JANET_CORE_REG("os/sleep", os_sleep),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26949|  6.86k|        JANET_CORE_REG("os/isatty", os_isatty),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26950|  6.86k|#ifndef JANET_NO_LOCALES
26951|  6.86k|        JANET_CORE_REG("os/setlocale", os_setlocale),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26952|  6.86k|#endif
26953|       |
26954|       |        /* env functions */
26955|  6.86k|#ifndef JANET_PLAN9
26956|  6.86k|        JANET_CORE_REG("os/environ", os_environ),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26957|  6.86k|#endif
26958|  6.86k|        JANET_CORE_REG("os/getenv", os_getenv),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26959|  6.86k|        JANET_CORE_REG("os/setenv", os_setenv),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26960|       |
26961|       |        /* fs read */
26962|  6.86k|        JANET_CORE_REG("os/dir", os_dir),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26963|  6.86k|        JANET_CORE_REG("os/stat", os_stat),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26964|  6.86k|        JANET_CORE_REG("os/lstat", os_lstat),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26965|  6.86k|        JANET_CORE_REG("os/realpath", os_realpath),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26966|  6.86k|        JANET_CORE_REG("os/cd", os_cd),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26967|  6.86k|#ifndef JANET_NO_UMASK
26968|  6.86k|        JANET_CORE_REG("os/umask", os_umask),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26969|  6.86k|#endif
26970|  6.86k|#ifndef JANET_NO_SYMLINKS
26971|  6.86k|        JANET_CORE_REG("os/readlink", os_readlink),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26972|  6.86k|#endif
26973|       |
26974|       |        /* fs write */
26975|  6.86k|        JANET_CORE_REG("os/mkdir", os_mkdir),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26976|  6.86k|        JANET_CORE_REG("os/rmdir", os_rmdir),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26977|  6.86k|        JANET_CORE_REG("os/rm", os_remove),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26978|  6.86k|        JANET_CORE_REG("os/link", os_link),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26979|  6.86k|        JANET_CORE_REG("os/rename", os_rename),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26980|  6.86k|        JANET_CORE_REG("os/chmod", os_chmod),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26981|  6.86k|        JANET_CORE_REG("os/touch", os_touch),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26982|  6.86k|#ifndef JANET_NO_SYMLINKS
26983|  6.86k|        JANET_CORE_REG("os/symlink", os_symlink),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26984|  6.86k|#endif
26985|       |
26986|       |        /* processes */
26987|  6.86k|#ifndef JANET_NO_PROCESSES
26988|  6.86k|        JANET_CORE_REG("os/execute", os_execute),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26989|  6.86k|        JANET_CORE_REG("os/spawn", os_spawn),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26990|  6.86k|        JANET_CORE_REG("os/shell", os_shell),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26991|  6.86k|        JANET_CORE_REG("os/posix-fork", os_posix_fork),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26992|  6.86k|        JANET_CORE_REG("os/posix-exec", os_posix_exec),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26993|  6.86k|        JANET_CORE_REG("os/posix-chroot", os_posix_chroot),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26994|       |        /* no need to sandbox process management if you can't create processes
26995|       |         * (allows for limited functionality if use exposes C-functions to create specific processes) */
26996|  6.86k|        JANET_CORE_REG("os/proc-wait", os_proc_wait),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26997|  6.86k|        JANET_CORE_REG("os/proc-kill", os_proc_kill),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26998|  6.86k|        JANET_CORE_REG("os/proc-close", os_proc_close),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26999|  6.86k|        JANET_CORE_REG("os/getpid", os_proc_getpid),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
27000|  6.86k|#ifdef JANET_EV
27001|  6.86k|        JANET_CORE_REG("os/sigaction", os_sigaction),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
27002|  6.86k|#endif
27003|  6.86k|#endif
27004|       |
27005|       |        /* high resolution timers */
27006|  6.86k|        JANET_CORE_REG("os/clock", os_clock),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
27007|       |
27008|  6.86k|#ifdef JANET_EV
27009|  6.86k|        JANET_CORE_REG("os/open", os_open), /* fs read and write */
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
27010|  6.86k|        JANET_CORE_REG("os/pipe", os_pipe),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
27011|  6.86k|#endif
27012|  6.86k|#endif
27013|  6.86k|        JANET_REG_END
  ------------------
  |  | 2110|  6.86k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
27014|  6.86k|    };
27015|       |    janet_core_cfuns_ext(env, NULL, os_cfuns);
27016|  6.86k|}
janet_is_symbol_char:
27076|   182k|int janet_is_symbol_char(uint8_t c) {
27077|   182k|    return symchars[c >> 5] & ((uint32_t)1 << (c & 0x1F));
27078|   182k|}
janet_valid_utf8:
27083|    952|int janet_valid_utf8(const uint8_t *str, int32_t len) {
27084|    952|    int32_t i = 0;
27085|    952|    int32_t j;
27086|  4.11k|    while (i < len) {
  ------------------
  |  Branch (27086:12): [True: 3.51k, False: 600]
  ------------------
27087|  3.51k|        int32_t nexti;
27088|  3.51k|        uint8_t c = str[i];
27089|       |
27090|       |        /* Check the number of bytes in code point */
27091|  3.51k|        if (c < 0x80) nexti = i + 1;
  ------------------
  |  Branch (27091:13): [True: 2.09k, False: 1.41k]
  ------------------
27092|  1.41k|        else if ((c >> 5) == 0x06) nexti = i + 2;
  ------------------
  |  Branch (27092:18): [True: 580, False: 837]
  ------------------
27093|    837|        else if ((c >> 4) == 0x0E) nexti = i + 3;
  ------------------
  |  Branch (27093:18): [True: 323, False: 514]
  ------------------
27094|    514|        else if ((c >> 3) == 0x1E) nexti = i + 4;
  ------------------
  |  Branch (27094:18): [True: 345, False: 169]
  ------------------
27095|       |        /* Don't allow 5 or 6 byte code points */
27096|    169|        else return 0;
27097|       |
27098|       |        /* No overflow */
27099|  3.34k|        if (nexti > len) return 0;
  ------------------
  |  Branch (27099:13): [True: 94, False: 3.25k]
  ------------------
27100|       |
27101|       |        /* Ensure trailing bytes are well formed (10XX XXXX) */
27102|  5.24k|        for (j = i + 1; j < nexti; j++) {
  ------------------
  |  Branch (27102:25): [True: 2.06k, False: 3.18k]
  ------------------
27103|  2.06k|            if ((str[j] >> 6) != 2) return 0;
  ------------------
  |  Branch (27103:17): [True: 71, False: 1.99k]
  ------------------
27104|  2.06k|        }
27105|       |
27106|       |        /* Check for overlong encoding */
27107|  3.18k|        if ((nexti == i + 2) && str[i] < 0xC2) return 0;
  ------------------
  |  Branch (27107:13): [True: 488, False: 2.69k]
  |  Branch (27107:33): [True: 4, False: 484]
  ------------------
27108|  3.17k|        if ((str[i] == 0xE0) && str[i + 1] < 0xA0) return 0;
  ------------------
  |  Branch (27108:13): [True: 210, False: 2.96k]
  |  Branch (27108:33): [True: 12, False: 198]
  ------------------
27109|  3.16k|        if ((str[i] == 0xF0) && str[i + 1] < 0x90) return 0;
  ------------------
  |  Branch (27109:13): [True: 134, False: 3.03k]
  |  Branch (27109:33): [True: 2, False: 132]
  ------------------
27110|       |
27111|  3.16k|        i = nexti;
27112|  3.16k|    }
27113|    600|    return 1;
27114|    952|}
janet_parser_consume:
27718|   257k|void janet_parser_consume(JanetParser *parser, uint8_t c) {
27719|   257k|    int consumed = 0;
27720|   257k|    janet_parser_checkdead(parser);
27721|   257k|    if (c == '\r') {
  ------------------
  |  Branch (27721:9): [True: 4.30k, False: 252k]
  ------------------
27722|  4.30k|        parser->line++;
27723|  4.30k|        parser->column = 0;
27724|   252k|    } else if (c == '\n') {
  ------------------
  |  Branch (27724:16): [True: 10.3k, False: 242k]
  ------------------
27725|  10.3k|        parser->column = 0;
27726|  10.3k|        if (parser->lookback != '\r')
  ------------------
  |  Branch (27726:13): [True: 9.88k, False: 439]
  ------------------
27727|  9.88k|            parser->line++;
27728|   242k|    } else {
27729|   242k|        parser->column++;
27730|   242k|    }
27731|   588k|    while (!consumed && !parser->error) {
  ------------------
  |  Branch (27731:12): [True: 332k, False: 256k]
  |  Branch (27731:25): [True: 331k, False: 726]
  ------------------
27732|   331k|        JanetParseState *state = parser->states + parser->statecount - 1;
27733|   331k|        consumed = state->consumer(parser, state, c);
27734|   331k|    }
27735|   257k|    parser->lookback = c;
27736|   257k|}
janet_parser_eof:
27738|  6.36k|void janet_parser_eof(JanetParser *parser) {
27739|  6.36k|    janet_parser_checkdead(parser);
27740|  6.36k|    size_t oldcolumn = parser->column;
27741|  6.36k|    size_t oldline = parser->line;
27742|  6.36k|    janet_parser_consume(parser, '\n');
27743|  6.36k|    if (parser->statecount > 1) {
  ------------------
  |  Branch (27743:9): [True: 1.42k, False: 4.94k]
  ------------------
27744|  1.42k|        delim_error(parser, parser->statecount - 1, 0, "unexpected end of source");
27745|  1.42k|    }
27746|  6.36k|    parser->line = oldline;
27747|  6.36k|    parser->column = oldcolumn;
27748|  6.36k|    parser->flag |= JANET_PARSER_DEAD;
  ------------------
  |  |27050|  6.36k|#define JANET_PARSER_DEAD 0x1
  ------------------
27749|  6.36k|}
janet_parser_status:
27751|   264k|enum JanetParserStatus janet_parser_status(JanetParser *parser) {
27752|   264k|    if (parser->error) return JANET_PARSE_ERROR;
  ------------------
  |  Branch (27752:9): [True: 2.93k, False: 261k]
  ------------------
27753|   261k|    if (parser->flag) return JANET_PARSE_DEAD;
  ------------------
  |  Branch (27753:9): [True: 4.94k, False: 256k]
  ------------------
27754|   256k|    if (parser->statecount > 1) return JANET_PARSE_PENDING;
  ------------------
  |  Branch (27754:9): [True: 242k, False: 14.2k]
  ------------------
27755|  14.2k|    return JANET_PARSE_ROOT;
27756|   256k|}
janet_parser_produce:
27777|  4.85k|Janet janet_parser_produce(JanetParser *parser) {
27778|  4.85k|    Janet ret;
27779|  4.85k|    size_t i;
27780|  4.85k|    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 (27780:9): [True: 0, False: 4.85k]
  ------------------
27781|  4.85k|    ret = janet_unwrap_tuple(parser->args[0])[0];
  ------------------
  |  |  858|  4.85k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
27782|  10.4k|    for (i = 1; i < parser->argcount; i++) {
  ------------------
  |  Branch (27782:17): [True: 5.63k, False: 4.85k]
  ------------------
27783|  5.63k|        parser->args[i - 1] = parser->args[i];
27784|  5.63k|    }
27785|  4.85k|    parser->pending--;
27786|  4.85k|    parser->argcount--;
27787|  4.85k|    parser->states[0].argn--;
27788|  4.85k|    return ret;
27789|  4.85k|}
janet_parser_init:
27805|  6.86k|void janet_parser_init(JanetParser *parser) {
27806|  6.86k|    parser->args = NULL;
27807|  6.86k|    parser->states = NULL;
27808|  6.86k|    parser->buf = NULL;
27809|  6.86k|    parser->argcount = 0;
27810|  6.86k|    parser->argcap = 0;
27811|  6.86k|    parser->bufcount = 0;
27812|  6.86k|    parser->bufcap = 0;
27813|  6.86k|    parser->statecount = 0;
27814|  6.86k|    parser->statecap = 0;
27815|  6.86k|    parser->error = NULL;
27816|  6.86k|    parser->lookback = -1;
27817|  6.86k|    parser->line = 1;
27818|  6.86k|    parser->column = 0;
27819|  6.86k|    parser->pending = 0;
27820|  6.86k|    parser->flag = 0;
27821|       |
27822|  6.86k|    pushstate(parser, root, PFLAG_CONTAINER);
  ------------------
  |  |27155|  6.86k|#define PFLAG_CONTAINER 0x100
  ------------------
27823|  6.86k|}
janet_parser_deinit:
27825|  6.86k|void janet_parser_deinit(JanetParser *parser) {
27826|  6.86k|    janet_free(parser->args);
  ------------------
  |  | 2415|  6.86k|#define janet_free(X) free((X))
  ------------------
27827|  6.86k|    janet_free(parser->buf);
  ------------------
  |  | 2415|  6.86k|#define janet_free(X) free((X))
  ------------------
27828|  6.86k|    janet_free(parser->states);
  ------------------
  |  | 2415|  6.86k|#define janet_free(X) free((X))
  ------------------
27829|  6.86k|}
janet_parser_has_more:
27876|  4.94k|int janet_parser_has_more(JanetParser *parser) {
27877|  4.94k|    return !!parser->pending;
27878|  4.94k|}
janet_lib_parse:
28330|  6.86k|void janet_lib_parse(JanetTable *env) {
28331|  6.86k|    JanetRegExt parse_cfuns[] = {
28332|  6.86k|        JANET_CORE_REG("parser/new", cfun_parse_parser),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28333|  6.86k|        JANET_CORE_REG("parser/clone", cfun_parse_clone),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28334|  6.86k|        JANET_CORE_REG("parser/has-more", cfun_parse_has_more),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28335|  6.86k|        JANET_CORE_REG("parser/produce", cfun_parse_produce),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28336|  6.86k|        JANET_CORE_REG("parser/consume", cfun_parse_consume),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28337|  6.86k|        JANET_CORE_REG("parser/byte", cfun_parse_byte),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28338|  6.86k|        JANET_CORE_REG("parser/error", cfun_parse_error),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28339|  6.86k|        JANET_CORE_REG("parser/status", cfun_parse_status),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28340|  6.86k|        JANET_CORE_REG("parser/flush", cfun_parse_flush),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28341|  6.86k|        JANET_CORE_REG("parser/state", cfun_parse_state),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28342|  6.86k|        JANET_CORE_REG("parser/where", cfun_parse_where),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28343|  6.86k|        JANET_CORE_REG("parser/eof", cfun_parse_eof),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28344|  6.86k|        JANET_CORE_REG("parser/insert", cfun_parse_insert),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28345|  6.86k|        JANET_REG_END
  ------------------
  |  | 2110|  6.86k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
28346|  6.86k|    };
28347|       |    janet_core_cfuns_ext(env, NULL, parse_cfuns);
28348|  6.86k|}
cfun_peg_match:
30387|  4.85k|              "Returns nil if text does not match the language defined by peg. The syntax of PEGs is documented on the Janet website.") {
30388|  4.85k|    PegCall c = peg_cfun_init(argc, argv, 0);
30389|  4.85k|    PEG_TRY_SETUP
  ------------------
  |  |30370|  4.85k|    JanetTryState tstate; \
  |  |30371|  4.85k|    if (c.input_buffer && janet_try(&tstate)) { \
  |  |  ------------------
  |  |  |  | 1981|      0|#define janet_try(state) (janet_try_init(state), (JanetSignal) setjmp((state)->buf))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1981:26): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (30371:9): [True: 0, False: 4.85k]
  |  |  ------------------
  |  |30372|      0|        c.input_buffer->gc.flags = c.old_flags; \
  |  |30373|      0|        Janet result = *janet_vm.return_reg; \
  |  |30374|      0|        janet_restore(&tstate); \
  |  |30375|      0|        janet_panicv(result); /* re-raise */ \
  |  |30376|      0|    }
  ------------------
30390|  4.85k|    const uint8_t *result = peg_rule(&c.s, c.s.bytecode, c.bytes.bytes + c.start);
30391|  4.85k|    PEG_TRY_TEARDOWN
  ------------------
  |  |30379|  4.85k|    if (c.input_buffer) { \
  |  |  ------------------
  |  |  |  Branch (30379:9): [True: 0, False: 4.85k]
  |  |  ------------------
  |  |30380|      0|        janet_restore(&tstate); \
  |  |30381|      0|        c.input_buffer->gc.flags = c.old_flags; \
  |  |30382|      0|    }
  ------------------
30392|  4.85k|    return result ? janet_wrap_array(c.s.captures) : janet_wrap_nil();
  ------------------
  |  |  845|  1.40k|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  825|  1.40k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.40k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.40k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  return result ? janet_wrap_array(c.s.captures) : janet_wrap_nil();
  ------------------
  |  |  831|  3.44k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  3.44k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  3.44k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  3.44k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (30392:12): [True: 1.40k, False: 3.44k]
  ------------------
30393|  4.85k|}
janet_lib_peg:
30499|  6.86k|void janet_lib_peg(JanetTable *env) {
30500|  6.86k|    JanetRegExt cfuns[] = {
30501|  6.86k|        JANET_CORE_REG("peg/compile", cfun_peg_compile),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
30502|  6.86k|        JANET_CORE_REG("peg/match", cfun_peg_match),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
30503|  6.86k|        JANET_CORE_REG("peg/find", cfun_peg_find),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
30504|  6.86k|        JANET_CORE_REG("peg/find-all", cfun_peg_find_all),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
30505|  6.86k|        JANET_CORE_REG("peg/replace", cfun_peg_replace),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
30506|  6.86k|        JANET_CORE_REG("peg/replace-all", cfun_peg_replace_all),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
30507|  6.86k|        JANET_REG_END
  ------------------
  |  | 2110|  6.86k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
30508|  6.86k|    };
30509|       |    janet_core_cfuns_ext(env, NULL, cfuns);
30510|  6.86k|    janet_register_abstract_type(&janet_peg_type);
30511|  6.86k|}
janet_to_string_b:
30741|  93.6M|void janet_to_string_b(JanetBuffer *buffer, Janet x) {
30742|  93.6M|    switch (janet_type(x)) {
  ------------------
  |  |  795|  93.6M|    (isnan((x).number) \
  |  |  796|  93.6M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  93.6M|        : JANET_NUMBER)
  ------------------
  |  Branch (30742:13): [True: 89.3M, False: 4.29M]
  ------------------
30743|  74.8k|        case JANET_NIL:
  ------------------
  |  Branch (30743:9): [True: 74.8k, False: 93.5M]
  ------------------
30744|  74.8k|            janet_buffer_push_cstring(buffer, "");
30745|  74.8k|            break;
30746|  13.3k|        case JANET_BOOLEAN:
  ------------------
  |  Branch (30746:9): [True: 13.3k, False: 93.6M]
  ------------------
30747|  13.3k|            janet_buffer_push_cstring(buffer,
30748|  13.3k|                                      janet_unwrap_boolean(x) ? "true" : "false");
  ------------------
  |  |  838|  13.3k|#define janet_unwrap_boolean(x) ((x).u64 & 0x1)
  |  |  ------------------
  |  |  |  Branch (838:33): [True: 2.58k, False: 10.7k]
  |  |  ------------------
  ------------------
30749|  13.3k|            break;
30750|  4.29M|        case JANET_NUMBER:
  ------------------
  |  Branch (30750:9): [True: 4.29M, False: 89.3M]
  ------------------
30751|  4.29M|            number_to_string_b(buffer, janet_unwrap_number(x));
  ------------------
  |  |  839|  4.29M|#define janet_unwrap_number(x) ((x).number)
  ------------------
30752|  4.29M|            break;
30753|  8.31M|        case JANET_STRING:
  ------------------
  |  Branch (30753:9): [True: 8.31M, False: 85.3M]
  ------------------
30754|  30.2M|        case JANET_SYMBOL:
  ------------------
  |  Branch (30754:9): [True: 21.9M, False: 71.7M]
  ------------------
30755|  33.1M|        case JANET_KEYWORD:
  ------------------
  |  Branch (30755:9): [True: 2.95M, False: 90.6M]
  ------------------
30756|  33.1M|            janet_buffer_push_bytes(buffer,
30757|  33.1M|                                    janet_unwrap_string(x),
  ------------------
  |  |  863|  33.1M|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
30758|  33.1M|                                    janet_string_length(janet_unwrap_string(x)));
  ------------------
  |  | 1813|  33.1M|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|  33.1M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
30759|  33.1M|            break;
30760|  16.4k|        case JANET_BUFFER: {
  ------------------
  |  Branch (30760:9): [True: 16.4k, False: 93.6M]
  ------------------
30761|  16.4k|            JanetBuffer *to = janet_unwrap_buffer(x);
  ------------------
  |  |  862|  16.4k|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
30762|       |            /* Prevent resizing buffer while appending */
30763|  16.4k|            if (buffer == to) janet_buffer_extra(buffer, to->count);
  ------------------
  |  Branch (30763:17): [True: 0, False: 16.4k]
  ------------------
30764|  16.4k|            janet_buffer_push_bytes(buffer, to->data, to->count);
30765|  16.4k|            break;
30766|  30.2M|        }
30767|  1.12k|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (30767:9): [True: 1.12k, False: 93.6M]
  ------------------
30768|  1.12k|            JanetAbstract p = janet_unwrap_abstract(x);
  ------------------
  |  |  866|  1.12k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
30769|  1.12k|            const JanetAbstractType *t = janet_abstract_type(p);
  ------------------
  |  | 1899|  1.12k|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|  1.12k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
30770|  1.12k|            if (t->tostring != NULL) {
  ------------------
  |  Branch (30770:17): [True: 1.12k, False: 0]
  ------------------
30771|  1.12k|                t->tostring(p, buffer);
30772|  1.12k|            } else {
30773|      0|                string_description_b(buffer, t->name, p);
30774|      0|            }
30775|  1.12k|        }
30776|  1.12k|        return;
30777|      0|        case JANET_CFUNCTION: {
  ------------------
  |  Branch (30777:9): [True: 0, False: 93.6M]
  ------------------
30778|      0|            JanetCFunRegistry *reg = janet_registry_get(janet_unwrap_cfunction(x));
  ------------------
  |  |  869|      0|#define janet_unwrap_cfunction(x) ((JanetCFunction)janet_nanbox_to_pointer(x))
  ------------------
30779|      0|            if (NULL != reg) {
  ------------------
  |  Branch (30779:17): [True: 0, False: 0]
  ------------------
30780|      0|                janet_buffer_push_cstring(buffer, "<cfunction ");
30781|      0|                if (NULL != reg->name_prefix) {
  ------------------
  |  Branch (30781:21): [True: 0, False: 0]
  ------------------
30782|      0|                    janet_buffer_push_cstring(buffer, reg->name_prefix);
30783|      0|                    janet_buffer_push_u8(buffer, '/');
30784|      0|                }
30785|      0|                janet_buffer_push_cstring(buffer, reg->name);
30786|      0|                janet_buffer_push_u8(buffer, '>');
30787|      0|                break;
30788|      0|            }
30789|      0|            goto fallthrough;
30790|      0|        }
30791|      0|        case JANET_FUNCTION: {
  ------------------
  |  Branch (30791:9): [True: 0, False: 93.6M]
  ------------------
30792|      0|            JanetFunction *fun = janet_unwrap_function(x);
  ------------------
  |  |  868|      0|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
30793|      0|            JanetFuncDef *def = fun->def;
30794|      0|            if (def == NULL) {
  ------------------
  |  Branch (30794:17): [True: 0, False: 0]
  ------------------
30795|      0|                janet_buffer_push_cstring(buffer, "<incomplete function>");
30796|      0|                break;
30797|      0|            }
30798|      0|            if (def->name) {
  ------------------
  |  Branch (30798:17): [True: 0, False: 0]
  ------------------
30799|      0|                const uint8_t *n = def->name;
30800|      0|                janet_buffer_push_cstring(buffer, "<function ");
30801|      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)))
  |  |  ------------------
  ------------------
30802|      0|                janet_buffer_push_u8(buffer, '>');
30803|      0|                break;
30804|      0|            }
30805|      0|            goto fallthrough;
30806|      0|        }
30807|      0|    fallthrough:
30808|  56.0M|        default:
  ------------------
  |  Branch (30808:9): [True: 56.0M, False: 37.5M]
  ------------------
30809|  56.0M|            string_description_b(buffer, janet_type_names[janet_type(x)], janet_unwrap_pointer(x));
  ------------------
  |  |  795|  56.0M|    (isnan((x).number) \
  |  |  796|  56.0M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  56.0M|        : JANET_NUMBER)
  ------------------
                          string_description_b(buffer, janet_type_names[janet_type(x)], janet_unwrap_pointer(x));
  ------------------
  |  |  867|  56.0M|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (30809:59): [True: 56.0M, False: 0]
  ------------------
30810|  56.0M|            break;
30811|  93.6M|    }
30812|  93.6M|}
janet_description_b:
30827|  41.9M|void janet_description_b(JanetBuffer *buffer, Janet x) {
30828|  41.9M|    switch (janet_type(x)) {
  ------------------
  |  |  795|  41.9M|    (isnan((x).number) \
  |  |  796|  41.9M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  41.9M|        : JANET_NUMBER)
  ------------------
  |  Branch (30828:13): [True: 37.7M, False: 4.28M]
  ------------------
30829|  26.2M|        default:
  ------------------
  |  Branch (30829:9): [True: 26.2M, False: 15.7M]
  ------------------
30830|  26.2M|            break;
30831|  26.2M|        case JANET_NIL:
  ------------------
  |  Branch (30831:9): [True: 9.43k, False: 41.9M]
  ------------------
30832|  9.43k|            janet_buffer_push_cstring(buffer, "nil");
30833|  9.43k|            return;
30834|  2.95M|        case JANET_KEYWORD:
  ------------------
  |  Branch (30834:9): [True: 2.95M, False: 39.0M]
  ------------------
30835|  2.95M|            janet_buffer_push_u8(buffer, ':');
30836|  2.95M|            break;
30837|  12.4M|        case JANET_STRING:
  ------------------
  |  Branch (30837:9): [True: 12.4M, False: 29.5M]
  ------------------
30838|  12.4M|            janet_escape_string_b(buffer, janet_unwrap_string(x));
  ------------------
  |  |  863|  12.4M|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
30839|  12.4M|            return;
30840|   235k|        case JANET_BUFFER: {
  ------------------
  |  Branch (30840:9): [True: 235k, False: 41.7M]
  ------------------
30841|   235k|            JanetBuffer *b = janet_unwrap_buffer(x);
  ------------------
  |  |  862|   235k|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
30842|   235k|            janet_escape_buffer_b(buffer, b);
30843|   235k|            return;
30844|      0|        }
30845|   156k|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (30845:9): [True: 156k, False: 41.8M]
  ------------------
30846|   156k|            JanetAbstract p = janet_unwrap_abstract(x);
  ------------------
  |  |  866|   156k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
30847|   156k|            const JanetAbstractType *t = janet_abstract_type(p);
  ------------------
  |  | 1899|   156k|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|   156k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
30848|   156k|            if (t->tostring != NULL) {
  ------------------
  |  Branch (30848:17): [True: 156k, False: 0]
  ------------------
30849|   156k|                janet_buffer_push_cstring(buffer, "<");
30850|   156k|                janet_buffer_push_cstring(buffer, t->name);
30851|   156k|                janet_buffer_push_cstring(buffer, " ");
30852|   156k|                t->tostring(p, buffer);
30853|   156k|                janet_buffer_push_cstring(buffer, ">");
30854|   156k|            } else {
30855|      0|                string_description_b(buffer, t->name, p);
30856|      0|            }
30857|   156k|            return;
30858|      0|        }
30859|  41.9M|    }
30860|  29.1M|    janet_to_string_b(buffer, x);
30861|  29.1M|}
janet_formatbv:
31514|  16.6M|void janet_formatbv(JanetBuffer *b, const char *format, va_list args) {
31515|  16.6M|    const char *format_end = format + strlen(format);
31516|  16.6M|    const char *c = format;
31517|  16.6M|    int32_t startlen = b->count;
31518|   174M|    while (c < format_end) {
  ------------------
  |  Branch (31518:12): [True: 158M, False: 16.6M]
  ------------------
31519|   158M|        if (*c != '%') {
  ------------------
  |  Branch (31519:13): [True: 123M, False: 34.4M]
  ------------------
31520|   123M|            janet_buffer_push_u8(b, (uint8_t) *c++);
31521|   123M|        } else if (*++c == '%') {
  ------------------
  |  Branch (31521:20): [True: 0, False: 34.4M]
  ------------------
31522|      0|            janet_buffer_push_u8(b, (uint8_t) *c++);
31523|  34.4M|        } else {
31524|  34.4M|            char form[MAX_FORMAT], item[MAX_ITEM];
31525|  34.4M|            char width[3], precision[3];
31526|  34.4M|            int nb = 0; /* number of bytes in added item */
31527|  34.4M|            c = scanformat(c, form, width, precision);
31528|  34.4M|            switch (*c++) {
31529|      0|                case 'c': {
  ------------------
  |  Branch (31529:17): [True: 0, False: 34.4M]
  ------------------
31530|      0|                    int n = va_arg(args, int);
31531|      0|                    nb = snprintf(item, MAX_ITEM, form, n);
  ------------------
  |  |31437|      0|#define MAX_ITEM  256
  ------------------
31532|      0|                    break;
31533|      0|                }
31534|  17.9M|                case 'd':
  ------------------
  |  Branch (31534:17): [True: 17.9M, False: 16.5M]
  ------------------
31535|  17.9M|                case 'i': {
  ------------------
  |  Branch (31535:17): [True: 0, False: 34.4M]
  ------------------
31536|  17.9M|                    int64_t n = (int64_t) va_arg(args, int32_t);
31537|  17.9M|                    nb = snprintf(item, MAX_ITEM, form, n);
  ------------------
  |  |31437|  17.9M|#define MAX_ITEM  256
  ------------------
31538|  17.9M|                    break;
31539|  17.9M|                }
31540|      0|                case 'D':
  ------------------
  |  Branch (31540:17): [True: 0, False: 34.4M]
  ------------------
31541|      0|                case 'I': {
  ------------------
  |  Branch (31541:17): [True: 0, False: 34.4M]
  ------------------
31542|      0|                    int64_t n = va_arg(args, int64_t);
31543|      0|                    nb = snprintf(item, MAX_ITEM, form, n);
  ------------------
  |  |31437|      0|#define MAX_ITEM  256
  ------------------
31544|      0|                    break;
31545|      0|                }
31546|      0|                case 'x':
  ------------------
  |  Branch (31546:17): [True: 0, False: 34.4M]
  ------------------
31547|      0|                case 'X':
  ------------------
  |  Branch (31547:17): [True: 0, False: 34.4M]
  ------------------
31548|      0|                case 'o':
  ------------------
  |  Branch (31548:17): [True: 0, False: 34.4M]
  ------------------
31549|      0|                case 'u': {
  ------------------
  |  Branch (31549:17): [True: 0, False: 34.4M]
  ------------------
31550|      0|                    uint64_t n = va_arg(args, uint64_t);
31551|      0|                    nb = snprintf(item, MAX_ITEM, form, n);
  ------------------
  |  |31437|      0|#define MAX_ITEM  256
  ------------------
31552|      0|                    break;
31553|      0|                }
31554|      0|                case 'a':
  ------------------
  |  Branch (31554:17): [True: 0, False: 34.4M]
  ------------------
31555|      0|                case 'A':
  ------------------
  |  Branch (31555:17): [True: 0, False: 34.4M]
  ------------------
31556|      0|                case 'e':
  ------------------
  |  Branch (31556:17): [True: 0, False: 34.4M]
  ------------------
31557|      0|                case 'E':
  ------------------
  |  Branch (31557:17): [True: 0, False: 34.4M]
  ------------------
31558|      0|                case 'f':
  ------------------
  |  Branch (31558:17): [True: 0, False: 34.4M]
  ------------------
31559|      0|                case 'g':
  ------------------
  |  Branch (31559:17): [True: 0, False: 34.4M]
  ------------------
31560|      0|                case 'G': {
  ------------------
  |  Branch (31560:17): [True: 0, False: 34.4M]
  ------------------
31561|      0|                    double d = va_arg(args, double);
31562|      0|                    nb = snprintf(item, MAX_ITEM, form, d);
  ------------------
  |  |31437|      0|#define MAX_ITEM  256
  ------------------
31563|      0|                    break;
31564|      0|                }
31565|  62.6k|                case 's':
  ------------------
  |  Branch (31565:17): [True: 62.6k, False: 34.4M]
  ------------------
31566|  63.0k|                case 'S': {
  ------------------
  |  Branch (31566:17): [True: 311, False: 34.4M]
  ------------------
31567|  63.0k|                    const char *str = va_arg(args, const char *);
31568|  63.0k|                    int32_t len = (c[-1] == 's')
  ------------------
  |  Branch (31568:35): [True: 62.6k, False: 311]
  ------------------
31569|  63.0k|                                  ? (int32_t) strlen(str)
31570|  63.0k|                                  : janet_string_length((JanetString) str);
  ------------------
  |  | 1813|    311|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|    311|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
31571|  63.0k|                    if (form[2] == '\0')
  ------------------
  |  Branch (31571:25): [True: 63.0k, False: 0]
  ------------------
31572|  63.0k|                        janet_buffer_push_bytes(b, (const uint8_t *) str, len);
31573|      0|                    else {
31574|      0|                        if (len != (int32_t) strlen((const char *) str))
  ------------------
  |  Branch (31574:29): [True: 0, False: 0]
  ------------------
31575|      0|                            janet_panic("string contains zeros");
31576|      0|                        if (!strchr(form, '.') && len >= 100) {
  ------------------
  |  Branch (31576:29): [True: 0, False: 0]
  |  Branch (31576:51): [True: 0, False: 0]
  ------------------
31577|      0|                            janet_panic("no precision and string is too long to be formatted");
31578|      0|                        } else {
31579|      0|                            nb = snprintf(item, MAX_ITEM, form, str);
  ------------------
  |  |31437|      0|#define MAX_ITEM  256
  ------------------
31580|      0|                        }
31581|      0|                    }
31582|  63.0k|                    break;
31583|  63.0k|                }
31584|  63.0k|                case 'V':
  ------------------
  |  Branch (31584:17): [True: 0, False: 34.4M]
  ------------------
31585|      0|                    janet_to_string_b(b, va_arg(args, Janet));
31586|      0|                    break;
31587|  1.92k|                case 'v':
  ------------------
  |  Branch (31587:17): [True: 1.92k, False: 34.4M]
  ------------------
31588|  1.92k|                    janet_description_b(b, va_arg(args, Janet));
31589|  1.92k|                    break;
31590|      0|                case 't':
  ------------------
  |  Branch (31590:17): [True: 0, False: 34.4M]
  ------------------
31591|      0|                    janet_buffer_push_cstring(b, typestr(va_arg(args, Janet)));
31592|      0|                    break;
31593|      0|                case 'T': {
  ------------------
  |  Branch (31593:17): [True: 0, False: 34.4M]
  ------------------
31594|      0|                    int types = va_arg(args, int);
31595|      0|                    pushtypes(b, types);
31596|      0|                    break;
31597|  63.0k|                }
31598|      0|                case 'M':
  ------------------
  |  Branch (31598:17): [True: 0, False: 34.4M]
  ------------------
31599|  16.5M|                case 'm':
  ------------------
  |  Branch (31599:17): [True: 16.5M, False: 17.9M]
  ------------------
31600|  16.5M|                case 'N':
  ------------------
  |  Branch (31600:17): [True: 0, False: 34.4M]
  ------------------
31601|  16.5M|                case 'n':
  ------------------
  |  Branch (31601:17): [True: 0, False: 34.4M]
  ------------------
31602|  16.5M|                case 'Q':
  ------------------
  |  Branch (31602:17): [True: 0, False: 34.4M]
  ------------------
31603|  16.5M|                case 'q':
  ------------------
  |  Branch (31603:17): [True: 0, False: 34.4M]
  ------------------
31604|  16.5M|                case 'P':
  ------------------
  |  Branch (31604:17): [True: 0, False: 34.4M]
  ------------------
31605|  16.5M|                case 'p': { /* janet pretty , precision = depth */
  ------------------
  |  Branch (31605:17): [True: 2.66k, False: 34.4M]
  ------------------
31606|  16.5M|                    int depth = atoi(precision);
31607|  16.5M|                    if (depth < 1) depth = JANET_RECURSION_GUARD;
  ------------------
  |  |  296|  16.5M|#define JANET_RECURSION_GUARD 1024
  ------------------
  |  Branch (31607:25): [True: 16.5M, False: 0]
  ------------------
31608|  16.5M|                    char d = c[-1];
31609|  16.5M|                    int has_color = (d == 'P') || (d == 'Q') || (d == 'M') || (d == 'N');
  ------------------
  |  Branch (31609:37): [True: 0, False: 16.5M]
  |  Branch (31609:51): [True: 0, False: 16.5M]
  |  Branch (31609:65): [True: 0, False: 16.5M]
  |  Branch (31609:79): [True: 0, False: 16.5M]
  ------------------
31610|  16.5M|                    int has_oneline = (d == 'Q') || (d == 'q') || (d == 'N') || (d == 'n');
  ------------------
  |  Branch (31610:39): [True: 0, False: 16.5M]
  |  Branch (31610:53): [True: 0, False: 16.5M]
  |  Branch (31610:67): [True: 0, False: 16.5M]
  |  Branch (31610:81): [True: 0, False: 16.5M]
  ------------------
31611|  16.5M|                    int has_notrunc = (d == 'M') || (d == 'm') || (d == 'N') || (d == 'n');
  ------------------
  |  Branch (31611:39): [True: 0, False: 16.5M]
  |  Branch (31611:53): [True: 16.5M, False: 2.66k]
  |  Branch (31611:67): [True: 0, False: 2.66k]
  |  Branch (31611:81): [True: 0, False: 2.66k]
  ------------------
31612|  16.5M|                    int columns = atoi(width);
31613|  16.5M|                    if (columns == 0) {
  ------------------
  |  Branch (31613:25): [True: 16.5M, False: 0]
  ------------------
31614|  16.5M|                        columns = JANET_COLUMNS;
  ------------------
  |  |31350|  16.5M|#define JANET_COLUMNS 80
  ------------------
31615|  16.5M|                    } else if (columns < 0) {
  ------------------
  |  Branch (31615:32): [True: 0, False: 0]
  ------------------
31616|      0|                        has_oneline = 1;
31617|      0|                    }
31618|  16.5M|                    int flags = 0;
31619|  16.5M|                    flags |= has_color ? JANET_PRETTY_COLOR : 0;
  ------------------
  |  | 1967|      0|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (31619:30): [True: 0, False: 16.5M]
  ------------------
31620|  16.5M|                    flags |= has_oneline ? JANET_PRETTY_ONELINE : 0;
  ------------------
  |  | 1968|      0|#define JANET_PRETTY_ONELINE 2
  ------------------
  |  Branch (31620:30): [True: 0, False: 16.5M]
  ------------------
31621|  16.5M|                    flags |= has_notrunc ? JANET_PRETTY_NOTRUNC : 0;
  ------------------
  |  | 1969|  16.5M|#define JANET_PRETTY_NOTRUNC 4
  ------------------
  |  Branch (31621:30): [True: 16.5M, False: 2.66k]
  ------------------
31622|  16.5M|                    janet_pretty_(b, depth, columns, flags,
31623|  16.5M|                                  va_arg(args, Janet), startlen, b->count);
31624|  16.5M|                    break;
31625|  16.5M|                }
31626|      0|                case 'j': {
  ------------------
  |  Branch (31626:17): [True: 0, False: 34.4M]
  ------------------
31627|      0|                    int depth = atoi(precision);
31628|      0|                    if (depth < 1) {
  ------------------
  |  Branch (31628:25): [True: 0, False: 0]
  ------------------
31629|      0|                        depth = JANET_RECURSION_GUARD;
  ------------------
  |  |  296|      0|#define JANET_RECURSION_GUARD 1024
  ------------------
31630|      0|                    }
31631|      0|                    janet_jdn_(b, depth, va_arg(args, Janet), startlen, b->count);
31632|      0|                    break;
31633|  16.5M|                }
31634|      0|                default: {
  ------------------
  |  Branch (31634:17): [True: 0, False: 34.4M]
  ------------------
31635|       |                    /* also treat cases 'nLlh' */
31636|      0|                    janet_panicf("invalid conversion '%s' to 'format'",
31637|      0|                                 form);
31638|  16.5M|                }
31639|  34.4M|            }
31640|  34.4M|            if (nb >= MAX_ITEM)
  ------------------
  |  |31437|  34.4M|#define MAX_ITEM  256
  ------------------
  |  Branch (31640:17): [True: 0, False: 34.4M]
  ------------------
31641|      0|                janet_panic("format buffer overflow");
31642|  34.4M|            if (nb > 0)
  ------------------
  |  Branch (31642:17): [True: 17.9M, False: 16.5M]
  ------------------
31643|  17.9M|                janet_buffer_push_bytes(b, (uint8_t *) item, nb);
31644|  34.4M|        }
31645|       |
31646|   158M|    }
31647|  16.6M|}
janet_formatc:
31651|  1.24k|const uint8_t *janet_formatc(const char *format, ...) {
31652|  1.24k|    va_list args;
31653|  1.24k|    const uint8_t *ret;
31654|  1.24k|    JanetBuffer buffer;
31655|  1.24k|    int32_t len = 0;
31656|       |
31657|       |    /* Calculate length, init buffer and args */
31658|  35.1k|    while (format[len]) len++;
  ------------------
  |  Branch (31658:12): [True: 33.9k, False: 1.24k]
  ------------------
31659|  1.24k|    janet_buffer_init(&buffer, len);
31660|  1.24k|    va_start(args, format);
31661|       |
31662|       |    /* Run format */
31663|  1.24k|    janet_formatbv(&buffer, format, args);
31664|       |
31665|       |    /* Iterate length */
31666|  1.24k|    va_end(args);
31667|       |
31668|  1.24k|    ret = janet_string(buffer.data, buffer.count);
31669|  1.24k|    janet_buffer_deinit(&buffer);
31670|  1.24k|    return ret;
31671|  1.24k|}
janet_formatb:
31673|  1.44k|JanetBuffer *janet_formatb(JanetBuffer *buffer, const char *format, ...) {
31674|  1.44k|    va_list args;
31675|  1.44k|    va_start(args, format);
31676|  1.44k|    janet_formatbv(buffer, format, args);
31677|       |    va_end(args);
31678|  1.44k|    return buffer;
31679|  1.44k|}
janet_string:
33595|   100M|const uint8_t *janet_string(const uint8_t *buf, int32_t len) {
33596|   100M|    JanetStringHead *head = janet_gcalloc(JANET_MEMORY_STRING, sizeof(JanetStringHead) + (size_t) len + 1);
33597|   100M|    head->length = len;
33598|   100M|    head->hash = janet_string_calchash(buf, len);
33599|   100M|    uint8_t *data = (uint8_t *)head->data;
33600|   100M|    safe_memcpy(data, buf, len);
33601|   100M|    data[len] = 0;
33602|   100M|    return data;
33603|   100M|}
janet_string_compare:
33606|   790k|int janet_string_compare(const uint8_t *lhs, const uint8_t *rhs) {
33607|   790k|    int32_t xlen = janet_string_length(lhs);
  ------------------
  |  | 1813|   790k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|   790k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
33608|   790k|    int32_t ylen = janet_string_length(rhs);
  ------------------
  |  | 1813|   790k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|   790k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
33609|   790k|    int32_t len = xlen > ylen ? ylen : xlen;
  ------------------
  |  Branch (33609:19): [True: 170k, False: 620k]
  ------------------
33610|   790k|    int res = memcmp(lhs, rhs, len);
33611|   790k|    if (res) return res > 0 ? 1 : -1;
  ------------------
  |  Branch (33611:9): [True: 521k, False: 269k]
  |  Branch (33611:21): [True: 172k, False: 349k]
  ------------------
33612|   269k|    if (xlen == ylen) return 0;
  ------------------
  |  Branch (33612:9): [True: 169k, False: 99.8k]
  ------------------
33613|  99.8k|    return xlen < ylen ? -1 : 1;
  ------------------
  |  Branch (33613:12): [True: 19.9k, False: 79.8k]
  ------------------
33614|   269k|}
janet_string_equalconst:
33617|  43.6M|int janet_string_equalconst(const uint8_t *lhs, const uint8_t *rhs, int32_t rlen, int32_t rhash) {
33618|  43.6M|    int32_t lhash = janet_string_hash(lhs);
  ------------------
  |  | 1814|  43.6M|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  ------------------
  |  |  |  | 1812|  43.6M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
33619|  43.6M|    int32_t llen = janet_string_length(lhs);
  ------------------
  |  | 1813|  43.6M|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|  43.6M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
33620|  43.6M|    if (lhash != rhash || llen != rlen)
  ------------------
  |  Branch (33620:9): [True: 19.4M, False: 24.1M]
  |  Branch (33620:27): [True: 18, False: 24.1M]
  ------------------
33621|  19.4M|        return 0;
33622|  24.1M|    if (lhs == rhs)
  ------------------
  |  Branch (33622:9): [True: 13.7M, False: 10.4M]
  ------------------
33623|  13.7M|        return 1;
33624|  10.4M|    return !memcmp(lhs, rhs, rlen);
33625|  24.1M|}
janet_string_equal:
33628|  1.34k|int janet_string_equal(const uint8_t *lhs, const uint8_t *rhs) {
33629|  1.34k|    return janet_string_equalconst(lhs, rhs,
33630|  1.34k|                                   janet_string_length(rhs), janet_string_hash(rhs));
  ------------------
  |  | 1813|  1.34k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|  1.34k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
                                                 janet_string_length(rhs), janet_string_hash(rhs));
  ------------------
  |  | 1814|  1.34k|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  ------------------
  |  |  |  | 1812|  1.34k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
33631|  1.34k|}
janet_lib_string:
34212|  6.86k|void janet_lib_string(JanetTable *env) {
34213|  6.86k|    JanetRegExt string_cfuns[] = {
34214|  6.86k|        JANET_CORE_REG("string/slice", cfun_string_slice),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34215|  6.86k|        JANET_CORE_REG("keyword/slice", cfun_keyword_slice),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34216|  6.86k|        JANET_CORE_REG("symbol/slice", cfun_symbol_slice),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34217|  6.86k|        JANET_CORE_REG("string/repeat", cfun_string_repeat),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34218|  6.86k|        JANET_CORE_REG("string/bytes", cfun_string_bytes),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34219|  6.86k|        JANET_CORE_REG("string/from-bytes", cfun_string_frombytes),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34220|  6.86k|        JANET_CORE_REG("string/ascii-lower", cfun_string_asciilower),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34221|  6.86k|        JANET_CORE_REG("string/ascii-upper", cfun_string_asciiupper),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34222|  6.86k|        JANET_CORE_REG("string/reverse", cfun_string_reverse),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34223|  6.86k|        JANET_CORE_REG("string/find", cfun_string_find),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34224|  6.86k|        JANET_CORE_REG("string/find-all", cfun_string_findall),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34225|  6.86k|        JANET_CORE_REG("string/has-prefix?", cfun_string_hasprefix),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34226|  6.86k|        JANET_CORE_REG("string/has-suffix?", cfun_string_hassuffix),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34227|  6.86k|        JANET_CORE_REG("string/replace", cfun_string_replace),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34228|  6.86k|        JANET_CORE_REG("string/replace-all", cfun_string_replaceall),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34229|  6.86k|        JANET_CORE_REG("string/split", cfun_string_split),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34230|  6.86k|        JANET_CORE_REG("string/check-set", cfun_string_checkset),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34231|  6.86k|        JANET_CORE_REG("string/join", cfun_string_join),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34232|  6.86k|        JANET_CORE_REG("string/format", cfun_string_format),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34233|  6.86k|        JANET_CORE_REG("string/trim", cfun_string_trim),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34234|  6.86k|        JANET_CORE_REG("string/triml", cfun_string_triml),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34235|  6.86k|        JANET_CORE_REG("string/trimr", cfun_string_trimr),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34236|  6.86k|        JANET_REG_END
  ------------------
  |  | 2110|  6.86k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
34237|  6.86k|    };
34238|       |    janet_core_cfuns_ext(env, NULL, string_cfuns);
34239|  6.86k|}
janet_scan_number_base:
34500|  17.0k|    double *out) {
34501|  17.0k|    const uint8_t *end = str + len;
34502|  17.0k|    int seenadigit = 0;
34503|  17.0k|    int ex = 0;
34504|  17.0k|    int seenpoint = 0;
34505|  17.0k|    int foundexp = 0;
34506|  17.0k|    int neg = 0;
34507|  17.0k|    struct BigNat mant;
34508|  17.0k|    bignat_zero(&mant);
34509|       |
34510|       |    /* Prevent some kinds of overflow bugs relating to the exponent
34511|       |     * overflowing.  For example, if a string was passed 2GB worth of 0s after
34512|       |     * the decimal point, exponent could wrap around and become positive. It's
34513|       |     * easier to reject ridiculously large inputs than to check for overflows.
34514|       |     * */
34515|  17.0k|    if (len > JANET_NUMBER_LENGTH_RIDICULOUS) goto error;
  ------------------
  |  |34296|  17.0k|#define JANET_NUMBER_LENGTH_RIDICULOUS 0xFFFF
  ------------------
  |  Branch (34515:9): [True: 0, False: 17.0k]
  ------------------
34516|       |
34517|       |    /* Get sign */
34518|  17.0k|    if (str >= end) goto error;
  ------------------
  |  Branch (34518:9): [True: 0, False: 17.0k]
  ------------------
34519|  17.0k|    if (*str == '-') {
  ------------------
  |  Branch (34519:9): [True: 2.65k, False: 14.3k]
  ------------------
34520|  2.65k|        neg = 1;
34521|  2.65k|        str++;
34522|  14.3k|    } else if (*str == '+') {
  ------------------
  |  Branch (34522:16): [True: 1.51k, False: 12.8k]
  ------------------
34523|  1.51k|        str++;
34524|  1.51k|    }
34525|       |
34526|       |    /* Check for leading 0x or digit digit r */
34527|  17.0k|    if (base == 0) {
  ------------------
  |  Branch (34527:9): [True: 17.0k, False: 0]
  ------------------
34528|  17.0k|        if (str + 1 < end && str[0] == '0' && str[1] == 'x') {
  ------------------
  |  Branch (34528:13): [True: 7.70k, False: 9.30k]
  |  Branch (34528:30): [True: 1.24k, False: 6.46k]
  |  Branch (34528:47): [True: 181, False: 1.06k]
  ------------------
34529|    181|            base = 16;
34530|    181|            str += 2;
34531|  16.8k|        } else if (str + 1 < end  &&
  ------------------
  |  Branch (34531:20): [True: 7.52k, False: 9.30k]
  ------------------
34532|  7.52k|                   str[0] >= '0' && str[0] <= '9' &&
  ------------------
  |  Branch (34532:20): [True: 5.88k, False: 1.64k]
  |  Branch (34532:37): [True: 5.62k, False: 259]
  ------------------
34533|  5.62k|                   str[1] == 'r') {
  ------------------
  |  Branch (34533:20): [True: 84, False: 5.54k]
  ------------------
34534|     84|            base = str[0] - '0';
34535|     84|            str += 2;
34536|  16.7k|        } else if (str + 2 < end  &&
  ------------------
  |  Branch (34536:20): [True: 5.11k, False: 11.6k]
  ------------------
34537|  5.11k|                   str[0] >= '0' && str[0] <= '9' &&
  ------------------
  |  Branch (34537:20): [True: 4.19k, False: 925]
  |  Branch (34537:37): [True: 4.02k, False: 167]
  ------------------
34538|  4.02k|                   str[1] >= '0' && str[1] <= '9' &&
  ------------------
  |  Branch (34538:20): [True: 2.91k, False: 1.11k]
  |  Branch (34538:37): [True: 2.13k, False: 777]
  ------------------
34539|  2.13k|                   str[2] == 'r') {
  ------------------
  |  Branch (34539:20): [True: 252, False: 1.88k]
  ------------------
34540|    252|            base = 10 * (str[0] - '0') + (str[1] - '0');
34541|    252|            if (base < 2 || base > 36) goto error;
  ------------------
  |  Branch (34541:17): [True: 36, False: 216]
  |  Branch (34541:29): [True: 81, False: 135]
  ------------------
34542|    135|            str += 3;
34543|    135|        }
34544|  17.0k|    }
34545|       |
34546|       |    /* If still base is 0, set to default (10) */
34547|  16.8k|    if (base == 0) {
  ------------------
  |  Branch (34547:9): [True: 16.5k, False: 396]
  ------------------
34548|  16.5k|        base = 10;
34549|  16.5k|    }
34550|  16.8k|    int exp_base = base;
34551|       |
34552|       |    /* Skip leading zeros */
34553|  24.1k|    while (str < end && (*str == '0' || *str == '.')) {
  ------------------
  |  Branch (34553:12): [True: 19.2k, False: 4.90k]
  |  Branch (34553:26): [True: 5.31k, False: 13.9k]
  |  Branch (34553:41): [True: 2.09k, False: 11.8k]
  ------------------
34554|  7.41k|        if (seenpoint) ex--;
  ------------------
  |  Branch (34554:13): [True: 541, False: 6.87k]
  ------------------
34555|  7.41k|        if (*str == '.') {
  ------------------
  |  Branch (34555:13): [True: 2.09k, False: 5.31k]
  ------------------
34556|  2.09k|            if (seenpoint) goto error;
  ------------------
  |  Branch (34556:17): [True: 144, False: 1.95k]
  ------------------
34557|  1.95k|            seenpoint = 1;
34558|  5.31k|        } else {
34559|  5.31k|            seenadigit = 1;
34560|  5.31k|        }
34561|  7.26k|        str++;
34562|  7.26k|    }
34563|       |
34564|       |    /* Parse significant digits */
34565|  41.8k|    while (str < end) {
  ------------------
  |  Branch (34565:12): [True: 28.8k, False: 12.9k]
  ------------------
34566|  28.8k|        if (*str == '.') {
  ------------------
  |  Branch (34566:13): [True: 407, False: 28.4k]
  ------------------
34567|    407|            if (seenpoint) goto error;
  ------------------
  |  Branch (34567:17): [True: 73, False: 334]
  ------------------
34568|    334|            seenpoint = 1;
34569|  28.4k|        } else if (*str == '&') {
  ------------------
  |  Branch (34569:20): [True: 1.41k, False: 27.0k]
  ------------------
34570|  1.41k|            foundexp = 1;
34571|  1.41k|            break;
34572|  27.0k|        } else if (base == 16 && (*str == 'P' || *str == 'p')) { /* IEEE hex float */
  ------------------
  |  Branch (34572:20): [True: 1.20k, False: 25.8k]
  |  Branch (34572:35): [True: 21, False: 1.18k]
  |  Branch (34572:50): [True: 87, False: 1.10k]
  ------------------
34573|    108|            foundexp = 1;
34574|    108|            exp_base = 10;
34575|    108|            base = 2;
34576|    108|            ex *= 4; /* We need to correct the current exponent after we change the base */
34577|    108|            break;
34578|  26.9k|        } else if (base == 10 && (*str == 'E' || *str == 'e')) {
  ------------------
  |  Branch (34578:20): [True: 24.2k, False: 2.75k]
  |  Branch (34578:35): [True: 555, False: 23.6k]
  |  Branch (34578:50): [True: 375, False: 23.2k]
  ------------------
34579|    930|            foundexp = 1;
34580|    930|            break;
34581|  26.0k|        } else if (*str == '_') {
  ------------------
  |  Branch (34581:20): [True: 1.15k, False: 24.8k]
  ------------------
34582|  1.15k|            if (!seenadigit) goto error;
  ------------------
  |  Branch (34582:17): [True: 187, False: 966]
  ------------------
34583|  24.8k|        } else {
34584|  24.8k|            int digit = digit_lookup[*str & 0x7F];
34585|  24.8k|            if (*str > 127 || digit >= base) goto error;
  ------------------
  |  Branch (34585:17): [True: 172, False: 24.7k]
  |  Branch (34585:31): [True: 955, False: 23.7k]
  ------------------
34586|  23.7k|            if (seenpoint) ex--;
  ------------------
  |  Branch (34586:17): [True: 4.96k, False: 18.7k]
  ------------------
34587|  23.7k|            bignat_muladd(&mant, base, digit);
34588|  23.7k|            seenadigit = 1;
34589|  23.7k|        }
34590|  25.0k|        str++;
34591|  25.0k|    }
34592|       |
34593|  15.3k|    if (!seenadigit)
  ------------------
  |  Branch (34593:9): [True: 2.06k, False: 13.3k]
  ------------------
34594|  2.06k|        goto error;
34595|       |
34596|       |    /* Read exponent */
34597|  13.3k|    if (str < end && foundexp) {
  ------------------
  |  Branch (34597:9): [True: 2.24k, False: 11.0k]
  |  Branch (34597:22): [True: 2.24k, False: 0]
  ------------------
34598|  2.24k|        int eneg = 0;
34599|  2.24k|        int32_t ee = 0;
34600|  2.24k|        seenadigit = 0;
34601|  2.24k|        str++;
34602|  2.24k|        if (str >= end) goto error;
  ------------------
  |  Branch (34602:13): [True: 89, False: 2.15k]
  ------------------
34603|  2.15k|        if (*str == '-') {
  ------------------
  |  Branch (34603:13): [True: 308, False: 1.84k]
  ------------------
34604|    308|            eneg = 1;
34605|    308|            str++;
34606|  1.84k|        } else if (*str == '+') {
  ------------------
  |  Branch (34606:20): [True: 90, False: 1.75k]
  ------------------
34607|     90|            str++;
34608|     90|        }
34609|       |        /* Skip leading 0s in exponent */
34610|  2.51k|        while (str < end && *str == '0') {
  ------------------
  |  Branch (34610:16): [True: 2.35k, False: 161]
  |  Branch (34610:29): [True: 358, False: 1.99k]
  ------------------
34611|    358|            str++;
34612|    358|            seenadigit = 1;
34613|    358|        }
34614|  6.92k|        while (str < end) {
  ------------------
  |  Branch (34614:16): [True: 4.89k, False: 2.02k]
  ------------------
34615|  4.89k|            int digit = digit_lookup[*str & 0x7F];
34616|  4.89k|            if (*str > 127 || digit >= exp_base) goto error;
  ------------------
  |  Branch (34616:17): [True: 31, False: 4.86k]
  |  Branch (34616:31): [True: 96, False: 4.76k]
  ------------------
34617|  4.76k|            if (ee < (INT32_MAX / 40)) {
  ------------------
  |  Branch (34617:17): [True: 4.31k, False: 448]
  ------------------
34618|  4.31k|                ee = exp_base * ee + digit;
34619|  4.31k|            }
34620|  4.76k|            str++;
34621|  4.76k|            seenadigit = 1;
34622|  4.76k|        }
34623|  2.02k|        if (eneg) ex -= ee;
  ------------------
  |  Branch (34623:13): [True: 306, False: 1.72k]
  ------------------
34624|  1.72k|        else ex += ee;
34625|  2.02k|    }
34626|       |
34627|  13.0k|    if (!seenadigit)
  ------------------
  |  Branch (34627:9): [True: 74, False: 13.0k]
  ------------------
34628|     74|        goto error;
34629|       |
34630|  13.0k|    *out = convert(neg, &mant, base, ex);
34631|  13.0k|    janet_free(mant.digits);
  ------------------
  |  | 2415|  13.0k|#define janet_free(X) free((X))
  ------------------
34632|  13.0k|    return 0;
34633|       |
34634|  3.99k|error:
34635|  3.99k|    janet_free(mant.digits);
  ------------------
  |  | 2415|  3.99k|#define janet_free(X) free((X))
  ------------------
34636|  3.99k|    return 1;
34637|  13.0k|}
janet_scan_int64:
34710|  1.56k|int janet_scan_int64(const uint8_t *str, int32_t len, int64_t *out) {
34711|  1.56k|    int neg;
34712|  1.56k|    uint64_t bi;
34713|  1.56k|    if (scan_uint64(str, len, &bi, &neg)) {
  ------------------
  |  Branch (34713:9): [True: 1.07k, False: 488]
  ------------------
34714|  1.07k|        if (neg && bi <= ((UINT64_MAX / 2) + 1)) {
  ------------------
  |  Branch (34714:13): [True: 357, False: 717]
  |  Branch (34714:20): [True: 345, False: 12]
  ------------------
34715|    345|            if (bi > INT64_MAX) {
  ------------------
  |  Branch (34715:17): [True: 11, False: 334]
  ------------------
34716|     11|                *out = INT64_MIN;
34717|    334|            } else {
34718|    334|                *out = -((int64_t) bi);
34719|    334|            }
34720|    345|            return 1;
34721|    345|        }
34722|    729|        if (!neg && bi <= INT64_MAX) {
  ------------------
  |  Branch (34722:13): [True: 717, False: 12]
  |  Branch (34722:21): [True: 652, False: 65]
  ------------------
34723|    652|            *out = (int64_t) bi;
34724|    652|            return 1;
34725|    652|        }
34726|    729|    }
34727|    565|    return 0;
34728|  1.56k|}
janet_scan_uint64:
34730|    851|int janet_scan_uint64(const uint8_t *str, int32_t len, uint64_t *out) {
34731|    851|    int neg;
34732|    851|    uint64_t bi;
34733|    851|    if (scan_uint64(str, len, &bi, &neg)) {
  ------------------
  |  Branch (34733:9): [True: 612, False: 239]
  ------------------
34734|    612|        if (!neg) {
  ------------------
  |  Branch (34734:13): [True: 570, False: 42]
  ------------------
34735|    570|            *out = bi;
34736|    570|            return 1;
34737|    570|        }
34738|    612|    }
34739|    281|    return 0;
34740|    851|}
janet_scan_numeric:
34747|  19.4k|    Janet *out) {
34748|  19.4k|    int result;
34749|  19.4k|    double num;
34750|  19.4k|    int64_t i64 = 0;
34751|  19.4k|    uint64_t u64 = 0;
34752|  19.4k|    if (len < 2 || str[len - 2] != ':') {
  ------------------
  |  Branch (34752:9): [True: 8.35k, False: 11.1k]
  |  Branch (34752:20): [True: 8.59k, False: 2.52k]
  ------------------
34753|  16.9k|        result = janet_scan_number_base(str, len, 0, &num);
34754|  16.9k|        *out = janet_wrap_number(num);
  ------------------
  |  |  835|  16.9k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
34755|  16.9k|        return result;
34756|  16.9k|    }
34757|  2.52k|    switch (str[len - 1]) {
34758|     45|        default:
  ------------------
  |  Branch (34758:9): [True: 45, False: 2.48k]
  ------------------
34759|     45|            return 1;
34760|     67|        case 'n':
  ------------------
  |  Branch (34760:9): [True: 67, False: 2.45k]
  ------------------
34761|     67|            result = janet_scan_number_base(str, len - 2, 0, &num);
34762|     67|            *out = janet_wrap_number(num);
  ------------------
  |  |  835|     67|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
34763|     67|            return result;
34764|       |        /* Condition is inverted janet_scan_int64 and janet_scan_uint64 */
34765|  1.56k|        case 's':
  ------------------
  |  Branch (34765:9): [True: 1.56k, False: 963]
  ------------------
34766|  1.56k|            result = !janet_scan_int64(str, len - 2, &i64);
34767|  1.56k|            *out = janet_wrap_s64(i64);
34768|  1.56k|            return result;
34769|    851|        case 'u':
  ------------------
  |  Branch (34769:9): [True: 851, False: 1.67k]
  ------------------
34770|    851|            result = !janet_scan_uint64(str, len - 2, &u64);
34771|    851|            *out = janet_wrap_u64(u64);
34772|    851|            return result;
34773|  2.52k|    }
34774|  2.52k|}
janet_struct_begin:
34828|  53.0k|JanetKV *janet_struct_begin(int32_t count) {
34829|       |    /* Calculate capacity as power of 2 after 2 * count. */
34830|  53.0k|    int32_t capacity = janet_tablen(2 * count);
34831|  53.0k|    if (capacity < 0) capacity = janet_tablen(count + 1);
  ------------------
  |  Branch (34831:9): [True: 0, False: 53.0k]
  ------------------
34832|       |
34833|  53.0k|    size_t size = sizeof(JanetStructHead) + (size_t) capacity * sizeof(JanetKV);
34834|  53.0k|    JanetStructHead *head = janet_gcalloc(JANET_MEMORY_STRUCT, size);
34835|  53.0k|    head->length = count;
34836|  53.0k|    head->capacity = capacity;
34837|  53.0k|    head->hash = 0;
34838|  53.0k|    head->proto = NULL;
34839|       |
34840|  53.0k|    JanetKV *st = (JanetKV *)(head->data);
34841|  53.0k|    janet_memempty(st, capacity);
34842|  53.0k|    return st;
34843|  53.0k|}
janet_struct_find:
34846|  21.5M|const JanetKV *janet_struct_find(const JanetKV *st, Janet key) {
34847|       |    return janet_dict_find(st, janet_struct_capacity(st), key);
  ------------------
  |  | 1849|  21.5M|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1846|  21.5M|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
34848|  21.5M|}
janet_struct_put_ext:
34858|   329k|void janet_struct_put_ext(JanetKV *st, Janet key, Janet value, int replace) {
34859|   329k|    int32_t cap = janet_struct_capacity(st);
  ------------------
  |  | 1849|   329k|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1846|   329k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
34860|   329k|    int32_t hash = janet_hash(key);
34861|   329k|    int32_t index = janet_maphash(cap, hash);
  ------------------
  |  |  396|   329k|#define janet_maphash(cap, hash) ((uint32_t)(hash) & (cap - 1))
  ------------------
34862|   329k|    int32_t i, j, dist;
34863|   329k|    int32_t bounds[4] = {index, cap, 0, index};
34864|   329k|    if (janet_checktype(key, JANET_NIL) || janet_checktype(value, JANET_NIL)) return;
  ------------------
  |  |  806|   659k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 80, False: 329k]
  |  |  |  Branch (806:6): [Folded, False: 329k]
  |  |  ------------------
  |  |  807|   659k|        ? 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|   659k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   329k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   329k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   329k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   329k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  if (janet_checktype(key, JANET_NIL) || janet_checktype(value, JANET_NIL)) return;
  ------------------
  |  |  806|   329k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 74, False: 329k]
  |  |  |  Branch (806:6): [Folded, False: 329k]
  |  |  ------------------
  |  |  807|   329k|        ? 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|   329k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   329k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   329k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   329k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   329k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34865|   329k|    if (janet_checktype(key, JANET_NUMBER) && isnan(janet_unwrap_number(key))) return;
  ------------------
  |  |  806|   659k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 1.16k, False: 328k]
  |  |  |  Branch (806:6): [True: 329k, Folded]
  |  |  ------------------
  |  |  807|   659k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|   329k|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 1.16k, False: 328k]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 328k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   659k|        : 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 (34865:47): [True: 0, False: 1.16k]
  ------------------
34866|       |    /* Avoid extra items */
34867|   329k|    if (janet_struct_hash(st) == janet_struct_length(st)) return;
  ------------------
  |  | 1850|   329k|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1846|   329k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                  if (janet_struct_hash(st) == janet_struct_length(st)) return;
  ------------------
  |  | 1848|   329k|#define janet_struct_length(t) (janet_struct_head(t)->length)
  |  |  ------------------
  |  |  |  | 1846|   329k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (34867:9): [True: 0, False: 329k]
  ------------------
34868|   329k|    for (dist = 0, j = 0; j < 4; j += 2)
  ------------------
  |  Branch (34868:27): [True: 329k, False: 0]
  ------------------
34869|   472k|        for (i = bounds[j]; i < bounds[j + 1]; i++, dist++) {
  ------------------
  |  Branch (34869:29): [True: 472k, False: 120]
  ------------------
34870|   472k|            int status;
34871|   472k|            int32_t otherhash;
34872|   472k|            int32_t otherindex, otherdist;
34873|   472k|            JanetKV *kv = st + i;
34874|       |            /* We found an empty slot, so just add key and value */
34875|   472k|            if (janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|   472k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 328k, False: 143k]
  |  |  |  Branch (806:6): [Folded, False: 472k]
  |  |  ------------------
  |  |  807|   472k|        ? 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|   472k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   472k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   472k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   472k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   472k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34876|   328k|                kv->key = key;
34877|   328k|                kv->value = value;
34878|       |                /* Update the temporary count */
34879|   328k|                janet_struct_hash(st)++;
  ------------------
  |  | 1850|   328k|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1846|   328k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
34880|   328k|                return;
34881|   328k|            }
34882|       |            /* Robinhood hashing - check if colliding kv pair
34883|       |             * is closer to their source than current. We use robinhood
34884|       |             * hashing to ensure that equivalent structs that are constructed
34885|       |             * with different order have the same internal layout, and therefor
34886|       |             * will compare properly - i.e., {1 2 3 4} should equal {3 4 1 2}.
34887|       |             * Collisions are resolved via an insertion sort insertion. */
34888|   143k|            otherhash = janet_hash(kv->key);
34889|   143k|            otherindex = janet_maphash(cap, otherhash);
  ------------------
  |  |  396|   143k|#define janet_maphash(cap, hash) ((uint32_t)(hash) & (cap - 1))
  ------------------
34890|   143k|            otherdist = (i + cap - otherindex) & (cap - 1);
34891|   143k|            if (dist < otherdist)
  ------------------
  |  Branch (34891:17): [True: 70.5k, False: 72.4k]
  ------------------
34892|  70.5k|                status = -1;
34893|  72.4k|            else if (otherdist < dist)
  ------------------
  |  Branch (34893:22): [True: 913, False: 71.5k]
  ------------------
34894|    913|                status = 1;
34895|  71.5k|            else if (hash < otherhash)
  ------------------
  |  Branch (34895:22): [True: 69.7k, False: 1.83k]
  ------------------
34896|  69.7k|                status = -1;
34897|  1.83k|            else if (otherhash < hash)
  ------------------
  |  Branch (34897:22): [True: 775, False: 1.06k]
  ------------------
34898|    775|                status = 1;
34899|  1.06k|            else
34900|  1.06k|                status = janet_compare(key, kv->key);
34901|       |            /* If other is closer to their ideal slot */
34902|   143k|            if (status == 1) {
  ------------------
  |  Branch (34902:17): [True: 1.76k, False: 141k]
  ------------------
34903|       |                /* Swap current kv pair with pair in slot */
34904|  1.76k|                JanetKV temp = *kv;
34905|  1.76k|                kv->key = key;
34906|  1.76k|                kv->value = value;
34907|  1.76k|                key = temp.key;
34908|  1.76k|                value = temp.value;
34909|       |                /* Save dist and hash of new kv pair */
34910|  1.76k|                dist = otherdist;
34911|  1.76k|                hash = otherhash;
34912|   141k|            } else if (status == 0) {
  ------------------
  |  Branch (34912:24): [True: 858, False: 140k]
  ------------------
34913|    858|                if (replace) {
  ------------------
  |  Branch (34913:21): [True: 858, False: 0]
  ------------------
34914|       |                    /* A key was added to the struct more than once - replace old value */
34915|    858|                    kv->value = value;
34916|    858|                }
34917|    858|                return;
34918|    858|            }
34919|   143k|        }
34920|   329k|}
janet_struct_put:
34922|   329k|void janet_struct_put(JanetKV *st, Janet key, Janet value) {
34923|   329k|    janet_struct_put_ext(st, key, value, 1);
34924|   329k|}
janet_struct_end:
34927|  52.7k|const JanetKV *janet_struct_end(JanetKV *st) {
34928|  52.7k|    if (janet_struct_hash(st) != janet_struct_length(st)) {
  ------------------
  |  | 1850|  52.7k|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1846|  52.7k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                  if (janet_struct_hash(st) != janet_struct_length(st)) {
  ------------------
  |  | 1848|  52.7k|#define janet_struct_length(t) (janet_struct_head(t)->length)
  |  |  ------------------
  |  |  |  | 1846|  52.7k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (34928:9): [True: 317, False: 52.4k]
  ------------------
34929|       |        /* Error building struct, probably duplicate values. We need to rebuild
34930|       |         * the struct using only the values that went in. The second creation should always
34931|       |         * succeed. */
34932|    317|        JanetKV *newst = janet_struct_begin(janet_struct_hash(st));
  ------------------
  |  | 1850|    317|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1846|    317|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
34933|  9.52k|        for (int32_t i = 0; i < janet_struct_capacity(st); i++) {
  ------------------
  |  | 1849|  9.52k|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1846|  9.52k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (34933:29): [True: 9.20k, False: 317]
  ------------------
34934|  9.20k|            JanetKV *kv = st + i;
34935|  9.20k|            if (!janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|  9.20k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 9.20k]
  |  |  ------------------
  |  |  807|  9.20k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  9.20k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  9.20k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  9.20k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  9.20k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  9.20k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (34935:17): [True: 1.89k, False: 7.31k]
  ------------------
34936|  1.89k|                janet_struct_put(newst, kv->key, kv->value);
34937|  1.89k|            }
34938|  9.20k|        }
34939|    317|        janet_struct_proto(newst) = janet_struct_proto(st);
  ------------------
  |  | 1851|    317|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1846|    317|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                      janet_struct_proto(newst) = janet_struct_proto(st);
  ------------------
  |  | 1851|    317|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1846|    317|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
34940|    317|        st = newst;
34941|    317|    }
34942|  52.7k|    janet_struct_hash(st) = janet_kv_calchash(st, janet_struct_capacity(st));
  ------------------
  |  | 1850|  52.7k|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1846|  52.7k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                  janet_struct_hash(st) = janet_kv_calchash(st, janet_struct_capacity(st));
  ------------------
  |  | 1849|  52.7k|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1846|  52.7k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
34943|  52.7k|    if (janet_struct_proto(st)) {
  ------------------
  |  | 1851|  52.7k|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1846|  52.7k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  |  |  |  Branch (1851:31): [True: 0, False: 52.7k]
  |  |  ------------------
  ------------------
34944|      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)))
  |  |  ------------------
  ------------------
34945|      0|    }
34946|  52.7k|    return (const JanetKV *)st;
34947|  52.7k|}
janet_struct_get:
34956|  21.5M|Janet janet_struct_get(const JanetKV *st, Janet key) {
34957|  33.4M|    for (int i = JANET_MAX_PROTO_DEPTH; st && i; --i, st = janet_struct_proto(st)) {
  ------------------
  |  |  299|  21.5M|#define JANET_MAX_PROTO_DEPTH 200
  ------------------
                  for (int i = JANET_MAX_PROTO_DEPTH; st && i; --i, st = janet_struct_proto(st)) {
  ------------------
  |  | 1851|  11.9M|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1846|  11.9M|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (34957:41): [True: 21.5M, False: 11.9M]
  |  Branch (34957:47): [True: 21.5M, False: 0]
  ------------------
34958|  21.5M|        const JanetKV *kv = janet_struct_find(st, key);
34959|  21.5M|        if (NULL != kv && !janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|  21.5M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 21.5M]
  |  |  ------------------
  |  |  807|  21.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|  21.5M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  21.5M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  21.5M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  21.5M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  21.5M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (34959:13): [True: 21.5M, False: 0]
  |  Branch (34959:27): [True: 9.52M, False: 11.9M]
  ------------------
34960|  9.52M|            return kv->value;
34961|  9.52M|        }
34962|  21.5M|    }
34963|  11.9M|    return janet_wrap_nil();
  ------------------
  |  |  831|  11.9M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  11.9M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  11.9M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  11.9M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34964|  21.5M|}
janet_lib_struct:
35094|  6.86k|void janet_lib_struct(JanetTable *env) {
35095|  6.86k|    JanetRegExt struct_cfuns[] = {
35096|  6.86k|        JANET_CORE_REG("struct/with-proto", cfun_struct_with_proto),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35097|  6.86k|        JANET_CORE_REG("struct/getproto", cfun_struct_getproto),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35098|  6.86k|        JANET_CORE_REG("struct/proto-flatten", cfun_struct_flatten),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35099|  6.86k|        JANET_CORE_REG("struct/to-table", cfun_struct_to_table),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35100|  6.86k|        JANET_CORE_REG("struct/rawget", cfun_struct_rawget),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35101|  6.86k|        JANET_REG_END
  ------------------
  |  | 2110|  6.86k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
35102|  6.86k|    };
35103|       |    janet_core_cfuns_ext(env, NULL, struct_cfuns);
35104|  6.86k|}
janet_symcache_init:
35149|  6.86k|void janet_symcache_init() {
35150|  6.86k|    janet_vm.cache_capacity = 1024;
35151|  6.86k|    janet_vm.cache = janet_calloc(1, (size_t) janet_vm.cache_capacity * sizeof(const uint8_t *));
  ------------------
  |  | 2412|  6.86k|#define janet_calloc(X, Y) calloc((X), (Y))
  ------------------
35152|  6.86k|    if (NULL == janet_vm.cache) {
  ------------------
  |  Branch (35152:9): [True: 0, False: 6.86k]
  ------------------
35153|      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]
  |  |  ------------------
  ------------------
35154|      0|    }
35155|  6.86k|    memset(&janet_vm.gensym_counter, '0', sizeof(janet_vm.gensym_counter));
35156|  6.86k|    janet_vm.gensym_counter[0] = '_';
35157|  6.86k|    janet_vm.cache_count = 0;
35158|  6.86k|    janet_vm.cache_deleted = 0;
35159|  6.86k|}
janet_symcache_deinit:
35162|  6.86k|void janet_symcache_deinit() {
35163|  6.86k|    janet_free((void *)janet_vm.cache);
  ------------------
  |  | 2415|  6.86k|#define janet_free(X) free((X))
  ------------------
35164|       |    janet_vm.cache = NULL;
35165|  6.86k|    janet_vm.cache_capacity = 0;
35166|  6.86k|    janet_vm.cache_count = 0;
35167|  6.86k|    janet_vm.cache_deleted = 0;
35168|  6.86k|}
janet_symbol_deinit:
35270|  13.7M|void janet_symbol_deinit(const uint8_t *sym) {
35271|  13.7M|    int status = 0;
35272|  13.7M|    const uint8_t **bucket = janet_symcache_find(sym, &status);
  ------------------
  |  |35225|  13.7M|    janet_symcache_findmem((str), janet_string_length(str), janet_string_hash(str), (success))
  |  |  ------------------
  |  |  |  | 1813|  13.7M|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1812|  13.7M|#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.7M|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1812|  13.7M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35273|  13.7M|    if (status) {
  ------------------
  |  Branch (35273:9): [True: 13.7M, False: 0]
  ------------------
35274|  13.7M|        janet_vm.cache_count--;
35275|  13.7M|        janet_vm.cache_deleted++;
35276|  13.7M|        *bucket = JANET_SYMCACHE_DELETED;
35277|  13.7M|    }
35278|  13.7M|}
janet_symbol:
35281|  19.4M|const uint8_t *janet_symbol(const uint8_t *str, int32_t len) {
35282|  19.4M|    int32_t hash = janet_string_calchash(str, len);
35283|  19.4M|    uint8_t *newstr;
35284|  19.4M|    int success = 0;
35285|  19.4M|    const uint8_t **bucket = janet_symcache_findmem(str, len, hash, &success);
35286|  19.4M|    if (success)
  ------------------
  |  Branch (35286:9): [True: 5.73M, False: 13.7M]
  ------------------
35287|  5.73M|        return *bucket;
35288|  13.7M|    JanetStringHead *head = janet_gcalloc(JANET_MEMORY_SYMBOL, sizeof(JanetStringHead) + (size_t) len + 1);
35289|  13.7M|    head->hash = hash;
35290|  13.7M|    head->length = len;
35291|  13.7M|    newstr = (uint8_t *)(head->data);
35292|  13.7M|    safe_memcpy(newstr, str, len);
35293|  13.7M|    newstr[len] = 0;
35294|  13.7M|    janet_symcache_put((const uint8_t *)newstr, bucket);
35295|  13.7M|    return newstr;
35296|  19.4M|}
janet_csymbol:
35299|  2.55M|const uint8_t *janet_csymbol(const char *cstr) {
35300|  2.55M|    return janet_symbol((const uint8_t *)cstr, (int32_t) strlen(cstr));
35301|  2.55M|}
janet_table_init:
35425|  16.5M|JanetTable *janet_table_init(JanetTable *table, int32_t capacity) {
35426|  16.5M|    return janet_table_init_impl(table, capacity, 1);
35427|  16.5M|}
janet_table_init_raw:
35430|  20.5k|JanetTable *janet_table_init_raw(JanetTable *table, int32_t capacity) {
35431|  20.5k|    return janet_table_init_impl(table, capacity, 0);
35432|  20.5k|}
janet_table_deinit:
35435|  16.5M|void janet_table_deinit(JanetTable *table) {
35436|  16.5M|    if (table->gc.flags & JANET_TABLE_FLAG_STACK) {
  ------------------
  |  |35385|  16.5M|#define JANET_TABLE_FLAG_STACK 0x10000
  ------------------
  |  Branch (35436:9): [True: 16.5M, False: 20.5k]
  ------------------
35437|  16.5M|        janet_sfree(table->data);
35438|  16.5M|    } else {
35439|  20.5k|        janet_free(table->data);
  ------------------
  |  | 2415|  20.5k|#define janet_free(X) free((X))
  ------------------
35440|  20.5k|    }
35441|  16.5M|}
janet_table:
35445|  5.04M|JanetTable *janet_table(int32_t capacity) {
35446|  5.04M|    JanetTable *table = janet_gcalloc(JANET_MEMORY_TABLE, sizeof(JanetTable));
35447|  5.04M|    return janet_table_init_impl(table, capacity, 0);
35448|  5.04M|}
janet_table_find:
35467|   214M|JanetKV *janet_table_find(JanetTable *t, Janet key) {
35468|   214M|    return (JanetKV *) janet_dict_find(t->data, t->capacity, key);
35469|   214M|}
janet_table_get:
35503|  60.9M|Janet janet_table_get(JanetTable *t, Janet key) {
35504|   108M|    for (int i = JANET_MAX_PROTO_DEPTH; t && i; t = t->proto, --i) {
  ------------------
  |  |  299|  60.9M|#define JANET_MAX_PROTO_DEPTH 200
  ------------------
  |  Branch (35504:41): [True: 60.9M, False: 47.4M]
  |  Branch (35504:46): [True: 60.9M, False: 0]
  ------------------
35505|  60.9M|        JanetKV *bucket = janet_table_find(t, key);
35506|  60.9M|        if (NULL != bucket && !janet_checktype(bucket->key, JANET_NIL))
  ------------------
  |  |  806|  60.9M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 60.9M]
  |  |  ------------------
  |  |  807|  60.9M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  60.9M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  60.9M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  60.9M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  60.9M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  60.9M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35506:13): [True: 60.9M, False: 0]
  |  Branch (35506:31): [True: 13.4M, False: 47.4M]
  ------------------
35507|  13.4M|            return bucket->value;
35508|  60.9M|    }
35509|  47.4M|    return janet_wrap_nil();
  ------------------
  |  |  831|  47.4M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  47.4M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  47.4M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  47.4M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35510|  60.9M|}
janet_table_get_keyword:
35513|  82.3k|Janet janet_table_get_keyword(JanetTable *t, const char *keyword) {
35514|  82.3k|    int32_t keyword_len = (int32_t) strlen(keyword);
35515|   144k|    for (int i = JANET_MAX_PROTO_DEPTH; t && i; t = t->proto, --i) {
  ------------------
  |  |  299|  82.3k|#define JANET_MAX_PROTO_DEPTH 200
  ------------------
  |  Branch (35515:41): [True: 82.3k, False: 61.7k]
  |  Branch (35515:46): [True: 82.3k, False: 0]
  ------------------
35516|  82.3k|        JanetKV *bucket = (JanetKV *) janet_dict_find_keyword(t->data, t->capacity, (const uint8_t *) keyword, keyword_len);
35517|  82.3k|        if (NULL != bucket && !janet_checktype(bucket->key, JANET_NIL))
  ------------------
  |  |  806|  82.3k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 82.3k]
  |  |  ------------------
  |  |  807|  82.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|  82.3k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  82.3k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  82.3k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  82.3k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  82.3k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35517:13): [True: 82.3k, False: 0]
  |  Branch (35517:31): [True: 20.5k, False: 61.7k]
  ------------------
35518|  20.5k|            return bucket->value;
35519|  82.3k|    }
35520|  61.7k|    return janet_wrap_nil();
  ------------------
  |  |  831|  61.7k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  61.7k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  61.7k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  61.7k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35521|  82.3k|}
janet_table_get_ex:
35524|     27|Janet janet_table_get_ex(JanetTable *t, Janet key, JanetTable **which) {
35525|     54|    for (int i = JANET_MAX_PROTO_DEPTH; t && i; t = t->proto, --i) {
  ------------------
  |  |  299|     27|#define JANET_MAX_PROTO_DEPTH 200
  ------------------
  |  Branch (35525:41): [True: 27, False: 27]
  |  Branch (35525:46): [True: 27, False: 0]
  ------------------
35526|     27|        JanetKV *bucket = janet_table_find(t, key);
35527|     27|        if (NULL != bucket && !janet_checktype(bucket->key, JANET_NIL)) {
  ------------------
  |  |  806|     27|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 27]
  |  |  ------------------
  |  |  807|     27|        ? 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|     27|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|     27|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|     27|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     27|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     27|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35527:13): [True: 27, False: 0]
  |  Branch (35527:31): [True: 0, False: 27]
  ------------------
35528|      0|            *which = t;
35529|      0|            return bucket->value;
35530|      0|        }
35531|     27|    }
35532|     27|    return janet_wrap_nil();
  ------------------
  |  |  831|     27|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|     27|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     27|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     27|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35533|     27|}
janet_table_rawget:
35536|  20.7k|Janet janet_table_rawget(JanetTable *t, Janet key) {
35537|  20.7k|    JanetKV *bucket = janet_table_find(t, key);
35538|  20.7k|    if (NULL != bucket && !janet_checktype(bucket->key, JANET_NIL))
  ------------------
  |  |  806|  20.7k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 20.7k]
  |  |  ------------------
  |  |  807|  20.7k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  20.7k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  20.7k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  20.7k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  20.7k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  20.7k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35538:9): [True: 20.7k, False: 0]
  |  Branch (35538:27): [True: 159, False: 20.6k]
  ------------------
35539|    159|        return bucket->value;
35540|  20.6k|    else
35541|  20.6k|        return janet_wrap_nil();
  ------------------
  |  |  831|  20.6k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  20.6k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  20.6k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  20.6k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35542|  20.7k|}
janet_table_remove:
35546|  58.7M|Janet janet_table_remove(JanetTable *t, Janet key) {
35547|  58.7M|    JanetKV *bucket = janet_table_find(t, key);
35548|  58.7M|    if (NULL != bucket && !janet_checktype(bucket->key, JANET_NIL)) {
  ------------------
  |  |  806|  58.7M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 58.7M]
  |  |  ------------------
  |  |  807|  58.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|  58.7M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  58.7M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  58.7M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  58.7M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  58.7M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35548:9): [True: 58.7M, False: 0]
  |  Branch (35548:27): [True: 32.5M, False: 26.2M]
  ------------------
35549|  32.5M|        Janet ret = bucket->value;
35550|  32.5M|        t->count--;
35551|  32.5M|        t->deleted++;
35552|  32.5M|        bucket->key = janet_wrap_nil();
  ------------------
  |  |  831|  32.5M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  32.5M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  32.5M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  32.5M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35553|  32.5M|        bucket->value = janet_wrap_false();
  ------------------
  |  |  833|  32.5M|#define janet_wrap_false() janet_nanbox_from_payload(JANET_BOOLEAN, 0)
  |  |  ------------------
  |  |  |  |  822|  32.5M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  32.5M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  32.5M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35554|  32.5M|        return ret;
35555|  32.5M|    } else {
35556|  26.2M|        return janet_wrap_nil();
  ------------------
  |  |  831|  26.2M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  26.2M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  26.2M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  26.2M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35557|  26.2M|    }
35558|  58.7M|}
janet_table_put:
35561|  64.8M|void janet_table_put(JanetTable *t, Janet key, Janet value) {
35562|  64.8M|    if (janet_checktype(key, JANET_NIL)) return;
  ------------------
  |  |  806|  64.8M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 87, False: 64.8M]
  |  |  |  Branch (806:6): [Folded, False: 64.8M]
  |  |  ------------------
  |  |  807|  64.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|  64.8M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  64.8M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  64.8M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  64.8M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  64.8M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35563|  64.8M|    if (janet_checktype(key, JANET_NUMBER) && isnan(janet_unwrap_number(key))) return;
  ------------------
  |  |  806|   129M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 3.63k, False: 64.8M]
  |  |  |  Branch (806:6): [True: 64.8M, Folded]
  |  |  ------------------
  |  |  807|   129M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|  64.8M|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 3.63k, False: 64.8M]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 64.8M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   129M|        : 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 (35563:47): [True: 0, False: 3.63k]
  ------------------
35564|  64.8M|    if (janet_checktype(value, JANET_NIL)) {
  ------------------
  |  |  806|  64.8M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 151, False: 64.8M]
  |  |  |  Branch (806:6): [Folded, False: 64.8M]
  |  |  ------------------
  |  |  807|  64.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|  64.8M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  64.8M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  64.8M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  64.8M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  64.8M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35565|    151|        janet_table_remove(t, key);
35566|  64.8M|    } else {
35567|  64.8M|        JanetKV *bucket = janet_table_find(t, key);
35568|  64.8M|        if (NULL != bucket && !janet_checktype(bucket->key, JANET_NIL)) {
  ------------------
  |  |  806|  64.8M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 64.8M]
  |  |  ------------------
  |  |  807|  64.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|  64.8M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  64.8M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  64.8M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  64.8M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  64.8M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35568:13): [True: 64.8M, False: 0]
  |  Branch (35568:31): [True: 459, False: 64.8M]
  ------------------
35569|    459|            bucket->value = value;
35570|  64.8M|        } else {
35571|  64.8M|            if (NULL == bucket || 2 * (t->count + t->deleted + 1) > t->capacity) {
  ------------------
  |  Branch (35571:17): [True: 0, False: 64.8M]
  |  Branch (35571:35): [True: 5.25M, False: 59.6M]
  ------------------
35572|  5.25M|                janet_table_rehash(t, janet_tablen(2 * t->count + 2));
35573|  5.25M|                bucket = janet_table_find(t, key);
35574|  5.25M|            }
35575|  64.8M|            if (janet_checktype(bucket->value, JANET_BOOLEAN))
  ------------------
  |  |  806|  64.8M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 64.8M]
  |  |  |  Branch (806:6): [Folded, False: 64.8M]
  |  |  ------------------
  |  |  807|  64.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|  64.8M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  64.8M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  64.8M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  64.8M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  64.8M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35576|      0|                --t->deleted;
35577|  64.8M|            bucket->key = key;
35578|  64.8M|            bucket->value = value;
35579|  64.8M|            ++t->count;
35580|  64.8M|        }
35581|  64.8M|    }
35582|  64.8M|}
janet_table_clone:
35611|    138|JanetTable *janet_table_clone(JanetTable *table) {
35612|    138|    JanetTable *newTable = janet_gcalloc(JANET_MEMORY_TABLE, sizeof(JanetTable));
35613|    138|    newTable->count = table->count;
35614|    138|    newTable->capacity = table->capacity;
35615|    138|    newTable->deleted = table->deleted;
35616|    138|    newTable->proto = table->proto;
35617|    138|    newTable->data = array_allocate(sizeof(JanetKV), newTable->capacity);
35618|    138|    if (NULL == newTable->data) {
  ------------------
  |  Branch (35618:9): [True: 0, False: 138]
  ------------------
35619|      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]
  |  |  ------------------
  ------------------
35620|      0|    }
35621|    138|    memcpy(newTable->data, table->data, (size_t) table->capacity * sizeof(JanetKV));
35622|    138|    return newTable;
35623|    138|}
janet_lib_table:
35791|  6.86k|void janet_lib_table(JanetTable *env) {
35792|  6.86k|    JanetRegExt table_cfuns[] = {
35793|  6.86k|        JANET_CORE_REG("table/new", cfun_table_new),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35794|  6.86k|        JANET_CORE_REG("table/weak", cfun_table_weak),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35795|  6.86k|        JANET_CORE_REG("table/weak-keys", cfun_table_weak_keys),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35796|  6.86k|        JANET_CORE_REG("table/weak-values", cfun_table_weak_values),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35797|  6.86k|        JANET_CORE_REG("table/to-struct", cfun_table_tostruct),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35798|  6.86k|        JANET_CORE_REG("table/getproto", cfun_table_getproto),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35799|  6.86k|        JANET_CORE_REG("table/setproto", cfun_table_setproto),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35800|  6.86k|        JANET_CORE_REG("table/rawget", cfun_table_rawget),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35801|  6.86k|        JANET_CORE_REG("table/clone", cfun_table_clone),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35802|  6.86k|        JANET_CORE_REG("table/clear", cfun_table_clear),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35803|  6.86k|        JANET_CORE_REG("table/proto-flatten", cfun_table_proto_flatten),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35804|  6.86k|        JANET_REG_END
  ------------------
  |  | 2110|  6.86k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
35805|  6.86k|    };
35806|       |    janet_core_cfuns_ext(env, NULL, table_cfuns);
35807|  6.86k|}
janet_tuple_begin:
35852|  5.22M|Janet *janet_tuple_begin(int32_t length) {
35853|  5.22M|    janet_assert(length <= MAX_TUPLE_LENGTH, "tuple overflow");
  ------------------
  |  |  389|  5.22M|#define janet_assert(c, m) do { \
  |  |  390|  5.22M|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  378|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  379|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  380|      0|        __FILE__,\
  |  |  |  |  381|      0|        __LINE__,\
  |  |  |  |  382|      0|        (m));\
  |  |  |  |  383|      0|    abort();\
  |  |  |  |  384|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (384:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (390:9): [True: 0, False: 5.22M]
  |  |  ------------------
  |  |  391|  5.22M|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 5.22M]
  |  |  ------------------
  ------------------
35854|  5.22M|    size_t size = sizeof(JanetTupleHead) + ((size_t) length * sizeof(Janet));
35855|  5.22M|    JanetTupleHead *head = janet_gcalloc(JANET_MEMORY_TUPLE, size);
35856|  5.22M|    head->sm_line = -1;
35857|  5.22M|    head->sm_column = -1;
35858|  5.22M|    head->length = length;
35859|  5.22M|    return (Janet *)(head->data);
35860|  5.22M|}
janet_tuple_end:
35863|  5.22M|const Janet *janet_tuple_end(Janet *tuple) {
35864|  5.22M|    janet_tuple_hash(tuple) = janet_array_calchash(tuple, janet_tuple_length(tuple));
  ------------------
  |  | 1803|  5.22M|#define janet_tuple_hash(t) (janet_tuple_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1800|  5.22M|#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.22M|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1800|  5.22M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
35865|  5.22M|    return (const Janet *)tuple;
35866|  5.22M|}
janet_tuple_n:
35869|  14.7k|const Janet *janet_tuple_n(const Janet *values, int32_t n) {
35870|  14.7k|    Janet *t = janet_tuple_begin(n);
35871|  14.7k|    safe_memcpy(t, values, sizeof(Janet) * n);
35872|  14.7k|    return janet_tuple_end(t);
35873|  14.7k|}
janet_lib_tuple:
35976|  6.86k|void janet_lib_tuple(JanetTable *env) {
35977|  6.86k|    JanetRegExt tuple_cfuns[] = {
35978|  6.86k|        JANET_CORE_REG("tuple/brackets", cfun_tuple_brackets),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35979|  6.86k|        JANET_CORE_REG("tuple/slice", cfun_tuple_slice),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35980|  6.86k|        JANET_CORE_REG("tuple/type", cfun_tuple_type),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35981|  6.86k|        JANET_CORE_REG("tuple/sourcemap", cfun_tuple_sourcemap),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35982|  6.86k|        JANET_CORE_REG("tuple/setmap", cfun_tuple_setmap),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35983|  6.86k|        JANET_CORE_REG("tuple/join", cfun_tuple_join),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35984|  6.86k|        JANET_REG_END
  ------------------
  |  | 2110|  6.86k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
35985|  6.86k|    };
35986|       |    janet_core_cfuns_ext(env, NULL, tuple_cfuns);
35987|  6.86k|}
janet_hash_mix:
36113|  49.2M|uint32_t janet_hash_mix(uint32_t input, uint32_t more) {
36114|  49.2M|    uint32_t mix1 = (more + 0x9e3779b9 + (input << 6) + (input >> 2));
36115|  49.2M|    return input ^ (0x9e3779b9 + (mix1 << 6) + (mix1 >> 2));
36116|  49.2M|}
janet_string_calchash:
36120|   120M|int32_t janet_string_calchash(const uint8_t *str, int32_t len) {
36121|   120M|    if (NULL == str || len == 0) return 5381;
  ------------------
  |  Branch (36121:9): [True: 413, False: 120M]
  |  Branch (36121:24): [True: 87.9M, False: 32.1M]
  ------------------
36122|  32.1M|    const uint8_t *end = str + len;
36123|  32.1M|    uint32_t hash = 5381;
36124|  2.49G|    while (str < end)
  ------------------
  |  Branch (36124:12): [True: 2.45G, False: 32.1M]
  ------------------
36125|  2.45G|        hash = (hash << 5) + hash + *str++;
36126|  32.1M|    hash = janet_hash_mix(hash, (uint32_t) len);
36127|  32.1M|    return (int32_t) hash;
36128|   120M|}
janet_array_calchash:
36243|  5.22M|int32_t janet_array_calchash(const Janet *array, int32_t len) {
36244|  5.22M|    const Janet *end = array + len;
36245|  5.22M|    uint32_t hash = 33;
36246|  20.5M|    while (array < end) {
  ------------------
  |  Branch (36246:12): [True: 15.3M, False: 5.22M]
  ------------------
36247|  15.3M|        hash = janet_hash_mix(hash, janet_hash(*array++));
36248|  15.3M|    }
36249|  5.22M|    return (int32_t) hash;
36250|  5.22M|}
janet_kv_calchash:
36253|  52.7k|int32_t janet_kv_calchash(const JanetKV *kvs, int32_t len) {
36254|  52.7k|    const JanetKV *end = kvs + len;
36255|  52.7k|    uint32_t hash = 33;
36256|   901k|    while (kvs < end) {
  ------------------
  |  Branch (36256:12): [True: 848k, False: 52.7k]
  ------------------
36257|   848k|        hash = janet_hash_mix(hash, janet_hash(kvs->key));
36258|   848k|        hash = janet_hash_mix(hash, janet_hash(kvs->value));
36259|   848k|        kvs++;
36260|   848k|    }
36261|  52.7k|    return (int32_t) hash;
36262|  52.7k|}
janet_tablen:
36266|  26.8M|int32_t janet_tablen(int32_t n) {
36267|  26.8M|    if (n < 0) return 0;
  ------------------
  |  Branch (36267:9): [True: 0, False: 26.8M]
  ------------------
36268|  26.8M|    n |= n >> 1;
36269|  26.8M|    n |= n >> 2;
36270|  26.8M|    n |= n >> 4;
36271|  26.8M|    n |= n >> 8;
36272|  26.8M|    n |= n >> 16;
36273|  26.8M|    return n >= DICT_MAX ? DICT_MAX : n + 1;
  ------------------
  |  |  507|  26.8M|#define DICT_MAX INT32_MAX
  ------------------
                  return n >= DICT_MAX ? DICT_MAX : n + 1;
  ------------------
  |  |  507|  26.8M|#define DICT_MAX INT32_MAX
  ------------------
  |  Branch (36273:12): [True: 0, False: 26.8M]
  ------------------
36274|  26.8M|}
safe_memcpy:
36277|   114M|void safe_memcpy(void *dest, const void *src, size_t len) {
36278|   114M|    if (!len) return;
  ------------------
  |  Branch (36278:9): [True: 88.0M, False: 26.3M]
  ------------------
36279|  26.3M|    memcpy(dest, src, len);
36280|  26.3M|}
janet_dict_find_deep:
36284|   107M|const JanetKV *janet_dict_find_deep(const JanetKV *buckets, int32_t cap, Janet key) {
36285|   107M|    janet_assert(cap != 0, "bad capacity");
  ------------------
  |  |  389|   107M|#define janet_assert(c, m) do { \
  |  |  390|   107M|    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: 107M]
  |  |  ------------------
  |  |  391|   107M|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 107M]
  |  |  ------------------
  ------------------
36286|   107M|    int32_t index = janet_maphash(cap, janet_hash(key));
  ------------------
  |  |  396|   107M|#define janet_maphash(cap, hash) ((uint32_t)(hash) & (cap - 1))
  ------------------
36287|   107M|    int32_t i;
36288|   107M|    const JanetKV *first_bucket = NULL;
36289|       |    /* Higher half */
36290|   129M|    for (i = index; i < cap; i++) {
  ------------------
  |  Branch (36290:21): [True: 128M, False: 796k]
  ------------------
36291|   128M|        const JanetKV *kv = buckets + i;
36292|   128M|        if (janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|   128M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 75.2M, False: 53.4M]
  |  |  |  Branch (806:6): [Folded, False: 128M]
  |  |  ------------------
  |  |  807|   128M|        ? 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|   128M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   128M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   128M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   128M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   128M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36293|  75.2M|            if (janet_checktype(kv->value, JANET_NIL)) {
  ------------------
  |  |  806|  75.2M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 66.9M, False: 8.28M]
  |  |  |  Branch (806:6): [Folded, False: 75.2M]
  |  |  ------------------
  |  |  807|  75.2M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  75.2M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  75.2M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  75.2M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  75.2M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  75.2M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36294|  66.9M|                return kv;
36295|  66.9M|            } else if (NULL == first_bucket) {
  ------------------
  |  Branch (36295:24): [True: 6.29M, False: 1.98M]
  ------------------
36296|  6.29M|                first_bucket = kv;
36297|  6.29M|            }
36298|  75.2M|        } else if (janet_bitwise_same(kv->key, key) || janet_equals(kv->key, key)) {
  ------------------
  |  |  401|   106M|#define janet_bitwise_same(x, y) (janet_u64(x) == janet_u64(y))
  |  |  ------------------
  |  |  |  |  788|  53.4M|#define janet_u64(x) ((x).u64)
  |  |  ------------------
  |  |               #define janet_bitwise_same(x, y) (janet_u64(x) == janet_u64(y))
  |  |  ------------------
  |  |  |  |  788|  53.4M|#define janet_u64(x) ((x).u64)
  |  |  ------------------
  |  |  |  Branch (401:34): [True: 39.7M, False: 13.7M]
  |  |  ------------------
  ------------------
  |  Branch (36298:56): [True: 975, False: 13.7M]
  ------------------
36299|  39.7M|            return buckets + i;
36300|  39.7M|        }
36301|   128M|    }
36302|       |    /* Lower half */
36303|  1.12M|    for (i = 0; i < index; i++) {
  ------------------
  |  Branch (36303:17): [True: 1.12M, False: 0]
  ------------------
36304|  1.12M|        const JanetKV *kv = buckets + i;
36305|  1.12M|        if (janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|  1.12M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 816k, False: 304k]
  |  |  |  Branch (806:6): [Folded, False: 1.12M]
  |  |  ------------------
  |  |  807|  1.12M|        ? 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.12M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  1.12M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  1.12M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.12M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.12M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36306|   816k|            if (janet_checktype(kv->value, JANET_NIL)) {
  ------------------
  |  |  806|   816k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 580k, False: 236k]
  |  |  |  Branch (806:6): [Folded, False: 816k]
  |  |  ------------------
  |  |  807|   816k|        ? 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|   816k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   816k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   816k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   816k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   816k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36307|   580k|                return kv;
36308|   580k|            } else if (NULL == first_bucket) {
  ------------------
  |  Branch (36308:24): [True: 117k, False: 119k]
  ------------------
36309|   117k|                first_bucket = kv;
36310|   117k|            }
36311|   816k|        } else if (janet_bitwise_same(kv->key, key) || janet_equals(kv->key, key)) {
  ------------------
  |  |  401|   609k|#define janet_bitwise_same(x, y) (janet_u64(x) == janet_u64(y))
  |  |  ------------------
  |  |  |  |  788|   304k|#define janet_u64(x) ((x).u64)
  |  |  ------------------
  |  |               #define janet_bitwise_same(x, y) (janet_u64(x) == janet_u64(y))
  |  |  ------------------
  |  |  |  |  788|   304k|#define janet_u64(x) ((x).u64)
  |  |  ------------------
  |  |  |  Branch (401:34): [True: 216k, False: 88.3k]
  |  |  ------------------
  ------------------
  |  Branch (36311:56): [True: 105, False: 88.2k]
  ------------------
36312|   216k|            return buckets + i;
36313|   216k|        }
36314|  1.12M|    }
36315|      0|    return first_bucket;
36316|   796k|}
janet_dict_find_shallow:
36319|   128M|const JanetKV *janet_dict_find_shallow(const JanetKV *buckets, int32_t cap, Janet key) {
36320|   128M|    janet_assert(cap != 0, "bad capacity");
  ------------------
  |  |  389|   128M|#define janet_assert(c, m) do { \
  |  |  390|   128M|    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: 128M]
  |  |  ------------------
  |  |  391|   128M|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 128M]
  |  |  ------------------
  ------------------
36321|   128M|    int32_t hash;
36322|       |    /* Manual inline common case of symbol or keyword */
36323|   128M|    if (janet_checktype(key, JANET_KEYWORD) || janet_checktype(key, JANET_SYMBOL)) {
  ------------------
  |  |  806|   256M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 37.2M, False: 91.1M]
  |  |  |  Branch (806:6): [Folded, False: 128M]
  |  |  ------------------
  |  |  807|   256M|        ? 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|   256M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   128M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   128M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   128M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   128M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  if (janet_checktype(key, JANET_KEYWORD) || janet_checktype(key, JANET_SYMBOL)) {
  ------------------
  |  |  806|  91.1M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 44.4M, False: 46.6M]
  |  |  |  Branch (806:6): [Folded, False: 91.1M]
  |  |  ------------------
  |  |  807|  91.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|  91.1M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  91.1M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  91.1M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  91.1M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  91.1M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36324|  81.7M|        hash = janet_string_hash(janet_unwrap_string(key));
  ------------------
  |  | 1814|  81.7M|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  ------------------
  |  |  |  | 1812|  81.7M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
36325|  81.7M|    } else {
36326|  46.6M|        hash = janet_hash(key);
36327|  46.6M|    }
36328|   128M|    int32_t index = janet_maphash(cap, hash);
  ------------------
  |  |  396|   128M|#define janet_maphash(cap, hash) ((uint32_t)(hash) & (cap - 1))
  ------------------
36329|   128M|    int32_t i;
36330|   128M|    const JanetKV *first_bucket = NULL;
36331|       |    /* Higher half */
36332|   162M|    for (i = index; i < cap; i++) {
  ------------------
  |  Branch (36332:21): [True: 155M, False: 6.19M]
  ------------------
36333|   155M|        const JanetKV *kv = buckets + i;
36334|   155M|        if (janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|   155M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 111M, False: 44.4M]
  |  |  |  Branch (806:6): [Folded, False: 155M]
  |  |  ------------------
  |  |  807|   155M|        ? 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|   155M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   155M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   155M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   155M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   155M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36335|   111M|            if (janet_checktype(kv->value, JANET_NIL)) {
  ------------------
  |  |  806|   111M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 106M, False: 4.90M]
  |  |  |  Branch (806:6): [Folded, False: 111M]
  |  |  ------------------
  |  |  807|   111M|        ? 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|   111M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   111M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   111M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   111M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   111M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36336|   106M|                return kv;
36337|   106M|            } else if (NULL == first_bucket) {
  ------------------
  |  Branch (36337:24): [True: 3.58M, False: 1.31M]
  ------------------
36338|  3.58M|                first_bucket = kv;
36339|  3.58M|            }
36340|   111M|        } else if (janet_bitwise_same(kv->key, key)) {
  ------------------
  |  |  401|  44.4M|#define janet_bitwise_same(x, y) (janet_u64(x) == janet_u64(y))
  |  |  ------------------
  |  |  |  |  788|  44.4M|#define janet_u64(x) ((x).u64)
  |  |  ------------------
  |  |               #define janet_bitwise_same(x, y) (janet_u64(x) == janet_u64(y))
  |  |  ------------------
  |  |  |  |  788|  44.4M|#define janet_u64(x) ((x).u64)
  |  |  ------------------
  |  |  |  Branch (401:34): [True: 15.6M, False: 28.8M]
  |  |  ------------------
  ------------------
36341|  15.6M|            return buckets + i;
36342|  15.6M|        }
36343|   155M|    }
36344|       |    /* Lower half */
36345|  6.48M|    for (i = 0; i < index; i++) {
  ------------------
  |  Branch (36345:17): [True: 6.48M, False: 0]
  ------------------
36346|  6.48M|        const JanetKV *kv = buckets + i;
36347|  6.48M|        if (janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|  6.48M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 6.38M, False: 96.0k]
  |  |  |  Branch (806:6): [Folded, False: 6.48M]
  |  |  ------------------
  |  |  807|  6.48M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  6.48M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  6.48M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  6.48M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  6.48M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  6.48M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36348|  6.38M|            if (janet_checktype(kv->value, JANET_NIL)) {
  ------------------
  |  |  806|  6.38M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 6.18M, False: 205k]
  |  |  |  Branch (806:6): [Folded, False: 6.38M]
  |  |  ------------------
  |  |  807|  6.38M|        ? 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.38M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  6.38M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  6.38M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  6.38M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  6.38M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36349|  6.18M|                return kv;
36350|  6.18M|            } else if (NULL == first_bucket) {
  ------------------
  |  Branch (36350:24): [True: 20.0k, False: 185k]
  ------------------
36351|  20.0k|                first_bucket = kv;
36352|  20.0k|            }
36353|  6.38M|        } else if (janet_bitwise_same(kv->key, key)) {
  ------------------
  |  |  401|  96.0k|#define janet_bitwise_same(x, y) (janet_u64(x) == janet_u64(y))
  |  |  ------------------
  |  |  |  |  788|  96.0k|#define janet_u64(x) ((x).u64)
  |  |  ------------------
  |  |               #define janet_bitwise_same(x, y) (janet_u64(x) == janet_u64(y))
  |  |  ------------------
  |  |  |  |  788|  96.0k|#define janet_u64(x) ((x).u64)
  |  |  ------------------
  |  |  |  Branch (401:34): [True: 14.3k, False: 81.7k]
  |  |  ------------------
  ------------------
36354|  14.3k|            return buckets + i;
36355|  14.3k|        }
36356|  6.48M|    }
36357|      0|    return first_bucket;
36358|  6.19M|}
janet_dict_find:
36362|   235M|const JanetKV *janet_dict_find(const JanetKV *buckets, int32_t cap, Janet key) {
36363|   235M|    if (janet_checktypes(key, HARD_KEY_TYPES) || (janet_checktype(key, JANET_NUMBER) && janet_unwrap_number(key) == 0)) {
  ------------------
  |  |  969|   471M|#define janet_checktypes(x, tps) ((1 << janet_type(x)) & (tps))
  |  |  ------------------
  |  |  |  |  795|   235M|    (isnan((x).number) \
  |  |  |  |  796|   235M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  |  |  797|   235M|        : JANET_NUMBER)
  |  |  ------------------
  |  |  |  Branch (969:34): [True: 86.9M, False: 148M]
  |  |  ------------------
  ------------------
                  if (janet_checktypes(key, HARD_KEY_TYPES) || (janet_checktype(key, JANET_NUMBER) && janet_unwrap_number(key) == 0)) {
  ------------------
  |  |  806|   297M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 50.8M, False: 98.0M]
  |  |  |  Branch (806:6): [True: 148M, Folded]
  |  |  ------------------
  |  |  807|   297M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|   148M|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 50.8M, False: 98.0M]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 98.0M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   297M|        : 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  if (janet_checktypes(key, HARD_KEY_TYPES) || (janet_checktype(key, JANET_NUMBER) && janet_unwrap_number(key) == 0)) {
  ------------------
  |  |  839|  50.8M|#define janet_unwrap_number(x) ((x).number)
  ------------------
  |  Branch (36363:9): [True: 185M, False: 50.8M]
  |  Branch (36363:89): [True: 20.4M, False: 30.3M]
  ------------------
36364|   107M|        return janet_dict_find_deep(buckets, cap, key);
36365|   128M|    } else {
36366|   128M|        return janet_dict_find_shallow(buckets, cap, key);
36367|   128M|    }
36368|   235M|}
janet_dict_find_keyword:
36374|  82.3k|    const uint8_t *cstr, int32_t cstr_len) {
36375|  82.3k|    int32_t hash = janet_string_calchash(cstr, cstr_len);
36376|  82.3k|    int32_t index = janet_maphash(cap, hash);
  ------------------
  |  |  396|  82.3k|#define janet_maphash(cap, hash) ((uint32_t)(hash) & (cap - 1))
  ------------------
36377|  82.3k|    int32_t i;
36378|  82.3k|    const JanetKV *first_bucket = NULL;
36379|       |    /* Higher half */
36380|   123k|    for (i = index; i < cap; i++) {
  ------------------
  |  Branch (36380:21): [True: 123k, False: 0]
  ------------------
36381|   123k|        const JanetKV *kv = buckets + i;
36382|   123k|        if (janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|   123k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 61.7k, False: 61.7k]
  |  |  |  Branch (806:6): [Folded, False: 123k]
  |  |  ------------------
  |  |  807|   123k|        ? 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|   123k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   123k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   123k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   123k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   123k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36383|  61.7k|            if (janet_checktype(kv->value, JANET_NIL)) {
  ------------------
  |  |  806|  61.7k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 61.7k, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 61.7k]
  |  |  ------------------
  |  |  807|  61.7k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  61.7k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  61.7k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  61.7k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  61.7k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  61.7k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36384|  61.7k|                return kv;
36385|  61.7k|            } else if (NULL == first_bucket) {
  ------------------
  |  Branch (36385:24): [True: 0, False: 0]
  ------------------
36386|      0|                first_bucket = kv;
36387|      0|            }
36388|  61.7k|        } else if (janet_checktype(kv->key, JANET_KEYWORD)) {
  ------------------
  |  |  806|  61.7k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 61.7k, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 61.7k]
  |  |  ------------------
  |  |  807|  61.7k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  61.7k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  61.7k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  61.7k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  61.7k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  61.7k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36389|       |            /* Works for symbol and keyword, too */
36390|  61.7k|            JanetString str = janet_unwrap_string(kv->key);
  ------------------
  |  |  863|  61.7k|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
36391|  61.7k|            int32_t len = janet_string_length(str);
  ------------------
  |  | 1813|  61.7k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|  61.7k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
36392|  61.7k|            if (hash == janet_string_hash(str) && len == cstr_len && !memcmp(str, cstr, len)) {
  ------------------
  |  | 1814|   123k|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  ------------------
  |  |  |  | 1812|  61.7k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (36392:17): [True: 20.5k, False: 41.1k]
  |  Branch (36392:51): [True: 20.5k, False: 0]
  |  Branch (36392:70): [True: 20.5k, False: 0]
  ------------------
36393|  20.5k|                return buckets + i;
36394|  20.5k|            }
36395|  61.7k|        }
36396|   123k|    }
36397|       |    /* Lower half */
36398|      0|    for (i = 0; i < index; i++) {
  ------------------
  |  Branch (36398:17): [True: 0, False: 0]
  ------------------
36399|      0|        const JanetKV *kv = buckets + i;
36400|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36401|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36402|      0|                return kv;
36403|      0|            } else if (NULL == first_bucket) {
  ------------------
  |  Branch (36403:24): [True: 0, False: 0]
  ------------------
36404|      0|                first_bucket = kv;
36405|      0|            }
36406|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36407|       |            /* Works for symbol and keyword, too */
36408|      0|            JanetString str = janet_unwrap_string(kv->key);
  ------------------
  |  |  863|      0|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
36409|      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)))
  |  |  ------------------
  ------------------
36410|      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 (36410:17): [True: 0, False: 0]
  |  Branch (36410:51): [True: 0, False: 0]
  |  Branch (36410:70): [True: 0, False: 0]
  ------------------
36411|      0|                return buckets + i;
36412|      0|            }
36413|      0|        }
36414|      0|    }
36415|      0|    return first_bucket;
36416|      0|}
janet_cstrcmp:
36441|  94.1k|int janet_cstrcmp(const uint8_t *str, const char *other) {
36442|  94.1k|    int32_t len = janet_string_length(str);
  ------------------
  |  | 1813|  94.1k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|  94.1k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
36443|  94.1k|    int32_t index;
36444|   173k|    for (index = 0; index < len; index++) {
  ------------------
  |  Branch (36444:21): [True: 155k, False: 18.2k]
  ------------------
36445|   155k|        uint8_t c = str[index];
36446|   155k|        uint8_t k = ((const uint8_t *)other)[index];
36447|   155k|        if (c < k) return -1;
  ------------------
  |  Branch (36447:13): [True: 27.2k, False: 128k]
  ------------------
36448|   128k|        if (c > k) return 1;
  ------------------
  |  Branch (36448:13): [True: 48.5k, False: 79.8k]
  ------------------
36449|  79.8k|        if (k == '\0') break;
  ------------------
  |  Branch (36449:13): [True: 0, False: 79.8k]
  ------------------
36450|  79.8k|    }
36451|  18.2k|    return (other[index] == '\0') ? 0 : -1;
  ------------------
  |  Branch (36451:12): [True: 18.0k, False: 221]
  ------------------
36452|  94.1k|}
janet_strbinsearch:
36461|  18.3k|    const uint8_t *key) {
36462|  18.3k|    size_t low = 0;
36463|  18.3k|    size_t hi = tabcount;
36464|  18.3k|    const char *t = (const char *)tab;
36465|  94.4k|    while (low < hi) {
  ------------------
  |  Branch (36465:12): [True: 94.1k, False: 311]
  ------------------
36466|  94.1k|        size_t mid = low + ((hi - low) / 2);
36467|  94.1k|        const char **item = (const char **)(t + mid * itemsize);
36468|  94.1k|        const char *name = *item;
36469|  94.1k|        int comp = janet_cstrcmp(key, name);
36470|  94.1k|        if (comp < 0) {
  ------------------
  |  Branch (36470:13): [True: 27.5k, False: 66.6k]
  ------------------
36471|  27.5k|            hi = mid;
36472|  66.6k|        } else if (comp > 0) {
  ------------------
  |  Branch (36472:20): [True: 48.5k, False: 18.0k]
  ------------------
36473|  48.5k|            low = mid + 1;
36474|  48.5k|        } else {
36475|  18.0k|            return (const void *)item;
36476|  18.0k|        }
36477|  94.1k|    }
36478|    311|    return NULL;
36479|  18.3k|}
janet_registry_put:
36541|  2.41M|    int32_t source_line) {
36542|  2.41M|    if (janet_vm.registry_count == janet_vm.registry_cap) {
  ------------------
  |  Branch (36542:9): [True: 6.86k, False: 2.40M]
  ------------------
36543|  6.86k|        size_t newcap = (janet_vm.registry_count + 1) * 2;
36544|       |        /* Size it nicely with core by default */
36545|  6.86k|        if (newcap < 512) {
  ------------------
  |  Branch (36545:13): [True: 6.86k, False: 0]
  ------------------
36546|  6.86k|            newcap = 512;
36547|  6.86k|        }
36548|  6.86k|        void *newmem = janet_realloc(janet_vm.registry, newcap * sizeof(JanetCFunRegistry));
  ------------------
  |  | 2409|  6.86k|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
36549|  6.86k|        if (NULL == newmem) {
  ------------------
  |  Branch (36549:13): [True: 0, False: 6.86k]
  ------------------
36550|      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]
  |  |  ------------------
  ------------------
36551|      0|        }
36552|  6.86k|        janet_vm.registry = newmem;
36553|  6.86k|        janet_vm.registry_cap = newcap;
36554|  6.86k|    }
36555|  2.41M|    JanetCFunRegistry value = {
36556|  2.41M|        key,
36557|  2.41M|        name,
36558|  2.41M|        name_prefix,
36559|  2.41M|        source_file,
36560|  2.41M|        source_line
36561|  2.41M|    };
36562|  2.41M|    janet_vm.registry[janet_vm.registry_count++] = value;
36563|  2.41M|    janet_vm.registry_dirty = 1;
36564|  2.41M|}
janet_register_abstract_type:
36690|  61.7k|void janet_register_abstract_type(const JanetAbstractType *at) {
36691|  61.7k|    janet_check_pointer_align((void *) at);
36692|  61.7k|    Janet sym = janet_csymbolv(at->name);
  ------------------
  |  | 1837|  61.7k|#define janet_csymbolv(cstr) janet_wrap_symbol(janet_csymbol(cstr))
  |  |  ------------------
  |  |  |  |  849|  61.7k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  61.7k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  61.7k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  61.7k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36693|  61.7k|    Janet check = janet_table_get(janet_vm.abstract_registry, sym);
36694|  61.7k|    if (!janet_checktype(check, JANET_NIL) && at != janet_unwrap_pointer(check)) {
  ------------------
  |  |  806|   123k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 61.7k]
  |  |  ------------------
  |  |  807|   123k|        ? 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|   123k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  61.7k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  61.7k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  61.7k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  61.7k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  if (!janet_checktype(check, JANET_NIL) && at != janet_unwrap_pointer(check)) {
  ------------------
  |  |  867|      0|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (36694:9): [True: 0, False: 61.7k]
  |  Branch (36694:47): [True: 0, False: 0]
  ------------------
36695|      0|        janet_panicf("cannot register abstract type %s, "
36696|      0|                     "a type with the same name exists", at->name);
36697|      0|    }
36698|  61.7k|    janet_table_put(janet_vm.abstract_registry, sym, janet_wrap_pointer((void *) at));
  ------------------
  |  |  854|  61.7k|#define janet_wrap_pointer(s) janet_nanbox_wrap_((s), JANET_POINTER)
  |  |  ------------------
  |  |  |  |  825|  61.7k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  61.7k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  61.7k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36699|  61.7k|}
janet_core_def_sm:
36710|  20.5k|void janet_core_def_sm(JanetTable *env, const char *name, Janet x, const void *p, const void *sf, int32_t sl) {
36711|  20.5k|    (void) sf;
36712|  20.5k|    (void) sl;
36713|  20.5k|    (void) p;
36714|  20.5k|    Janet key = janet_csymbolv(name);
  ------------------
  |  | 1837|  20.5k|#define janet_csymbolv(cstr) janet_wrap_symbol(janet_csymbol(cstr))
  |  |  ------------------
  |  |  |  |  849|  20.5k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  20.5k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  20.5k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  20.5k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36715|  20.5k|    janet_table_put(env, key, x);
36716|  20.5k|    if (janet_checktype(x, JANET_CFUNCTION)) {
  ------------------
  |  |  806|  20.5k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 20.5k]
  |  |  |  Branch (806:6): [Folded, False: 20.5k]
  |  |  ------------------
  |  |  807|  20.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|  20.5k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  20.5k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  20.5k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  20.5k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  20.5k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36717|      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))
  ------------------
36718|      0|    }
36719|  20.5k|}
janet_core_cfuns_ext:
36721|   151k|void janet_core_cfuns_ext(JanetTable *env, const char *regprefix, const JanetRegExt *cfuns) {
36722|   151k|    (void) regprefix;
36723|  2.56M|    while (cfuns->name) {
  ------------------
  |  Branch (36723:12): [True: 2.41M, False: 151k]
  ------------------
36724|  2.41M|        janet_check_pointer_align(cfuns->cfun);
36725|  2.41M|        Janet fun = janet_wrap_cfunction(cfuns->cfun);
  ------------------
  |  |  853|  2.41M|#define janet_wrap_cfunction(s) janet_nanbox_wrap_((s), JANET_CFUNCTION)
  |  |  ------------------
  |  |  |  |  825|  2.41M|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.41M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.41M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36726|  2.41M|        janet_table_put(env, janet_csymbolv(cfuns->name), fun);
  ------------------
  |  | 1837|  2.41M|#define janet_csymbolv(cstr) janet_wrap_symbol(janet_csymbol(cstr))
  |  |  ------------------
  |  |  |  |  849|  2.41M|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  2.41M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  2.41M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  2.41M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36727|  2.41M|        janet_registry_put(cfuns->cfun, cfuns->name, regprefix, cfuns->source_file, cfuns->source_line);
36728|  2.41M|        cfuns++;
36729|  2.41M|    }
36730|   151k|}
janet_binding_from_entry:
36733|  20.5k|JanetBinding janet_binding_from_entry(Janet entry) {
36734|  20.5k|    JanetTable *entry_table;
36735|  20.5k|    JanetBinding binding = {
36736|  20.5k|        JANET_BINDING_NONE,
36737|  20.5k|        janet_wrap_nil(),
  ------------------
  |  |  831|  20.5k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  20.5k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  20.5k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  20.5k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36738|  20.5k|        JANET_BINDING_DEP_NONE
36739|  20.5k|    };
36740|       |
36741|       |    /* Check environment for entry */
36742|  20.5k|    if (!janet_checktype(entry, JANET_TABLE))
  ------------------
  |  |  806|  20.5k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 20.5k]
  |  |  ------------------
  |  |  807|  20.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|  20.5k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  20.5k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  20.5k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  20.5k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  20.5k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (36742:9): [True: 0, False: 20.5k]
  ------------------
36743|      0|        return binding;
36744|  20.5k|    entry_table = janet_unwrap_table(entry);
  ------------------
  |  |  861|  20.5k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
36745|       |
36746|  20.5k|    Janet deprecate = janet_table_get_keyword(entry_table, "deprecated");
36747|  20.5k|    int macro = janet_truthy(janet_table_get_keyword(entry_table, "macro"));
  ------------------
  |  |  818|  20.5k|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  806|  41.1k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 20.5k]
  |  |  |  |  ------------------
  |  |  |  |  807|  41.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|  41.1k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|  20.5k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|  20.5k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  20.5k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  20.5k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (818:6): [True: 0, False: 20.5k]
  |  |  ------------------
  |  |  819|  20.5k|     (!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]
  |  |  ------------------
  ------------------
36748|  20.5k|    Janet value = janet_table_get_keyword(entry_table, "value");
36749|  20.5k|    Janet ref = janet_table_get_keyword(entry_table, "ref");
36750|       |
36751|  20.5k|    if (janet_checktype(deprecate, JANET_KEYWORD)) {
  ------------------
  |  |  806|  20.5k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 20.5k]
  |  |  |  Branch (806:6): [Folded, False: 20.5k]
  |  |  ------------------
  |  |  807|  20.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|  20.5k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  20.5k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  20.5k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  20.5k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  20.5k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36752|      0|        JanetKeyword depkw = janet_unwrap_keyword(deprecate);
  ------------------
  |  |  865|      0|#define janet_unwrap_keyword(x) ((const uint8_t *)janet_nanbox_to_pointer(x))
  ------------------
36753|      0|        if (!janet_cstrcmp(depkw, "relaxed")) {
  ------------------
  |  Branch (36753:13): [True: 0, False: 0]
  ------------------
36754|      0|            binding.deprecation = JANET_BINDING_DEP_RELAXED;
36755|      0|        } else if (!janet_cstrcmp(depkw, "normal")) {
  ------------------
  |  Branch (36755:20): [True: 0, False: 0]
  ------------------
36756|      0|            binding.deprecation = JANET_BINDING_DEP_NORMAL;
36757|      0|        } else if (!janet_cstrcmp(depkw, "strict")) {
  ------------------
  |  Branch (36757:20): [True: 0, False: 0]
  ------------------
36758|      0|            binding.deprecation = JANET_BINDING_DEP_STRICT;
36759|      0|        }
36760|  20.5k|    } else if (!janet_checktype(deprecate, JANET_NIL)) {
  ------------------
  |  |  806|  20.5k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 20.5k]
  |  |  ------------------
  |  |  807|  20.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|  20.5k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  20.5k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  20.5k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  20.5k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  20.5k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (36760:16): [True: 0, False: 20.5k]
  ------------------
36761|      0|        binding.deprecation = JANET_BINDING_DEP_NORMAL;
36762|      0|    }
36763|       |
36764|  20.5k|    int ref_is_valid = janet_checktype(ref, JANET_ARRAY);
  ------------------
  |  |  806|  20.5k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 20.5k]
  |  |  ------------------
  |  |  807|  20.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|  20.5k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  20.5k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  20.5k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  20.5k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  20.5k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36765|  20.5k|    int redef = ref_is_valid && janet_truthy(janet_table_get_keyword(entry_table, "redef"));
  ------------------
  |  |  818|  20.5k|    (!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.5k|     (!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 (36765:17): [True: 0, False: 20.5k]
  ------------------
36766|       |
36767|  20.5k|    if (macro) {
  ------------------
  |  Branch (36767:9): [True: 0, False: 20.5k]
  ------------------
36768|      0|        binding.value = redef ? ref : value;
  ------------------
  |  Branch (36768:25): [True: 0, False: 0]
  ------------------
36769|      0|        binding.type = redef ? JANET_BINDING_DYNAMIC_MACRO : JANET_BINDING_MACRO;
  ------------------
  |  Branch (36769:24): [True: 0, False: 0]
  ------------------
36770|      0|        return binding;
36771|      0|    }
36772|       |
36773|  20.5k|    if (ref_is_valid) {
  ------------------
  |  Branch (36773:9): [True: 0, False: 20.5k]
  ------------------
36774|      0|        binding.value = ref;
36775|      0|        binding.type = redef ? JANET_BINDING_DYNAMIC_DEF : JANET_BINDING_VAR;
  ------------------
  |  Branch (36775:24): [True: 0, False: 0]
  ------------------
36776|  20.5k|    } else {
36777|  20.5k|        binding.value = value;
36778|  20.5k|        binding.type = JANET_BINDING_DEF;
36779|  20.5k|    }
36780|       |
36781|  20.5k|    return binding;
36782|  20.5k|}
janet_resolve_ext:
36837|  20.5k|JanetBinding janet_resolve_ext(JanetTable *env, const uint8_t *sym) {
36838|  20.5k|    Janet entry = janet_table_get(env, janet_wrap_symbol(sym));
  ------------------
  |  |  849|  20.5k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  ------------------
  |  |  |  |  828|  20.5k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  20.5k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  20.5k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36839|  20.5k|    return janet_binding_from_entry(entry);
36840|  20.5k|}
janet_resolve:
36842|  20.5k|JanetBindingType janet_resolve(JanetTable *env, const uint8_t *sym, Janet *out) {
36843|  20.5k|    JanetBinding binding = janet_resolve_ext(env, sym);
36844|  20.5k|    if (binding.type == JANET_BINDING_DYNAMIC_DEF || binding.type == JANET_BINDING_DYNAMIC_MACRO) {
  ------------------
  |  Branch (36844:9): [True: 0, False: 20.5k]
  |  Branch (36844:54): [True: 0, False: 20.5k]
  ------------------
36845|      0|        *out = janet_array_peek(janet_unwrap_array(binding.value));
  ------------------
  |  |  860|      0|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
36846|  20.5k|    } else {
36847|  20.5k|        *out = binding.value;
36848|  20.5k|    }
36849|  20.5k|    return binding.type;
36850|  20.5k|}
janet_resolve_core:
36853|  6.86k|Janet janet_resolve_core(const char *name) {
36854|  6.86k|    JanetTable *env = janet_core_env(NULL);
36855|  6.86k|    Janet out = janet_wrap_nil();
  ------------------
  |  |  831|  6.86k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  6.86k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  6.86k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  6.86k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36856|  6.86k|    janet_resolve(env, janet_csymbol(name), &out);
36857|  6.86k|    return out;
36858|  6.86k|}
janet_indexed_view:
36862|  13.7M|int janet_indexed_view(Janet seq, const Janet **data, int32_t *len) {
36863|  13.7M|    if (janet_checktype(seq, JANET_ARRAY)) {
  ------------------
  |  |  806|  13.7M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 297k, False: 13.4M]
  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36864|   297k|        *data = janet_unwrap_array(seq)->data;
  ------------------
  |  |  860|   297k|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
36865|   297k|        *len = janet_unwrap_array(seq)->count;
  ------------------
  |  |  860|   297k|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
36866|   297k|        return 1;
36867|  13.4M|    } else if (janet_checktype(seq, JANET_TUPLE)) {
  ------------------
  |  |  806|  13.4M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 13.4M, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 13.4M]
  |  |  ------------------
  |  |  807|  13.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|  13.4M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  13.4M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  13.4M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  13.4M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  13.4M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36868|  13.4M|        *data = janet_unwrap_tuple(seq);
  ------------------
  |  |  858|  13.4M|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
36869|  13.4M|        *len = janet_tuple_length(janet_unwrap_tuple(seq));
  ------------------
  |  | 1802|  13.4M|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1800|  13.4M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
36870|  13.4M|        return 1;
36871|  13.4M|    }
36872|      0|    return 0;
36873|  13.7M|}
janet_bytes_view:
36877|  2.18k|int janet_bytes_view(Janet str, const uint8_t **data, int32_t *len) {
36878|  2.18k|    JanetType t = janet_type(str);
  ------------------
  |  |  795|  2.18k|    (isnan((x).number) \
  |  |  796|  2.18k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  2.18k|        : JANET_NUMBER)
  ------------------
  |  Branch (36878:19): [True: 2.18k, False: 0]
  ------------------
36879|  2.18k|    if (t == JANET_STRING || t == JANET_SYMBOL || t == JANET_KEYWORD) {
  ------------------
  |  Branch (36879:9): [True: 2.18k, False: 0]
  |  Branch (36879:30): [True: 0, False: 0]
  |  Branch (36879:51): [True: 0, False: 0]
  ------------------
36880|  2.18k|        *data = janet_unwrap_string(str);
  ------------------
  |  |  863|  2.18k|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
36881|  2.18k|        *len = janet_string_length(janet_unwrap_string(str));
  ------------------
  |  | 1813|  2.18k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|  2.18k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
36882|  2.18k|        return 1;
36883|  2.18k|    } else if (t == JANET_BUFFER) {
  ------------------
  |  Branch (36883:16): [True: 0, False: 0]
  ------------------
36884|      0|        *data = janet_unwrap_buffer(str)->data;
  ------------------
  |  |  862|      0|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
36885|      0|        *len = janet_unwrap_buffer(str)->count;
  ------------------
  |  |  862|      0|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
36886|      0|        return 1;
36887|      0|    } else if (t == JANET_ABSTRACT) {
  ------------------
  |  Branch (36887:16): [True: 0, False: 0]
  ------------------
36888|      0|        void *abst = janet_unwrap_abstract(str);
  ------------------
  |  |  866|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
36889|      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)))
  |  |  ------------------
  ------------------
36890|      0|        if (NULL == atype->bytes) {
  ------------------
  |  Branch (36890:13): [True: 0, False: 0]
  ------------------
36891|      0|            return 0;
36892|      0|        }
36893|      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)))
  |  |  ------------------
  ------------------
36894|      0|        *data = view.bytes;
36895|      0|        *len = view.len;
36896|      0|        return 1;
36897|      0|    }
36898|      0|    return 0;
36899|  2.18k|}
janet_dictionary_view:
36904|  2.99M|int janet_dictionary_view(Janet tab, const JanetKV **data, int32_t *len, int32_t *cap) {
36905|  2.99M|    if (janet_checktype(tab, JANET_TABLE)) {
  ------------------
  |  |  806|  2.99M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 985k, False: 2.01M]
  |  |  |  Branch (806:6): [Folded, False: 2.99M]
  |  |  ------------------
  |  |  807|  2.99M|        ? 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.99M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  2.99M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  2.99M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.99M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.99M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36906|   985k|        *data = janet_unwrap_table(tab)->data;
  ------------------
  |  |  861|   985k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
36907|   985k|        *cap = janet_unwrap_table(tab)->capacity;
  ------------------
  |  |  861|   985k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
36908|   985k|        *len = janet_unwrap_table(tab)->count;
  ------------------
  |  |  861|   985k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
36909|   985k|        return 1;
36910|  2.01M|    } else if (janet_checktype(tab, JANET_STRUCT)) {
  ------------------
  |  |  806|  2.01M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 2.01M, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 2.01M]
  |  |  ------------------
  |  |  807|  2.01M|        ? 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.01M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  2.01M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  2.01M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.01M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.01M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36911|  2.01M|        *data = janet_unwrap_struct(tab);
  ------------------
  |  |  857|  2.01M|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
36912|  2.01M|        *cap = janet_struct_capacity(janet_unwrap_struct(tab));
  ------------------
  |  | 1849|  2.01M|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1846|  2.01M|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
36913|  2.01M|        *len = janet_struct_length(janet_unwrap_struct(tab));
  ------------------
  |  | 1848|  2.01M|#define janet_struct_length(t) (janet_struct_head(t)->length)
  |  |  ------------------
  |  |  |  | 1846|  2.01M|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
36914|  2.01M|        return 1;
36915|  2.01M|    }
36916|      0|    return 0;
36917|  2.99M|}
janet_checkint:
36919|  24.3k|int janet_checkint(Janet x) {
36920|  24.3k|    if (!janet_checktype(x, JANET_NUMBER))
  ------------------
  |  |  806|  24.3k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [True: 24.3k, Folded]
  |  |  ------------------
  |  |  807|  24.3k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|  24.3k|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 5.79k, False: 18.5k]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 18.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  24.3k|        : 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 (36920:9): [True: 18.5k, False: 5.79k]
  ------------------
36921|  18.5k|        return 0;
36922|  5.79k|    double dval = janet_unwrap_number(x);
  ------------------
  |  |  839|  5.79k|#define janet_unwrap_number(x) ((x).number)
  ------------------
36923|       |    return janet_checkintrange(dval);
  ------------------
  |  |  962|  5.79k|#define janet_checkintrange(x) ((x) >= INT32_MIN && (x) <= INT32_MAX && (x) == (int32_t)(x))
  |  |  ------------------
  |  |  |  Branch (962:33): [True: 5.74k, False: 52]
  |  |  |  Branch (962:53): [True: 5.54k, False: 202]
  |  |  |  Branch (962:73): [True: 5.32k, False: 216]
  |  |  ------------------
  ------------------
36924|  24.3k|}
janet_sorted_keys:
37001|  2.99M|int32_t janet_sorted_keys(const JanetKV *dict, int32_t cap, int32_t *index_buffer) {
37002|       |
37003|       |    /* First, put populated indices into index_buffer */
37004|  2.99M|    int32_t next_index = 0;
37005|  14.5M|    for (int32_t i = 0; i < cap; i++) {
  ------------------
  |  Branch (37005:25): [True: 11.5M, False: 2.99M]
  ------------------
37006|  11.5M|        if (!janet_checktype(dict[i].key, JANET_NIL)) {
  ------------------
  |  |  806|  11.5M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 11.5M]
  |  |  ------------------
  |  |  807|  11.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|  11.5M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  11.5M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  11.5M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  11.5M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  11.5M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (37006:13): [True: 3.15M, False: 8.39M]
  ------------------
37007|  3.15M|            index_buffer[next_index++] = i;
37008|  3.15M|        }
37009|  11.5M|    }
37010|       |
37011|       |    /* Next, sort those (simple insertion sort here for now) */
37012|  4.49M|    for (int32_t i = 1; i < next_index; i++) {
  ------------------
  |  Branch (37012:25): [True: 1.49M, False: 2.99M]
  ------------------
37013|  1.49M|        int32_t index_to_insert = index_buffer[i];
37014|  1.49M|        Janet lhs = dict[index_to_insert].key;
37015|  2.18M|        for (int32_t j = i - 1; j >= 0; j--) {
  ------------------
  |  Branch (37015:33): [True: 1.91M, False: 264k]
  ------------------
37016|  1.91M|            index_buffer[j + 1] = index_buffer[j];
37017|  1.91M|            Janet rhs = dict[index_buffer[j]].key;
37018|  1.91M|            if (janet_compare(lhs, rhs) >= 0) {
  ------------------
  |  Branch (37018:17): [True: 1.22M, False: 691k]
  ------------------
37019|  1.22M|                index_buffer[j + 1] = index_to_insert;
37020|  1.22M|                break;
37021|  1.22M|            } else if (j == 0) {
  ------------------
  |  Branch (37021:24): [True: 264k, False: 426k]
  ------------------
37022|   264k|                index_buffer[0] = index_to_insert;
37023|   264k|            }
37024|  1.91M|        }
37025|  1.49M|    }
37026|       |
37027|       |    /* Return number of indices found */
37028|  2.99M|    return next_index;
37029|  2.99M|}
array_allocate:
37262|  39.6M|void *array_allocate(size_t element_size, int32_t count) {
37263|  39.6M|    if (count < 0) return NULL;
  ------------------
  |  Branch (37263:9): [True: 0, False: 39.6M]
  ------------------
37264|  39.6M|    if ((size_t) count > (SIZE_MAX / element_size)) return NULL;
  ------------------
  |  Branch (37264:9): [True: 0, False: 39.6M]
  ------------------
37265|  39.6M|    return janet_malloc(element_size * count);
  ------------------
  |  | 2406|  39.6M|#define janet_malloc(X) malloc((X))
  ------------------
37266|  39.6M|}
janet_equals:
37568|  13.8M|int janet_equals(Janet x, Janet y) {
37569|  13.8M|    if (janet_type(x) != janet_type(y)) return 0;
  ------------------
  |  |  795|  13.8M|    (isnan((x).number) \
  |  |  796|  13.8M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  13.8M|        : JANET_NUMBER)
  ------------------
                  if (janet_type(x) != janet_type(y)) return 0;
  ------------------
  |  |  795|  13.8M|    (isnan((x).number) \
  |  |  796|  13.8M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  13.8M|        : JANET_NUMBER)
  ------------------
  |  Branch (37569:9): [True: 7.54M, False: 6.30M]
  |  Branch (37569:9): [True: 1.48M, False: 12.3M]
  |  Branch (37569:26): [True: 7.26M, False: 6.59M]
  ------------------
37570|  12.3M|    if (janet_checktypes(x, JANET_TFLAG_TUPLE | JANET_TFLAG_STRUCT)) return janet_equals_containers(x, y);
  ------------------
  |  |  969|  12.3M|#define janet_checktypes(x, tps) ((1 << janet_type(x)) & (tps))
  |  |  ------------------
  |  |  |  |  795|  12.3M|    (isnan((x).number) \
  |  |  |  |  796|  12.3M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  |  |  797|  12.3M|        : JANET_NUMBER)
  |  |  ------------------
  |  |  |  Branch (969:34): [True: 6.11M, False: 6.24M]
  |  |  ------------------
  ------------------
  |  Branch (37570:9): [True: 6.11M, False: 6.24M]
  ------------------
37571|  6.24M|    return janet_equals_leaf(x, y);
37572|  12.3M|}
janet_hash:
37584|   171M|int32_t janet_hash(Janet x) {
37585|   171M|    int32_t hash = 0;
37586|   171M|    switch (janet_type(x)) {
  ------------------
  |  |  795|   171M|    (isnan((x).number) \
  |  |  796|   171M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|   171M|        : JANET_NUMBER)
  ------------------
  |  Branch (37586:13): [True: 111M, False: 60.3M]
  ------------------
37587|  1.07M|        case JANET_NIL:
  ------------------
  |  Branch (37587:9): [True: 1.07M, False: 170M]
  ------------------
37588|  1.07M|            hash = 0;
37589|  1.07M|            break;
37590|  54.9k|        case JANET_BOOLEAN:
  ------------------
  |  Branch (37590:9): [True: 54.9k, False: 171M]
  ------------------
37591|  54.9k|            hash = janet_unwrap_boolean(x);
  ------------------
  |  |  838|  54.9k|#define janet_unwrap_boolean(x) ((x).u64 & 0x1)
  ------------------
37592|  54.9k|            break;
37593|  43.2M|        case JANET_STRING:
  ------------------
  |  Branch (37593:9): [True: 43.2M, False: 128M]
  ------------------
37594|  43.6M|        case JANET_SYMBOL:
  ------------------
  |  Branch (37594:9): [True: 351k, False: 171M]
  ------------------
37595|  44.2M|        case JANET_KEYWORD:
  ------------------
  |  Branch (37595:9): [True: 626k, False: 171M]
  ------------------
37596|  44.2M|            hash = janet_string_hash(janet_unwrap_string(x));
  ------------------
  |  | 1814|  44.2M|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  ------------------
  |  |  |  | 1812|  44.2M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
37597|  44.2M|            break;
37598|  42.8M|        case JANET_TUPLE:
  ------------------
  |  Branch (37598:9): [True: 42.8M, False: 128M]
  ------------------
37599|  42.8M|            hash = janet_tuple_hash(janet_unwrap_tuple(x));
  ------------------
  |  | 1803|  42.8M|#define janet_tuple_hash(t) (janet_tuple_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1800|  42.8M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
37600|  42.8M|            uint32_t inc = (janet_tuple_flag(janet_unwrap_tuple(x)) & JANET_TUPLE_FLAG_BRACKETCTOR) ? 1 : 0;
  ------------------
  |  | 1806|  42.8M|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1800|  42.8M|#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|  42.8M|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
  |  Branch (37600:28): [True: 130k, False: 42.7M]
  ------------------
37601|  42.8M|            hash = (int32_t)((uint32_t)hash + inc); /* avoid overflow undefined behavior */
37602|  42.8M|            break;
37603|  6.11M|        case JANET_STRUCT:
  ------------------
  |  Branch (37603:9): [True: 6.11M, False: 165M]
  ------------------
37604|  6.11M|            hash = janet_struct_hash(janet_unwrap_struct(x));
  ------------------
  |  | 1850|  6.11M|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1846|  6.11M|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
37605|  6.11M|            break;
37606|  60.3M|        case JANET_NUMBER: {
  ------------------
  |  Branch (37606:9): [True: 60.3M, False: 111M]
  ------------------
37607|  60.3M|            union {
37608|  60.3M|                double d;
37609|  60.3M|                uint64_t u;
37610|  60.3M|            } as;
37611|  60.3M|            as.d = janet_unwrap_number(x);
  ------------------
  |  |  839|  60.3M|#define janet_unwrap_number(x) ((x).number)
  ------------------
37612|  60.3M|            as.d += 0.0; /* normalize negative 0 */
37613|  60.3M|            as.u = murmur64(as.u);
37614|  60.3M|            uint32_t hi = (uint32_t)(as.u >> 32);
37615|  60.3M|            hash = (int32_t)hi;
37616|  60.3M|            break;
37617|  43.6M|        }
37618|   516k|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (37618:9): [True: 516k, False: 171M]
  ------------------
37619|   516k|            JanetAbstract xx = janet_unwrap_abstract(x);
  ------------------
  |  |  866|   516k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
37620|   516k|            const JanetAbstractType *at = janet_abstract_type(xx);
  ------------------
  |  | 1899|   516k|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|   516k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
37621|   516k|            if (at->hash != NULL) {
  ------------------
  |  Branch (37621:17): [True: 475k, False: 41.1k]
  ------------------
37622|   475k|                hash = at->hash(xx, janet_abstract_size(xx));
  ------------------
  |  | 1900|   475k|#define janet_abstract_size(u) (janet_abstract_head(u)->size)
  |  |  ------------------
  |  |  |  | 1897|   475k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
37623|   475k|                break;
37624|   475k|            }
37625|   516k|        }
37626|       |        /* fallthrough */
37627|  16.5M|        default:
  ------------------
  |  Branch (37627:9): [True: 16.4M, False: 155M]
  ------------------
37628|  16.5M|            if (sizeof(double) == sizeof(void *)) {
  ------------------
  |  Branch (37628:17): [True: 16.5M, Folded]
  ------------------
37629|       |                /* Assuming 8 byte pointer (8 byte aligned) */
37630|  16.5M|                uint64_t i = murmur64(janet_u64(x));
  ------------------
  |  |  788|  16.5M|#define janet_u64(x) ((x).u64)
  ------------------
37631|  16.5M|                hash = (int32_t)(i >> 32);
37632|  16.5M|            } else {
37633|       |                /* Assuming 4 byte pointer (or smaller) */
37634|      0|                uintptr_t diff = (uintptr_t) janet_unwrap_pointer(x);
  ------------------
  |  |  867|      0|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
37635|      0|                uint32_t hilo = (uint32_t) diff * 2654435769u;
37636|      0|                hash = (int32_t)((hilo << 16) | (hilo >> 16));
37637|      0|            }
37638|  16.5M|            break;
37639|   171M|    }
37640|   171M|    return hash;
37641|   171M|}
janet_compare:
37646|  1.92M|int janet_compare(Janet x, Janet y) {
37647|  1.92M|    janet_vm.traversal = janet_vm.traversal_base;
37648|  1.92M|    int status;
37649|  2.29M|    do {
37650|  2.29M|        JanetType tx = janet_type(x);
  ------------------
  |  |  795|  2.29M|    (isnan((x).number) \
  |  |  796|  2.29M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  2.29M|        : JANET_NUMBER)
  ------------------
  |  Branch (37650:24): [True: 1.87M, False: 412k]
  ------------------
37651|  2.29M|        JanetType ty = janet_type(y);
  ------------------
  |  |  795|  2.29M|    (isnan((x).number) \
  |  |  796|  2.29M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  2.29M|        : JANET_NUMBER)
  ------------------
  |  Branch (37651:24): [True: 1.87M, False: 414k]
  ------------------
37652|  2.29M|        if (tx != ty) return tx < ty ? -1 : 1;
  ------------------
  |  Branch (37652:13): [True: 1.05M, False: 1.23M]
  |  Branch (37652:30): [True: 311k, False: 741k]
  ------------------
37653|  1.23M|        switch (tx) {
37654|  17.6k|            case JANET_NIL:
  ------------------
  |  Branch (37654:13): [True: 17.6k, False: 1.22M]
  ------------------
37655|  17.6k|                break;
37656|     37|            case JANET_BOOLEAN: {
  ------------------
  |  Branch (37656:13): [True: 37, False: 1.23M]
  ------------------
37657|     37|                int diff = janet_unwrap_boolean(x) - janet_unwrap_boolean(y);
  ------------------
  |  |  838|     37|#define janet_unwrap_boolean(x) ((x).u64 & 0x1)
  ------------------
                              int diff = janet_unwrap_boolean(x) - janet_unwrap_boolean(y);
  ------------------
  |  |  838|     37|#define janet_unwrap_boolean(x) ((x).u64 & 0x1)
  ------------------
37658|     37|                if (diff) return diff;
  ------------------
  |  Branch (37658:21): [True: 1, False: 36]
  ------------------
37659|     36|                break;
37660|     37|            }
37661|   201k|            case JANET_NUMBER: {
  ------------------
  |  Branch (37661:13): [True: 201k, False: 1.03M]
  ------------------
37662|   201k|                double xx = janet_unwrap_number(x);
  ------------------
  |  |  839|   201k|#define janet_unwrap_number(x) ((x).number)
  ------------------
37663|   201k|                double yy = janet_unwrap_number(y);
  ------------------
  |  |  839|   201k|#define janet_unwrap_number(x) ((x).number)
  ------------------
37664|   201k|                if (xx == yy) {
  ------------------
  |  Branch (37664:21): [True: 285, False: 201k]
  ------------------
37665|    285|                    break;
37666|   201k|                } else {
37667|   201k|                    return (xx < yy) ? -1 : 1;
  ------------------
  |  Branch (37667:28): [True: 227, False: 201k]
  ------------------
37668|   201k|                }
37669|   201k|            }
37670|    694|            case JANET_STRING:
  ------------------
  |  Branch (37670:13): [True: 694, False: 1.23M]
  ------------------
37671|   634k|            case JANET_SYMBOL:
  ------------------
  |  Branch (37671:13): [True: 633k, False: 604k]
  ------------------
37672|   790k|            case JANET_KEYWORD: {
  ------------------
  |  Branch (37672:13): [True: 156k, False: 1.08M]
  ------------------
37673|   790k|                int diff = janet_string_compare(janet_unwrap_string(x), janet_unwrap_string(y));
  ------------------
  |  |  863|   790k|#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|   790k|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
37674|   790k|                if (diff) return diff;
  ------------------
  |  Branch (37674:21): [True: 621k, False: 169k]
  ------------------
37675|   169k|                break;
37676|   790k|            }
37677|   169k|            case JANET_ABSTRACT: {
  ------------------
  |  Branch (37677:13): [True: 18.8k, False: 1.21M]
  ------------------
37678|  18.8k|                int diff = janet_compare_abstract(janet_unwrap_abstract(x), janet_unwrap_abstract(y));
  ------------------
  |  |  866|  18.8k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
                              int diff = janet_compare_abstract(janet_unwrap_abstract(x), janet_unwrap_abstract(y));
  ------------------
  |  |  866|  18.8k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
37679|  18.8k|                if (diff) return diff;
  ------------------
  |  Branch (37679:21): [True: 18.7k, False: 100]
  ------------------
37680|    100|                break;
37681|  18.8k|            }
37682|    910|            default: {
  ------------------
  |  Branch (37682:13): [True: 910, False: 1.23M]
  ------------------
37683|    910|                if (janet_unwrap_pointer(x) == janet_unwrap_pointer(y)) {
  ------------------
  |  |  867|    910|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
                              if (janet_unwrap_pointer(x) == janet_unwrap_pointer(y)) {
  ------------------
  |  |  867|    910|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (37683:21): [True: 0, False: 910]
  ------------------
37684|      0|                    break;
37685|    910|                } else {
37686|    910|                    return janet_unwrap_pointer(x) > janet_unwrap_pointer(y) ? 1 : -1;
  ------------------
  |  |  867|    910|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
                                  return janet_unwrap_pointer(x) > janet_unwrap_pointer(y) ? 1 : -1;
  ------------------
  |  |  867|    910|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (37686:28): [True: 211, False: 699]
  ------------------
37687|    910|                }
37688|    910|            }
37689|   188k|            case JANET_TUPLE: {
  ------------------
  |  Branch (37689:13): [True: 188k, False: 1.05M]
  ------------------
37690|   188k|                const Janet *lhs = janet_unwrap_tuple(x);
  ------------------
  |  |  858|   188k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
37691|   188k|                const Janet *rhs = janet_unwrap_tuple(y);
  ------------------
  |  |  858|   188k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
37692|   188k|                if (JANET_TUPLE_FLAG_BRACKETCTOR & (janet_tuple_flag(lhs) ^ janet_tuple_flag(rhs))) {
  ------------------
  |  | 1798|   188k|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
                              if (JANET_TUPLE_FLAG_BRACKETCTOR & (janet_tuple_flag(lhs) ^ janet_tuple_flag(rhs))) {
  ------------------
  |  | 1806|   188k|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1800|   188k|#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|   188k|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1800|   188k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (37692:21): [True: 2.23k, False: 186k]
  ------------------
37693|  2.23k|                    return (janet_tuple_flag(lhs) & JANET_TUPLE_FLAG_BRACKETCTOR) ? 1 : -1;
  ------------------
  |  | 1806|  2.23k|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1800|  2.23k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                                  return (janet_tuple_flag(lhs) & JANET_TUPLE_FLAG_BRACKETCTOR) ? 1 : -1;
  ------------------
  |  | 1798|  2.23k|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
  |  Branch (37693:28): [True: 1.83k, False: 404]
  ------------------
37694|  2.23k|                }
37695|   186k|                push_traversal_node(janet_tuple_head(lhs), janet_tuple_head(rhs), 1);
  ------------------
  |  | 1800|   186k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  ------------------
                              push_traversal_node(janet_tuple_head(lhs), janet_tuple_head(rhs), 1);
  ------------------
  |  | 1800|   186k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  ------------------
37696|   186k|                break;
37697|   188k|            }
37698|  20.0k|            case JANET_STRUCT: {
  ------------------
  |  Branch (37698:13): [True: 20.0k, False: 1.21M]
  ------------------
37699|  20.0k|                const JanetKV *lhs = janet_unwrap_struct(x);
  ------------------
  |  |  857|  20.0k|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
37700|  20.0k|                const JanetKV *rhs = janet_unwrap_struct(y);
  ------------------
  |  |  857|  20.0k|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
37701|  20.0k|                int32_t llen = janet_struct_capacity(lhs);
  ------------------
  |  | 1849|  20.0k|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1846|  20.0k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
37702|  20.0k|                int32_t rlen = janet_struct_capacity(rhs);
  ------------------
  |  | 1849|  20.0k|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1846|  20.0k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
37703|  20.0k|                int32_t lhash = janet_struct_hash(lhs);
  ------------------
  |  | 1850|  20.0k|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1846|  20.0k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
37704|  20.0k|                int32_t rhash = janet_struct_hash(rhs);
  ------------------
  |  | 1850|  20.0k|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1846|  20.0k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
37705|  20.0k|                if (llen < rlen) return -1;
  ------------------
  |  Branch (37705:21): [True: 1.80k, False: 18.2k]
  ------------------
37706|  18.2k|                if (llen > rlen) return 1;
  ------------------
  |  Branch (37706:21): [True: 811, False: 17.4k]
  ------------------
37707|  17.4k|                if (lhash < rhash) return -1;
  ------------------
  |  Branch (37707:21): [True: 917, False: 16.5k]
  ------------------
37708|  16.5k|                if (lhash > rhash) return 1;
  ------------------
  |  Branch (37708:21): [True: 10.6k, False: 5.89k]
  ------------------
37709|  5.89k|                push_traversal_node(janet_struct_head(lhs), janet_struct_head(rhs), 0);
  ------------------
  |  | 1846|  5.89k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  ------------------
                              push_traversal_node(janet_struct_head(lhs), janet_struct_head(rhs), 0);
  ------------------
  |  | 1846|  5.89k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  ------------------
37710|  5.89k|                break;
37711|  16.5k|            }
37712|  1.23M|        }
37713|  1.23M|    } while (!(status = traversal_next(&x, &y)));
  ------------------
  |  Branch (37713:14): [True: 371k, False: 7.76k]
  ------------------
37714|  7.76k|    return status - 2;
37715|  1.92M|}
janet_v_grow:
38119|   220k|void *janet_v_grow(void *v, int32_t increment, int32_t itemsize) {
38120|   220k|    int32_t dbl_cur = (NULL != v) ? 2 * janet_v__cap(v) : 0;
  ------------------
  |  |  742|   196k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  ------------------
  |  |  |  |  741|   196k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  ------------------
  |  Branch (38120:23): [True: 196k, False: 23.8k]
  ------------------
38121|   220k|    int32_t min_needed = janet_v_count(v) + increment;
  ------------------
  |  |  736|   220k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|   196k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|   196k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 196k, False: 23.8k]
  |  |  ------------------
  ------------------
38122|   220k|    int32_t m = dbl_cur > min_needed ? dbl_cur : min_needed;
  ------------------
  |  Branch (38122:17): [True: 173k, False: 47.2k]
  ------------------
38123|   220k|    size_t newsize = ((size_t) itemsize) * m + sizeof(int32_t) * 2;
38124|   220k|    int32_t *p = (int32_t *) janet_srealloc(v ? janet_v__raw(v) : 0, newsize);
  ------------------
  |  |  741|   196k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  ------------------
  |  Branch (38124:45): [True: 196k, False: 23.8k]
  ------------------
38125|   220k|    if (!v) p[1] = 0;
  ------------------
  |  Branch (38125:9): [True: 23.8k, False: 196k]
  ------------------
38126|   220k|    p[0] = m;
38127|   220k|    return p + 2;
38128|   220k|}
janet_try_init:
39722|  4.85k|void janet_try_init(JanetTryState *state) {
39723|  4.85k|    state->stackn = janet_vm.stackn++;
39724|  4.85k|    state->gc_handle = janet_vm.gc_suspend;
39725|  4.85k|    state->vm_fiber = janet_vm.fiber;
39726|  4.85k|    state->vm_jmp_buf = janet_vm.signal_buf;
39727|  4.85k|    state->vm_return_reg = janet_vm.return_reg;
39728|  4.85k|    state->coerce_error = janet_vm.coerce_error;
39729|  4.85k|    janet_vm.return_reg = &(state->payload);
39730|  4.85k|    janet_vm.signal_buf = &(state->buf);
39731|  4.85k|    janet_vm.coerce_error = 0;
39732|  4.85k|}
janet_restore:
39734|  4.85k|void janet_restore(JanetTryState *state) {
39735|  4.85k|    janet_vm.stackn = state->stackn;
39736|  4.85k|    janet_vm.gc_suspend = state->gc_handle;
39737|  4.85k|    janet_vm.fiber = state->vm_fiber;
39738|  4.85k|    janet_vm.signal_buf = state->vm_jmp_buf;
39739|  4.85k|    janet_vm.return_reg = state->vm_return_reg;
39740|  4.85k|    janet_vm.coerce_error = state->coerce_error;
39741|  4.85k|}
janet_init:
39896|  6.86k|int janet_init(void) {
39897|       |
39898|       |    /* Garbage collection */
39899|  6.86k|    janet_vm.blocks = NULL;
39900|  6.86k|    janet_vm.weak_blocks = NULL;
39901|  6.86k|    janet_vm.next_collection = 0;
39902|  6.86k|    janet_vm.gc_interval = 0x400000;
39903|  6.86k|    janet_vm.block_count = 0;
39904|  6.86k|    janet_vm.gc_mark_phase = 0;
39905|       |
39906|  6.86k|    janet_symcache_init();
39907|       |
39908|       |    /* Initialize gc roots */
39909|  6.86k|    janet_vm.roots = NULL;
39910|  6.86k|    janet_vm.root_count = 0;
39911|  6.86k|    janet_vm.root_capacity = 0;
39912|       |
39913|       |    /* Scratch memory */
39914|  6.86k|    janet_vm.user = NULL;
39915|  6.86k|    janet_vm.scratch_mem = NULL;
39916|  6.86k|    janet_vm.scratch_len = 0;
39917|  6.86k|    janet_vm.scratch_cap = 0;
39918|       |
39919|       |    /* Sandbox flags */
39920|  6.86k|    janet_vm.sandbox_flags = 0;
39921|       |
39922|       |    /* Initialize registry */
39923|  6.86k|    janet_vm.registry = NULL;
39924|  6.86k|    janet_vm.registry_cap = 0;
39925|  6.86k|    janet_vm.registry_count = 0;
39926|  6.86k|    janet_vm.registry_dirty = 0;
39927|       |
39928|       |    /* Initialize abstract registry */
39929|  6.86k|    janet_vm.abstract_registry = janet_table(0);
39930|  6.86k|    janet_gcroot(janet_wrap_table(janet_vm.abstract_registry));
  ------------------
  |  |  846|  6.86k|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  825|  6.86k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  6.86k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  6.86k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39931|       |
39932|       |    /* Traversal */
39933|  6.86k|    janet_vm.traversal = NULL;
39934|  6.86k|    janet_vm.traversal_base = NULL;
39935|  6.86k|    janet_vm.traversal_top = NULL;
39936|       |
39937|       |    /* Core env */
39938|  6.86k|    janet_vm.core_env = NULL;
39939|       |
39940|       |    /* Auto suspension */
39941|  6.86k|    janet_vm.auto_suspend = 0;
39942|       |
39943|       |    /* Dynamic bindings */
39944|  6.86k|    janet_vm.top_dyns = NULL;
39945|       |
39946|       |    /* Seed RNG */
39947|  6.86k|    janet_rng_seed(janet_default_rng(), 0);
39948|       |
39949|       |    /* Fibers */
39950|  6.86k|    janet_vm.fiber = NULL;
39951|  6.86k|    janet_vm.root_fiber = NULL;
39952|  6.86k|    janet_vm.stackn = 0;
39953|       |
39954|  6.86k|#ifdef JANET_EV
39955|  6.86k|    janet_ev_init();
39956|  6.86k|#endif
39957|  6.86k|#ifdef JANET_NET
39958|  6.86k|    janet_net_init();
39959|  6.86k|#endif
39960|  6.86k|    return 0;
39961|  6.86k|}
janet_deinit:
39976|  6.86k|void janet_deinit(void) {
39977|  6.86k|    janet_clear_memory();
39978|  6.86k|    janet_symcache_deinit();
39979|  6.86k|    janet_free(janet_vm.roots);
  ------------------
  |  | 2415|  6.86k|#define janet_free(X) free((X))
  ------------------
39980|  6.86k|    janet_vm.roots = NULL;
39981|  6.86k|    janet_vm.root_count = 0;
39982|  6.86k|    janet_vm.root_capacity = 0;
39983|  6.86k|    janet_vm.abstract_registry = NULL;
39984|  6.86k|    janet_vm.core_env = NULL;
39985|  6.86k|    janet_vm.top_dyns = NULL;
39986|  6.86k|    janet_vm.user = NULL;
39987|  6.86k|    janet_free(janet_vm.traversal_base);
  ------------------
  |  | 2415|  6.86k|#define janet_free(X) free((X))
  ------------------
39988|  6.86k|    janet_vm.fiber = NULL;
39989|  6.86k|    janet_vm.root_fiber = NULL;
39990|  6.86k|    janet_free(janet_vm.registry);
  ------------------
  |  | 2415|  6.86k|#define janet_free(X) free((X))
  ------------------
39991|       |    janet_vm.registry = NULL;
39992|  6.86k|#ifdef JANET_EV
39993|  6.86k|    janet_ev_deinit();
39994|  6.86k|#endif
39995|  6.86k|#ifdef JANET_NET
39996|  6.86k|    janet_net_deinit();
39997|  6.86k|#endif
39998|  6.86k|}
janet_memalloc_empty:
40166|  9.14M|void *janet_memalloc_empty(int32_t count) {
40167|  9.14M|    int32_t i;
40168|  9.14M|    void *mem = array_allocate(sizeof(JanetKV), count);
40169|  9.14M|    janet_vm.next_collection += (size_t) count * sizeof(JanetKV);
40170|  9.14M|    if (NULL == mem) {
  ------------------
  |  Branch (40170:9): [True: 0, False: 9.14M]
  ------------------
40171|      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]
  |  |  ------------------
  ------------------
40172|      0|    }
40173|  9.14M|    JanetKV *mmem = (JanetKV *)mem;
40174|   143M|    for (i = 0; i < count; i++) {
  ------------------
  |  Branch (40174:17): [True: 134M, False: 9.14M]
  ------------------
40175|   134M|        JanetKV *kv = mmem + i;
40176|   134M|        kv->key = janet_wrap_nil();
  ------------------
  |  |  831|   134M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   134M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   134M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   134M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
40177|   134M|        kv->value = janet_wrap_nil();
  ------------------
  |  |  831|   134M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   134M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   134M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   134M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
40178|   134M|    }
40179|  9.14M|    return mem;
40180|  9.14M|}
janet_memempty:
40182|  53.0k|void janet_memempty(JanetKV *mem, int32_t count) {
40183|  53.0k|    int32_t i;
40184|   911k|    for (i = 0; i < count; i++) {
  ------------------
  |  Branch (40184:17): [True: 857k, False: 53.0k]
  ------------------
40185|   857k|        mem[i].key = janet_wrap_nil();
  ------------------
  |  |  831|   857k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   857k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   857k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   857k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
40186|   857k|        mem[i].value = janet_wrap_nil();
  ------------------
  |  |  831|   857k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   857k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   857k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   857k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
40187|   857k|    }
40188|  53.0k|}
janet_wrap_number_safe:
40192|  48.0k|Janet janet_wrap_number_safe(double d) {
40193|  48.0k|    Janet ret;
40194|  48.0k|    ret.number = isnan(d) ? NAN : d;
  ------------------
  |  Branch (40194:18): [True: 6.86k, False: 41.1k]
  ------------------
40195|  48.0k|    return ret;
40196|  48.0k|}
janet_nanbox_to_pointer:
40198|   497M|void *janet_nanbox_to_pointer(Janet x) {
40199|   497M|    x.i64 &= JANET_NANBOX_PAYLOADBITS;
  ------------------
  |  |  791|   497M|#define JANET_NANBOX_PAYLOADBITS 0x00007FFFFFFFFFFFllu
  ------------------
40200|   497M|    x.u64 <<= JANET_NANBOX_64_POINTER_SHIFT; /* Alignment, usually 0 */
  ------------------
  |  |  341|   497M|#define JANET_NANBOX_64_POINTER_SHIFT 0
  ------------------
40201|   497M|    return x.pointer;
40202|   497M|}
janet_nanbox_from_pointer:
40204|  10.1M|Janet janet_nanbox_from_pointer(void *p, uint64_t tagmask) {
40205|  10.1M|    Janet ret;
40206|  10.1M|    ret.pointer = p;
40207|       |    /* Should be noop when pointer shift is 0 */
40208|       |    /*
40209|       |    janet_assert(!(ret.u64 & (uint64_t) ((1 << JANET_NANBOX_64_POINTER_SHIFT) - 1)), "unaligned pointer wrap");
40210|       |    */
40211|  10.1M|    ret.u64 >>= JANET_NANBOX_64_POINTER_SHIFT; /* Alignment, usually 0 */
  ------------------
  |  |  341|  10.1M|#define JANET_NANBOX_64_POINTER_SHIFT 0
  ------------------
40212|  10.1M|    ret.u64 |= tagmask;
40213|  10.1M|    return ret;
40214|  10.1M|}
janet_nanbox_from_cpointer:
40216|   125M|Janet janet_nanbox_from_cpointer(const void *p, uint64_t tagmask) {
40217|   125M|    Janet ret;
40218|   125M|    ret.pointer = (void *)p;
40219|       |    /* Should be noop when pointer shift is 0 */
40220|       |    /*
40221|       |    janet_assert(!(ret.u64 & (uint64_t) ((1 << JANET_NANBOX_64_POINTER_SHIFT) - 1)), "unaligned pointer wrap");
40222|       |    */
40223|   125M|    ret.u64 >>= JANET_NANBOX_64_POINTER_SHIFT; /* Alignment, usually 0 */
  ------------------
  |  |  341|   125M|#define JANET_NANBOX_64_POINTER_SHIFT 0
  ------------------
40224|   125M|    ret.u64 |= tagmask;
40225|   125M|    return ret;
40226|   125M|}
janet_nanbox_from_double:
40228|   211M|Janet janet_nanbox_from_double(double d) {
40229|   211M|    Janet ret;
40230|   211M|    ret.number = d;
40231|   211M|    return ret;
40232|   211M|}
janet_nanbox_from_bits:
40234|  1.11G|Janet janet_nanbox_from_bits(uint64_t bits) {
40235|  1.11G|    Janet ret;
40236|  1.11G|    ret.u64 = bits;
40237|  1.11G|    return ret;
40238|  1.11G|}
janet.c:janet_array_impl:
 1589|  25.6k|static void janet_array_impl(JanetArray *array, int32_t capacity) {
 1590|  25.6k|    Janet *data = NULL;
 1591|  25.6k|    if (capacity > 0) {
  ------------------
  |  Branch (1591:9): [True: 20.7k, False: 4.88k]
  ------------------
 1592|  20.7k|        janet_vm.next_collection += capacity * sizeof(Janet);
 1593|  20.7k|        data = (Janet *) array_allocate(sizeof(Janet), capacity);
 1594|  20.7k|        if (NULL == data) {
  ------------------
  |  Branch (1594:13): [True: 0, False: 20.7k]
  ------------------
 1595|      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]
  |  |  ------------------
  ------------------
 1596|      0|        }
 1597|  20.7k|    }
 1598|  25.6k|    array->count = 0;
 1599|  25.6k|    array->capacity = capacity;
 1600|  25.6k|    array->data = data;
 1601|  25.6k|}
janet.c:janet_buffer_init_impl:
 3189|  16.6M|static JanetBuffer *janet_buffer_init_impl(JanetBuffer *buffer, int32_t capacity) {
 3190|  16.6M|    uint8_t *data = NULL;
 3191|  16.6M|    if (capacity < 4) capacity = 4;
  ------------------
  |  Branch (3191:9): [True: 7.35k, False: 16.6M]
  ------------------
 3192|  16.6M|    janet_gcpressure(capacity);
 3193|  16.6M|    data = array_allocate(sizeof(uint8_t), capacity);
 3194|  16.6M|    if (NULL == data) {
  ------------------
  |  Branch (3194:9): [True: 0, False: 16.6M]
  ------------------
 3195|      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]
  |  |  ------------------
  ------------------
 3196|      0|    }
 3197|  16.6M|    buffer->count = 0;
 3198|  16.6M|    buffer->capacity = capacity;
 3199|  16.6M|    buffer->data = data;
 3200|  16.6M|    return buffer;
 3201|  16.6M|}
janet.c:janet_buffer_can_realloc:
 3182|  18.7M|static void janet_buffer_can_realloc(JanetBuffer *buffer) {
 3183|  18.7M|    if (buffer->gc.flags & JANET_BUFFER_FLAG_NO_REALLOC) {
  ------------------
  |  | 1780|  18.7M|#define JANET_BUFFER_FLAG_NO_REALLOC 0x10000
  ------------------
  |  Branch (3183:9): [True: 0, False: 18.7M]
  ------------------
 3184|      0|        janet_panic("buffer cannot reallocate pinned memory");
 3185|      0|    }
 3186|  18.7M|}
janet.c:janet_load_libs:
 9395|  6.86k|static void janet_load_libs(JanetTable *env) {
 9396|  6.86k|    JanetRegExt corelib_cfuns[] = {
 9397|  6.86k|        JANET_CORE_REG("native", janet_core_native),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9398|  6.86k|        JANET_CORE_REG("describe", janet_core_describe),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9399|  6.86k|        JANET_CORE_REG("string", janet_core_string),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9400|  6.86k|        JANET_CORE_REG("symbol", janet_core_symbol),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9401|  6.86k|        JANET_CORE_REG("keyword", janet_core_keyword),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9402|  6.86k|        JANET_CORE_REG("buffer", janet_core_buffer),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9403|  6.86k|        JANET_CORE_REG("abstract?", janet_core_is_abstract),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9404|  6.86k|        JANET_CORE_REG("table", janet_core_table),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9405|  6.86k|        JANET_CORE_REG("array", janet_core_array),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9406|  6.86k|        JANET_CORE_REG("scan-number", janet_core_scannumber),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9407|  6.86k|        JANET_CORE_REG("tuple", janet_core_tuple),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9408|  6.86k|        JANET_CORE_REG("struct", janet_core_struct),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9409|  6.86k|        JANET_CORE_REG("gensym", janet_core_gensym),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9410|  6.86k|        JANET_CORE_REG("gccollect", janet_core_gccollect),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9411|  6.86k|        JANET_CORE_REG("gcsetinterval", janet_core_gcsetinterval),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9412|  6.86k|        JANET_CORE_REG("gcinterval", janet_core_gcinterval),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9413|  6.86k|        JANET_CORE_REG("type", janet_core_type),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9414|  6.86k|        JANET_CORE_REG("hash", janet_core_hash),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9415|  6.86k|        JANET_CORE_REG("getline", janet_core_getline),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9416|  6.86k|        JANET_CORE_REG("dyn", janet_core_dyn),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9417|  6.86k|        JANET_CORE_REG("setdyn", janet_core_setdyn),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9418|  6.86k|        JANET_CORE_REG("trace", janet_core_trace),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9419|  6.86k|        JANET_CORE_REG("untrace", janet_core_untrace),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9420|  6.86k|        JANET_CORE_REG("module/expand-path", janet_core_expand_path),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9421|  6.86k|        JANET_CORE_REG("int?", janet_core_check_int),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9422|  6.86k|        JANET_CORE_REG("nat?", janet_core_check_nat),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9423|  6.86k|        JANET_CORE_REG("bytes?", janet_core_is_bytes),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9424|  6.86k|        JANET_CORE_REG("indexed?", janet_core_is_indexed),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9425|  6.86k|        JANET_CORE_REG("dictionary?", janet_core_is_dictionary),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9426|  6.86k|        JANET_CORE_REG("lengthable?", janet_core_is_lengthable),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9427|  6.86k|        JANET_CORE_REG("slice", janet_core_slice),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9428|  6.86k|        JANET_CORE_REG("range", janet_core_range),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9429|  6.86k|        JANET_CORE_REG("signal", janet_core_signal),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9430|  6.86k|        JANET_CORE_REG("memcmp", janet_core_memcmp),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9431|  6.86k|        JANET_CORE_REG("getproto", janet_core_getproto),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9432|  6.86k|        JANET_CORE_REG("sandbox", janet_core_sandbox),
  ------------------
  |  |  489|  6.86k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  6.86k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9433|  6.86k|        JANET_REG_END
  ------------------
  |  | 2110|  6.86k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
 9434|  6.86k|    };
 9435|       |    janet_core_cfuns_ext(env, NULL, corelib_cfuns);
 9436|  6.86k|    janet_lib_io(env);
 9437|  6.86k|    janet_lib_math(env);
 9438|  6.86k|    janet_lib_array(env);
 9439|  6.86k|    janet_lib_tuple(env);
 9440|  6.86k|    janet_lib_buffer(env);
 9441|  6.86k|    janet_lib_table(env);
 9442|  6.86k|    janet_lib_struct(env);
 9443|  6.86k|    janet_lib_fiber(env);
 9444|  6.86k|    janet_lib_os(env);
 9445|  6.86k|    janet_lib_parse(env);
 9446|  6.86k|    janet_lib_compile(env);
 9447|  6.86k|    janet_lib_debug(env);
 9448|  6.86k|    janet_lib_string(env);
 9449|  6.86k|    janet_lib_marsh(env);
 9450|  6.86k|#ifdef JANET_PEG
 9451|  6.86k|    janet_lib_peg(env);
 9452|  6.86k|#endif
 9453|  6.86k|#ifdef JANET_ASSEMBLER
 9454|  6.86k|    janet_lib_asm(env);
 9455|  6.86k|#endif
 9456|  6.86k|#ifdef JANET_INT_TYPES
 9457|  6.86k|    janet_lib_inttypes(env);
 9458|  6.86k|#endif
 9459|  6.86k|#ifdef JANET_EV
 9460|  6.86k|    janet_lib_ev(env);
 9461|  6.86k|#ifdef JANET_FILEWATCH
 9462|  6.86k|    janet_lib_filewatch(env);
 9463|  6.86k|#endif
 9464|  6.86k|#endif
 9465|  6.86k|#ifdef JANET_NET
 9466|  6.86k|    janet_lib_net(env);
 9467|  6.86k|#endif
 9468|  6.86k|#ifdef JANET_FFI
 9469|  6.86k|    janet_lib_ffi(env);
 9470|  6.86k|#endif
 9471|  6.86k|}
janet.c:janet_q_init:
10715|  6.86k|static void janet_q_init(JanetQueue *q) {
10716|       |    q->data = NULL;
10717|  6.86k|    q->head = 0;
10718|  6.86k|    q->tail = 0;
10719|  6.86k|    q->capacity = 0;
10720|  6.86k|}
janet.c:peek_timeout:
10797|  6.86k|static int peek_timeout(JanetTimeout *out) {
10798|  6.86k|    if (janet_vm.tq_count == 0) return 0;
  ------------------
  |  Branch (10798:9): [True: 6.86k, False: 0]
  ------------------
10799|      0|    *out = janet_vm.tq[0];
10800|      0|    return 1;
10801|  6.86k|}
janet.c:janet_q_deinit:
10722|  6.86k|static void janet_q_deinit(JanetQueue *q) {
10723|  6.86k|    janet_free(q->data);
  ------------------
  |  | 2415|  6.86k|#define janet_free(X) free((X))
  ------------------
10724|  6.86k|}
janet.c:janet_ev_setup_selfpipe:
12285|  6.86k|static void janet_ev_setup_selfpipe(void) {
12286|  6.86k|    if (janet_make_pipe(janet_vm.selfpipe, 1)) {
  ------------------
  |  Branch (12286:9): [True: 0, False: 6.86k]
  ------------------
12287|       |        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]
  |  |  ------------------
  ------------------
12288|      0|    }
12289|  6.86k|}
janet.c:janet_ev_cleanup_selfpipe:
12308|  6.86k|static void janet_ev_cleanup_selfpipe(void) {
12309|  6.86k|    close(janet_vm.selfpipe[0]);
12310|  6.86k|    close(janet_vm.selfpipe[1]);
12311|  6.86k|}
janet.c:janet_deinit_block:
18318|   131M|static void janet_deinit_block(JanetGCObject *mem) {
18319|   131M|    switch (mem->flags & JANET_MEM_TYPEBITS) {
  ------------------
  |  |  652|   131M|#define JANET_MEM_TYPEBITS 0xFF
  ------------------
18320|   105M|        default:
  ------------------
  |  Branch (18320:9): [True: 105M, False: 25.2M]
  ------------------
18321|   108M|        case JANET_MEMORY_FUNCTION:
  ------------------
  |  Branch (18321:9): [True: 2.62M, False: 128M]
  ------------------
18322|   108M|            break; /* Do nothing for non gc types */
18323|  13.7M|        case JANET_MEMORY_SYMBOL:
  ------------------
  |  Branch (18323:9): [True: 13.7M, False: 117M]
  ------------------
18324|  13.7M|            janet_symbol_deinit(((JanetStringHead *) mem)->data);
18325|  13.7M|            break;
18326|  25.6k|        case JANET_MEMORY_ARRAY:
  ------------------
  |  Branch (18326:9): [True: 25.6k, False: 131M]
  ------------------
18327|  25.6k|        case JANET_MEMORY_ARRAY_WEAK:
  ------------------
  |  Branch (18327:9): [True: 0, False: 131M]
  ------------------
18328|  25.6k|            janet_free(((JanetArray *) mem)->data);
  ------------------
  |  | 2415|  25.6k|#define janet_free(X) free((X))
  ------------------
18329|  25.6k|            break;
18330|  5.04M|        case JANET_MEMORY_TABLE:
  ------------------
  |  Branch (18330:9): [True: 5.04M, False: 126M]
  ------------------
18331|  5.04M|        case JANET_MEMORY_TABLE_WEAKK:
  ------------------
  |  Branch (18331:9): [True: 0, False: 131M]
  ------------------
18332|  5.04M|        case JANET_MEMORY_TABLE_WEAKV:
  ------------------
  |  Branch (18332:9): [True: 0, False: 131M]
  ------------------
18333|  5.04M|        case JANET_MEMORY_TABLE_WEAKKV:
  ------------------
  |  Branch (18333:9): [True: 0, False: 131M]
  ------------------
18334|  5.04M|            janet_free(((JanetTable *) mem)->data);
  ------------------
  |  | 2415|  5.04M|#define janet_free(X) free((X))
  ------------------
18335|  5.04M|            break;
18336|      0|        case JANET_MEMORY_FIBER: {
  ------------------
  |  Branch (18336:9): [True: 0, False: 131M]
  ------------------
18337|      0|            JanetFiber *f = (JanetFiber *)mem;
18338|      0|#ifdef JANET_EV
18339|      0|            if (f->ev_state && !(f->flags & JANET_FIBER_EV_FLAG_IN_FLIGHT)) {
  ------------------
  |  |  824|      0|#define JANET_FIBER_EV_FLAG_IN_FLIGHT 0x1
  ------------------
  |  Branch (18339:17): [True: 0, False: 0]
  |  Branch (18339:32): [True: 0, False: 0]
  ------------------
18340|      0|                janet_ev_dec_refcount();
18341|      0|                janet_free(f->ev_state);
  ------------------
  |  | 2415|      0|#define janet_free(X) free((X))
  ------------------
18342|      0|            } else if (f->gc.flags & JANET_FIBER_EV_GCFLAG_SUSPENDED) {
  ------------------
  |  |  820|      0|#define JANET_FIBER_EV_GCFLAG_SUSPENDED 0x2000000
  ------------------
  |  Branch (18342:24): [True: 0, False: 0]
  ------------------
18343|      0|                janet_ev_dec_refcount();
18344|      0|            }
18345|      0|#endif
18346|      0|            janet_free(f->data);
  ------------------
  |  | 2415|      0|#define janet_free(X) free((X))
  ------------------
18347|      0|        }
18348|      0|        break;
18349|  13.3k|        case JANET_MEMORY_BUFFER:
  ------------------
  |  Branch (18349:9): [True: 13.3k, False: 131M]
  ------------------
18350|  13.3k|            janet_buffer_deinit((JanetBuffer *) mem);
18351|  13.3k|            break;
18352|  27.4k|        case JANET_MEMORY_ABSTRACT: {
  ------------------
  |  Branch (18352:9): [True: 27.4k, False: 131M]
  ------------------
18353|  27.4k|            JanetAbstractHead *head = (JanetAbstractHead *)mem;
18354|  27.4k|            if (head->type->gcperthread) {
  ------------------
  |  Branch (18354:17): [True: 0, False: 27.4k]
  ------------------
18355|      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]
  |  |  ------------------
  ------------------
18356|      0|            }
18357|  27.4k|            if (head->type->gc) {
  ------------------
  |  Branch (18357:17): [True: 20.5k, False: 6.82k]
  ------------------
18358|  20.5k|                janet_assert(!head->type->gc(head->data, head->size), "finalizer failed");
  ------------------
  |  |  389|  20.5k|#define janet_assert(c, m) do { \
  |  |  390|  20.5k|    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.5k]
  |  |  ------------------
  |  |  391|  20.5k|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 20.5k]
  |  |  ------------------
  ------------------
18359|  20.5k|            }
18360|  27.4k|        }
18361|  27.4k|        break;
18362|  54.9k|        case JANET_MEMORY_FUNCENV: {
  ------------------
  |  Branch (18362:9): [True: 54.9k, False: 131M]
  ------------------
18363|  54.9k|            JanetFuncEnv *env = (JanetFuncEnv *)mem;
18364|  54.9k|            if (0 == env->offset)
  ------------------
  |  Branch (18364:17): [True: 54.9k, False: 0]
  ------------------
18365|  54.9k|                janet_free(env->as.values);
  ------------------
  |  | 2415|  54.9k|#define janet_free(X) free((X))
  ------------------
18366|  54.9k|        }
18367|  54.9k|        break;
18368|  3.68M|        case JANET_MEMORY_FUNCDEF: {
  ------------------
  |  Branch (18368:9): [True: 3.68M, False: 127M]
  ------------------
18369|  3.68M|            JanetFuncDef *def = (JanetFuncDef *)mem;
18370|       |            /* TODO - get this all with one alloc and one free */
18371|  3.68M|            janet_free(def->defs);
  ------------------
  |  | 2415|  3.68M|#define janet_free(X) free((X))
  ------------------
18372|  3.68M|            janet_free(def->environments);
  ------------------
  |  | 2415|  3.68M|#define janet_free(X) free((X))
  ------------------
18373|  3.68M|            janet_free(def->constants);
  ------------------
  |  | 2415|  3.68M|#define janet_free(X) free((X))
  ------------------
18374|  3.68M|            janet_free(def->bytecode);
  ------------------
  |  | 2415|  3.68M|#define janet_free(X) free((X))
  ------------------
18375|  3.68M|            janet_free(def->sourcemap);
  ------------------
  |  | 2415|  3.68M|#define janet_free(X) free((X))
  ------------------
18376|  3.68M|            janet_free(def->closure_bitset);
  ------------------
  |  | 2415|  3.68M|#define janet_free(X) free((X))
  ------------------
18377|  3.68M|            janet_free(def->symbolmap);
  ------------------
  |  | 2415|  3.68M|#define janet_free(X) free((X))
  ------------------
18378|  3.68M|        }
18379|  3.68M|        break;
18380|   131M|    }
18381|   131M|}
janet.c:janet_free_all_scratch:
18568|  6.86k|static void janet_free_all_scratch(void) {
18569|  1.62M|    for (size_t i = 0; i < janet_vm.scratch_len; i++) {
  ------------------
  |  Branch (18569:24): [True: 1.62M, False: 6.86k]
  ------------------
18570|  1.62M|        free_one_scratch(janet_vm.scratch_mem[i]);
18571|  1.62M|    }
18572|  6.86k|    janet_vm.scratch_len = 0;
18573|  6.86k|}
janet.c:janet_mem2scratch:
18575|  17.9M|static JanetScratch *janet_mem2scratch(void *mem) {
18576|  17.9M|    JanetScratch *s = (JanetScratch *)mem;
18577|  17.9M|    return s - 1;
18578|  17.9M|}
janet.c:free_one_scratch:
18560|  19.3M|static void free_one_scratch(JanetScratch *s) {
18561|  19.3M|    if (NULL != s->finalize) {
  ------------------
  |  Branch (18561:9): [True: 0, False: 19.3M]
  ------------------
18562|      0|        s->finalize((char *) s->mem);
18563|      0|    }
18564|  19.3M|    janet_free(s);
  ------------------
  |  | 2415|  19.3M|#define janet_free(X) free((X))
  ------------------
18565|  19.3M|}
janet.c:it_s64_tostring:
18861|  18.2k|static void it_s64_tostring(void *p, JanetBuffer *buffer) {
18862|  18.2k|    char str[32];
18863|       |    snprintf(str, sizeof(str), "%" PRId64, *((int64_t *)p));
18864|  18.2k|    janet_buffer_push_cstring(buffer, str);
18865|  18.2k|}
janet.c:janet_int64_compare:
18838|  6.00k|static int janet_int64_compare(void *p1, void *p2) {
18839|  6.00k|    int64_t x = *((int64_t *)p1);
18840|  6.00k|    int64_t y = *((int64_t *)p2);
18841|  6.00k|    return x == y ? 0 : x < y ? -1 : 1;
  ------------------
  |  Branch (18841:12): [True: 108, False: 5.89k]
  |  Branch (18841:25): [True: 2.51k, False: 3.38k]
  ------------------
18842|  6.00k|}
janet.c:janet_int64_hash:
18832|   475k|static int32_t janet_int64_hash(void *p1, size_t size) {
18833|   475k|    (void) size;
18834|   475k|    int32_t *words = p1;
18835|   475k|    return words[0] ^ words[1];
18836|   475k|}
janet.c:it_u64_tostring:
18867|   138k|static void it_u64_tostring(void *p, JanetBuffer *buffer) {
18868|   138k|    char str[32];
18869|       |    snprintf(str, sizeof(str), "%" PRIu64, *((uint64_t *)p));
18870|   138k|    janet_buffer_push_cstring(buffer, str);
18871|   138k|}
janet.c:janet_uint64_compare:
18844|  10.9k|static int janet_uint64_compare(void *p1, void *p2) {
18845|  10.9k|    uint64_t x = *((uint64_t *)p1);
18846|  10.9k|    uint64_t y = *((uint64_t *)p2);
18847|  10.9k|    return x == y ? 0 : x < y ? -1 : 1;
  ------------------
  |  Branch (18847:12): [True: 77, False: 10.8k]
  |  Branch (18847:25): [True: 51, False: 10.8k]
  ------------------
18848|  10.9k|}
janet.c:makef:
19596|  20.5k|static void *makef(FILE *f, int32_t flags, size_t bufsize) {
19597|  20.5k|    JanetFile *iof = (JanetFile *) janet_abstract(&janet_file_type, sizeof(JanetFile));
19598|  20.5k|    iof->file = f;
19599|  20.5k|    iof->flags = flags;
19600|  20.5k|    iof->vbufsize = bufsize;
19601|  20.5k|#if !(defined(JANET_WINDOWS) || defined(JANET_PLAN9))
19602|       |    /* While we would like fopen to set cloexec by default (like O_CLOEXEC) with the e flag, that is
19603|       |     * not standard. */
19604|  20.5k|    if (!(flags & JANET_FILE_NOT_CLOSEABLE))
  ------------------
  |  | 2278|  20.5k|#define JANET_FILE_NOT_CLOSEABLE 16
  ------------------
  |  Branch (19604:9): [True: 0, False: 20.5k]
  ------------------
19605|      0|        fcntl(fileno(f), F_SETFD, FD_CLOEXEC);
19606|  20.5k|#endif
19607|  20.5k|    return iof;
19608|  20.5k|}
janet.c:cfun_io_gc:
19804|  20.5k|static int cfun_io_gc(void *p, size_t len) {
19805|  20.5k|    (void) len;
19806|  20.5k|    JanetFile *iof = (JanetFile *)p;
19807|  20.5k|    janet_file_close(iof);
19808|  20.5k|    return 0;
19809|  20.5k|}
janet.c:readint:
21088|   466M|static int32_t readint(UnmarshalState *st, const uint8_t **atdata) {
21089|   466M|    const uint8_t *data = *atdata;
21090|   466M|    int32_t ret;
21091|   466M|    MARSH_EOS(st, data);
  ------------------
  |  |21083|   466M|#define MARSH_EOS(st, data) do { \
  |  |21084|   466M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21084:9): [True: 0, False: 466M]
  |  |  ------------------
  |  |21085|   466M|} while (0)
  |  |  ------------------
  |  |  |  Branch (21085:10): [Folded, False: 466M]
  |  |  ------------------
  ------------------
21092|   466M|    if (*data < 128) {
  ------------------
  |  Branch (21092:9): [True: 380M, False: 86.5M]
  ------------------
21093|   380M|        ret = *data++;
21094|   380M|    } else if (*data < 192) {
  ------------------
  |  Branch (21094:16): [True: 81.6M, False: 4.86M]
  ------------------
21095|  81.6M|        MARSH_EOS(st, data + 1);
  ------------------
  |  |21083|  81.6M|#define MARSH_EOS(st, data) do { \
  |  |21084|  81.6M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21084:9): [True: 0, False: 81.6M]
  |  |  ------------------
  |  |21085|  81.6M|} while (0)
  |  |  ------------------
  |  |  |  Branch (21085:10): [Folded, False: 81.6M]
  |  |  ------------------
  ------------------
21096|  81.6M|        uint32_t uret = ((data[0] & 0x3F) << 8) + data[1];
21097|       |        /* Sign extend 18 MSBs */
21098|  81.6M|        uret |= (uret >> 13) ? 0xFFFFC000 : 0;
  ------------------
  |  Branch (21098:17): [True: 22.8M, False: 58.7M]
  ------------------
21099|  81.6M|        ret = (int32_t)uret;
21100|  81.6M|        data += 2;
21101|  81.6M|    } else if (*data == LB_INTEGER) {
  ------------------
  |  Branch (21101:16): [True: 4.86M, False: 0]
  ------------------
21102|  4.86M|        MARSH_EOS(st, data + 4);
  ------------------
  |  |21083|  4.86M|#define MARSH_EOS(st, data) do { \
  |  |21084|  4.86M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21084:9): [True: 0, False: 4.86M]
  |  |  ------------------
  |  |21085|  4.86M|} while (0)
  |  |  ------------------
  |  |  |  Branch (21085:10): [Folded, False: 4.86M]
  |  |  ------------------
  ------------------
21103|  4.86M|        uint32_t ui = ((uint32_t)(data[1]) << 24) |
21104|  4.86M|                      ((uint32_t)(data[2]) << 16) |
21105|  4.86M|                      ((uint32_t)(data[3]) << 8) |
21106|  4.86M|                      (uint32_t)(data[4]);
21107|  4.86M|        ret = (int32_t)ui;
21108|  4.86M|        data += 5;
21109|  4.86M|    } else {
21110|      0|        janet_panicf("expected integer, got byte %x at index %d",
21111|      0|                     *data,
21112|      0|                     data - st->start);
21113|      0|        ret = 0;
21114|      0|    }
21115|   466M|    *atdata = data;
21116|   466M|    return ret;
21117|   466M|}
janet.c:unmarshal_one:
21710|   124M|    int flags) {
21711|   124M|    uint8_t lead;
21712|   124M|    MARSH_STACKCHECK;
  ------------------
  |  |20555|   124M|#define MARSH_STACKCHECK if ((flags & 0xFFFF) > JANET_RECURSION_GUARD) janet_panic("stack overflow")
  |  |  ------------------
  |  |  |  |  296|   124M|#define JANET_RECURSION_GUARD 1024
  |  |  ------------------
  |  |  |  Branch (20555:30): [True: 0, False: 124M]
  |  |  ------------------
  ------------------
21713|   124M|    MARSH_EOS(st, data);
  ------------------
  |  |21083|   124M|#define MARSH_EOS(st, data) do { \
  |  |21084|   124M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21084:9): [True: 0, False: 124M]
  |  |  ------------------
  |  |21085|   124M|} while (0)
  |  |  ------------------
  |  |  |  Branch (21085:10): [Folded, False: 124M]
  |  |  ------------------
  ------------------
21714|   124M|    lead = data[0];
21715|   124M|    if (lead < LB_REAL) {
  ------------------
  |  Branch (21715:9): [True: 9.48M, False: 115M]
  ------------------
21716|  9.48M|        *out = janet_wrap_integer(readint(st, &data));
  ------------------
  |  |  967|  9.48M|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|  9.48M|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
21717|  9.48M|        return data;
21718|  9.48M|    }
21719|   115M|    switch (lead) {
21720|   377k|        case LB_NIL:
  ------------------
  |  Branch (21720:9): [True: 377k, False: 114M]
  ------------------
21721|   377k|            *out = janet_wrap_nil();
  ------------------
  |  |  831|   377k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   377k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   377k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   377k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21722|   377k|            return data + 1;
21723|      0|        case LB_FALSE:
  ------------------
  |  Branch (21723:9): [True: 0, False: 115M]
  ------------------
21724|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21725|      0|            return data + 1;
21726|   913k|        case LB_TRUE:
  ------------------
  |  Branch (21726:9): [True: 913k, False: 114M]
  ------------------
21727|   913k|            *out = janet_wrap_true();
  ------------------
  |  |  832|   913k|#define janet_wrap_true() janet_nanbox_from_payload(JANET_BOOLEAN, 1)
  |  |  ------------------
  |  |  |  |  822|   913k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   913k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   913k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21728|   913k|            return data + 1;
21729|  20.5k|        case LB_INTEGER:
  ------------------
  |  Branch (21729:9): [True: 20.5k, False: 115M]
  ------------------
21730|       |            /* Long integer */
21731|  20.5k|            MARSH_EOS(st, data + 4);
  ------------------
  |  |21083|  20.5k|#define MARSH_EOS(st, data) do { \
  |  |21084|  20.5k|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21084:9): [True: 0, False: 20.5k]
  |  |  ------------------
  |  |21085|  20.5k|} while (0)
  |  |  ------------------
  |  |  |  Branch (21085:10): [Folded, False: 20.5k]
  |  |  ------------------
  ------------------
21732|  20.5k|            uint32_t ui = ((uint32_t)(data[4])) |
21733|  20.5k|                          ((uint32_t)(data[3]) << 8) |
21734|  20.5k|                          ((uint32_t)(data[2]) << 16) |
21735|  20.5k|                          ((uint32_t)(data[1]) << 24);
21736|  20.5k|            int32_t si = (int32_t)ui;
21737|  20.5k|            *out = janet_wrap_integer(si);
  ------------------
  |  |  967|  20.5k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|  20.5k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
21738|  20.5k|            return data + 5;
21739|  48.0k|        case LB_REAL:
  ------------------
  |  Branch (21739:9): [True: 48.0k, False: 115M]
  ------------------
21740|       |            /* Real */
21741|  48.0k|        {
21742|  48.0k|            union {
21743|  48.0k|                double d;
21744|  48.0k|                uint8_t bytes[8];
21745|  48.0k|            } u;
21746|  48.0k|            MARSH_EOS(st, data + 8);
  ------------------
  |  |21083|  48.0k|#define MARSH_EOS(st, data) do { \
  |  |21084|  48.0k|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21084:9): [True: 0, False: 48.0k]
  |  |  ------------------
  |  |21085|  48.0k|} while (0)
  |  |  ------------------
  |  |  |  Branch (21085:10): [Folded, False: 48.0k]
  |  |  ------------------
  ------------------
21747|       |#ifdef JANET_BIG_ENDIAN
21748|       |            u.bytes[0] = data[8];
21749|       |            u.bytes[1] = data[7];
21750|       |            u.bytes[2] = data[6];
21751|       |            u.bytes[3] = data[5];
21752|       |            u.bytes[4] = data[4];
21753|       |            u.bytes[5] = data[3];
21754|       |            u.bytes[6] = data[2];
21755|       |            u.bytes[7] = data[1];
21756|       |#else
21757|  48.0k|            memcpy(&u.bytes, data + 1, sizeof(double));
21758|  48.0k|#endif
21759|  48.0k|            *out = janet_wrap_number_safe(u.d);
21760|  48.0k|            janet_v_push(st->lookup, *out);
  ------------------
  |  |  734|  48.0k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|  48.0k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|  48.0k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|  48.0k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  48.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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  742|  48.0k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  48.0k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 0, False: 48.0k]
  |  |  |  |  |  |  |  Branch (745:50): [True: 0, False: 48.0k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|      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))
  |  |  ------------------
  |  |  |  |  743|  48.0k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  48.0k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21761|  48.0k|            return data + 9;
21762|  48.0k|        }
21763|  10.1M|        case LB_STRING:
  ------------------
  |  Branch (21763:9): [True: 10.1M, False: 105M]
  ------------------
21764|  23.0M|        case LB_SYMBOL:
  ------------------
  |  Branch (21764:9): [True: 12.8M, False: 102M]
  ------------------
21765|  23.0M|        case LB_BUFFER:
  ------------------
  |  Branch (21765:9): [True: 6.86k, False: 115M]
  ------------------
21766|  24.6M|        case LB_KEYWORD:
  ------------------
  |  Branch (21766:9): [True: 1.63M, False: 113M]
  ------------------
21767|  27.0M|        case LB_REGISTRY: {
  ------------------
  |  Branch (21767:9): [True: 2.43M, False: 112M]
  ------------------
21768|  27.0M|            data++;
21769|  27.0M|            int32_t len = readnat(st, &data);
21770|  27.0M|            MARSH_EOS(st, data - 1 + len);
  ------------------
  |  |21083|  27.0M|#define MARSH_EOS(st, data) do { \
  |  |21084|  27.0M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21084:9): [True: 0, False: 27.0M]
  |  |  ------------------
  |  |21085|  27.0M|} while (0)
  |  |  ------------------
  |  |  |  Branch (21085:10): [Folded, False: 27.0M]
  |  |  ------------------
  ------------------
21771|  27.0M|            if (lead == LB_STRING) {
  ------------------
  |  Branch (21771:17): [True: 10.1M, False: 16.9M]
  ------------------
21772|  10.1M|                const uint8_t *str = janet_string(data, len);
21773|  10.1M|                *out = janet_wrap_string(str);
  ------------------
  |  |  848|  10.1M|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|  10.1M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  10.1M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  10.1M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21774|  16.9M|            } else if (lead == LB_SYMBOL) {
  ------------------
  |  Branch (21774:24): [True: 12.8M, False: 4.07M]
  ------------------
21775|  12.8M|                const uint8_t *str = janet_symbol(data, len);
21776|  12.8M|                *out = janet_wrap_symbol(str);
  ------------------
  |  |  849|  12.8M|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  ------------------
  |  |  |  |  828|  12.8M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  12.8M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  12.8M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21777|  12.8M|            } else if (lead == LB_KEYWORD) {
  ------------------
  |  Branch (21777:24): [True: 1.63M, False: 2.44M]
  ------------------
21778|  1.63M|                const uint8_t *str = janet_keyword(data, len);
  ------------------
  |  | 1840|  1.63M|#define janet_keyword janet_symbol
  ------------------
21779|  1.63M|                *out = janet_wrap_keyword(str);
  ------------------
  |  |  850|  1.63M|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  ------------------
  |  |  |  |  828|  1.63M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.63M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.63M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21780|  2.44M|            } else if (lead == LB_REGISTRY) {
  ------------------
  |  Branch (21780:24): [True: 2.43M, False: 6.86k]
  ------------------
21781|  2.43M|                if (st->reg) {
  ------------------
  |  Branch (21781:21): [True: 2.43M, False: 0]
  ------------------
21782|  2.43M|                    Janet regkey = janet_symbolv(data, len);
  ------------------
  |  | 1836|  2.43M|#define janet_symbolv(str, len) janet_wrap_symbol(janet_symbol((str), (len)))
  |  |  ------------------
  |  |  |  |  849|  2.43M|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  2.43M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  2.43M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  2.43M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21783|  2.43M|                    *out = janet_table_get(st->reg, regkey);
21784|  2.43M|                } else {
21785|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21786|      0|                }
21787|  2.43M|            } else { /* (lead == LB_BUFFER) */
21788|  6.86k|                JanetBuffer *buffer = janet_buffer(len);
21789|  6.86k|                buffer->count = len;
21790|  6.86k|                safe_memcpy(buffer->data, data, len);
21791|  6.86k|                *out = janet_wrap_buffer(buffer);
  ------------------
  |  |  847|  6.86k|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  825|  6.86k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  6.86k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  6.86k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21792|  6.86k|            }
21793|  27.0M|            janet_v_push(st->lookup, *out);
  ------------------
  |  |  734|  27.0M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|  27.0M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|  27.0M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|  27.0M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  27.0M|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  742|  27.0M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  27.0M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 0, False: 27.0M]
  |  |  |  |  |  |  |  Branch (745:50): [True: 75.5k, False: 27.0M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|  75.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))
  |  |  ------------------
  |  |  |  |  743|  27.0M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  27.0M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21794|  27.0M|            return data + len;
21795|  27.0M|        }
21796|      0|        case LB_FIBER: {
  ------------------
  |  Branch (21796:9): [True: 0, False: 115M]
  ------------------
21797|      0|            JanetFiber *fiber;
21798|      0|            data = unmarshal_one_fiber(st, data + 1, &fiber, flags + 1);
21799|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21800|      0|            return data;
21801|  27.0M|        }
21802|  2.62M|        case LB_FUNCTION: {
  ------------------
  |  Branch (21802:9): [True: 2.62M, False: 112M]
  ------------------
21803|  2.62M|            JanetFunction *func;
21804|  2.62M|            JanetFuncDef *def;
21805|  2.62M|            data++;
21806|  2.62M|            int32_t len = readnat(st, &data);
21807|  2.62M|            if (len > 255) {
  ------------------
  |  Branch (21807:17): [True: 0, False: 2.62M]
  ------------------
21808|      0|                janet_panicf("invalid function - too many environments (%d)", len);
21809|      0|            }
21810|  2.62M|            func = janet_gcalloc(JANET_MEMORY_FUNCTION, sizeof(JanetFunction) +
21811|  2.62M|                                 len * sizeof(JanetFuncEnv));
21812|  2.62M|            func->def = NULL;
21813|  2.92M|            for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (21813:33): [True: 295k, False: 2.62M]
  ------------------
21814|   295k|                func->envs[i] = NULL;
21815|   295k|            }
21816|  2.62M|            *out = janet_wrap_function(func);
  ------------------
  |  |  852|  2.62M|#define janet_wrap_function(s) janet_nanbox_wrap_((s), JANET_FUNCTION)
  |  |  ------------------
  |  |  |  |  825|  2.62M|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.62M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.62M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21817|  2.62M|            janet_v_push(st->lookup, *out);
  ------------------
  |  |  734|  2.62M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|  2.62M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|  2.62M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|  2.62M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  2.62M|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  742|  2.62M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  2.62M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 0, False: 2.62M]
  |  |  |  |  |  |  |  Branch (745:50): [True: 0, False: 2.62M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|      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))
  |  |  ------------------
  |  |  |  |  743|  2.62M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  2.62M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21818|  2.62M|            data = unmarshal_one_def(st, data, &def, flags + 1);
21819|  2.62M|            if (def->environments_length != len) {
  ------------------
  |  Branch (21819:17): [True: 0, False: 2.62M]
  ------------------
21820|      0|                janet_panicf("invalid function - env count %d does not match funcdef (%d)",
21821|      0|                             len, def->environments_length);
21822|      0|            }
21823|  2.62M|            func->def = def;
21824|  2.92M|            for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (21824:33): [True: 295k, False: 2.62M]
  ------------------
21825|   295k|                data = unmarshal_one_env(st, data, &(func->envs[i]), flags + 1);
21826|   295k|            }
21827|  2.62M|            return data;
21828|  2.62M|        }
21829|      0|        case LB_ABSTRACT: {
  ------------------
  |  Branch (21829:9): [True: 0, False: 115M]
  ------------------
21830|      0|            data++;
21831|      0|            return unmarshal_one_abstract(st, data, out, flags);
21832|  2.62M|        }
21833|  74.0M|        case LB_REFERENCE:
  ------------------
  |  Branch (21833:9): [True: 74.0M, False: 41.3M]
  ------------------
21834|  74.0M|        case LB_ARRAY:
  ------------------
  |  Branch (21834:9): [True: 20.5k, False: 115M]
  ------------------
21835|  74.0M|        case LB_ARRAY_WEAK:
  ------------------
  |  Branch (21835:9): [True: 0, False: 115M]
  ------------------
21836|  79.2M|        case LB_TUPLE:
  ------------------
  |  Branch (21836:9): [True: 5.16M, False: 110M]
  ------------------
21837|  79.2M|        case LB_STRUCT:
  ------------------
  |  Branch (21837:9): [True: 48.0k, False: 115M]
  ------------------
21838|  79.2M|        case LB_STRUCT_PROTO:
  ------------------
  |  Branch (21838:9): [True: 0, False: 115M]
  ------------------
21839|  84.2M|        case LB_TABLE:
  ------------------
  |  Branch (21839:9): [True: 5.01M, False: 110M]
  ------------------
21840|  84.2M|        case LB_TABLE_PROTO:
  ------------------
  |  Branch (21840:9): [True: 0, False: 115M]
  ------------------
21841|  84.2M|        case LB_TABLE_WEAKK:
  ------------------
  |  Branch (21841:9): [True: 0, False: 115M]
  ------------------
21842|  84.2M|        case LB_TABLE_WEAKV:
  ------------------
  |  Branch (21842:9): [True: 0, False: 115M]
  ------------------
21843|  84.2M|        case LB_TABLE_WEAKKV:
  ------------------
  |  Branch (21843:9): [True: 0, False: 115M]
  ------------------
21844|  84.2M|        case LB_TABLE_WEAKK_PROTO:
  ------------------
  |  Branch (21844:9): [True: 0, False: 115M]
  ------------------
21845|  84.2M|        case LB_TABLE_WEAKV_PROTO:
  ------------------
  |  Branch (21845:9): [True: 0, False: 115M]
  ------------------
21846|  84.2M|        case LB_TABLE_WEAKKV_PROTO:
  ------------------
  |  Branch (21846:9): [True: 0, False: 115M]
  ------------------
21847|       |            /* Things that open with integers */
21848|  84.2M|        {
21849|  84.2M|            data++;
21850|  84.2M|            int32_t len = readnat(st, &data);
21851|       |            /* DOS check */
21852|  84.2M|            if (lead != LB_REFERENCE) {
  ------------------
  |  Branch (21852:17): [True: 10.2M, False: 74.0M]
  ------------------
21853|  10.2M|                MARSH_EOS(st, data - 1 + len);
  ------------------
  |  |21083|  10.2M|#define MARSH_EOS(st, data) do { \
  |  |21084|  10.2M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21084:9): [True: 0, False: 10.2M]
  |  |  ------------------
  |  |21085|  10.2M|} while (0)
  |  |  ------------------
  |  |  |  Branch (21085:10): [Folded, False: 10.2M]
  |  |  ------------------
  ------------------
21854|  10.2M|            }
21855|  84.2M|            if (lead == LB_ARRAY || lead == LB_ARRAY_WEAK) {
  ------------------
  |  Branch (21855:17): [True: 20.5k, False: 84.2M]
  |  Branch (21855:37): [True: 0, False: 84.2M]
  ------------------
21856|       |                /* Array */
21857|  20.5k|                JanetArray *array = (lead == LB_ARRAY_WEAK) ? janet_array_weak(len) : janet_array(len);
  ------------------
  |  Branch (21857:37): [True: 0, False: 20.5k]
  ------------------
21858|  20.5k|                array->count = len;
21859|  20.5k|                *out = janet_wrap_array(array);
  ------------------
  |  |  845|  20.5k|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  825|  20.5k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  20.5k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  20.5k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21860|  20.5k|                janet_v_push(st->lookup, *out);
  ------------------
  |  |  734|  20.5k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|  20.5k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|  20.5k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|  20.5k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  20.5k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  742|  20.5k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  20.5k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 0, False: 20.5k]
  |  |  |  |  |  |  |  Branch (745:50): [True: 0, False: 20.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|      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))
  |  |  ------------------
  |  |  |  |  743|  20.5k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  20.5k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21861|   178k|                for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (21861:37): [True: 157k, False: 20.5k]
  ------------------
21862|   157k|                    data = unmarshal_one(st, data, array->data + i, flags + 1);
21863|   157k|                }
21864|  84.2M|            } else if (lead == LB_TUPLE) {
  ------------------
  |  Branch (21864:24): [True: 5.16M, False: 79.0M]
  ------------------
21865|       |                /* Tuple */
21866|  5.16M|                Janet *tup = janet_tuple_begin(len);
21867|  5.16M|                int32_t flag = readint(st, &data);
21868|  5.16M|                janet_tuple_flag(tup) |= (int32_t)(((uint32_t) flag) << 16);  /* Avoid left shift of negative value */
  ------------------
  |  | 1806|  5.16M|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1800|  5.16M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
21869|  20.4M|                for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (21869:37): [True: 15.2M, False: 5.16M]
  ------------------
21870|  15.2M|                    data = unmarshal_one(st, data, tup + i, flags + 1);
21871|  15.2M|                }
21872|  5.16M|                *out = janet_wrap_tuple(janet_tuple_end(tup));
  ------------------
  |  |  843|  5.16M|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|  5.16M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  5.16M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  5.16M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21873|  5.16M|                janet_v_push(st->lookup, *out);
  ------------------
  |  |  734|  5.16M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|  5.16M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|  5.16M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|  5.16M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  5.16M|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  742|  5.16M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  5.16M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 0, False: 5.16M]
  |  |  |  |  |  |  |  Branch (745:50): [True: 0, False: 5.16M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|      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))
  |  |  ------------------
  |  |  |  |  743|  5.16M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  5.16M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21874|  79.0M|            } else if (lead == LB_STRUCT || lead == LB_STRUCT_PROTO) {
  ------------------
  |  Branch (21874:24): [True: 48.0k, False: 79.0M]
  |  Branch (21874:45): [True: 0, False: 79.0M]
  ------------------
21875|       |                /* Struct */
21876|  48.0k|                JanetKV *struct_ = janet_struct_begin(len);
21877|  48.0k|                if (lead == LB_STRUCT_PROTO) {
  ------------------
  |  Branch (21877:21): [True: 0, False: 48.0k]
  ------------------
21878|      0|                    Janet proto;
21879|      0|                    data = unmarshal_one(st, data, &proto, flags + 1);
21880|      0|                    janet_asserttype(proto, JANET_STRUCT, st);
21881|      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))
  ------------------
21882|      0|                }
21883|   370k|                for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (21883:37): [True: 322k, False: 48.0k]
  ------------------
21884|   322k|                    Janet key, value;
21885|   322k|                    data = unmarshal_one(st, data, &key, flags + 1);
21886|   322k|                    data = unmarshal_one(st, data, &value, flags + 1);
21887|   322k|                    janet_struct_put(struct_, key, value);
21888|   322k|                }
21889|  48.0k|                *out = janet_wrap_struct(janet_struct_end(struct_));
  ------------------
  |  |  842|  48.0k|#define janet_wrap_struct(s) janet_nanbox_wrap_c((s), JANET_STRUCT)
  |  |  ------------------
  |  |  |  |  828|  48.0k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  48.0k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  48.0k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21890|  48.0k|                janet_v_push(st->lookup, *out);
  ------------------
  |  |  734|  48.0k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|  48.0k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|  48.0k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|  48.0k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  48.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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  742|  48.0k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  48.0k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 0, False: 48.0k]
  |  |  |  |  |  |  |  Branch (745:50): [True: 0, False: 48.0k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|      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))
  |  |  ------------------
  |  |  |  |  743|  48.0k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  48.0k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21891|  79.0M|            } else if (lead == LB_REFERENCE) {
  ------------------
  |  Branch (21891:24): [True: 74.0M, False: 5.01M]
  ------------------
21892|  74.0M|                if (len >= janet_v_count(st->lookup))
  ------------------
  |  |  736|  74.0M|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|  74.0M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  74.0M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 74.0M, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (21892:21): [True: 0, False: 74.0M]
  ------------------
21893|      0|                    janet_panicf("invalid reference %d", len);
21894|  74.0M|                *out = st->lookup[len];
21895|  74.0M|            } else {
21896|       |                /* Table */
21897|  5.01M|                JanetTable *t;
21898|  5.01M|                if (lead == LB_TABLE_WEAKK_PROTO || lead == LB_TABLE_WEAKK) {
  ------------------
  |  Branch (21898:21): [True: 0, False: 5.01M]
  |  Branch (21898:53): [True: 0, False: 5.01M]
  ------------------
21899|      0|                    t = janet_table_weakk(len);
21900|  5.01M|                } else if (lead == LB_TABLE_WEAKV_PROTO || lead == LB_TABLE_WEAKV) {
  ------------------
  |  Branch (21900:28): [True: 0, False: 5.01M]
  |  Branch (21900:60): [True: 0, False: 5.01M]
  ------------------
21901|      0|                    t = janet_table_weakv(len);
21902|  5.01M|                } else if (lead == LB_TABLE_WEAKKV_PROTO || lead == LB_TABLE_WEAKKV) {
  ------------------
  |  Branch (21902:28): [True: 0, False: 5.01M]
  |  Branch (21902:61): [True: 0, False: 5.01M]
  ------------------
21903|      0|                    t = janet_table_weakkv(len);
21904|  5.01M|                } else {
21905|  5.01M|                    t = janet_table(len);
21906|  5.01M|                }
21907|  5.01M|                *out = janet_wrap_table(t);
  ------------------
  |  |  846|  5.01M|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  825|  5.01M|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  5.01M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  5.01M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21908|  5.01M|                janet_v_push(st->lookup, *out);
  ------------------
  |  |  734|  5.01M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|  5.01M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|  5.01M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|  5.01M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  5.01M|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  742|  5.01M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  5.01M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 6.86k, False: 5.01M]
  |  |  |  |  |  |  |  Branch (745:50): [True: 13.7k, False: 4.99M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|  20.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))
  |  |  ------------------
  |  |  |  |  743|  5.01M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  5.01M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21909|  5.01M|                if (lead == LB_TABLE_PROTO || lead == LB_TABLE_WEAKK_PROTO || lead == LB_TABLE_WEAKV_PROTO || lead == LB_TABLE_WEAKKV_PROTO) {
  ------------------
  |  Branch (21909:21): [True: 0, False: 5.01M]
  |  Branch (21909:47): [True: 0, False: 5.01M]
  |  Branch (21909:79): [True: 0, False: 5.01M]
  |  Branch (21909:111): [True: 0, False: 5.01M]
  ------------------
21910|      0|                    Janet proto;
21911|      0|                    data = unmarshal_one(st, data, &proto, flags + 1);
21912|      0|                    janet_asserttype(proto, JANET_TABLE, st);
21913|      0|                    t->proto = janet_unwrap_table(proto);
  ------------------
  |  |  861|      0|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
21914|      0|                }
21915|  30.3M|                for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (21915:37): [True: 25.2M, False: 5.01M]
  ------------------
21916|  25.2M|                    Janet key, value;
21917|  25.2M|                    data = unmarshal_one(st, data, &key, flags + 1);
21918|  25.2M|                    data = unmarshal_one(st, data, &value, flags + 1);
21919|  25.2M|                    janet_table_put(t, key, value);
21920|  25.2M|                }
21921|  5.01M|            }
21922|  84.2M|            return data;
21923|  84.2M|        }
21924|      0|        case LB_UNSAFE_POINTER: {
  ------------------
  |  Branch (21924:9): [True: 0, False: 115M]
  ------------------
21925|      0|            MARSH_EOS(st, data + sizeof(void *));
  ------------------
  |  |21083|      0|#define MARSH_EOS(st, data) do { \
  |  |21084|      0|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21084:9): [True: 0, False: 0]
  |  |  ------------------
  |  |21085|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (21085:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
21926|      0|            data++;
21927|      0|            if (!(flags & JANET_MARSHAL_UNSAFE)) {
  ------------------
  |  | 1911|      0|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (21927:17): [True: 0, False: 0]
  ------------------
21928|      0|                janet_panicf("unsafe flag not given, "
21929|      0|                             "will not unmarshal raw pointer at index %d",
21930|      0|                             (int)(data - st->start));
21931|      0|            }
21932|      0|            union {
21933|      0|                void *ptr;
21934|      0|                uint8_t bytes[sizeof(void *)];
21935|      0|            } u;
21936|      0|            memcpy(u.bytes, data, sizeof(void *));
21937|      0|            data += sizeof(void *);
21938|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21939|      0|            janet_v_push(st->lookup, *out);
  ------------------
  |  |  734|      0|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|      0|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|      0|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|      0|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|      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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  742|      0|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (745:50): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|      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))
  |  |  ------------------
  |  |  |  |  743|      0|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21940|      0|            return data;
21941|      0|        }
21942|      0|#ifdef JANET_EV
21943|      0|        case LB_POINTER_BUFFER: {
  ------------------
  |  Branch (21943:9): [True: 0, False: 115M]
  ------------------
21944|      0|            data++;
21945|      0|            int32_t count = readnat(st, &data);
21946|      0|            int32_t capacity = readnat(st, &data);
21947|      0|            MARSH_EOS(st, data + sizeof(void *));
  ------------------
  |  |21083|      0|#define MARSH_EOS(st, data) do { \
  |  |21084|      0|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21084:9): [True: 0, False: 0]
  |  |  ------------------
  |  |21085|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (21085:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
21948|      0|            union {
21949|      0|                void *ptr;
21950|      0|                uint8_t bytes[sizeof(void *)];
21951|      0|            } u;
21952|      0|            if (!(flags & JANET_MARSHAL_UNSAFE)) {
  ------------------
  |  | 1911|      0|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (21952:17): [True: 0, False: 0]
  ------------------
21953|      0|                janet_panicf("unsafe flag not given, "
21954|      0|                             "will not unmarshal raw pointer at index %d",
21955|      0|                             (int)(data - st->start));
21956|      0|            }
21957|      0|            memcpy(u.bytes, data, sizeof(void *));
21958|      0|            data += sizeof(void *);
21959|      0|            JanetBuffer *buffer = janet_pointer_buffer_unsafe(u.ptr, capacity, count);
21960|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21961|      0|            janet_v_push(st->lookup, *out);
  ------------------
  |  |  734|      0|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|      0|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|      0|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|      0|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|      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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  742|      0|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (745:50): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|      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))
  |  |  ------------------
  |  |  |  |  743|      0|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21962|      0|            return data;
21963|      0|        }
21964|      0|#endif
21965|      0|        case LB_UNSAFE_CFUNCTION: {
  ------------------
  |  Branch (21965:9): [True: 0, False: 115M]
  ------------------
21966|      0|            MARSH_EOS(st, data + sizeof(JanetCFunction));
  ------------------
  |  |21083|      0|#define MARSH_EOS(st, data) do { \
  |  |21084|      0|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21084:9): [True: 0, False: 0]
  |  |  ------------------
  |  |21085|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (21085:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
21967|      0|            data++;
21968|      0|            if (!(flags & JANET_MARSHAL_UNSAFE)) {
  ------------------
  |  | 1911|      0|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (21968:17): [True: 0, False: 0]
  ------------------
21969|      0|                janet_panicf("unsafe flag not given, "
21970|      0|                             "will not unmarshal function pointer at index %d",
21971|      0|                             (int)(data - st->start));
21972|      0|            }
21973|      0|            union {
21974|      0|                JanetCFunction ptr;
21975|      0|                uint8_t bytes[sizeof(JanetCFunction)];
21976|      0|            } u;
21977|      0|            memcpy(u.bytes, data, sizeof(JanetCFunction));
21978|      0|            data += sizeof(JanetCFunction);
21979|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21980|      0|            janet_v_push(st->lookup, *out);
  ------------------
  |  |  734|      0|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|      0|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|      0|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|      0|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|      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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  742|      0|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (745:50): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|      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))
  |  |  ------------------
  |  |  |  |  743|      0|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21981|      0|            return data;
21982|      0|        }
21983|      0|#ifdef JANET_EV
21984|      0|        case LB_THREADED_ABSTRACT: {
  ------------------
  |  Branch (21984:9): [True: 0, False: 115M]
  ------------------
21985|      0|            MARSH_EOS(st, data + sizeof(void *));
  ------------------
  |  |21083|      0|#define MARSH_EOS(st, data) do { \
  |  |21084|      0|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21084:9): [True: 0, False: 0]
  |  |  ------------------
  |  |21085|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (21085:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
21986|      0|            data++;
21987|      0|            if (!(flags & JANET_MARSHAL_UNSAFE)) {
  ------------------
  |  | 1911|      0|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (21987:17): [True: 0, False: 0]
  ------------------
21988|      0|                janet_panicf("unsafe flag not given, "
21989|      0|                             "will not unmarshal threaded abstract pointer at index %d",
21990|      0|                             (int)(data - st->start));
21991|      0|            }
21992|      0|            union {
21993|      0|                void *ptr;
21994|      0|                uint8_t bytes[sizeof(void *)];
21995|      0|            } u;
21996|      0|            memcpy(u.bytes, data, sizeof(void *));
21997|      0|            data += sizeof(void *);
21998|       |
21999|      0|            if (flags & JANET_MARSHAL_DECREF) {
  ------------------
  |  |  387|      0|#define JANET_MARSHAL_DECREF 0x40000
  ------------------
  |  Branch (21999:17): [True: 0, False: 0]
  ------------------
22000|       |                /* Decrement immediately and don't bother putting into heap */
22001|      0|                janet_abstract_decref(u.ptr);
22002|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
22003|      0|            } else {
22004|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
22005|      0|                Janet check = janet_table_get(&janet_vm.threaded_abstracts, *out);
22006|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
22007|       |                    /* Transfers reference from threaded channel buffer to current heap */
22008|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
22009|      0|                } else {
22010|       |                    /* Heap reference already accounted for, remove threaded channel reference. */
22011|      0|                    janet_abstract_decref(u.ptr);
22012|      0|                }
22013|      0|            }
22014|       |
22015|      0|            janet_v_push(st->lookup, *out);
  ------------------
  |  |  734|      0|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|      0|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|      0|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|      0|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|      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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  742|      0|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (745:50): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|      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))
  |  |  ------------------
  |  |  |  |  743|      0|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
22016|      0|            return data;
22017|      0|        }
22018|      0|#endif
22019|      0|        default: {
  ------------------
  |  Branch (22019:9): [True: 0, False: 115M]
  ------------------
22020|      0|            janet_panicf("unknown byte %x at index %d",
22021|      0|                         *data,
22022|      0|                         (int)(data - st->start));
22023|      0|            return NULL;
22024|      0|        }
22025|   115M|    }
22026|   115M|}
janet.c:readnat:
21120|   143M|static int32_t readnat(UnmarshalState *st, const uint8_t **atdata) {
21121|   143M|    int32_t ret = readint(st, atdata);
21122|   143M|    if (ret < 0) {
  ------------------
  |  Branch (21122:9): [True: 0, False: 143M]
  ------------------
21123|      0|        janet_panicf("expected integer >= 0, got %d", ret);
21124|      0|    }
21125|   143M|    return ret;
21126|   143M|}
janet.c:unmarshal_one_def:
21259|  3.71M|    int flags) {
21260|  3.71M|    MARSH_STACKCHECK;
  ------------------
  |  |20555|  3.71M|#define MARSH_STACKCHECK if ((flags & 0xFFFF) > JANET_RECURSION_GUARD) janet_panic("stack overflow")
  |  |  ------------------
  |  |  |  |  296|  3.71M|#define JANET_RECURSION_GUARD 1024
  |  |  ------------------
  |  |  |  Branch (20555:30): [True: 0, False: 3.71M]
  |  |  ------------------
  ------------------
21261|  3.71M|    MARSH_EOS(st, data);
  ------------------
  |  |21083|  3.71M|#define MARSH_EOS(st, data) do { \
  |  |21084|  3.71M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21084:9): [True: 0, False: 3.71M]
  |  |  ------------------
  |  |21085|  3.71M|} while (0)
  |  |  ------------------
  |  |  |  Branch (21085:10): [Folded, False: 3.71M]
  |  |  ------------------
  ------------------
21262|  3.71M|    if (*data == LB_FUNCDEF_REF) {
  ------------------
  |  Branch (21262:9): [True: 27.4k, False: 3.68M]
  ------------------
21263|  27.4k|        data++;
21264|  27.4k|        int32_t index = readint(st, &data);
21265|  27.4k|        if (index < 0 || index >= janet_v_count(st->lookup_defs) || NULL == st->lookup_defs[index])
  ------------------
  |  |  736|  54.9k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|  27.4k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  27.4k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 27.4k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (21265:13): [True: 0, False: 27.4k]
  |  Branch (21265:26): [True: 0, False: 27.4k]
  |  Branch (21265:69): [True: 0, False: 27.4k]
  ------------------
21266|      0|            janet_panicf("invalid funcdef reference %d", index);
21267|  27.4k|        *out = st->lookup_defs[index];
21268|  3.68M|    } else {
21269|       |        /* Initialize with values that will not break garbage collection
21270|       |         * if unmarshalling fails. */
21271|  3.68M|        JanetFuncDef *def = janet_gcalloc(JANET_MEMORY_FUNCDEF, sizeof(JanetFuncDef));
21272|  3.68M|        def->environments_length = 0;
21273|  3.68M|        def->defs_length = 0;
21274|  3.68M|        def->constants_length = 0;
21275|  3.68M|        def->bytecode_length = 0;
21276|  3.68M|        def->name = NULL;
21277|  3.68M|        def->source = NULL;
21278|  3.68M|        def->closure_bitset = NULL;
21279|  3.68M|        def->defs = NULL;
21280|  3.68M|        def->environments = NULL;
21281|  3.68M|        def->constants = NULL;
21282|  3.68M|        def->bytecode = NULL;
21283|  3.68M|        def->sourcemap = NULL;
21284|  3.68M|        def->symbolmap = NULL;
21285|  3.68M|        def->symbolmap_length = 0;
21286|  3.68M|        def->named_args_count = 0;
21287|       |        /* Not referenceable until fully unmarshalled */
21288|  3.68M|        int32_t def_index = janet_v_count(st->lookup_defs);
  ------------------
  |  |  736|  3.68M|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|  3.67M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  3.67M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 3.67M, False: 6.86k]
  |  |  ------------------
  ------------------
21289|  3.68M|        janet_v_push(st->lookup_defs, NULL);
  ------------------
  |  |  734|  3.68M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|  3.68M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|  3.68M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|  3.67M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  3.67M|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  742|  3.67M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  3.67M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 6.86k, False: 3.67M]
  |  |  |  |  |  |  |  Branch (745:50): [True: 68.6k, False: 3.61M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|  75.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))
  |  |  ------------------
  |  |  |  |  743|  3.68M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  3.68M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21290|       |
21291|       |        /* Set default lengths to zero */
21292|  3.68M|        int32_t bytecode_length = 0;
21293|  3.68M|        int32_t constants_length = 0;
21294|  3.68M|        int32_t environments_length = 0;
21295|  3.68M|        int32_t defs_length = 0;
21296|  3.68M|        int32_t symbolmap_length = 0;
21297|       |
21298|       |        /* Read flags and other fixed values */
21299|  3.68M|        def->flags = readint(st, &data);
21300|  3.68M|        def->slotcount = readnat(st, &data);
21301|  3.68M|        def->arity = readnat(st, &data);
21302|  3.68M|        def->min_arity = readnat(st, &data);
21303|  3.68M|        def->max_arity = readnat(st, &data);
21304|       |
21305|       |        /* Read some lengths */
21306|  3.68M|        constants_length = readnat(st, &data);
21307|  3.68M|        bytecode_length = readnat(st, &data);
21308|  3.68M|        if (def->flags & JANET_FUNCDEF_FLAG_NAMEDARGS)
  ------------------
  |  | 1107|  3.68M|#define JANET_FUNCDEF_FLAG_NAMEDARGS 0x4000000
  ------------------
  |  Branch (21308:13): [True: 13.7k, False: 3.67M]
  ------------------
21309|  13.7k|            def->named_args_count = readnat(st, &data);
21310|  3.68M|        if (def->flags & JANET_FUNCDEF_FLAG_HASENVS)
  ------------------
  |  | 1103|  3.68M|#define JANET_FUNCDEF_FLAG_HASENVS 0x400000
  ------------------
  |  Branch (21310:13): [True: 3.45M, False: 226k]
  ------------------
21311|  3.45M|            environments_length = readnat(st, &data);
21312|  3.68M|        if (def->flags & JANET_FUNCDEF_FLAG_HASDEFS)
  ------------------
  |  | 1102|  3.68M|#define JANET_FUNCDEF_FLAG_HASDEFS 0x200000
  ------------------
  |  Branch (21312:13): [True: 494k, False: 3.19M]
  ------------------
21313|   494k|            defs_length = readnat(st, &data);
21314|  3.68M|        if (def->flags & JANET_FUNCDEF_FLAG_HASSYMBOLMAP)
  ------------------
  |  | 1099|  3.68M|#define JANET_FUNCDEF_FLAG_HASSYMBOLMAP 0x40000
  ------------------
  |  Branch (21314:13): [True: 3.41M, False: 274k]
  ------------------
21315|  3.41M|            symbolmap_length = readnat(st, &data);
21316|       |
21317|       |        /* Check name and source (optional) */
21318|  3.68M|        if (def->flags & JANET_FUNCDEF_FLAG_HASNAME) {
  ------------------
  |  | 1100|  3.68M|#define JANET_FUNCDEF_FLAG_HASNAME 0x80000
  ------------------
  |  Branch (21318:13): [True: 3.45M, False: 233k]
  ------------------
21319|  3.45M|            Janet x;
21320|  3.45M|            data = unmarshal_one(st, data, &x, flags + 1);
21321|  3.45M|            janet_asserttype(x, JANET_STRING, st);
21322|  3.45M|            def->name = janet_unwrap_string(x);
  ------------------
  |  |  863|  3.45M|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
21323|  3.45M|        }
21324|  3.68M|        if (def->flags & JANET_FUNCDEF_FLAG_HASSOURCE) {
  ------------------
  |  | 1101|  3.68M|#define JANET_FUNCDEF_FLAG_HASSOURCE 0x100000
  ------------------
  |  Branch (21324:13): [True: 3.45M, False: 226k]
  ------------------
21325|  3.45M|            Janet x;
21326|  3.45M|            data = unmarshal_one(st, data, &x, flags + 1);
21327|  3.45M|            janet_asserttype(x, JANET_STRING, st);
21328|  3.45M|            def->source = janet_unwrap_string(x);
  ------------------
  |  |  863|  3.45M|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
21329|  3.45M|        }
21330|       |
21331|       |        /* Unmarshal constants */
21332|  3.68M|        if (constants_length) {
  ------------------
  |  Branch (21332:13): [True: 2.81M, False: 871k]
  ------------------
21333|  2.81M|            def->constants = array_allocate(sizeof(Janet), constants_length);
21334|  2.81M|            if (!def->constants) {
  ------------------
  |  Branch (21334:17): [True: 0, False: 2.81M]
  ------------------
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|  18.4M|            for (int32_t i = 0; i < constants_length; i++)
  ------------------
  |  Branch (21337:33): [True: 15.6M, False: 2.81M]
  ------------------
21338|  15.6M|                data = unmarshal_one(st, data, def->constants + i, flags + 1);
21339|  2.81M|        } else {
21340|   871k|            def->constants = NULL;
21341|   871k|        }
21342|  3.68M|        def->constants_length = constants_length;
21343|       |
21344|       |        /* Unmarshal symbol map, if needed */
21345|  3.68M|        if (def->flags & JANET_FUNCDEF_FLAG_HASSYMBOLMAP) {
  ------------------
  |  | 1099|  3.68M|#define JANET_FUNCDEF_FLAG_HASSYMBOLMAP 0x40000
  ------------------
  |  Branch (21345:13): [True: 3.41M, False: 274k]
  ------------------
21346|  3.41M|            def->symbolmap = array_allocate(sizeof(JanetSymbolMap), symbolmap_length);
21347|  3.41M|            if (def->symbolmap == NULL) {
  ------------------
  |  Branch (21347:17): [True: 0, False: 3.41M]
  ------------------
21348|      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]
  |  |  ------------------
  ------------------
21349|      0|            }
21350|  38.3M|            for (int32_t i = 0; i < symbolmap_length; i++) {
  ------------------
  |  Branch (21350:33): [True: 34.9M, False: 3.41M]
  ------------------
21351|  34.9M|                def->symbolmap[i].birth_pc = (uint32_t) readint(st, &data);
21352|  34.9M|                def->symbolmap[i].death_pc = (uint32_t) readint(st, &data);
21353|  34.9M|                def->symbolmap[i].slot_index = (uint32_t) readint(st, &data);
21354|  34.9M|                Janet value;
21355|  34.9M|                data = unmarshal_one(st, data, &value, flags + 1);
21356|  34.9M|                if (!janet_checktype(value, JANET_SYMBOL)) {
  ------------------
  |  |  806|  34.9M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 34.9M]
  |  |  ------------------
  |  |  807|  34.9M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  34.9M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  34.9M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  34.9M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  34.9M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  34.9M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (21356:21): [True: 0, False: 34.9M]
  ------------------
21357|      0|                    janet_panicf("corrupted symbolmap when unmarshalling debug info, got %v", value);
21358|      0|                }
21359|  34.9M|                def->symbolmap[i].symbol = janet_unwrap_symbol(value);
  ------------------
  |  |  864|  34.9M|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
21360|  34.9M|            }
21361|  3.41M|            def->symbolmap_length = (uint32_t) symbolmap_length;
21362|  3.41M|        }
21363|       |
21364|       |        /* Unmarshal bytecode */
21365|  3.68M|        def->bytecode = array_allocate(sizeof(uint32_t), bytecode_length);
21366|  3.68M|        if (!def->bytecode) {
  ------------------
  |  Branch (21366:13): [True: 0, False: 3.68M]
  ------------------
21367|      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]
  |  |  ------------------
  ------------------
21368|      0|        }
21369|  3.68M|        data = janet_unmarshal_u32s(st, data, def->bytecode, bytecode_length);
21370|  3.68M|        def->bytecode_length = bytecode_length;
21371|       |
21372|       |        /* Unmarshal environments */
21373|  3.68M|        if (def->flags & JANET_FUNCDEF_FLAG_HASENVS) {
  ------------------
  |  | 1103|  3.68M|#define JANET_FUNCDEF_FLAG_HASENVS 0x400000
  ------------------
  |  Branch (21373:13): [True: 3.45M, False: 226k]
  ------------------
21374|  3.45M|            def->environments = janet_calloc(1, sizeof(int32_t) * (size_t) environments_length);
  ------------------
  |  | 2412|  3.45M|#define janet_calloc(X, Y) calloc((X), (Y))
  ------------------
21375|  3.45M|            if (!def->environments) {
  ------------------
  |  Branch (21375:17): [True: 0, False: 3.45M]
  ------------------
21376|      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]
  |  |  ------------------
  ------------------
21377|      0|            }
21378|  4.82M|            for (int32_t i = 0; i < environments_length; i++) {
  ------------------
  |  Branch (21378:33): [True: 1.36M, False: 3.45M]
  ------------------
21379|  1.36M|                def->environments[i] = readint(st, &data);
21380|  1.36M|            }
21381|  3.45M|        } else {
21382|   226k|            def->environments = NULL;
21383|   226k|        }
21384|  3.68M|        def->environments_length = environments_length;
21385|       |
21386|       |        /* Unmarshal sub funcdefs */
21387|  3.68M|        if (def->flags & JANET_FUNCDEF_FLAG_HASDEFS) {
  ------------------
  |  | 1102|  3.68M|#define JANET_FUNCDEF_FLAG_HASDEFS 0x200000
  ------------------
  |  Branch (21387:13): [True: 494k, False: 3.19M]
  ------------------
21388|   494k|            def->defs = janet_calloc(1, sizeof(JanetFuncDef *) * (size_t) defs_length);
  ------------------
  |  | 2412|   494k|#define janet_calloc(X, Y) calloc((X), (Y))
  ------------------
21389|   494k|            if (!def->defs) {
  ------------------
  |  Branch (21389:17): [True: 0, False: 494k]
  ------------------
21390|      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]
  |  |  ------------------
  ------------------
21391|      0|            }
21392|  1.57M|            for (int32_t i = 0; i < defs_length; i++) {
  ------------------
  |  Branch (21392:33): [True: 1.08M, False: 494k]
  ------------------
21393|  1.08M|                data = unmarshal_one_def(st, data, def->defs + i, flags + 1);
21394|  1.08M|            }
21395|  3.19M|        } else {
21396|  3.19M|            def->defs = NULL;
21397|  3.19M|        }
21398|  3.68M|        def->defs_length = defs_length;
21399|       |
21400|       |        /* Unmarshal source maps if needed */
21401|  3.68M|        if (def->flags & JANET_FUNCDEF_FLAG_HASSOURCEMAP) {
  ------------------
  |  | 1104|  3.68M|#define JANET_FUNCDEF_FLAG_HASSOURCEMAP 0x800000
  ------------------
  |  Branch (21401:13): [True: 3.45M, False: 226k]
  ------------------
21402|  3.45M|            int32_t current = 0;
21403|  3.45M|            def->sourcemap = array_allocate(sizeof(JanetSourceMapping), bytecode_length);
21404|  3.45M|            if (!def->sourcemap) {
  ------------------
  |  Branch (21404:17): [True: 0, False: 3.45M]
  ------------------
21405|      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]
  |  |  ------------------
  ------------------
21406|      0|            }
21407|   102M|            for (int32_t i = 0; i < bytecode_length; i++) {
  ------------------
  |  Branch (21407:33): [True: 99.2M, False: 3.45M]
  ------------------
21408|  99.2M|                current += readint(st, &data);
21409|  99.2M|                def->sourcemap[i].line = current;
21410|  99.2M|                def->sourcemap[i].column = readint(st, &data);
21411|  99.2M|            }
21412|  3.45M|        } else {
21413|   226k|            def->sourcemap = NULL;
21414|   226k|        }
21415|       |
21416|       |        /* Unmarshal closure bitset if needed */
21417|  3.68M|        if (def->flags & JANET_FUNCDEF_FLAG_HASCLOBITSET) {
  ------------------
  |  | 1106|  3.68M|#define JANET_FUNCDEF_FLAG_HASCLOBITSET 0x2000000
  ------------------
  |  Branch (21417:13): [True: 418k, False: 3.26M]
  ------------------
21418|   418k|            int32_t n = ((def->slotcount - 1) >> 5) + 1;
21419|   418k|            def->closure_bitset = array_allocate(sizeof(uint32_t), n);
21420|   418k|            if (NULL == def->closure_bitset) {
  ------------------
  |  Branch (21420:17): [True: 0, False: 418k]
  ------------------
21421|      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]
  |  |  ------------------
  ------------------
21422|      0|            }
21423|   418k|            data = janet_unmarshal_u32s(st, data, def->closure_bitset, n);
21424|   418k|        }
21425|       |
21426|       |        /* Validate */
21427|  3.68M|        int status;
21428|  3.68M|        if ((status = janet_verify(def))) {
  ------------------
  |  Branch (21428:13): [True: 0, False: 3.68M]
  ------------------
21429|      0|            janet_panicf("funcdef has invalid bytecode: %d", status);
21430|      0|        }
21431|       |
21432|       |        /* Set def */
21433|  3.68M|        st->lookup_defs[def_index] = def;
21434|  3.68M|        *out = def;
21435|  3.68M|    }
21436|  3.71M|    return data;
21437|  3.71M|}
janet.c:janet_unmarshal_u32s:
21241|  4.10M|static const uint8_t *janet_unmarshal_u32s(UnmarshalState *st, const uint8_t *data, uint32_t *into, int32_t n) {
21242|   106M|    for (int32_t i = 0; i < n; i++) {
  ------------------
  |  Branch (21242:25): [True: 102M, False: 4.10M]
  ------------------
21243|   102M|        MARSH_EOS(st, data + 3);
  ------------------
  |  |21083|   102M|#define MARSH_EOS(st, data) do { \
  |  |21084|   102M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21084:9): [True: 0, False: 102M]
  |  |  ------------------
  |  |21085|   102M|} while (0)
  |  |  ------------------
  |  |  |  Branch (21085:10): [Folded, False: 102M]
  |  |  ------------------
  ------------------
21244|   102M|        into[i] =
21245|   102M|            (uint32_t)(data[0]) |
21246|   102M|            ((uint32_t)(data[1]) << 8) |
21247|   102M|            ((uint32_t)(data[2]) << 16) |
21248|   102M|            ((uint32_t)(data[3]) << 24);
21249|   102M|        data += 4;
21250|   102M|    }
21251|  4.10M|    return data;
21252|  4.10M|}
janet.c:unmarshal_one_env:
21197|   295k|    int flags) {
21198|   295k|    MARSH_EOS(st, data);
  ------------------
  |  |21083|   295k|#define MARSH_EOS(st, data) do { \
  |  |21084|   295k|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21084:9): [True: 0, False: 295k]
  |  |  ------------------
  |  |21085|   295k|} while (0)
  |  |  ------------------
  |  |  |  Branch (21085:10): [Folded, False: 295k]
  |  |  ------------------
  ------------------
21199|   295k|    if (*data == LB_FUNCENV_REF) {
  ------------------
  |  Branch (21199:9): [True: 240k, False: 54.9k]
  ------------------
21200|   240k|        data++;
21201|   240k|        int32_t index = readint(st, &data);
21202|   240k|        if (index < 0 || index >= janet_v_count(st->lookup_envs))
  ------------------
  |  |  736|   240k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|   240k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|   240k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 240k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (21202:13): [True: 0, False: 240k]
  |  Branch (21202:26): [True: 0, False: 240k]
  ------------------
21203|      0|            janet_panicf("invalid funcenv reference %d", index);
21204|   240k|        *out = st->lookup_envs[index];
21205|   240k|    } else {
21206|  54.9k|        JanetFuncEnv *env = janet_gcalloc(JANET_MEMORY_FUNCENV, sizeof(JanetFuncEnv));
21207|  54.9k|        env->length = 0;
21208|  54.9k|        env->offset = 0;
21209|  54.9k|        env->as.values = NULL;
21210|  54.9k|        janet_v_push(st->lookup_envs, env);
  ------------------
  |  |  734|  54.9k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|  54.9k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|  54.9k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|  48.0k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  48.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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  742|  48.0k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  48.0k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 6.86k, False: 48.0k]
  |  |  |  |  |  |  |  Branch (745:50): [True: 27.4k, False: 20.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|  34.3k|#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))
  |  |  ------------------
  |  |  |  |  743|  54.9k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  54.9k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21211|  54.9k|        int32_t offset = readnat(st, &data);
21212|  54.9k|        int32_t length = readnat(st, &data);
21213|  54.9k|        if (offset > 0) {
  ------------------
  |  Branch (21213:13): [True: 0, False: 54.9k]
  ------------------
21214|      0|            Janet fiberv;
21215|       |            /* On stack variant */
21216|      0|            data = unmarshal_one(st, data, &fiberv, flags);
21217|      0|            janet_asserttype(fiberv, JANET_FIBER, st);
21218|      0|            env->as.fiber = janet_unwrap_fiber(fiberv);
  ------------------
  |  |  859|      0|#define janet_unwrap_fiber(x) ((JanetFiber *)janet_nanbox_to_pointer(x))
  ------------------
21219|       |            /* Negative offset indicates untrusted input */
21220|      0|            env->offset = -offset;
21221|  54.9k|        } else {
21222|       |            /* Off stack variant */
21223|  54.9k|            if (length == 0) {
  ------------------
  |  Branch (21223:17): [True: 0, False: 54.9k]
  ------------------
21224|      0|                janet_panic("invalid funcenv length");
21225|      0|            }
21226|  54.9k|            env->as.values = array_allocate(sizeof(Janet), length);
21227|  54.9k|            if (!env->as.values) {
  ------------------
  |  Branch (21227:17): [True: 0, False: 54.9k]
  ------------------
21228|      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]
  |  |  ------------------
  ------------------
21229|      0|            }
21230|  54.9k|            env->offset = 0;
21231|   679k|            for (int32_t i = 0; i < length; i++)
  ------------------
  |  Branch (21231:33): [True: 624k, False: 54.9k]
  ------------------
21232|   624k|                data = unmarshal_one(st, data, env->as.values + i, flags);
21233|  54.9k|        }
21234|  54.9k|        env->length = length;
21235|  54.9k|        *out = env;
21236|  54.9k|    }
21237|   295k|    return data;
21238|   295k|}
janet.c:janet_asserttype:
21159|  6.91M|static void janet_asserttype(Janet x, JanetType t, UnmarshalState *st) {
21160|  6.91M|    if (!janet_checktype(x, t)) {
  ------------------
  |  |  806|  6.91M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [True: 0, False: 6.91M]
  |  |  ------------------
  |  |  807|  6.91M|        ? 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.91M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  6.91M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  6.91M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  6.91M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  6.91M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (21160:9): [True: 0, False: 6.91M]
  ------------------
21161|       |#ifdef JANET_MARSHAL_DEBUG
21162|       |        dump_reference_table(st);
21163|       |#else
21164|      0|        (void) st;
21165|      0|#endif
21166|      0|        janet_panicf("expected type %T, got %v", 1 << t, x);
21167|      0|    }
21168|  6.91M|}
janet.c:janet_parser_checkdead:
27711|   263k|static void janet_parser_checkdead(JanetParser *parser) {
27712|   263k|    if (parser->flag) janet_panic("parser is dead, cannot consume");
  ------------------
  |  Branch (27712:9): [True: 0, False: 263k]
  ------------------
27713|   263k|    if (parser->error) janet_panic("parser has unchecked error, cannot consume");
  ------------------
  |  Branch (27713:9): [True: 0, False: 263k]
  ------------------
27714|   263k|}
janet.c:delim_error:
27221|  1.49k|static void delim_error(JanetParser *parser, size_t stack_index, char c, const char *msg) {
27222|  1.49k|    JanetParseState *s = parser->states + stack_index;
27223|  1.49k|    JanetBuffer *buffer = janet_buffer(40);
27224|  1.49k|    if (msg) {
  ------------------
  |  Branch (27224:9): [True: 1.49k, False: 0]
  ------------------
27225|  1.49k|        janet_buffer_push_cstring(buffer, msg);
27226|  1.49k|    }
27227|  1.49k|    if (c) {
  ------------------
  |  Branch (27227:9): [True: 77, False: 1.42k]
  ------------------
27228|     77|        janet_buffer_push_u8(buffer, c);
27229|     77|    }
27230|  1.49k|    if (stack_index > 0) {
  ------------------
  |  Branch (27230:9): [True: 1.44k, False: 55]
  ------------------
27231|  1.44k|        janet_buffer_push_cstring(buffer, ", ");
27232|  1.44k|        if (s->flags & PFLAG_PARENS) {
  ------------------
  |  |27157|  1.44k|#define PFLAG_PARENS 0x400
  ------------------
  |  Branch (27232:13): [True: 92, False: 1.35k]
  ------------------
27233|     92|            janet_buffer_push_u8(buffer, '(');
27234|  1.35k|        } else if (s->flags & PFLAG_SQRBRACKETS) {
  ------------------
  |  |27158|  1.35k|#define PFLAG_SQRBRACKETS 0x800
  ------------------
  |  Branch (27234:20): [True: 52, False: 1.29k]
  ------------------
27235|     52|            janet_buffer_push_u8(buffer, '[');
27236|  1.29k|        } else if (s->flags & PFLAG_CURLYBRACKETS) {
  ------------------
  |  |27159|  1.29k|#define PFLAG_CURLYBRACKETS 0x1000
  ------------------
  |  Branch (27236:20): [True: 122, False: 1.17k]
  ------------------
27237|    122|            janet_buffer_push_u8(buffer, '{');
27238|  1.17k|        } else if (s->flags & PFLAG_STRING) {
  ------------------
  |  |27160|  1.17k|#define PFLAG_STRING 0x2000
  ------------------
  |  Branch (27238:20): [True: 369, False: 807]
  ------------------
27239|    369|            janet_buffer_push_u8(buffer, '"');
27240|    807|        } else if (s->flags & PFLAG_LONGSTRING) {
  ------------------
  |  |27161|    807|#define PFLAG_LONGSTRING 0x4000
  ------------------
  |  Branch (27240:20): [True: 160, False: 647]
  ------------------
27241|    160|            int32_t i;
27242|  2.49k|            for (i = 0; i < s->argn; i++) {
  ------------------
  |  Branch (27242:25): [True: 2.33k, False: 160]
  ------------------
27243|  2.33k|                janet_buffer_push_u8(buffer, '`');
27244|  2.33k|            }
27245|    160|        }
27246|  1.44k|        janet_formatb(buffer, " opened at line %d, column %d", (int32_t) s->line, (int32_t) s->column);
27247|  1.44k|    }
27248|  1.49k|    parser->error = (const char *) janet_string(buffer->data, buffer->count);
27249|  1.49k|    parser->flag |= JANET_PARSER_GENERATED_ERROR;
  ------------------
  |  |27051|  1.49k|#define JANET_PARSER_GENERATED_ERROR 0x2
  ------------------
27250|  1.49k|}
janet.c:pushstate:
27167|   106k|static void pushstate(JanetParser *p, Consumer consumer, int flags) {
27168|   106k|    JanetParseState s;
27169|   106k|    s.counter = 0;
27170|   106k|    s.argn = 0;
27171|   106k|    s.flags = flags;
27172|   106k|    s.consumer = consumer;
27173|   106k|    s.line = p->line;
27174|   106k|    s.column = p->column;
27175|   106k|    _pushstate(p, s);
27176|   106k|}
janet.c:root:
27638|   142k|static int root(JanetParser *p, JanetParseState *state, uint8_t c) {
27639|   142k|    switch (c) {
27640|  68.2k|        default:
  ------------------
  |  Branch (27640:9): [True: 68.2k, False: 74.4k]
  ------------------
27641|  68.2k|            if (is_whitespace(c)) return 1;
  ------------------
  |  Branch (27641:17): [True: 32.0k, False: 36.1k]
  ------------------
27642|  36.1k|            if (!janet_is_symbol_char(c)) {
  ------------------
  |  Branch (27642:17): [True: 134, False: 36.0k]
  ------------------
27643|    134|                p->error = "unexpected character";
27644|    134|                return 1;
27645|    134|            }
27646|  36.0k|            pushstate(p, tokenchar, PFLAG_TOKEN);
  ------------------
  |  |27165|  36.0k|#define PFLAG_TOKEN 0x40000
  ------------------
27647|  36.0k|            return 0;
27648|  22.9k|        case '\'':
  ------------------
  |  Branch (27648:9): [True: 22.9k, False: 119k]
  ------------------
27649|  26.7k|        case ',':
  ------------------
  |  Branch (27649:9): [True: 3.80k, False: 138k]
  ------------------
27650|  30.5k|        case ';':
  ------------------
  |  Branch (27650:9): [True: 3.81k, False: 138k]
  ------------------
27651|  33.5k|        case '~':
  ------------------
  |  Branch (27651:9): [True: 2.99k, False: 139k]
  ------------------
27652|  37.0k|        case '|':
  ------------------
  |  Branch (27652:9): [True: 3.48k, False: 139k]
  ------------------
27653|  37.0k|            pushstate(p, root, PFLAG_READERMAC | c);
  ------------------
  |  |27162|  37.0k|#define PFLAG_READERMAC 0x8000
  ------------------
27654|  37.0k|            return 1;
27655|  3.11k|        case '"':
  ------------------
  |  Branch (27655:9): [True: 3.11k, False: 139k]
  ------------------
27656|  3.11k|            pushstate(p, stringchar, PFLAG_STRING);
  ------------------
  |  |27160|  3.11k|#define PFLAG_STRING 0x2000
  ------------------
27657|  3.11k|            return 1;
27658|    382|        case '#':
  ------------------
  |  Branch (27658:9): [True: 382, False: 142k]
  ------------------
27659|    382|            pushstate(p, comment, PFLAG_COMMENT);
  ------------------
  |  |27164|    382|#define PFLAG_COMMENT 0x20000
  ------------------
27660|    382|            return 1;
27661|  3.27k|        case '@':
  ------------------
  |  Branch (27661:9): [True: 3.27k, False: 139k]
  ------------------
27662|  3.27k|            pushstate(p, atsign, PFLAG_ATSYM);
  ------------------
  |  |27163|  3.27k|#define PFLAG_ATSYM 0x10000
  ------------------
27663|  3.27k|            return 1;
27664|  1.61k|        case '`':
  ------------------
  |  Branch (27664:9): [True: 1.61k, False: 141k]
  ------------------
27665|  1.61k|            pushstate(p, longstring, PFLAG_LONGSTRING);
  ------------------
  |  |27161|  1.61k|#define PFLAG_LONGSTRING 0x4000
  ------------------
27666|  1.61k|            return 1;
27667|  6.37k|        case ')':
  ------------------
  |  Branch (27667:9): [True: 6.37k, False: 136k]
  ------------------
27668|  7.68k|        case ']':
  ------------------
  |  Branch (27668:9): [True: 1.31k, False: 141k]
  ------------------
27669|  13.6k|        case '}': {
  ------------------
  |  Branch (27669:9): [True: 5.98k, False: 136k]
  ------------------
27670|  13.6k|            Janet ds;
27671|  13.6k|            if (p->statecount == 1) {
  ------------------
  |  Branch (27671:17): [True: 55, False: 13.6k]
  ------------------
27672|     55|                delim_error(p, 0, c, "unexpected closing delimiter ");
27673|     55|                return 1;
27674|     55|            }
27675|  13.6k|            if ((c == ')' && (state->flags & PFLAG_PARENS)) ||
  ------------------
  |  |27157|  6.35k|#define PFLAG_PARENS 0x400
  ------------------
  |  Branch (27675:18): [True: 6.35k, False: 7.25k]
  |  Branch (27675:30): [True: 6.35k, False: 5]
  ------------------
27676|  7.64k|                    (c == ']' && (state->flags & PFLAG_SQRBRACKETS))) {
  ------------------
  |  |27158|  1.30k|#define PFLAG_SQRBRACKETS 0x800
  ------------------
  |  Branch (27676:22): [True: 1.30k, False: 5.96k]
  |  Branch (27676:34): [True: 1.29k, False: 10]
  ------------------
27677|  7.64k|                if (state->flags & PFLAG_ATSYM) {
  ------------------
  |  |27163|  7.64k|#define PFLAG_ATSYM 0x10000
  ------------------
  |  Branch (27677:21): [True: 648, False: 6.99k]
  ------------------
27678|    648|                    ds = close_array(p, state);
27679|  6.99k|                } else {
27680|  6.99k|                    ds = close_tuple(p, state, c == ']' ? JANET_TUPLE_FLAG_BRACKETCTOR : 0);
  ------------------
  |  | 1798|    756|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
  |  Branch (27680:48): [True: 756, False: 6.23k]
  ------------------
27681|  6.99k|                }
27682|  7.64k|            } else if (c == '}' && (state->flags & PFLAG_CURLYBRACKETS)) {
  ------------------
  |  |27159|  5.95k|#define PFLAG_CURLYBRACKETS 0x1000
  ------------------
  |  Branch (27682:24): [True: 5.95k, False: 15]
  |  Branch (27682:36): [True: 5.95k, False: 7]
  ------------------
27683|  5.95k|                if (state->argn & 1) {
  ------------------
  |  Branch (27683:21): [True: 10, False: 5.94k]
  ------------------
27684|     10|                    p->error = "struct and table literals expect even number of arguments";
27685|     10|                    return 1;
27686|     10|                }
27687|  5.94k|                if (state->flags & PFLAG_ATSYM) {
  ------------------
  |  |27163|  5.94k|#define PFLAG_ATSYM 0x10000
  ------------------
  |  Branch (27687:21): [True: 1.22k, False: 4.71k]
  ------------------
27688|  1.22k|                    ds = close_table(p, state);
27689|  4.71k|                } else {
27690|  4.71k|                    ds = close_struct(p, state);
27691|  4.71k|                }
27692|  5.94k|            } else {
27693|     22|                delim_error(p, p->statecount - 1, c, "mismatched delimiter ");
27694|     22|                return 1;
27695|     22|            }
27696|  13.5k|            popstate(p, ds);
27697|  13.5k|        }
27698|      0|        return 1;
27699|  7.67k|        case '(':
  ------------------
  |  Branch (27699:9): [True: 7.67k, False: 135k]
  ------------------
27700|  7.67k|            pushstate(p, root, PFLAG_CONTAINER | PFLAG_PARENS);
  ------------------
  |  |27155|  7.67k|#define PFLAG_CONTAINER 0x100
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_PARENS);
  ------------------
  |  |27157|  7.67k|#define PFLAG_PARENS 0x400
  ------------------
27701|  7.67k|            return 1;
27702|  1.58k|        case '[':
  ------------------
  |  Branch (27702:9): [True: 1.58k, False: 141k]
  ------------------
27703|  1.58k|            pushstate(p, root, PFLAG_CONTAINER | PFLAG_SQRBRACKETS);
  ------------------
  |  |27155|  1.58k|#define PFLAG_CONTAINER 0x100
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_SQRBRACKETS);
  ------------------
  |  |27158|  1.58k|#define PFLAG_SQRBRACKETS 0x800
  ------------------
27704|  1.58k|            return 1;
27705|  6.02k|        case '{':
  ------------------
  |  Branch (27705:9): [True: 6.02k, False: 136k]
  ------------------
27706|  6.02k|            pushstate(p, root, PFLAG_CONTAINER | PFLAG_CURLYBRACKETS);
  ------------------
  |  |27155|  6.02k|#define PFLAG_CONTAINER 0x100
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_CURLYBRACKETS);
  ------------------
  |  |27159|  6.02k|#define PFLAG_CURLYBRACKETS 0x1000
  ------------------
27707|  6.02k|            return 1;
27708|   142k|    }
27709|   142k|}
janet.c:is_whitespace:
27054|  68.2k|static int is_whitespace(uint8_t c) {
27055|  68.2k|    return c == ' '
  ------------------
  |  Branch (27055:12): [True: 1.55k, False: 66.7k]
  ------------------
27056|  66.7k|           || c == '\t'
  ------------------
  |  Branch (27056:15): [True: 2.48k, False: 64.2k]
  ------------------
27057|  64.2k|           || c == '\n'
  ------------------
  |  Branch (27057:15): [True: 7.08k, False: 57.1k]
  ------------------
27058|  57.1k|           || c == '\r'
  ------------------
  |  Branch (27058:15): [True: 3.34k, False: 53.8k]
  ------------------
27059|  53.8k|           || c == '\0'
  ------------------
  |  Branch (27059:15): [True: 13.9k, False: 39.8k]
  ------------------
27060|  39.8k|           || c == '\v'
  ------------------
  |  Branch (27060:15): [True: 2.50k, False: 37.3k]
  ------------------
27061|  37.3k|           || c == '\f';
  ------------------
  |  Branch (27061:15): [True: 1.19k, False: 36.1k]
  ------------------
27062|  68.2k|}
janet.c:stringchar:
27433|  13.7k|static int stringchar(JanetParser *p, JanetParseState *state, uint8_t c) {
27434|       |    /* Enter escape */
27435|  13.7k|    if (c == '\\') {
  ------------------
  |  Branch (27435:9): [True: 2.14k, False: 11.6k]
  ------------------
27436|  2.14k|        state->consumer = escape1;
27437|  2.14k|        return 1;
27438|  2.14k|    }
27439|       |    /* String end */
27440|  11.6k|    if (c == '"') {
  ------------------
  |  Branch (27440:9): [True: 2.98k, False: 8.65k]
  ------------------
27441|  2.98k|        return stringend(p, state);
27442|  2.98k|    }
27443|       |    /* normal char */
27444|  8.65k|    if (c != '\n' && c != '\r')
  ------------------
  |  Branch (27444:9): [True: 8.13k, False: 523]
  |  Branch (27444:22): [True: 7.91k, False: 213]
  ------------------
27445|  7.91k|        push_buf(p, c);
27446|  8.65k|    return 1;
27447|  11.6k|}
janet.c:escape1:
27348|  2.14k|static int escape1(JanetParser *p, JanetParseState *state, uint8_t c) {
27349|  2.14k|    int e = checkescape(c);
27350|  2.14k|    if (e < 0) {
  ------------------
  |  Branch (27350:9): [True: 25, False: 2.12k]
  ------------------
27351|     25|        p->error = "invalid string escape sequence";
27352|     25|        return 1;
27353|     25|    }
27354|  2.12k|    if (c == 'x') {
  ------------------
  |  Branch (27354:9): [True: 228, False: 1.89k]
  ------------------
27355|    228|        state->counter = 2;
27356|    228|        state->argn = 0;
27357|    228|        state->consumer = escapeh;
27358|  1.89k|    } else if (c == 'u' || c == 'U') {
  ------------------
  |  Branch (27358:16): [True: 492, False: 1.40k]
  |  Branch (27358:28): [True: 186, False: 1.21k]
  ------------------
27359|    678|        state->counter = c == 'u' ? 4 : 6;
  ------------------
  |  Branch (27359:26): [True: 492, False: 186]
  ------------------
27360|    678|        state->argn = 0;
27361|    678|        state->consumer = escapeu;
27362|  1.21k|    } else {
27363|  1.21k|        push_buf(p, (uint8_t) e);
27364|  1.21k|        state->consumer = stringchar;
27365|  1.21k|    }
27366|  2.12k|    return 1;
27367|  2.14k|}
janet.c:checkescape:
27252|  2.14k|static int checkescape(uint8_t c) {
27253|  2.14k|    switch (c) {
27254|     25|        default:
  ------------------
  |  Branch (27254:9): [True: 25, False: 2.12k]
  ------------------
27255|     25|            return -1;
27256|    228|        case 'x':
  ------------------
  |  Branch (27256:9): [True: 228, False: 1.91k]
  ------------------
27257|    720|        case 'u':
  ------------------
  |  Branch (27257:9): [True: 492, False: 1.65k]
  ------------------
27258|    906|        case 'U':
  ------------------
  |  Branch (27258:9): [True: 186, False: 1.96k]
  ------------------
27259|    906|            return 1;
27260|     91|        case 'n':
  ------------------
  |  Branch (27260:9): [True: 91, False: 2.05k]
  ------------------
27261|     91|            return '\n';
27262|     87|        case 't':
  ------------------
  |  Branch (27262:9): [True: 87, False: 2.05k]
  ------------------
27263|     87|            return '\t';
27264|     69|        case 'r':
  ------------------
  |  Branch (27264:9): [True: 69, False: 2.07k]
  ------------------
27265|     69|            return '\r';
27266|     83|        case '0':
  ------------------
  |  Branch (27266:9): [True: 83, False: 2.06k]
  ------------------
27267|     83|            return '\0';
27268|     77|        case 'z':
  ------------------
  |  Branch (27268:9): [True: 77, False: 2.06k]
  ------------------
27269|     77|            return '\0';
27270|     72|        case 'f':
  ------------------
  |  Branch (27270:9): [True: 72, False: 2.07k]
  ------------------
27271|     72|            return '\f';
27272|     70|        case 'v':
  ------------------
  |  Branch (27272:9): [True: 70, False: 2.07k]
  ------------------
27273|     70|            return '\v';
27274|     67|        case 'a':
  ------------------
  |  Branch (27274:9): [True: 67, False: 2.07k]
  ------------------
27275|     67|            return '\a';
27276|     76|        case 'b':
  ------------------
  |  Branch (27276:9): [True: 76, False: 2.07k]
  ------------------
27277|     76|            return '\b';
27278|     74|        case '\'':
  ------------------
  |  Branch (27278:9): [True: 74, False: 2.07k]
  ------------------
27279|     74|            return '\'';
27280|     74|        case '?':
  ------------------
  |  Branch (27280:9): [True: 74, False: 2.07k]
  ------------------
27281|     74|            return '?';
27282|     69|        case 'e':
  ------------------
  |  Branch (27282:9): [True: 69, False: 2.07k]
  ------------------
27283|     69|            return 27;
27284|     79|        case '"':
  ------------------
  |  Branch (27284:9): [True: 79, False: 2.06k]
  ------------------
27285|     79|            return '"';
27286|    227|        case '\\':
  ------------------
  |  Branch (27286:9): [True: 227, False: 1.91k]
  ------------------
27287|    227|            return '\\';
27288|  2.14k|    }
27289|  2.14k|}
janet.c:escapeh:
27312|    429|static int escapeh(JanetParser *p, JanetParseState *state, uint8_t c) {
27313|    429|    int digit = to_hex(c);
27314|    429|    if (digit < 0) {
  ------------------
  |  Branch (27314:9): [True: 39, False: 390]
  ------------------
27315|     39|        p->error = "invalid hex digit in hex escape";
27316|     39|        return 1;
27317|     39|    }
27318|    390|    state->argn = (state->argn << 4) + digit;
27319|    390|    state->counter--;
27320|    390|    if (!state->counter) {
  ------------------
  |  Branch (27320:9): [True: 189, False: 201]
  ------------------
27321|    189|        push_buf(p, (uint8_t)(state->argn & 0xFF));
27322|    189|        state->argn = 0;
27323|    189|        state->consumer = stringchar;
27324|    189|    }
27325|    390|    return 1;
27326|    429|}
janet.c:to_hex:
27117|  3.34k|static int to_hex(uint8_t c) {
27118|  3.34k|    if (c >= '0' && c <= '9') {
  ------------------
  |  Branch (27118:9): [True: 3.28k, False: 61]
  |  Branch (27118:21): [True: 2.02k, False: 1.26k]
  ------------------
27119|  2.02k|        return c - '0';
27120|  2.02k|    } else if (c >= 'A' && c <= 'F') {
  ------------------
  |  Branch (27120:16): [True: 1.25k, False: 67]
  |  Branch (27120:28): [True: 419, False: 838]
  ------------------
27121|    419|        return 10 + c - 'A';
27122|    905|    } else if (c >= 'a' && c <= 'f') {
  ------------------
  |  Branch (27122:16): [True: 818, False: 87]
  |  Branch (27122:28): [True: 788, False: 30]
  ------------------
27123|    788|        return 10 + c - 'a';
27124|    788|    } else {
27125|    117|        return -1;
27126|    117|    }
27127|  3.34k|}
janet.c:escapeu:
27328|  2.91k|static int escapeu(JanetParser *p, JanetParseState *state, uint8_t c) {
27329|  2.91k|    int digit = to_hex(c);
27330|  2.91k|    if (digit < 0) {
  ------------------
  |  Branch (27330:9): [True: 78, False: 2.84k]
  ------------------
27331|     78|        p->error = "invalid hex digit in unicode escape";
27332|     78|        return 1;
27333|     78|    }
27334|  2.84k|    state->argn = (state->argn << 4) + digit;
27335|  2.84k|    state->counter--;
27336|  2.84k|    if (!state->counter) {
  ------------------
  |  Branch (27336:9): [True: 600, False: 2.24k]
  ------------------
27337|    600|        if (state->argn > 0x10FFFF) {
  ------------------
  |  Branch (27337:13): [True: 7, False: 593]
  ------------------
27338|      7|            p->error = "invalid unicode codepoint";
27339|      7|            return 1;
27340|      7|        }
27341|    593|        write_codepoint(p, state->argn);
27342|    593|        state->argn = 0;
27343|    593|        state->consumer = stringchar;
27344|    593|    }
27345|  2.83k|    return 1;
27346|  2.84k|}
janet.c:write_codepoint:
27294|    593|static void write_codepoint(JanetParser *p, int32_t codepoint) {
27295|    593|    if (codepoint <= 0x7F) {
  ------------------
  |  Branch (27295:9): [True: 106, False: 487]
  ------------------
27296|    106|        push_buf(p, (uint8_t) codepoint);
27297|    487|    } else if (codepoint <= 0x7FF) {
  ------------------
  |  Branch (27297:16): [True: 124, False: 363]
  ------------------
27298|    124|        push_buf(p, (uint8_t)((codepoint >>  6) & 0x1F) | 0xC0);
27299|    124|        push_buf(p, (uint8_t)((codepoint >>  0) & 0x3F) | 0x80);
27300|    363|    } else if (codepoint <= 0xFFFF) {
  ------------------
  |  Branch (27300:16): [True: 219, False: 144]
  ------------------
27301|    219|        push_buf(p, (uint8_t)((codepoint >> 12) & 0x0F) | 0xE0);
27302|    219|        push_buf(p, (uint8_t)((codepoint >>  6) & 0x3F) | 0x80);
27303|    219|        push_buf(p, (uint8_t)((codepoint >>  0) & 0x3F) | 0x80);
27304|    219|    } else {
27305|    144|        push_buf(p, (uint8_t)((codepoint >> 18) & 0x07) | 0xF0);
27306|    144|        push_buf(p, (uint8_t)((codepoint >> 12) & 0x3F) | 0x80);
27307|    144|        push_buf(p, (uint8_t)((codepoint >>  6) & 0x3F) | 0x80);
27308|    144|        push_buf(p, (uint8_t)((codepoint >>  0) & 0x3F) | 0x80);
27309|    144|    }
27310|    593|}
janet.c:stringend:
27369|  4.72k|static int stringend(JanetParser *p, JanetParseState *state) {
27370|  4.72k|    Janet ret;
27371|  4.72k|    uint8_t *bufstart = p->buf;
27372|  4.72k|    int32_t buflen = (int32_t) p->bufcount;
27373|  4.72k|    if (state->flags & PFLAG_LONGSTRING) {
  ------------------
  |  |27161|  4.72k|#define PFLAG_LONGSTRING 0x4000
  ------------------
  |  Branch (27373:9): [True: 1.73k, False: 2.98k]
  ------------------
27374|       |        /* Post process to remove leading whitespace */
27375|  1.73k|        JanetParseState top = p->states[p->statecount - 1];
27376|  1.73k|        int32_t indent_col = (int32_t) top.column - 1;
27377|  1.73k|        uint8_t *r = bufstart, *end = r + buflen;
27378|       |        /* Unless there are only spaces before EOLs, disable reindenting */
27379|  1.73k|        int reindent = 1;
27380|  9.51k|        while (reindent && (r < end)) {
  ------------------
  |  Branch (27380:16): [True: 9.36k, False: 152]
  |  Branch (27380:28): [True: 7.77k, False: 1.58k]
  ------------------
27381|  7.77k|            if (*r++ == '\n') {
  ------------------
  |  Branch (27381:17): [True: 1.38k, False: 6.39k]
  ------------------
27382|  1.46k|                for (int32_t j = 0; (r < end) && (*r != '\n') && (j < indent_col); j++, r++) {
  ------------------
  |  Branch (27382:37): [True: 1.11k, False: 351]
  |  Branch (27382:50): [True: 595, False: 520]
  |  Branch (27382:66): [True: 308, False: 287]
  ------------------
27383|    308|                    if (*r != ' ') {
  ------------------
  |  Branch (27383:25): [True: 222, False: 86]
  ------------------
27384|    222|                        reindent = 0;
27385|    222|                        break;
27386|    222|                    }
27387|    308|                }
27388|  1.38k|                if ((r + 1) < end && *r == '\r' && *(r + 1) == '\n') reindent = 1;
  ------------------
  |  Branch (27388:21): [True: 894, False: 486]
  |  Branch (27388:38): [True: 261, False: 633]
  |  Branch (27388:52): [True: 178, False: 83]
  ------------------
27389|  1.38k|            }
27390|  7.77k|        }
27391|       |        /* Now reindent if able */
27392|  1.73k|        if (reindent) {
  ------------------
  |  Branch (27392:13): [True: 1.58k, False: 152]
  ------------------
27393|  1.58k|            uint8_t *w = bufstart;
27394|  1.58k|            r = bufstart;
27395|  8.64k|            while (r < end) {
  ------------------
  |  Branch (27395:20): [True: 7.06k, False: 1.58k]
  ------------------
27396|  7.06k|                if (*r == '\n') {
  ------------------
  |  Branch (27396:21): [True: 1.16k, False: 5.89k]
  ------------------
27397|  1.16k|                    *w++ = *r++;
27398|  1.27k|                    for (int32_t j = 0; (r < end) && (*r != '\n') && (j < indent_col); j++, r++);
  ------------------
  |  Branch (27398:41): [True: 927, False: 351]
  |  Branch (27398:54): [True: 399, False: 528]
  |  Branch (27398:70): [True: 112, False: 287]
  ------------------
27399|  1.16k|                    if ((r + 1) < end && *r == '\r' && *(r + 1) == '\n') *w++ = *r++;
  ------------------
  |  Branch (27399:25): [True: 761, False: 405]
  |  Branch (27399:42): [True: 189, False: 572]
  |  Branch (27399:56): [True: 108, False: 81]
  ------------------
27400|  5.89k|                } else {
27401|  5.89k|                    *w++ = *r++;
27402|  5.89k|                }
27403|  7.06k|            }
27404|  1.58k|            buflen = (int32_t)(w - bufstart);
27405|  1.58k|        }
27406|       |        /* Check for leading EOL so we can remove it */
27407|  1.73k|        if (buflen > 1 && bufstart[0] == '\r' && bufstart[1] == '\n') { /* Windows EOL */
  ------------------
  |  Branch (27407:13): [True: 1.02k, False: 710]
  |  Branch (27407:27): [True: 172, False: 854]
  |  Branch (27407:50): [True: 72, False: 100]
  ------------------
27408|     72|            buflen = buflen - 2;
27409|     72|            bufstart = bufstart + 2;
27410|  1.66k|        } else if (buflen > 0 && bufstart[0] == '\n') { /* Unix EOL */
  ------------------
  |  Branch (27410:20): [True: 1.66k, False: 0]
  |  Branch (27410:34): [True: 301, False: 1.36k]
  ------------------
27411|    301|            buflen--;
27412|    301|            bufstart++;
27413|    301|        }
27414|       |        /* Check for trailing EOL so we can remove it */
27415|  1.73k|        if (buflen > 1 && bufstart[buflen - 2] == '\r' && bufstart[buflen - 1] == '\n') { /* Windows EOL */
  ------------------
  |  Branch (27415:13): [True: 873, False: 863]
  |  Branch (27415:27): [True: 151, False: 722]
  |  Branch (27415:59): [True: 37, False: 114]
  ------------------
27416|     37|            buflen = buflen - 2;
27417|  1.69k|        } else if (buflen > 0 && bufstart[buflen - 1] == '\n') { /* Unix EOL */
  ------------------
  |  Branch (27417:20): [True: 1.49k, False: 202]
  |  Branch (27417:34): [True: 122, False: 1.37k]
  ------------------
27418|    122|            buflen--;
27419|    122|        }
27420|  1.73k|    }
27421|  4.72k|    if (state->flags & PFLAG_BUFFER) {
  ------------------
  |  |27156|  4.72k|#define PFLAG_BUFFER 0x200
  ------------------
  |  Branch (27421:9): [True: 602, False: 4.12k]
  ------------------
27422|    602|        JanetBuffer *b = janet_buffer(buflen);
27423|    602|        janet_buffer_push_bytes(b, bufstart, buflen);
27424|    602|        ret = janet_wrap_buffer(b);
  ------------------
  |  |  847|    602|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  825|    602|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    602|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    602|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27425|  4.12k|    } else {
27426|  4.12k|        ret = janet_wrap_string(janet_string(bufstart, buflen));
  ------------------
  |  |  848|  4.12k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|  4.12k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  4.12k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  4.12k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27427|  4.12k|    }
27428|  4.72k|    p->bufcount = 0;
27429|  4.72k|    popstate(p, ret);
27430|  4.72k|    return 1;
27431|  4.72k|}
janet.c:comment:
27515|  3.13k|static int comment(JanetParser *p, JanetParseState *state, uint8_t c) {
27516|  3.13k|    (void) state;
27517|  3.13k|    if (c == '\n') {
  ------------------
  |  Branch (27517:9): [True: 382, False: 2.75k]
  ------------------
27518|    382|        p->statecount--;
27519|    382|        p->bufcount = 0;
27520|  2.75k|    } else {
27521|  2.75k|        push_buf(p, c);
27522|  2.75k|    }
27523|  3.13k|    return 1;
27524|  3.13k|}
janet.c:atsign:
27610|  3.27k|static int atsign(JanetParser *p, JanetParseState *state, uint8_t c) {
27611|  3.27k|    (void) state;
27612|  3.27k|    p->statecount--;
27613|  3.27k|    switch (c) {
27614|  1.26k|        case '{':
  ------------------
  |  Branch (27614:9): [True: 1.26k, False: 2.01k]
  ------------------
27615|  1.26k|            pushstate(p, root, PFLAG_CONTAINER | PFLAG_CURLYBRACKETS | PFLAG_ATSYM);
  ------------------
  |  |27155|  1.26k|#define PFLAG_CONTAINER 0x100
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_CURLYBRACKETS | PFLAG_ATSYM);
  ------------------
  |  |27159|  1.26k|#define PFLAG_CURLYBRACKETS 0x1000
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_CURLYBRACKETS | PFLAG_ATSYM);
  ------------------
  |  |27163|  1.26k|#define PFLAG_ATSYM 0x10000
  ------------------
27616|  1.26k|            return 1;
27617|    334|        case '"':
  ------------------
  |  Branch (27617:9): [True: 334, False: 2.94k]
  ------------------
27618|    334|            pushstate(p, stringchar, PFLAG_BUFFER | PFLAG_STRING);
  ------------------
  |  |27156|    334|#define PFLAG_BUFFER 0x200
  ------------------
                          pushstate(p, stringchar, PFLAG_BUFFER | PFLAG_STRING);
  ------------------
  |  |27160|    334|#define PFLAG_STRING 0x2000
  ------------------
27619|    334|            return 1;
27620|    281|        case '`':
  ------------------
  |  Branch (27620:9): [True: 281, False: 2.99k]
  ------------------
27621|    281|            pushstate(p, longstring, PFLAG_BUFFER | PFLAG_LONGSTRING);
  ------------------
  |  |27156|    281|#define PFLAG_BUFFER 0x200
  ------------------
                          pushstate(p, longstring, PFLAG_BUFFER | PFLAG_LONGSTRING);
  ------------------
  |  |27161|    281|#define PFLAG_LONGSTRING 0x4000
  ------------------
27622|    281|            return 1;
27623|    576|        case '[':
  ------------------
  |  Branch (27623:9): [True: 576, False: 2.70k]
  ------------------
27624|    576|            pushstate(p, root, PFLAG_CONTAINER | PFLAG_SQRBRACKETS | PFLAG_ATSYM);
  ------------------
  |  |27155|    576|#define PFLAG_CONTAINER 0x100
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_SQRBRACKETS | PFLAG_ATSYM);
  ------------------
  |  |27158|    576|#define PFLAG_SQRBRACKETS 0x800
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_SQRBRACKETS | PFLAG_ATSYM);
  ------------------
  |  |27163|    576|#define PFLAG_ATSYM 0x10000
  ------------------
27625|    576|            return 1;
27626|    204|        case '(':
  ------------------
  |  Branch (27626:9): [True: 204, False: 3.07k]
  ------------------
27627|    204|            pushstate(p, root, PFLAG_CONTAINER | PFLAG_PARENS | PFLAG_ATSYM);
  ------------------
  |  |27155|    204|#define PFLAG_CONTAINER 0x100
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_PARENS | PFLAG_ATSYM);
  ------------------
  |  |27157|    204|#define PFLAG_PARENS 0x400
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_PARENS | PFLAG_ATSYM);
  ------------------
  |  |27163|    204|#define PFLAG_ATSYM 0x10000
  ------------------
27628|    204|            return 1;
27629|    620|        default:
  ------------------
  |  Branch (27629:9): [True: 620, False: 2.65k]
  ------------------
27630|    620|            break;
27631|  3.27k|    }
27632|    620|    pushstate(p, tokenchar, PFLAG_TOKEN);
  ------------------
  |  |27165|    620|#define PFLAG_TOKEN 0x40000
  ------------------
27633|    620|    push_buf(p, '@'); /* Push the leading at-sign that was dropped */
27634|    620|    return 0;
27635|  3.27k|}
janet.c:longstring:
27566|  16.7k|static int longstring(JanetParser *p, JanetParseState *state, uint8_t c) {
27567|  16.7k|    if (state->flags & PFLAG_INSTRING) {
  ------------------
  |  |27564|  16.7k|#define PFLAG_INSTRING 0x100000
  ------------------
  |  Branch (27567:9): [True: 9.86k, False: 6.84k]
  ------------------
27568|       |        /* We are inside the long string */
27569|  9.86k|        if (c == '`') {
  ------------------
  |  Branch (27569:13): [True: 1.96k, False: 7.90k]
  ------------------
27570|  1.96k|            state->flags |= PFLAG_END_CANDIDATE;
  ------------------
  |  |27565|  1.96k|#define PFLAG_END_CANDIDATE 0x200000
  ------------------
27571|  1.96k|            state->flags &= ~PFLAG_INSTRING;
  ------------------
  |  |27564|  1.96k|#define PFLAG_INSTRING 0x100000
  ------------------
27572|  1.96k|            state->counter = 1; /* Use counter to keep track of number of '=' seen */
27573|  1.96k|            return 1;
27574|  1.96k|        }
27575|  7.90k|        push_buf(p, c);
27576|  7.90k|        return 1;
27577|  9.86k|    } else if (state->flags & PFLAG_END_CANDIDATE) {
  ------------------
  |  |27565|  6.84k|#define PFLAG_END_CANDIDATE 0x200000
  ------------------
  |  Branch (27577:16): [True: 2.68k, False: 4.16k]
  ------------------
27578|  2.68k|        int i;
27579|       |        /* We are checking a potential end of the string */
27580|  2.68k|        if (state->counter == state->argn) {
  ------------------
  |  Branch (27580:13): [True: 1.73k, False: 944]
  ------------------
27581|  1.73k|            stringend(p, state);
27582|  1.73k|            return 0;
27583|  1.73k|        }
27584|    944|        if (c == '`' && state->counter < state->argn) {
  ------------------
  |  Branch (27584:13): [True: 717, False: 227]
  |  Branch (27584:25): [True: 717, False: 0]
  ------------------
27585|    717|            state->counter++;
27586|    717|            return 1;
27587|    717|        }
27588|       |        /* Failed end candidate */
27589|  1.07k|        for (i = 0; i < state->counter; i++) {
  ------------------
  |  Branch (27589:21): [True: 846, False: 227]
  ------------------
27590|    846|            push_buf(p, '`');
27591|    846|        }
27592|    227|        push_buf(p, c);
27593|    227|        state->counter = 0;
27594|    227|        state->flags &= ~PFLAG_END_CANDIDATE;
  ------------------
  |  |27565|    227|#define PFLAG_END_CANDIDATE 0x200000
  ------------------
27595|    227|        state->flags |= PFLAG_INSTRING;
  ------------------
  |  |27564|    227|#define PFLAG_INSTRING 0x100000
  ------------------
27596|    227|        return 1;
27597|  4.16k|    } else {
27598|       |        /* We are at beginning of string */
27599|  4.16k|        state->argn++;
27600|  4.16k|        if (c != '`') {
  ------------------
  |  Branch (27600:13): [True: 1.89k, False: 2.27k]
  ------------------
27601|  1.89k|            state->flags |= PFLAG_INSTRING;
  ------------------
  |  |27564|  1.89k|#define PFLAG_INSTRING 0x100000
  ------------------
27602|  1.89k|            push_buf(p, c);
27603|  1.89k|        }
27604|  4.16k|        return 1;
27605|  4.16k|    }
27606|  16.7k|}
janet.c:close_array:
27534|    648|static Janet close_array(JanetParser *p, JanetParseState *state) {
27535|    648|    JanetArray *array = janet_array(state->argn);
27536|  1.30k|    for (int32_t i = state->argn - 1; i >= 0; i--)
  ------------------
  |  Branch (27536:39): [True: 655, False: 648]
  ------------------
27537|    655|        array->data[i] = p->args[--p->argcount];
27538|    648|    array->count = state->argn;
27539|    648|    return janet_wrap_array(array);
  ------------------
  |  |  845|    648|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  825|    648|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    648|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    648|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27540|    648|}
janet.c:close_tuple:
27526|  6.99k|static Janet close_tuple(JanetParser *p, JanetParseState *state, int32_t flag) {
27527|  6.99k|    Janet *ret = janet_tuple_begin(state->argn);
27528|  6.99k|    janet_tuple_flag(ret) |= flag;
  ------------------
  |  | 1806|  6.99k|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1800|  6.99k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
27529|  25.6k|    for (int32_t i = state->argn - 1; i >= 0; i--)
  ------------------
  |  Branch (27529:39): [True: 18.7k, False: 6.99k]
  ------------------
27530|  18.7k|        ret[i] = p->args[--p->argcount];
27531|  6.99k|    return janet_wrap_tuple(janet_tuple_end(ret));
  ------------------
  |  |  843|  6.99k|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|  6.99k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  6.99k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  6.99k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27532|  6.99k|}
janet.c:close_table:
27553|  1.22k|static Janet close_table(JanetParser *p, JanetParseState *state) {
27554|  1.22k|    JanetTable *table = janet_table(state->argn >> 1);
27555|  3.68k|    for (size_t i = p->argcount - state->argn; i < p->argcount; i += 2) {
  ------------------
  |  Branch (27555:48): [True: 2.45k, False: 1.22k]
  ------------------
27556|  2.45k|        Janet key = p->args[i];
27557|  2.45k|        Janet value = p->args[i + 1];
27558|  2.45k|        janet_table_put(table, key, value);
27559|  2.45k|    }
27560|  1.22k|    p->argcount -= state->argn;
27561|  1.22k|    return janet_wrap_table(table);
  ------------------
  |  |  846|  1.22k|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  825|  1.22k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.22k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.22k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27562|  1.22k|}
janet.c:close_struct:
27542|  4.71k|static Janet close_struct(JanetParser *p, JanetParseState *state) {
27543|  4.71k|    JanetKV *st = janet_struct_begin(state->argn >> 1);
27544|  10.1k|    for (size_t i = p->argcount - state->argn; i < p->argcount; i += 2) {
  ------------------
  |  Branch (27544:48): [True: 5.43k, False: 4.71k]
  ------------------
27545|  5.43k|        Janet key = p->args[i];
27546|  5.43k|        Janet value = p->args[i + 1];
27547|  5.43k|        janet_struct_put(st, key, value);
27548|  5.43k|    }
27549|  4.71k|    p->argcount -= state->argn;
27550|  4.71k|    return janet_wrap_struct(janet_struct_end(st));
  ------------------
  |  |  842|  4.71k|#define janet_wrap_struct(s) janet_nanbox_wrap_c((s), JANET_STRUCT)
  |  |  ------------------
  |  |  |  |  828|  4.71k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  4.71k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  4.71k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27551|  4.71k|}
janet.c:popstate:
27178|  54.2k|static void popstate(JanetParser *p, Janet val) {
27179|  90.2k|    for (;;) {
27180|  90.2k|        JanetParseState top = p->states[--p->statecount];
27181|  90.2k|        JanetParseState *newtop = p->states + p->statecount - 1;
27182|       |        /* Source mapping info */
27183|  90.2k|        if (janet_checktype(val, JANET_TUPLE)) {
  ------------------
  |  |  806|  90.2k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 42.9k, False: 47.2k]
  |  |  |  Branch (806:6): [Folded, False: 90.2k]
  |  |  ------------------
  |  |  807|  90.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|  90.2k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  90.2k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  90.2k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  90.2k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  90.2k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27184|  42.9k|            janet_tuple_sm_line(janet_unwrap_tuple(val)) = (int32_t) top.line;
  ------------------
  |  | 1804|  42.9k|#define janet_tuple_sm_line(t) (janet_tuple_head(t)->sm_line)
  |  |  ------------------
  |  |  |  | 1800|  42.9k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
27185|  42.9k|            janet_tuple_sm_column(janet_unwrap_tuple(val)) = (int32_t) top.column;
  ------------------
  |  | 1805|  42.9k|#define janet_tuple_sm_column(t) (janet_tuple_head(t)->sm_column)
  |  |  ------------------
  |  |  |  | 1800|  42.9k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
27186|  42.9k|        }
27187|  90.2k|        if (newtop->flags & PFLAG_CONTAINER) {
  ------------------
  |  |27155|  90.2k|#define PFLAG_CONTAINER 0x100
  ------------------
  |  Branch (27187:13): [True: 54.2k, False: 35.9k]
  ------------------
27188|  54.2k|            newtop->argn++;
27189|       |            /* Keep track of number of values in the root state */
27190|  54.2k|            if (p->statecount == 1) {
  ------------------
  |  Branch (27190:17): [True: 14.7k, False: 39.5k]
  ------------------
27191|  14.7k|                p->pending++;
27192|       |                /* Root items are always wrapped in a tuple for source map info. */
27193|  14.7k|                const Janet *tup = janet_tuple_n(&val, 1);
27194|  14.7k|                janet_tuple_sm_line(tup) = (int32_t) top.line;
  ------------------
  |  | 1804|  14.7k|#define janet_tuple_sm_line(t) (janet_tuple_head(t)->sm_line)
  |  |  ------------------
  |  |  |  | 1800|  14.7k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
27195|  14.7k|                janet_tuple_sm_column(tup) = (int32_t) top.column;
  ------------------
  |  | 1805|  14.7k|#define janet_tuple_sm_column(t) (janet_tuple_head(t)->sm_column)
  |  |  ------------------
  |  |  |  | 1800|  14.7k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
27196|  14.7k|                val = janet_wrap_tuple(tup);
  ------------------
  |  |  843|  14.7k|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|  14.7k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  14.7k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  14.7k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27197|  14.7k|            }
27198|  54.2k|            push_arg(p, val);
27199|  54.2k|            return;
27200|  54.2k|        } else if (newtop->flags & PFLAG_READERMAC) {
  ------------------
  |  |27162|  35.9k|#define PFLAG_READERMAC 0x8000
  ------------------
  |  Branch (27200:20): [True: 35.9k, False: 0]
  ------------------
27201|  35.9k|            Janet *t = janet_tuple_begin(2);
27202|  35.9k|            int c = newtop->flags & 0xFF;
27203|  35.9k|            const char *which =
27204|  35.9k|                (c == '\'') ? "quote" :
  ------------------
  |  Branch (27204:17): [True: 22.6k, False: 13.3k]
  ------------------
27205|  35.9k|                (c == ',') ? "unquote" :
  ------------------
  |  Branch (27205:17): [True: 3.63k, False: 9.68k]
  ------------------
27206|  13.3k|                (c == ';') ? "splice" :
  ------------------
  |  Branch (27206:17): [True: 3.66k, False: 6.02k]
  ------------------
27207|  9.68k|                (c == '|') ? "short-fn" :
  ------------------
  |  Branch (27207:17): [True: 3.31k, False: 2.70k]
  ------------------
27208|  6.02k|                (c == '~') ? "quasiquote" : "<unknown>";
  ------------------
  |  Branch (27208:17): [True: 2.70k, False: 0]
  ------------------
27209|  35.9k|            t[0] = janet_csymbolv(which);
  ------------------
  |  | 1837|  35.9k|#define janet_csymbolv(cstr) janet_wrap_symbol(janet_csymbol(cstr))
  |  |  ------------------
  |  |  |  |  849|  35.9k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  35.9k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  35.9k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  35.9k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27210|  35.9k|            t[1] = val;
27211|       |            /* Quote source mapping info */
27212|  35.9k|            janet_tuple_sm_line(t) = (int32_t) newtop->line;
  ------------------
  |  | 1804|  35.9k|#define janet_tuple_sm_line(t) (janet_tuple_head(t)->sm_line)
  |  |  ------------------
  |  |  |  | 1800|  35.9k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
27213|  35.9k|            janet_tuple_sm_column(t) = (int32_t) newtop->column;
  ------------------
  |  | 1805|  35.9k|#define janet_tuple_sm_column(t) (janet_tuple_head(t)->sm_column)
  |  |  ------------------
  |  |  |  | 1800|  35.9k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
27214|  35.9k|            val = janet_wrap_tuple(janet_tuple_end(t));
  ------------------
  |  |  843|  35.9k|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|  35.9k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  35.9k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  35.9k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27215|  35.9k|        } else {
27216|      0|            return;
27217|      0|        }
27218|  90.2k|    }
27219|  54.2k|}
janet.c:tokenchar:
27462|   146k|static int tokenchar(JanetParser *p, JanetParseState *state, uint8_t c) {
27463|   146k|    Janet ret;
27464|   146k|    double numval;
27465|   146k|    int32_t blen;
27466|   146k|    if (janet_is_symbol_char(c)) {
  ------------------
  |  Branch (27466:9): [True: 109k, False: 36.6k]
  ------------------
27467|   109k|        push_buf(p, (uint8_t) c);
27468|   109k|        if (c > 127) state->argn = 1; /* Use to indicate non ascii */
  ------------------
  |  Branch (27468:13): [True: 4.48k, False: 105k]
  ------------------
27469|   109k|        return 1;
27470|   109k|    }
27471|       |    /* Token finished */
27472|  36.6k|    blen = (int32_t) p->bufcount;
27473|  36.6k|    int start_dig = p->buf[0] >= '0' && p->buf[0] <= '9';
  ------------------
  |  Branch (27473:21): [True: 26.2k, False: 10.3k]
  |  Branch (27473:41): [True: 12.5k, False: 13.7k]
  ------------------
27474|  36.6k|    int start_num = start_dig || p->buf[0] == '-' || p->buf[0] == '+' || p->buf[0] == '.';
  ------------------
  |  Branch (27474:21): [True: 12.5k, False: 24.1k]
  |  Branch (27474:34): [True: 3.58k, False: 20.5k]
  |  Branch (27474:54): [True: 1.60k, False: 18.9k]
  |  Branch (27474:74): [True: 1.78k, False: 17.1k]
  ------------------
27475|  36.6k|    if (p->buf[0] == ':') {
  ------------------
  |  Branch (27475:9): [True: 1.75k, False: 34.9k]
  ------------------
27476|       |        /* Don't do full utf-8 check unless we have seen non ascii characters. */
27477|  1.75k|        int valid = (!state->argn) || janet_valid_utf8(p->buf + 1, blen - 1);
  ------------------
  |  Branch (27477:21): [True: 1.59k, False: 154]
  |  Branch (27477:39): [True: 102, False: 52]
  ------------------
27478|  1.75k|        if (!valid) {
  ------------------
  |  Branch (27478:13): [True: 52, False: 1.69k]
  ------------------
27479|     52|            p->error = "invalid utf-8 in keyword";
27480|     52|            return 0;
27481|     52|        }
27482|  1.69k|        ret = janet_keywordv(p->buf + 1, blen - 1);
  ------------------
  |  | 1842|  1.69k|#define janet_keywordv(str, len) janet_wrap_keyword(janet_keyword((str), (len)))
  |  |  ------------------
  |  |  |  |  850|  1.69k|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  1.69k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  1.69k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  1.69k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27483|  1.69k|#ifdef JANET_INT_TYPES
27484|  34.9k|    } else if (start_num && !janet_scan_numeric(p->buf, blen, &ret)) {
  ------------------
  |  Branch (27484:16): [True: 19.4k, False: 15.4k]
  |  Branch (27484:29): [True: 14.5k, False: 4.89k]
  ------------------
27485|  14.5k|        (void) numval;
27486|       |#else
27487|       |    } else if (start_num && !janet_scan_number(p->buf, blen, &numval)) {
27488|       |        ret = janet_wrap_number(numval);
27489|       |#endif
27490|  20.3k|    } else if (!check_str_const("nil", p->buf, blen)) {
  ------------------
  |  Branch (27490:16): [True: 510, False: 19.8k]
  ------------------
27491|    510|        ret = janet_wrap_nil();
  ------------------
  |  |  831|    510|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|    510|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    510|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    510|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27492|  19.8k|    } else if (!check_str_const("false", p->buf, blen)) {
  ------------------
  |  Branch (27492:16): [True: 99, False: 19.7k]
  ------------------
27493|     99|        ret = janet_wrap_false();
  ------------------
  |  |  833|     99|#define janet_wrap_false() janet_nanbox_from_payload(JANET_BOOLEAN, 0)
  |  |  ------------------
  |  |  |  |  822|     99|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     99|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     99|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27494|  19.7k|    } else if (!check_str_const("true", p->buf, blen)) {
  ------------------
  |  Branch (27494:16): [True: 194, False: 19.5k]
  ------------------
27495|    194|        ret = janet_wrap_true();
  ------------------
  |  |  832|    194|#define janet_wrap_true() janet_nanbox_from_payload(JANET_BOOLEAN, 1)
  |  |  ------------------
  |  |  |  |  822|    194|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    194|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    194|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27496|  19.5k|    } else {
27497|  19.5k|        if (start_dig) {
  ------------------
  |  Branch (27497:13): [True: 374, False: 19.1k]
  ------------------
27498|    374|            p->error = "symbol literal cannot start with a digit";
27499|    374|            return 0;
27500|  19.1k|        } else {
27501|       |            /* Don't do full utf-8 check unless we have seen non ascii characters. */
27502|  19.1k|            int valid = (!state->argn) || janet_valid_utf8(p->buf, blen);
  ------------------
  |  Branch (27502:25): [True: 18.3k, False: 798]
  |  Branch (27502:43): [True: 498, False: 300]
  ------------------
27503|  19.1k|            if (!valid) {
  ------------------
  |  Branch (27503:17): [True: 300, False: 18.8k]
  ------------------
27504|    300|                p->error = "invalid utf-8 in symbol";
27505|    300|                return 0;
27506|    300|            }
27507|  18.8k|            ret = janet_symbolv(p->buf, blen);
  ------------------
  |  | 1836|  18.8k|#define janet_symbolv(str, len) janet_wrap_symbol(janet_symbol((str), (len)))
  |  |  ------------------
  |  |  |  |  849|  18.8k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  18.8k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  18.8k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  18.8k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27508|  18.8k|        }
27509|  19.5k|    }
27510|  35.9k|    p->bufcount = 0;
27511|  35.9k|    popstate(p, ret);
27512|  35.9k|    return 0;
27513|  36.6k|}
janet.c:check_str_const:
27450|  59.8k|static int check_str_const(const char *cstr, const uint8_t *str, int32_t len) {
27451|  59.8k|    int32_t index;
27452|  64.9k|    for (index = 0; index < len; index++) {
  ------------------
  |  Branch (27452:21): [True: 63.1k, False: 1.86k]
  ------------------
27453|  63.1k|        uint8_t c = str[index];
27454|  63.1k|        uint8_t k = ((const uint8_t *)cstr)[index];
27455|  63.1k|        if (c < k) return -1;
  ------------------
  |  Branch (27455:13): [True: 47.7k, False: 15.3k]
  ------------------
27456|  15.3k|        if (c > k) return 1;
  ------------------
  |  Branch (27456:13): [True: 10.2k, False: 5.08k]
  ------------------
27457|  5.08k|        if (k == '\0') break;
  ------------------
  |  Branch (27457:13): [True: 0, False: 5.08k]
  ------------------
27458|  5.08k|    }
27459|  1.86k|    return (cstr[index] == '\0') ? 0 : -1;
  ------------------
  |  Branch (27459:12): [True: 803, False: 1.06k]
  ------------------
27460|  59.8k|}
janet.c:size_padded:
29988|  4.37k|static size_t size_padded(size_t offset, size_t size) {
29989|  4.37k|    size_t x = size + offset - 1;
29990|  4.37k|    return x - (x % size);
29991|  4.37k|}
janet.c:compile_peg:
30263|  4.85k|static JanetPeg *compile_peg(Janet x) {
30264|  4.85k|    Builder builder;
30265|  4.85k|    builder.grammar = janet_table(0);
30266|  4.85k|    builder.default_grammar = NULL;
30267|  4.85k|    {
30268|  4.85k|        Janet default_grammarv = janet_dyn("peg-grammar");
30269|  4.85k|        if (janet_checktype(default_grammarv, JANET_TABLE)) {
  ------------------
  |  |  806|  4.85k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 4.85k]
  |  |  |  Branch (806:6): [Folded, False: 4.85k]
  |  |  ------------------
  |  |  807|  4.85k|        ? 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.85k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  4.85k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  4.85k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  4.85k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  4.85k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30270|      0|            builder.default_grammar = janet_unwrap_table(default_grammarv);
  ------------------
  |  |  861|      0|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
30271|      0|        }
30272|  4.85k|    }
30273|  4.85k|    builder.tags = janet_table(0);
30274|  4.85k|    builder.constants = NULL;
30275|  4.85k|    builder.bytecode = NULL;
30276|  4.85k|    builder.nexttag = 1;
30277|  4.85k|    builder.form = x;
30278|  4.85k|    builder.depth = JANET_RECURSION_GUARD;
  ------------------
  |  |  296|  4.85k|#define JANET_RECURSION_GUARD 1024
  ------------------
30279|  4.85k|    builder.has_backref = 0;
30280|  4.85k|    peg_compile1(&builder, x);
30281|  4.85k|    JanetPeg *peg = make_peg(&builder);
30282|  4.85k|    builder_cleanup(&builder);
30283|  4.85k|    return peg;
30284|  4.85k|}
janet.c:peg_compile1:
29799|  26.1k|static uint32_t peg_compile1(Builder *b, Janet peg) {
29800|       |
29801|       |    /* Keep track of the form being compiled for error purposes */
29802|  26.1k|    Janet old_form = b->form;
29803|  26.1k|    JanetTable *old_grammar = b->grammar;
29804|  26.1k|    b->form = peg;
29805|       |
29806|       |    /* Resolve keyword references */
29807|  26.1k|    int i = JANET_RECURSION_GUARD;
  ------------------
  |  |  296|  26.1k|#define JANET_RECURSION_GUARD 1024
  ------------------
29808|  26.1k|    JanetTable *grammar = old_grammar;
29809|  26.1k|    for (; i > 0 && janet_checktype(peg, JANET_KEYWORD); --i) {
  ------------------
  |  |  806|  26.1k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 27, False: 26.1k]
  |  |  |  Branch (806:6): [Folded, False: 26.1k]
  |  |  ------------------
  |  |  807|  26.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|  26.1k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  26.1k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  26.1k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  26.1k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  26.1k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (29809:12): [True: 26.1k, False: 0]
  ------------------
29810|     27|        Janet nextPeg = janet_table_get_ex(grammar, peg, &grammar);
29811|     27|        if (!grammar || janet_checktype(nextPeg, JANET_NIL)) {
  ------------------
  |  |  806|     27|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 27, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 27]
  |  |  ------------------
  |  |  807|     27|        ? 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|     27|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|     27|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|     27|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     27|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     27|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (29811:13): [True: 0, False: 27]
  ------------------
29812|     27|            nextPeg = (b->default_grammar == NULL)
  ------------------
  |  Branch (29812:23): [True: 27, False: 0]
  ------------------
29813|     27|                      ? janet_wrap_nil()
  ------------------
  |  |  831|     27|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|     27|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     27|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     27|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29814|     27|                      : janet_table_get(b->default_grammar, peg);
29815|     27|            if (janet_checktype(nextPeg, JANET_NIL)) {
  ------------------
  |  |  806|     27|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 27, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 27]
  |  |  ------------------
  |  |  807|     27|        ? 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|     27|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|     27|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|     27|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     27|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     27|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29816|     27|                peg_panic(b, "unknown rule");
29817|     27|            }
29818|     27|        }
29819|      0|        peg = nextPeg;
29820|      0|        b->form = peg;
29821|      0|        b->grammar = grammar;
29822|      0|    }
29823|  26.1k|    if (i == 0)
  ------------------
  |  Branch (29823:9): [True: 0, False: 26.1k]
  ------------------
29824|      0|        peg_panic(b, "reference chain too deep");
29825|       |
29826|       |    /* Check cache - for tuples we check only the local cache, as
29827|       |     * in a different grammar, the same tuple can compile to a different
29828|       |     * rule - for example, (+ :a :b) depends on whatever :a and :b are bound to. */
29829|  26.1k|    Janet check = janet_checktype(peg, JANET_TUPLE)
  ------------------
  |  |  806|  26.1k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 20.0k, False: 6.03k]
  |  |  |  Branch (806:6): [Folded, False: 26.1k]
  |  |  ------------------
  |  |  807|  26.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|  26.1k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  26.1k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  26.1k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  26.1k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  26.1k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29830|  26.1k|                  ? janet_table_rawget(grammar, peg)
29831|  26.1k|                  : janet_table_get(grammar, peg);
29832|  26.1k|    if (!janet_checktype(check, JANET_NIL)) {
  ------------------
  |  |  806|  26.1k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 26.1k]
  |  |  ------------------
  |  |  807|  26.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|  26.1k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  26.1k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  26.1k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  26.1k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  26.1k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (29832:9): [True: 1.07k, False: 25.0k]
  ------------------
29833|  1.07k|        b->form = old_form;
29834|  1.07k|        b->grammar = old_grammar;
29835|  1.07k|        return (uint32_t) janet_unwrap_number(check);
  ------------------
  |  |  839|  1.07k|#define janet_unwrap_number(x) ((x).number)
  ------------------
29836|  1.07k|    }
29837|       |
29838|       |    /* Check depth */
29839|  25.0k|    if (b->depth-- == 0)
  ------------------
  |  Branch (29839:9): [True: 0, False: 25.0k]
  ------------------
29840|      0|        peg_panic(b, "peg grammar recursed too deeply");
29841|       |
29842|       |    /* The final rule to return */
29843|  25.0k|    uint32_t rule = janet_v_count(b->bytecode);
  ------------------
  |  |  736|  25.0k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|  20.2k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  20.2k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 20.2k, False: 4.82k]
  |  |  ------------------
  ------------------
29844|       |
29845|       |    /* Add to cache. Do not cache structs, as we don't yet know
29846|       |     * what rule they will return! We can just as effectively cache
29847|       |     * the structs main rule. */
29848|  25.0k|    if (!janet_checktype(peg, JANET_STRUCT)) {
  ------------------
  |  |  806|  25.0k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 25.0k]
  |  |  ------------------
  |  |  807|  25.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|  25.0k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  25.0k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  25.0k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  25.0k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  25.0k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (29848:9): [True: 24.4k, False: 560]
  ------------------
29849|  24.4k|        JanetTable *which_grammar = grammar;
29850|       |        /* If we are a primitive pattern, add to the global cache (root grammar table) */
29851|  24.4k|        if (!janet_checktype(peg, JANET_TUPLE)) {
  ------------------
  |  |  806|  24.4k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 24.4k]
  |  |  ------------------
  |  |  807|  24.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|  24.4k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  24.4k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  24.4k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  24.4k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  24.4k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (29851:13): [True: 4.56k, False: 19.9k]
  ------------------
29852|  4.56k|            while (which_grammar->proto)
  ------------------
  |  Branch (29852:20): [True: 0, False: 4.56k]
  ------------------
29853|      0|                which_grammar = which_grammar->proto;
29854|  4.56k|        }
29855|  24.4k|        janet_table_put(which_grammar, peg, janet_wrap_number(rule));
  ------------------
  |  |  835|  24.4k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
29856|  24.4k|    }
29857|       |
29858|  25.0k|    switch (janet_type(peg)) {
  ------------------
  |  |  795|  25.0k|    (isnan((x).number) \
  |  |  796|  25.0k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  25.0k|        : JANET_NUMBER)
  ------------------
  |  Branch (29858:13): [True: 22.2k, False: 2.83k]
  ------------------
29859|    619|        default:
  ------------------
  |  Branch (29859:9): [True: 619, False: 24.4k]
  ------------------
29860|    619|            peg_panic(b, "unexpected peg source");
29861|      0|            return 0;
29862|       |
29863|     51|        case JANET_BOOLEAN: {
  ------------------
  |  Branch (29863:9): [True: 51, False: 24.9k]
  ------------------
29864|     51|            int n = janet_unwrap_boolean(peg);
  ------------------
  |  |  838|     51|#define janet_unwrap_boolean(x) ((x).u64 & 0x1)
  ------------------
29865|     51|            Reserve r = reserve(b, 2);
29866|     51|            emit_1(r, n ? RULE_NCHAR : RULE_NOTNCHAR, 0);
  ------------------
  |  Branch (29866:23): [True: 43, False: 8]
  ------------------
29867|     51|            break;
29868|      0|        }
29869|  2.83k|        case JANET_NUMBER: {
  ------------------
  |  Branch (29869:9): [True: 2.83k, False: 22.2k]
  ------------------
29870|  2.83k|            int32_t n = peg_getinteger(b, peg);
29871|  2.83k|            Reserve r = reserve(b, 2);
29872|  2.83k|            if (n < 0) {
  ------------------
  |  Branch (29872:17): [True: 123, False: 2.71k]
  ------------------
29873|    123|                if (n == INT32_MIN) {
  ------------------
  |  Branch (29873:21): [True: 2, False: 121]
  ------------------
29874|       |                    /* Since buffers can't hold this many characters, will
29875|       |                     * always match. Avoid undefined behavior negating INT32_MIN. */
29876|      2|                    emit_1(r, RULE_NCHAR, 0);
29877|    121|                } else {
29878|    121|                    emit_1(r, RULE_NOTNCHAR, -n);
29879|    121|                }
29880|  2.71k|            } else {
29881|  2.71k|                emit_1(r, RULE_NCHAR, n);
29882|  2.71k|            }
29883|  2.83k|            break;
29884|      0|        }
29885|    664|        case JANET_STRING: {
  ------------------
  |  Branch (29885:9): [True: 664, False: 24.3k]
  ------------------
29886|    664|            const uint8_t *str = janet_unwrap_string(peg);
  ------------------
  |  |  863|    664|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
29887|    664|            int32_t len = janet_string_length(str);
  ------------------
  |  | 1813|    664|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|    664|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
29888|    664|            emit_bytes(b, RULE_LITERAL, len, str);
29889|    664|            break;
29890|      0|        }
29891|    255|        case JANET_BUFFER: {
  ------------------
  |  Branch (29891:9): [True: 255, False: 24.7k]
  ------------------
29892|    255|            const JanetBuffer *buf = janet_unwrap_buffer(peg);
  ------------------
  |  |  862|    255|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
29893|    255|            emit_bytes(b, RULE_LITERAL, buf->count, buf->data);
29894|    255|            break;
29895|      0|        }
29896|    138|        case JANET_TABLE: {
  ------------------
  |  Branch (29896:9): [True: 138, False: 24.9k]
  ------------------
29897|       |            /* Build grammar table */
29898|    138|            JanetTable *new_grammar = janet_table_clone(janet_unwrap_table(peg));
  ------------------
  |  |  861|    138|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
29899|    138|            new_grammar->proto = grammar;
29900|    138|            b->grammar = grammar = new_grammar;
29901|       |            /* Run the main rule */
29902|    138|            Janet main_rule = janet_table_rawget(grammar, janet_ckeywordv("main"));
  ------------------
  |  | 1843|    138|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|    138|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|    138|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|    138|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|    138|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29903|    138|            if (janet_checktype(main_rule, JANET_NIL))
  ------------------
  |  |  806|    138|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 138, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 138]
  |  |  ------------------
  |  |  807|    138|        ? 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|    138|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|    138|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|    138|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    138|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    138|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29904|    138|                peg_panic(b, "grammar requires :main rule");
29905|      0|            rule = peg_compile1(b, main_rule);
29906|      0|            break;
29907|    138|        }
29908|    560|        case JANET_STRUCT: {
  ------------------
  |  Branch (29908:9): [True: 560, False: 24.4k]
  ------------------
29909|       |            /* Build grammar table */
29910|    560|            const JanetKV *st = janet_unwrap_struct(peg);
  ------------------
  |  |  857|    560|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
29911|    560|            JanetTable *new_grammar = janet_table(2 * janet_struct_capacity(st));
  ------------------
  |  | 1849|    560|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1846|    560|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
29912|  6.22k|            for (int32_t i = 0; i < janet_struct_capacity(st); i++) {
  ------------------
  |  | 1849|  6.22k|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1846|  6.22k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (29912:33): [True: 5.66k, False: 560]
  ------------------
29913|  5.66k|                if (janet_checktype(st[i].key, JANET_KEYWORD)) {
  ------------------
  |  |  806|  5.66k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 30, False: 5.63k]
  |  |  |  Branch (806:6): [Folded, False: 5.66k]
  |  |  ------------------
  |  |  807|  5.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|  5.66k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  5.66k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  5.66k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  5.66k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  5.66k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29914|     30|                    janet_table_put(new_grammar, st[i].key, st[i].value);
29915|     30|                }
29916|  5.66k|            }
29917|    560|            new_grammar->proto = grammar;
29918|    560|            b->grammar = grammar = new_grammar;
29919|       |            /* Run the main rule */
29920|    560|            Janet main_rule = janet_table_rawget(grammar, janet_ckeywordv("main"));
  ------------------
  |  | 1843|    560|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|    560|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|    560|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|    560|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|    560|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29921|    560|            if (janet_checktype(main_rule, JANET_NIL))
  ------------------
  |  |  806|    560|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 560, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 560]
  |  |  ------------------
  |  |  807|    560|        ? 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|    560|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|    560|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|    560|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    560|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    560|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29922|    560|                peg_panic(b, "grammar requires :main rule");
29923|      0|            rule = peg_compile1(b, main_rule);
29924|      0|            break;
29925|    560|        }
29926|  19.9k|        case JANET_TUPLE: {
  ------------------
  |  Branch (29926:9): [True: 19.9k, False: 5.12k]
  ------------------
29927|  19.9k|            const Janet *tup = janet_unwrap_tuple(peg);
  ------------------
  |  |  858|  19.9k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
29928|  19.9k|            int32_t len = janet_tuple_length(tup);
  ------------------
  |  | 1802|  19.9k|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1800|  19.9k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
29929|  19.9k|            if (len == 0) peg_panic(b, "tuple in grammar must have non-zero length");
  ------------------
  |  Branch (29929:17): [True: 13, False: 19.9k]
  ------------------
29930|  19.9k|            if (janet_checkint(tup[0])) {
  ------------------
  |  Branch (29930:17): [True: 1.37k, False: 18.5k]
  ------------------
29931|  1.37k|                int32_t n = janet_unwrap_integer(tup[0]);
  ------------------
  |  |  966|  1.37k|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  839|  1.37k|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
29932|  1.37k|                if (n < 0) {
  ------------------
  |  Branch (29932:21): [True: 36, False: 1.34k]
  ------------------
29933|     36|                    peg_panicf(b, "expected non-negative integer, got %d", n);
  ------------------
  |  |29240|     36|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29934|     36|                }
29935|  1.34k|                spec_repeat(b, len, tup);
29936|  1.34k|                break;
29937|  1.37k|            }
29938|  18.5k|            if (!janet_checktype(tup[0], JANET_SYMBOL))
  ------------------
  |  |  806|  18.5k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 18.5k]
  |  |  ------------------
  |  |  807|  18.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|  18.5k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  18.5k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  18.5k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  18.5k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  18.5k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (29938:17): [True: 165, False: 18.3k]
  ------------------
29939|    165|                peg_panicf(b, "expected grammar command, found %v", tup[0]);
  ------------------
  |  |29240|    165|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29940|  18.3k|            const uint8_t *sym = janet_unwrap_symbol(tup[0]);
  ------------------
  |  |  864|  18.3k|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
29941|  18.3k|            const SpecialPair *sp = janet_strbinsearch(
29942|  18.3k|                                        &peg_specials,
29943|  18.3k|                                        sizeof(peg_specials) / sizeof(SpecialPair),
29944|  18.3k|                                        sizeof(SpecialPair),
29945|  18.3k|                                        sym);
29946|  18.3k|            if (sp) {
  ------------------
  |  Branch (29946:17): [True: 18.0k, False: 311]
  ------------------
29947|  18.0k|                sp->special(b, len - 1, tup + 1);
29948|  18.0k|            } else {
29949|    311|                peg_panicf(b, "unknown special %S", sym);
  ------------------
  |  |29240|    311|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29950|    311|            }
29951|  18.0k|            break;
29952|  18.3k|        }
29953|  25.0k|    }
29954|       |
29955|       |    /* Increase depth again */
29956|  18.3k|    b->depth++;
29957|  18.3k|    b->form = old_form;
29958|  18.3k|    b->grammar = old_grammar;
29959|  18.3k|    return rule;
29960|  25.0k|}
janet.c:peg_panic:
29235|  2.66k|JANET_NO_RETURN static void peg_panic(Builder *b, const char *msg) {
29236|  2.66k|    builder_cleanup(b);
29237|  2.66k|    janet_panicf("grammar error in %p, %s", b->form, msg);
29238|  2.66k|}
janet.c:reserve:
29326|  20.5k|static Reserve reserve(Builder *b, int32_t size) {
29327|  20.5k|    Reserve r;
29328|  20.5k|    r.index = janet_v_count(b->bytecode);
  ------------------
  |  |  736|  20.5k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|  18.1k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  18.1k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 18.1k, False: 2.36k]
  |  |  ------------------
  ------------------
29329|  20.5k|    r.builder = b;
29330|  20.5k|    r.size = size;
29331|  80.9k|    for (int32_t i = 0; i < size; i++)
  ------------------
  |  Branch (29331:25): [True: 60.4k, False: 20.5k]
  ------------------
29332|       |        janet_v_push(b->bytecode, 0);
  ------------------
  |  |  734|  60.4k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|  60.4k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|  60.4k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|  58.0k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  58.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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  742|  58.0k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  58.0k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 2.36k, False: 58.0k]
  |  |  |  |  |  |  |  Branch (745:50): [True: 9.28k, False: 48.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|  11.6k|#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))
  |  |  ------------------
  |  |  |  |  743|  60.4k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  60.4k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29333|  20.5k|    return r;
29334|  20.5k|}
janet.c:emit_1:
29355|  2.99k|static void emit_1(Reserve r, uint32_t op, uint32_t arg) {
29356|  2.99k|    emit_rule(r, op, 1, &arg);
29357|  2.99k|}
janet.c:emit_rule:
29337|  16.3k|static void emit_rule(Reserve r, int32_t op, int32_t n, const uint32_t *body) {
29338|  16.3k|    janet_assert(r.size == n + 1, "bad reserve");
  ------------------
  |  |  389|  16.3k|#define janet_assert(c, m) do { \
  |  |  390|  16.3k|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  378|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  379|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  380|      0|        __FILE__,\
  |  |  |  |  381|      0|        __LINE__,\
  |  |  |  |  382|      0|        (m));\
  |  |  |  |  383|      0|    abort();\
  |  |  |  |  384|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (384:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (390:9): [True: 0, False: 16.3k]
  |  |  ------------------
  |  |  391|  16.3k|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 16.3k]
  |  |  ------------------
  ------------------
29339|  16.3k|    r.builder->bytecode[r.index] = op;
29340|  16.3k|    memcpy(r.builder->bytecode + r.index + 1, body, n * sizeof(uint32_t));
29341|  16.3k|}
janet.c:peg_getinteger:
29276|  4.40k|static int32_t peg_getinteger(Builder *b, Janet x) {
29277|  4.40k|    if (!janet_checkint(x))
  ------------------
  |  Branch (29277:9): [True: 452, False: 3.95k]
  ------------------
29278|    452|        peg_panicf(b, "expected integer, got %v", x);
  ------------------
  |  |29240|    452|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29279|  3.95k|    return janet_unwrap_integer(x);
  ------------------
  |  |  966|  3.95k|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  839|  3.95k|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
29280|  4.40k|}
janet.c:emit_bytes:
29344|    919|static void emit_bytes(Builder *b, uint32_t op, int32_t len, const uint8_t *bytes) {
29345|    919|    uint32_t next_rule = janet_v_count(b->bytecode);
  ------------------
  |  |  736|    919|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|    737|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|    737|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 737, False: 182]
  |  |  ------------------
  ------------------
29346|    919|    janet_v_push(b->bytecode, op);
  ------------------
  |  |  734|    919|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|    919|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|    919|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|    737|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|    737|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  742|    737|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|    737|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 182, False: 737]
  |  |  |  |  |  |  |  Branch (745:50): [True: 69, False: 668]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|    251|#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))
  |  |  ------------------
  |  |  |  |  743|    919|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|    919|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29347|    919|    janet_v_push(b->bytecode, len);
  ------------------
  |  |  734|    919|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|    919|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|    919|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|    919|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|    919|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  742|    919|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|    919|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 0, False: 919]
  |  |  |  |  |  |  |  Branch (745:50): [True: 243, False: 676]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|    243|#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))
  |  |  ------------------
  |  |  |  |  743|    919|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|    919|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29348|    919|    int32_t words = ((len + 3) >> 2);
29349|  2.39k|    for (int32_t i = 0; i < words; i++)
  ------------------
  |  Branch (29349:25): [True: 1.47k, False: 919]
  ------------------
29350|       |        janet_v_push(b->bytecode, 0);
  ------------------
  |  |  734|  1.47k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|  1.47k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|  1.47k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|  1.47k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  1.47k|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  742|  1.47k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  1.47k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 0, False: 1.47k]
  |  |  |  |  |  |  |  Branch (745:50): [True: 311, False: 1.16k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|    311|#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))
  |  |  ------------------
  |  |  |  |  743|  1.47k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  1.47k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29351|    919|    memcpy(b->bytecode + next_rule + 2, bytes, len);
29352|    919|}
janet.c:spec_repeat:
29499|  1.39k|static void spec_repeat(Builder *b, int32_t argc, const Janet *argv) {
29500|  1.39k|    peg_fixarity(b, argc, 2);
29501|  1.39k|    Reserve r = reserve(b, 4);
29502|  1.39k|    int32_t n = peg_getnat(b, argv[0]);
29503|  1.39k|    uint32_t subrule = peg_compile1(b, argv[1]);
29504|  1.39k|    emit_3(r, RULE_BETWEEN, n, n, subrule);
29505|  1.39k|}
janet.c:peg_fixarity:
29242|  2.02k|static void peg_fixarity(Builder *b, int32_t argc, int32_t arity) {
29243|  2.02k|    if (argc != arity) {
  ------------------
  |  Branch (29243:9): [True: 66, False: 1.95k]
  ------------------
29244|     66|        peg_panicf(b, "expected %d argument%s, got %d",
  ------------------
  |  |29240|    132|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  |  |  ------------------
  |  |  |  Branch (29240:71): [True: 13, False: 53]
  |  |  ------------------
  ------------------
29245|     66|                   arity,
29246|     66|                   arity == 1 ? "" : "s",
29247|     66|                   argc);
29248|     66|    }
29249|  2.02k|}
janet.c:peg_getnat:
29282|  1.50k|static int32_t peg_getnat(Builder *b, Janet x) {
29283|  1.50k|    int32_t i = peg_getinteger(b, x);
29284|  1.50k|    if (i < 0)
  ------------------
  |  Branch (29284:9): [True: 73, False: 1.43k]
  ------------------
29285|     73|        peg_panicf(b, "expected non-negative integer, got %v", x);
  ------------------
  |  |29240|     73|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29286|  1.43k|    return i;
29287|  1.50k|}
janet.c:emit_3:
29362|  2.03k|static void emit_3(Reserve r, uint32_t op, uint32_t arg1, uint32_t arg2, uint32_t arg3) {
29363|  2.03k|    uint32_t arr[3] = {arg1, arg2, arg3};
29364|  2.03k|    emit_rule(r, op, 3, arr);
29365|  2.03k|}
janet.c:spec_not:
29515|    121|static void spec_not(Builder *b, int32_t argc, const Janet *argv) {
29516|    121|    spec_onerule(b, argc, argv, RULE_NOT);
29517|    121|}
janet.c:spec_onerule:
29508|    223|static void spec_onerule(Builder *b, int32_t argc, const Janet *argv, uint32_t op) {
29509|    223|    peg_fixarity(b, argc, 1);
29510|    223|    Reserve r = reserve(b, 2);
29511|    223|    uint32_t rule = peg_compile1(b, argv[0]);
29512|    223|    emit_1(r, op, rule);
29513|    223|}
janet.c:spec_position:
29607|     77|static void spec_position(Builder *b, int32_t argc, const Janet *argv) {
29608|     77|    spec_tag1(b, argc, argv, RULE_POSITION);
29609|     77|}
janet.c:spec_tag1:
29599|    317|static void spec_tag1(Builder *b, int32_t argc, const Janet *argv, uint32_t op) {
29600|    317|    peg_arity(b, argc, 0, 1);
29601|    317|    Reserve r = reserve(b, 2);
29602|    317|    uint32_t tag = (argc) ? emit_tag(b, argv[0]) : 0;
  ------------------
  |  Branch (29602:20): [True: 26, False: 291]
  ------------------
29603|    317|    (void) argv;
29604|    317|    emit_1(r, op, tag);
29605|    317|}
janet.c:peg_arity:
29251|  16.1k|static void peg_arity(Builder *b, int32_t arity, int32_t min, int32_t max) {
29252|  16.1k|    if (min >= 0 && arity < min)
  ------------------
  |  Branch (29252:9): [True: 16.1k, False: 0]
  |  Branch (29252:21): [True: 25, False: 16.1k]
  ------------------
29253|     25|        peg_panicf(b, "arity mismatch, expected at least %d, got %d", min, arity);
  ------------------
  |  |29240|     25|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29254|  16.1k|    if (max >= 0 && arity > max)
  ------------------
  |  Branch (29254:9): [True: 16.0k, False: 111]
  |  Branch (29254:21): [True: 22, False: 15.9k]
  ------------------
29255|     22|        peg_panicf(b, "arity mismatch, expected at most %d, got %d", max, arity);
  ------------------
  |  |29240|     22|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29256|  16.1k|}
janet.c:emit_tag:
29299|    360|static uint32_t emit_tag(Builder *b, Janet t) {
29300|    360|    if (!janet_checktype(t, JANET_KEYWORD))
  ------------------
  |  |  806|    360|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 360]
  |  |  ------------------
  |  |  807|    360|        ? 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|    360|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|    360|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|    360|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    360|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    360|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (29300:9): [True: 39, False: 321]
  ------------------
29301|     39|        peg_panicf(b, "expected keyword for capture tag, got %v", t);
  ------------------
  |  |29240|     39|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29302|    321|    Janet check = janet_table_get(b->tags, t);
29303|    321|    if (janet_checktype(check, JANET_NIL)) {
  ------------------
  |  |  806|    321|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 265, False: 56]
  |  |  |  Branch (806:6): [Folded, False: 321]
  |  |  ------------------
  |  |  807|    321|        ? 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|    321|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|    321|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|    321|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    321|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    321|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29304|    265|        uint32_t tag = b->nexttag++;
29305|    265|        if (tag > 255) {
  ------------------
  |  Branch (29305:13): [True: 0, False: 265]
  ------------------
29306|      0|            peg_panic(b, "too many tags - up to 255 tags are supported per peg");
29307|      0|        }
29308|    265|        Janet val = janet_wrap_number(tag);
  ------------------
  |  |  835|    265|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
29309|    265|        janet_table_put(b->tags, t, val);
29310|    265|        return tag;
29311|    265|    } else {
29312|     56|        return (uint32_t) janet_unwrap_number(check);
  ------------------
  |  |  839|     56|#define janet_unwrap_number(x) ((x).number)
  ------------------
29313|     56|    }
29314|    321|}
janet.c:spec_accumulate:
29552|    272|static void spec_accumulate(Builder *b, int32_t argc, const Janet *argv) {
29553|    272|    spec_cap1(b, argc, argv, RULE_ACCUMULATE);
29554|    272|}
janet.c:spec_cap1:
29541|  14.0k|static void spec_cap1(Builder *b, int32_t argc, const Janet *argv, uint32_t op) {
29542|  14.0k|    peg_arity(b, argc, 1, 2);
29543|  14.0k|    Reserve r = reserve(b, 3);
29544|  14.0k|    uint32_t tag = (argc == 2) ? emit_tag(b, argv[1]) : 0;
  ------------------
  |  Branch (29544:20): [True: 26, False: 14.0k]
  ------------------
29545|  14.0k|    uint32_t rule = peg_compile1(b, argv[0]);
29546|  14.0k|    emit_2(r, op, rule, tag);
29547|  14.0k|}
janet.c:emit_2:
29358|  10.9k|static void emit_2(Reserve r, uint32_t op, uint32_t arg1, uint32_t arg2) {
29359|  10.9k|    uint32_t arr[2] = {arg1, arg2};
29360|  10.9k|    emit_rule(r, op, 2, arr);
29361|  10.9k|}
janet.c:spec_sequence:
29430|    394|static void spec_sequence(Builder *b, int32_t argc, const Janet *argv) {
29431|    394|    spec_variadic(b, argc, argv, RULE_SEQUENCE);
29432|    394|}
janet.c:spec_variadic:
29415|  1.21k|static void spec_variadic(Builder *b, int32_t argc, const Janet *argv, uint32_t op) {
29416|  1.21k|    uint32_t rule = janet_v_count(b->bytecode);
  ------------------
  |  |  736|  1.21k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|  1.02k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  1.02k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 1.02k, False: 191]
  |  |  ------------------
  ------------------
29417|  1.21k|    janet_v_push(b->bytecode, op);
  ------------------
  |  |  734|  1.21k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|  1.21k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|  1.21k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|  1.02k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  1.02k|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  742|  1.02k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  1.02k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 191, False: 1.02k]
  |  |  |  |  |  |  |  Branch (745:50): [True: 245, False: 781]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|    436|#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))
  |  |  ------------------
  |  |  |  |  743|  1.21k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  1.21k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29418|  1.21k|    janet_v_push(b->bytecode, argc);
  ------------------
  |  |  734|  1.21k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|  1.21k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|  1.21k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|  1.21k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  1.21k|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  742|  1.21k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  1.21k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 0, False: 1.21k]
  |  |  |  |  |  |  |  Branch (745:50): [True: 250, False: 967]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|    250|#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))
  |  |  ------------------
  |  |  |  |  743|  1.21k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  1.21k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29419|  5.78k|    for (int32_t i = 0; i < argc; i++)
  ------------------
  |  Branch (29419:25): [True: 4.56k, False: 1.21k]
  ------------------
29420|  4.56k|        janet_v_push(b->bytecode, 0);
  ------------------
  |  |  734|  4.56k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|  4.56k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|  4.56k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|  4.56k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  4.56k|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  742|  4.56k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  4.56k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 0, False: 4.56k]
  |  |  |  |  |  |  |  Branch (745:50): [True: 657, False: 3.90k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|    657|#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))
  |  |  ------------------
  |  |  |  |  743|  4.56k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  4.56k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29421|  5.44k|    for (int32_t i = 0; i < argc; i++) {
  ------------------
  |  Branch (29421:25): [True: 4.23k, False: 1.21k]
  ------------------
29422|  4.23k|        uint32_t rulei = peg_compile1(b, argv[i]);
29423|  4.23k|        b->bytecode[rule + 2 + i] = rulei;
29424|  4.23k|    }
29425|  1.21k|}
janet.c:spec_choice:
29427|    823|static void spec_choice(Builder *b, int32_t argc, const Janet *argv) {
29428|    823|    spec_variadic(b, argc, argv, RULE_CHOICE);
29429|    823|}
janet.c:spec_reference:
29590|    190|static void spec_reference(Builder *b, int32_t argc, const Janet *argv) {
29591|    190|    peg_arity(b, argc, 1, 2);
29592|    190|    Reserve r = reserve(b, 3);
29593|    190|    uint32_t search = emit_tag(b, argv[0]);
29594|    190|    uint32_t tag = (argc == 2) ? emit_tag(b, argv[1]) : 0;
  ------------------
  |  Branch (29594:20): [True: 32, False: 158]
  ------------------
29595|    190|    b->has_backref = 1;
29596|    190|    emit_2(r, RULE_GETTAG, search, tag);
29597|    190|}
janet.c:spec_replace:
29645|    699|static void spec_replace(Builder *b, int32_t argc, const Janet *argv) {
29646|    699|    peg_arity(b, argc, 2, 3);
29647|    699|    Reserve r = reserve(b, 4);
29648|    699|    uint32_t subrule = peg_compile1(b, argv[0]);
29649|    699|    uint32_t constant = emit_constant(b, argv[1]);
29650|    699|    uint32_t tag = (argc == 3) ? emit_tag(b, argv[2]) : 0;
  ------------------
  |  Branch (29650:20): [True: 77, False: 622]
  ------------------
29651|    699|    emit_3(r, RULE_REPLACE, subrule, constant, tag);
29652|    699|}
janet.c:emit_constant:
29293|    663|static uint32_t emit_constant(Builder *b, Janet c) {
29294|    663|    uint32_t cindex = (uint32_t) janet_v_count(b->constants);
  ------------------
  |  |  736|    663|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|     98|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|     98|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 98, False: 565]
  |  |  ------------------
  ------------------
29295|       |    janet_v_push(b->constants, c);
  ------------------
  |  |  734|    663|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|    663|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|    663|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|     98|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|     98|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  742|     98|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|     98|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 565, False: 98]
  |  |  |  |  |  |  |  Branch (745:50): [True: 67, False: 31]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|    632|#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))
  |  |  ------------------
  |  |  |  |  743|    663|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|    663|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29296|    663|    return cindex;
29297|    663|}
janet.c:spec_capture:
29549|  13.7k|static void spec_capture(Builder *b, int32_t argc, const Janet *argv) {
29550|  13.7k|    spec_cap1(b, argc, argv, RULE_CAPTURE);
29551|  13.7k|}
janet.c:spec_look:
29405|    164|static void spec_look(Builder *b, int32_t argc, const Janet *argv) {
29406|    164|    peg_arity(b, argc, 1, 2);
29407|    164|    Reserve r = reserve(b, 3);
29408|    164|    int32_t rulearg = argc == 2 ? 1 : 0;
  ------------------
  |  Branch (29408:23): [True: 62, False: 102]
  ------------------
29409|    164|    int32_t offset = argc == 2 ? peg_getinteger(b, argv[0]) : 0;
  ------------------
  |  Branch (29409:22): [True: 62, False: 102]
  ------------------
29410|    164|    uint32_t subrule = peg_compile1(b, argv[rulearg]);
29411|    164|    emit_2(r, RULE_LOOK, (uint32_t) offset, subrule);
29412|    164|}
janet.c:spec_opt:
29492|     62|static void spec_opt(Builder *b, int32_t argc, const Janet *argv) {
29493|     62|    peg_fixarity(b, argc, 1);
29494|     62|    Reserve r = reserve(b, 4);
29495|     62|    uint32_t subrule = peg_compile1(b, argv[0]);
29496|     62|    emit_3(r, RULE_BETWEEN, 0, 1, subrule);
29497|     62|}
janet.c:spec_debug:
29637|    368|static void spec_debug(Builder *b, int32_t argc, const Janet *argv) {
29638|    368|    peg_arity(b, argc, 0, 0);
29639|    368|    Reserve r = reserve(b, 1);
29640|    368|    uint32_t empty = 0;
29641|    368|    (void) argv;
29642|    368|    emit_rule(r, RULE_DEBUG, 0, &empty);
29643|    368|}
janet.c:spec_any:
29472|     63|static void spec_any(Builder *b, int32_t argc, const Janet *argv) {
29473|     63|    spec_repeater(b, argc, argv, 0);
29474|     63|}
janet.c:spec_repeater:
29462|     63|static void spec_repeater(Builder *b, int32_t argc, const Janet *argv, int32_t min) {
29463|     63|    peg_fixarity(b, argc, 1);
29464|     63|    Reserve r = reserve(b, 4);
29465|     63|    uint32_t subrule = peg_compile1(b, argv[0]);
29466|       |    emit_3(r, RULE_BETWEEN, min, UINT32_MAX, subrule);
29467|     63|}
janet.c:spec_matchtime_splice:
29672|     17|static void spec_matchtime_splice(Builder *b, int32_t argc, const Janet *argv) {
29673|     17|    spec_matchtime_impl(b, argc, argv, RULE_MATCHSPLICE);
29674|     17|}
janet.c:spec_matchtime_impl:
29654|     62|static void spec_matchtime_impl(Builder *b, int32_t argc, const Janet *argv, uint32_t op) {
29655|     62|    peg_arity(b, argc, 2, 3);
29656|     62|    Reserve r = reserve(b, 4);
29657|     62|    uint32_t subrule = peg_compile1(b, argv[0]);
29658|     62|    Janet fun = argv[1];
29659|     62|    if (!janet_checktype(fun, JANET_FUNCTION) &&
  ------------------
  |  |  806|    124|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 62]
  |  |  ------------------
  |  |  807|    124|        ? 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|    124|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|     62|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|     62|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     62|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     62|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (29659:9): [True: 29, False: 33]
  ------------------
29660|     29|            !janet_checktype(fun, JANET_CFUNCTION)) {
  ------------------
  |  |  806|     29|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 29]
  |  |  ------------------
  |  |  807|     29|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|     29|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|     29|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|     29|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     29|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     29|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (29660:13): [True: 29, False: 0]
  ------------------
29661|     29|        peg_panicf(b, "expected function or cfunction, got %v", fun);
  ------------------
  |  |29240|     29|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29662|     29|    }
29663|     33|    uint32_t tag = (argc == 3) ? emit_tag(b, argv[2]) : 0;
  ------------------
  |  Branch (29663:20): [True: 0, False: 33]
  ------------------
29664|     33|    uint32_t cindex = emit_constant(b, fun);
29665|     33|    emit_3(r, op, subrule, cindex, tag);
29666|     33|}
janet.c:spec_matchtime:
29668|     45|static void spec_matchtime(Builder *b, int32_t argc, const Janet *argv) {
29669|     45|    spec_matchtime_impl(b, argc, argv, RULE_MATCHTIME);
29670|     45|}
janet.c:spec_column:
29613|     16|static void spec_column(Builder *b, int32_t argc, const Janet *argv) {
29614|     16|    spec_tag1(b, argc, argv, RULE_COLUMN);
29615|     16|}
janet.c:spec_error:
29518|     42|static void spec_error(Builder *b, int32_t argc, const Janet *argv) {
29519|     42|    if (argc == 0) {
  ------------------
  |  Branch (29519:9): [True: 5, False: 37]
  ------------------
29520|      5|        Reserve r = reserve(b, 2);
29521|      5|        uint32_t rule = peg_compile1(b, janet_wrap_number(0));
  ------------------
  |  |  835|      5|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
29522|      5|        emit_1(r, RULE_ERROR, rule);
29523|     37|    } else {
29524|     37|        spec_onerule(b, argc, argv, RULE_ERROR);
29525|     37|    }
29526|     42|}
janet.c:spec_if:
29443|     82|static void spec_if(Builder *b, int32_t argc, const Janet *argv) {
29444|     82|    spec_branch(b, argc, argv, RULE_IF);
29445|     82|}
janet.c:spec_branch:
29435|     82|static void spec_branch(Builder *b, int32_t argc, const Janet *argv, uint32_t rule) {
29436|     82|    peg_fixarity(b, argc, 2);
29437|     82|    Reserve r = reserve(b, 3);
29438|     82|    uint32_t rule_a = peg_compile1(b, argv[0]);
29439|     82|    uint32_t rule_b = peg_compile1(b, argv[1]);
29440|     82|    emit_2(r, rule, rule_a, rule_b);
29441|     82|}
janet.c:spec_int_le:
29720|    115|static void spec_int_le(Builder *b, int32_t argc, const Janet *argv) {
29721|    115|    spec_readint(b, argc, argv, 0x10u);
29722|    115|}
janet.c:spec_readint:
29706|    144|static void spec_readint(Builder *b, int32_t argc, const Janet *argv, uint32_t mask) {
29707|    144|    peg_arity(b, argc, 1, 2);
29708|    144|    Reserve r = reserve(b, 3);
29709|    144|    uint32_t tag = (argc == 2) ? emit_tag(b, argv[1]) : 0;
  ------------------
  |  Branch (29709:20): [True: 10, False: 134]
  ------------------
29710|    144|    int32_t width = peg_getnat(b, argv[0]);
29711|    144|    if ((width < 0) || (width > JANET_MAX_READINT_WIDTH)) {
  ------------------
  |  |29701|     95|#define JANET_MAX_READINT_WIDTH 8
  ------------------
  |  Branch (29711:9): [True: 49, False: 95]
  |  Branch (29711:24): [True: 15, False: 80]
  ------------------
29712|     15|        peg_panicf(b, "width must be between 0 and %d, got %d", JANET_MAX_READINT_WIDTH, width);
  ------------------
  |  |29240|     15|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29713|     15|    }
29714|    129|    emit_2(r, RULE_READINT, mask | ((uint32_t) width), tag);
29715|    129|}
janet.c:spec_line:
29610|    224|static void spec_line(Builder *b, int32_t argc, const Janet *argv) {
29611|    224|    spec_tag1(b, argc, argv, RULE_LINE);
29612|    224|}
janet.c:spec_nth:
29562|     22|static void spec_nth(Builder *b, int32_t argc, const Janet *argv) {
29563|     22|    peg_arity(b, argc, 2, 3);
29564|     22|    Reserve r = reserve(b, 4);
29565|     22|    uint32_t nth = peg_getnat(b, argv[0]);
29566|     22|    uint32_t rule = peg_compile1(b, argv[1]);
29567|     22|    uint32_t tag = (argc == 3) ? emit_tag(b, argv[2]) : 0;
  ------------------
  |  Branch (29567:20): [True: 1, False: 21]
  ------------------
29568|     22|    emit_3(r, RULE_NTH, nth, rule, tag);
29569|     22|}
janet.c:spec_range:
29375|    113|static void spec_range(Builder *b, int32_t argc, const Janet *argv) {
29376|    113|    peg_arity(b, argc, 1, -1);
29377|    113|    if (argc == 1) {
  ------------------
  |  Branch (29377:9): [True: 73, False: 40]
  ------------------
29378|     73|        Reserve r = reserve(b, 2);
29379|     73|        const uint8_t *str = peg_getrange(b, argv[0]);
29380|     73|        uint32_t arg = str[0] | (str[1] << 16);
29381|     73|        emit_1(r, RULE_RANGE, arg);
29382|     73|    } else {
29383|       |        /* Compile as a set */
29384|     40|        Reserve r = reserve(b, 9);
29385|     40|        uint32_t bitmap[8] = {0};
29386|     93|        for (int32_t i = 0; i < argc; i++) {
  ------------------
  |  Branch (29386:29): [True: 53, False: 40]
  ------------------
29387|     53|            const uint8_t *str = peg_getrange(b, argv[i]);
29388|    984|            for (uint32_t c = str[0]; c <= str[1]; c++)
  ------------------
  |  Branch (29388:39): [True: 931, False: 53]
  ------------------
29389|    931|                bitmap_set(bitmap, c);
29390|     53|        }
29391|     40|        emit_rule(r, RULE_SET, 8, bitmap);
29392|     40|    }
29393|    113|}
janet.c:peg_getrange:
29265|    126|static const uint8_t *peg_getrange(Builder *b, Janet x) {
29266|    126|    if (!janet_checktype(x, JANET_STRING))
  ------------------
  |  |  806|    126|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 126]
  |  |  ------------------
  |  |  807|    126|        ? 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|    126|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|    126|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|    126|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    126|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    126|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (29266:9): [True: 49, False: 77]
  ------------------
29267|     49|        peg_panic(b, "expected string for character range");
29268|     77|    const uint8_t *str = janet_unwrap_string(x);
  ------------------
  |  |  863|     77|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
29269|     77|    if (janet_string_length(str) != 2)
  ------------------
  |  | 1813|     77|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|     77|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (29269:9): [True: 13, False: 64]
  ------------------
29270|     13|        peg_panicf(b, "expected string to have length 2, got %v", x);
  ------------------
  |  |29240|     13|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29271|     64|    if (str[1] < str[0])
  ------------------
  |  Branch (29271:9): [True: 3, False: 61]
  ------------------
29272|      3|        peg_panicf(b, "range %v is empty", x);
  ------------------
  |  |29240|      3|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29273|     61|    return str;
29274|     64|}
janet.c:bitmap_set:
29371|  1.55k|static void bitmap_set(uint32_t *bitmap, uint8_t c) {
29372|  1.55k|    bitmap[c >> 5] |= ((uint32_t)1) << (c & 0x1F);
29373|  1.55k|}
janet.c:spec_set:
29395|     31|static void spec_set(Builder *b, int32_t argc, const Janet *argv) {
29396|     31|    peg_fixarity(b, argc, 1);
29397|     31|    Reserve r = reserve(b, 9);
29398|     31|    const uint8_t *str = peg_getset(b, argv[0]);
29399|     31|    uint32_t bitmap[8] = {0};
29400|    653|    for (int32_t i = 0; i < janet_string_length(str); i++)
  ------------------
  |  | 1813|    653|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|    653|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (29400:25): [True: 622, False: 31]
  ------------------
29401|    622|        bitmap_set(bitmap, str[i]);
29402|     31|    emit_rule(r, RULE_SET, 8, bitmap);
29403|     31|}
janet.c:peg_getset:
29258|     30|static const uint8_t *peg_getset(Builder *b, Janet x) {
29259|     30|    if (!janet_checktype(x, JANET_STRING))
  ------------------
  |  |  806|     30|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 30]
  |  |  ------------------
  |  |  807|     30|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|     30|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|     30|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|     30|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     30|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     30|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (29259:9): [True: 8, False: 22]
  ------------------
29260|      8|        peg_panic(b, "expected string for character set");
29261|     22|    const uint8_t *str = janet_unwrap_string(x);
  ------------------
  |  |  863|     22|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
29262|     22|    return str;
29263|     30|}
janet.c:spec_sub:
29676|     40|static void spec_sub(Builder *b, int32_t argc, const Janet *argv) {
29677|     40|    peg_fixarity(b, argc, 2);
29678|     40|    Reserve r = reserve(b, 3);
29679|     40|    uint32_t subrule1 = peg_compile1(b, argv[0]);
29680|     40|    uint32_t subrule2 = peg_compile1(b, argv[1]);
29681|     40|    emit_2(r, RULE_SUB, subrule1, subrule2);
29682|     40|}
janet.c:spec_til:
29684|    129|static void spec_til(Builder *b, int32_t argc, const Janet *argv) {
29685|    129|    peg_fixarity(b, argc, 2);
29686|    129|    Reserve r = reserve(b, 3);
29687|    129|    uint32_t subrule1 = peg_compile1(b, argv[0]);
29688|    129|    uint32_t subrule2 = peg_compile1(b, argv[1]);
29689|    129|    emit_2(r, RULE_TIL, subrule1, subrule2);
29690|    129|}
janet.c:spec_to:
29527|     65|static void spec_to(Builder *b, int32_t argc, const Janet *argv) {
29528|     65|    spec_onerule(b, argc, argv, RULE_TO);
29529|     65|}
janet.c:spec_uint_le:
29717|     29|static void spec_uint_le(Builder *b, int32_t argc, const Janet *argv) {
29718|     29|    spec_readint(b, argc, argv, 0x0u);
29719|     29|}
janet.c:make_peg:
30244|  2.18k|static JanetPeg *make_peg(Builder *b) {
30245|  2.18k|    size_t bytecode_start = size_padded(sizeof(JanetPeg), sizeof(uint32_t));
30246|  2.18k|    size_t bytecode_size = janet_v_count(b->bytecode) * sizeof(uint32_t);
  ------------------
  |  |  736|  2.18k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|  2.18k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  2.18k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 2.18k, False: 0]
  |  |  ------------------
  ------------------
30247|  2.18k|    size_t constants_start = size_padded(bytecode_start + bytecode_size, sizeof(Janet));
30248|  2.18k|    size_t constants_size = janet_v_count(b->constants) * sizeof(Janet);
  ------------------
  |  |  736|  2.18k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|    554|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|    554|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 554, False: 1.63k]
  |  |  ------------------
  ------------------
30249|  2.18k|    size_t total_size = constants_start + constants_size;
30250|  2.18k|    char *mem = janet_abstract(&janet_peg_type, total_size);
30251|  2.18k|    JanetPeg *peg = (JanetPeg *)mem;
30252|  2.18k|    peg->bytecode = (uint32_t *)(mem + bytecode_start);
30253|  2.18k|    peg->constants = (Janet *)(mem + constants_start);
30254|  2.18k|    peg->num_constants = janet_v_count(b->constants);
  ------------------
  |  |  736|  2.18k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|    554|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|    554|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 554, False: 1.63k]
  |  |  ------------------
  ------------------
30255|  2.18k|    safe_memcpy(peg->bytecode, b->bytecode, bytecode_size);
30256|  2.18k|    safe_memcpy(peg->constants, b->constants, constants_size);
30257|       |    peg->bytecode_len = janet_v_count(b->bytecode);
  ------------------
  |  |  736|  2.18k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|  2.18k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  2.18k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 2.18k, False: 0]
  |  |  ------------------
  ------------------
30258|  2.18k|    peg->has_backref = b->has_backref;
30259|  2.18k|    return peg;
30260|  2.18k|}
janet.c:builder_cleanup:
29230|  4.85k|static void builder_cleanup(Builder *b) {
29231|  4.85k|    janet_v_free(b->constants);
  ------------------
  |  |  733|  4.85k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  741|    565|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (733:34): [True: 565, False: 4.28k]
  |  |  ------------------
  ------------------
29232|       |    janet_v_free(b->bytecode);
  ------------------
  |  |  733|  4.85k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  741|  2.73k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (733:34): [True: 2.73k, False: 2.11k]
  |  |  ------------------
  ------------------
29233|  4.85k|}
janet.c:peg_cfun_init:
30312|  4.85k|static PegCall peg_cfun_init(int32_t argc, Janet *argv, int get_replace) {
30313|  4.85k|    PegCall ret;
30314|  4.85k|    int32_t min = get_replace ? 3 : 2;
  ------------------
  |  Branch (30314:19): [True: 0, False: 4.85k]
  ------------------
30315|  4.85k|    janet_arity(argc, min, -1);
30316|  4.85k|    if (janet_checktype(argv[0], JANET_ABSTRACT) &&
  ------------------
  |  |  806|  9.70k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 200, False: 4.65k]
  |  |  |  Branch (806:6): [Folded, False: 4.85k]
  |  |  ------------------
  |  |  807|  9.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|  9.70k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  4.85k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  4.85k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  4.85k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  4.85k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30317|    200|            janet_abstract_type(janet_unwrap_abstract(argv[0])) == &janet_peg_type) {
  ------------------
  |  | 1899|    200|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|    200|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (30317:13): [True: 0, False: 200]
  ------------------
30318|      0|        ret.peg = janet_unwrap_abstract(argv[0]);
  ------------------
  |  |  866|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
30319|  4.85k|    } else {
30320|  4.85k|        ret.peg = compile_peg(argv[0]);
30321|  4.85k|    }
30322|  4.85k|    int input_loc = 1;
30323|  4.85k|    if (get_replace) {
  ------------------
  |  Branch (30323:9): [True: 0, False: 4.85k]
  ------------------
30324|      0|        ret.subst = argv[1];
30325|      0|        input_loc = 2;
30326|      0|    }
30327|  4.85k|    ret.bytes = janet_getbytes(argv, input_loc);
30328|  4.85k|    if (janet_checktype(argv[input_loc], JANET_BUFFER)) {
  ------------------
  |  |  806|  4.85k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 4.85k]
  |  |  |  Branch (806:6): [Folded, False: 4.85k]
  |  |  ------------------
  |  |  807|  4.85k|        ? 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.85k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  4.85k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  4.85k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  4.85k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  4.85k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30329|      0|        ret.input_buffer = janet_unwrap_buffer(argv[input_loc]);
  ------------------
  |  |  862|      0|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
30330|      0|        ret.old_flags = ret.input_buffer->gc.flags;
30331|      0|        ret.input_buffer->gc.flags |= JANET_BUFFER_FLAG_NO_REALLOC;
  ------------------
  |  | 1780|      0|#define JANET_BUFFER_FLAG_NO_REALLOC 0x10000
  ------------------
30332|  4.85k|    } else {
30333|  4.85k|        ret.input_buffer = NULL;
30334|  4.85k|    }
30335|  4.85k|    if (argc > min) {
  ------------------
  |  Branch (30335:9): [True: 0, False: 4.85k]
  ------------------
30336|      0|        ret.start = janet_gethalfrange(argv, min, ret.bytes.len, "offset");
30337|      0|        ret.s.extrac = argc - min - 1;
30338|      0|        ret.s.extrav = janet_tuple_n(argv + min + 1, argc - min - 1);
30339|  4.85k|    } else {
30340|  4.85k|        ret.start = 0;
30341|  4.85k|        ret.s.extrac = 0;
30342|  4.85k|        ret.s.extrav = NULL;
30343|  4.85k|    }
30344|  4.85k|    ret.s.mode = PEG_MODE_NORMAL;
30345|  4.85k|    ret.s.text_start = ret.bytes.bytes;
30346|  4.85k|    ret.s.text_end = ret.bytes.bytes + ret.bytes.len;
30347|  4.85k|    ret.s.outer_text_end = ret.s.text_end;
30348|  4.85k|    ret.s.depth = JANET_RECURSION_GUARD;
  ------------------
  |  |  296|  4.85k|#define JANET_RECURSION_GUARD 1024
  ------------------
30349|  4.85k|    ret.s.captures = janet_array(0);
30350|  4.85k|    ret.s.tagged_captures = janet_array(0);
30351|  4.85k|    ret.s.scratch = janet_buffer(10);
30352|  4.85k|    ret.s.tags = janet_buffer(10);
30353|  4.85k|    ret.s.constants = ret.peg->constants;
30354|  4.85k|    ret.s.bytecode = ret.peg->bytecode;
30355|       |    ret.s.linemap = NULL;
30356|  4.85k|    ret.s.linemaplen = -1;
30357|  4.85k|    ret.s.has_backref = ret.peg->has_backref;
30358|  4.85k|    return ret;
30359|  4.85k|}
janet.c:peg_rule:
28538|   647M|    const uint8_t *text) {
28539|   749M|tail:
28540|   749M|    switch (*rule) {
28541|      0|        default:
  ------------------
  |  Branch (28541:9): [True: 0, False: 749M]
  ------------------
28542|      0|            janet_panic("unexpected opcode");
28543|      0|            return NULL;
28544|       |
28545|  4.04M|        case RULE_LITERAL: {
  ------------------
  |  Branch (28545:9): [True: 4.04M, False: 745M]
  ------------------
28546|  4.04M|            uint32_t len = rule[1];
28547|  4.04M|            if (text + len > s->text_end) return NULL;
  ------------------
  |  Branch (28547:17): [True: 490, False: 4.04M]
  ------------------
28548|  4.04M|            return memcmp(text, rule + 2, len) ? NULL : text + len;
  ------------------
  |  Branch (28548:20): [True: 2.07k, False: 4.04M]
  ------------------
28549|  4.04M|        }
28550|       |
28551|  59.9k|        case RULE_DEBUG: {
  ------------------
  |  Branch (28551:9): [True: 59.9k, False: 749M]
  ------------------
28552|  59.9k|            char buffer[32] = {0};
28553|  59.9k|            size_t len = (size_t)(s->outer_text_end - text);
28554|  59.9k|            memcpy(buffer, text, (len > 31 ? 31 : len));
  ------------------
  |  Branch (28554:35): [True: 2.30k, False: 57.6k]
  ------------------
28555|  59.9k|            janet_eprintf("?? at [%s] (index %d)\n", buffer, (int32_t)(text - s->text_start));
  ------------------
  |  | 2195|  59.9k|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
28556|  59.9k|            int has_color = janet_truthy(janet_dyn("err-color"));
  ------------------
  |  |  818|  59.9k|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  806|   119k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 59.9k]
  |  |  |  |  ------------------
  |  |  |  |  807|   119k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|   119k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|  59.9k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|  59.9k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  59.9k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  59.9k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (818:6): [True: 0, False: 59.9k]
  |  |  ------------------
  |  |  819|  59.9k|     (!janet_checktype((x), JANET_BOOLEAN) || ((x).u64 & 0x1)))
  |  |  ------------------
  |  |  |  |  806|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  807|      0|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (819:7): [True: 0, False: 0]
  |  |  |  Branch (819:47): [True: 0, False: 0]
  |  |  ------------------
  ------------------
28557|       |            /* Accumulate buffer */
28558|  59.9k|            if (s->scratch->count) {
  ------------------
  |  Branch (28558:17): [True: 1.15k, False: 58.8k]
  ------------------
28559|  1.15k|                janet_eprintf("accumulate buffer: %v\n", janet_wrap_buffer(s->scratch));
  ------------------
  |  | 2195|  1.15k|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
28560|  1.15k|            }
28561|       |            /* Normal captures */
28562|  59.9k|            if (s->captures->count) {
  ------------------
  |  Branch (28562:17): [True: 42.9k, False: 16.9k]
  ------------------
28563|  42.9k|                janet_eprintf("stack [%d]:\n", s->captures->count);
  ------------------
  |  | 2195|  42.9k|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
28564|  15.2M|                for (int32_t i = 0; i < s->captures->count; i++) {
  ------------------
  |  Branch (28564:37): [True: 15.2M, False: 42.9k]
  ------------------
28565|  15.2M|                    if (has_color) {
  ------------------
  |  Branch (28565:25): [True: 0, False: 15.2M]
  ------------------
28566|      0|                        janet_eprintf("  [%d]: %M\n", i, s->captures->data[i]);
  ------------------
  |  | 2195|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
28567|  15.2M|                    } else {
28568|  15.2M|                        janet_eprintf("  [%d]: %m\n", i, s->captures->data[i]);
  ------------------
  |  | 2195|  15.2M|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
28569|  15.2M|                    }
28570|  15.2M|                }
28571|  42.9k|            }
28572|       |            /* Tagged captures */
28573|  59.9k|            if (s->tagged_captures->count) {
  ------------------
  |  Branch (28573:17): [True: 785, False: 59.1k]
  ------------------
28574|    785|                janet_eprintf("tag stack [%d]:\n", s->tagged_captures->count);
  ------------------
  |  | 2195|    785|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
28575|  1.28M|                for (int32_t i = 0; i < s->tagged_captures->count; i++) {
  ------------------
  |  Branch (28575:37): [True: 1.28M, False: 785]
  ------------------
28576|  1.28M|                    if (has_color) {
  ------------------
  |  Branch (28576:25): [True: 0, False: 1.28M]
  ------------------
28577|      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__)
  ------------------
28578|  1.28M|                    } else {
28579|  1.28M|                        janet_eprintf("  [%d] tag=%d: %m\n", i, (int32_t) s->tags->data[i], s->tagged_captures->data[i]);
  ------------------
  |  | 2195|  1.28M|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
28580|  1.28M|                    }
28581|  1.28M|                }
28582|    785|            }
28583|  59.9k|            return text;
28584|  4.04M|        }
28585|       |
28586|   181M|        case RULE_NCHAR: {
  ------------------
  |  Branch (28586:9): [True: 181M, False: 568M]
  ------------------
28587|   181M|            uint32_t n = rule[1];
28588|   181M|            return (text + n > s->text_end) ? NULL : text + n;
  ------------------
  |  Branch (28588:20): [True: 56.0M, False: 125M]
  ------------------
28589|  4.04M|        }
28590|       |
28591|  6.20k|        case RULE_NOTNCHAR: {
  ------------------
  |  Branch (28591:9): [True: 6.20k, False: 749M]
  ------------------
28592|  6.20k|            uint32_t n = rule[1];
28593|  6.20k|            return (text + n > s->text_end) ? text : NULL;
  ------------------
  |  Branch (28593:20): [True: 5.98k, False: 223]
  ------------------
28594|  4.04M|        }
28595|       |
28596|  7.43k|        case RULE_RANGE: {
  ------------------
  |  Branch (28596:9): [True: 7.43k, False: 749M]
  ------------------
28597|  7.43k|            uint8_t lo = rule[1] & 0xFF;
28598|  7.43k|            uint8_t hi = (rule[1] >> 16) & 0xFF;
28599|  7.43k|            return (text < s->text_end &&
  ------------------
  |  Branch (28599:21): [True: 6.16k, False: 1.26k]
  ------------------
28600|  6.16k|                    text[0] >= lo &&
  ------------------
  |  Branch (28600:21): [True: 1.54k, False: 4.61k]
  ------------------
28601|  1.54k|                    text[0] <= hi)
  ------------------
  |  Branch (28601:21): [True: 211, False: 1.33k]
  ------------------
28602|  7.43k|                   ? text + 1
28603|  7.43k|                   : NULL;
28604|  4.04M|        }
28605|       |
28606|    227|        case RULE_SET: {
  ------------------
  |  Branch (28606:9): [True: 227, False: 749M]
  ------------------
28607|    227|            if (text >= s->text_end) return NULL;
  ------------------
  |  Branch (28607:17): [True: 7, False: 220]
  ------------------
28608|    220|            uint32_t word = rule[1 + (text[0] >> 5)];
28609|    220|            uint32_t mask = (uint32_t)1 << (text[0] & 0x1F);
28610|    220|            return (word & mask)
  ------------------
  |  Branch (28610:20): [True: 6, False: 214]
  ------------------
28611|    220|                   ? text + 1
28612|    220|                   : NULL;
28613|    227|        }
28614|       |
28615|  21.7k|        case RULE_LOOK: {
  ------------------
  |  Branch (28615:9): [True: 21.7k, False: 749M]
  ------------------
28616|  21.7k|            text += ((int32_t *)rule)[1];
28617|  21.7k|            if (text < s->text_start || text > s->text_end) return NULL;
  ------------------
  |  Branch (28617:17): [True: 1.70k, False: 20.0k]
  |  Branch (28617:41): [True: 8.96k, False: 11.0k]
  ------------------
28618|  11.0k|            down1(s);
  ------------------
  |  |28523|  11.0k|#define down1(s) do { \
  |  |28524|  11.0k|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28524:9): [True: 0, False: 11.0k]
  |  |  ------------------
  |  |28525|  11.0k|} while (0)
  |  |  ------------------
  |  |  |  Branch (28525:10): [Folded, False: 11.0k]
  |  |  ------------------
  ------------------
28619|  11.0k|            const uint8_t *result = peg_rule(s, s->bytecode + rule[2], text);
28620|  11.0k|            up1(s);
  ------------------
  |  |28526|  11.0k|#define up1(s) ((s)->depth++)
  ------------------
28621|  11.0k|            text -= ((int32_t *)rule)[1];
28622|  11.0k|            return result ? text : NULL;
  ------------------
  |  Branch (28622:20): [True: 1.91k, False: 9.14k]
  ------------------
28623|  11.0k|        }
28624|       |
28625|  56.6M|        case RULE_CHOICE: {
  ------------------
  |  Branch (28625:9): [True: 56.6M, False: 692M]
  ------------------
28626|  56.6M|            uint32_t len = rule[1];
28627|  56.6M|            const uint32_t *args = rule + 2;
28628|  56.6M|            if (len == 0) return NULL;
  ------------------
  |  Branch (28628:17): [True: 368, False: 56.6M]
  ------------------
28629|  56.6M|            down1(s);
  ------------------
  |  |28523|  56.6M|#define down1(s) do { \
  |  |28524|  56.6M|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28524:9): [True: 0, False: 56.6M]
  |  |  ------------------
  |  |28525|  56.6M|} while (0)
  |  |  ------------------
  |  |  |  Branch (28525:10): [Folded, False: 56.6M]
  |  |  ------------------
  ------------------
28630|  56.6M|            CapState cs = cap_save(s);
28631|   112M|            for (uint32_t i = 0; i < len - 1; i++) {
  ------------------
  |  Branch (28631:34): [True: 57.2M, False: 55.3M]
  ------------------
28632|  57.2M|                const uint8_t *result = peg_rule(s, s->bytecode + args[i], text);
28633|  57.2M|                if (result) {
  ------------------
  |  Branch (28633:21): [True: 1.24M, False: 56.0M]
  ------------------
28634|  1.24M|                    up1(s);
  ------------------
  |  |28526|  1.24M|#define up1(s) ((s)->depth++)
  ------------------
28635|  1.24M|                    return result;
28636|  1.24M|                }
28637|  56.0M|                cap_load(s, cs);
28638|  56.0M|            }
28639|  55.3M|            up1(s);
  ------------------
  |  |28526|  55.3M|#define up1(s) ((s)->depth++)
  ------------------
28640|  55.3M|            rule = s->bytecode + args[len - 1];
28641|  55.3M|            goto tail;
28642|  56.6M|        }
28643|       |
28644|  46.7M|        case RULE_SEQUENCE: {
  ------------------
  |  Branch (28644:9): [True: 46.7M, False: 702M]
  ------------------
28645|  46.7M|            uint32_t len = rule[1];
28646|  46.7M|            const uint32_t *args = rule + 2;
28647|  46.7M|            if (len == 0) return text;
  ------------------
  |  Branch (28647:17): [True: 6.12k, False: 46.7M]
  ------------------
28648|  46.7M|            down1(s);
  ------------------
  |  |28523|  46.7M|#define down1(s) do { \
  |  |28524|  46.7M|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28524:9): [True: 0, False: 46.7M]
  |  |  ------------------
  |  |28525|  46.7M|} while (0)
  |  |  ------------------
  |  |  |  Branch (28525:10): [Folded, False: 46.7M]
  |  |  ------------------
  ------------------
28649|  93.9M|            for (uint32_t i = 0; text && i < len - 1; i++)
  ------------------
  |  Branch (28649:34): [True: 93.9M, False: 358]
  |  Branch (28649:42): [True: 47.1M, False: 46.7M]
  ------------------
28650|  47.1M|                text = peg_rule(s, s->bytecode + args[i], text);
28651|  46.7M|            up1(s);
  ------------------
  |  |28526|  46.7M|#define up1(s) ((s)->depth++)
  ------------------
28652|  46.7M|            if (!text) return NULL;
  ------------------
  |  Branch (28652:17): [True: 358, False: 46.7M]
  ------------------
28653|  46.7M|            rule = s->bytecode + args[len - 1];
28654|  46.7M|            goto tail;
28655|  46.7M|        }
28656|       |
28657|  6.12k|        case RULE_IF: {
  ------------------
  |  Branch (28657:9): [True: 6.12k, False: 749M]
  ------------------
28658|  6.12k|            const uint32_t *rule_a = s->bytecode + rule[1];
28659|  6.12k|            const uint32_t *rule_b = s->bytecode + rule[2];
28660|  6.12k|            down1(s);
  ------------------
  |  |28523|  6.12k|#define down1(s) do { \
  |  |28524|  6.12k|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28524:9): [True: 0, False: 6.12k]
  |  |  ------------------
  |  |28525|  6.12k|} while (0)
  |  |  ------------------
  |  |  |  Branch (28525:10): [Folded, False: 6.12k]
  |  |  ------------------
  ------------------
28661|  6.12k|            const uint8_t *result = peg_rule(s, rule_a, text);
28662|  6.12k|            up1(s);
  ------------------
  |  |28526|  6.12k|#define up1(s) ((s)->depth++)
  ------------------
28663|  6.12k|            if (!result) return NULL;
  ------------------
  |  Branch (28663:17): [True: 788, False: 5.34k]
  ------------------
28664|  5.34k|            rule = rule_b;
28665|  5.34k|            goto tail;
28666|  6.12k|        }
28667|      0|        case RULE_IFNOT: {
  ------------------
  |  Branch (28667:9): [True: 0, False: 749M]
  ------------------
28668|      0|            const uint32_t *rule_a = s->bytecode + rule[1];
28669|      0|            const uint32_t *rule_b = s->bytecode + rule[2];
28670|      0|            down1(s);
  ------------------
  |  |28523|      0|#define down1(s) do { \
  |  |28524|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28524:9): [True: 0, False: 0]
  |  |  ------------------
  |  |28525|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (28525:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
28671|      0|            CapState cs = cap_save(s);
28672|      0|            const uint8_t *result = peg_rule(s, rule_a, text);
28673|      0|            if (!!result) {
  ------------------
  |  Branch (28673:17): [True: 0, False: 0]
  ------------------
28674|      0|                up1(s);
  ------------------
  |  |28526|      0|#define up1(s) ((s)->depth++)
  ------------------
28675|      0|                return NULL;
28676|      0|            } else {
28677|      0|                cap_load(s, cs);
28678|      0|                up1(s);
  ------------------
  |  |28526|      0|#define up1(s) ((s)->depth++)
  ------------------
28679|      0|                rule = rule_b;
28680|      0|                goto tail;
28681|      0|            }
28682|      0|        }
28683|       |
28684|  11.8k|        case RULE_NOT: {
  ------------------
  |  Branch (28684:9): [True: 11.8k, False: 749M]
  ------------------
28685|  11.8k|            const uint32_t *rule_a = s->bytecode + rule[1];
28686|  11.8k|            down1(s);
  ------------------
  |  |28523|  11.8k|#define down1(s) do { \
  |  |28524|  11.8k|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28524:9): [True: 0, False: 11.8k]
  |  |  ------------------
  |  |28525|  11.8k|} while (0)
  |  |  ------------------
  |  |  |  Branch (28525:10): [Folded, False: 11.8k]
  |  |  ------------------
  ------------------
28687|  11.8k|            CapState cs = cap_save(s);
28688|  11.8k|            const uint8_t *result = peg_rule(s, rule_a, text);
28689|  11.8k|            if (result) {
  ------------------
  |  Branch (28689:17): [True: 8.14k, False: 3.66k]
  ------------------
28690|  8.14k|                up1(s);
  ------------------
  |  |28526|  8.14k|#define up1(s) ((s)->depth++)
  ------------------
28691|  8.14k|                return NULL;
28692|  8.14k|            } else {
28693|  3.66k|                cap_load(s, cs);
28694|  3.66k|                up1(s);
  ------------------
  |  |28526|  3.66k|#define up1(s) ((s)->depth++)
  ------------------
28695|  3.66k|                return text;
28696|  3.66k|            }
28697|  11.8k|        }
28698|       |
28699|      0|        case RULE_THRU:
  ------------------
  |  Branch (28699:9): [True: 0, False: 749M]
  ------------------
28700|  1.59k|        case RULE_TO: {
  ------------------
  |  Branch (28700:9): [True: 1.59k, False: 749M]
  ------------------
28701|  1.59k|            const uint32_t *rule_a = s->bytecode + rule[1];
28702|  1.59k|            const uint8_t *next_text = NULL;
28703|  1.59k|            CapState cs = cap_save(s);
28704|  1.59k|            down1(s);
  ------------------
  |  |28523|  1.59k|#define down1(s) do { \
  |  |28524|  1.59k|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28524:9): [True: 0, False: 1.59k]
  |  |  ------------------
  |  |28525|  1.59k|} while (0)
  |  |  ------------------
  |  |  |  Branch (28525:10): [Folded, False: 1.59k]
  |  |  ------------------
  ------------------
28705|  11.1k|            while (text <= s->text_end) {
  ------------------
  |  Branch (28705:20): [True: 10.8k, False: 245]
  ------------------
28706|  10.8k|                CapState cs2 = cap_save(s);
28707|  10.8k|                next_text = peg_rule(s, rule_a, text);
28708|  10.8k|                if (next_text) {
  ------------------
  |  Branch (28708:21): [True: 1.35k, False: 9.52k]
  ------------------
28709|  1.35k|                    if (rule[0] == RULE_TO) cap_load(s, cs2);
  ------------------
  |  Branch (28709:25): [True: 1.35k, False: 0]
  ------------------
28710|  1.35k|                    break;
28711|  1.35k|                }
28712|  9.52k|                cap_load(s, cs2);
28713|  9.52k|                text++;
28714|  9.52k|            }
28715|  1.59k|            up1(s);
  ------------------
  |  |28526|  1.59k|#define up1(s) ((s)->depth++)
  ------------------
28716|  1.59k|            if (text > s->text_end) {
  ------------------
  |  Branch (28716:17): [True: 245, False: 1.35k]
  ------------------
28717|    245|                cap_load(s, cs);
28718|    245|                return NULL;
28719|    245|            }
28720|  1.35k|            return rule[0] == RULE_TO ? text : next_text;
  ------------------
  |  Branch (28720:20): [True: 1.35k, False: 0]
  ------------------
28721|  1.59k|        }
28722|       |
28723|  12.2k|        case RULE_BETWEEN: {
  ------------------
  |  Branch (28723:9): [True: 12.2k, False: 749M]
  ------------------
28724|  12.2k|            uint32_t lo = rule[1];
28725|  12.2k|            uint32_t hi = rule[2];
28726|  12.2k|            const uint32_t *rule_a = s->bytecode + rule[3];
28727|  12.2k|            uint32_t captured = 0;
28728|  12.2k|            const uint8_t *next_text;
28729|  12.2k|            CapState cs = cap_save(s);
28730|  12.2k|            down1(s);
  ------------------
  |  |28523|  12.2k|#define down1(s) do { \
  |  |28524|  12.2k|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28524:9): [True: 0, False: 12.2k]
  |  |  ------------------
  |  |28525|  12.2k|} while (0)
  |  |  ------------------
  |  |  |  Branch (28525:10): [Folded, False: 12.2k]
  |  |  ------------------
  ------------------
28731|   252M|            while (captured < hi) {
  ------------------
  |  Branch (28731:20): [True: 252M, False: 7.12k]
  ------------------
28732|   252M|                CapState cs2 = cap_save(s);
28733|   252M|                next_text = peg_rule(s, rule_a, text);
28734|   252M|                if (!next_text || ((next_text == text) && (hi == UINT32_MAX))) {
  ------------------
  |  Branch (28734:21): [True: 4.01k, False: 252M]
  |  Branch (28734:36): [True: 248M, False: 3.50M]
  |  Branch (28734:59): [True: 1.09k, False: 248M]
  ------------------
28735|  5.10k|                    cap_load(s, cs2);
28736|  5.10k|                    break;
28737|  5.10k|                }
28738|   252M|                captured++;
28739|   252M|                text = next_text;
28740|   252M|            }
28741|  12.2k|            up1(s);
  ------------------
  |  |28526|  12.2k|#define up1(s) ((s)->depth++)
  ------------------
28742|  12.2k|            if (captured < lo) {
  ------------------
  |  Branch (28742:17): [True: 3.40k, False: 8.82k]
  ------------------
28743|  3.40k|                cap_load(s, cs);
28744|  3.40k|                return NULL;
28745|  3.40k|            }
28746|  8.82k|            return text;
28747|  12.2k|        }
28748|       |
28749|       |        /* Capturing rules */
28750|       |
28751|  1.04M|        case RULE_GETTAG: {
  ------------------
  |  Branch (28751:9): [True: 1.04M, False: 748M]
  ------------------
28752|  1.04M|            uint32_t search = rule[1];
28753|  1.04M|            uint32_t tag = rule[2];
28754|  50.2M|            for (int32_t i = s->tags->count - 1; i >= 0; i--) {
  ------------------
  |  Branch (28754:50): [True: 50.2M, False: 13.1k]
  ------------------
28755|  50.2M|                if (s->tags->data[i] == search) {
  ------------------
  |  Branch (28755:21): [True: 1.02M, False: 49.1M]
  ------------------
28756|  1.02M|                    pushcap(s, s->tagged_captures->data[i], tag);
28757|  1.02M|                    return text;
28758|  1.02M|                }
28759|  50.2M|            }
28760|  13.1k|            return NULL;
28761|  1.04M|        }
28762|       |
28763|  87.5M|        case RULE_POSITION: {
  ------------------
  |  Branch (28763:9): [True: 87.5M, False: 662M]
  ------------------
28764|  87.5M|            pushcap(s, janet_wrap_number((double)(text - s->text_start)), rule[1]);
  ------------------
  |  |  835|  87.5M|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
28765|  87.5M|            return text;
28766|  1.04M|        }
28767|       |
28768|  81.5M|        case RULE_LINE: {
  ------------------
  |  Branch (28768:9): [True: 81.5M, False: 668M]
  ------------------
28769|  81.5M|            LineCol lc = get_linecol_from_position(s, (int32_t)(text - s->text_start));
28770|  81.5M|            pushcap(s, janet_wrap_number((double)(lc.line)), rule[1]);
  ------------------
  |  |  835|  81.5M|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
28771|  81.5M|            return text;
28772|  1.04M|        }
28773|       |
28774|  2.94k|        case RULE_COLUMN: {
  ------------------
  |  Branch (28774:9): [True: 2.94k, False: 749M]
  ------------------
28775|  2.94k|            LineCol lc = get_linecol_from_position(s, (int32_t)(text - s->text_start));
28776|  2.94k|            pushcap(s, janet_wrap_number((double)(lc.col)), rule[1]);
  ------------------
  |  |  835|  2.94k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
28777|  2.94k|            return text;
28778|  1.04M|        }
28779|       |
28780|      0|        case RULE_ARGUMENT: {
  ------------------
  |  Branch (28780:9): [True: 0, False: 749M]
  ------------------
28781|      0|            int32_t index = ((int32_t *)rule)[1];
28782|      0|            Janet capture = (index >= s->extrac || index < 0) ? 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 (28782:30): [True: 0, False: 0]
  |  Branch (28782:52): [True: 0, False: 0]
  ------------------
28783|      0|            pushcap(s, capture, rule[2]);
28784|      0|            return text;
28785|  1.04M|        }
28786|       |
28787|      0|        case RULE_CONSTANT: {
  ------------------
  |  Branch (28787:9): [True: 0, False: 749M]
  ------------------
28788|      0|            pushcap(s, s->constants[rule[1]], rule[2]);
28789|      0|            return text;
28790|  1.04M|        }
28791|       |
28792|   167M|        case RULE_CAPTURE: {
  ------------------
  |  Branch (28792:9): [True: 167M, False: 582M]
  ------------------
28793|   167M|            down1(s);
  ------------------
  |  |28523|   167M|#define down1(s) do { \
  |  |28524|   167M|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28524:9): [True: 0, False: 167M]
  |  |  ------------------
  |  |28525|   167M|} while (0)
  |  |  ------------------
  |  |  |  Branch (28525:10): [Folded, False: 167M]
  |  |  ------------------
  ------------------
28794|   167M|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
28795|   167M|            up1(s);
  ------------------
  |  |28526|   167M|#define up1(s) ((s)->depth++)
  ------------------
28796|   167M|            if (!result) return NULL;
  ------------------
  |  Branch (28796:17): [True: 55.0M, False: 112M]
  ------------------
28797|       |            /* Specialized pushcap - avoid intermediate string creation */
28798|   112M|            if (!s->has_backref && s->mode == PEG_MODE_ACCUMULATE) {
  ------------------
  |  Branch (28798:17): [True: 109M, False: 2.35M]
  |  Branch (28798:36): [True: 21.9M, False: 88.0M]
  ------------------
28799|  21.9M|                janet_buffer_push_bytes(s->scratch, text, (int32_t)(result - text));
28800|  90.3M|            } else {
28801|  90.3M|                uint32_t tag = rule[2];
28802|  90.3M|                pushcap(s, janet_stringv(text, (int32_t)(result - text)), tag);
  ------------------
  |  | 1827|  90.3M|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  848|  90.3M|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  90.3M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  90.3M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  90.3M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28803|  90.3M|            }
28804|   112M|            return result;
28805|   167M|        }
28806|       |
28807|      0|        case RULE_CAPTURE_NUM: {
  ------------------
  |  Branch (28807:9): [True: 0, False: 749M]
  ------------------
28808|      0|            down1(s);
  ------------------
  |  |28523|      0|#define down1(s) do { \
  |  |28524|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28524:9): [True: 0, False: 0]
  |  |  ------------------
  |  |28525|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (28525:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
28809|      0|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
28810|      0|            up1(s);
  ------------------
  |  |28526|      0|#define up1(s) ((s)->depth++)
  ------------------
28811|      0|            if (!result) return NULL;
  ------------------
  |  Branch (28811:17): [True: 0, False: 0]
  ------------------
28812|       |            /* check number parsing */
28813|      0|            double x = 0.0;
28814|      0|            int32_t base = (int32_t) rule[2];
28815|      0|            if (janet_scan_number_base(text, (int32_t)(result - text), base, &x)) return NULL;
  ------------------
  |  Branch (28815:17): [True: 0, False: 0]
  ------------------
28816|       |            /* Specialized pushcap - avoid intermediate string creation */
28817|      0|            if (!s->has_backref && s->mode == PEG_MODE_ACCUMULATE) {
  ------------------
  |  Branch (28817:17): [True: 0, False: 0]
  |  Branch (28817:36): [True: 0, False: 0]
  ------------------
28818|      0|                janet_buffer_push_bytes(s->scratch, text, (int32_t)(result - text));
28819|      0|            } else {
28820|      0|                uint32_t tag = rule[3];
28821|      0|                pushcap(s, janet_wrap_number(x), tag);
  ------------------
  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
28822|      0|            }
28823|      0|            return result;
28824|      0|        }
28825|       |
28826|  9.37k|        case RULE_ACCUMULATE: {
  ------------------
  |  Branch (28826:9): [True: 9.37k, False: 749M]
  ------------------
28827|  9.37k|            uint32_t tag = rule[2];
28828|  9.37k|            int oldmode = s->mode;
28829|  9.37k|            if (!tag && oldmode == PEG_MODE_ACCUMULATE) {
  ------------------
  |  Branch (28829:17): [True: 7.97k, False: 1.40k]
  |  Branch (28829:25): [True: 263, False: 7.70k]
  ------------------
28830|    263|                rule = s->bytecode + rule[1];
28831|    263|                goto tail;
28832|    263|            }
28833|  9.11k|            CapState cs = cap_save(s);
28834|  9.11k|            s->mode = PEG_MODE_ACCUMULATE;
28835|  9.11k|            down1(s);
  ------------------
  |  |28523|  9.11k|#define down1(s) do { \
  |  |28524|  9.11k|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28524:9): [True: 0, False: 9.11k]
  |  |  ------------------
  |  |28525|  9.11k|} while (0)
  |  |  ------------------
  |  |  |  Branch (28525:10): [Folded, False: 9.11k]
  |  |  ------------------
  ------------------
28836|  9.11k|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
28837|  9.11k|            up1(s);
  ------------------
  |  |28526|  9.11k|#define up1(s) ((s)->depth++)
  ------------------
28838|  9.11k|            s->mode = oldmode;
28839|  9.11k|            if (!result) return NULL;
  ------------------
  |  Branch (28839:17): [True: 430, False: 8.68k]
  ------------------
28840|  8.68k|            Janet cap = janet_stringv(s->scratch->data + cs.scratch,
  ------------------
  |  | 1827|  8.68k|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  848|  8.68k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  8.68k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  8.68k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  8.68k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28841|  8.68k|                                      s->scratch->count - cs.scratch);
28842|  8.68k|            cap_load_keept(s, cs);
28843|  8.68k|            pushcap(s, cap, tag);
28844|  8.68k|            return result;
28845|  9.11k|        }
28846|       |
28847|      0|        case RULE_DROP: {
  ------------------
  |  Branch (28847:9): [True: 0, False: 749M]
  ------------------
28848|      0|            CapState cs = cap_save(s);
28849|      0|            down1(s);
  ------------------
  |  |28523|      0|#define down1(s) do { \
  |  |28524|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28524:9): [True: 0, False: 0]
  |  |  ------------------
  |  |28525|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (28525:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
28850|      0|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
28851|      0|            up1(s);
  ------------------
  |  |28526|      0|#define up1(s) ((s)->depth++)
  ------------------
28852|      0|            if (!result) return NULL;
  ------------------
  |  Branch (28852:17): [True: 0, False: 0]
  ------------------
28853|      0|            cap_load(s, cs);
28854|      0|            return result;
28855|      0|        }
28856|       |
28857|      0|        case RULE_ONLY_TAGS: {
  ------------------
  |  Branch (28857:9): [True: 0, False: 749M]
  ------------------
28858|      0|            CapState cs = cap_save(s);
28859|      0|            down1(s);
  ------------------
  |  |28523|      0|#define down1(s) do { \
  |  |28524|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28524:9): [True: 0, False: 0]
  |  |  ------------------
  |  |28525|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (28525:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
28860|      0|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
28861|      0|            up1(s);
  ------------------
  |  |28526|      0|#define up1(s) ((s)->depth++)
  ------------------
28862|      0|            if (!result) return NULL;
  ------------------
  |  Branch (28862:17): [True: 0, False: 0]
  ------------------
28863|      0|            cap_load_keept(s, cs);
28864|      0|            return result;
28865|      0|        }
28866|       |
28867|      0|        case RULE_GROUP: {
  ------------------
  |  Branch (28867:9): [True: 0, False: 749M]
  ------------------
28868|      0|            uint32_t tag = rule[2];
28869|      0|            int oldmode = s->mode;
28870|      0|            CapState cs = cap_save(s);
28871|      0|            s->mode = PEG_MODE_NORMAL;
28872|      0|            down1(s);
  ------------------
  |  |28523|      0|#define down1(s) do { \
  |  |28524|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28524:9): [True: 0, False: 0]
  |  |  ------------------
  |  |28525|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (28525:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
28873|      0|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
28874|      0|            up1(s);
  ------------------
  |  |28526|      0|#define up1(s) ((s)->depth++)
  ------------------
28875|      0|            s->mode = oldmode;
28876|      0|            if (!result) return NULL;
  ------------------
  |  Branch (28876:17): [True: 0, False: 0]
  ------------------
28877|      0|            int32_t num_sub_captures = s->captures->count - cs.cap;
28878|      0|            JanetArray *sub_captures = janet_array(num_sub_captures);
28879|      0|            safe_memcpy(sub_captures->data,
28880|      0|                        s->captures->data + cs.cap,
28881|      0|                        sizeof(Janet) * num_sub_captures);
28882|      0|            sub_captures->count = num_sub_captures;
28883|      0|            cap_load_keept(s, cs);
28884|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28885|      0|            return result;
28886|      0|        }
28887|       |
28888|      7|        case RULE_NTH: {
  ------------------
  |  Branch (28888:9): [True: 7, False: 749M]
  ------------------
28889|      7|            uint32_t nth = rule[1];
28890|      7|            if (nth > INT32_MAX) nth = INT32_MAX;
  ------------------
  |  Branch (28890:17): [True: 0, False: 7]
  ------------------
28891|      7|            uint32_t tag = rule[3];
28892|      7|            int oldmode = s->mode;
28893|      7|            CapState cs = cap_save(s);
28894|      7|            s->mode = PEG_MODE_NORMAL;
28895|      7|            down1(s);
  ------------------
  |  |28523|      7|#define down1(s) do { \
  |  |28524|      7|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28524:9): [True: 0, False: 7]
  |  |  ------------------
  |  |28525|      7|} while (0)
  |  |  ------------------
  |  |  |  Branch (28525:10): [Folded, False: 7]
  |  |  ------------------
  ------------------
28896|      7|            const uint8_t *result = peg_rule(s, s->bytecode + rule[2], text);
28897|      7|            up1(s);
  ------------------
  |  |28526|      7|#define up1(s) ((s)->depth++)
  ------------------
28898|      7|            s->mode = oldmode;
28899|      7|            if (!result) return NULL;
  ------------------
  |  Branch (28899:17): [True: 1, False: 6]
  ------------------
28900|      6|            int32_t num_sub_captures = s->captures->count - cs.cap;
28901|      6|            Janet cap;
28902|      6|            if (num_sub_captures > (int32_t) nth) {
  ------------------
  |  Branch (28902:17): [True: 2, False: 4]
  ------------------
28903|      2|                cap = s->captures->data[cs.cap + nth];
28904|      4|            } else {
28905|      4|                return NULL;
28906|      4|            }
28907|      2|            cap_load_keept(s, cs);
28908|      2|            pushcap(s, cap, tag);
28909|      2|            return result;
28910|      6|        }
28911|       |
28912|  8.18k|        case RULE_SUB: {
  ------------------
  |  Branch (28912:9): [True: 8.18k, False: 749M]
  ------------------
28913|  8.18k|            const uint8_t *text_start = text;
28914|  8.18k|            const uint32_t *rule_window = s->bytecode + rule[1];
28915|  8.18k|            const uint32_t *rule_subpattern = s->bytecode + rule[2];
28916|  8.18k|            down1(s);
  ------------------
  |  |28523|  8.18k|#define down1(s) do { \
  |  |28524|  8.18k|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28524:9): [True: 0, False: 8.18k]
  |  |  ------------------
  |  |28525|  8.18k|} while (0)
  |  |  ------------------
  |  |  |  Branch (28525:10): [Folded, False: 8.18k]
  |  |  ------------------
  ------------------
28917|  8.18k|            const uint8_t *window_end = peg_rule(s, rule_window, text);
28918|  8.18k|            up1(s);
  ------------------
  |  |28526|  8.18k|#define up1(s) ((s)->depth++)
  ------------------
28919|  8.18k|            if (!window_end) {
  ------------------
  |  Branch (28919:17): [True: 235, False: 7.94k]
  ------------------
28920|    235|                return NULL;
28921|    235|            }
28922|  7.94k|            const uint8_t *saved_end = s->text_end;
28923|  7.94k|            s->text_end = window_end;
28924|  7.94k|            down1(s);
  ------------------
  |  |28523|  7.94k|#define down1(s) do { \
  |  |28524|  7.94k|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28524:9): [True: 0, False: 7.94k]
  |  |  ------------------
  |  |28525|  7.94k|} while (0)
  |  |  ------------------
  |  |  |  Branch (28525:10): [Folded, False: 7.94k]
  |  |  ------------------
  ------------------
28925|  7.94k|            const uint8_t *next_text = peg_rule(s, rule_subpattern, text_start);
28926|  7.94k|            up1(s);
  ------------------
  |  |28526|  7.94k|#define up1(s) ((s)->depth++)
  ------------------
28927|  7.94k|            s->text_end = saved_end;
28928|       |
28929|  7.94k|            if (!next_text) {
  ------------------
  |  Branch (28929:17): [True: 1.64k, False: 6.30k]
  ------------------
28930|  1.64k|                return NULL;
28931|  1.64k|            }
28932|       |
28933|  6.30k|            return window_end;
28934|  7.94k|        }
28935|       |
28936|  1.79k|        case RULE_TIL: {
  ------------------
  |  Branch (28936:9): [True: 1.79k, False: 749M]
  ------------------
28937|  1.79k|            const uint32_t *rule_terminus = s->bytecode + rule[1];
28938|  1.79k|            const uint32_t *rule_subpattern = s->bytecode + rule[2];
28939|       |
28940|  1.79k|            const uint8_t *terminus_start = text;
28941|  1.79k|            const uint8_t *terminus_end = NULL;
28942|  1.79k|            down1(s);
  ------------------
  |  |28523|  1.79k|#define down1(s) do { \
  |  |28524|  1.79k|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28524:9): [True: 0, False: 1.79k]
  |  |  ------------------
  |  |28525|  1.79k|} while (0)
  |  |  ------------------
  |  |  |  Branch (28525:10): [Folded, False: 1.79k]
  |  |  ------------------
  ------------------
28943|  24.9k|            while (terminus_start <= s->text_end) {
  ------------------
  |  Branch (28943:20): [True: 24.1k, False: 798]
  ------------------
28944|  24.1k|                CapState cs2 = cap_save(s);
28945|  24.1k|                terminus_end = peg_rule(s, rule_terminus, terminus_start);
28946|  24.1k|                cap_load(s, cs2);
28947|  24.1k|                if (terminus_end) {
  ------------------
  |  Branch (28947:21): [True: 997, False: 23.2k]
  ------------------
28948|    997|                    break;
28949|    997|                }
28950|  23.2k|                terminus_start++;
28951|  23.2k|            }
28952|  1.79k|            up1(s);
  ------------------
  |  |28526|  1.79k|#define up1(s) ((s)->depth++)
  ------------------
28953|       |
28954|  1.79k|            if (!terminus_end) {
  ------------------
  |  Branch (28954:17): [True: 798, False: 997]
  ------------------
28955|    798|                return NULL;
28956|    798|            }
28957|       |
28958|    997|            const uint8_t *saved_end = s->text_end;
28959|    997|            s->text_end = terminus_start;
28960|    997|            down1(s);
  ------------------
  |  |28523|    997|#define down1(s) do { \
  |  |28524|    997|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28524:9): [True: 0, False: 997]
  |  |  ------------------
  |  |28525|    997|} while (0)
  |  |  ------------------
  |  |  |  Branch (28525:10): [Folded, False: 997]
  |  |  ------------------
  ------------------
28961|    997|            const uint8_t *matched = peg_rule(s, rule_subpattern, text);
28962|    997|            up1(s);
  ------------------
  |  |28526|    997|#define up1(s) ((s)->depth++)
  ------------------
28963|    997|            s->text_end = saved_end;
28964|       |
28965|    997|            if (!matched) {
  ------------------
  |  Branch (28965:17): [True: 548, False: 449]
  ------------------
28966|    548|                return NULL;
28967|    548|            }
28968|       |
28969|    449|            return terminus_end;
28970|    997|        }
28971|       |
28972|      0|        case RULE_SPLIT: {
  ------------------
  |  Branch (28972:9): [True: 0, False: 749M]
  ------------------
28973|      0|            const uint8_t *saved_end = s->text_end;
28974|      0|            const uint32_t *rule_separator = s->bytecode + rule[1];
28975|      0|            const uint32_t *rule_subpattern = s->bytecode + rule[2];
28976|       |
28977|      0|            const uint8_t *chunk_start = text;
28978|      0|            const uint8_t *chunk_end = NULL;
28979|       |
28980|      0|            while (text <= saved_end) {
  ------------------
  |  Branch (28980:20): [True: 0, False: 0]
  ------------------
28981|       |                /* Find next split (or end of text) */
28982|      0|                CapState cs = cap_save(s);
28983|      0|                down1(s);
  ------------------
  |  |28523|      0|#define down1(s) do { \
  |  |28524|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28524:9): [True: 0, False: 0]
  |  |  ------------------
  |  |28525|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (28525:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
28984|      0|                while (text <= saved_end) {
  ------------------
  |  Branch (28984:24): [True: 0, False: 0]
  ------------------
28985|      0|                    chunk_end = text;
28986|      0|                    const uint8_t *check = peg_rule(s, rule_separator, text);
28987|      0|                    cap_load(s, cs);
28988|      0|                    if (check) {
  ------------------
  |  Branch (28988:25): [True: 0, False: 0]
  ------------------
28989|      0|                        text = check;
28990|      0|                        break;
28991|      0|                    }
28992|      0|                    text++;
28993|      0|                }
28994|      0|                up1(s);
  ------------------
  |  |28526|      0|#define up1(s) ((s)->depth++)
  ------------------
28995|       |
28996|       |                /* Match between splits */
28997|      0|                s->text_end = chunk_end;
28998|      0|                down1(s);
  ------------------
  |  |28523|      0|#define down1(s) do { \
  |  |28524|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28524:9): [True: 0, False: 0]
  |  |  ------------------
  |  |28525|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (28525:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
28999|      0|                const uint8_t *subpattern_end = peg_rule(s, rule_subpattern, chunk_start);
29000|      0|                up1(s);
  ------------------
  |  |28526|      0|#define up1(s) ((s)->depth++)
  ------------------
29001|      0|                s->text_end = saved_end;
29002|      0|                if (!subpattern_end) return NULL; /* Don't match anything */
  ------------------
  |  Branch (29002:21): [True: 0, False: 0]
  ------------------
29003|       |
29004|       |                /* Ensure forward progress */
29005|      0|                if (text == chunk_start) return NULL;
  ------------------
  |  Branch (29005:21): [True: 0, False: 0]
  ------------------
29006|      0|                chunk_start = text;
29007|      0|            }
29008|       |
29009|      0|            s->text_end = saved_end;
29010|      0|            return s->text_end;
29011|      0|        }
29012|       |
29013|   123M|        case RULE_REPLACE:
  ------------------
  |  Branch (29013:9): [True: 123M, False: 626M]
  ------------------
29014|   123M|        case RULE_MATCHSPLICE:
  ------------------
  |  Branch (29014:9): [True: 0, False: 749M]
  ------------------
29015|   123M|        case RULE_MATCHTIME: {
  ------------------
  |  Branch (29015:9): [True: 0, False: 749M]
  ------------------
29016|   123M|            uint32_t tag = rule[3];
29017|   123M|            int oldmode = s->mode;
29018|   123M|            CapState cs = cap_save(s);
29019|   123M|            s->mode = PEG_MODE_NORMAL;
29020|   123M|            down1(s);
  ------------------
  |  |28523|   123M|#define down1(s) do { \
  |  |28524|   123M|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28524:9): [True: 0, False: 123M]
  |  |  ------------------
  |  |28525|   123M|} while (0)
  |  |  ------------------
  |  |  |  Branch (28525:10): [Folded, False: 123M]
  |  |  ------------------
  ------------------
29021|   123M|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
29022|   123M|            up1(s);
  ------------------
  |  |28526|   123M|#define up1(s) ((s)->depth++)
  ------------------
29023|   123M|            s->mode = oldmode;
29024|   123M|            if (!result) return NULL;
  ------------------
  |  Branch (29024:17): [True: 361, False: 123M]
  ------------------
29025|       |
29026|   123M|            Janet cap = janet_wrap_nil();
  ------------------
  |  |  831|   123M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   123M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   123M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   123M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29027|   123M|            Janet constant = s->constants[rule[2]];
29028|   123M|            switch (janet_type(constant)) {
  ------------------
  |  |  795|   123M|    (isnan((x).number) \
  |  |  796|   123M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|   123M|        : JANET_NUMBER)
  ------------------
  |  Branch (29028:21): [True: 117M, False: 5.87M]
  ------------------
29029|  75.7M|                default:
  ------------------
  |  Branch (29029:17): [True: 75.7M, False: 47.4M]
  ------------------
29030|  75.7M|                    cap = constant;
29031|  75.7M|                    break;
29032|  21.5M|                case JANET_STRUCT:
  ------------------
  |  Branch (29032:17): [True: 21.5M, False: 101M]
  ------------------
29033|  21.5M|                    if (s->captures->count) {
  ------------------
  |  Branch (29033:25): [True: 21.5M, False: 280]
  ------------------
29034|  21.5M|                        cap = janet_struct_get(janet_unwrap_struct(constant),
  ------------------
  |  |  857|  21.5M|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
29035|  21.5M|                                               s->captures->data[s->captures->count - 1]);
29036|  21.5M|                    }
29037|  21.5M|                    break;
29038|  25.9M|                case JANET_TABLE:
  ------------------
  |  Branch (29038:17): [True: 25.9M, False: 97.2M]
  ------------------
29039|  25.9M|                    if (s->captures->count) {
  ------------------
  |  Branch (29039:25): [True: 25.9M, False: 69.3k]
  ------------------
29040|  25.9M|                        cap = janet_table_get(janet_unwrap_table(constant),
  ------------------
  |  |  861|  25.9M|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
29041|  25.9M|                                              s->captures->data[s->captures->count - 1]);
29042|  25.9M|                    }
29043|  25.9M|                    break;
29044|      0|                case JANET_CFUNCTION:
  ------------------
  |  Branch (29044:17): [True: 0, False: 123M]
  ------------------
29045|      0|                    cap = janet_unwrap_cfunction(constant)(s->captures->count - cs.cap,
  ------------------
  |  |  869|      0|#define janet_unwrap_cfunction(x) ((JanetCFunction)janet_nanbox_to_pointer(x))
  ------------------
29046|      0|                                                           s->captures->data + cs.cap);
29047|      0|                    break;
29048|      0|                case JANET_FUNCTION:
  ------------------
  |  Branch (29048:17): [True: 0, False: 123M]
  ------------------
29049|      0|                    cap = janet_call(janet_unwrap_function(constant),
  ------------------
  |  |  868|      0|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
29050|      0|                                     s->captures->count - cs.cap,
29051|      0|                                     s->captures->data + cs.cap);
29052|      0|                    break;
29053|   123M|            }
29054|   123M|            cap_load_keept(s, cs);
29055|   123M|            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 (29055:17): [True: 0, False: 123M]
  ------------------
29056|   123M|            const Janet *elements = NULL;
29057|   123M|            int32_t len = 0;
29058|   123M|            if ((rule[0] == RULE_MATCHSPLICE) && janet_indexed_view(cap, &elements, &len)) {
  ------------------
  |  Branch (29058:17): [True: 0, False: 123M]
  |  Branch (29058:50): [True: 0, False: 0]
  ------------------
29059|       |                /* unpack and flatten capture */
29060|      0|                for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (29060:37): [True: 0, False: 0]
  ------------------
29061|      0|                    pushcap(s, elements[i], tag);
29062|      0|                }
29063|   123M|            } else {
29064|   123M|                pushcap(s, cap, tag);
29065|   123M|            }
29066|   123M|            return result;
29067|   123M|        }
29068|       |
29069|     38|        case RULE_ERROR: {
  ------------------
  |  Branch (29069:9): [True: 38, False: 749M]
  ------------------
29070|     38|            int oldmode = s->mode;
29071|     38|            s->mode = PEG_MODE_NORMAL;
29072|     38|            int32_t old_cap = s->captures->count;
29073|     38|            down1(s);
  ------------------
  |  |28523|     38|#define down1(s) do { \
  |  |28524|     38|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28524:9): [True: 0, False: 38]
  |  |  ------------------
  |  |28525|     38|} while (0)
  |  |  ------------------
  |  |  |  Branch (28525:10): [Folded, False: 38]
  |  |  ------------------
  ------------------
29074|     38|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
29075|     38|            up1(s);
  ------------------
  |  |28526|     38|#define up1(s) ((s)->depth++)
  ------------------
29076|     38|            s->mode = oldmode;
29077|     38|            if (!result) return NULL;
  ------------------
  |  Branch (29077:17): [True: 7, False: 31]
  ------------------
29078|     31|            if (s->captures->count > old_cap) {
  ------------------
  |  Branch (29078:17): [True: 25, False: 6]
  ------------------
29079|       |                /* Throw last capture */
29080|     25|                janet_panicv(s->captures->data[s->captures->count - 1]);
29081|     25|            } else {
29082|       |                /* Throw generic error */
29083|      6|                int32_t start = (int32_t)(text - s->text_start);
29084|      6|                LineCol lc = get_linecol_from_position(s, start);
29085|      6|                janet_panicf("match error at line %d, column %d", lc.line, lc.col);
29086|      6|            }
29087|      0|            return NULL;
29088|     31|        }
29089|       |
29090|      0|        case RULE_BACKMATCH: {
  ------------------
  |  Branch (29090:9): [True: 0, False: 749M]
  ------------------
29091|      0|            uint32_t search = rule[1];
29092|      0|            for (int32_t i = s->tags->count - 1; i >= 0; i--) {
  ------------------
  |  Branch (29092:50): [True: 0, False: 0]
  ------------------
29093|      0|                if (s->tags->data[i] == search) {
  ------------------
  |  Branch (29093:21): [True: 0, False: 0]
  ------------------
29094|      0|                    Janet capture = s->tagged_captures->data[i];
29095|      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 (29095:25): [True: 0, False: 0]
  ------------------
29096|      0|                        return NULL;
29097|      0|                    const uint8_t *bytes = janet_unwrap_string(capture);
  ------------------
  |  |  863|      0|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
29098|      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)))
  |  |  ------------------
  ------------------
29099|      0|                    if (text + len > s->text_end)
  ------------------
  |  Branch (29099:25): [True: 0, False: 0]
  ------------------
29100|      0|                        return NULL;
29101|      0|                    return memcmp(text, bytes, len) ? NULL : text + len;
  ------------------
  |  Branch (29101:28): [True: 0, False: 0]
  ------------------
29102|      0|                }
29103|      0|            }
29104|      0|            return NULL;
29105|      0|        }
29106|       |
29107|      0|        case RULE_LENPREFIX: {
  ------------------
  |  Branch (29107:9): [True: 0, False: 749M]
  ------------------
29108|      0|            int oldmode = s->mode;
29109|      0|            s->mode = PEG_MODE_NORMAL;
29110|      0|            const uint8_t *next_text;
29111|      0|            CapState cs = cap_save(s);
29112|      0|            down1(s);
  ------------------
  |  |28523|      0|#define down1(s) do { \
  |  |28524|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28524:9): [True: 0, False: 0]
  |  |  ------------------
  |  |28525|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (28525:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
29113|      0|            next_text = peg_rule(s, s->bytecode + rule[1], text);
29114|      0|            up1(s);
  ------------------
  |  |28526|      0|#define up1(s) ((s)->depth++)
  ------------------
29115|      0|            if (NULL == next_text) return NULL;
  ------------------
  |  Branch (29115:17): [True: 0, False: 0]
  ------------------
29116|      0|            s->mode = oldmode;
29117|      0|            int32_t num_sub_captures = s->captures->count - cs.cap;
29118|      0|            Janet lencap;
29119|      0|            if (num_sub_captures <= 0 ||
  ------------------
  |  Branch (29119:17): [True: 0, False: 0]
  ------------------
29120|      0|                    (lencap = s->captures->data[cs.cap], !janet_checkint(lencap))) {
  ------------------
  |  Branch (29120:21): [True: 0, False: 0]
  ------------------
29121|      0|                cap_load(s, cs);
29122|      0|                return NULL;
29123|      0|            }
29124|      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)
  |  |  ------------------
  ------------------
29125|       |            /* drop captures from len pattern */
29126|      0|            cap_load(s, cs);
29127|      0|            for (int32_t i = 0; i < nrep; i++) {
  ------------------
  |  Branch (29127:33): [True: 0, False: 0]
  ------------------
29128|      0|                down1(s);
  ------------------
  |  |28523|      0|#define down1(s) do { \
  |  |28524|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28524:9): [True: 0, False: 0]
  |  |  ------------------
  |  |28525|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (28525:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
29129|      0|                next_text = peg_rule(s, s->bytecode + rule[2], next_text);
29130|      0|                up1(s);
  ------------------
  |  |28526|      0|#define up1(s) ((s)->depth++)
  ------------------
29131|      0|                if (NULL == next_text) {
  ------------------
  |  Branch (29131:21): [True: 0, False: 0]
  ------------------
29132|      0|                    cap_load(s, cs);
29133|      0|                    return NULL;
29134|      0|                }
29135|      0|            }
29136|      0|            return next_text;
29137|      0|        }
29138|       |
29139|  24.6k|        case RULE_READINT: {
  ------------------
  |  Branch (29139:9): [True: 24.6k, False: 749M]
  ------------------
29140|  24.6k|            uint32_t tag = rule[2];
29141|  24.6k|            uint32_t signedness = rule[1] & 0x10;
29142|  24.6k|            uint32_t endianness = rule[1] & 0x20;
29143|  24.6k|            int width = (int)(rule[1] & 0xF);
29144|  24.6k|            if (text + width > s->text_end) return NULL;
  ------------------
  |  Branch (29144:17): [True: 1.59k, False: 23.0k]
  ------------------
29145|  23.0k|            uint64_t accum = 0;
29146|  23.0k|            if (endianness) {
  ------------------
  |  Branch (29146:17): [True: 0, False: 23.0k]
  ------------------
29147|       |                /* BE */
29148|      0|                for (int i = 0; i < width; i++) accum = (accum << 8) | text[i];
  ------------------
  |  Branch (29148:33): [True: 0, False: 0]
  ------------------
29149|  23.0k|            } else {
29150|       |                /* LE */
29151|  44.3k|                for (int i = width - 1; i >= 0; i--) accum = (accum << 8) | text[i];
  ------------------
  |  Branch (29151:41): [True: 21.2k, False: 23.0k]
  ------------------
29152|  23.0k|            }
29153|       |
29154|  23.0k|            Janet capture_value;
29155|       |            /* We can only parse integeres of greater than 6 bytes reliable if int-types are enabled.
29156|       |             * Otherwise, we may lose precision, so 6 is the maximum size when int-types are disabled. */
29157|  23.0k|#ifdef JANET_INT_TYPES
29158|  23.0k|            if (width > 6) {
  ------------------
  |  Branch (29158:17): [True: 2.22k, False: 20.8k]
  ------------------
29159|  2.22k|                if (signedness) {
  ------------------
  |  Branch (29159:21): [True: 578, False: 1.64k]
  ------------------
29160|    578|                    capture_value = janet_wrap_s64(peg_convert_u64_s64(accum, width));
29161|  1.64k|                } else {
29162|  1.64k|                    capture_value = janet_wrap_u64(accum);
29163|  1.64k|                }
29164|  2.22k|            } else
29165|  20.8k|#endif
29166|  20.8k|            {
29167|  20.8k|                double double_value;
29168|  20.8k|                if (signedness) {
  ------------------
  |  Branch (29168:21): [True: 20.4k, False: 357]
  ------------------
29169|  20.4k|                    double_value = (double)(peg_convert_u64_s64(accum, width));
29170|  20.4k|                } else {
29171|    357|                    double_value = (double)accum;
29172|    357|                }
29173|  20.8k|                capture_value = janet_wrap_number(double_value);
  ------------------
  |  |  835|  20.8k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
29174|  20.8k|            }
29175|       |
29176|  23.0k|            pushcap(s, capture_value, tag);
29177|  23.0k|            return text + width;
29178|  24.6k|        }
29179|       |
29180|      0|        case RULE_UNREF: {
  ------------------
  |  Branch (29180:9): [True: 0, False: 749M]
  ------------------
29181|      0|            int32_t tcap = s->tags->count;
29182|      0|            down1(s);
  ------------------
  |  |28523|      0|#define down1(s) do { \
  |  |28524|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28524:9): [True: 0, False: 0]
  |  |  ------------------
  |  |28525|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (28525:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
29183|      0|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
29184|      0|            up1(s);
  ------------------
  |  |28526|      0|#define up1(s) ((s)->depth++)
  ------------------
29185|      0|            if (!result) return NULL;
  ------------------
  |  Branch (29185:17): [True: 0, False: 0]
  ------------------
29186|      0|            int32_t final_tcap = s->tags->count;
29187|       |            /* Truncate tagged captures to not include items of the given tag */
29188|      0|            int32_t w = tcap;
29189|       |            /* If no tag is given, drop ALL tagged captures */
29190|      0|            if (rule[2]) {
  ------------------
  |  Branch (29190:17): [True: 0, False: 0]
  ------------------
29191|      0|                for (int32_t i = tcap; i < final_tcap; i++) {
  ------------------
  |  Branch (29191:40): [True: 0, False: 0]
  ------------------
29192|      0|                    if (s->tags->data[i] != (0xFF & rule[2])) {
  ------------------
  |  Branch (29192:25): [True: 0, False: 0]
  ------------------
29193|      0|                        s->tags->data[w] = s->tags->data[i];
29194|      0|                        s->tagged_captures->data[w] = s->tagged_captures->data[i];
29195|      0|                        w++;
29196|      0|                    }
29197|      0|                }
29198|      0|            }
29199|      0|            s->tags->count = w;
29200|      0|            s->tagged_captures->count = w;
29201|      0|            return result;
29202|      0|        }
29203|       |
29204|   749M|    }
29205|   749M|}
janet.c:cap_save:
28427|   432M|static CapState cap_save(PegState *s) {
28428|   432M|    CapState cs;
28429|   432M|    cs.scratch = s->scratch->count;
28430|   432M|    cs.cap = s->captures->count;
28431|   432M|    cs.tcap = s->tagged_captures->count;
28432|   432M|    return cs;
28433|   432M|}
janet.c:cap_load:
28436|  56.0M|static void cap_load(PegState *s, CapState cs) {
28437|  56.0M|    s->scratch->count = cs.scratch;
28438|  56.0M|    s->captures->count = cs.cap;
28439|  56.0M|    s->tags->count = cs.tcap;
28440|  56.0M|    s->tagged_captures->count = cs.tcap;
28441|  56.0M|}
janet.c:pushcap:
28451|   383M|static void pushcap(PegState *s, Janet capture, uint32_t tag) {
28452|   383M|    if (s->mode == PEG_MODE_ACCUMULATE) {
  ------------------
  |  Branch (28452:9): [True: 64.4M, False: 319M]
  ------------------
28453|  64.4M|        janet_to_string_b(s->scratch, capture);
28454|  64.4M|    }
28455|   383M|    if (s->mode == PEG_MODE_NORMAL) {
  ------------------
  |  Branch (28455:9): [True: 319M, False: 64.4M]
  ------------------
28456|   319M|        janet_array_push(s->captures, capture);
28457|   319M|    }
28458|   383M|    if (s->has_backref) {
  ------------------
  |  Branch (28458:9): [True: 4.43M, False: 379M]
  ------------------
28459|  4.43M|        janet_array_push(s->tagged_captures, capture);
28460|  4.43M|        janet_buffer_push_u8(s->tags, tag);
28461|  4.43M|    }
28462|   383M|}
janet.c:get_linecol_from_position:
28470|  81.5M|static LineCol get_linecol_from_position(PegState *s, int32_t position) {
28471|       |    /* Generate if not made yet */
28472|  81.5M|    if (s->linemaplen < 0) {
  ------------------
  |  Branch (28472:9): [True: 233, False: 81.5M]
  ------------------
28473|    233|        int32_t newline_count = 0;
28474|  7.89M|        for (const uint8_t *c = s->text_start; c < s->outer_text_end; c++) {
  ------------------
  |  Branch (28474:48): [True: 7.89M, False: 233]
  ------------------
28475|  7.89M|            if (*c == '\n') newline_count++;
  ------------------
  |  Branch (28475:17): [True: 1.75M, False: 6.13M]
  ------------------
28476|  7.89M|        }
28477|    233|        int32_t *mem = janet_smalloc(sizeof(int32_t) * newline_count);
28478|    233|        size_t index = 0;
28479|  7.89M|        for (const uint8_t *c = s->text_start; c < s->outer_text_end; c++) {
  ------------------
  |  Branch (28479:48): [True: 7.89M, False: 233]
  ------------------
28480|  7.89M|            if (*c == '\n') mem[index++] = (int32_t)(c - s->text_start);
  ------------------
  |  Branch (28480:17): [True: 1.75M, False: 6.13M]
  ------------------
28481|  7.89M|        }
28482|    233|        s->linemaplen = newline_count;
28483|    233|        s->linemap = mem;
28484|    233|    }
28485|       |    /* Do binary search for line. Slightly modified from classic binary search:
28486|       |     * - if we find that our current character is a line break, just return immediately.
28487|       |     *   a newline character is consider to be on the same line as the character before
28488|       |     *   (\n is line terminator, not line separator).
28489|       |     * - in the not-found case, we still want to find the greatest-indexed newline that
28490|       |     *   is before position. we use that to calculate the line and column.
28491|       |     * - in the case that lo = 0 and s->linemap[0] is still greater than position, we
28492|       |     *   are on the first line and our column is position + 1. */
28493|  81.5M|    int32_t hi = s->linemaplen; /* hi is greater than the actual line */
28494|  81.5M|    int32_t lo = 0; /* lo is less than or equal to the actual line */
28495|  81.5M|    LineCol ret;
28496|   143M|    while (lo + 1 < hi) {
  ------------------
  |  Branch (28496:12): [True: 61.5M, False: 81.5M]
  ------------------
28497|  61.5M|        int32_t mid = lo + (hi - lo) / 2;
28498|  61.5M|        if (s->linemap[mid] >= position) {
  ------------------
  |  Branch (28498:13): [True: 14.9M, False: 46.6M]
  ------------------
28499|  14.9M|            hi = mid;
28500|  46.6M|        } else {
28501|  46.6M|            lo = mid;
28502|  46.6M|        }
28503|  61.5M|    }
28504|       |    /* first line case */
28505|  81.5M|    if (s->linemaplen == 0 || (lo == 0 && s->linemap[0] >= position)) {
  ------------------
  |  Branch (28505:9): [True: 17.7M, False: 63.8M]
  |  Branch (28505:32): [True: 34.9M, False: 28.8M]
  |  Branch (28505:43): [True: 7.61M, False: 27.3M]
  ------------------
28506|  25.3M|        ret.line = 1;
28507|  25.3M|        ret.col = position + 1;
28508|  56.2M|    } else {
28509|  56.2M|        ret.line = lo + 2;
28510|  56.2M|        ret.col = position - s->linemap[lo];
28511|  56.2M|    }
28512|  81.5M|    return ret;
28513|  81.5M|}
janet.c:cap_load_keept:
28445|   123M|static void cap_load_keept(PegState *s, CapState cs) {
28446|   123M|    s->scratch->count = cs.scratch;
28447|   123M|    s->captures->count = cs.cap;
28448|   123M|}
janet.c:peg_convert_u64_s64:
28516|  21.0k|static int64_t peg_convert_u64_s64(uint64_t from, int width) {
28517|  21.0k|    if (width == 0) return 0; /* Avoid undefined shift */
  ------------------
  |  Branch (28517:9): [True: 18.2k, False: 2.79k]
  ------------------
28518|  2.79k|    int shift = 8 * (8 - width);
28519|  2.79k|    return ((int64_t)(from << shift)) >> shift;
28520|  21.0k|}
janet.c:number_to_string_b:
30564|  4.29M|static void number_to_string_b(JanetBuffer *buffer, double x) {
30565|  4.29M|    janet_buffer_extra(buffer, BUFSIZE);
  ------------------
  |  |30558|  4.29M|#define BUFSIZE 64
  ------------------
30566|  4.29M|    const char *fmt = (x == floor(x) &&
  ------------------
  |  Branch (30566:24): [True: 4.14M, False: 147k]
  ------------------
30567|  4.14M|                       x <= JANET_INTMAX_DOUBLE &&
  ------------------
  |  |  165|  8.44M|#define JANET_INTMAX_DOUBLE 9007199254740992.0
  ------------------
  |  Branch (30567:24): [True: 3.81M, False: 330k]
  ------------------
30568|  3.81M|                       x >= JANET_INTMIN_DOUBLE) ? "%.0f" : ("%." STR(DBL_DIG) "g");
  ------------------
  |  |  166|  3.81M|#define JANET_INTMIN_DOUBLE (-9007199254740992.0)
  ------------------
  |  Branch (30568:24): [True: 3.81M, False: 197]
  ------------------
30569|  4.29M|    int count;
30570|  4.29M|    if (x == 0.0) {
  ------------------
  |  Branch (30570:9): [True: 632k, False: 3.66M]
  ------------------
30571|       |        /* Prevent printing of '-0' */
30572|   632k|        count = 1;
30573|   632k|        buffer->data[buffer->count] = '0';
30574|  3.66M|    } else {
30575|  3.66M|        count = snprintf((char *) buffer->data + buffer->count, BUFSIZE, fmt, x);
  ------------------
  |  |30558|  3.66M|#define BUFSIZE 64
  ------------------
30576|  3.66M|    }
30577|  4.29M|    buffer->count += count;
30578|  4.29M|}
janet.c:string_description_b:
30624|  56.0M|static void string_description_b(JanetBuffer *buffer, const char *title, void *pointer) {
30625|  56.0M|    janet_buffer_extra(buffer, BUFSIZE);
  ------------------
  |  |30558|  56.0M|#define BUFSIZE 64
  ------------------
30626|  56.0M|    uint8_t *c = buffer->data + buffer->count;
30627|  56.0M|    int32_t i;
30628|  56.0M|    union {
30629|  56.0M|        uint8_t bytes[sizeof(void *)];
30630|  56.0M|        void *p;
30631|  56.0M|    } pbuf;
30632|       |
30633|  56.0M|    pbuf.p = pointer;
30634|  56.0M|    *c++ = '<';
30635|       |    /* Maximum of 32 bytes for abstract type name */
30636|   336M|    for (i = 0; i < 32 && title[i]; ++i)
  ------------------
  |  Branch (30636:17): [True: 336M, False: 0]
  |  Branch (30636:27): [True: 280M, False: 56.0M]
  ------------------
30637|   280M|        *c++ = ((uint8_t *)title) [i];
30638|  56.0M|    *c++ = ' ';
30639|  56.0M|    *c++ = '0';
30640|  56.0M|    *c++ = 'x';
30641|  56.0M|#if defined(JANET_NANBOX_64)
30642|  56.0M|#define POINTSIZE 6
30643|       |#else
30644|       |#define POINTSIZE (sizeof(void *))
30645|       |#endif
30646|   392M|    for (i = POINTSIZE; i > 0; --i) {
  ------------------
  |  |30642|  56.0M|#define POINTSIZE 6
  ------------------
  |  Branch (30646:25): [True: 336M, False: 56.0M]
  ------------------
30647|   336M|        uint8_t byte = pbuf.bytes[i - 1];
30648|   336M|        *c++ = HEX(byte >> 4);
  ------------------
  |  |30620|   336M|#define HEX(i) (((uint8_t *) janet_base64)[(i)])
  ------------------
30649|   336M|        *c++ = HEX(byte & 0xF);
  ------------------
  |  |30620|   336M|#define HEX(i) (((uint8_t *) janet_base64)[(i)])
  ------------------
30650|   336M|    }
30651|  56.0M|    *c++ = '>';
30652|  56.0M|    buffer->count = (int32_t)(c - buffer->data);
30653|  56.0M|#undef POINTSIZE
30654|  56.0M|}
janet.c:janet_escape_string_b:
30726|  12.4M|static void janet_escape_string_b(JanetBuffer *buffer, const uint8_t *str) {
30727|       |    janet_escape_string_impl(buffer, str, janet_string_length(str));
  ------------------
  |  | 1813|  12.4M|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|  12.4M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
30728|  12.4M|}
janet.c:janet_escape_string_impl:
30656|  12.6M|static int janet_escape_string_impl(JanetBuffer *buffer, const uint8_t *str, int32_t len) {
30657|  12.6M|    janet_buffer_push_u8(buffer, '"');
30658|  12.6M|    int align = 1;
30659|  38.3M|    for (int32_t i = 0; i < len; ++i) {
  ------------------
  |  Branch (30659:25): [True: 25.6M, False: 12.6M]
  ------------------
30660|  25.6M|        uint8_t c = str[i];
30661|  25.6M|        switch (c) {
30662|  11.9k|            case '"':
  ------------------
  |  Branch (30662:13): [True: 11.9k, False: 25.6M]
  ------------------
30663|  11.9k|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\\"", 2);
30664|  11.9k|                align += 2;
30665|  11.9k|                break;
30666|  17.0M|            case '\n':
  ------------------
  |  Branch (30666:13): [True: 17.0M, False: 8.63M]
  ------------------
30667|  17.0M|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\n", 2);
30668|  17.0M|                align += 2;
30669|  17.0M|                break;
30670|  25.3k|            case '\r':
  ------------------
  |  Branch (30670:13): [True: 25.3k, False: 25.6M]
  ------------------
30671|  25.3k|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\r", 2);
30672|  25.3k|                align += 2;
30673|  25.3k|                break;
30674|  1.15M|            case '\0':
  ------------------
  |  Branch (30674:13): [True: 1.15M, False: 24.4M]
  ------------------
30675|  1.15M|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\0", 2);
30676|  1.15M|                align += 2;
30677|  1.15M|                break;
30678|  13.1k|            case '\f':
  ------------------
  |  Branch (30678:13): [True: 13.1k, False: 25.6M]
  ------------------
30679|  13.1k|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\f", 2);
30680|  13.1k|                align += 2;
30681|  13.1k|                break;
30682|  14.2k|            case '\v':
  ------------------
  |  Branch (30682:13): [True: 14.2k, False: 25.6M]
  ------------------
30683|  14.2k|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\v", 2);
30684|  14.2k|                align += 2;
30685|  14.2k|                break;
30686|  2.06k|            case '\a':
  ------------------
  |  Branch (30686:13): [True: 2.06k, False: 25.6M]
  ------------------
30687|  2.06k|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\a", 2);
30688|  2.06k|                align += 2;
30689|  2.06k|                break;
30690|  2.28k|            case '\b':
  ------------------
  |  Branch (30690:13): [True: 2.28k, False: 25.6M]
  ------------------
30691|  2.28k|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\b", 2);
30692|  2.28k|                align += 2;
30693|  2.28k|                break;
30694|    275|            case 27:
  ------------------
  |  Branch (30694:13): [True: 275, False: 25.6M]
  ------------------
30695|    275|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\e", 2);
30696|    275|                align += 2;
30697|    275|                break;
30698|  3.16k|            case '\\':
  ------------------
  |  Branch (30698:13): [True: 3.16k, False: 25.6M]
  ------------------
30699|  3.16k|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\\\", 2);
30700|  3.16k|                align += 2;
30701|  3.16k|                break;
30702|  95.0k|            case '\t':
  ------------------
  |  Branch (30702:13): [True: 95.0k, False: 25.5M]
  ------------------
30703|  95.0k|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\t", 2);
30704|  95.0k|                align += 2;
30705|  95.0k|                break;
30706|  7.31M|            default:
  ------------------
  |  Branch (30706:13): [True: 7.31M, False: 18.3M]
  ------------------
30707|  7.31M|                if (c < 32 || c > 126) {
  ------------------
  |  Branch (30707:21): [True: 705k, False: 6.60M]
  |  Branch (30707:31): [True: 2.54M, False: 4.06M]
  ------------------
30708|  3.24M|                    uint8_t buf[4];
30709|  3.24M|                    buf[0] = '\\';
30710|  3.24M|                    buf[1] = 'x';
30711|  3.24M|                    buf[2] = janet_base64[(c >> 4) & 0xF];
30712|  3.24M|                    buf[3] = janet_base64[c & 0xF];
30713|  3.24M|                    janet_buffer_push_bytes(buffer, buf, 4);
30714|  3.24M|                    align += 4;
30715|  4.06M|                } else {
30716|  4.06M|                    janet_buffer_push_u8(buffer, c);
30717|  4.06M|                    align++;
30718|  4.06M|                }
30719|  7.31M|                break;
30720|  25.6M|        }
30721|  25.6M|    }
30722|  12.6M|    janet_buffer_push_u8(buffer, '"');
30723|  12.6M|    return align + 1;
30724|  12.6M|}
janet.c:janet_escape_buffer_b:
30730|   235k|static void janet_escape_buffer_b(JanetBuffer *buffer, JanetBuffer *bx) {
30731|   235k|    if (bx == buffer) {
  ------------------
  |  Branch (30731:9): [True: 0, False: 235k]
  ------------------
30732|       |        /* Ensures buffer won't resize while escaping */
30733|      0|        int64_t new_size = 6 * (int64_t) bx->count + 3;
30734|      0|        if (new_size > INT32_MAX) janet_panic("buffer overflow");
  ------------------
  |  Branch (30734:13): [True: 0, False: 0]
  ------------------
30735|      0|        janet_buffer_ensure(bx, (int32_t) new_size, 1);
30736|      0|    }
30737|   235k|    janet_buffer_push_u8(buffer, '@');
30738|   235k|    janet_escape_string_impl(buffer, bx->data, bx->count);
30739|   235k|}
janet.c:janet_pretty_:
31353|  16.5M|                                  int flags, Janet x, int32_t startlen, int32_t lookback_barrier) {
31354|  16.5M|    struct pretty S;
31355|  16.5M|    if (NULL == buffer) {
  ------------------
  |  Branch (31355:9): [True: 0, False: 16.5M]
  ------------------
31356|      0|        buffer = janet_buffer(0);
31357|      0|    }
31358|  16.5M|    S.buffer = buffer;
31359|  16.5M|    S.depth = depth;
31360|  16.5M|    S.width = width;
31361|  16.5M|    S.align = 0;
31362|  16.5M|    S.flags = flags;
31363|  16.5M|    S.bufstartlen = startlen;
31364|  16.5M|    S.lookback_barrier = lookback_barrier;
31365|  16.5M|    S.keysort_capacity = 0;
31366|       |    S.keysort_buffer = NULL;
31367|  16.5M|    S.keysort_start = 0;
31368|  16.5M|    janet_table_init(&S.seen, 10);
31369|  16.5M|    janet_pretty_one(&S, x);
31370|  16.5M|    backtrack_newlines(&S);
31371|  16.5M|    janet_table_deinit(&S.seen);
31372|  16.5M|    return S.buffer;
31373|  16.5M|}
janet.c:janet_pretty_one:
31120|  58.7M|static void janet_pretty_one(struct pretty *S, Janet x) {
31121|       |    /* Add to seen */
31122|  58.7M|    switch (janet_type(x)) {
  ------------------
  |  |  795|  58.7M|    (isnan((x).number) \
  |  |  796|  58.7M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  58.7M|        : JANET_NUMBER)
  ------------------
  |  Branch (31122:13): [True: 54.4M, False: 4.28M]
  ------------------
31123|  9.43k|        case JANET_NIL:
  ------------------
  |  Branch (31123:9): [True: 9.43k, False: 58.7M]
  ------------------
31124|  4.29M|        case JANET_NUMBER:
  ------------------
  |  Branch (31124:9): [True: 4.28M, False: 54.4M]
  ------------------
31125|  26.1M|        case JANET_SYMBOL:
  ------------------
  |  Branch (31125:9): [True: 21.9M, False: 36.8M]
  ------------------
31126|  26.2M|        case JANET_BOOLEAN:
  ------------------
  |  Branch (31126:9): [True: 13.3k, False: 58.7M]
  ------------------
31127|  26.2M|            break;
31128|  32.5M|        default: {
  ------------------
  |  Branch (31128:9): [True: 32.5M, False: 26.2M]
  ------------------
31129|  32.5M|            Janet seenid = janet_table_get(&S->seen, x);
31130|  32.5M|            if (janet_checktype(seenid, JANET_NUMBER)) {
  ------------------
  |  |  806|  32.5M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 32.5M]
  |  |  |  Branch (806:6): [True: 32.5M, Folded]
  |  |  ------------------
  |  |  807|  32.5M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|  32.5M|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 32.5M]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 32.5M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  32.5M|        : 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31131|      0|                if (S->flags & JANET_PRETTY_COLOR) {
  ------------------
  |  | 1967|      0|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (31131:21): [True: 0, False: 0]
  ------------------
31132|      0|                    janet_buffer_push_cstring(S->buffer, janet_cycle_color);
31133|      0|                }
31134|      0|                janet_buffer_push_cstring(S->buffer, "<cycle ");
31135|      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)
  |  |  ------------------
  ------------------
31136|      0|                janet_buffer_push_u8(S->buffer, '>');
31137|      0|                if (S->flags & JANET_PRETTY_COLOR) {
  ------------------
  |  | 1967|      0|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (31137:21): [True: 0, False: 0]
  ------------------
31138|      0|                    janet_buffer_push_cstring(S->buffer, "\x1B[0m");
31139|      0|                }
31140|      0|                return;
31141|  32.5M|            } else {
31142|  32.5M|                janet_table_put(&S->seen, x, janet_wrap_integer(S->seen.count));
  ------------------
  |  |  967|  32.5M|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|  32.5M|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
31143|  32.5M|                break;
31144|  32.5M|            }
31145|  32.5M|        }
31146|  58.7M|    }
31147|       |
31148|  58.7M|    switch (janet_type(x)) {
  ------------------
  |  |  795|  58.7M|    (isnan((x).number) \
  |  |  796|  58.7M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  58.7M|        : JANET_NUMBER)
  ------------------
  |  Branch (31148:13): [True: 54.4M, False: 4.28M]
  ------------------
31149|  41.9M|        default: {
  ------------------
  |  Branch (31149:9): [True: 41.9M, False: 16.7M]
  ------------------
31150|  41.9M|            const char *color = janet_pretty_colors[janet_type(x)];
  ------------------
  |  |  795|  41.9M|    (isnan((x).number) \
  |  |  796|  41.9M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  41.9M|        : JANET_NUMBER)
  ------------------
  |  Branch (31150:53): [True: 37.7M, False: 4.28M]
  ------------------
31151|  41.9M|            if (color && (S->flags & JANET_PRETTY_COLOR)) {
  ------------------
  |  | 1967|  41.9M|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (31151:17): [True: 41.9M, False: 0]
  |  Branch (31151:26): [True: 0, False: 41.9M]
  ------------------
31152|      0|                janet_buffer_push_cstring(S->buffer, color);
31153|      0|            }
31154|  41.9M|            if (janet_checktype(x, JANET_BUFFER) && janet_unwrap_buffer(x) == S->buffer) {
  ------------------
  |  |  806|  83.9M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 234k, False: 41.7M]
  |  |  |  Branch (806:6): [Folded, False: 41.9M]
  |  |  ------------------
  |  |  807|  83.9M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  83.9M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  41.9M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  41.9M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  41.9M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  41.9M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                          if (janet_checktype(x, JANET_BUFFER) && janet_unwrap_buffer(x) == S->buffer) {
  ------------------
  |  |  862|   234k|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (31154:53): [True: 0, False: 234k]
  ------------------
31155|      0|                int64_t new_size = (int64_t) S->buffer->count + S->bufstartlen * 4 + 3;
31156|      0|                if (new_size > INT32_MAX) janet_panic("buffer overflow");
  ------------------
  |  Branch (31156:21): [True: 0, False: 0]
  ------------------
31157|      0|                janet_buffer_ensure(S->buffer, (int32_t) new_size, 1);
31158|      0|                janet_buffer_push_u8(S->buffer, '@');
31159|       |                /* Use start len to print to self better */
31160|      0|                S->align += 1 + janet_escape_string_impl(S->buffer, S->buffer->data, S->bufstartlen);
31161|  41.9M|            } else {
31162|  41.9M|                S->align -= S->buffer->count;
31163|  41.9M|                janet_description_b(S->buffer, x);
31164|  41.9M|                S->align += S->buffer->count;
31165|  41.9M|            }
31166|  41.9M|            if (color && (S->flags & JANET_PRETTY_COLOR)) {
  ------------------
  |  | 1967|  41.9M|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (31166:17): [True: 41.9M, False: 0]
  |  Branch (31166:26): [True: 0, False: 41.9M]
  ------------------
31167|      0|                janet_buffer_push_cstring(S->buffer, "\x1B[0m");
31168|      0|            }
31169|  41.9M|            break;
31170|  41.9M|        }
31171|   297k|        case JANET_ARRAY:
  ------------------
  |  Branch (31171:9): [True: 297k, False: 58.4M]
  ------------------
31172|  13.7M|        case JANET_TUPLE: {
  ------------------
  |  Branch (31172:9): [True: 13.4M, False: 45.2M]
  ------------------
31173|  13.7M|            int32_t i = 0, len = 0;
31174|  13.7M|            const Janet *arr = NULL;
31175|  13.7M|            int isarray = janet_checktype(x, JANET_ARRAY);
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31176|  13.7M|            janet_indexed_view(x, &arr, &len);
31177|  13.7M|            int hasbrackets = !isarray && (janet_tuple_flag(arr) & JANET_TUPLE_FLAG_BRACKETCTOR);
  ------------------
  |  | 1806|  13.4M|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1800|  13.4M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                          int hasbrackets = !isarray && (janet_tuple_flag(arr) & JANET_TUPLE_FLAG_BRACKETCTOR);
  ------------------
  |  | 1798|  13.4M|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
  |  Branch (31177:31): [True: 13.4M, False: 297k]
  |  Branch (31177:43): [True: 37.5k, False: 13.4M]
  ------------------
31178|  13.7M|            const char *startstr = isarray ? "@[" : hasbrackets ? "[" : "(";
  ------------------
  |  Branch (31178:36): [True: 297k, False: 13.4M]
  |  Branch (31178:53): [True: 37.5k, False: 13.4M]
  ------------------
31179|  13.7M|            const char endchar = isarray ? ']' : hasbrackets ? ']' : ')';
  ------------------
  |  Branch (31179:34): [True: 297k, False: 13.4M]
  |  Branch (31179:50): [True: 37.5k, False: 13.4M]
  ------------------
31180|  13.7M|            janet_buffer_push_cstring(S->buffer, startstr);
31181|  13.7M|            S->align += (int32_t) strlen(startstr);
31182|  13.7M|            const int align = S->leaf_align = S->align;
31183|  13.7M|            S->depth--;
31184|  13.7M|            if (S->depth == 0) {
  ------------------
  |  Branch (31184:17): [True: 0, False: 13.7M]
  ------------------
31185|      0|                janet_buffer_push_cstring(S->buffer, "...");
31186|      0|                S->align += 3;
31187|  13.7M|            } else {
31188|  13.7M|                if (len > JANET_PRETTY_ARRAY_LIMIT && !(S->flags & JANET_PRETTY_NOTRUNC)) {
  ------------------
  |  |31117|  27.5M|#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 (31188:21): [True: 0, False: 13.7M]
  |  Branch (31188:55): [True: 0, False: 0]
  ------------------
31189|      0|                    for (i = 0; i < 3; i++) {
  ------------------
  |  Branch (31189:33): [True: 0, False: 0]
  ------------------
31190|      0|                        if (i) print_newline(S, align);
  ------------------
  |  Branch (31190:29): [True: 0, False: 0]
  ------------------
31191|      0|                        janet_pretty_one(S, arr[i]);
31192|      0|                    }
31193|      0|                    print_newline(S, align);
31194|      0|                    janet_buffer_push_cstring(S->buffer, "...");
31195|      0|                    S->align += 3;
31196|      0|                    for (i = len - 3; i < len; i++) {
  ------------------
  |  Branch (31196:39): [True: 0, False: 0]
  ------------------
31197|      0|                        print_newline(S, align);
31198|      0|                        janet_pretty_one(S, arr[i]);
31199|      0|                    }
31200|  13.7M|                } else {
31201|  49.6M|                    for (i = 0; i < len; i++) {
  ------------------
  |  Branch (31201:33): [True: 35.9M, False: 13.7M]
  ------------------
31202|  35.9M|                        if (i) print_newline(S, align);
  ------------------
  |  Branch (31202:29): [True: 22.3M, False: 13.5M]
  ------------------
31203|  35.9M|                        janet_pretty_one(S, arr[i]);
31204|  35.9M|                    }
31205|  13.7M|                }
31206|  13.7M|            }
31207|  13.7M|            S->depth++;
31208|  13.7M|            janet_buffer_push_u8(S->buffer, endchar);
31209|  13.7M|            S->align++;
31210|  13.7M|            break;
31211|   297k|        }
31212|  2.01M|        case JANET_STRUCT:
  ------------------
  |  Branch (31212:9): [True: 2.01M, False: 56.7M]
  ------------------
31213|  2.99M|        case JANET_TABLE: {
  ------------------
  |  Branch (31213:9): [True: 985k, False: 57.7M]
  ------------------
31214|  2.99M|            int istable = janet_checktype(x, JANET_TABLE);
  ------------------
  |  |  806|  2.99M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 2.99M]
  |  |  ------------------
  |  |  807|  2.99M|        ? 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.99M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  2.99M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  2.99M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.99M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.99M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31215|       |
31216|       |            /* For object-like tables, print class name */
31217|  2.99M|            if (istable) {
  ------------------
  |  Branch (31217:17): [True: 985k, False: 2.01M]
  ------------------
31218|   985k|                JanetTable *t = janet_unwrap_table(x);
  ------------------
  |  |  861|   985k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
31219|   985k|                JanetTable *proto = t->proto;
31220|   985k|                S->align++;
31221|   985k|                janet_buffer_push_cstring(S->buffer, "@");
31222|   985k|                if (NULL != proto) {
  ------------------
  |  Branch (31222:21): [True: 0, False: 985k]
  ------------------
31223|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31224|      0|                    const uint8_t *n;
31225|      0|                    int32_t len;
31226|      0|                    if (janet_bytes_view(name, &n, &len)) {
  ------------------
  |  Branch (31226:25): [True: 0, False: 0]
  ------------------
31227|      0|                        if (S->flags & JANET_PRETTY_COLOR) {
  ------------------
  |  | 1967|      0|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (31227:29): [True: 0, False: 0]
  ------------------
31228|      0|                            janet_buffer_push_cstring(S->buffer, janet_class_color);
31229|      0|                        }
31230|      0|                        janet_buffer_push_bytes(S->buffer, n, len);
31231|      0|                        S->align += len;
31232|      0|                        if (S->flags & JANET_PRETTY_COLOR) {
  ------------------
  |  | 1967|      0|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (31232:29): [True: 0, False: 0]
  ------------------
31233|      0|                            janet_buffer_push_cstring(S->buffer, "\x1B[0m");
31234|      0|                        }
31235|      0|                    }
31236|      0|                }
31237|  2.01M|            } else {
31238|  2.01M|                JanetStruct st = janet_unwrap_struct(x);
  ------------------
  |  |  857|  2.01M|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
31239|  2.01M|                JanetStruct proto = janet_struct_proto(st);
  ------------------
  |  | 1851|  2.01M|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1846|  2.01M|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
31240|  2.01M|                if (NULL != proto) {
  ------------------
  |  Branch (31240:21): [True: 0, False: 2.01M]
  ------------------
31241|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31242|      0|                    const uint8_t *n;
31243|      0|                    int32_t len;
31244|      0|                    if (janet_bytes_view(name, &n, &len)) {
  ------------------
  |  Branch (31244:25): [True: 0, False: 0]
  ------------------
31245|      0|                        if (S->flags & JANET_PRETTY_COLOR) {
  ------------------
  |  | 1967|      0|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (31245:29): [True: 0, False: 0]
  ------------------
31246|      0|                            janet_buffer_push_cstring(S->buffer, janet_class_color);
31247|      0|                        }
31248|      0|                        janet_buffer_push_bytes(S->buffer, n, len);
31249|      0|                        S->align += len;
31250|      0|                        if (S->flags & JANET_PRETTY_COLOR) {
  ------------------
  |  | 1967|      0|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (31250:29): [True: 0, False: 0]
  ------------------
31251|      0|                            janet_buffer_push_cstring(S->buffer, "\x1B[0m");
31252|      0|                        }
31253|      0|                    }
31254|      0|                }
31255|  2.01M|            }
31256|  2.99M|            janet_buffer_push_u8(S->buffer, '{');
31257|  2.99M|            const int align = S->leaf_align = ++S->align;
31258|       |
31259|  2.99M|            S->depth--;
31260|  2.99M|            if (S->depth == 0) {
  ------------------
  |  Branch (31260:17): [True: 0, False: 2.99M]
  ------------------
31261|      0|                janet_buffer_push_cstring(S->buffer, "...");
31262|      0|                S->align += 3;
31263|  2.99M|            } else {
31264|  2.99M|                int32_t len = 0, cap = 0;
31265|  2.99M|                const JanetKV *kvs = NULL;
31266|  2.99M|                janet_dictionary_view(x, &kvs, &len, &cap);
31267|  2.99M|                int32_t ks_start = S->keysort_start;
31268|  2.99M|                int truncated = 0;
31269|       |
31270|       |                /* Shortcut for huge dictionaries, don't bother sorting keys */
31271|  2.99M|                if (len > JANET_PRETTY_DICT_KEYSORT_LIMIT) {
  ------------------
  |  |31116|  2.99M|#define JANET_PRETTY_DICT_KEYSORT_LIMIT 2000
  ------------------
  |  Branch (31271:21): [True: 0, False: 2.99M]
  ------------------
31272|      0|                    if (!(S->flags & JANET_PRETTY_NOTRUNC)) {
  ------------------
  |  | 1969|      0|#define JANET_PRETTY_NOTRUNC 4
  ------------------
  |  Branch (31272:25): [True: 0, False: 0]
  ------------------
31273|      0|                        len = JANET_PRETTY_DICT_LIMIT;
  ------------------
  |  |31115|      0|#define JANET_PRETTY_DICT_LIMIT 30
  ------------------
31274|      0|                        truncated = 1;
31275|      0|                    }
31276|      0|                    int32_t j = 0;
31277|      0|                    for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (31277:41): [True: 0, False: 0]
  ------------------
31278|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31279|      0|                        if (i) print_newline(S, align);
  ------------------
  |  Branch (31279:29): [True: 0, False: 0]
  ------------------
31280|      0|                        janet_pretty_one(S, kvs[j].key);
31281|      0|                        janet_buffer_push_u8(S->buffer, ' ');
31282|      0|                        S->align++;
31283|      0|                        janet_pretty_one(S, kvs[j].value);
31284|      0|                        j++;
31285|      0|                    }
31286|      0|                    if (truncated) {
  ------------------
  |  Branch (31286:25): [True: 0, False: 0]
  ------------------
31287|      0|                        print_newline(S, align);
31288|      0|                        janet_buffer_push_cstring(S->buffer, "...");
31289|      0|                        S->align += 3;
31290|      0|                    }
31291|  2.99M|                } else {
31292|       |                    /* Sorted keys dictionaries */
31293|       |
31294|       |                    /* Ensure buffer is large enough to sort keys. */
31295|  2.99M|                    int64_t mincap = (int64_t) len + (int64_t) ks_start;
31296|  2.99M|                    if (mincap > INT32_MAX) {
  ------------------
  |  Branch (31296:25): [True: 0, False: 2.99M]
  ------------------
31297|      0|                        truncated = 1;
31298|      0|                        len = 0;
31299|      0|                        mincap = ks_start;
31300|      0|                    }
31301|       |
31302|  2.99M|                    if (S->keysort_capacity < mincap) {
  ------------------
  |  Branch (31302:25): [True: 1.63M, False: 1.36M]
  ------------------
31303|  1.63M|                        if (mincap >= INT32_MAX / 2) {
  ------------------
  |  Branch (31303:29): [True: 0, False: 1.63M]
  ------------------
31304|      0|                            S->keysort_capacity = INT32_MAX;
31305|  1.63M|                        } else {
31306|  1.63M|                            S->keysort_capacity = (int32_t)(mincap * 2);
31307|  1.63M|                        }
31308|  1.63M|                        S->keysort_buffer = janet_srealloc(S->keysort_buffer, sizeof(int32_t) * S->keysort_capacity);
31309|  1.63M|                        if (NULL == S->keysort_buffer) {
  ------------------
  |  Branch (31309:29): [True: 0, False: 1.63M]
  ------------------
31310|      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]
  |  |  ------------------
  ------------------
31311|      0|                        }
31312|  1.63M|                    }
31313|       |
31314|  2.99M|                    janet_sorted_keys(kvs, cap, S->keysort_buffer == NULL ? NULL : S->keysort_buffer + ks_start);
  ------------------
  |  Branch (31314:49): [True: 664k, False: 2.33M]
  ------------------
31315|  2.99M|                    S->keysort_start += len;
31316|  2.99M|                    if (!(S->flags & JANET_PRETTY_NOTRUNC) && (len > JANET_PRETTY_DICT_LIMIT)) {
  ------------------
  |  | 1969|  2.99M|#define JANET_PRETTY_NOTRUNC 4
  ------------------
                                  if (!(S->flags & JANET_PRETTY_NOTRUNC) && (len > JANET_PRETTY_DICT_LIMIT)) {
  ------------------
  |  |31115|  2.36k|#define JANET_PRETTY_DICT_LIMIT 30
  ------------------
  |  Branch (31316:25): [True: 2.36k, False: 2.99M]
  |  Branch (31316:63): [True: 11, False: 2.34k]
  ------------------
31317|     11|                        len = JANET_PRETTY_DICT_LIMIT;
  ------------------
  |  |31115|     11|#define JANET_PRETTY_DICT_LIMIT 30
  ------------------
31318|     11|                        truncated = 1;
31319|     11|                    }
31320|       |
31321|  6.15M|                    for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (31321:41): [True: 3.15M, False: 2.99M]
  ------------------
31322|  3.15M|                        if (i) print_newline(S, align);
  ------------------
  |  Branch (31322:29): [True: 1.49M, False: 1.66M]
  ------------------
31323|  3.15M|                        int32_t j = S->keysort_buffer[i + ks_start];
31324|  3.15M|                        janet_pretty_one(S, kvs[j].key);
31325|  3.15M|                        janet_buffer_push_u8(S->buffer, ' ');
31326|  3.15M|                        S->align++;
31327|  3.15M|                        janet_pretty_one(S, kvs[j].value);
31328|  3.15M|                    }
31329|       |
31330|  2.99M|                    if (truncated) {
  ------------------
  |  Branch (31330:25): [True: 11, False: 2.99M]
  ------------------
31331|     11|                        print_newline(S, align);
31332|     11|                        janet_buffer_push_cstring(S->buffer, "...");
31333|     11|                        S->align += 3;
31334|     11|                    }
31335|       |
31336|  2.99M|                }
31337|  2.99M|                S->keysort_start = ks_start;
31338|  2.99M|            }
31339|  2.99M|            S->depth++;
31340|  2.99M|            janet_buffer_push_u8(S->buffer, '}');
31341|  2.99M|            S->align++;
31342|  2.99M|            break;
31343|  2.99M|        }
31344|  58.7M|    }
31345|       |    /* Remove from seen */
31346|  58.7M|    janet_table_remove(&S->seen, x);
31347|  58.7M|    return;
31348|  58.7M|}
janet.c:print_newline:
31079|  23.8M|static void print_newline(struct pretty *S, int align) {
31080|  23.8M|    int i;
31081|  23.8M|    if (S->flags & JANET_PRETTY_ONELINE) {
  ------------------
  |  | 1968|  23.8M|#define JANET_PRETTY_ONELINE 2
  ------------------
  |  Branch (31081:9): [True: 0, False: 23.8M]
  ------------------
31082|      0|        janet_buffer_push_u8(S->buffer, ' ');
31083|      0|        return;
31084|      0|    }
31085|  23.8M|    backtrack_newlines(S);
31086|  23.8M|    janet_buffer_push_u8(S->buffer, '\n');
31087|  23.8M|    S->leaf_align = S->align = align;
31088|  74.7M|    for (i = 0; i < S->align; i++) {
  ------------------
  |  Branch (31088:17): [True: 50.9M, False: 23.8M]
  ------------------
31089|  50.9M|        janet_buffer_push_u8(S->buffer, ' ');
31090|  50.9M|    }
31091|  23.8M|}
janet.c:backtrack_newlines:
31019|  40.3M|static void backtrack_newlines(const struct pretty *S) {
31020|  40.3M|    if (S->flags & JANET_PRETTY_ONELINE || S->buffer->count <= 0)
  ------------------
  |  | 1968|  80.7M|#define JANET_PRETTY_ONELINE 2
  ------------------
  |  Branch (31020:9): [True: 0, False: 40.3M]
  |  Branch (31020:44): [True: 0, False: 40.3M]
  ------------------
31021|      0|        return;
31022|  40.3M|    switch (S->buffer->data[S->buffer->count - 1]) {
31023|  10.0M|        case ')':
  ------------------
  |  Branch (31023:9): [True: 10.0M, False: 30.2M]
  ------------------
31024|  11.2M|        case '}':
  ------------------
  |  Branch (31024:9): [True: 1.20M, False: 39.1M]
  ------------------
31025|  11.5M|        case ']':
  ------------------
  |  Branch (31025:9): [True: 296k, False: 40.0M]
  ------------------
31026|  11.5M|            break;
31027|  28.7M|        default:
  ------------------
  |  Branch (31027:9): [True: 28.7M, False: 11.5M]
  ------------------
31028|  28.7M|            return;
31029|  40.3M|    }
31030|  11.5M|    int32_t removed = 0;
31031|  11.5M|    int32_t old_count = S->buffer->count;
31032|  11.5M|    int32_t offset = old_count;
31033|  11.5M|    int32_t b0 = S->lookback_barrier;
31034|  11.5M|    int32_t columns = S->width;
31035|  11.5M|    int32_t align = 0;
31036|   273M|    while (--offset >= b0) {
  ------------------
  |  Branch (31036:12): [True: 269M, False: 3.31M]
  ------------------
31037|   269M|        const char *s = (const char *)S->buffer->data + offset;
31038|   269M|        if (*s == '\n') {
  ------------------
  |  Branch (31038:13): [True: 25.6M, False: 244M]
  ------------------
31039|  25.6M|            if (align < S->leaf_align) {
  ------------------
  |  Branch (31039:17): [True: 7.65M, False: 18.0M]
  ------------------
31040|  7.65M|                break;
31041|  7.65M|            }
31042|  18.0M|            columns += align;
31043|  18.0M|            removed += align;
31044|  18.0M|            align = 0;
31045|   244M|        } else if (*s == ' ') {
  ------------------
  |  Branch (31045:20): [True: 63.7M, False: 180M]
  ------------------
31046|  63.7M|            align++;
31047|   180M|        } else {
31048|   180M|            align = 0;
31049|       |            /* Don't count color sequences: \x1B(0|3\d)m */
31050|   180M|            if (S->flags & JANET_PRETTY_COLOR && *s == 'm') {
  ------------------
  |  | 1967|   360M|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (31050:17): [True: 0, False: 180M]
  |  Branch (31050:50): [True: 0, False: 0]
  ------------------
31051|      0|                if (offset >= (3 + b0) && strncmp("\x1B[0m", s - 3, 4) == 0) {
  ------------------
  |  Branch (31051:21): [True: 0, False: 0]
  |  Branch (31051:43): [True: 0, False: 0]
  ------------------
31052|      0|                    offset -= 3;
31053|      0|                    columns++;
31054|      0|                } else if (offset >= (4 + b0) && strncmp("\x1B[3", s - 4, 3) == 0) {
  ------------------
  |  Branch (31054:28): [True: 0, False: 0]
  |  Branch (31054:50): [True: 0, False: 0]
  ------------------
31055|      0|                    offset -= 4;
31056|      0|                    columns++;
31057|      0|                }
31058|      0|            }
31059|   180M|        }
31060|   262M|        if (--columns <= 0) {
  ------------------
  |  Branch (31060:13): [True: 624k, False: 261M]
  ------------------
31061|   624k|            return;
31062|   624k|        }
31063|   262M|    }
31064|  10.9M|    offset++; /* Don't mess with the last newline we found */
31065|  10.9M|    janet_assert(offset >= b0, "bad buffer index");
  ------------------
  |  |  389|  10.9M|#define janet_assert(c, m) do { \
  |  |  390|  10.9M|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  378|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  379|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  380|      0|        __FILE__,\
  |  |  |  |  381|      0|        __LINE__,\
  |  |  |  |  382|      0|        (m));\
  |  |  |  |  383|      0|    abort();\
  |  |  |  |  384|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (384:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (390:9): [True: 0, False: 10.9M]
  |  |  ------------------
  |  |  391|  10.9M|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 10.9M]
  |  |  ------------------
  ------------------
31066|  10.9M|    S->buffer->count -= removed;
31067|   181M|    for (int32_t i = offset; i < S->buffer->count; i++) {
  ------------------
  |  Branch (31067:30): [True: 170M, False: 10.9M]
  ------------------
31068|   170M|        if (S->buffer->data[offset] == '\n') {
  ------------------
  |  Branch (31068:13): [True: 12.9M, False: 157M]
  ------------------
31069|  12.9M|            S->buffer->data[i] = ' ';
31070|  44.7M|            while (S->buffer->data[++offset] == ' ') {
  ------------------
  |  Branch (31070:20): [True: 31.7M, False: 12.9M]
  ------------------
31071|  31.7M|                janet_assert(offset < old_count, "bad replacement of newline");
  ------------------
  |  |  389|  31.7M|#define janet_assert(c, m) do { \
  |  |  390|  31.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: 31.7M]
  |  |  ------------------
  |  |  391|  31.7M|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 31.7M]
  |  |  ------------------
  ------------------
31072|  31.7M|            }
31073|   157M|        } else {
31074|   157M|            S->buffer->data[i] = S->buffer->data[offset++];
31075|   157M|        }
31076|   170M|    }
31077|  10.9M|}
janet.c:scanformat:
31472|  34.4M|    char precision[3]) {
31473|  34.4M|    const char *p = strfrmt;
31474|       |
31475|       |    /* Parse strfrmt */
31476|  34.4M|    memset(width, '\0', 3);
31477|  34.4M|    memset(precision, '\0', 3);
31478|  34.4M|    while (*p != '\0' && strchr(FMT_FLAGS, *p) != NULL)
  ------------------
  |  |31438|  34.4M|#define FMT_FLAGS "-+ #0"
  ------------------
  |  Branch (31478:12): [True: 34.4M, False: 0]
  |  Branch (31478:26): [True: 0, False: 34.4M]
  ------------------
31479|      0|        p++; /* skip flags */
31480|  34.4M|    if ((size_t)(p - strfrmt) >= sizeof(FMT_FLAGS)) janet_panic("invalid format (repeated flags)");
  ------------------
  |  |31438|  34.4M|#define FMT_FLAGS "-+ #0"
  ------------------
  |  Branch (31480:9): [True: 0, False: 34.4M]
  ------------------
31481|  34.4M|    if (isdigit((int)(*p)))
  ------------------
  |  Branch (31481:9): [True: 0, False: 34.4M]
  ------------------
31482|      0|        width[0] = *p++; /* skip width */
31483|  34.4M|    if (isdigit((int)(*p)))
  ------------------
  |  Branch (31483:9): [True: 0, False: 34.4M]
  ------------------
31484|      0|        width[1] = *p++; /* (2 digits at most) */
31485|  34.4M|    if (*p == '.') {
  ------------------
  |  Branch (31485:9): [True: 0, False: 34.4M]
  ------------------
31486|      0|        p++;
31487|      0|        if (isdigit((int)(*p)))
  ------------------
  |  Branch (31487:13): [True: 0, False: 0]
  ------------------
31488|      0|            precision[0] = *p++; /* skip precision */
31489|      0|        if (isdigit((int)(*p)))
  ------------------
  |  Branch (31489:13): [True: 0, False: 0]
  ------------------
31490|      0|            precision[1] = *p++; /* (2 digits at most) */
31491|      0|    }
31492|  34.4M|    if (isdigit((int)(*p)))
  ------------------
  |  Branch (31492:9): [True: 0, False: 34.4M]
  ------------------
31493|      0|        janet_panic("invalid format (width or precision too long)");
31494|       |
31495|       |    /* Write to form - replace characters with fixed size stuff */
31496|  34.4M|    *(form++) = '%';
31497|  34.4M|    const char *p2 = strfrmt;
31498|  68.9M|    while (p2 <= p) {
  ------------------
  |  Branch (31498:12): [True: 34.4M, False: 34.4M]
  ------------------
31499|  34.4M|        char *loc = strchr(FMT_REPLACE_INTTYPES, *p2);
  ------------------
  |  |31439|  34.4M|#define FMT_REPLACE_INTTYPES "diouxX"
  ------------------
31500|  34.4M|        if (loc != NULL && *loc != '\0') {
  ------------------
  |  Branch (31500:13): [True: 17.9M, False: 16.5M]
  |  Branch (31500:28): [True: 17.9M, False: 0]
  ------------------
31501|  17.9M|            const char *mapping = get_fmt_mapping(*p2++);
31502|  17.9M|            size_t len = strlen(mapping);
31503|  17.9M|            memcpy(form, mapping, len);
31504|  17.9M|            form += len;
31505|  17.9M|        } else {
31506|  16.5M|            *(form++) = *(p2++);
31507|  16.5M|        }
31508|  34.4M|    }
31509|  34.4M|    *form = '\0';
31510|       |
31511|  34.4M|    return p;
31512|  34.4M|}
janet.c:get_fmt_mapping:
31460|  17.9M|static const char *get_fmt_mapping(char c) {
31461|  53.7M|    for (size_t i = 0; i < (sizeof(format_mappings) / sizeof(struct FmtMapping)); i++) {
  ------------------
  |  Branch (31461:24): [True: 53.7M, False: 0]
  ------------------
31462|  53.7M|        if (format_mappings[i].c == c)
  ------------------
  |  Branch (31462:13): [True: 17.9M, False: 35.8M]
  ------------------
31463|  17.9M|            return format_mappings[i].mapping;
31464|  53.7M|    }
31465|      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]
  |  |  ------------------
  ------------------
31466|      0|}
janet.c:bignat_zero:
34323|  17.0k|static void bignat_zero(struct BigNat *x) {
34324|  17.0k|    x->first_digit = 0;
34325|  17.0k|    x->n = 0;
34326|  17.0k|    x->cap = 0;
34327|       |    x->digits = NULL;
34328|  17.0k|}
janet.c:bignat_muladd:
34355|  49.5k|static void bignat_muladd(struct BigNat *mant, uint32_t factor, uint32_t term) {
34356|  49.5k|    int32_t i;
34357|  49.5k|    uint64_t carry = ((uint64_t) mant->first_digit) * factor + term;
34358|  49.5k|    mant->first_digit = carry % BIGNAT_BASE;
  ------------------
  |  |34312|  49.5k|#define BIGNAT_BASE 0x80000000U
  ------------------
34359|  49.5k|    carry /= BIGNAT_BASE;
  ------------------
  |  |34312|  49.5k|#define BIGNAT_BASE 0x80000000U
  ------------------
34360|   372k|    for (i = 0; i < mant->n; i++) {
  ------------------
  |  Branch (34360:17): [True: 322k, False: 49.5k]
  ------------------
34361|   322k|        carry += ((uint64_t) mant->digits[i]) * factor;
34362|   322k|        mant->digits[i] = carry % BIGNAT_BASE;
  ------------------
  |  |34312|   322k|#define BIGNAT_BASE 0x80000000U
  ------------------
34363|   322k|        carry /= BIGNAT_BASE;
  ------------------
  |  |34312|   322k|#define BIGNAT_BASE 0x80000000U
  ------------------
34364|   322k|    }
34365|  49.5k|    if (carry) bignat_append(mant, (uint32_t) carry);
  ------------------
  |  Branch (34365:9): [True: 10.9k, False: 38.5k]
  ------------------
34366|  49.5k|}
janet.c:bignat_append:
34348|  10.9k|static void bignat_append(struct BigNat *mant, uint32_t dig) {
34349|  10.9k|    bignat_extra(mant, 1)[0] = dig;
34350|  10.9k|}
janet.c:bignat_extra:
34331|  12.2k|static uint32_t *bignat_extra(struct BigNat *mant, int32_t n) {
34332|  12.2k|    int32_t oldn = mant->n;
34333|  12.2k|    int32_t newn = oldn + n;
34334|  12.2k|    if (mant->cap < newn) {
  ------------------
  |  Branch (34334:9): [True: 3.92k, False: 8.30k]
  ------------------
34335|  3.92k|        int32_t newcap = 2 * newn;
34336|  3.92k|        uint32_t *mem = janet_realloc(mant->digits, (size_t) newcap * sizeof(uint32_t));
  ------------------
  |  | 2409|  3.92k|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
34337|  3.92k|        if (NULL == mem) {
  ------------------
  |  Branch (34337:13): [True: 0, False: 3.92k]
  ------------------
34338|      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]
  |  |  ------------------
  ------------------
34339|      0|        }
34340|  3.92k|        mant->cap = newcap;
34341|  3.92k|        mant->digits = mem;
34342|  3.92k|    }
34343|  12.2k|    mant->n = newn;
34344|  12.2k|    return mant->digits + oldn;
34345|  12.2k|}
janet.c:convert:
34451|  13.0k|    int32_t exponent) {
34452|       |
34453|  13.0k|    int32_t exponent2 = 0;
34454|       |
34455|       |    /* Approximate exponent in base 2 of mant and exponent. This should get us a good estimate of the final size of the
34456|       |     * number, within * 2^32 or so. */
34457|  13.0k|    int64_t mant_exp2_approx = mant->n * 32 + 16;
34458|  13.0k|    int64_t exp_exp2_approx = (int64_t)(floor(log2(base) * exponent));
34459|  13.0k|    int64_t exp2_approx = mant_exp2_approx + exp_exp2_approx;
34460|       |
34461|       |    /* Short circuit zero, huge, and small numbers. We use the exponent range of valid IEEE754 doubles (-1022, 1023)
34462|       |     * with a healthy buffer to allow for inaccuracies in the approximation and denormailzed numbers. */
34463|  13.0k|    if (mant->n == 0 && mant->first_digit == 0)
  ------------------
  |  Branch (34463:9): [True: 12.6k, False: 329]
  |  Branch (34463:25): [True: 3.22k, False: 9.46k]
  ------------------
34464|  3.22k|        return negative ? -0.0 : 0.0;
  ------------------
  |  Branch (34464:16): [True: 93, False: 3.12k]
  ------------------
34465|  9.79k|    if (exp2_approx > 1176)
  ------------------
  |  Branch (34465:9): [True: 111, False: 9.68k]
  ------------------
34466|    111|        return negative ? -INFINITY : INFINITY;
  ------------------
  |  Branch (34466:16): [True: 19, False: 92]
  ------------------
34467|  9.68k|    if (exp2_approx < -1175)
  ------------------
  |  Branch (34467:9): [True: 86, False: 9.59k]
  ------------------
34468|     86|        return negative ? -0.0 : 0.0;
  ------------------
  |  Branch (34468:16): [True: 4, False: 82]
  ------------------
34469|       |
34470|       |    /* Final value is X = mant * base ^ exponent * 2 ^ exponent2
34471|       |     * Get exponent to zero while holding X constant. */
34472|       |
34473|       |    /* Positive exponents are simple */
34474|  33.8k|    for (; exponent > 3; exponent -= 4) bignat_muladd(mant, base * base * base * base, 0);
  ------------------
  |  Branch (34474:12): [True: 24.2k, False: 9.59k]
  ------------------
34475|  10.3k|    for (; exponent > 1; exponent -= 2) bignat_muladd(mant, base * base, 0);
  ------------------
  |  Branch (34475:12): [True: 766, False: 9.59k]
  ------------------
34476|  10.4k|    for (; exponent > 0; exponent -= 1) bignat_muladd(mant, base, 0);
  ------------------
  |  Branch (34476:12): [True: 804, False: 9.59k]
  ------------------
34477|       |
34478|       |    /* Negative exponents are tricky - we don't want to loose bits
34479|       |     * from integer division, so we need to premultiply. */
34480|  9.59k|    if (exponent < 0) {
  ------------------
  |  Branch (34480:9): [True: 1.22k, False: 8.36k]
  ------------------
34481|  1.22k|        int32_t shamt = 5 - exponent / 4;
34482|  1.22k|        bignat_lshift_n(mant, shamt);
34483|  1.22k|        exponent2 -= shamt * BIGNAT_NBIT;
  ------------------
  |  |34311|  1.22k|#define BIGNAT_NBIT 31
  ------------------
34484|  10.1k|        for (; exponent < -3; exponent += 4) bignat_div(mant, base * base * base * base);
  ------------------
  |  Branch (34484:16): [True: 8.95k, False: 1.22k]
  ------------------
34485|  1.75k|        for (; exponent < -1; exponent += 2) bignat_div(mant, base * base);
  ------------------
  |  Branch (34485:16): [True: 529, False: 1.22k]
  ------------------
34486|  2.01k|        for (; exponent <  0; exponent += 1) bignat_div(mant, base);
  ------------------
  |  Branch (34486:16): [True: 790, False: 1.22k]
  ------------------
34487|  1.22k|    }
34488|       |
34489|  9.59k|    return negative
  ------------------
  |  Branch (34489:12): [True: 1.16k, False: 8.43k]
  ------------------
34490|  9.59k|           ? -bignat_extract(mant, exponent2)
34491|  9.59k|           : bignat_extract(mant, exponent2);
34492|  9.68k|}
janet.c:bignat_lshift_n:
34387|  1.22k|static void bignat_lshift_n(struct BigNat *mant, int n) {
34388|  1.22k|    if (!n) return;
  ------------------
  |  Branch (34388:9): [True: 0, False: 1.22k]
  ------------------
34389|  1.22k|    int32_t oldn = mant->n;
34390|  1.22k|    bignat_extra(mant, n);
34391|  1.22k|    memmove(mant->digits + n, mant->digits, sizeof(uint32_t) * oldn);
34392|  1.22k|    memset(mant->digits, 0, sizeof(uint32_t) * (n - 1));
34393|  1.22k|    mant->digits[n - 1] = mant->first_digit;
34394|  1.22k|    mant->first_digit = 0;
34395|  1.22k|}
janet.c:bignat_div:
34369|  10.2k|static void bignat_div(struct BigNat *mant, uint32_t divisor) {
34370|  10.2k|    int32_t i;
34371|  10.2k|    uint32_t quotient, remainder;
34372|  10.2k|    uint64_t dividend;
34373|  10.2k|    remainder = 0, quotient = 0;
34374|  1.60M|    for (i = mant->n - 1; i >= 0; i--) {
  ------------------
  |  Branch (34374:27): [True: 1.59M, False: 10.2k]
  ------------------
34375|  1.59M|        dividend = ((uint64_t)remainder * BIGNAT_BASE) + mant->digits[i];
  ------------------
  |  |34312|  1.59M|#define BIGNAT_BASE 0x80000000U
  ------------------
34376|  1.59M|        if (i < mant->n - 1) mant->digits[i + 1] = quotient;
  ------------------
  |  Branch (34376:13): [True: 1.58M, False: 10.2k]
  ------------------
34377|  1.59M|        quotient = (uint32_t)(dividend / divisor);
34378|  1.59M|        remainder = (uint32_t)(dividend % divisor);
34379|  1.59M|        mant->digits[i] = remainder;
34380|  1.59M|    }
34381|  10.2k|    dividend = ((uint64_t)remainder * BIGNAT_BASE) + mant->first_digit;
  ------------------
  |  |34312|  10.2k|#define BIGNAT_BASE 0x80000000U
  ------------------
34382|  10.2k|    if (mant->n && mant->digits[mant->n - 1] == 0) mant->n--;
  ------------------
  |  Branch (34382:9): [True: 10.2k, False: 0]
  |  Branch (34382:20): [True: 2.83k, False: 7.43k]
  ------------------
34383|  10.2k|    mant->first_digit = (uint32_t)(dividend / divisor);
34384|  10.2k|}
janet.c:bignat_extract:
34412|  9.59k|static double bignat_extract(struct BigNat *mant, int32_t exponent2) {
34413|  9.59k|    uint64_t top53;
34414|  9.59k|    int32_t n = mant->n;
34415|       |    /* Get most significant 53 bits from mant. Bit 52 (0 indexed) should
34416|       |     * always be 1. This is essentially a large right shift on mant.*/
34417|  9.59k|    if (n) {
  ------------------
  |  Branch (34417:9): [True: 2.47k, False: 7.11k]
  ------------------
34418|       |        /* Two or more digits */
34419|  2.47k|        uint64_t d1 = mant->digits[n - 1]; /* MSD (non-zero) */
34420|  2.47k|        uint64_t d2 = (n == 1) ? mant->first_digit : mant->digits[n - 2];
  ------------------
  |  Branch (34420:23): [True: 372, False: 2.10k]
  ------------------
34421|  2.47k|        uint64_t d3 = (n > 2) ? mant->digits[n - 3] : (n == 2) ? mant->first_digit : 0;
  ------------------
  |  Branch (34421:23): [True: 1.65k, False: 827]
  |  Branch (34421:55): [True: 455, False: 372]
  ------------------
34422|  2.47k|        int lz = clz((uint32_t) d1);
  ------------------
  |  |34398|  2.47k|#define clz(x) __builtin_clz(x)
  ------------------
34423|  2.47k|        int nbits = 32 - lz;
34424|       |        /* First get 54 bits */
34425|  2.47k|        top53 = (d2 << (54 - BIGNAT_NBIT)) + (d3 >> (2 * BIGNAT_NBIT - 54));
  ------------------
  |  |34311|  2.47k|#define BIGNAT_NBIT 31
  ------------------
                      top53 = (d2 << (54 - BIGNAT_NBIT)) + (d3 >> (2 * BIGNAT_NBIT - 54));
  ------------------
  |  |34311|  2.47k|#define BIGNAT_NBIT 31
  ------------------
34426|  2.47k|        top53 >>= nbits;
34427|  2.47k|        top53 |= (d1 << (54 - nbits));
34428|       |        /* Rounding based on lowest bit of 54 */
34429|  2.47k|        if (top53 & 1) top53++;
  ------------------
  |  Branch (34429:13): [True: 941, False: 1.53k]
  ------------------
34430|  2.47k|        top53 >>= 1;
34431|  2.47k|        if (top53 > 0x1FffffFFFFffffUL) {
  ------------------
  |  Branch (34431:13): [True: 30, False: 2.44k]
  ------------------
34432|     30|            top53 >>= 1;
34433|     30|            exponent2++;
34434|     30|        }
34435|       |        /* Correct exponent - to correct for large right shift to mantissa. */
34436|  2.47k|        exponent2 += (nbits - 53) + BIGNAT_NBIT * n;
  ------------------
  |  |34311|  2.47k|#define BIGNAT_NBIT 31
  ------------------
34437|  7.11k|    } else {
34438|       |        /* One digit */
34439|  7.11k|        top53 = mant->first_digit;
34440|  7.11k|    }
34441|  9.59k|    return ldexp((double)top53, exponent2);
34442|  9.59k|}
janet.c:scan_uint64:
34652|  2.41k|    int *neg) {
34653|  2.41k|    const uint8_t *end = str + len;
34654|  2.41k|    int seenadigit = 0;
34655|  2.41k|    int base = 10;
34656|  2.41k|    *neg = 0;
34657|  2.41k|    *out = 0;
34658|  2.41k|    uint64_t accum = 0;
34659|  2.41k|    if (len > JANET_NUMBER_LENGTH_RIDICULOUS) return 0;
  ------------------
  |  |34296|  2.41k|#define JANET_NUMBER_LENGTH_RIDICULOUS 0xFFFF
  ------------------
  |  Branch (34659:9): [True: 0, False: 2.41k]
  ------------------
34660|       |    /* Get sign */
34661|  2.41k|    if (str >= end) return 0;
  ------------------
  |  Branch (34661:9): [True: 0, False: 2.41k]
  ------------------
34662|  2.41k|    if (*str == '-') {
  ------------------
  |  Branch (34662:9): [True: 882, False: 1.53k]
  ------------------
34663|    882|        *neg = 1;
34664|    882|        str++;
34665|  1.53k|    } else if (*str == '+') {
  ------------------
  |  Branch (34665:16): [True: 88, False: 1.44k]
  ------------------
34666|     88|        str++;
34667|     88|    }
34668|       |    /* Check for leading 0x or digit digit r */
34669|  2.41k|    if (str + 1 < end && str[0] == '0' && str[1] == 'x') {
  ------------------
  |  Branch (34669:9): [True: 1.30k, False: 1.10k]
  |  Branch (34669:26): [True: 319, False: 989]
  |  Branch (34669:43): [True: 65, False: 254]
  ------------------
34670|     65|        base = 16;
34671|     65|        str += 2;
34672|  2.34k|    } else if (str + 1 < end  &&
  ------------------
  |  Branch (34672:16): [True: 1.24k, False: 1.10k]
  ------------------
34673|  1.24k|               str[0] >= '0' && str[0] <= '9' &&
  ------------------
  |  Branch (34673:16): [True: 1.15k, False: 90]
  |  Branch (34673:33): [True: 1.04k, False: 107]
  ------------------
34674|  1.04k|               str[1] == 'r') {
  ------------------
  |  Branch (34674:16): [True: 43, False: 1.00k]
  ------------------
34675|     43|        base = str[0] - '0';
34676|     43|        str += 2;
34677|  2.30k|    } else if (str + 2 < end  &&
  ------------------
  |  Branch (34677:16): [True: 960, False: 1.34k]
  ------------------
34678|    960|               str[0] >= '0' && str[0] <= '9' &&
  ------------------
  |  Branch (34678:16): [True: 895, False: 65]
  |  Branch (34678:33): [True: 842, False: 53]
  ------------------
34679|    842|               str[1] >= '0' && str[1] <= '9' &&
  ------------------
  |  Branch (34679:16): [True: 815, False: 27]
  |  Branch (34679:33): [True: 725, False: 90]
  ------------------
34680|    725|               str[2] == 'r') {
  ------------------
  |  Branch (34680:16): [True: 129, False: 596]
  ------------------
34681|    129|        base = 10 * (str[0] - '0') + (str[1] - '0');
34682|    129|        if (base < 2 || base > 36) return 0;
  ------------------
  |  Branch (34682:13): [True: 19, False: 110]
  |  Branch (34682:25): [True: 36, False: 74]
  ------------------
34683|     74|        str += 3;
34684|     74|    }
34685|       |
34686|       |    /* Skip leading zeros */
34687|  3.40k|    while (str < end && *str == '0') {
  ------------------
  |  Branch (34687:12): [True: 2.83k, False: 574]
  |  Branch (34687:25): [True: 1.04k, False: 1.78k]
  ------------------
34688|  1.04k|        seenadigit = 1;
34689|  1.04k|        str++;
34690|  1.04k|    }
34691|       |    /* Parse significant digits */
34692|  11.7k|    while (str < end) {
  ------------------
  |  Branch (34692:12): [True: 9.85k, False: 1.87k]
  ------------------
34693|  9.85k|        if (*str == '_') {
  ------------------
  |  Branch (34693:13): [True: 472, False: 9.37k]
  ------------------
34694|    472|            if (!seenadigit) return 0;
  ------------------
  |  Branch (34694:17): [True: 86, False: 386]
  ------------------
34695|  9.37k|        } else {
34696|  9.37k|            int digit = digit_lookup[*str & 0x7F];
34697|  9.37k|            if (*str > 127 || digit >= base) return 0;
  ------------------
  |  Branch (34697:17): [True: 67, False: 9.31k]
  |  Branch (34697:31): [True: 265, False: 9.04k]
  ------------------
34698|  9.04k|            if (accum > (UINT64_MAX - digit) / base) return 0;
  ------------------
  |  Branch (34698:17): [True: 67, False: 8.98k]
  ------------------
34699|  8.98k|            accum = accum * base + digit;
34700|  8.98k|            seenadigit = 1;
34701|  8.98k|        }
34702|  9.36k|        str++;
34703|  9.36k|    }
34704|       |
34705|  1.87k|    if (!seenadigit) return 0;
  ------------------
  |  Branch (34705:9): [True: 187, False: 1.68k]
  ------------------
34706|  1.68k|    *out = accum;
34707|  1.68k|    return 1;
34708|  1.87k|}
janet.c:janet_symcache_findmem:
35180|  43.8M|    int *success) {
35181|  43.8M|    uint32_t bounds[4];
35182|  43.8M|    uint32_t i, j, index;
35183|  43.8M|    const uint8_t **firstEmpty = NULL;
35184|       |
35185|       |    /* We will search two ranges - index to the end,
35186|       |     * and 0 to the index. */
35187|  43.8M|    index = (uint32_t)hash & (janet_vm.cache_capacity - 1);
35188|  43.8M|    bounds[0] = index;
35189|  43.8M|    bounds[1] = janet_vm.cache_capacity;
35190|  43.8M|    bounds[2] = 0;
35191|  43.8M|    bounds[3] = index;
35192|  43.8M|    for (j = 0; j < 4; j += 2)
  ------------------
  |  Branch (35192:17): [True: 43.8M, False: 0]
  ------------------
35193|  68.0M|        for (i = bounds[j]; i < bounds[j + 1]; ++i) {
  ------------------
  |  Branch (35193:29): [True: 68.0M, False: 27.5k]
  ------------------
35194|  68.0M|            const uint8_t *test = janet_vm.cache[i];
35195|       |            /* Check empty spots */
35196|  68.0M|            if (NULL == test) {
  ------------------
  |  Branch (35196:17): [True: 24.3M, False: 43.6M]
  ------------------
35197|  24.3M|                if (NULL == firstEmpty)
  ------------------
  |  Branch (35197:21): [True: 24.3M, False: 0]
  ------------------
35198|  24.3M|                    firstEmpty = janet_vm.cache + i;
35199|  24.3M|                goto notfound;
35200|  24.3M|            }
35201|       |            /* Check for marked deleted */
35202|  43.6M|            if (JANET_SYMCACHE_DELETED == test) {
  ------------------
  |  Branch (35202:17): [True: 6.93k, False: 43.6M]
  ------------------
35203|  6.93k|                if (firstEmpty == NULL)
  ------------------
  |  Branch (35203:21): [True: 6.88k, False: 49]
  ------------------
35204|  6.88k|                    firstEmpty = janet_vm.cache + i;
35205|  6.93k|                continue;
35206|  6.93k|            }
35207|  43.6M|            if (janet_string_equalconst(test, str, len, hash)) {
  ------------------
  |  Branch (35207:17): [True: 19.4M, False: 24.1M]
  ------------------
35208|       |                /* Replace first deleted */
35209|  19.4M|                *success = 1;
35210|  19.4M|                if (firstEmpty != NULL) {
  ------------------
  |  Branch (35210:21): [True: 6.88k, False: 19.4M]
  ------------------
35211|  6.88k|                    *firstEmpty = test;
35212|  6.88k|                    janet_vm.cache[i] = JANET_SYMCACHE_DELETED;
35213|  6.88k|                    return firstEmpty;
35214|  6.88k|                }
35215|  19.4M|                return janet_vm.cache + i;
35216|  19.4M|            }
35217|  43.6M|        }
35218|  24.3M|notfound:
35219|  24.3M|    *success = 0;
35220|  24.3M|    janet_assert(firstEmpty != NULL, "symcache failed to get memory");
  ------------------
  |  |  389|  24.3M|#define janet_assert(c, m) do { \
  |  |  390|  24.3M|    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: 24.3M]
  |  |  ------------------
  |  |  391|  24.3M|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 24.3M]
  |  |  ------------------
  ------------------
35221|  24.3M|    return firstEmpty;
35222|  24.3M|}
janet.c:janet_symcache_put:
35258|  13.7M|static void janet_symcache_put(const uint8_t *x, const uint8_t **bucket) {
35259|  13.7M|    if ((janet_vm.cache_count + janet_vm.cache_deleted) * 2 > janet_vm.cache_capacity) {
  ------------------
  |  Branch (35259:9): [True: 13.7k, False: 13.7M]
  ------------------
35260|  13.7k|        int status;
35261|  13.7k|        janet_cache_resize(janet_tablen((2 * janet_vm.cache_count + 1)));
35262|  13.7k|        bucket = janet_symcache_find(x, &status);
  ------------------
  |  |35225|  13.7k|    janet_symcache_findmem((str), janet_string_length(str), janet_string_hash(str), (success))
  |  |  ------------------
  |  |  |  | 1813|  13.7k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1812|  13.7k|#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.7k|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1812|  13.7k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35263|  13.7k|    }
35264|       |    /* Add x to the cache */
35265|  13.7M|    janet_vm.cache_count++;
35266|  13.7M|    *bucket = x;
35267|  13.7M|}
janet.c:janet_cache_resize:
35228|  13.7k|static void janet_cache_resize(uint32_t newCapacity) {
35229|  13.7k|    uint32_t i, oldCapacity;
35230|  13.7k|    const uint8_t **oldCache = janet_vm.cache;
35231|  13.7k|    const uint8_t **newCache = janet_calloc(1, (size_t) newCapacity * sizeof(const uint8_t *));
  ------------------
  |  | 2412|  13.7k|#define janet_calloc(X, Y) calloc((X), (Y))
  ------------------
35232|  13.7k|    if (newCache == NULL) {
  ------------------
  |  Branch (35232:9): [True: 0, False: 13.7k]
  ------------------
35233|      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]
  |  |  ------------------
  ------------------
35234|      0|    }
35235|  13.7k|    oldCapacity = janet_vm.cache_capacity;
35236|  13.7k|    janet_vm.cache = newCache;
35237|  13.7k|    janet_vm.cache_capacity = newCapacity;
35238|  13.7k|    janet_vm.cache_deleted = 0;
35239|       |    /* Add all of the old cache entries back */
35240|  21.1M|    for (i = 0; i < oldCapacity; ++i) {
  ------------------
  |  Branch (35240:17): [True: 21.1M, False: 13.7k]
  ------------------
35241|  21.1M|        int status;
35242|  21.1M|        const uint8_t **bucket;
35243|  21.1M|        const uint8_t *x = oldCache[i];
35244|  21.1M|        if (x != NULL && x != JANET_SYMCACHE_DELETED) {
  ------------------
  |  Branch (35244:13): [True: 10.5M, False: 10.5M]
  |  Branch (35244:26): [True: 10.5M, False: 0]
  ------------------
35245|  10.5M|            bucket = janet_symcache_find(x, &status);
  ------------------
  |  |35225|  10.5M|    janet_symcache_findmem((str), janet_string_length(str), janet_string_hash(str), (success))
  |  |  ------------------
  |  |  |  | 1813|  10.5M|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1812|  10.5M|#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.5M|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1812|  10.5M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35246|  10.5M|            if (status || bucket == NULL) {
  ------------------
  |  Branch (35246:17): [True: 0, False: 10.5M]
  |  Branch (35246:27): [True: 0, False: 10.5M]
  ------------------
35247|       |                /* there was a problem with the algorithm. */
35248|      0|                break;
35249|      0|            }
35250|  10.5M|            *bucket = x;
35251|  10.5M|        }
35252|  21.1M|    }
35253|       |    /* Free the old cache */
35254|  13.7k|    janet_free((void *)oldCache);
  ------------------
  |  | 2415|  13.7k|#define janet_free(X) free((X))
  ------------------
35255|  13.7k|}
janet.c:janet_table_init_impl:
35399|  21.5M|static JanetTable *janet_table_init_impl(JanetTable *table, int32_t capacity, int stackalloc) {
35400|  21.5M|    JanetKV *data;
35401|  21.5M|    capacity = janet_tablen(capacity);
35402|  21.5M|    if (stackalloc) table->gc.flags = JANET_TABLE_FLAG_STACK;
  ------------------
  |  |35385|  16.5M|#define JANET_TABLE_FLAG_STACK 0x10000
  ------------------
  |  Branch (35402:9): [True: 16.5M, False: 5.06M]
  ------------------
35403|  21.5M|    if (capacity) {
  ------------------
  |  Branch (35403:9): [True: 21.5M, False: 0]
  ------------------
35404|  21.5M|        if (stackalloc) {
  ------------------
  |  Branch (35404:13): [True: 16.5M, False: 5.06M]
  ------------------
35405|  16.5M|            data = janet_memalloc_empty_local(capacity);
35406|  16.5M|        } else {
35407|  5.06M|            data = (JanetKV *) janet_memalloc_empty(capacity);
35408|  5.06M|            if (NULL == data) {
  ------------------
  |  Branch (35408:17): [True: 0, False: 5.06M]
  ------------------
35409|      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]
  |  |  ------------------
  ------------------
35410|      0|            }
35411|  5.06M|        }
35412|  21.5M|        table->data = data;
35413|  21.5M|        table->capacity = capacity;
35414|  21.5M|    } else {
35415|      0|        table->data = NULL;
35416|      0|        table->capacity = 0;
35417|      0|    }
35418|  21.5M|    table->count = 0;
35419|  21.5M|    table->deleted = 0;
35420|       |    table->proto = NULL;
35421|  21.5M|    return table;
35422|  21.5M|}
janet.c:janet_memalloc_empty_local:
35387|  17.6M|static void *janet_memalloc_empty_local(int32_t count) {
35388|  17.6M|    int32_t i;
35389|  17.6M|    void *mem = janet_smalloc((size_t) count * sizeof(JanetKV));
35390|  17.6M|    JanetKV *mmem = (JanetKV *)mem;
35391|   293M|    for (i = 0; i < count; i++) {
  ------------------
  |  Branch (35391:17): [True: 275M, False: 17.6M]
  ------------------
35392|   275M|        JanetKV *kv = mmem + i;
35393|   275M|        kv->key = janet_wrap_nil();
  ------------------
  |  |  831|   275M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   275M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   275M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   275M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35394|   275M|        kv->value = janet_wrap_nil();
  ------------------
  |  |  831|   275M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   275M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   275M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   275M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35395|   275M|    }
35396|  17.6M|    return mem;
35397|  17.6M|}
janet.c:janet_table_rehash:
35472|  5.25M|static void janet_table_rehash(JanetTable *t, int32_t size) {
35473|  5.25M|    JanetKV *olddata = t->data;
35474|  5.25M|    JanetKV *newdata;
35475|  5.25M|    int islocal = t->gc.flags & JANET_TABLE_FLAG_STACK;
  ------------------
  |  |35385|  5.25M|#define JANET_TABLE_FLAG_STACK 0x10000
  ------------------
35476|  5.25M|    if (islocal) {
  ------------------
  |  Branch (35476:9): [True: 1.17M, False: 4.07M]
  ------------------
35477|  1.17M|        newdata = (JanetKV *) janet_memalloc_empty_local(size);
35478|  4.07M|    } else {
35479|  4.07M|        newdata = (JanetKV *) janet_memalloc_empty(size);
35480|  4.07M|        if (NULL == newdata) {
  ------------------
  |  Branch (35480:13): [True: 0, False: 4.07M]
  ------------------
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|  4.07M|    }
35484|  5.25M|    int32_t oldcapacity = t->capacity;
35485|  5.25M|    t->data = newdata;
35486|  5.25M|    t->capacity = size;
35487|  5.25M|    t->deleted = 0;
35488|  67.1M|    for (int32_t i = 0; i < oldcapacity; i++) {
  ------------------
  |  Branch (35488:25): [True: 61.9M, False: 5.25M]
  ------------------
35489|  61.9M|        JanetKV *kv = olddata + i;
35490|  61.9M|        if (!janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|  61.9M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 61.9M]
  |  |  ------------------
  |  |  807|  61.9M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  61.9M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  61.9M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  61.9M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  61.9M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  61.9M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35490:13): [True: 24.4M, False: 37.4M]
  ------------------
35491|  24.4M|            JanetKV *newkv = janet_table_find(t, kv->key);
35492|  24.4M|            *newkv = *kv;
35493|  24.4M|        }
35494|  61.9M|    }
35495|  5.25M|    if (islocal) {
  ------------------
  |  Branch (35495:9): [True: 1.17M, False: 4.07M]
  ------------------
35496|  1.17M|        janet_sfree(olddata);
35497|  4.07M|    } else {
35498|  4.07M|        janet_free(olddata);
  ------------------
  |  | 2415|  4.07M|#define janet_free(X) free((X))
  ------------------
35499|  4.07M|    }
35500|  5.25M|}
janet.c:janet_check_pointer_align:
36624|  2.47M|static void janet_check_pointer_align(void *p) {
36625|  2.47M|    (void) p;
36626|       |#if defined(JANET_NANBOX_64) && JANET_NANBOX_64_POINTER_SHIFT != 0
36627|       |    union {
36628|       |        void *p;
36629|       |        uintptr_t u;
36630|       |    } un;
36631|       |    un.p = p;
36632|       |    janet_assert(!(un.u & (uintptr_t)((1 << JANET_NANBOX_64_POINTER_SHIFT) - 1)),
36633|       |                 "unaligned pointer wrap - cfunction pointers and abstract types must be aligned with this nanboxing configuration.");
36634|       |#endif
36635|  2.47M|}
janet.c:janet_equals_containers:
37534|  6.11M|static int janet_equals_containers(Janet x, Janet y) {
37535|  6.11M|    janet_vm.traversal = janet_vm.traversal_base;
37536|  6.13M|    do {
37537|  6.13M|        if (janet_type(x) != janet_type(y)) return 0;
  ------------------
  |  |  795|  6.13M|    (isnan((x).number) \
  |  |  796|  6.13M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  6.13M|        : JANET_NUMBER)
  ------------------
                      if (janet_type(x) != janet_type(y)) return 0;
  ------------------
  |  |  795|  6.13M|    (isnan((x).number) \
  |  |  796|  6.13M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  6.13M|        : JANET_NUMBER)
  ------------------
  |  Branch (37537:13): [True: 6.13M, False: 317]
  |  Branch (37537:13): [True: 276, False: 6.13M]
  |  Branch (37537:30): [True: 6.13M, False: 150]
  ------------------
37538|  6.13M|        switch (janet_type(x)) {
  ------------------
  |  |  795|  6.13M|    (isnan((x).number) \
  |  |  796|  6.13M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  6.13M|        : JANET_NUMBER)
  ------------------
  |  Branch (37538:17): [True: 6.13M, False: 138]
  ------------------
37539|  7.21k|            default:
  ------------------
  |  Branch (37539:13): [True: 7.21k, False: 6.12M]
  ------------------
37540|  7.21k|                if (!janet_equals_leaf(x, y)) return 0;
  ------------------
  |  Branch (37540:21): [True: 99, False: 7.11k]
  ------------------
37541|  7.11k|                break;
37542|  6.07M|            case JANET_TUPLE: {
  ------------------
  |  Branch (37542:13): [True: 6.07M, False: 54.7k]
  ------------------
37543|  6.07M|                const Janet *t1 = janet_unwrap_tuple(x);
  ------------------
  |  |  858|  6.07M|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
37544|  6.07M|                const Janet *t2 = janet_unwrap_tuple(y);
  ------------------
  |  |  858|  6.07M|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
37545|  6.07M|                if (t1 == t2) break;
  ------------------
  |  Branch (37545:21): [True: 0, False: 6.07M]
  ------------------
37546|  6.07M|                if (JANET_TUPLE_FLAG_BRACKETCTOR & (janet_tuple_flag(t1) ^ janet_tuple_flag(t2))) return 0;
  ------------------
  |  | 1798|  6.07M|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
                              if (JANET_TUPLE_FLAG_BRACKETCTOR & (janet_tuple_flag(t1) ^ janet_tuple_flag(t2))) return 0;
  ------------------
  |  | 1806|  6.07M|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1800|  6.07M|#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|  6.07M|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1800|  6.07M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (37546:21): [True: 27.0k, False: 6.04M]
  ------------------
37547|  6.04M|                if (janet_tuple_hash(t1) != janet_tuple_hash(t2)) return 0;
  ------------------
  |  | 1803|  6.04M|#define janet_tuple_hash(t) (janet_tuple_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1800|  6.04M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                              if (janet_tuple_hash(t1) != janet_tuple_hash(t2)) return 0;
  ------------------
  |  | 1803|  6.04M|#define janet_tuple_hash(t) (janet_tuple_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1800|  6.04M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (37547:21): [True: 6.04M, False: 6.34k]
  ------------------
37548|  6.34k|                if (janet_tuple_length(t1) != janet_tuple_length(t2)) return 0;
  ------------------
  |  | 1802|  6.34k|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1800|  6.34k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                              if (janet_tuple_length(t1) != janet_tuple_length(t2)) return 0;
  ------------------
  |  | 1802|  6.34k|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1800|  6.34k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (37548:21): [True: 0, False: 6.34k]
  ------------------
37549|  6.34k|                push_traversal_node(janet_tuple_head(t1), janet_tuple_head(t2), 0);
  ------------------
  |  | 1800|  6.34k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  ------------------
                              push_traversal_node(janet_tuple_head(t1), janet_tuple_head(t2), 0);
  ------------------
  |  | 1800|  6.34k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  ------------------
37550|  6.34k|                break;
37551|  6.34k|            }
37552|  47.5k|            case JANET_STRUCT: {
  ------------------
  |  Branch (37552:13): [True: 47.5k, False: 6.08M]
  ------------------
37553|  47.5k|                const JanetKV *s1 = janet_unwrap_struct(x);
  ------------------
  |  |  857|  47.5k|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
37554|  47.5k|                const JanetKV *s2 = janet_unwrap_struct(y);
  ------------------
  |  |  857|  47.5k|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
37555|  47.5k|                if (s1 == s2) break;
  ------------------
  |  Branch (37555:21): [True: 0, False: 47.5k]
  ------------------
37556|  47.5k|                if (janet_struct_hash(s1) != janet_struct_hash(s2)) return 0;
  ------------------
  |  | 1850|  47.5k|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1846|  47.5k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                              if (janet_struct_hash(s1) != janet_struct_hash(s2)) return 0;
  ------------------
  |  | 1850|  47.5k|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1846|  47.5k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (37556:21): [True: 47.3k, False: 197]
  ------------------
37557|    197|                if (janet_struct_length(s1) != janet_struct_length(s2)) return 0;
  ------------------
  |  | 1848|    197|#define janet_struct_length(t) (janet_struct_head(t)->length)
  |  |  ------------------
  |  |  |  | 1846|    197|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                              if (janet_struct_length(s1) != janet_struct_length(s2)) return 0;
  ------------------
  |  | 1848|    197|#define janet_struct_length(t) (janet_struct_head(t)->length)
  |  |  ------------------
  |  |  |  | 1846|    197|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (37557:21): [True: 0, False: 197]
  ------------------
37558|    197|                if (janet_struct_proto(s1) && !janet_struct_proto(s2)) return 0;
  ------------------
  |  | 1851|    394|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1846|    197|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  |  |  |  Branch (1851:31): [True: 0, False: 197]
  |  |  ------------------
  ------------------
                              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 (37558:47): [True: 0, False: 0]
  ------------------
37559|    197|                if (!janet_struct_proto(s1) && janet_struct_proto(s2)) return 0;
  ------------------
  |  | 1851|    394|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1846|    197|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                              if (!janet_struct_proto(s1) && janet_struct_proto(s2)) return 0;
  ------------------
  |  | 1851|    197|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1846|    197|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  |  |  |  Branch (1851:31): [True: 0, False: 197]
  |  |  ------------------
  ------------------
  |  Branch (37559:21): [True: 197, False: 0]
  ------------------
37560|    197|                push_traversal_node(janet_struct_head(s1), janet_struct_head(s2), 0);
  ------------------
  |  | 1846|    197|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  ------------------
                              push_traversal_node(janet_struct_head(s1), janet_struct_head(s2), 0);
  ------------------
  |  | 1846|    197|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  ------------------
37561|    197|                break;
37562|    197|            }
37563|  6.13M|        }
37564|  6.13M|    } while (!traversal_next(&x, &y));
  ------------------
  |  Branch (37564:14): [True: 13.2k, False: 379]
  ------------------
37565|    379|    return 1;
37566|  6.11M|}
janet.c:janet_equals_leaf:
37521|  6.25M|static int janet_equals_leaf(Janet x, Janet y) {
37522|  6.25M|    switch (janet_type(x)) {
  ------------------
  |  |  795|  6.25M|    (isnan((x).number) \
  |  |  796|  6.25M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  6.25M|        : JANET_NUMBER)
  ------------------
  |  Branch (37522:13): [True: 8.59k, False: 6.24M]
  ------------------
37523|  6.24M|        case JANET_NUMBER:
  ------------------
  |  Branch (37523:9): [True: 6.24M, False: 8.59k]
  ------------------
37524|  6.24M|            return janet_unwrap_number(x) == janet_unwrap_number(y);
  ------------------
  |  |  839|  6.24M|#define janet_unwrap_number(x) ((x).number)
  ------------------
                          return janet_unwrap_number(x) == janet_unwrap_number(y);
  ------------------
  |  |  839|  6.24M|#define janet_unwrap_number(x) ((x).number)
  ------------------
37525|  1.34k|        case JANET_STRING:
  ------------------
  |  Branch (37525:9): [True: 1.34k, False: 6.25M]
  ------------------
37526|  1.34k|            return janet_string_equal(janet_unwrap_string(x), janet_unwrap_string(y));
  ------------------
  |  |  863|  1.34k|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
                          return janet_string_equal(janet_unwrap_string(x), janet_unwrap_string(y));
  ------------------
  |  |  863|  1.34k|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
37527|    351|        case JANET_ABSTRACT:
  ------------------
  |  Branch (37527:9): [True: 351, False: 6.25M]
  ------------------
37528|    351|            return !janet_compare_abstract(janet_unwrap_abstract(x), janet_unwrap_abstract(y));
  ------------------
  |  |  866|    351|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
                          return !janet_compare_abstract(janet_unwrap_abstract(x), janet_unwrap_abstract(y));
  ------------------
  |  |  866|    351|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
37529|  6.90k|        default:
  ------------------
  |  Branch (37529:9): [True: 6.90k, False: 6.24M]
  ------------------
37530|  6.90k|            return janet_bitwise_same(x, y);
  ------------------
  |  |  401|  6.90k|#define janet_bitwise_same(x, y) (janet_u64(x) == janet_u64(y))
  |  |  ------------------
  |  |  |  |  788|  6.90k|#define janet_u64(x) ((x).u64)
  |  |  ------------------
  |  |               #define janet_bitwise_same(x, y) (janet_u64(x) == janet_u64(y))
  |  |  ------------------
  |  |  |  |  788|  6.90k|#define janet_u64(x) ((x).u64)
  |  |  ------------------
  ------------------
37531|  6.25M|    }
37532|  6.25M|}
janet.c:murmur64:
37574|  76.8M|static uint64_t murmur64(uint64_t h) {
37575|  76.8M|    h ^= h >> 33;
37576|  76.8M|    h *= 0xff51afd7ed558ccdUL;
37577|  76.8M|    h ^= h >> 33;
37578|  76.8M|    h *= 0xc4ceb9fe1a85ec53UL;
37579|  76.8M|    h ^= h >> 33;
37580|  76.8M|    return h;
37581|  76.8M|}
janet.c:janet_compare_abstract:
37507|  19.2k|static int janet_compare_abstract(JanetAbstract xx, JanetAbstract yy) {
37508|  19.2k|    if (xx == yy) return 0;
  ------------------
  |  Branch (37508:9): [True: 0, False: 19.2k]
  ------------------
37509|  19.2k|    const JanetAbstractType *xt = janet_abstract_type(xx);
  ------------------
  |  | 1899|  19.2k|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|  19.2k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
37510|  19.2k|    const JanetAbstractType *yt = janet_abstract_type(yy);
  ------------------
  |  | 1899|  19.2k|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|  19.2k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
37511|  19.2k|    if (xt != yt) {
  ------------------
  |  Branch (37511:9): [True: 2.21k, False: 16.9k]
  ------------------
37512|  2.21k|        return xt > yt ? 1 : -1;
  ------------------
  |  Branch (37512:16): [True: 279, False: 1.94k]
  ------------------
37513|  2.21k|    }
37514|  16.9k|    if (xt->compare == NULL) {
  ------------------
  |  Branch (37514:9): [True: 54, False: 16.9k]
  ------------------
37515|     54|        return xx > yy ? 1 : -1;
  ------------------
  |  Branch (37515:16): [True: 8, False: 46]
  ------------------
37516|     54|    }
37517|  16.9k|    return xt->compare(xx, yy);
37518|  16.9k|}
janet.c:push_traversal_node:
37305|   198k|static void push_traversal_node(void *lhs, void *rhs, int32_t index2) {
37306|   198k|    JanetTraversalNode node;
37307|   198k|    node.self = (JanetGCObject *) lhs;
37308|   198k|    node.other = (JanetGCObject *) rhs;
37309|   198k|    node.index = 0;
37310|   198k|    node.index2 = index2;
37311|   198k|    int is_new = janet_vm.traversal_base == NULL;
37312|   198k|    if (is_new || (janet_vm.traversal + 1 >= janet_vm.traversal_top)) {
  ------------------
  |  Branch (37312:9): [True: 301, False: 198k]
  |  Branch (37312:19): [True: 0, False: 198k]
  ------------------
37313|    301|        size_t oldsize = is_new ? 0 : (janet_vm.traversal - janet_vm.traversal_base);
  ------------------
  |  Branch (37313:26): [True: 301, False: 0]
  ------------------
37314|    301|        size_t newsize = 2 * oldsize + 1;
37315|    301|        if (newsize < 128) {
  ------------------
  |  Branch (37315:13): [True: 301, False: 0]
  ------------------
37316|    301|            newsize = 128;
37317|    301|        }
37318|    301|        JanetTraversalNode *tn = janet_realloc(janet_vm.traversal_base, newsize * sizeof(JanetTraversalNode));
  ------------------
  |  | 2409|    301|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
37319|    301|        if (tn == NULL) {
  ------------------
  |  Branch (37319:13): [True: 0, False: 301]
  ------------------
37320|      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]
  |  |  ------------------
  ------------------
37321|      0|        }
37322|    301|        janet_vm.traversal_base = tn;
37323|    301|        janet_vm.traversal_top = janet_vm.traversal_base + newsize;
37324|    301|        janet_vm.traversal = janet_vm.traversal_base + oldsize;
37325|    301|    }
37326|   198k|    *(++janet_vm.traversal) = node;
37327|   198k|}
janet.c:traversal_next:
37337|   392k|static int traversal_next(Janet *x, Janet *y) {
37338|   392k|    JanetTraversalNode *t = janet_vm.traversal;
37339|   399k|    while (t && t > janet_vm.traversal_base) {
  ------------------
  |  Branch (37339:12): [True: 399k, False: 457]
  |  Branch (37339:17): [True: 398k, False: 780]
  ------------------
37340|   398k|        JanetGCObject *self = t->self;
37341|   398k|        JanetTupleHead *tself = (JanetTupleHead *)self;
37342|   398k|        JanetStructHead *sself = (JanetStructHead *)self;
37343|   398k|        JanetGCObject *other = t->other;
37344|   398k|        JanetTupleHead *tother = (JanetTupleHead *)other;
37345|   398k|        JanetStructHead *sother = (JanetStructHead *)other;
37346|   398k|        if ((self->flags & JANET_MEM_TYPEBITS) == JANET_MEMORY_TUPLE) {
  ------------------
  |  |  652|   398k|#define JANET_MEM_TYPEBITS 0xFF
  ------------------
  |  Branch (37346:13): [True: 371k, False: 27.1k]
  ------------------
37347|       |            /* Node is a tuple at index t->index */
37348|   371k|            if (t->index < tself->length && t->index < tother->length) {
  ------------------
  |  Branch (37348:17): [True: 365k, False: 5.55k]
  |  Branch (37348:45): [True: 360k, False: 4.90k]
  ------------------
37349|   360k|                int32_t index = t->index++;
37350|   360k|                *x = tself->data[index];
37351|   360k|                *y = tother->data[index];
37352|   360k|                janet_vm.traversal = t;
37353|   360k|                return 0;
37354|   360k|            }
37355|  10.4k|            if (t->index2 && tself->length != tother->length) {
  ------------------
  |  Branch (37355:17): [True: 9.97k, False: 490]
  |  Branch (37355:30): [True: 6.90k, False: 3.06k]
  ------------------
37356|  6.90k|                return tself->length > tother->length ? 3 : 1;
  ------------------
  |  Branch (37356:24): [True: 4.90k, False: 2.00k]
  ------------------
37357|  6.90k|            }
37358|  27.1k|        } else {
37359|       |            /* Node is a struct at index t->index: if t->index2 is true, we should return the values. */
37360|  27.1k|            if (t->index2) {
  ------------------
  |  Branch (37360:17): [True: 11.9k, False: 15.1k]
  ------------------
37361|  11.9k|                t->index2 = 0;
37362|  11.9k|                int32_t index = t->index++;
37363|  11.9k|                *x = sself->data[index].value;
37364|  11.9k|                *y = sother->data[index].value;
37365|  11.9k|                janet_vm.traversal = t;
37366|  11.9k|                return 0;
37367|  11.9k|            }
37368|  15.1k|            for (int32_t i = t->index; i < sself->capacity; i++) {
  ------------------
  |  Branch (37368:40): [True: 11.9k, False: 3.22k]
  ------------------
37369|  11.9k|                t->index2 = 1;
37370|  11.9k|                *x = sself->data[t->index].key;
37371|  11.9k|                *y = sother->data[t->index].key;
37372|  11.9k|                janet_vm.traversal = t;
37373|  11.9k|                return 0;
37374|  11.9k|            }
37375|       |            /* Traverse prototype */
37376|  3.22k|            JanetStruct sproto = sself->proto;
37377|  3.22k|            JanetStruct oproto = sother->proto;
37378|  3.22k|            if (sproto && !oproto) return 3;
  ------------------
  |  Branch (37378:17): [True: 0, False: 3.22k]
  |  Branch (37378:27): [True: 0, False: 0]
  ------------------
37379|  3.22k|            if (!sproto && oproto) return 1;
  ------------------
  |  Branch (37379:17): [True: 3.22k, False: 0]
  |  Branch (37379:28): [True: 0, False: 3.22k]
  ------------------
37380|  3.22k|            if (oproto && sproto) {
  ------------------
  |  Branch (37380:17): [True: 0, False: 3.22k]
  |  Branch (37380:27): [True: 0, False: 0]
  ------------------
37381|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37382|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37383|      0|                janet_vm.traversal = t - 1;
37384|      0|                return 0;
37385|      0|            }
37386|  3.22k|        }
37387|  6.77k|        t--;
37388|  6.77k|    }
37389|  1.23k|    janet_vm.traversal = t;
37390|  1.23k|    return 2;
37391|   392k|}

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

